@aquera/nile-elements 0.0.111 → 0.0.113

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 (395) hide show
  1. package/README.md +10 -0
  2. package/demo/filenames.txt +1 -1
  3. package/demo/variables.css +2 -0
  4. package/dist/index.cjs.js +1 -1
  5. package/dist/index.esm.js +1 -1
  6. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  7. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  8. package/dist/nile-accordion/nile-accordion.esm.js +1 -1
  9. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  10. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  11. package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
  12. package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
  13. package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
  14. package/dist/nile-avatar/nile-avatar.esm.js +1 -1
  15. package/dist/nile-badge/index.cjs.js +1 -1
  16. package/dist/nile-badge/index.esm.js +1 -1
  17. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  18. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  19. package/dist/nile-badge/nile-badge.esm.js +1 -1
  20. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  21. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  22. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  23. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
  24. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
  25. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
  26. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
  27. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
  28. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
  29. package/dist/nile-button/index.cjs.js +1 -1
  30. package/dist/nile-button/index.esm.js +1 -1
  31. package/dist/nile-button/nile-button.cjs.js +1 -1
  32. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  33. package/dist/nile-button/nile-button.esm.js +1 -1
  34. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  35. package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
  36. package/dist/nile-button/nile-button.test.esm.js +1 -1
  37. package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
  38. package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
  39. package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
  40. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  41. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  42. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  43. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  44. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  45. package/dist/nile-calendar/nile-calendar.esm.js +7 -7
  46. package/dist/nile-card/nile-card.cjs.js +1 -1
  47. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  48. package/dist/nile-card/nile-card.esm.js +1 -1
  49. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  50. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  51. package/dist/nile-checkbox/nile-checkbox.esm.js +1 -1
  52. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  53. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  54. package/dist/nile-chip/nile-chip.esm.js +1 -1
  55. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  56. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  57. package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
  58. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  59. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  60. package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
  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 +5 -3
  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.esm.js +1 -1
  69. package/dist/nile-drawer/index.cjs.js +1 -1
  70. package/dist/nile-drawer/index.esm.js +1 -1
  71. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  72. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  73. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  74. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  75. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  76. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  77. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  78. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  79. package/dist/nile-empty-state/nile-empty-state.esm.js +1 -1
  80. package/dist/nile-highlighter/index.cjs.js +1 -1
  81. package/dist/nile-highlighter/index.esm.js +1 -1
  82. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  83. package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
  84. package/dist/nile-highlighter/nile-highlighter.esm.js +2 -2
  85. package/dist/nile-highlighter/theme-list.cjs.js +1 -1
  86. package/dist/nile-highlighter/theme-list.cjs.js.map +1 -1
  87. package/dist/nile-highlighter/theme-list.esm.js +1 -1
  88. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  89. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  90. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js +2 -0
  91. package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js.map +1 -0
  92. package/dist/nile-icon/icons/svg/insert-at-cursor.esm.js +1 -0
  93. package/dist/nile-icon/icons/svg/warning-01.cjs.js +2 -0
  94. package/dist/nile-icon/icons/svg/warning-01.cjs.js.map +1 -0
  95. package/dist/nile-icon/icons/svg/warning-01.esm.js +1 -0
  96. package/dist/nile-icon/index.cjs.js +1 -1
  97. package/dist/nile-icon/index.cjs.js.map +1 -1
  98. package/dist/nile-icon/index.esm.js +2 -2
  99. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  100. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  101. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  102. package/dist/nile-icon-button/index.cjs.js +1 -1
  103. package/dist/nile-icon-button/index.esm.js +1 -1
  104. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  105. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  106. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  107. package/dist/nile-input/index.cjs.js +1 -1
  108. package/dist/nile-input/index.esm.js +1 -1
  109. package/dist/nile-input/nile-input.cjs.js +1 -1
  110. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  111. package/dist/nile-input/nile-input.esm.js +1 -1
  112. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  113. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  114. package/dist/nile-input/nile-input.test.esm.js +1 -1
  115. package/dist/nile-link/nile-link.cjs.js +1 -1
  116. package/dist/nile-link/nile-link.cjs.js.map +1 -1
  117. package/dist/nile-link/nile-link.esm.js +1 -1
  118. package/dist/nile-list/nile-list.cjs.js +1 -1
  119. package/dist/nile-list/nile-list.cjs.js.map +1 -1
  120. package/dist/nile-list/nile-list.esm.js +1 -1
  121. package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
  122. package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
  123. package/dist/nile-list-item/nile-list-item.esm.js +1 -1
  124. package/dist/nile-menu/nile-menu.cjs.js +1 -1
  125. package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
  126. package/dist/nile-menu/nile-menu.esm.js +1 -1
  127. package/dist/nile-menu-item/index.cjs.js +1 -1
  128. package/dist/nile-menu-item/index.esm.js +1 -1
  129. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  130. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  131. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  132. package/dist/nile-option/index.cjs.js +1 -1
  133. package/dist/nile-option/index.esm.js +1 -1
  134. package/dist/nile-option/nile-option.cjs.js +1 -1
  135. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  136. package/dist/nile-option/nile-option.esm.js +1 -1
  137. package/dist/nile-popover/nile-popover.cjs.js +1 -1
  138. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  139. package/dist/nile-popover/nile-popover.esm.js +2 -2
  140. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  141. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  142. package/dist/nile-popup/nile-popup.esm.js +1 -1
  143. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  144. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  145. package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
  146. package/dist/nile-select/index.cjs.js +1 -1
  147. package/dist/nile-select/index.esm.js +1 -1
  148. package/dist/nile-select/nile-select.cjs.js +1 -1
  149. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  150. package/dist/nile-select/nile-select.esm.js +1 -1
  151. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  152. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  153. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +1 -1
  154. package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
  155. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
  156. package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
  157. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  158. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  159. package/dist/nile-stepper/nile-stepper.esm.js +1 -1
  160. package/dist/nile-tab/index.cjs.js +1 -1
  161. package/dist/nile-tab/index.esm.js +1 -1
  162. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  163. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  164. package/dist/nile-tab/nile-tab.esm.js +1 -1
  165. package/dist/nile-tab-group/index.cjs.js +1 -1
  166. package/dist/nile-tab-group/index.esm.js +1 -1
  167. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  168. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  169. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  170. package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
  171. package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
  172. package/dist/nile-table-body/nile-table-body.esm.js +1 -1
  173. package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
  174. package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
  175. package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
  176. package/dist/nile-tag/index.cjs.js +1 -1
  177. package/dist/nile-tag/index.esm.js +1 -1
  178. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  179. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  180. package/dist/nile-tag/nile-tag.esm.js +1 -1
  181. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  182. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  183. package/dist/nile-textarea/nile-textarea.esm.js +1 -1
  184. package/dist/nile-toast/index.cjs.js +1 -1
  185. package/dist/nile-toast/index.esm.js +1 -1
  186. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  187. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  188. package/dist/nile-toast/nile-toast.esm.js +1 -1
  189. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  190. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  191. package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
  192. package/dist/nile-tree/index.cjs.js +1 -1
  193. package/dist/nile-tree/index.esm.js +1 -1
  194. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  195. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  196. package/dist/nile-tree/nile-tree.esm.js +1 -1
  197. package/dist/nile-tree-item/index.cjs.js +1 -1
  198. package/dist/nile-tree-item/index.esm.js +1 -1
  199. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  200. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  201. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  202. package/dist/src/nile-accordion/nile-accordion.d.ts +0 -1
  203. package/dist/src/nile-accordion/nile-accordion.js +0 -1
  204. package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
  205. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +0 -1
  206. package/dist/src/nile-auto-complete/nile-auto-complete.js +0 -1
  207. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  208. package/dist/src/nile-avatar/nile-avatar.d.ts +0 -1
  209. package/dist/src/nile-avatar/nile-avatar.js +0 -1
  210. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  211. package/dist/src/nile-badge/nile-badge.d.ts +0 -1
  212. package/dist/src/nile-badge/nile-badge.js +0 -1
  213. package/dist/src/nile-badge/nile-badge.js.map +1 -1
  214. package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +0 -1
  215. package/dist/src/nile-breadcrumb/nile-breadcrumb.js +0 -5
  216. package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
  217. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +0 -1
  218. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +0 -1
  219. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
  220. package/dist/src/nile-button/nile-button.d.ts +0 -1
  221. package/dist/src/nile-button/nile-button.js +0 -1
  222. package/dist/src/nile-button/nile-button.js.map +1 -1
  223. package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +0 -1
  224. package/dist/src/nile-button-toggle/nile-button-toggle.js +0 -1
  225. package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
  226. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +0 -1
  227. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +0 -1
  228. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
  229. package/dist/src/nile-calendar/nile-calendar.d.ts +4 -6
  230. package/dist/src/nile-calendar/nile-calendar.js +7 -18
  231. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  232. package/dist/src/nile-card/nile-card.d.ts +0 -1
  233. package/dist/src/nile-card/nile-card.js +0 -1
  234. package/dist/src/nile-card/nile-card.js.map +1 -1
  235. package/dist/src/nile-checkbox/nile-checkbox.d.ts +0 -1
  236. package/dist/src/nile-checkbox/nile-checkbox.js +0 -1
  237. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  238. package/dist/src/nile-chip/nile-chip.d.ts +0 -1
  239. package/dist/src/nile-chip/nile-chip.js +0 -1
  240. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  241. package/dist/src/nile-code-editor/nile-code-editor.d.ts +0 -1
  242. package/dist/src/nile-code-editor/nile-code-editor.js +0 -1
  243. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  244. package/dist/src/nile-content-editor/nile-content-editor.d.ts +0 -1
  245. package/dist/src/nile-content-editor/nile-content-editor.js +0 -1
  246. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  247. package/dist/src/nile-date-picker/nile-date-picker.d.ts +0 -1
  248. package/dist/src/nile-date-picker/nile-date-picker.js +4 -2
  249. package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
  250. package/dist/src/nile-dialog/nile-dialog.d.ts +0 -1
  251. package/dist/src/nile-dialog/nile-dialog.js +0 -1
  252. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  253. package/dist/src/nile-drawer/nile-drawer.d.ts +0 -1
  254. package/dist/src/nile-drawer/nile-drawer.js +0 -1
  255. package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
  256. package/dist/src/nile-empty-state/nile-empty-state.d.ts +0 -1
  257. package/dist/src/nile-empty-state/nile-empty-state.js +0 -1
  258. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  259. package/dist/src/nile-highlighter/nile-highlighter.d.ts +2 -1
  260. package/dist/src/nile-highlighter/nile-highlighter.js +16 -11
  261. package/dist/src/nile-highlighter/nile-highlighter.js.map +1 -1
  262. package/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
  263. package/dist/src/nile-icon/icons/svg/index.js +2 -0
  264. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  265. package/dist/src/nile-icon/icons/svg/insert-at-cursor.d.ts +5 -0
  266. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js +5 -0
  267. package/dist/src/nile-icon/icons/svg/insert-at-cursor.js.map +1 -0
  268. package/dist/src/nile-icon/icons/svg/warning-01.d.ts +5 -0
  269. package/dist/src/nile-icon/icons/svg/warning-01.js +5 -0
  270. package/dist/src/nile-icon/icons/svg/warning-01.js.map +1 -0
  271. package/dist/src/nile-icon-button/nile-icon-button.d.ts +0 -1
  272. package/dist/src/nile-icon-button/nile-icon-button.js +0 -1
  273. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  274. package/dist/src/nile-input/nile-input.d.ts +0 -1
  275. package/dist/src/nile-input/nile-input.js +0 -1
  276. package/dist/src/nile-input/nile-input.js.map +1 -1
  277. package/dist/src/nile-link/nile-link.d.ts +0 -1
  278. package/dist/src/nile-link/nile-link.js +0 -1
  279. package/dist/src/nile-link/nile-link.js.map +1 -1
  280. package/dist/src/nile-list/nile-list.d.ts +0 -1
  281. package/dist/src/nile-list/nile-list.js +0 -5
  282. package/dist/src/nile-list/nile-list.js.map +1 -1
  283. package/dist/src/nile-list-item/nile-list-item.d.ts +0 -1
  284. package/dist/src/nile-list-item/nile-list-item.js +0 -1
  285. package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
  286. package/dist/src/nile-menu/nile-menu.d.ts +0 -1
  287. package/dist/src/nile-menu/nile-menu.js +0 -1
  288. package/dist/src/nile-menu/nile-menu.js.map +1 -1
  289. package/dist/src/nile-menu-item/nile-menu-item.d.ts +0 -2
  290. package/dist/src/nile-menu-item/nile-menu-item.js +0 -2
  291. package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
  292. package/dist/src/nile-option/nile-option.d.ts +0 -2
  293. package/dist/src/nile-option/nile-option.js +0 -2
  294. package/dist/src/nile-option/nile-option.js.map +1 -1
  295. package/dist/src/nile-popover/nile-popover.d.ts +0 -1
  296. package/dist/src/nile-popover/nile-popover.js +0 -1
  297. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  298. package/dist/src/nile-popup/nile-popup.d.ts +0 -2
  299. package/dist/src/nile-popup/nile-popup.js +0 -2
  300. package/dist/src/nile-popup/nile-popup.js.map +1 -1
  301. package/dist/src/nile-radio-group/nile-radio-group.d.ts +0 -1
  302. package/dist/src/nile-radio-group/nile-radio-group.js +0 -1
  303. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  304. package/dist/src/nile-select/nile-select.d.ts +0 -1
  305. package/dist/src/nile-select/nile-select.js +0 -1
  306. package/dist/src/nile-select/nile-select.js.map +1 -1
  307. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +0 -1
  308. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +0 -1
  309. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  310. package/dist/src/nile-split-panel/nile-split-panel.d.ts +0 -1
  311. package/dist/src/nile-split-panel/nile-split-panel.js +0 -1
  312. package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
  313. package/dist/src/nile-stepper/nile-stepper.d.ts +0 -1
  314. package/dist/src/nile-stepper/nile-stepper.js +0 -1
  315. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  316. package/dist/src/nile-tab/nile-tab.d.ts +0 -1
  317. package/dist/src/nile-tab/nile-tab.js +0 -1
  318. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  319. package/dist/src/nile-tab-group/nile-tab-group.d.ts +0 -1
  320. package/dist/src/nile-tab-group/nile-tab-group.js +0 -1
  321. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  322. package/dist/src/nile-table-body/nile-table-body.d.ts +0 -1
  323. package/dist/src/nile-table-body/nile-table-body.js +0 -1
  324. package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
  325. package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +0 -1
  326. package/dist/src/nile-table-header-item/nile-table-header-item.js +0 -1
  327. package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
  328. package/dist/src/nile-tag/nile-tag.d.ts +0 -1
  329. package/dist/src/nile-tag/nile-tag.js +0 -1
  330. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  331. package/dist/src/nile-textarea/nile-textarea.d.ts +0 -1
  332. package/dist/src/nile-textarea/nile-textarea.js +0 -1
  333. package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  334. package/dist/src/nile-toast/nile-toast.d.ts +0 -1
  335. package/dist/src/nile-toast/nile-toast.js +0 -1
  336. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  337. package/dist/src/nile-tooltip/nile-tooltip.d.ts +0 -1
  338. package/dist/src/nile-tooltip/nile-tooltip.js +0 -1
  339. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  340. package/dist/src/nile-tree/nile-tree.d.ts +0 -1
  341. package/dist/src/nile-tree/nile-tree.js +0 -1
  342. package/dist/src/nile-tree/nile-tree.js.map +1 -1
  343. package/dist/src/nile-tree-item/nile-tree-item.d.ts +0 -1
  344. package/dist/src/nile-tree-item/nile-tree-item.js +0 -1
  345. package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -1
  346. package/dist/tsconfig.tsbuildinfo +1 -1
  347. package/package.json +1 -1
  348. package/src/nile-accordion/nile-accordion.ts +0 -1
  349. package/src/nile-auto-complete/nile-auto-complete.ts +0 -2
  350. package/src/nile-avatar/nile-avatar.ts +0 -2
  351. package/src/nile-badge/nile-badge.ts +0 -2
  352. package/src/nile-breadcrumb/nile-breadcrumb.ts +0 -2
  353. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +0 -2
  354. package/src/nile-button/nile-button.ts +0 -2
  355. package/src/nile-button-toggle/nile-button-toggle.ts +0 -2
  356. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +0 -2
  357. package/src/nile-calendar/nile-calendar.ts +10 -20
  358. package/src/nile-card/nile-card.ts +0 -2
  359. package/src/nile-checkbox/nile-checkbox.ts +0 -2
  360. package/src/nile-chip/nile-chip.ts +0 -2
  361. package/src/nile-code-editor/nile-code-editor.ts +0 -2
  362. package/src/nile-content-editor/nile-content-editor.ts +0 -2
  363. package/src/nile-date-picker/nile-date-picker.ts +4 -3
  364. package/src/nile-dialog/nile-dialog.ts +0 -2
  365. package/src/nile-drawer/nile-drawer.ts +0 -2
  366. package/src/nile-empty-state/nile-empty-state.ts +0 -2
  367. package/src/nile-highlighter/nile-highlighter.ts +20 -13
  368. package/src/nile-icon/icons/svg/index.ts +2 -0
  369. package/src/nile-icon/icons/svg/insert-at-cursor.ts +5 -0
  370. package/src/nile-icon/icons/svg/warning-01.ts +5 -0
  371. package/src/nile-icon-button/nile-icon-button.ts +0 -2
  372. package/src/nile-input/nile-input.ts +0 -2
  373. package/src/nile-link/nile-link.ts +0 -2
  374. package/src/nile-list/nile-list.ts +0 -2
  375. package/src/nile-list-item/nile-list-item.ts +0 -2
  376. package/src/nile-menu/nile-menu.ts +0 -3
  377. package/src/nile-menu-item/nile-menu-item.ts +0 -3
  378. package/src/nile-option/nile-option.ts +0 -3
  379. package/src/nile-popover/nile-popover.ts +0 -2
  380. package/src/nile-popup/nile-popup.ts +0 -3
  381. package/src/nile-radio-group/nile-radio-group.ts +0 -2
  382. package/src/nile-select/nile-select.ts +0 -2
  383. package/src/nile-slide-toggle/nile-slide-toggle.ts +0 -2
  384. package/src/nile-split-panel/nile-split-panel.ts +0 -2
  385. package/src/nile-stepper/nile-stepper.ts +0 -2
  386. package/src/nile-tab/nile-tab.ts +0 -2
  387. package/src/nile-tab-group/nile-tab-group.ts +0 -2
  388. package/src/nile-table-body/nile-table-body.ts +0 -2
  389. package/src/nile-table-header-item/nile-table-header-item.ts +0 -2
  390. package/src/nile-tag/nile-tag.ts +0 -2
  391. package/src/nile-textarea/nile-textarea.ts +0 -2
  392. package/src/nile-toast/nile-toast.ts +0 -2
  393. package/src/nile-tooltip/nile-tooltip.ts +0 -2
  394. package/src/nile-tree/nile-tree.ts +0 -2
  395. package/src/nile-tree-item/nile-tree-item.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n property,\n CSSResultArray,\n TemplateResult,\n nothing\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { PropertyValueMap } from 'lit';\nimport { NileDropdown } from '../nile-dropdown';\ntype NileCalendarDateRange={ startDate: string, endDate: string }\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected override BUBBLES: boolean=false;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: String, attribute: 'value' }) valueAttribute: | string | null = null;\n\n @property({ type: String, attribute:true, reflect:true }) allowedDates: string = JSON.stringify({});\n\n @property({ type: Boolean, reflect: true }) range = false;\n\n @property({ type: Boolean, attribute: true, reflect:true }) hideTypes = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: String }) selectedUnit: string;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) hideDurationFields: String[] = [];\n \n @property({ type: Boolean}) showManualInputs :boolean=false;\n\n @state() startDate: Date | null = null;\n\n @state() endDate: Date | null = null;\n\n @state() isSelectingStart = true;\n\n @state() hideInput: Boolean = false;\n\n @state() value: Date | null;\n\n @state() currentMonth: number = new Date().getMonth();\n\n @state() currentYear: number = new Date().getFullYear();\n\n @state() allowedDatesLocal: NileCalendarDateRange | any = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n attributeChangedCallback(name: string, _old: string | null, newValue: string | null): void {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } \n super.attributeChangedCallback(name, _old, newValue);\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n let newDateRange: NileCalendarDateRange | null;\n try {\n newDateRange=JSON.parse(this.allowedDates);\n } catch (error) {\n newDateRange=null;\n }\n if (!newDateRange || Object.keys(newDateRange).length == 0) {\n this.allowedDatesLocal=null;\n return;\n }\n this.hideInput=true;\n const startDate = this.getUTCDate(newDateRange.startDate)\n const endDate = this.getUTCDate(newDateRange.endDate)\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n }\n else\n {\n this.allowedDatesLocal=newDateRange;\n }\n }\n \n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n }\n }\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n return html`\n <div\n class=${classMap({\n base:true,\n base__range:this.range,\n })}\n >\n <div class=${classMap({\n \"calendar-config\":true,\n \"hidden\": !this.range || (this.range && this.hideTypes)\n })}>\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\" value=\"${this.type}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n ${this.type == 'relative' ? this.renderRelativeCalendar():''}\n ${this.type == 'absolute' ? this.renderAbsoluteCalendar():''}\n\n ${!this.range?'':html`\n <div class=\"button-container\">\n <nile-button \n class=\"apply-button\" \n ?disabled=\"${ !this.startDate || !this.endDate }\" \n @click=\"${this.confimRange}\"\n > Apply</nile-button>\n </div>\n `}\n </div>\n `;\n }\n\n /**\n * @returns HTML content for absolute calendar\n */\n renderAbsoluteCalendar(){\n return html`\n <div class=\"calendar-wrapper\">\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n ${this.range ? html`\n <div class=\"calender-input ${this.showManualInputs ? '' : 'hidden'}\" >\n <div class=\"from\">\n <nile-input \n label=\"From\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.startDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"\n > </nile-input>\n </div>\n\n <div class=\"from\">\n <nile-input \n label=\"To\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.endDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"\n > </nile-input>\n </div>\n </div>\n `:''}\n `\n }\n\n /**\n * @returns HTML content for relative calendar\n */\n renderRelativeCalendar(){\n return html`\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n ${this.hideDurationFields?.includes('minutes')?'':html`\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n `}\n\n ${this.hideDurationFields?.includes('hours')?'':html`\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('days')?'':html`\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('weeks')?'':html`\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('months')?'':html`\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n `}\n </div>\n </div>\n \n ${this.range ? html`\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n label=\"Duration\" \n value=\"${this.selectedValue}\" \n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\"\n ></nile-input>\n\n <nile-select class=\"manual-input time-input\" \n label=\"Unit of time\" \n style=\"margin-top:3px\" \n value=\"${ this.selectedUnit }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${this.hideDurationFields?.includes('minutes')?'hidden':''}\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"${this.hideDurationFields?.includes('hours')?'hidden':''}\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${this.hideDurationFields?.includes('days')?'hidden':''}\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"${this.hideDurationFields?.includes('weeks')?'hidden':''}\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"${this.hideDurationFields?.includes('months')?'hidden':''}\"> Months </nile-option>\n </nile-select>\n </div>\n </div>\n `:''}\n `\n }\n \n /**\n * \n * @param unit \n * @param values \n * @returns html for the option\n */\n renderTimeValues(unit: string, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"duration__value ${this.selectedUnit === unit && this.selectedValue === value ? 'duration__value--selected':''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >${value}\n </div>`\n );\n }\n\n /**\n * \n * @param year \n * @param month \n * @param daysArray \n * @returns HTML for rendered month\n */\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n const isCurrentDate = (day: number, month: number, year: number) => {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"days_container\">\n <div class=\"day_name\">Su</div>\n <div class=\"day_name\">Mo</div>\n <div class=\"day_name\">Tu</div>\n <div class=\"day_name\">We</div>\n <div class=\"day_name\">Th</div>\n <div class=\"day_name\">Fr</div>\n <div class=\"day_name\">Sa</div>\n\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n const datePlacement:''|'selected-date'|'range-start'|'range-end' = isSelectedDate(day, month, year, isCurrentMonth)\n const classMapObj:any={\n 'day_date' : true,\n 'not-allowed' : !this.isAllowedDate(day, month, year),\n 'in-range' : isInRange(day, month, year, isCurrentMonth) ,\n 'filler' : !isCurrentMonth,\n }\n if(datePlacement) classMapObj[datePlacement]=true\n \n return html` \n <div\n class=${classMap(classMapObj)}\n @click=\"${() => { if (isCurrentMonth) this.selectDate(day, month, year)}}\"\n >\n <span style=\"position:relative;\">\n ${day}\n ${isCurrentDate(day, month, year) && isCurrentMonth?html`<div class=\"current__date__dot\"></div>`:nothing}\n </span>\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n /**\n * Function to validate if date is not in allowedDates range\n * @param day \n * @param month \n * @param year \n * @returns \n */\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.allowedDatesLocal) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = this.getUTCDate(this.allowedDatesLocal.startDate)\n const endDate = this.getUTCDate(this.allowedDatesLocal.endDate)\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n /**\n * @function handle_date-click/select\n * @param day \n * @param month \n * @param year \n */\n selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emitChangedData({ value: this.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n }\n\n /**\n * Function to be called on initialization to set all other properties\n */\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n }\n\n /**\n * Function to handle relative date selection\n */\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeValueClick(unit: string, value: number, event: any) {\n // const timestamps = this.createRelativePeriod(unit, value);\n this.selectedUnit = unit;\n this.selectedValue = value;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n \n /**\n * Function to handle start time selecion\n */\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n \n /**\n * Function to handle end time selecion\n */\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n }\n \n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n }\n\n private confimRange() {\n if (this.startDate && this.endDate) {\n\n this.emitChangedData( {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n onTypeChange(event: CustomEvent) {\n this.type = event.detail.value;\n this.emit('nile-type-change', { value: this.type })\n }\n getUTCDate(dateStr:any){\n return new Date(\n Date.UTC(\n dateStr.slice(0, 4),\n dateStr.slice(5, 7) - 1,\n dateStr.slice(8, 10)\n )\n )\n }\n\n emitChangedData(data:{startDate:Date,endDate:Date}|{value:any}){\n this.emit('nile-changed',data);\n this.emit('nile-change',data)\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}"],"names":["NileCalendar","_d","u","this","BUBBLES","valueAttribute","allowedDates","JSON","stringify","range","hideTypes","type","hideDurationFields","showManualInputs","startDate","endDate","isSelectingStart","hideInput","currentMonth","Date","getMonth","currentYear","getFullYear","allowedDatesLocal","_this","_inherits","_createClass","key","value","connectedCallback","super","initializeValue","emit","disconnectedCallback","updated","changedProperties","has","date","isNaN","getTime","offset","getTimezoneOffset","attributeChangedCallback","name","_old","newValue","checkValidAllowedDate","newDateRange","parse","error","Object","keys","length","getUTCDate","console","valueChanged","localDate","toISOString","split","render","html","_templateObject","_taggedTemplateLiteral","classMap","base","base__range","hidden","onTypeChange","renderRelativeCalendar","renderAbsoluteCalendar","_templateObject2","confimRange","_templateObject3","renderMonth","getDaysArray","_templateObject4","formatTime","handleStartTimeInput","handleEndTimeInput","_this$hideDurationFie","_this$hideDurationFie2","_this$hideDurationFie3","_this$hideDurationFie4","_this$hideDurationFie5","_this$hideDurationFie6","_this$hideDurationFie7","_this$hideDurationFie8","_this$hideDurationFie9","_this$hideDurationFie10","_templateObject5","includes","_templateObject6","renderTimeValues","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","selectedValue","handleDurationChange","selectedUnit","handleUnitChange","unit","values","map","_templateObject12","e","handleTimeValueClick","year","month","daysArray","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","slice","fillerDaysAfter","allDays","isSelectedDate","day","isCurrentMonth","getDate","isStartDate","isEndDate","isInRange","_templateObject13","prevMonth","toLocaleString","nextMonth","index","datePlacement","classMapObj","day_date","isAllowedDate","filler","_templateObject14","selectDate","today","_templateObject15","nothing","dateToCheck","UTC","setUTCHours","selectedDate","setHours","emitChangedData","dropdown","hide","rangeValue","event","Number","detail","createRelativePeriod","endTime","startTime","setMinutes","getMinutes","getHours","setDate","setMonth","time","parseTime","requestUpdate","input","isValidTimeInput","_t$split$map","hour","minute","second","newDate","test","handleStartDateInput","parseDate","isValidDateInput","handleEndDateInput","dateString","_t$split$map3","formatDateRange","formatDate","concat","String","padStart","getSeconds","convertTZ","tzString","timeZone","dateStr","data","daysInMonth","Array","from","_","i","get","styles","NileElement","__decorate","query","prototype","property","attribute","reflect","Boolean","state","watch","customElement"],"mappings":"kmNA8BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEAScC,EAAAA,KAAAA,CAAOC,SAAU,CAIYD,CAAAA,KAAAA,CAAcE,cAAoB,CAAA,IAAA,CAExBF,KAAAA,CAAAG,YAAAA,CAAuBC,IAAKC,CAAAA,SAAAA,CAAU,CAAE,CAAA,CAAA,CAEtDL,KAAAA,CAAKM,KAAAA,CAAAA,CAAG,CAEQN,CAAAA,KAAAA,CAASO,SAAG,CAAA,CAAA,CAAA,CAE7BP,KAAAA,CAAIQ,IAAAA,CAA4B,UAMbR,CAAAA,KAAAA,CAAkBS,kBAAa,CAAA,EAAA,CAEjET,KAAAA,CAAgBU,gBAAAA,CAAAA,CAAU,CAE7CV,CAAAA,KAAAA,CAASW,SAAgB,CAAA,IAAA,CAEzBX,KAAAA,CAAOY,OAAAA,CAAgB,IAEvBZ,CAAAA,KAAAA,CAAgBa,kBAAG,CAEnBb,CAAAA,KAAAA,CAASc,SAAY,CAAA,CAAA,CAAA,CAIrBd,KAAAA,CAAAe,YAAAA,CAAuB,GAAIC,CAAAA,IAAAA,CAAAA,CAAAA,CAAOC,QAElCjB,CAAAA,CAAAA,CAAAA,KAAAA,CAAAkB,WAAsB,CAAA,GAAIF,CAAAA,IAAOG,CAAAA,CAAAA,CAAAA,WAAAA,CAAAA,CAAAA,CAEjCnB,KAAAA,CAAiBoB,iBAAAA,CAAgC,IA2sB3D,QAAAC,KAAA,EAnvBQC,SAAA,CAAAvB,CAAA,CAAAD,EAAA,SAAAyB,YAAA,CAAAxB,CAAA,GAAAyB,GAAA,qBAAAC,KAAA,CA0CP,SAAAC,kBAAA,CAAAA,CACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACA3B,IAAK4B,CAAAA,eAA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A,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAE/CF,EAAA,CAARO,CAAAA,CAAAA,CAAAA,CAAAA,CAA8D7M,CAAAwM,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,EAAA,CAAA,CAoC/DF,CAAA,CAAA,CADCQ,CAAM,CAAA,cAAA,CAAA,CAAA,CAuBN9M,CAAAwM,CAAAA,SAAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,CAGDF,EAAA,CADCQ,CAAAA,CAAM,OAcN9M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwM,SAAA,CAAA,cAAA,CAAA,IAvHUxM,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYsM,CAAA,CAAA,CADxBS,CAAc,CAAA,eAAA,CAAA,CAAA,CACF/M"}
1
+ {"version":3,"file":"nile-calendar.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n html,\n property,\n CSSResultArray,\n TemplateResult,\n nothing\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-calendar.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { PropertyValueMap } from 'lit';\ntype NileCalendarDateRange={ startDate: string, endDate: string }\ntype TimeUnits= 'minutes'|'hours'|'days'|'weeks'|'months';\n/**\n * Nile icon component.\n *\n * @tag nile-calendar\n *\n */\n@customElement('nile-calendar')\nexport class NileCalendar extends NileElement {\n /**\n * The styles for NileCalendar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n\n\n @property({ type: String, attribute: 'value' }) valueAttribute: | string | null = null;\n\n @property({ type: String, attribute:true, reflect:true }) allowedDates: string = JSON.stringify({});\n\n @property({ type: Boolean, reflect: true }) range = false;\n\n @property({ type: Boolean, attribute: true, reflect:true }) hideTypes = false;\n\n @property({ type: String, reflect: true }) type :'absolute' | 'relative' = 'absolute';\n\n @property({ type: String }) selectedUnit: TimeUnits;\n\n @property({ type: Number }) selectedValue: number;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) hideDurationFields: String[] = [];\n \n @property({ type: Boolean}) showManualInputs :boolean=false;\n\n @state() startDate: Date | null = null;\n\n @state() endDate: Date | null = null;\n\n @state() isSelectingStart = true;\n\n @state() hideInput: Boolean = false;\n\n @state() value: Date | null;\n\n @state() currentMonth: number = new Date().getMonth();\n\n @state() currentYear: number = new Date().getFullYear();\n\n @state() allowedDatesLocal: NileCalendarDateRange | any = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n attributeChangedCallback(name: string, _old: string | null, newValue: string | null): void {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } \n super.attributeChangedCallback(name, _old, newValue);\n }\n\n @watch('allowedDates')\n checkValidAllowedDate() {\n let newDateRange: NileCalendarDateRange | null;\n try {\n newDateRange=JSON.parse(this.allowedDates);\n } catch (error) {\n newDateRange=null;\n }\n if (!newDateRange || Object.keys(newDateRange).length == 0) {\n this.allowedDatesLocal=null;\n return;\n }\n this.hideInput=true;\n const startDate = this.getUTCDate(newDateRange.startDate)\n const endDate = this.getUTCDate(newDateRange.endDate)\n\n if (startDate > endDate) {\n console.error('StartDate must be greater than endDate');\n }\n else\n {\n this.allowedDatesLocal=newDateRange;\n }\n }\n \n @watch('value')\n valueChanged() {\n if (this.range && this.value) {\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n }\n }\n }\n\n /**\n * Render method\n */\n render(): TemplateResult {\n return html`\n <div\n class=${classMap({\n base:true,\n base__range:this.range,\n })}\n >\n <div class=${classMap({\n \"calendar-config\":true,\n \"hidden\": !this.range || (this.range && this.hideTypes)\n })}>\n <div class=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"${this.onTypeChange}\" value=\"${this.type}\">\n <nile-tab slot=\"nav\" panel=\"absolute\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n\n ${this.type == 'relative' ? this.renderRelativeCalendar():''}\n ${this.type == 'absolute' ? this.renderAbsoluteCalendar():''}\n\n ${!this.range?'':html`\n <div class=\"button-container\">\n <nile-button \n class=\"apply-button\" \n ?disabled=\"${ !this.startDate || !this.endDate }\" \n @click=\"${this.confimRange}\"\n > Apply</nile-button>\n </div>\n `}\n </div>\n `;\n }\n\n /**\n * @returns HTML content for absolute calendar\n */\n renderAbsoluteCalendar(){\n return html`\n <div class=\"calendar-wrapper\">\n <div class=\"calendar-container\">\n ${this.renderMonth(\n this.currentYear,\n this.currentMonth,\n this.getDaysArray(this.currentYear, this.currentMonth)\n )}\n </div>\n </div>\n ${this.range ? html`\n <div class=\"calender-input ${this.showManualInputs ? '' : 'hidden'}\" >\n <div class=\"from\">\n <nile-input \n label=\"From\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.startDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleStartTimeInput}\"\n > </nile-input>\n </div>\n\n <div class=\"from\">\n <nile-input \n label=\"To\"\n class=\"manual-input\" \n value=\"${this.formatTime(this.endDate)}\" \n placeholder=\"HH:MM:SS\" @nile-change=\"${this.handleEndTimeInput}\"\n > </nile-input>\n </div>\n </div>\n `:''}\n `\n }\n\n /**\n * @returns HTML content for relative calendar\n */\n renderRelativeCalendar(){\n return html`\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n ${this.hideDurationFields?.includes('minutes')?'':html`\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('minutes', [1, 5, 15, 30, 45])}\n </div>\n `}\n\n ${this.hideDurationFields?.includes('hours')?'':html`\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('hours', [1, 2, 3, 6, 8, 12])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('days')?'':html`\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('days', [1, 2, 3, 4, 5, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('weeks')?'':html`\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('weeks', [1, 2, 4, 6])}\n </div>\n `}\n \n ${this.hideDurationFields?.includes('months')?'':html`\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ${this.renderTimeValues('months', [3, 6, 12, 15])}\n </div>\n `}\n </div>\n </div>\n \n ${this.range ? html`\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n label=\"Duration\" \n value=\"${this.selectedValue}\" \n @nile-input=\"${this.handleDurationChange}\"\n placeholder=\"Enter Value\"\n ></nile-input>\n\n <nile-select class=\"manual-input time-input\" \n label=\"Unit of time\" \n style=\"margin-top:3px\" \n value=\"${ this.selectedUnit }\"\n @nile-change=\"${this.handleUnitChange}\"\n >\n <nile-option value=\"minutes\" class=\"${this.hideDurationFields?.includes('minutes')?'hidden':''}\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"${this.hideDurationFields?.includes('hours')?'hidden':''}\"> Hours </nile-option>\n <nile-option value=\"days\" class=\"${this.hideDurationFields?.includes('days')?'hidden':''}\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"${this.hideDurationFields?.includes('weeks')?'hidden':''}\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"${this.hideDurationFields?.includes('months')?'hidden':''}\"> Months </nile-option>\n </nile-select>\n </div>\n </div>\n `:''}\n `\n }\n \n /**\n * \n * @param unit \n * @param values \n * @returns html for the option\n */\n renderTimeValues(unit: TimeUnits, values: any[]) {\n return values.map(\n value =>\n html`\n <div\n class=\"duration__value ${this.selectedUnit === unit && this.selectedValue === value ? 'duration__value--selected':''}\"\n @click=${(e: any) => this.handleTimeValueClick(unit, value, e)}\n >${value}\n </div>`\n );\n }\n\n /**\n * \n * @param year \n * @param month \n * @param daysArray \n * @returns HTML for rendered month\n */\n private renderMonth(\n year: number,\n month: number,\n daysArray: number[]\n ): TemplateResult {\n const firstDay = new Date(year, month, 1).getDay();\n const lastDay = new Date(year, month + 1, 0).getDay();\n const prevMonthDays = this.getDaysArray(\n month === 0 ? year - 1 : year,\n month === 0 ? 11 : month - 1\n );\n const nextMonthDays = this.getDaysArray(\n month === 11 ? year + 1 : year,\n month === 11 ? 0 : month + 1\n );\n const fillerDaysBefore = prevMonthDays.slice(\n prevMonthDays.length - firstDay\n );\n const fillerDaysAfter = nextMonthDays.slice(0, 6 - lastDay);\n const allDays = [...fillerDaysBefore, ...daysArray, ...fillerDaysAfter];\n\n const isSelectedDate = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return '';\n\n if (!this.range && this.value) {\n const isSelected =\n day === this.value.getDate() &&\n month === this.value.getMonth() &&\n year === this.value.getFullYear();\n if (isSelected) return 'selected-date';\n }\n\n const isStartDate =\n this.startDate &&\n day === this.startDate.getDate() &&\n month === this.startDate.getMonth() &&\n year === this.startDate.getFullYear();\n const isEndDate =\n this.endDate &&\n day === this.endDate.getDate() &&\n month === this.endDate.getMonth() &&\n year === this.endDate.getFullYear();\n\n return isStartDate ? 'range-start' : isEndDate ? 'range-end' : '';\n };\n\n const isInRange = (\n day: number,\n month: number,\n year: number,\n isCurrentMonth: boolean\n ) => {\n if (!isCurrentMonth) return false;\n if (this.startDate && this.endDate) {\n const date = new Date(year, month, day);\n return date >= this.startDate && date <= this.endDate;\n }\n return false;\n };\n\n const isCurrentDate = (day: number, month: number, year: number) => {\n const today = new Date();\n return (\n day === today.getDate() &&\n month + 1 === today.getMonth() + 1 &&\n year === today.getFullYear()\n );\n };\n\n return html`\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowleft\"\n color=\"black\"\n @click=\"${this.prevMonth}\"\n >\n </nile-icon>\n <span\n >${new Date(year, month).toLocaleString('default', {\n month: 'long',\n })}\n ${year}</span\n >\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"arrowright\"\n color=\"black\"\n @click=\"${this.nextMonth}\"\n >\n </nile-icon>\n </div>\n <div class=\"days_container\">\n <div class=\"day_name\">Su</div>\n <div class=\"day_name\">Mo</div>\n <div class=\"day_name\">Tu</div>\n <div class=\"day_name\">We</div>\n <div class=\"day_name\">Th</div>\n <div class=\"day_name\">Fr</div>\n <div class=\"day_name\">Sa</div>\n\n ${allDays.map((day, index) => {\n const isCurrentMonth =\n index >= fillerDaysBefore.length &&\n index < fillerDaysBefore.length + daysArray.length;\n const datePlacement:''|'selected-date'|'range-start'|'range-end' = isSelectedDate(day, month, year, isCurrentMonth)\n const classMapObj:any={\n 'day_date' : true,\n 'not-allowed' : !this.isAllowedDate(day, month, year),\n 'in-range' : isInRange(day, month, year, isCurrentMonth) ,\n 'filler' : !isCurrentMonth,\n }\n if(datePlacement) classMapObj[datePlacement]=true\n \n return html` \n <div\n class=${classMap(classMapObj)}\n @click=\"${() => { if (isCurrentMonth) this.selectDate(day, month, year)}}\"\n >\n <span style=\"position:relative;\">\n ${day}\n ${isCurrentDate(day, month, year) && isCurrentMonth?html`<div class=\"current__date__dot\"></div>`:nothing}\n </span>\n </div>`;\n })}\n </div>\n </div>\n `;\n }\n\n /**\n * Function to validate if date is not in allowedDates range\n * @param day \n * @param month \n * @param year \n * @returns \n */\n isAllowedDate(day: number, month: number, year: number) {\n if (!this.allowedDatesLocal) {\n return true;\n }\n const dateToCheck = new Date(Date.UTC(year, month, day));\n const startDate = this.getUTCDate(this.allowedDatesLocal.startDate)\n const endDate = this.getUTCDate(this.allowedDatesLocal.endDate)\n endDate.setUTCHours(23, 59, 59, 999);\n const isWithinRange = dateToCheck >= startDate && dateToCheck <= endDate;\n return isWithinRange;\n }\n\n /**\n * @function handle_date-click/select\n * @param day \n * @param month \n * @param year \n */\n selectDate(day: number, month: number, year: number): void {\n const selectedDate = new Date(year, month, day);\n\n if (this.range) {\n if (this.startDate && this.endDate) {\n this.startDate = null;\n this.endDate = null;\n }\n\n if (this.isSelectingStart) {\n this.startDate = selectedDate;\n if (this.endDate && selectedDate > this.endDate) {\n this.endDate = null;\n }\n this.isSelectingStart = false;\n } else {\n this.isSelectingStart = true;\n\n if (this.startDate && selectedDate < this.startDate) {\n this.startDate = selectedDate;\n this.endDate = null;\n this.isSelectingStart = false;\n } else {\n const endDate = selectedDate;\n endDate.setHours(23, 59, 59, 999);\n this.endDate = endDate;\n }\n }\n } else {\n this.value = selectedDate;\n this.emitChangedData({ value: this.value });\n }\n }\n\n /**\n * Function to be called on initialization to set all other properties\n */\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.value = null;\n } catch (e) {\n // console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n }\n\n /**\n * Function to handle relative date selection\n */\n handleDurationChange(event: any) {\n this.selectedValue = Number(event.detail.value);\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleUnitChange(event: any) {\n this.selectedUnit = event.detail.value;\n if (this.selectedUnit && this.selectedValue) {\n this.handleTimeValueClick(this.selectedUnit, this.selectedValue, event);\n }\n }\n\n handleTimeValueClick(unit: TimeUnits, value: number, event: any) {\n this.createRelativePeriod(unit, value)\n this.selectedUnit = unit;\n this.selectedValue = value;\n }\n\n createRelativePeriod(unit: String, value: number) {\n const endTime = new Date();\n const startTime = new Date();\n\n switch (unit) {\n case 'minutes':\n startTime.setMinutes(startTime.getMinutes() - value);\n break;\n case 'hours':\n startTime.setHours(startTime.getHours() - value);\n break;\n case 'days':\n startTime.setDate(startTime.getDate() - value);\n break;\n case 'weeks':\n startTime.setDate(startTime.getDate() - 7 * value); // Subtract weeks as days\n break;\n case 'months':\n startTime.setMonth(startTime.getMonth() - value);\n break;\n }\n\n this.startDate = new Date(startTime.getTime());\n this.endDate = new Date(endTime.getTime());\n\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n }\n \n /**\n * Function to handle start time selecion\n */\n private handleStartTimeInput(event: CustomEvent): void {\n if (!this.startDate) {\n this.startDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.startDate);\n if (time) {\n this.startDate = time;\n } else {\n this.startDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n \n /**\n * Function to handle end time selecion\n */\n private handleEndTimeInput(event: CustomEvent): void {\n if (!this.endDate) {\n this.endDate = null;\n return;\n }\n const time = this.parseTime(event.detail.value, this.endDate);\n if (time) {\n this.endDate = time;\n } else {\n this.endDate.setHours(0, 0, 0);\n }\n this.requestUpdate();\n }\n\n // Parse time string to a Date object\n private parseTime(input: string, date: Date): Date | null {\n if (!this.isValidTimeInput(input)) {\n return null;\n }\n const [hour, minute, second] = input.split(':').map(Number);\n const newDate = new Date(date.getTime());\n newDate.setHours(hour, minute, second);\n return newDate;\n }\n\n // Validate time in HH:MM:SS format\n private isValidTimeInput(input: string): boolean {\n const regex = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;\n return regex.test(input);\n }\n\n private handleStartDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.startDate = null;\n }\n if (date && (!this.endDate || date <= this.endDate)) {\n this.startDate = date;\n } else {\n this.startDate = null;\n this.endDate = null;\n }\n }\n\n private handleEndDateInput(event: CustomEvent): void {\n const date = this.parseDate(event.detail.value);\n if (!this.isValidDateInput(date)) {\n this.endDate = null;\n }\n if (date && (!this.startDate || date >= this.startDate)) {\n this.endDate = date;\n } else {\n this.endDate = null;\n }\n }\n \n private isValidDateInput(input: any): boolean {\n const regex = /^(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[0-2])\\/\\d{4}$/;\n return regex.test(input);\n }\n\n private parseDate(dateString: string): Date | null {\n const [day, month, year] = dateString.split('/').map(Number);\n const date = new Date(year, month - 1, day);\n return !isNaN(date.getTime()) ? date : null;\n }\n\n private formatDateRange(value: {\n startDate: Date | null;\n endDate: Date | null;\n }): string {\n if (!value) {\n return value;\n }\n if (!value.startDate || !value.endDate) return '';\n return `${this.formatDate(value.startDate)} - ${this.formatDate(\n value.endDate\n )}`;\n }\n\n private formatDate(date: Date | null): string {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return `${day}/${month}/${year}`;\n }\n\n private formatTime(date: Date | null): string {\n if (!date) return '';\n const hours = String(date.getHours()).padStart(2, '0');\n const minutes = String(date.getMinutes()).padStart(2, '0');\n const seconds = String(date.getSeconds()).padStart(2, '0');\n return `${hours}:${minutes}:${seconds}`;\n }\n\n private nextMonth(): void {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n }\n\n private prevMonth(): void {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n }\n\n private confimRange() {\n if (!(this.startDate && this.endDate)) return;\n this.emitChangedData( {\n startDate: this.startDate,\n endDate: this.endDate,\n });\n }\n\n convertTZ(date: Date, tzString: any) {\n return new Date(\n (typeof date === 'string' ? new Date(date) : date).toLocaleString(\n 'en-US',\n { timeZone: tzString }\n )\n );\n }\n\n onTypeChange(event: CustomEvent) {\n this.type = event.detail.value;\n this.emit('nile-type-change', { value: this.type })\n }\n getUTCDate(dateStr:any){\n return new Date(\n Date.UTC(\n dateStr.slice(0, 4),\n dateStr.slice(5, 7) - 1,\n dateStr.slice(8, 10)\n )\n )\n }\n\n emitChangedData(data:{startDate:Date,endDate:Date}|{value:any}){\n this.emit('nile-changed',data);\n this.emit('nile-change',data)\n }\n\n private getDaysArray(year: number, month: number): number[] {\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n return Array.from({ length: daysInMonth }, (_, i) => i + 1);\n }\n}\n\nexport default NileCalendar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-calendar': NileCalendar;\n }\n}"],"names":["NileCalendar","o","constructor","this","valueAttribute","allowedDates","JSON","stringify","range","hideTypes","type","hideDurationFields","showManualInputs","startDate","endDate","isSelectingStart","hideInput","currentMonth","Date","getMonth","currentYear","getFullYear","allowedDatesLocal","_this","_inherits","_r","_createClass","key","value","connectedCallback","super","initializeValue","emit","disconnectedCallback","updated","changedProperties","has","date","isNaN","getTime","offset","getTimezoneOffset","attributeChangedCallback","name","_old","newValue","checkValidAllowedDate","newDateRange","parse","error","Object","keys","length","getUTCDate","console","valueChanged","localDate","toISOString","split","render","html","_templateObject","_taggedTemplateLiteral","classMap","base","base__range","hidden","onTypeChange","renderRelativeCalendar","renderAbsoluteCalendar","_templateObject2","confimRange","_templateObject3","renderMonth","getDaysArray","_templateObject4","formatTime","handleStartTimeInput","handleEndTimeInput","_this$hideDurationFie","_this$hideDurationFie2","_this$hideDurationFie3","_this$hideDurationFie4","_this$hideDurationFie5","_this$hideDurationFie6","_this$hideDurationFie7","_this$hideDurationFie8","_this$hideDurationFie9","_this$hideDurationFie10","_templateObject5","includes","_templateObject6","renderTimeValues","_templateObject7","_templateObject8","_templateObject9","_templateObject10","_templateObject11","selectedValue","handleDurationChange","selectedUnit","handleUnitChange","unit","values","map","_templateObject12","e","handleTimeValueClick","year","month","daysArray","firstDay","getDay","lastDay","prevMonthDays","nextMonthDays","fillerDaysBefore","slice","fillerDaysAfter","allDays","isSelectedDate","day","isCurrentMonth","getDate","isStartDate","isEndDate","isInRange","_templateObject13","prevMonth","toLocaleString","nextMonth","index","datePlacement","classMapObj","day_date","isAllowedDate","filler","_templateObject14","selectDate","today","_templateObject15","nothing","dateToCheck","UTC","setUTCHours","selectedDate","setHours","emitChangedData","rangeValue","event","Number","detail","createRelativePeriod","endTime","startTime","setMinutes","getMinutes","getHours","setDate","setMonth","time","parseTime","requestUpdate","input","isValidTimeInput","_t$split$map","newDate","hour","minute","second","test","handleStartDateInput","parseDate","isValidDateInput","handleEndDateInput","dateString","_t$split$map3","formatDateRange","concat","formatDate","String","padStart","getSeconds","convertTZ","tzString","timeZone","dateStr","data","daysInMonth","Array","from","_","i","__decorate","get","styles","NileElement","property","attribute","prototype","reflect","Boolean","state","watch","customElement"],"mappings":"ukNA8BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAW2CC,KAAAA,CAAcC,cAAAA,CAAoB,IAExBD,CAAAA,KAAAA,CAAAE,YAAuBC,CAAAA,IAAAA,CA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AAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAE5BN,CAAA,CAAA,CAARS,CAAgC1M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuM,SAAA,CAAA,kBAAA,CAAA,IAAA,IAExBN,CAAA,CAAA,CAARS,CAAmC1M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuM,SAAA,CAAA,WAAA,CAAA,IAAA,IAE3BN,CAAA,CAAA,CAARS,CAA2B1M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuM,SAAA,CAAA,OAAA,CAAA,IAAA,IAEnBN,CAAA,CAAA,CAARS,CAAqD1M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuM,SAAA,CAAA,cAAA,CAAA,IAAA,EAE7CN,CAAAA,CAAAA,CAAAA,CAAA,CAARS,CAAAA,CAAAA,CAAAA,CAAAA,CAAuD1M,CAAAuM,CAAAA,SAAAA,CAAA,aAAA,CAAA,IAAA,EAAA,CAAA,CAE/CN,EAAA,CAARS,CAAAA,CAAAA,CAAAA,CAAAA,CAA8D1M,CAAAuM,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,EAAA,CAAA,CAoC/DN,CAAA,CAAA,CADCU,CAAM,CAAA,cAAA,CAAA,CAAA,CAuBN3M,CAAAuM,CAAAA,SAAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,CAGDN,EAAA,CADCU,CAAAA,CAAM,OAcN3M,CAAAA,CAAAA,CAAAA,CAAAA,CAAAuM,SAAA,CAAA,cAAA,CAAA,IArHUvM,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYiM,CAAA,CAAA,CADxBW,CAAc,CAAA,eAAA,CAAA,CAAA,CACF5M"}
@@ -1,8 +1,8 @@
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 l}from"./nile-calendar.css.esm.js";import{classMap as h}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{n as o}from"../property-09139d3c.esm.js";import"lit";let u=class extends d{constructor(){super(...arguments),this.BUBBLES=!1,this.valueAttribute=null,this.allowedDates=JSON.stringify({}),this.range=!1,this.hideTypes=!1,this.type="absolute",this.hideDurationFields=[],this.showManualInputs=!1,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.hideInput=!1,this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.allowedDatesLocal=null}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),this.initializeValue(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}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()}}}attributeChangedCallback(t,i,e){"value"===t&&(this.valueAttribute=e,this.initializeValue()),super.attributeChangedCallback(t,i,e)}checkValidAllowedDate(){let t;try{t=JSON.parse(this.allowedDates)}catch(i){t=null}if(!t||0==Object.keys(t).length)return void(this.allowedDatesLocal=null);this.hideInput=!0;this.getUTCDate(t.startDate)>this.getUTCDate(t.endDate)?console.error("StartDate must be greater than endDate"):this.allowedDatesLocal=t}valueChanged(){if(this.range&&this.value)this.value=null;else 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])}}render(){return i`
1
+ import{__decorate as t}from"tslib";import{x as i,A as e}from"../index-0a3007c5.esm.js";import{state as s,customElement as n}from"lit/decorators.js";import{s as a}from"./nile-calendar.css.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{w as h}from"../internal/watch.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{n as d}from"../property-09139d3c.esm.js";import"lit";let o=class extends r{constructor(){super(...arguments),this.valueAttribute=null,this.allowedDates=JSON.stringify({}),this.range=!1,this.hideTypes=!1,this.type="absolute",this.hideDurationFields=[],this.showManualInputs=!1,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.hideInput=!1,this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.allowedDatesLocal=null}static get styles(){return[a]}connectedCallback(){super.connectedCallback(),this.initializeValue(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}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()}}}attributeChangedCallback(t,i,e){"value"===t&&(this.valueAttribute=e,this.initializeValue()),super.attributeChangedCallback(t,i,e)}checkValidAllowedDate(){let t;try{t=JSON.parse(this.allowedDates)}catch(i){t=null}if(!t||0==Object.keys(t).length)return void(this.allowedDatesLocal=null);this.hideInput=!0;this.getUTCDate(t.startDate)>this.getUTCDate(t.endDate)?console.error("StartDate must be greater than endDate"):this.allowedDatesLocal=t}valueChanged(){if(this.range&&this.value)this.value=null;else 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])}}render(){return i`
2
2
  <div
3
- class=${h({base:!0,base__range:this.range})}
3
+ class=${l({base:!0,base__range:this.range})}
4
4
  >
5
- <div class=${h({"calendar-config":!0,hidden:!this.range||this.range&&this.hideTypes})}>
5
+ <div class=${l({"calendar-config":!0,hidden:!this.range||this.range&&this.hideTypes})}>
6
6
  <div class="calendar-switcher">
7
7
  <nile-tab-group centered @nile-tab-show="${this.onTypeChange}" value="${this.type}">
8
8
  <nile-tab slot="nav" panel="absolute">Absolute</nile-tab>
@@ -122,7 +122,7 @@ import{__decorate as t}from"tslib";import{x as i,A as e}from"../index-0a3007c5.e
122
122
  class="duration__value ${this.selectedUnit===t&&this.selectedValue===e?"duration__value--selected":""}"
123
123
  @click=${i=>this.handleTimeValueClick(t,e,i)}
124
124
  >${e}
125
- </div>`))}renderMonth(t,s,n){const a=new Date(t,s,1).getDay(),l=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-l),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`
125
+ </div>`))}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`
126
126
  <div class="calendar">
127
127
  <div class="calendar-header">
128
128
  <nile-icon
@@ -153,9 +153,9 @@ import{__decorate as t}from"tslib";import{x as i,A as e}from"../index-0a3007c5.e
153
153
  <div class="day_name">Fr</div>
154
154
  <div class="day_name">Sa</div>
155
155
 
156
- ${c.map(((a,l)=>{const r=l>=o.length&&l<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`
156
+ ${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`
157
157
  <div
158
- class=${h(u)}
158
+ class=${l(u)}
159
159
  @click="${()=>{r&&this.selectDate(a,s,t)}}"
160
160
  >
161
161
  <span style="position:relative;">
@@ -165,4 +165,4 @@ import{__decorate as t}from"tslib";import{x as i,A as e}from"../index-0a3007c5.e
165
165
  </div>`}))}
166
166
  </div>
167
167
  </div>
168
- `}isAllowedDate(t,i,e){if(!this.allowedDatesLocal)return!0;const s=new Date(Date.UTC(e,i,t)),n=this.getUTCDate(this.allowedDatesLocal.startDate),a=this.getUTCDate(this.allowedDatesLocal.endDate);a.setUTCHours(23,59,59,999);return s>=n&&s<=a}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.emitChangedData({value:this.value}),this.dropdown&&this.dropdown.hide()}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.value=null}catch(t){}else if(this.valueAttribute){let 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())}}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)}handleTimeValueClick(t,i,e){this.selectedUnit=t,this.selectedValue=i}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()),{startDate:this.startDate,endDate:this.endDate}}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()}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}isValidTimeInput(t){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(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)}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}isValidDateInput(t){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t)}parseDate(t){const[i,e,s]=t.split("/").map(Number),n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n}formatDateRange(t){return t?t.startDate&&t.endDate?`${this.formatDate(t.startDate)} - ${this.formatDate(t.endDate)}`:"":t}formatDate(t){if(!t)return"";return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}formatTime(t){if(!t)return"";return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--}confimRange(){this.startDate&&this.endDate&&(this.emitChangedData({startDate:this.startDate,endDate:this.endDate}),this.dropdown&&this.dropdown.hide())}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}onTypeChange(t){this.type=t.detail.value,this.emit("nile-type-change",{value:this.type})}getUTCDate(t){return new Date(Date.UTC(t.slice(0,4),t.slice(5,7)-1,t.slice(8,10)))}emitChangedData(t){this.emit("nile-changed",t),this.emit("nile-change",t)}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}};t([s("nile-dropdown")],u.prototype,"dropdown",void 0),t([o({type:String,attribute:"value"})],u.prototype,"valueAttribute",void 0),t([o({type:String,attribute:!0,reflect:!0})],u.prototype,"allowedDates",void 0),t([o({type:Boolean,reflect:!0})],u.prototype,"range",void 0),t([o({type:Boolean,attribute:!0,reflect:!0})],u.prototype,"hideTypes",void 0),t([o({type:String,reflect:!0})],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:Array,attribute:"hide-duration-fields"})],u.prototype,"hideDurationFields",void 0),t([o({type:Boolean})],u.prototype,"showManualInputs",void 0),t([n()],u.prototype,"startDate",void 0),t([n()],u.prototype,"endDate",void 0),t([n()],u.prototype,"isSelectingStart",void 0),t([n()],u.prototype,"hideInput",void 0),t([n()],u.prototype,"value",void 0),t([n()],u.prototype,"currentMonth",void 0),t([n()],u.prototype,"currentYear",void 0),t([n()],u.prototype,"allowedDatesLocal",void 0),t([r("allowedDates")],u.prototype,"checkValidAllowedDate",null),t([r("value")],u.prototype,"valueChanged",null),u=t([a("nile-calendar")],u);export{u as N};
168
+ `}isAllowedDate(t,i,e){if(!this.allowedDatesLocal)return!0;const s=new Date(Date.UTC(e,i,t)),n=this.getUTCDate(this.allowedDatesLocal.startDate),a=this.getUTCDate(this.allowedDatesLocal.endDate);a.setUTCHours(23,59,59,999);return s>=n&&s<=a}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.emitChangedData({value:this.value})}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.value=null}catch(t){}else if(this.valueAttribute){let 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())}}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)}handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i}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()),{startDate:this.startDate,endDate:this.endDate}}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()}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}isValidTimeInput(t){return/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(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)}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}isValidDateInput(t){return/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/.test(t)}parseDate(t){const[i,e,s]=t.split("/").map(Number),n=new Date(s,e-1,i);return isNaN(n.getTime())?null:n}formatDateRange(t){return t?t.startDate&&t.endDate?`${this.formatDate(t.startDate)} - ${this.formatDate(t.endDate)}`:"":t}formatDate(t){if(!t)return"";return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}formatTime(t){if(!t)return"";return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`}nextMonth(){11===this.currentMonth?(this.currentMonth=0,this.currentYear++):this.currentMonth++}prevMonth(){0===this.currentMonth?(this.currentMonth=11,this.currentYear--):this.currentMonth--}confimRange(){this.startDate&&this.endDate&&this.emitChangedData({startDate:this.startDate,endDate:this.endDate})}convertTZ(t,i){return new Date(("string"==typeof t?new Date(t):t).toLocaleString("en-US",{timeZone:i}))}onTypeChange(t){this.type=t.detail.value,this.emit("nile-type-change",{value:this.type})}getUTCDate(t){return new Date(Date.UTC(t.slice(0,4),t.slice(5,7)-1,t.slice(8,10)))}emitChangedData(t){this.emit("nile-changed",t),this.emit("nile-change",t)}getDaysArray(t,i){const e=new Date(t,i+1,0).getDate();return Array.from({length:e},((t,i)=>i+1))}};t([d({type:String,attribute:"value"})],o.prototype,"valueAttribute",void 0),t([d({type:String,attribute:!0,reflect:!0})],o.prototype,"allowedDates",void 0),t([d({type:Boolean,reflect:!0})],o.prototype,"range",void 0),t([d({type:Boolean,attribute:!0,reflect:!0})],o.prototype,"hideTypes",void 0),t([d({type:String,reflect:!0})],o.prototype,"type",void 0),t([d({type:String})],o.prototype,"selectedUnit",void 0),t([d({type:Number})],o.prototype,"selectedValue",void 0),t([d({type:Array,attribute:"hide-duration-fields"})],o.prototype,"hideDurationFields",void 0),t([d({type:Boolean})],o.prototype,"showManualInputs",void 0),t([s()],o.prototype,"startDate",void 0),t([s()],o.prototype,"endDate",void 0),t([s()],o.prototype,"isSelectingStart",void 0),t([s()],o.prototype,"hideInput",void 0),t([s()],o.prototype,"value",void 0),t([s()],o.prototype,"currentMonth",void 0),t([s()],o.prototype,"currentYear",void 0),t([s()],o.prototype,"allowedDatesLocal",void 0),t([h("allowedDates")],o.prototype,"checkValidAllowedDate",null),t([h("value")],o.prototype,"valueChanged",null),o=t([n("nile-calendar")],o);export{o as N};
@@ -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(["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","lit"],function(_export,_context){"use strict";var r,s,o,t,e,a,i,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_index001CjsJs){s=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileCardCssCjsJs){t=_nileCardCssCjsJs.s;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){a=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_lit){}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_i){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.BUBBLES=!1,_this.hasSlotController=new a(_assertThisInitialized(_this),"footer");return _this;}_inherits(d,_i);return _createClass(d,[{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=","\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"","\"\n class=\"card__footer\"\n ></slot>\n </div>\n "])),e({card:!0,"card--has-footer":this.hasSlotController.test("footer")}),e({body__wrapper:!0,body__wrapper_nf:!this.hasSlotController.test("footer")}),!this.hasSlotController.test("footer"));}}]);}(i));d.styles=t,_export("N",d=r([o("nile-card")],d));}};});
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(["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","lit"],function(_export,_context){"use strict";var r,s,o,t,e,a,i,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_index001CjsJs){s=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileCardCssCjsJs){t=_nileCardCssCjsJs.s;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){a=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_lit){}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_i){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.hasSlotController=new a(_assertThisInitialized(_this),"footer");return _this;}_inherits(d,_i);return _createClass(d,[{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=","\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"","\"\n class=\"card__footer\"\n ></slot>\n </div>\n "])),e({card:!0,"card--has-footer":this.hasSlotController.test("footer")}),e({body__wrapper:!0,body__wrapper_nf:!this.hasSlotController.test("footer")}),!this.hasSlotController.test("footer"));}}]);}(i));d.styles=t,_export("N",d=r([o("nile-card")],d));}};});
2
2
  //# sourceMappingURL=nile-card.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-card.cjs.js","sources":["../../../src/nile-card/nile-card.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-card.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElements from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-card\n *\n */\n@customElement('nile-card')\nexport class NileCard extends NileElements {\n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n card: true,\n 'card--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=${classMap({\n 'body__wrapper':true,\n 'body__wrapper_nf': !this.hasSlotController.test('footer')\n })}\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"${!this.hasSlotController.test('footer')}\"\n class=\"card__footer\"\n ></slot>\n </div>\n `;\n }\n}\n\nexport default NileCard;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-card': NileCard;\n }\n}\n"],"names":["NileCard","_i","d","this","BUBBLES","hasSlotController","HasSlotController","_this","_inherits","_createClass","key","value","render","html","_templateObject","_taggedTemplateLiteral","classMap","card","test","body__wrapper","body__wrapper_nf","NileElements","styles","__decorate","customElement"],"mappings":"myHA4BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAGcC,KAAAA,CAAOC,OAAAA,CAAAA,CAAU,EAEnBD,KAAAA,CAAiBE,iBAAAA,CAAG,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAAwB,QA8BlE,CAAA,QAAAC,KAAA,EA5BCC,SAAA,CAAAN,CAAA,CAAAD,EAAA,SAAAQ,YAAA,CAAAP,CAAA,GAAAQ,GAAA,UAAAC,KAAA,UAAAC,OAAA,CAAAA,CACE,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,weAGCC,CAAAA,CAAS,CACfC,IAAM,CAAA,CAAA,CAAA,CACN,kBAAoBd,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAI1CF,CAAAA,CAAS,CACfG,aAAgB,CAAA,CAAA,CAAA,CAChBC,gBAAqBjB,CAAAA,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAUrCf,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,EAK/C,CAjCMlB,MADqBqB,CAAvB,GACErB,CAAAA,CAAMsB,OAAmBA,CADrBtB,CAAAA,OAAAA,KAAAA,CAAAA,CAAQuB,EAAA,CADpBC,CAAAA,CAAc,cACFxB"}
1
+ {"version":3,"file":"nile-card.cjs.js","sources":["../../../src/nile-card/nile-card.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-card.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElements from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-card\n *\n */\n@customElement('nile-card')\nexport class NileCard extends NileElements {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n card: true,\n 'card--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=${classMap({\n 'body__wrapper':true,\n 'body__wrapper_nf': !this.hasSlotController.test('footer')\n })}\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"${!this.hasSlotController.test('footer')}\"\n class=\"card__footer\"\n ></slot>\n </div>\n `;\n }\n}\n\nexport default NileCard;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-card': NileCard;\n }\n}\n"],"names":["NileCard","d","constructor","this","hasSlotController","HasSlotController","_this","_inherits","_i","_createClass","key","value","render","html","_templateObject","_taggedTemplateLiteral","classMap","card","test","body__wrapper","body__wrapper_nf","NileElements","styles","__decorate","customElement"],"mappings":"myHA4BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAGYC,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAAAA,CAAkBF,CAAAA,sBAAAA,CAAAA,KAAAA,EAAM,QA8BlE,CAAA,QAAAG,KAAA,EA5BCC,SAAA,CAAAN,CAAA,CAAAO,EAAA,SAAAC,YAAA,CAAAR,CAAA,GAAAS,GAAA,UAAAC,KAAA,UAAAC,OAAA,CAAAA,CACE,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,weAGCC,CAAAA,CAAS,CACfC,IAAM,CAAA,CAAA,CAAA,CACN,kBAAoBd,CAAAA,IAAAA,CAAKC,kBAAkBc,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAI1CF,CAAAA,CAAS,CACfG,aAAgB,CAAA,CAAA,CAAA,CAChBC,gBAAqBjB,CAAAA,CAAAA,IAAAA,CAAKC,kBAAkBc,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAUrCf,CAAAA,IAAAA,CAAKC,kBAAkBc,IAAK,CAAA,QAAA,CAAA,EAK/C,CA/BMlB,MADqBqB,CAAAA,GACrBrB,CAAAA,CAAMsB,OAAmBA,CADrBtB,CAAAA,OAAAA,KAAAA,CAAAA,CAAQuB,EAAA,CADpBC,CAAAA,CAAc,cACFxB"}
@@ -1,4 +1,4 @@
1
- import{__decorate as r}from"tslib";import{x as s}from"../index-0a3007c5.esm.js";import{customElement as o}from"lit/decorators.js";import{s as t}from"./nile-card.css.esm.js";import{classMap as e}from"lit/directives/class-map.js";import{H as a}from"../internal/slot.esm.js";import{N as i}from"../internal/nile-element.esm.js";import"lit";let d=class extends i{constructor(){super(...arguments),this.BUBBLES=!1,this.hasSlotController=new a(this,"footer")}render(){return s`
1
+ import{__decorate as r}from"tslib";import{x as s}from"../index-0a3007c5.esm.js";import{customElement as o}from"lit/decorators.js";import{s as t}from"./nile-card.css.esm.js";import{classMap as e}from"lit/directives/class-map.js";import{H as a}from"../internal/slot.esm.js";import{N as i}from"../internal/nile-element.esm.js";import"lit";let d=class extends i{constructor(){super(...arguments),this.hasSlotController=new a(this,"footer")}render(){return s`
2
2
  <div
3
3
  part="base"
4
4
  class=${e({card:!0,"card--has-footer":this.hasSlotController.test("footer")})}
@@ -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(["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","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,h,l,r,n,a,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){n=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_d){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.BUBBLES=!1,_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_d);return _createClass(m,[{key:"toggleHelpText",value:function toggleHelpText(){this.showHelpText=!this.showHelpText;}},{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked});}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,i=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n \n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n ","\n ","\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ","\n <slot></slot>\n </div>\n </label>\n \n ","\n \n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size}),this.title,this.name,r(this.value),n(this.indeterminate),n(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"","boolean"==typeof this.label?"":this.label,e?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):"",i?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);}(d));m.styles=c,e([i('input[type="checkbox"]')],m.prototype,"input",void 0),e([s()],m.prototype,"hasFocus",void 0),e([p()],m.prototype,"title",void 0),e([p()],m.prototype,"name",void 0),e([p()],m.prototype,"value",void 0),e([p({reflect:!0})],m.prototype,"size",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([p({type:String,reflect:!0})],m.prototype,"label",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([l("checked")],m.prototype,"defaultChecked",void 0),e([p({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([p({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([p({type:Boolean})],m.prototype,"showHelpText",void 0),e([p({reflect:!0})],m.prototype,"form",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([a(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([o("nile-checkbox")],m));}};});
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(["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","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,h,l,r,n,a,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){n=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_d){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_d);return _createClass(m,[{key:"toggleHelpText",value:function toggleHelpText(){this.showHelpText=!this.showHelpText;}},{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked});}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,i=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n \n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n ","\n ","\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ","\n <slot></slot>\n </div>\n </label>\n \n ","\n \n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size}),this.title,this.name,r(this.value),n(this.indeterminate),n(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"","boolean"==typeof this.label?"":this.label,e?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):"",i?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);}(d));m.styles=c,e([i('input[type="checkbox"]')],m.prototype,"input",void 0),e([s()],m.prototype,"hasFocus",void 0),e([p()],m.prototype,"title",void 0),e([p()],m.prototype,"name",void 0),e([p()],m.prototype,"value",void 0),e([p({reflect:!0})],m.prototype,"size",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([p({type:String,reflect:!0})],m.prototype,"label",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([l("checked")],m.prototype,"defaultChecked",void 0),e([p({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([p({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([p({type:Boolean})],m.prototype,"showHelpText",void 0),e([p({reflect:!0})],m.prototype,"form",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([a(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([o("nile-checkbox")],m));}};});
2
2
  //# sourceMappingURL=nile-checkbox.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n \n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n \n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"],"names":["NileCheckbox","m","constructor","super","this","BUBBLES","hasFocus","title","name","size","disabled","checked","label","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_d","_createClass","key","value","toggleHelpText","handleClick","emit","handleBlur","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","defaultValue","attribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"s1JAuDaA,4BACX,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,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AAxDI,CAAAA,CAAS,CAAEM,SAAW,CAAA,eAAA,CAAiBL,SAAS,CAA0BpE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiE,UAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAE9CF,EAAA,CAA5BI,CAAAA,CAAS,CAAEE,IAAMC,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAAgCtE,CAAAiE,CAAAA,SAAAA,CAAA,mBAAA,EAQrBF,CAAAA,CAAAA,CAAAA,CAAA,CAA5BI,CAAS,CAAA,CAAEC,SAAS,CAAkBpE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiE,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAGKF,EAAA,CAA3CI,CAAAA,CAAS,CAAEE,IAAMC,CAAAA,OAAAA,CAASF,SAAS,CAAyBpE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiE,SAAA,CAAA,UAAA,CAAA,IAAA,IA4B7DF,CAAA,CAAA,CADCW,EAAM,CAAC,SAAA,CAAW,iBAAkB,CAAEC,oBAAAA,CAAAA,CAAsB,KAI5D3E,CAAAiE,CAAAA,SAAAA,CAAA,oBAAA,IAxFUjE,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAY+D,EAAA,CADxBa,CAAAA,CAAc,kBACF5E"}
1
+ {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n \n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n \n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"],"names":["NileCheckbox","m","super","this","hasFocus","title","name","size","disabled","checked","label","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_d","_createClass","key","value","toggleHelpText","handleClick","emit","handleBlur","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","defaultValue","attribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"s1JAuDaA,4BACX,SAAAC,EAAA,CACEC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EAAAA,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,QAAG,CAAA,CAAA,CAAA,CAEhBD,KAAAA,CAAAE,KAAAA,CAAQ,EAGRF,CAAAA,KAAAA,CAAIG,KAAG,EAMUH,CAAAA,KAAAA,CAAII,IAAiC,CAAA,QAAA,CAGtBJ,KAAAA,CAAQK,QAAAA,CAAAA,CAAG,EAGXL,KAAAA,CAAOM,OAAAA,CAAAA,CAAG,CAGXN,CAAAA,KAAAA,CAAKO,KAAG,CAAA,EAAA,CAMPP,KAAAA,CAAaQ,aAAG,CAAA,CAAA,CAAA,CAGnCR,KAAAA,CAAcS,cAAG,CAAA,CAAA,CAAA,CAEWT,KAAAA,CAAQU,QAAG,CAAA,EAAA,CAEPV,KAAAA,CAAYW,YAAAA,CAAG,EAE3CX,CAAAA,KAAAA,CAAYY,cAAG,CAQfZ,CAAAA,KAAAA,CAAIa,IAAG,CAAA,EAAA,CAGQb,KAAAA,CAAQc,QAAAA,CAAAA,CAAG,CApDtD,QAAAC,KAAA,EAsDOC,SAAA,CAAAlB,CAAA,CAAAmB,EAAA,SAAAC,YAAA,CAAApB,CAAA,GAAAqB,GAAA,kBAAAC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AAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAY6D,EAAA,CADxBa,CAAAA,CAAc,kBACF1E"}
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{query as i,state as s,customElement as o}from"lit/decorators.js";import{s as c}from"./nile-checkbox.css.esm.js";import{classMap as h}from"lit/directives/class-map.js";import{d as l}from"../internal/default-value.esm.js";import{ifDefined as r}from"lit/directives/if-defined.js";import{live as n}from"lit/directives/live.js";import{w as a}from"../internal/watch.esm.js";import{N as d}from"../internal/nile-element.esm.js";import{n as m}from"../property-09139d3c.esm.js";import"lit";let p=class extends d{constructor(){super(),this.BUBBLES=!1,this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.indeterminate=!1,this.defaultChecked=!1,this.helpText="",this.errorMessage="",this.showHelpText=!1,this.form="",this.required=!1}toggleHelpText(){this.showHelpText=!this.showHelpText}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked})}handleBlur(){this.hasFocus=!1,this.emit("blur")}handleInput(){this.emit("input")}handleFocus(){this.hasFocus=!0,this.emit("focus")}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}connectedCallback(){super.connectedCallback(),this.updateHostClass(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(e){super.updated(e),e.has("helpText")&&this.updateHostClass()}updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width")}render(){const e=!!this.helpText,i=!!this.errorMessage;return t`
1
+ import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{query as i,state as s,customElement as o}from"lit/decorators.js";import{s as c}from"./nile-checkbox.css.esm.js";import{classMap as h}from"lit/directives/class-map.js";import{d as l}from"../internal/default-value.esm.js";import{ifDefined as r}from"lit/directives/if-defined.js";import{live as n}from"lit/directives/live.js";import{w as a}from"../internal/watch.esm.js";import{N as d}from"../internal/nile-element.esm.js";import{n as m}from"../property-09139d3c.esm.js";import"lit";let p=class extends d{constructor(){super(),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.indeterminate=!1,this.defaultChecked=!1,this.helpText="",this.errorMessage="",this.showHelpText=!1,this.form="",this.required=!1}toggleHelpText(){this.showHelpText=!this.showHelpText}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked})}handleBlur(){this.hasFocus=!1,this.emit("blur")}handleInput(){this.emit("input")}handleFocus(){this.hasFocus=!0,this.emit("focus")}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}connectedCallback(){super.connectedCallback(),this.updateHostClass(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(e){super.updated(e),e.has("helpText")&&this.updateHostClass()}updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width")}render(){const e=!!this.helpText,i=!!this.errorMessage;return t`
2
2
  <label
3
3
  part="base"
4
4
  class=${h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size})}