@aquera/nile-elements 0.0.68 → 0.0.70

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 (341) hide show
  1. package/.nycrc +17 -0
  2. package/README.md +24 -0
  3. package/demo/filenames.txt +1 -1
  4. package/demo/variables.css +12 -6
  5. package/demo/variables_v2.css +9 -6
  6. package/dist/axe.min-1a358f34.cjs.js +12 -0
  7. package/dist/axe.min-1a358f34.cjs.js.map +1 -0
  8. package/dist/axe.min-c4141dd6.esm.js +12 -0
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.esm.js +1 -1
  11. package/dist/index.iife.js +372 -206
  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.css.cjs.js +1 -1
  15. package/dist/nile-avatar/nile-avatar.css.cjs.js.map +1 -1
  16. package/dist/nile-avatar/nile-avatar.css.esm.js +15 -7
  17. package/dist/nile-avatar/nile-avatar.esm.js +1 -1
  18. package/dist/nile-badge/index.cjs.js +1 -1
  19. package/dist/nile-badge/index.esm.js +1 -1
  20. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  21. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  22. package/dist/nile-badge/nile-badge.css.cjs.js +1 -1
  23. package/dist/nile-badge/nile-badge.css.cjs.js.map +1 -1
  24. package/dist/nile-badge/nile-badge.css.esm.js +7 -5
  25. package/dist/nile-badge/nile-badge.esm.js +1 -1
  26. package/dist/nile-button/index.cjs.js +1 -1
  27. package/dist/nile-button/index.esm.js +1 -1
  28. package/dist/nile-button/nile-button.cjs.js +1 -1
  29. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  30. package/dist/nile-button/nile-button.css.cjs.js +1 -1
  31. package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
  32. package/dist/nile-button/nile-button.css.esm.js +13 -23
  33. package/dist/nile-button/nile-button.esm.js +1 -1
  34. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js +1 -1
  35. package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js.map +1 -1
  36. package/dist/nile-button-toggle/nile-button-toggle.css.esm.js +11 -6
  37. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js +1 -1
  38. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js.map +1 -1
  39. package/dist/nile-button-toggle-group/nile-button-toggle-group.css.esm.js +5 -4
  40. package/dist/nile-card/nile-card.cjs.js +1 -1
  41. package/dist/nile-card/nile-card.cjs.js.map +1 -1
  42. package/dist/nile-card/nile-card.css.cjs.js +1 -1
  43. package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
  44. package/dist/nile-card/nile-card.css.esm.js +23 -4
  45. package/dist/nile-card/nile-card.esm.js +13 -5
  46. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  47. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  48. package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
  49. package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
  50. package/dist/nile-checkbox/nile-checkbox.css.esm.js +24 -10
  51. package/dist/nile-checkbox/nile-checkbox.esm.js +4 -4
  52. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +395 -0
  53. package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +1 -0
  54. package/dist/nile-checkbox/nile-checkbox.test.esm.js +585 -0
  55. package/dist/nile-dialog/index.cjs.js +1 -1
  56. package/dist/nile-dialog/index.esm.js +1 -1
  57. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  58. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  59. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  60. package/dist/nile-drawer/index.cjs.js +1 -1
  61. package/dist/nile-drawer/index.esm.js +1 -1
  62. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  63. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  64. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  65. package/dist/nile-empty-state/index.cjs.js +1 -1
  66. package/dist/nile-empty-state/index.esm.js +1 -1
  67. package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
  68. package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
  69. package/dist/nile-empty-state/nile-empty-state.css.cjs.js +1 -1
  70. package/dist/nile-empty-state/nile-empty-state.css.cjs.js.map +1 -1
  71. package/dist/nile-empty-state/nile-empty-state.css.esm.js +63 -22
  72. package/dist/nile-empty-state/nile-empty-state.esm.js +21 -16
  73. package/dist/nile-format-date/index.cjs.js +2 -0
  74. package/dist/nile-format-date/index.cjs.js.map +1 -0
  75. package/dist/nile-format-date/index.esm.js +1 -0
  76. package/dist/nile-format-date/nile-format-date.cjs.js +2 -0
  77. package/dist/nile-format-date/nile-format-date.cjs.js.map +1 -0
  78. package/dist/nile-format-date/nile-format-date.css.cjs.js +2 -0
  79. package/dist/nile-format-date/nile-format-date.css.cjs.js.map +1 -0
  80. package/dist/nile-format-date/nile-format-date.css.esm.js +5 -0
  81. package/dist/nile-format-date/nile-format-date.esm.js +5 -0
  82. package/dist/nile-hero/index.cjs.js +1 -1
  83. package/dist/nile-hero/index.esm.js +1 -1
  84. package/dist/nile-hero/nile-hero.cjs.js +1 -1
  85. package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
  86. package/dist/nile-hero/nile-hero.css.cjs.js +1 -1
  87. package/dist/nile-hero/nile-hero.css.cjs.js.map +1 -1
  88. package/dist/nile-hero/nile-hero.css.esm.js +14 -33
  89. package/dist/nile-hero/nile-hero.esm.js +6 -9
  90. package/dist/nile-hero-header/index.cjs.js +2 -0
  91. package/dist/nile-hero-header/index.cjs.js.map +1 -0
  92. package/dist/nile-hero-header/index.esm.js +1 -0
  93. package/dist/nile-hero-header/nile-hero-header.cjs.js +2 -0
  94. package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -0
  95. package/dist/nile-hero-header/nile-hero-header.css.cjs.js +2 -0
  96. package/dist/nile-hero-header/nile-hero-header.css.cjs.js.map +1 -0
  97. package/dist/nile-hero-header/nile-hero-header.css.esm.js +28 -0
  98. package/dist/nile-hero-header/nile-hero-header.esm.js +6 -0
  99. package/dist/nile-icon/icons/svg/data-insight.cjs.js +2 -0
  100. package/dist/nile-icon/icons/svg/data-insight.cjs.js.map +1 -0
  101. package/dist/nile-icon/icons/svg/data-insight.esm.js +1 -0
  102. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  103. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  104. package/dist/nile-icon/icons/svg/info-circle.cjs.js +2 -0
  105. package/dist/nile-icon/icons/svg/info-circle.cjs.js.map +1 -0
  106. package/dist/nile-icon/icons/svg/info-circle.esm.js +1 -0
  107. package/dist/nile-icon/icons/svg/user-01.cjs.js +2 -0
  108. package/dist/nile-icon/icons/svg/user-01.cjs.js.map +1 -0
  109. package/dist/nile-icon/icons/svg/user-01.esm.js +1 -0
  110. package/dist/nile-icon/index.cjs.js +1 -1
  111. package/dist/nile-icon/index.cjs.js.map +1 -1
  112. package/dist/nile-icon/index.esm.js +3 -2
  113. package/dist/nile-icon-button/index.cjs.js +1 -1
  114. package/dist/nile-icon-button/index.esm.js +1 -1
  115. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  116. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  117. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  118. package/dist/nile-input/index.cjs.js +1 -1
  119. package/dist/nile-input/index.esm.js +1 -1
  120. package/dist/nile-input/nile-input.cjs.js +1 -1
  121. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  122. package/dist/nile-input/nile-input.css.cjs.js +1 -1
  123. package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
  124. package/dist/nile-input/nile-input.css.esm.js +7 -13
  125. package/dist/nile-input/nile-input.esm.js +1 -1
  126. package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
  127. package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
  128. package/dist/nile-menu/nile-menu.css.esm.js +2 -1
  129. package/dist/nile-menu-item/index.cjs.js +1 -1
  130. package/dist/nile-menu-item/index.esm.js +1 -1
  131. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  132. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  133. package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
  134. package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
  135. package/dist/nile-menu-item/nile-menu-item.css.esm.js +7 -4
  136. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  137. package/dist/nile-option/index.cjs.js +1 -1
  138. package/dist/nile-option/index.esm.js +1 -1
  139. package/dist/nile-option/nile-option.cjs.js +1 -1
  140. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  141. package/dist/nile-option/nile-option.esm.js +1 -1
  142. package/dist/nile-select/index.cjs.js +1 -1
  143. package/dist/nile-select/index.esm.js +1 -1
  144. package/dist/nile-select/nile-select.cjs.js +1 -1
  145. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  146. package/dist/nile-select/nile-select.esm.js +1 -1
  147. package/dist/nile-slide-toggle/index.cjs.js +1 -1
  148. package/dist/nile-slide-toggle/index.esm.js +1 -1
  149. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  150. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  151. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
  152. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
  153. package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +26 -2
  154. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +5 -3
  155. package/dist/nile-tab/index.cjs.js +1 -1
  156. package/dist/nile-tab/index.esm.js +1 -1
  157. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  158. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  159. package/dist/nile-tab/nile-tab.css.cjs.js +1 -1
  160. package/dist/nile-tab/nile-tab.css.cjs.js.map +1 -1
  161. package/dist/nile-tab/nile-tab.css.esm.js +17 -7
  162. package/dist/nile-tab/nile-tab.esm.js +1 -1
  163. package/dist/nile-tab-group/index.cjs.js +1 -1
  164. package/dist/nile-tab-group/index.esm.js +1 -1
  165. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  166. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  167. package/dist/nile-tab-group/nile-tab-group.css.cjs.js +1 -1
  168. package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -1
  169. package/dist/nile-tab-group/nile-tab-group.css.esm.js +16 -2
  170. package/dist/nile-tab-group/nile-tab-group.esm.js +8 -5
  171. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
  172. package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
  173. package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +4 -4
  174. package/dist/nile-tag/index.cjs.js +1 -1
  175. package/dist/nile-tag/index.esm.js +1 -1
  176. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  177. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  178. package/dist/nile-tag/nile-tag.esm.js +1 -1
  179. package/dist/nile-toast/index.cjs.js +1 -1
  180. package/dist/nile-toast/index.esm.js +1 -1
  181. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  182. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  183. package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
  184. package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
  185. package/dist/nile-toast/nile-toast.css.esm.js +17 -16
  186. package/dist/nile-toast/nile-toast.esm.js +5 -3
  187. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  188. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  189. package/dist/nile-tooltip/nile-tooltip.css.esm.js +6 -6
  190. package/dist/scopedElementsWrapper-2fa3aa8b.cjs.js +6 -0
  191. package/dist/scopedElementsWrapper-2fa3aa8b.cjs.js.map +1 -0
  192. package/dist/scopedElementsWrapper-4c29be11.esm.js +7 -0
  193. package/dist/src/index.d.ts +2 -0
  194. package/dist/src/index.js +2 -0
  195. package/dist/src/index.js.map +1 -1
  196. package/dist/src/nile-avatar/nile-avatar.css.js +15 -7
  197. package/dist/src/nile-avatar/nile-avatar.css.js.map +1 -1
  198. package/dist/src/nile-avatar/nile-avatar.d.ts +1 -1
  199. package/dist/src/nile-avatar/nile-avatar.js +1 -0
  200. package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
  201. package/dist/src/nile-badge/nile-badge.css.js +7 -5
  202. package/dist/src/nile-badge/nile-badge.css.js.map +1 -1
  203. package/dist/src/nile-button/nile-button.css.js +13 -23
  204. package/dist/src/nile-button/nile-button.css.js.map +1 -1
  205. package/dist/src/nile-button-toggle/nile-button-toggle.css.js +11 -6
  206. package/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -1
  207. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.d.ts +5 -5
  208. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js +8 -7
  209. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js.map +1 -1
  210. package/dist/src/nile-card/nile-card.css.js +23 -4
  211. package/dist/src/nile-card/nile-card.css.js.map +1 -1
  212. package/dist/src/nile-card/nile-card.js +12 -4
  213. package/dist/src/nile-card/nile-card.js.map +1 -1
  214. package/dist/src/nile-checkbox/nile-checkbox.css.js +24 -10
  215. package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  216. package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -2
  217. package/dist/src/nile-checkbox/nile-checkbox.js +7 -6
  218. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  219. package/dist/src/nile-checkbox/nile-checkbox.test.d.ts +1 -0
  220. package/dist/src/nile-checkbox/nile-checkbox.test.js +152 -0
  221. package/dist/src/nile-checkbox/nile-checkbox.test.js.map +1 -0
  222. package/dist/src/nile-empty-state/nile-empty-state.css.js +61 -20
  223. package/dist/src/nile-empty-state/nile-empty-state.css.js.map +1 -1
  224. package/dist/src/nile-empty-state/nile-empty-state.d.ts +1 -1
  225. package/dist/src/nile-empty-state/nile-empty-state.js +22 -22
  226. package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
  227. package/dist/src/nile-format-date/index.d.ts +1 -0
  228. package/dist/src/nile-format-date/index.js +2 -0
  229. package/dist/src/nile-format-date/index.js.map +1 -0
  230. package/dist/src/nile-format-date/nile-format-date.css.d.ts +12 -0
  231. package/dist/src/nile-format-date/nile-format-date.css.js +17 -0
  232. package/dist/src/nile-format-date/nile-format-date.css.js.map +1 -0
  233. package/dist/src/nile-format-date/nile-format-date.d.ts +59 -0
  234. package/dist/src/nile-format-date/nile-format-date.js +129 -0
  235. package/dist/src/nile-format-date/nile-format-date.js.map +1 -0
  236. package/dist/src/nile-hero/nile-hero.css.js +13 -32
  237. package/dist/src/nile-hero/nile-hero.css.js.map +1 -1
  238. package/dist/src/nile-hero/nile-hero.d.ts +6 -0
  239. package/dist/src/nile-hero/nile-hero.js +45 -8
  240. package/dist/src/nile-hero/nile-hero.js.map +1 -1
  241. package/dist/src/nile-hero-header/index.d.ts +1 -0
  242. package/dist/src/nile-hero-header/index.js +2 -0
  243. package/dist/src/nile-hero-header/index.js.map +1 -0
  244. package/dist/src/nile-hero-header/nile-hero-header.css.d.ts +12 -0
  245. package/dist/src/nile-hero-header/nile-hero-header.css.js +40 -0
  246. package/dist/src/nile-hero-header/nile-hero-header.css.js.map +1 -0
  247. package/dist/src/nile-hero-header/nile-hero-header.d.ts +34 -0
  248. package/dist/src/nile-hero-header/nile-hero-header.js +58 -0
  249. package/dist/src/nile-hero-header/nile-hero-header.js.map +1 -0
  250. package/dist/src/nile-icon/icons/svg/data-insight.d.ts +5 -0
  251. package/dist/src/nile-icon/icons/svg/data-insight.js +5 -0
  252. package/dist/src/nile-icon/icons/svg/data-insight.js.map +1 -0
  253. package/dist/src/nile-icon/icons/svg/index.d.ts +3 -0
  254. package/dist/src/nile-icon/icons/svg/index.js +3 -0
  255. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  256. package/dist/src/nile-icon/icons/svg/info-circle.d.ts +5 -0
  257. package/dist/src/nile-icon/icons/svg/info-circle.js +5 -0
  258. package/dist/src/nile-icon/icons/svg/info-circle.js.map +1 -0
  259. package/dist/src/nile-icon/icons/svg/user-01.d.ts +5 -0
  260. package/dist/src/nile-icon/icons/svg/user-01.js +5 -0
  261. package/dist/src/nile-icon/icons/svg/user-01.js.map +1 -0
  262. package/dist/src/nile-icon/index.js +2 -1
  263. package/dist/src/nile-icon/index.js.map +1 -1
  264. package/dist/src/nile-input/nile-input.css.js +7 -13
  265. package/dist/src/nile-input/nile-input.css.js.map +1 -1
  266. package/dist/src/nile-menu/nile-menu.css.js +2 -1
  267. package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
  268. package/dist/src/nile-menu-item/nile-menu-item.css.js +7 -4
  269. package/dist/src/nile-menu-item/nile-menu-item.css.js.map +1 -1
  270. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +26 -2
  271. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  272. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +1 -0
  273. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +11 -1
  274. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  275. package/dist/src/nile-tab/nile-tab.css.js +15 -5
  276. package/dist/src/nile-tab/nile-tab.css.js.map +1 -1
  277. package/dist/src/nile-tab-group/nile-tab-group.css.js +16 -2
  278. package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -1
  279. package/dist/src/nile-tab-group/nile-tab-group.d.ts +2 -0
  280. package/dist/src/nile-tab-group/nile-tab-group.js +16 -5
  281. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  282. package/dist/src/nile-table-header-item/nile-table-header-item.css.js +2 -2
  283. package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
  284. package/dist/src/nile-toast/nile-toast.css.js +17 -16
  285. package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
  286. package/dist/src/nile-toast/nile-toast.d.ts +1 -1
  287. package/dist/src/nile-toast/nile-toast.js +9 -7
  288. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  289. package/dist/src/nile-tooltip/nile-tooltip.css.js +6 -6
  290. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  291. package/dist/tsconfig.tsbuildinfo +1 -1
  292. package/package.json +3 -2
  293. package/plopfile.js +5 -0
  294. package/rollup.config.js +11 -6
  295. package/src/index.ts +3 -1
  296. package/src/nile-avatar/nile-avatar.css.ts +15 -7
  297. package/src/nile-avatar/nile-avatar.ts +2 -1
  298. package/src/nile-badge/nile-badge.css.ts +7 -5
  299. package/src/nile-button/nile-button.css.ts +13 -23
  300. package/src/nile-button-toggle/nile-button-toggle.css.ts +11 -6
  301. package/src/nile-button-toggle-group/nile-button-toggle-group.css.ts +9 -8
  302. package/src/nile-card/nile-card.css.ts +23 -4
  303. package/src/nile-card/nile-card.ts +19 -8
  304. package/src/nile-checkbox/nile-checkbox.css.ts +24 -10
  305. package/src/nile-checkbox/nile-checkbox.test.ts +188 -0
  306. package/src/nile-checkbox/nile-checkbox.ts +6 -8
  307. package/src/nile-empty-state/nile-empty-state.css.ts +61 -20
  308. package/src/nile-empty-state/nile-empty-state.ts +22 -28
  309. package/src/nile-format-date/index.ts +1 -0
  310. package/src/nile-format-date/nile-format-date.css.ts +19 -0
  311. package/src/nile-format-date/nile-format-date.ts +133 -0
  312. package/src/nile-hero/nile-hero.css.ts +13 -32
  313. package/src/nile-hero/nile-hero.ts +39 -13
  314. package/src/nile-hero-header/index.ts +1 -0
  315. package/src/nile-hero-header/nile-hero-header.css.ts +42 -0
  316. package/src/nile-hero-header/nile-hero-header.ts +59 -0
  317. package/src/nile-icon/icons/svg/data-insight.ts +5 -0
  318. package/src/nile-icon/icons/svg/index.ts +3 -0
  319. package/src/nile-icon/icons/svg/info-circle.ts +5 -0
  320. package/src/nile-icon/icons/svg/user-01.ts +5 -0
  321. package/src/nile-icon/index.ts +2 -1
  322. package/src/nile-input/nile-input.css.ts +7 -13
  323. package/src/nile-menu/nile-menu.css.ts +2 -1
  324. package/src/nile-menu-item/nile-menu-item.css.ts +7 -4
  325. package/src/nile-slide-toggle/nile-slide-toggle.css.ts +26 -2
  326. package/src/nile-slide-toggle/nile-slide-toggle.ts +9 -1
  327. package/src/nile-tab/nile-tab.css.ts +16 -6
  328. package/src/nile-tab-group/nile-tab-group.css.ts +16 -2
  329. package/src/nile-tab-group/nile-tab-group.ts +25 -15
  330. package/src/nile-table-header-item/nile-table-header-item.css.ts +2 -2
  331. package/src/nile-toast/nile-toast.css.ts +17 -16
  332. package/src/nile-toast/nile-toast.ts +9 -7
  333. package/src/nile-tooltip/nile-tooltip.css.ts +6 -6
  334. package/tsconfig.json +3 -1
  335. package/web-test-runner.config.mjs +27 -14
  336. package/dist/stories/icons.stories.d.ts +0 -29
  337. package/dist/stories/icons.stories.js +0 -27
  338. package/dist/stories/icons.stories.js.map +0 -1
  339. package/dist/stories/index.stories.d.ts +0 -33
  340. package/dist/stories/index.stories.js +0 -37
  341. package/dist/stories/index.stories.js.map +0 -1
@@ -9,7 +9,6 @@ import { html, nothing, property } from 'lit-element';
9
9
  import { customElement } from 'lit/decorators.js';
10
10
  import { classMap } from 'lit/directives/class-map.js';
11
11
  import { styles } from './nile-empty-state.css';
12
- import { HasSlotController } from '../internal/slot';
13
12
  import NileElement from '../internal/nile-element';
14
13
  /**
15
14
  * Nile empty-state component.
@@ -20,10 +19,10 @@ import NileElement from '../internal/nile-element';
20
19
  let NileEmptyState = class NileEmptyState extends NileElement {
21
20
  constructor() {
22
21
  super(...arguments);
23
- this.hasSlotController = new HasSlotController(this, 'actions');
24
22
  this.size = 'md';
25
23
  this.variant = 'tonal';
26
24
  this.icon = 'error';
25
+ this.grayscale = false;
27
26
  this.text = 'Empty State';
28
27
  this.subText = 'No Data';
29
28
  /* #endregion */
@@ -42,7 +41,6 @@ let NileEmptyState = class NileEmptyState extends NileElement {
42
41
  * @slot This is a slot test
43
42
  */
44
43
  render() {
45
- const hasContentSlot = this.hasSlotController.test('content');
46
44
  return html `
47
45
  <div class="${classMap({
48
46
  'empty-state': true,
@@ -50,35 +48,34 @@ let NileEmptyState = class NileEmptyState extends NileElement {
50
48
  'empty-state--md': this.size == 'md',
51
49
  'empty-state--lg': this.size == 'lg'
52
50
  })}">
53
- <div class="${classMap({
54
- 'empty-state__body': true,
55
- })}">
56
- ${this.variant == 'content' ? html `
57
- <div class="empty-state__body--content">
58
- <slot name="content"></slot>
59
- ${!this.icon ? nothing :
60
- html `
61
- <div class="${classMap({
62
- 'empty-state__img__icon': true,
63
- 'empty-state__img__icon--abs': hasContentSlot
64
- })}">
65
- <nile-icon name="${this.icon}" color="white" size="${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}"></nile-icon>
66
- </div>`}
67
- </div>` : nothing}
51
+ <div class="${classMap({ 'empty-state__body': true })}">
52
+
53
+ ${this.variant == 'content' ? html `
54
+ <div class="empty-state__body--content">
55
+
56
+ <div src="" class="${classMap({ 'empty-state__image': true, 'empty-state__image--grayscale': this.grayscale })}"></div>
57
+ ${!this.icon ? nothing : html `
58
+ <div class="empty-state__img__icon">
59
+ <nile-icon name="${this.icon}" color="white" size="${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}"></nile-icon>
60
+ </div>`}
61
+ </div>` : nothing}
68
62
 
69
- ${this.variant == 'tonal' ? html `
63
+ ${this.variant == 'tonal' ? html `
70
64
  <div class="empty-state__body--tonal">
71
65
  <nile-icon name="${this.icon}" size="40"></nile-icon>
72
66
  </div>` : nothing}
73
67
 
74
- ${this.variant == 'flat' ? html `
68
+ ${this.variant == 'flat' ? html `
75
69
  <div class="empty-state__body--flat">
76
70
  <span class="nile-flat-type-icon">
77
71
  <nile-icon name="${this.icon}" size="${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}" variant="secondary"></nile-icon>
78
72
  </span>
79
73
  </div>` : nothing}
80
- <div class="empty-state__text">${this.text}</div>
81
- <div class="empty-state__subtext">${this.subText}</div>
74
+
75
+ <div class="empty__state__text-section">
76
+ <div class="empty-state__text">${this.text}</div>
77
+ <div class="empty-state__subtext">${this.subText}</div>
78
+ </div>
82
79
  </div>
83
80
 
84
81
  <div class="empty-state-actions">
@@ -97,6 +94,9 @@ __decorate([
97
94
  __decorate([
98
95
  property()
99
96
  ], NileEmptyState.prototype, "icon", void 0);
97
+ __decorate([
98
+ property({ type: Boolean })
99
+ ], NileEmptyState.prototype, "grayscale", void 0);
100
100
  __decorate([
101
101
  property()
102
102
  ], NileEmptyState.prototype, "text", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QASY,sBAAiB,GAAG,IAAI,iBAAiB,CACxD,IAAI,EACJ,SAAS,CACV,CAAC;QAEU,SAAI,GAAuB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tB,CAAA,CAAC,CAAC,OACP;;KAED,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;;;yBAGT,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;;WAEtF,CAAA,CAAC,CAAC,OACP;qCAC+B,IAAI,CAAC,IAAI;wCACN,IAAI,CAAC,OAAO;;;;;;;GAOjD,CAAC;IACF,CAAC;CAGF,CAAA;AAzEa;IAAX,QAAQ,EAAE;4CAAiC;AAEhC;IAAX,QAAQ,EAAE;+CAGW;AAEV;IAAX,QAAQ,EAAE;4CAAwB;AAEvB;IAAX,QAAQ,EAAE;4CAA8B;AAC7B;IAAX,QAAQ,EAAE;+CAA6B;AAxB7B,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAuF1B;SAvFY,cAAc;AAyF3B,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { state, html, nothing, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport { HasSlotController } from '../internal/slot';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\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 private readonly hasSlotController = new HasSlotController(\n this,\n 'actions'\n );\n\n @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'error';\n\n @property() text: String = 'Empty State';\n @property() subText: String = 'No Data';\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n const hasContentSlot = this.hasSlotController.test('content');\n return html`\n\t\t<div class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n\t\t\t<div class=\"${classMap({\n 'empty-state__body': true,\n })}\">\n\t\t\t${this.variant == 'content' ? html`\n\t\t\t\t<div class=\"empty-state__body--content\">\n\t\t\t\t\t<slot name=\"content\"></slot>\n\t\t\t\t\t${!this.icon ? nothing :\n html`\n\t\t\t\t\t\t<div class=\"${classMap({\n 'empty-state__img__icon': true,\n 'empty-state__img__icon--abs': hasContentSlot\n })}\">\n\t\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n\t\t\t\t\t\t</div>`\n }\n\t\t\t\t</div>`: nothing\n }\n\t\t\t\t\n\t\t\t${this.variant == 'tonal' ? html`\n\t\t\t\t<div class=\"empty-state__body--tonal\">\n\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"40\"></nile-icon>\n\t\t\t\t</div>`: nothing\n }\n\n\t\t\t${this.variant == 'flat' ? html`\n\t\t\t\t<div class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t</div>`: nothing\n }\n\t\t\t\t<div class=\"empty-state__text\">${this.text}</div>\n\t\t\t\t<div class=\"empty-state__subtext\">${this.subText}</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"empty-state-actions\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}"]}
1
+ {"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAUO,SAAI,GAAuB,IAAI,CAAC;QAEhC,YAAO,GAGL,OAAO,CAAC;QAEV,SAAI,GAAW,OAAO,CAAC;QACT,cAAS,GAAY,KAAK,CAAC;QAEzC,SAAI,GAAW,aAAa,CAAC;QAC7B,YAAO,GAAW,SAAS,CAAC;QA4DxC,gBAAgB;IAClB,CAAC;IAhFC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAgBD,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACX,OAAO,IAAI,CAAA;gBACC,QAAQ,CAAC;YACnB,aAAa,EAAE,IAAI;YACnB,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;YACpC,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;YACpC,iBAAiB,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;SACrC,CAAC;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CAA8B;AAC7B;IAAX,QAAQ,EAAE;+CAA6B;AArB7B,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkF1B;SAlFY,cAAc;AAoF3B,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { state, html, nothing, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\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 @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'error';\n @property({type:Boolean}) grayscale: boolean = false;\n\n @property() text: String = 'Empty State';\n @property() subText: String = 'No Data';\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n\t\t<div class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n <div class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${this.variant == 'content' ? html`\n <div class=\"empty-state__body--content\">\n \n <div src=\"\" class=\"${classMap({ 'empty-state__image': true, 'empty-state__image--grayscale':this.grayscale })}\"></div>\n ${!this.icon ? nothing : html`\n <div class=\"empty-state__img__icon\">\n <nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n </div>`\n }\n </div>`: nothing\n }\n\t\t\t\t\n\t\t\t ${this.variant == 'tonal' ? html`\n\t\t\t\t<div class=\"empty-state__body--tonal\">\n\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"40\"></nile-icon>\n\t\t\t\t</div>`: nothing\n }\n\n\t\t\t ${this.variant == 'flat' ? html`\n\t\t\t\t<div class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t</div>`: nothing\n }\n \n <div class=\"empty__state__text-section\">\n <div class=\"empty-state__text\">${this.text}</div>\n <div class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n\t\t\t</div>\n\n\t\t\t<div class=\"empty-state-actions\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}"]}
@@ -0,0 +1 @@
1
+ export { NileFormatDate } from './nile-format-date';
@@ -0,0 +1,2 @@
1
+ export { NileFormatDate } from './nile-format-date';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-format-date/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { NileFormatDate } from './nile-format-date';"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ /**
8
+ * FormatDate CSS
9
+ */
10
+ export declare const styles: import("lit-element").CSSResult;
11
+ declare const _default: import("lit-element").CSSResult[];
12
+ export default _default;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { css } from 'lit-element';
8
+ /**
9
+ * FormatDate CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+
14
+ }
15
+ `;
16
+ export default [styles];
17
+ //# sourceMappingURL=nile-format-date.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-format-date.css.js","sourceRoot":"","sources":["../../../src/nile-format-date/nile-format-date.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * FormatDate CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n`;\n\nexport default [styles];"]}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { CSSResultArray, TemplateResult } from 'lit-element';
8
+ import NileElement from '../internal/nile-element';
9
+ /**
10
+ * Nile format-date component.
11
+ *
12
+ * @tag nile-format-date
13
+ *
14
+ */
15
+ export declare class NileFormatDate extends NileElement {
16
+ /**
17
+ * The styles for nile-format-date
18
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
19
+ */
20
+ static get styles(): CSSResultArray;
21
+ /**
22
+ * The date/time to format. If not set, the current date and time will be used. When passing a string, it's strongly
23
+ * recommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert a date to this format
24
+ * in JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).
25
+ */
26
+ date: Date | string;
27
+ /** The format for displaying the weekday. */
28
+ weekday: 'narrow' | 'short' | 'long';
29
+ /** The format for displaying the era. */
30
+ era: 'narrow' | 'short' | 'long';
31
+ /** The format for displaying the year. */
32
+ year: 'numeric' | '2-digit';
33
+ /** The format for displaying the month. */
34
+ month: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long';
35
+ /** The format for displaying the day. */
36
+ day: 'numeric' | '2-digit';
37
+ /** The format for displaying the hour. */
38
+ hour: 'numeric' | '2-digit';
39
+ /** The format for displaying the minute. */
40
+ minute: 'numeric' | '2-digit';
41
+ /** The format for displaying the second. */
42
+ second: 'numeric' | '2-digit';
43
+ /** The format for displaying the time. */
44
+ timeZoneName: 'short' | 'long';
45
+ /** The time zone to express the time in. */
46
+ timeZone: string;
47
+ /** The format for displaying the hour. */
48
+ hourFormat: 'auto' | '12' | '24';
49
+ /** The separator for the date format. */
50
+ dateSeparator: '-' | '/';
51
+ formatDate(dateToFormat: Date | string, options?: Intl.DateTimeFormatOptions): string;
52
+ render(): TemplateResult<1> | undefined;
53
+ }
54
+ export default NileFormatDate;
55
+ declare global {
56
+ interface HTMLElementTagNameMap {
57
+ 'nile-format-date': NileFormatDate;
58
+ }
59
+ }
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { __decorate } from "tslib";
8
+ import { html, property } from 'lit-element';
9
+ import { customElement } from 'lit/decorators.js';
10
+ import { styles } from './nile-format-date.css';
11
+ import NileElement from '../internal/nile-element';
12
+ /**
13
+ * Nile format-date component.
14
+ *
15
+ * @tag nile-format-date
16
+ *
17
+ */
18
+ let NileFormatDate = class NileFormatDate extends NileElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * The date/time to format. If not set, the current date and time will be used. When passing a string, it's strongly
23
+ * recommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert a date to this format
24
+ * in JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).
25
+ */
26
+ this.date = new Date();
27
+ /** The format for displaying the hour. */
28
+ this.hourFormat = 'auto';
29
+ /** The separator for the date format. */
30
+ this.dateSeparator = '-';
31
+ }
32
+ /**
33
+ * The styles for nile-format-date
34
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
35
+ */
36
+ static get styles() {
37
+ return [styles];
38
+ }
39
+ formatDate(dateToFormat, options) {
40
+ dateToFormat = new Date(dateToFormat);
41
+ const formatter = new Intl.DateTimeFormat('en-GB', options);
42
+ const parts = formatter.formatToParts(dateToFormat);
43
+ const formattedDate = parts.map(({ type, value }) => {
44
+ if (type === 'day' || type === 'month' || type === 'year') {
45
+ return value;
46
+ }
47
+ if (type === 'literal' && value === '/') {
48
+ return this.dateSeparator;
49
+ }
50
+ return value;
51
+ }).join('');
52
+ return formattedDate;
53
+ }
54
+ // formatDate(dateToFormat: Date | string, options?: Intl.DateTimeFormatOptions): string {
55
+ // dateToFormat = new Date(dateToFormat);
56
+ // return new Intl.DateTimeFormat('en-GB', options).format(dateToFormat);
57
+ // }
58
+ render() {
59
+ const date = new Date(this.date);
60
+ const hour12 = this.hourFormat === 'auto' ? undefined : this.hourFormat === '12';
61
+ // Check for an invalid date
62
+ if (isNaN(date.getMilliseconds())) {
63
+ return undefined;
64
+ }
65
+ return html `
66
+ <time datetime=${date.toISOString()}>
67
+ ${this.formatDate(date, {
68
+ weekday: this.weekday,
69
+ era: this.era,
70
+ year: this.year,
71
+ month: this.month,
72
+ day: this.day,
73
+ hour: this.hour,
74
+ minute: this.minute,
75
+ second: this.second,
76
+ timeZoneName: this.timeZoneName,
77
+ timeZone: this.timeZone,
78
+ hour12: hour12,
79
+ })}
80
+ </time>
81
+ `;
82
+ }
83
+ };
84
+ __decorate([
85
+ property()
86
+ ], NileFormatDate.prototype, "date", void 0);
87
+ __decorate([
88
+ property()
89
+ ], NileFormatDate.prototype, "weekday", void 0);
90
+ __decorate([
91
+ property()
92
+ ], NileFormatDate.prototype, "era", void 0);
93
+ __decorate([
94
+ property()
95
+ ], NileFormatDate.prototype, "year", void 0);
96
+ __decorate([
97
+ property()
98
+ ], NileFormatDate.prototype, "month", void 0);
99
+ __decorate([
100
+ property()
101
+ ], NileFormatDate.prototype, "day", void 0);
102
+ __decorate([
103
+ property()
104
+ ], NileFormatDate.prototype, "hour", void 0);
105
+ __decorate([
106
+ property()
107
+ ], NileFormatDate.prototype, "minute", void 0);
108
+ __decorate([
109
+ property()
110
+ ], NileFormatDate.prototype, "second", void 0);
111
+ __decorate([
112
+ property({ attribute: 'time-zone-name' })
113
+ ], NileFormatDate.prototype, "timeZoneName", void 0);
114
+ __decorate([
115
+ property({ attribute: 'time-zone' })
116
+ ], NileFormatDate.prototype, "timeZone", void 0);
117
+ __decorate([
118
+ property({ attribute: 'hour-format' })
119
+ ], NileFormatDate.prototype, "hourFormat", void 0);
120
+ __decorate([
121
+ property({ attribute: 'date-separator' })
122
+ ], NileFormatDate.prototype, "dateSeparator", void 0);
123
+ NileFormatDate = __decorate([
124
+ customElement('nile-format-date')
125
+ ], NileFormatDate);
126
+ export { NileFormatDate };
127
+ /* #endregion */
128
+ export default NileFormatDate;
129
+ //# sourceMappingURL=nile-format-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-format-date.js","sourceRoot":"","sources":["../../../src/nile-format-date/nile-format-date.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACl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AAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;kDAC9B;AAGkC;IAA1C,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;qDAAgC;AAnD/D,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAuG1B;SAvGY,cAAc;AAwG1B,gBAAgB;AAEjB,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-format-date.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile format-date component.\n *\n * @tag nile-format-date\n *\n */\n@customElement('nile-format-date')\nexport class NileFormatDate extends NileElement {\n /**\n * The styles for nile-format-date\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 * The date/time to format. If not set, the current date and time will be used. When passing a string, it's strongly\n * recommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert a date to this format\n * in JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).\n */\n @property() date: Date | string = new Date();\n\n /** The format for displaying the weekday. */\n @property() weekday: 'narrow' | 'short' | 'long';\n\n /** The format for displaying the era. */\n @property() era: 'narrow' | 'short' | 'long';\n\n /** The format for displaying the year. */\n @property() year: 'numeric' | '2-digit';\n\n /** The format for displaying the month. */\n @property() month: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long';\n\n /** The format for displaying the day. */\n @property() day: 'numeric' | '2-digit';\n\n /** The format for displaying the hour. */\n @property() hour: 'numeric' | '2-digit';\n\n /** The format for displaying the minute. */\n @property() minute: 'numeric' | '2-digit';\n\n /** The format for displaying the second. */\n @property() second: 'numeric' | '2-digit';\n\n /** The format for displaying the time. */\n @property({ attribute: 'time-zone-name' }) timeZoneName: 'short' | 'long';\n\n /** The time zone to express the time in. */\n @property({ attribute: 'time-zone' }) timeZone: string;\n\n /** The format for displaying the hour. */\n @property({ attribute: 'hour-format' }) hourFormat: 'auto' | '12' | '24' =\n 'auto';\n\n /** The separator for the date format. */\n @property({ attribute: 'date-separator' }) dateSeparator: '-' | '/' = '-';\n\n formatDate(dateToFormat: Date | string, options?: Intl.DateTimeFormatOptions): string {\n dateToFormat = new Date(dateToFormat);\n const formatter = new Intl.DateTimeFormat('en-GB', options);\n const parts = formatter.formatToParts(dateToFormat);\n const formattedDate = parts.map(({ type, value }) => {\n if (type === 'day' || type === 'month' || type === 'year') {\n return value;\n }\n if (type === 'literal' && value === '/') {\n return this.dateSeparator;\n }\n return value;\n }).join('');\n return formattedDate;\n }\n\n // formatDate(dateToFormat: Date | string, options?: Intl.DateTimeFormatOptions): string {\n // dateToFormat = new Date(dateToFormat);\n // return new Intl.DateTimeFormat('en-GB', options).format(dateToFormat);\n // }\n\n\n render() {\n const date = new Date(this.date);\n const hour12 =\n this.hourFormat === 'auto' ? undefined : this.hourFormat === '12';\n\n // Check for an invalid date\n if (isNaN(date.getMilliseconds())) {\n return undefined;\n }\n\n return html`\n <time datetime=${date.toISOString()}>\n ${this.formatDate(date, {\n weekday: this.weekday,\n era: this.era,\n year: this.year,\n month: this.month,\n day: this.day,\n hour: this.hour,\n minute: this.minute,\n second: this.second,\n timeZoneName: this.timeZoneName,\n timeZone: this.timeZone,\n hour12: hour12,\n })}\n </time>\n `;\n }\n}\n\t/* #endregion */\n\nexport default NileFormatDate;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-format-date': NileFormatDate;\n }\n}\n"]}
@@ -11,57 +11,38 @@ import { css } from 'lit-element';
11
11
  export const styles = css `
12
12
 
13
13
  :host {
14
- min-height:var(--nile-hero-height);
14
+ display:block;
15
+ --transition:2000ms;
16
+ }
17
+ .hero__container{
18
+ overflow:hidden;
15
19
  width:100%;
16
20
  position:relative;
17
21
  display:block;
18
- border-bottom: 1px solid #EAECF0;
19
- background: linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient) 0%, var( --nile-hero-color-bg-to-gradient) 100%);
22
+ transition: var(--transition);
20
23
  }
21
-
22
24
  .hero__body {
23
25
  height:100%;
24
26
  }
25
27
 
26
- .hero__header {
27
- display: flex;
28
- align-items: center;
29
- padding: var(--nile-hero-first-elements-padding);
30
- gap: .75rem;
31
- }
32
-
33
- .icon__container {
34
- height: 25px;
35
- place-items: center;
36
- display: grid;
37
- aspect-ratio: 1 / 1;
38
- border-radius: 8px;
39
- border: 1px solid #EAECF0;
40
- background: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient) 0%, var(--nile-hero-color-icon-bg-to-gradient) 100%);
41
- }
42
-
43
- .hero__text {
44
- color: var(--nile-hero-text-color);
45
- font-size: var(--nile-hero-text-font-size);
46
- font-style: normal;
47
- font-weight: var(--nile-hero-text-font-weight);
48
- }
49
-
50
28
  .hero__slot {
51
- padding: var(--nile-hero-first-elements-padding);
29
+ padding-left: 48px;
30
+ padding-top: 24px
52
31
  }
53
32
 
54
33
  .hero__img__container {
55
- height:100%;
34
+ height:var(--nile-hero-height);
35
+ overflow:hidden;
56
36
  width:max-content;
57
37
  position: absolute;
58
38
  right: 0;
59
- top:0;
39
+ bottom:0;
40
+ transition:var(--transition);
60
41
  }
61
42
 
62
43
  .hero__img {
63
44
  object-fit:cover;
64
- height:100%;
45
+ height:var(--nile-hero-height);
65
46
  width:auto;
66
47
  }
67
48
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"nile-hero.css.js","sourceRoot":"","sources":["../../../src/nile-hero/nile-hero.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Hero CSS\n */\nexport const styles = css`\n\n\t:host {\n\t\tmin-height:var(--nile-hero-height);\n\t\twidth:100%;\n\t\tposition:relative;\n\t\tdisplay:block;\n\t\tborder-bottom: 1px solid #EAECF0;\n\t\tbackground: linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient) 0%, var( --nile-hero-color-bg-to-gradient) 100%);\n\t}\n\n\t.hero__body {\n\t\theight:100%;\n\t}\n\n\t.hero__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tpadding: var(--nile-hero-first-elements-padding);\n\t\tgap: .75rem;\n\t}\n\n\t.icon__container {\n\t\theight: 25px;\n\t\tplace-items: center;\n\t\tdisplay: grid;\n\t\taspect-ratio: 1 / 1;\n\t\tborder-radius: 8px;\n\t\tborder: 1px solid #EAECF0;\n\t\tbackground: linear-gradient(180deg, var(--nile-hero-color-icon-bg-from-gradient) 0%, var(--nile-hero-color-icon-bg-to-gradient) 100%);\n\t}\n\n\t.hero__text {\n\t\tcolor: var(--nile-hero-text-color);\n\t\tfont-size: var(--nile-hero-text-font-size);\n\t\tfont-style: normal;\n\t\tfont-weight: var(--nile-hero-text-font-weight);\n\t}\n\n\t.hero__slot {\n\t\tpadding: var(--nile-hero-first-elements-padding);\n\t}\n\n\t.hero__img__container {\n\t\theight:100%;\n\t\twidth:max-content;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop:0;\n\t}\n\n\t.hero__img {\n\t\tobject-fit:cover;\n\t\theight:100%;\n\t\twidth:auto;\n\t}\n`;\n\nexport default [styles];"]}
1
+ {"version":3,"file":"nile-hero.css.js","sourceRoot":"","sources":["../../../src/nile-hero/nile-hero.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Hero CSS\n */\nexport const styles = css`\n\n\t:host {\n\t\tdisplay:block;\n\t\t--transition:2000ms;\n\t}\n\t.hero__container{\n\t\toverflow:hidden;\n\t\twidth:100%;\n\t\tposition:relative;\n\t\tdisplay:block;\n \t\ttransition: var(--transition);\n\t}\n\t.hero__body {\n\t\theight:100%;\n\t}\n\n\t.hero__slot {\n\t\tpadding-left: 48px;\n\t\tpadding-top: 24px \n\t}\n\n\t.hero__img__container {\n\t\theight:var(--nile-hero-height);\n\t\toverflow:hidden;\n\t\twidth:max-content;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\tbottom:0;\n\t\ttransition:var(--transition);\n\t}\n\n\t.hero__img {\n\t\tobject-fit:cover;\n\t\theight:var(--nile-hero-height);\n\t\twidth:auto;\n\t}\n`;\n\nexport default [styles];"]}
@@ -13,7 +13,11 @@ import NileElement from '../internal/nile-element';
13
13
  *
14
14
  */
15
15
  export declare class NileHero extends NileElement {
16
+ heroContainer: HTMLElement;
17
+ heroHeader: HTMLElement;
18
+ imgContainer: HTMLElement;
16
19
  icon: string;
20
+ collapse: boolean;
17
21
  imgSrc: string;
18
22
  heroText: string;
19
23
  /**
@@ -21,6 +25,8 @@ export declare class NileHero extends NileElement {
21
25
  * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
22
26
  */
23
27
  static get styles(): CSSResultArray;
28
+ connectedCallback(): void;
29
+ updateOnCollapseChange(): void;
24
30
  /**
25
31
  * Render method
26
32
  * @slot This is a slot test
@@ -6,9 +6,10 @@
6
6
  */
7
7
  import { __decorate } from "tslib";
8
8
  import { html, property } from 'lit-element';
9
- import { customElement } from 'lit/decorators.js';
9
+ import { customElement, query } from 'lit/decorators.js';
10
10
  import { styles } from './nile-hero.css';
11
11
  import NileElement from '../internal/nile-element';
12
+ import { watch } from '../internal/watch';
12
13
  /**
13
14
  * Nile hero component.
14
15
  *
@@ -19,6 +20,7 @@ let NileHero = class NileHero extends NileElement {
19
20
  constructor() {
20
21
  super(...arguments);
21
22
  this.icon = 'action';
23
+ this.collapse = false;
22
24
  this.imgSrc = '';
23
25
  this.heroText = 'Nile Hero';
24
26
  /* #endregion */
@@ -31,39 +33,74 @@ let NileHero = class NileHero extends NileElement {
31
33
  return [styles];
32
34
  }
33
35
  /* #endregion */
36
+ connectedCallback() {
37
+ super.connectedCallback();
38
+ this.updateComplete.then(() => {
39
+ this.updateOnCollapseChange();
40
+ });
41
+ }
34
42
  /* #region Methods */
43
+ updateOnCollapseChange() {
44
+ if (!this.heroContainer)
45
+ return;
46
+ const heroHeaderHeight = this.heroHeader.scrollHeight;
47
+ if (this.collapse) {
48
+ this.heroContainer.style.height = heroHeaderHeight + 'px';
49
+ this.heroContainer.style.background = "var(--nile-hero-collapsed-background,#fff)";
50
+ this.heroContainer.style.borderBottom = "1px solid #EAECF0";
51
+ this.imgContainer.style.opacity = '0';
52
+ }
53
+ else {
54
+ this.heroContainer.style.height = "var(--nile-hero-height)";
55
+ this.heroContainer.style.background = "linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient) 0%, var( --nile-hero-color-bg-to-gradient) 100%)";
56
+ this.heroContainer.style.borderBottom = '';
57
+ this.imgContainer.style.opacity = '1';
58
+ }
59
+ }
35
60
  /**
36
61
  * Render method
37
62
  * @slot This is a slot test
38
63
  */
39
64
  render() {
40
65
  return html `
66
+ <div class="hero__container">
41
67
  <div class="hero__body">
42
- <div class="hero__header">
43
- <span class="icon__container">
44
- <nile-icon name="${this.icon}" ></nile-icon>
45
- </span>
46
- <span class="hero__text">${this.heroText}</span>
47
- </div>
68
+ <nile-hero-header hero-text="${this.heroText}" icon="${this.icon}"></nile-hero-header>
48
69
  <div class="hero__slot">
49
70
  <slot></slot>
50
71
  </div>
51
72
  </div>
52
- <div class="hero__img__container">
73
+ <div class="hero__img__container" id="hero__img__container">
53
74
  <img src="${this.imgSrc}" class="hero__img">
54
75
  </div>
76
+ </div>
55
77
  `;
56
78
  }
57
79
  };
80
+ __decorate([
81
+ query('.hero__container')
82
+ ], NileHero.prototype, "heroContainer", void 0);
83
+ __decorate([
84
+ query('nile-hero-header')
85
+ ], NileHero.prototype, "heroHeader", void 0);
86
+ __decorate([
87
+ query('.hero__img__container')
88
+ ], NileHero.prototype, "imgContainer", void 0);
58
89
  __decorate([
59
90
  property({ reflect: true })
60
91
  ], NileHero.prototype, "icon", void 0);
92
+ __decorate([
93
+ property({ reflect: true, type: Boolean })
94
+ ], NileHero.prototype, "collapse", void 0);
61
95
  __decorate([
62
96
  property({ reflect: true, attribute: 'img-src' })
63
97
  ], NileHero.prototype, "imgSrc", void 0);
64
98
  __decorate([
65
99
  property({ reflect: true, attribute: 'hero-text' })
66
100
  ], NileHero.prototype, "heroText", void 0);
101
+ __decorate([
102
+ watch('collapse')
103
+ ], NileHero.prototype, "updateOnCollapseChange", null);
67
104
  NileHero = __decorate([
68
105
  customElement('nile-hero')
69
106
  ], NileHero);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-hero.js","sourceRoot":"","sources":["../../../src/nile-hero/nile-hero.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QACoB,SAAI,GAAQ,QAAQ,CAAA;QACK,WAAM,GAAQ,EAAE,CAAC;QACf,aAAQ,GAAQ,WAAW,CAAC;QAqCjF,gBAAgB;IACjB,CAAC;IApCA;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;yBAIY,IAAI,CAAC,IAAI;;gCAEF,IAAI,CAAC,QAAQ;;;;;;;gBAO7B,IAAI,CAAC,MAAM;;GAExB,CAAC;IACH,CAAC;CAGD,CAAA;AAxC0B;IAAzB,QAAQ,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,CAAC;sCAAqB;AACK;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;wCAAkB;AACf;IAApD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;0CAA6B;AAHrE,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAyCpB;SAzCY,QAAQ;AA2CrB,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-hero.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile hero component.\n *\n * @tag nile-hero\n *\n */\n@customElement('nile-hero')\nexport class NileHero extends NileElement {\n\t@property({reflect:true}) icon:string='action'\n\t@property({ reflect: true, attribute: 'img-src' }) imgSrc:string='';\n\t@property({ reflect: true, attribute: 'hero-text' }) heroText:string='Nile Hero';\n\n\t/**\n\t * The styles for nile-hero\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t<div class=\"hero__body\">\n\t\t\t\t<div class=\"hero__header\">\n\t\t\t\t\t<span class=\"icon__container\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" ></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"hero__text\">${this.heroText}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"hero__slot\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"hero__img__container\">\n\t\t\t\t<img src=\"${this.imgSrc}\" class=\"hero__img\">\n\t\t\t</div>\n\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileHero;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-hero': NileHero;\n }\n}"]}
1
+ {"version":3,"file":"nile-hero.js","sourceRoot":"","sources":["../../../src/nile-hero/nile-hero.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAyC,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C;;;;;GAKG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;QAIuB,SAAI,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AA;;;mCAGsB,IAAI,CAAC,QAAQ,WAAW,IAAI,CAAC,IAAI;;;;;;gBAMpD,IAAI,CAAC,MAAM;;;GAGxB,CAAC;IACH,CAAC;CAGD,CAAA;AAhE2B;IAA1B,KAAK,CAAC,kBAAkB,CAAC;+CAA2B;AAC1B;IAA1B,KAAK,CAAC,kBAAkB,CAAC;4CAAwB;AAClB;IAA/B,KAAK,CAAC,uBAAuB,CAAC;8CAA0B;AAC5B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAAyB;AACT;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAA2B;AAEnB;IAAlD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;wCAAqB;AAClB;IAApD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;0CAAgC;AAoBpF;IADC,KAAK,CAAC,UAAU,CAAC;sDAgBjB;AA3CW,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAiEpB;SAjEY,QAAQ;AAmErB,eAAe,QAAQ,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult,nothing} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport {styles} from './nile-hero.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile hero component.\n *\n * @tag nile-hero\n *\n */\n@customElement('nile-hero')\nexport class NileHero extends NileElement {\n\t@query('.hero__container') heroContainer:HTMLElement;\n\t@query('nile-hero-header') heroHeader:HTMLElement;\n\t@query('.hero__img__container') imgContainer:HTMLElement;\n\t@property({ reflect: true }) icon: string = 'action';\n\t@property({ reflect: true, type: Boolean }) collapse: boolean = false;\n\t\n\t@property({ reflect: true, attribute: 'img-src' }) imgSrc: string = '';\n\t@property({ reflect: true, attribute: 'hero-text' }) heroText: string = 'Nile Hero';\n\n\t/**\n\t * The styles for nile-hero\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.updateOnCollapseChange();\n\t\t});\n\t}\n\t/* #region Methods */\n\n\t@watch('collapse')\n\tupdateOnCollapseChange(){\n\t\tif(!this.heroContainer) return;\n\t\tconst heroHeaderHeight=this.heroHeader.scrollHeight;\n\t\tif(this.collapse){\n\t\t\tthis.heroContainer.style.height=heroHeaderHeight+'px';\n\t\t\tthis.heroContainer.style.background=\"var(--nile-hero-collapsed-background,#fff)\";\n\t\t\tthis.heroContainer.style.borderBottom=\"1px solid #EAECF0\";\n\t\t\tthis.imgContainer.style.opacity='0';\n\t\t}\n\t\telse{\n\t\t\tthis.heroContainer.style.height=\"var(--nile-hero-height)\";\n\t\t\tthis.heroContainer.style.background=\"linear-gradient(180deg, var( --nile-hero-color-bg-from-gradient) 0%, var( --nile-hero-color-bg-to-gradient) 100%)\";\n\t\t\tthis.heroContainer.style.borderBottom='';\n\t\t\tthis.imgContainer.style.opacity='1';\n\t\t}\n\t}\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t<div class=\"hero__container\">\n\t\t\t<div class=\"hero__body\">\n\t\t\t\t<nile-hero-header hero-text=\"${this.heroText}\" icon=\"${this.icon}\"></nile-hero-header>\n\t\t\t\t<div class=\"hero__slot\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"hero__img__container\" id=\"hero__img__container\">\n\t\t\t\t<img src=\"${this.imgSrc}\" class=\"hero__img\">\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileHero;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-hero': NileHero;\n }\n}"]}
@@ -0,0 +1 @@
1
+ export { NileHeroHeader } from './nile-hero-header';
@@ -0,0 +1,2 @@
1
+ export { NileHeroHeader } from './nile-hero-header';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-hero-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { NileHeroHeader } from './nile-hero-header';"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ /**
8
+ * HeroHeader CSS
9
+ */
10
+ export declare const styles: import("lit-element").CSSResult;
11
+ declare const _default: import("lit-element").CSSResult[];
12
+ export default _default;