@nanoporetech-digital/components 2.10.1 → 2.11.0

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 (333) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/{date-utils-0ae9a12d.js → date-utils-b3af910d.js} +2 -2
  3. package/dist/cjs/date-utils-b3af910d.js.map +1 -0
  4. package/dist/cjs/{global-0d4f3b77.js → global-989678ec.js} +1 -8
  5. package/dist/cjs/global-989678ec.js.map +1 -0
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/nano-components.cjs.js +2 -2
  8. package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -1
  9. package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nano-date-input.cjs.entry.js +13 -5
  11. package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nano-date-picker.cjs.entry.js +2 -2
  13. package/dist/cjs/nano-date-picker.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nano-details.cjs.entry.js +1 -2
  15. package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -2
  17. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nano-grid_3.cjs.entry.js +1 -2
  19. package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nano-icon-button.cjs.entry.js +4 -0
  21. package/dist/cjs/nano-icon-button.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -2
  23. package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nano-slides.cjs.entry.js +1 -2
  25. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nano-sticker.cjs.entry.js +2 -3
  27. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nano-tab-group.cjs.entry.js +4 -2
  29. package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nano-tab.cjs.entry.js +5 -1
  31. package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
  33. package/dist/cjs/nano-tooltip.cjs.entry.js.map +1 -1
  34. package/dist/collection/components/accordion/accordion.js +1 -1
  35. package/dist/collection/components/alert/alert.js +1 -1
  36. package/dist/collection/components/algolia/algolia-filter.js +2 -2
  37. package/dist/collection/components/algolia/algolia-input.js +5 -5
  38. package/dist/collection/components/algolia/algolia-results.js +1 -1
  39. package/dist/collection/components/algolia/algolia.js +6 -6
  40. package/dist/collection/components/checkbox/checkbox-group.js +2 -2
  41. package/dist/collection/components/checkbox/checkbox.js +3 -3
  42. package/dist/collection/components/datalist/datalist.js +4 -2
  43. package/dist/collection/components/datalist/datalist.js.map +1 -1
  44. package/dist/collection/components/date-input/date-input.js +62 -11
  45. package/dist/collection/components/date-input/date-input.js.map +1 -1
  46. package/dist/collection/components/date-picker/date-picker.css +1 -1
  47. package/dist/collection/components/date-picker/date-picker.js +5 -5
  48. package/dist/collection/components/details/details.js +1 -2
  49. package/dist/collection/components/details/details.js.map +1 -1
  50. package/dist/collection/components/dialog/dialog.js +1 -1
  51. package/dist/collection/components/dropdown/dropdown.js +1 -1
  52. package/dist/collection/components/file-upload/file-upload.js +4 -4
  53. package/dist/collection/components/global-nav/global-nav.js +4 -4
  54. package/dist/collection/components/global-search-results/global-search-results.js +0 -1
  55. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  56. package/dist/collection/components/grid/grid-item.js +1 -1
  57. package/dist/collection/components/grid/grid.js +0 -1
  58. package/dist/collection/components/grid/grid.js.map +1 -1
  59. package/dist/collection/components/icon/icon.js +1 -1
  60. package/dist/collection/components/icon-button/icon-button.js +23 -1
  61. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  62. package/dist/collection/components/input/input.js +5 -5
  63. package/dist/collection/components/nav-item/nav-item.js +4 -4
  64. package/dist/collection/components/range/range.js +4 -4
  65. package/dist/collection/components/resize-observe/resize-observe.js +1 -2
  66. package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
  67. package/dist/collection/components/select/select.js +7 -7
  68. package/dist/collection/components/slides/slides.js +7 -8
  69. package/dist/collection/components/slides/slides.js.map +1 -1
  70. package/dist/collection/components/sticker/sticker.js +0 -1
  71. package/dist/collection/components/sticker/sticker.js.map +1 -1
  72. package/dist/collection/components/tabs/tab-group.js +5 -3
  73. package/dist/collection/components/tabs/tab-group.js.map +1 -1
  74. package/dist/collection/components/tabs/tab.js +5 -1
  75. package/dist/collection/components/tabs/tab.js.map +1 -1
  76. package/dist/collection/components/tooltip/tooltip.css +0 -1
  77. package/dist/collection/global/script/global.js +0 -7
  78. package/dist/collection/global/script/global.js.map +1 -1
  79. package/dist/collection/utils/date-utils.js +1 -1
  80. package/dist/collection/utils/date-utils.js.map +1 -1
  81. package/dist/components/datalist.js +3 -1
  82. package/dist/components/datalist.js.map +1 -1
  83. package/dist/components/date-picker.js +2 -2
  84. package/dist/components/date-picker.js.map +1 -1
  85. package/dist/components/grid.js +1 -2
  86. package/dist/components/grid.js.map +1 -1
  87. package/dist/components/icon-button.js +6 -1
  88. package/dist/components/icon-button.js.map +1 -1
  89. package/dist/components/index.js +0 -7
  90. package/dist/components/index.js.map +1 -1
  91. package/dist/components/nano-date-input.js +14 -4
  92. package/dist/components/nano-date-input.js.map +1 -1
  93. package/dist/components/nano-details.js +1 -2
  94. package/dist/components/nano-details.js.map +1 -1
  95. package/dist/components/nano-global-search-results.js +1 -2
  96. package/dist/components/nano-global-search-results.js.map +1 -1
  97. package/dist/components/nano-slides.js +1 -2
  98. package/dist/components/nano-slides.js.map +1 -1
  99. package/dist/components/nano-tab-group.js +4 -2
  100. package/dist/components/nano-tab-group.js.map +1 -1
  101. package/dist/components/nano-tab.js +5 -1
  102. package/dist/components/nano-tab.js.map +1 -1
  103. package/dist/components/resize-observe.js +1 -2
  104. package/dist/components/resize-observe.js.map +1 -1
  105. package/dist/components/sticker.js +2 -3
  106. package/dist/components/sticker.js.map +1 -1
  107. package/dist/components/tooltip.js +1 -1
  108. package/dist/components/tooltip.js.map +1 -1
  109. package/dist/custom-elements/index.js +41 -1938
  110. package/dist/custom-elements/index.js.map +1 -1
  111. package/dist/esm/{date-utils-e4b757ff.js → date-utils-839cb010.js} +2 -2
  112. package/dist/esm/date-utils-839cb010.js.map +1 -0
  113. package/dist/esm/{global-d5ec4d53.js → global-8047b4ff.js} +1 -8
  114. package/dist/esm/global-8047b4ff.js.map +1 -0
  115. package/dist/esm/loader.js +2 -2
  116. package/dist/esm/nano-components.js +2 -2
  117. package/dist/esm/nano-datalist_3.entry.js +3 -1
  118. package/dist/esm/nano-datalist_3.entry.js.map +1 -1
  119. package/dist/esm/nano-date-input.entry.js +13 -5
  120. package/dist/esm/nano-date-input.entry.js.map +1 -1
  121. package/dist/esm/nano-date-picker.entry.js +2 -2
  122. package/dist/esm/nano-date-picker.entry.js.map +1 -1
  123. package/dist/esm/nano-details.entry.js +1 -2
  124. package/dist/esm/nano-details.entry.js.map +1 -1
  125. package/dist/esm/nano-global-search-results.entry.js +1 -2
  126. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  127. package/dist/esm/nano-grid_3.entry.js +1 -2
  128. package/dist/esm/nano-grid_3.entry.js.map +1 -1
  129. package/dist/esm/nano-icon-button.entry.js +4 -0
  130. package/dist/esm/nano-icon-button.entry.js.map +1 -1
  131. package/dist/esm/nano-resize-observe_2.entry.js +1 -2
  132. package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
  133. package/dist/esm/nano-slides.entry.js +1 -2
  134. package/dist/esm/nano-slides.entry.js.map +1 -1
  135. package/dist/esm/nano-sticker.entry.js +2 -3
  136. package/dist/esm/nano-sticker.entry.js.map +1 -1
  137. package/dist/esm/nano-tab-group.entry.js +4 -2
  138. package/dist/esm/nano-tab-group.entry.js.map +1 -1
  139. package/dist/esm/nano-tab.entry.js +5 -1
  140. package/dist/esm/nano-tab.entry.js.map +1 -1
  141. package/dist/esm/nano-tooltip.entry.js +1 -1
  142. package/dist/esm/nano-tooltip.entry.js.map +1 -1
  143. package/dist/esm-es5/date-utils-839cb010.js +5 -0
  144. package/dist/esm-es5/date-utils-839cb010.js.map +1 -0
  145. package/dist/esm-es5/{global-d5ec4d53.js → global-8047b4ff.js} +2 -2
  146. package/dist/esm-es5/global-8047b4ff.js.map +1 -0
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/loader.js.map +1 -1
  149. package/dist/esm-es5/nano-components.js +1 -1
  150. package/dist/esm-es5/nano-components.js.map +1 -1
  151. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  152. package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
  153. package/dist/esm-es5/nano-date-input.entry.js +1 -1
  154. package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
  155. package/dist/esm-es5/nano-date-picker.entry.js +1 -1
  156. package/dist/esm-es5/nano-date-picker.entry.js.map +1 -1
  157. package/dist/esm-es5/nano-details.entry.js +1 -1
  158. package/dist/esm-es5/nano-details.entry.js.map +1 -1
  159. package/dist/esm-es5/nano-global-search-results.entry.js +1 -1
  160. package/dist/esm-es5/nano-global-search-results.entry.js.map +1 -1
  161. package/dist/esm-es5/nano-grid_3.entry.js +1 -1
  162. package/dist/esm-es5/nano-grid_3.entry.js.map +1 -1
  163. package/dist/esm-es5/nano-icon-button.entry.js +2 -2
  164. package/dist/esm-es5/nano-icon-button.entry.js.map +1 -1
  165. package/dist/esm-es5/nano-resize-observe_2.entry.js +1 -1
  166. package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
  167. package/dist/esm-es5/nano-slides.entry.js +2 -2
  168. package/dist/esm-es5/nano-slides.entry.js.map +1 -1
  169. package/dist/esm-es5/nano-sticker.entry.js +1 -1
  170. package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
  171. package/dist/esm-es5/nano-tab-group.entry.js +2 -2
  172. package/dist/esm-es5/nano-tab-group.entry.js.map +1 -1
  173. package/dist/esm-es5/nano-tab.entry.js +2 -2
  174. package/dist/esm-es5/nano-tab.entry.js.map +1 -1
  175. package/dist/esm-es5/nano-tooltip.entry.js +1 -1
  176. package/dist/esm-es5/nano-tooltip.entry.js.map +1 -1
  177. package/dist/nano-components/nano-components.esm.js +1 -1
  178. package/dist/nano-components/nano-components.esm.js.map +1 -1
  179. package/dist/nano-components/nano-components.js +1 -1
  180. package/dist/nano-components/p-0193a282.entry.js +5 -0
  181. package/dist/nano-components/p-0193a282.entry.js.map +1 -0
  182. package/dist/nano-components/p-0320410c.entry.js +5 -0
  183. package/dist/nano-components/p-0320410c.entry.js.map +1 -0
  184. package/dist/nano-components/p-2720ee8f.entry.js +5 -0
  185. package/dist/nano-components/p-2720ee8f.entry.js.map +1 -0
  186. package/dist/nano-components/p-32900c91.entry.js +5 -0
  187. package/dist/nano-components/p-32900c91.entry.js.map +1 -0
  188. package/dist/nano-components/p-33fce1a6.js +5 -0
  189. package/dist/nano-components/p-33fce1a6.js.map +1 -0
  190. package/dist/nano-components/p-371aebe7.system.entry.js +23 -0
  191. package/dist/nano-components/p-371aebe7.system.entry.js.map +1 -0
  192. package/dist/nano-components/p-41899a31.system.entry.js +5 -0
  193. package/dist/nano-components/p-41899a31.system.entry.js.map +1 -0
  194. package/dist/nano-components/p-53957ec6.system.js +5 -0
  195. package/dist/nano-components/{p-e7140887.system.js.map → p-53957ec6.system.js.map} +1 -1
  196. package/dist/nano-components/p-561500f0.system.entry.js +5 -0
  197. package/dist/nano-components/p-561500f0.system.entry.js.map +1 -0
  198. package/dist/nano-components/p-70272eae.js +5 -0
  199. package/dist/nano-components/p-70272eae.js.map +1 -0
  200. package/dist/nano-components/p-755d9227.entry.js +5 -0
  201. package/dist/nano-components/p-755d9227.entry.js.map +1 -0
  202. package/dist/nano-components/p-7bd25494.entry.js +5 -0
  203. package/dist/nano-components/p-7bd25494.entry.js.map +1 -0
  204. package/dist/nano-components/p-7c837460.entry.js +5 -0
  205. package/dist/nano-components/p-7c837460.entry.js.map +1 -0
  206. package/dist/nano-components/{p-93880c28.system.js → p-82e28afd.system.js} +2 -2
  207. package/dist/nano-components/p-82e28afd.system.js.map +1 -0
  208. package/dist/nano-components/p-8378428e.system.js +5 -0
  209. package/dist/nano-components/p-8378428e.system.js.map +1 -0
  210. package/dist/nano-components/p-8df4f125.system.entry.js +5 -0
  211. package/dist/nano-components/p-8df4f125.system.entry.js.map +1 -0
  212. package/dist/nano-components/{p-d0385948.system.entry.js → p-93596c3d.system.entry.js} +2 -2
  213. package/dist/nano-components/p-93596c3d.system.entry.js.map +1 -0
  214. package/dist/nano-components/{p-3e930ac7.entry.js → p-9d9b0b66.entry.js} +2 -2
  215. package/dist/nano-components/p-9d9b0b66.entry.js.map +1 -0
  216. package/dist/nano-components/p-9ffdf6cc.entry.js +5 -0
  217. package/dist/nano-components/{p-222d8095.entry.js.map → p-9ffdf6cc.entry.js.map} +1 -1
  218. package/dist/nano-components/p-a1444980.entry.js +5 -0
  219. package/dist/nano-components/p-a1444980.entry.js.map +1 -0
  220. package/dist/nano-components/p-aa84c727.system.entry.js +5 -0
  221. package/dist/nano-components/p-aa84c727.system.entry.js.map +1 -0
  222. package/dist/nano-components/p-ac5e3775.system.entry.js +5 -0
  223. package/dist/nano-components/p-ac5e3775.system.entry.js.map +1 -0
  224. package/dist/nano-components/p-b85cf493.system.entry.js +5 -0
  225. package/dist/nano-components/{p-e817ab4a.system.entry.js.map → p-b85cf493.system.entry.js.map} +1 -1
  226. package/dist/nano-components/{p-1030797a.entry.js → p-d37e1489.entry.js} +2 -2
  227. package/dist/nano-components/p-d37e1489.entry.js.map +1 -0
  228. package/dist/nano-components/p-d61ae833.system.entry.js +5 -0
  229. package/dist/nano-components/p-d61ae833.system.entry.js.map +1 -0
  230. package/dist/nano-components/p-d93274de.entry.js +5 -0
  231. package/dist/nano-components/p-d93274de.entry.js.map +1 -0
  232. package/dist/nano-components/p-da88981f.entry.js +23 -0
  233. package/dist/nano-components/p-da88981f.entry.js.map +1 -0
  234. package/dist/nano-components/p-e8a913ac.system.entry.js +5 -0
  235. package/dist/nano-components/p-e8a913ac.system.entry.js.map +1 -0
  236. package/dist/nano-components/p-e9a279ee.system.entry.js +5 -0
  237. package/dist/nano-components/p-e9a279ee.system.entry.js.map +1 -0
  238. package/dist/nano-components/p-faba2fc1.system.entry.js +5 -0
  239. package/dist/nano-components/p-faba2fc1.system.entry.js.map +1 -0
  240. package/dist/nano-components/p-ff026352.system.entry.js +5 -0
  241. package/dist/nano-components/p-ff026352.system.entry.js.map +1 -0
  242. package/dist/types/components/date-input/date-input.d.ts +6 -1
  243. package/dist/types/components/icon-button/icon-button.d.ts +2 -0
  244. package/dist/types/components/tabs/tab.d.ts +1 -0
  245. package/dist/types/components.d.ts +20 -0
  246. package/docs-json.json +54 -2
  247. package/package.json +2 -4
  248. package/dist/cjs/ResizeObserver.es-09b81a1b.js +0 -935
  249. package/dist/cjs/ResizeObserver.es-09b81a1b.js.map +0 -1
  250. package/dist/cjs/date-utils-0ae9a12d.js.map +0 -1
  251. package/dist/cjs/global-0d4f3b77.js.map +0 -1
  252. package/dist/cjs/intersection-observer-1822c787.js +0 -987
  253. package/dist/cjs/intersection-observer-1822c787.js.map +0 -1
  254. package/dist/components/ResizeObserver.es.js +0 -933
  255. package/dist/components/ResizeObserver.es.js.map +0 -1
  256. package/dist/components/intersection-observer.js +0 -985
  257. package/dist/components/intersection-observer.js.map +0 -1
  258. package/dist/esm/ResizeObserver.es-724af9fd.js +0 -933
  259. package/dist/esm/ResizeObserver.es-724af9fd.js.map +0 -1
  260. package/dist/esm/date-utils-e4b757ff.js.map +0 -1
  261. package/dist/esm/global-d5ec4d53.js.map +0 -1
  262. package/dist/esm/intersection-observer-dff9fb5b.js +0 -985
  263. package/dist/esm/intersection-observer-dff9fb5b.js.map +0 -1
  264. package/dist/esm-es5/ResizeObserver.es-724af9fd.js +0 -5
  265. package/dist/esm-es5/ResizeObserver.es-724af9fd.js.map +0 -1
  266. package/dist/esm-es5/date-utils-e4b757ff.js +0 -5
  267. package/dist/esm-es5/date-utils-e4b757ff.js.map +0 -1
  268. package/dist/esm-es5/global-d5ec4d53.js.map +0 -1
  269. package/dist/esm-es5/intersection-observer-dff9fb5b.js +0 -5
  270. package/dist/esm-es5/intersection-observer-dff9fb5b.js.map +0 -1
  271. package/dist/nano-components/p-00eaa36a.entry.js +0 -5
  272. package/dist/nano-components/p-00eaa36a.entry.js.map +0 -1
  273. package/dist/nano-components/p-1030797a.entry.js.map +0 -1
  274. package/dist/nano-components/p-11a2dcce.js +0 -5
  275. package/dist/nano-components/p-11a2dcce.js.map +0 -1
  276. package/dist/nano-components/p-1a30dfdd.system.entry.js +0 -5
  277. package/dist/nano-components/p-1a30dfdd.system.entry.js.map +0 -1
  278. package/dist/nano-components/p-222d8095.entry.js +0 -5
  279. package/dist/nano-components/p-241d90eb.system.entry.js +0 -5
  280. package/dist/nano-components/p-241d90eb.system.entry.js.map +0 -1
  281. package/dist/nano-components/p-2c8d7273.entry.js +0 -5
  282. package/dist/nano-components/p-2c8d7273.entry.js.map +0 -1
  283. package/dist/nano-components/p-3093915f.entry.js +0 -5
  284. package/dist/nano-components/p-3093915f.entry.js.map +0 -1
  285. package/dist/nano-components/p-325c1cad.entry.js +0 -5
  286. package/dist/nano-components/p-325c1cad.entry.js.map +0 -1
  287. package/dist/nano-components/p-32f396c0.system.entry.js +0 -5
  288. package/dist/nano-components/p-32f396c0.system.entry.js.map +0 -1
  289. package/dist/nano-components/p-35108e08.entry.js +0 -5
  290. package/dist/nano-components/p-35108e08.entry.js.map +0 -1
  291. package/dist/nano-components/p-3ccb176c.system.entry.js +0 -5
  292. package/dist/nano-components/p-3ccb176c.system.entry.js.map +0 -1
  293. package/dist/nano-components/p-3e930ac7.entry.js.map +0 -1
  294. package/dist/nano-components/p-42cebbfe.system.entry.js +0 -5
  295. package/dist/nano-components/p-42cebbfe.system.entry.js.map +0 -1
  296. package/dist/nano-components/p-5d17cfbb.system.entry.js +0 -23
  297. package/dist/nano-components/p-5d17cfbb.system.entry.js.map +0 -1
  298. package/dist/nano-components/p-5d5ea4ab.system.entry.js +0 -5
  299. package/dist/nano-components/p-5d5ea4ab.system.entry.js.map +0 -1
  300. package/dist/nano-components/p-6722447c.entry.js +0 -5
  301. package/dist/nano-components/p-6722447c.entry.js.map +0 -1
  302. package/dist/nano-components/p-6d138abf.entry.js +0 -5
  303. package/dist/nano-components/p-6d138abf.entry.js.map +0 -1
  304. package/dist/nano-components/p-76d9d1d4.entry.js +0 -5
  305. package/dist/nano-components/p-76d9d1d4.entry.js.map +0 -1
  306. package/dist/nano-components/p-866f083f.system.entry.js +0 -5
  307. package/dist/nano-components/p-866f083f.system.entry.js.map +0 -1
  308. package/dist/nano-components/p-88779174.system.entry.js +0 -5
  309. package/dist/nano-components/p-88779174.system.entry.js.map +0 -1
  310. package/dist/nano-components/p-93880c28.system.js.map +0 -1
  311. package/dist/nano-components/p-97b13ad2.entry.js +0 -5
  312. package/dist/nano-components/p-97b13ad2.entry.js.map +0 -1
  313. package/dist/nano-components/p-b430a9b6.system.js +0 -5
  314. package/dist/nano-components/p-b430a9b6.system.js.map +0 -1
  315. package/dist/nano-components/p-d0385948.system.entry.js.map +0 -1
  316. package/dist/nano-components/p-debd9efc.js +0 -5
  317. package/dist/nano-components/p-debd9efc.js.map +0 -1
  318. package/dist/nano-components/p-e195ab77.system.js +0 -5
  319. package/dist/nano-components/p-e195ab77.system.js.map +0 -1
  320. package/dist/nano-components/p-e7140887.system.js +0 -5
  321. package/dist/nano-components/p-e817ab4a.system.entry.js +0 -5
  322. package/dist/nano-components/p-f5d4d13b.system.js +0 -5
  323. package/dist/nano-components/p-f5d4d13b.system.js.map +0 -1
  324. package/dist/nano-components/p-f66958c1.js +0 -5
  325. package/dist/nano-components/p-f66958c1.js.map +0 -1
  326. package/dist/nano-components/p-f710c763.system.entry.js +0 -5
  327. package/dist/nano-components/p-f710c763.system.entry.js.map +0 -1
  328. package/dist/nano-components/p-f9c7d961.js +0 -5
  329. package/dist/nano-components/p-f9c7d961.js.map +0 -1
  330. package/dist/nano-components/p-ffc2063a.entry.js +0 -23
  331. package/dist/nano-components/p-ffc2063a.entry.js.map +0 -1
  332. package/dist/nano-components/p-fff27907.system.entry.js +0 -5
  333. package/dist/nano-components/p-fff27907.system.entry.js.map +0 -1
@@ -1,5 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function r(t){try{h(s.next(t))}catch(e){o(e)}}function c(t){try{h(s["throw"](t))}catch(e){o(e)}}function h(t){t.done?i(t.value):n(t.value).then(r,c)}h((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,n,o,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return h([t,e])}}function h(r){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(o=r[0]&2?n["return"]:r[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;if(n=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;n=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){i.label=r[1];break}if(r[0]===6&&i.label<o[1]){i.label=o[1];o=r;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(r);break}if(o[2])i.ops.pop();i.trys.pop();continue}r=e.call(t,i)}catch(c){r=[6,c];n=0}finally{s=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
2
- /*!
3
- * Web Components for Nanopore digital Web Apps
4
- */System.register(["./p-f48be9f5.system.js","./p-b430a9b6.system.js","./p-1c216ca4.system.js","./p-1d13dbdf.system.js","./p-ef053a2f.system.js"],(function(t){"use strict";var e,i,s,n,o,r,c,h,a,l,u;return{setters:[function(t){e=t.r;i=t.c;s=t.h;n=t.e;o=t.g},function(t){r=t.i},function(t){c=t.r;h=t.h;a=t.b},function(t){l=t.a},function(t){u=t.d}],execute:function(){var f=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-layer-index-menubar, 10);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-width:100%}:host([sticky]){position:-webkit-sticky;position:sticky;-webkit-transition:0.3s ease transform;transition:0.3s ease transform;will-change:min-height}:host([sticky][stuck]){left:var(--stuck-left);right:var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){-webkit-transform:var(--top-hide);transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){-webkit-transform:var(--bottom-hide);transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-width:inherit;width:100%}.sticker:not(.stuck){width:auto !important}.sticker.sticky{-webkit-transition:0.3s ease all;transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;left:var(--stuck-left);right:var(--stuck-right);z-index:var(--stuck-z-index);-webkit-transform:translateY(0);transform:translateY(0)}:host([placed-top]) .sticker.stuck{top:0}:host([placed-bottom]) .sticker.stuck{bottom:0}:host([placed-top]) .sticker.stuck.hide{-webkit-transform:var(--top-hide);transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{-webkit-transform:var(--bottom-hide);transform:var(--bottom-hide)}.sticker-content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}';function d(t){return t instanceof Document?window.pageYOffset:t.scrollTop}function p(t,e){var i=e instanceof Document?document.documentElement:e;return l(t,i)}var k=t("nano_sticker",function(){function t(t){var s=this;e(this,t);this.nanoStuck=i(this,"nanoStuck",7);this.nanoUnstuck=i(this,"nanoUnstuck",7);this.nanoHide=i(this,"nanoHide",7);this.nanoShow=i(this,"nanoShow",7);this.isRtl=false;this.scrollPosCache=0;this.scrollPosThresholdCache=0;this.cacheOffset=0;this.pauseResizeWatcher=false;this.listenForScrollParent=false;this.positions=[];this.pauseHide=false;this.hasBootstrapped=false;this.isStuck=false;this.isRootSticker=true;this.hide=false;this.scrollHide=false;this.multiStickerHide=false;this.scrollingTo=false;this.quietModeIsOn=false;this.stuckCounter=0;this.stickerIndex=0;this._offset=0;this.autoResize=true;this.isSticky=true;this.offset=0;this.position="top";this.quietMode={h:600,w:600};this.hideOnNewStickers=true;this.breakPointMax=null;this.breakPointMin=null;this.setupParentResizeListener=function(){if(s.parentSizeObserver){s.parentSizeObserver.disconnect();s.parentSizeObserver=undefined}s.parentSizeObserver=new r((function(t){for(var e=0,i=t;e<i.length;e++){var n=i[e];var o=void 0,r=void 0;if(n.contentRect.height)o=n.contentRect.height;if(n.contentRect.width)r=n.contentRect.width;if(typeof s.quietMode==="object"){if(r<s.quietMode.w||o<s.quietMode.h)s.quietModeIsOn=true;else s.quietModeIsOn=false}if(s.breakPointMin){if(r>s.breakPointMin)s.isSticky=true;else s.isSticky=false}if(s.breakPointMax){if(r<s.breakPointMax)s.isSticky=true;else s.isSticky=false}if(s.isRootSticker&&s.sticker&&s.autoResize)s.sticker.style.width=s.host.scrollWidth+"px"}}));var t=s.scrollParent instanceof Document?s.scrollParent.documentElement:s.scrollParent;if(t)s.parentSizeObserver.observe(t)};this.onStickToDisplayEvent=function(t){if(t.detail.sticker!==s.stickToEle)return;switch(t.type){case"nanoHide":s._offset=0;s.cacheOffset=s.offset;s.offset=0;if(!s.isStuck)s.moveTrigger(false);if(!s.isRootSticker&&s.quietModeIsOn){c((function(){s.stickToEle.style.minHeight=s.stickToEleInitSize.height+(s.host.scrollHeight+(typeof s.cacheOffset==="object"?s.cacheOffset.v:s.cacheOffset))+"px";s.stickToEle.setTriggerPos(s.stickToEleInitSize.height*-1)}))}break;case"nanoShow":s._offset=s.stickToEleInitSize.height;s.offset=s.cacheOffset;s.moveTrigger(true);if(!s.isRootSticker&&s.quietModeIsOn){c((function(){s.stickToEle.style.minHeight="";s.stickToEle.setTriggerPos(0)}))}break;case"nanoStuck":s.stickToEleInitSize=s.stickToEle.getBoundingClientRect();s._offset=s.stickToEleInitSize.height;break}};this.onStickEvent=function(t){return __awaiter(s,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail?t.detail.sticker:null;if(!e||e.position!==this.position)return[2];return[4,e.getTriggerPos()];case 1:i=s.sent();if(t.type==="nanoStuck"&&e!==this.host&&e.scrollParent===this.host.scrollParent){this.stickerIndex++;if(!this.hideOnNewStickers)return[2];if(this.positions.includes("top")&&this.triggerPos.top<i.top||this.positions.includes("bottom")&&this.triggerPos.top>i.top){this.multiStickerHide=true;this.stuckCounter++}}if(t.type==="nanoUnstuck"&&e!==this.host&&e.scrollParent===this.host.scrollParent){this.stickerIndex--;if(!this.hideOnNewStickers)return[2];if(this.positions.includes("top")&&this.triggerPos.top<i.top||this.positions.includes("bottom")&&this.triggerPos.top>i.top){this.stuckCounter--;if(this.stuckCounter<1)this.multiStickerHide=false}}return[2]}}))}))};this.onScroll=function(){var t=d(s.scrollParent);if(t<s.scrollPosCache){if(!s.positions.includes("bottom"))s.handleScrollTo();else s.handleScrollAway(t)}if(t>s.scrollPosCache){if(!s.positions.includes("bottom"))s.handleScrollAway(t);else s.handleScrollTo()}s.scrollPosCache=t}}t.prototype.isHiding=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.hide]}))}))};t.prototype.isSticking=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.shouldStick();return[2,this.isStuck]}))}))};t.prototype.setTriggerPos=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this._offset=t]}))}))};t.prototype.getTriggerPos=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.triggerPos]}))}))};t.prototype.pauseHiding=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.pauseHide=t]}))}))};t.prototype.updateTriggerOffset=function(){if(!this.trigger||!this.scrollParent||!this.listenForScrollParent)return;this.triggerPos=p(this.trigger,this.scrollParent)};t.prototype.stickerResizeListener=function(){var t=this;if(this.contentSizeObserver){this.contentSizeObserver.disconnect();this.contentSizeObserver=undefined}this.contentSizeObserver=new r((function(e){for(var i=0,s=e;i<s.length;i++){var n=s[i];if(t.pauseResizeWatcher)return;if(n.contentRect.height){if(t.position==="top")t.host.style.height=n.contentRect.height+"px";if(t.position==="bottom")t.host.style.minHeight=n.contentRect.height+"px"}}}));this.contentSizeObserver.observe(this.content)};t.prototype.quietModeChange=function(){var t=this;if(this.quietMode==="on")c((function(){return t.quietModeIsOn=true}));else if(this.quietMode==="off")c((function(){return t.quietModeIsOn=false}))};t.prototype.setOffset=function(){var t,e,i,s;var n=this;this.trigger.setAttribute("style","");var o,r,c,h;var l=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!l)return;if(typeof this.offset==="object")t=this.offset,o=t.v,r=t.h;else o=r=this.offset;if(typeof this._offset==="object")e=this._offset,i=e.v,o=i===void 0?c:i,s=e.h,r=s===void 0?h:s;else c=h=this._offset;var u=function(t){var e=t.match(/(top|bottom)/)?o:r;f(t);l.style[t]=e+"px";if(!a())return;if(e)n.host.style.setProperty("--hide-transform-amount","(110% + "+e+"px)");else n.host.style.setProperty("--hide-transform-amount",null)};var f=function(t){var e=t.match(/(top|bottom)/)?o+c:r+h;n.trigger.style[t]=e*-1+"px";n.trigger.style.position="relative";n.trigger.style.height="1px"};if(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)u("right");if(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)u("left");if(this.positions.includes("top"))u("top");if(this.positions.includes("bottom"))u("bottom")};t.prototype.positionChange=function(){this.positions=this.position.split("-");this.setOffset()};t.prototype.stuckChange=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){if(this.isStuck){if(this.stickToEle){t=h(this.host)?this.host.children:this.content.children;this.slottedContent=Array.from(t);this.slottedContent.forEach((function(t){if(h(e.host))e.stickToEle.appendChild(t);else e.stickToEle.querySelector(".sticker-content").appendChild(t);t.style.order=e.stickerIndex+""}));this.nanoStuck.emit({sticker:this.stickToEle})}else this.nanoStuck.emit({sticker:this.host})}else{this.scrollHide=false;if(this.stickToEle){this.slottedContent.forEach((function(t){e.host.appendChild(t);t.style.order=""}));this.nanoUnstuck.emit({sticker:this.stickToEle})}else this.nanoUnstuck.emit({sticker:this.host})}return[2]}))}))};t.prototype.attachScrollListeners=function(){if(this.quietModeIsOn)this.scrollParent.addEventListener("scroll",this.onScroll,{passive:true,capture:false});else if(this.scrollParent){this.scrollParent.removeEventListener("scroll",this.onScroll);this.moveTrigger(true)}};t.prototype.handleParentEvents=function(t,e){if(e===void 0){e=null}if(!this.listenForScrollParent)return;if(e)this.manageListenersOnParent(false,e);if(this.scrollParent)this.manageListenersOnParent(!this.stickToEle)};t.prototype.stickToEleChange=function(t,e){if(this.stickToEle){this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)}if(e){e.removeEventListener("nanoHide",this.onStickToDisplayEvent);e.removeEventListener("nanoShow",this.onStickToDisplayEvent);e.removeEventListener("nanoStuck",this.onStickToDisplayEvent);e.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent)}};t.prototype.stickToChange=function(){if(this.stickTo)this.stickToEle=this.scrollParent.querySelector(this.stickTo);else this.stickToEle=undefined};t.prototype.visibilityDecisionHandler=function(){if(this.multiStickerHide||this.scrollHide)this.hide=true;else this.hide=false};t.prototype.handleHideChange=function(){if(this.hide)this.nanoHide.emit({sticker:this.host});else this.nanoShow.emit({sticker:this.host})};t.prototype.setupIO=function(){var t=this;if(this.io){this.io.disconnect();this.io=undefined}if(!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;var e=this.scrollParent;if(this.scrollParent instanceof Document)e=null;this.io=new window.IntersectionObserver((function(e){if(t.pauseResizeWatcher||!t.isSticky)return;t.shouldStick(e.slice(-1)[0])}),{root:e});this.io.observe(this.trigger)};t.prototype.manageListenersOnParent=function(t,e){var i=e||this.scrollParent;if(!i)return;if(!t){try{if(this.quietModeIsOn)i.removeEventListener("scroll",this.onScroll);i.removeEventListener("nanoStuck",this.onStickEvent);i.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(s){console.error("Events haven`t been added")}}else{i.addEventListener("nanoStuck",this.onStickEvent);i.addEventListener("nanoUnstuck",this.onStickEvent);if(this.quietModeIsOn)this.attachScrollListeners()}this.setupParentResizeListener()};t.prototype.handleScrollTo=function(){this.scrollPosThresholdCache=null;if(!this.scrollHide)return;if(this.scrollingTo!==true){this._offset=this.cacheOffset||this._offset}this.scrollingTo=true;this.scrollHide=false};t.prototype.handleScrollAway=function(t){if(this.scrollHide)return;if(!this.isStuck)return;if(this.scrollingTo!==false){this.cacheOffset=this._offset;this._offset=0}this.scrollingTo=false;if(!this.scrollPosThresholdCache)this.scrollPosThresholdCache=t;else if(!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100)this.scrollHide=true};t.prototype.moveTrigger=function(t){if(this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t){this.host.parentNode.insertBefore(this.trigger,this.host)}else this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)};t.prototype.getScrollParent=function(){var t=/(auto|scroll)/;var e=function(t,i){if(t.parentNode===null){return i}return e(t.parentNode,i.concat([t]))};var i=function(t,e){return getComputedStyle(t,null).getPropertyValue(e)};var s=function(t){return i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")};var n=function(e){return t.test(s(e))};var o=document.documentElement.getBoundingClientRect().height;var r=function(t){if(!(t instanceof HTMLElement))return;var i=e(t,[]);return i.find((function(t){return n(t)&&t.getBoundingClientRect().height!==o}))||document};return r(this.host)};t.prototype.shouldStick=function(t){var e;if(this.positions.includes("top")){if(!this.isRootSticker)e=p(this.trigger,this.scrollParent).top;else e=this.trigger.getBoundingClientRect().top;this.isStuck=e<-1}else if(this.positions.includes("bottom")){e=this.trigger.getBoundingClientRect().top;var i=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=e>i.height+i.top}};t.prototype.bootstrapGurantor=function(){var t=this;this.hasBootstrapped=true;this.scrollParent=this.scrollParent||this.getScrollParent();this.isRootSticker=this.scrollParent instanceof Document;this.trigger=this.trigger||document.createElement("div");this.trigger.classList.add("sticker-trigger");this.positionChange();this.moveTrigger(true);this.quietModeChange();this.listenForScrollParent=true;this.handleParentEvents(true);this.stickerIndex=Array.from(this.scrollParent.querySelectorAll("nano-sticker")).filter((function(e){return e.position===t.position})).findIndex((function(e){return e===t.host}));this.setOffset();this.stickerResizeListener();this.setupParentResizeListener();this.slottedContent=Array.from(this.host.children);this.slottedContent.forEach((function(e){e.style.order=t.stickerIndex+""}));this.updateTriggerOffset();this.stickToChange();this.setupIO();this.onStickToDisplayEvent=u(this.onStickToDisplayEvent,50)};t.prototype.connectedCallback=function(){var t=this;this.isRtl=this.host.dir==="rtl"||this.host.ownerDocument.dir==="rtl";document.documentElement.addEventListener("nanoComponentsReady",(function(){setTimeout((function(e){return t.bootstrapGurantor()}),200)}));setTimeout((function(e){if(!t.hasBootstrapped)t.bootstrapGurantor()}),1e3)};t.prototype.disconnectedCallback=function(){if(this.io){this.io.disconnect();this.io=undefined}if(this.parentSizeObserver){this.parentSizeObserver.disconnect();this.parentSizeObserver=undefined}this.scrollParent=null;this.hasBootstrapped=false};t.prototype.render=function(){var t=this;return s(n,{sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start")},s("div",{class:{sticker:true,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:function(e){return t.sticker=e}},s("div",{class:"sticker-content",ref:function(e){return t.content=e}},s("slot",null))))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}},enumerable:false,configurable:true});return t}());k.style=f}}}));
5
- //# sourceMappingURL=p-1a30dfdd.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/sticker/sticker.scss?tag=nano-sticker&encapsulation=shadow","src/components/sticker/sticker.tsx"],"names":["stickerCss","_getScrollTop","ele","Document","window","pageYOffset","scrollTop","_getOffset","parent","parentEle","document","documentElement","getOffset","Sticker","exports","class_1","hostRef","_this","this","isRtl","scrollPosCache","scrollPosThresholdCache","cacheOffset","pauseResizeWatcher","listenForScrollParent","positions","pauseHide","hasBootstrapped","isStuck","isRootSticker","hide","scrollHide","multiStickerHide","scrollingTo","quietModeIsOn","stuckCounter","stickerIndex","_offset","autoResize","isSticky","offset","position","quietMode","h","w","hideOnNewStickers","breakPointMax","breakPointMin","setupParentResizeListener","parentSizeObserver","disconnect","undefined","ResizeObserver","entries","_i","entries_1","length","entry","height","width","contentRect","sticker","style","host","scrollWidth","toWatch","scrollParent","observe","onStickToDisplayEvent","e","detail","stickToEle","type","moveTrigger","raf","minHeight","stickToEleInitSize","scrollHeight","v","setTriggerPos","getBoundingClientRect","onStickEvent","__awaiter","getTriggerPos","incomingTriggerPos","_a","sent","includes","triggerPos","top","onScroll","y","handleScrollTo","handleScrollAway","prototype","isHiding","isSticking","shouldStick","pauseHiding","pause","updateTriggerOffset","trigger","stickerResizeListener","contentSizeObserver","entries_2","content","quietModeChange","setOffset","setAttribute","_v","_h","_b","_c","_d","setPos","pos","u","match","setTriggetPos","browserCanUseCssVariables","setProperty","positionChange","split","stuckChange","hasShadowDom","children","slottedContent","Array","from","forEach","child","appendChild","querySelector","order","nanoStuck","emit","nanoUnstuck","attachScrollListeners","addEventListener","passive","capture","removeEventListener","handleParentEvents","_","oldParent","manageListenersOnParent","stickToEleChange","oldEle","stickToChange","stickTo","visibilityDecisionHandler","handleHideChange","nanoHide","nanoShow","setupIO","io","root","IntersectionObserver","slice","addEvents","console","error","currScroll","Math","abs","toInitial","parentNode","insertBefore","nextSibling","getScrollParent","regex","parents","_node","ps","concat","prop","getComputedStyle","getPropertyValue","overflow","scroll","test","docHeight","HTMLElement","find","data","scrollAmt","parentBounding","rootBounds","bootstrapGurantor","createElement","classList","add","querySelectorAll","filter","findIndex","debounce","connectedCallback","dir","ownerDocument","setTimeout","disconnectedCallback","render","Host","sticky","siblings","index","stuck","placed-bottom","placed-top","placed-end","placed-start","class","ref","div"],"mappings":";;;6WAAA,IAAMA,EAAa,2tECsBnB,SAASC,EAAcC,GACrB,OAAOA,aAAeC,SAAWC,OAAOC,YAAcH,EAAII,UAG5D,SAASC,EAAWL,EAAkBM,GACpC,IAAIC,EACFD,aAAkBL,SAAWO,SAASC,gBAAkBH,EAC1D,OAAOI,EAAUV,EAAKO,OAcXI,EAAOC,EAAA,eAAA,WALpB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,mKAMUA,KAAAC,MAAiB,MAMjBD,KAAAE,eAAiB,EACjBF,KAAAG,wBAA0B,EAC1BH,KAAAI,YAAiD,EAEjDJ,KAAAK,mBAAqB,MACrBL,KAAAM,sBAAwB,MAExBN,KAAAO,UAAyB,GACzBP,KAAAQ,UAAqB,MACrBR,KAAAS,gBAAkB,MAMjBT,KAAAU,QAAU,MACVV,KAAAW,cAAgB,KAChBX,KAAAY,KAAO,MACPZ,KAAAa,WAAa,MACbb,KAAAc,iBAAmB,MACnBd,KAAAe,YAAc,MACdf,KAAAgB,cAAgB,MAChBhB,KAAAiB,aAAe,EACfjB,KAAAkB,aAAe,EAIflB,KAAAmB,QAA6C,EAK9CnB,KAAAoB,WAAa,KAGIpB,KAAAqB,SAAW,KAGXrB,KAAAsB,OAA4C,EAG7DtB,KAAAuB,SAA6B,MAM7BvB,KAAAwB,UAAqD,CAC3DC,EA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U,gBAAiBV,EAAK2K,sBAC/B,MAGL7K,EAAA+E,UAAA0G,qBAAA,WACE,GAAItL,KAAKyI,GAAI,CACXzI,KAAKyI,GAAGzG,aACRhC,KAAKyI,GAAKxG,UAGZ,GAAIjC,KAAK+B,mBAAoB,CAC3B/B,KAAK+B,mBAAmBC,aACxBhC,KAAK+B,mBAAqBE,UAG5BjC,KAAKgD,aAAe,KACpBhD,KAAKS,gBAAkB,OAGzBZ,EAAA+E,UAAA2G,OAAA,WAAA,IAAAxL,EAAAC,KACE,OACEyB,EAAC+J,EAAI,CACHC,QAASzL,KAAKW,gBAAkBX,KAAKqD,YAAcrD,KAAKqB,SACxDT,KAAMZ,KAAKY,MAAQZ,KAAKU,QACxBgL,SAAU1L,KAAKiB,aACf0K,MAAO3L,KAAKkB,aACZ0K,MAAO5L,KAAKU,SAAWV,KAAKqB,SAAQwK,gBACrB7L,KAAKO,UAAU8D,SAAS,UAASyH,aACpC9L,KAAKO,UAAU8D,SAAS,OAAM0H,aAC9B/L,KAAKO,UAAU8D,SAAS,OAAM2H,eAC5BhM,KAAKO,UAAU8D,SAAS,UAEtC5C,EAAA,MAAA,CACEwK,MAAO,CACLtJ,QAAS,KACT8I,OAAQzL,KAAKW,eAAiBX,KAAKqB,SACnCuK,MAAO5L,KAAKU,SAAWV,KAAKW,eAAiBX,KAAKqB,SAClDT,KAAMZ,KAAKW,eAAiBX,KAAKY,MAAQZ,KAAKU,SAEhDwL,IAAK,SAACC,GAAG,OAAMpM,EAAK4C,QAAUwJ,IAE9B1K,EAAA,MAAA,CAAKwK,MAAM,kBAAkBC,IAAK,SAACC,GAAG,OAAMpM,EAAKwF,QAAU4G,IACzD1K,EAAA,OAAA,osBA/tBQ","sourcesContent":["@import '../../global/style/nano-theme/layers';\n\n:host {\n /**\n * @prop --stuck-left: The left position when your sticker is stuck. This can be useful to force your sticker to fill the viewport for example. Defaults to initial\n * @prop --stuck-right: The right position when your sticker is stuck. This can be useful to force your sticker to fill the viewport for example. Defaults to initial\n * @prop --stuck-z-index: The z-index order to display your sticker. Can be useful when displaying multiple stickers simultaneously. Defaults to #{$layer-index-menubar};\n @prop --top-hide: This is used for the hide transform animation (e.g. when quiet-mode is on). Defaults to translateY(-110%);\n @prop --bottom-hide: This is used for the hide transform animation (e.g. when quiet-mode is on). Defaults to translateY(110%);\n */\n\n --stuck-left: initial;\n --stuck-right: initial;\n --stuck-z-index: #{$layer-index-menubar};\n --top-hide: translateY(-110%);\n --bottom-hide: translateY(110%);\n\n display: block;\n max-width: 100%;\n}\n\n:host([sticky]) {\n position: sticky;\n transition: 0.3s ease transform;\n will-change: min-height;\n}\n\n:host([sticky][stuck]) {\n left: var(--stuck-left);\n right: var(--stuck-right);\n z-index: var(--stuck-z-index) !important;\n}\n\n:host([sticky][hide][placed-top]) {\n transform: var(--top-hide);\n}\n\n:host([sticky][hide][placed-bottom]) {\n transform: var(--bottom-hide);\n}\n\n:host([sticky][index='1']) {\n z-index: calc(var(--stuck-z-index) + 1);\n}\n\n:host([sticky][index='2']) {\n z-index: calc(var(--stuck-z-index) + 2);\n}\n\n:host([sticky][index='3']) {\n z-index: calc(var(--stuck-z-index) + 3);\n}\n\n:host([sticky][index='4']) {\n z-index: calc(var(--stuck-z-index) + 4);\n}\n\n:host([sticky][index='5']) {\n z-index: calc(var(--stuck-z-index) + 5);\n}\n\n.sticker {\n display: inherit;\n max-width: inherit;\n width: 100%;\n\n &:not(.stuck) {\n width: auto !important;\n }\n\n &.sticky {\n transition: 0.3s ease all;\n position: relative;\n\n :host([index='1']) & {\n z-index: calc(var(--stuck-z-index) + 1);\n }\n\n :host([index='2']) & {\n z-index: calc(var(--stuck-z-index) + 2);\n }\n\n :host([index='3']) & {\n z-index: calc(var(--stuck-z-index) + 3);\n }\n\n :host([index='4']) & {\n z-index: calc(var(--stuck-z-index) + 4);\n }\n\n :host([index='5']) & {\n z-index: calc(var(--stuck-z-index) + 5);\n }\n }\n\n &.stuck {\n position: fixed;\n left: var(--stuck-left);\n right: var(--stuck-right);\n z-index: var(--stuck-z-index);\n transform: translateY(0);\n\n :host([placed-top]) & {\n top: 0;\n }\n\n :host([placed-bottom]) & {\n bottom: 0;\n }\n\n &.hide {\n :host([placed-top]) & {\n transform: var(--top-hide);\n }\n\n :host([placed-bottom]) & {\n transform: var(--bottom-hide);\n }\n }\n }\n}\n\n.sticker-content {\n display: flex;\n flex-wrap: wrap;\n}\n","import {\n Component,\n ComponentInterface,\n h,\n Host,\n Prop,\n State,\n Watch,\n Element,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport {\n browserCanUseCssVariables,\n debounce,\n getOffset,\n hasShadowDom,\n raf,\n} from '../../utils';\n\nfunction _getScrollTop(ele: HTMLElement | Document) {\n return ele instanceof Document ? window.pageYOffset : ele.scrollTop;\n}\n\nfunction _getOffset(ele: HTMLElement, parent: HTMLElement | Document) {\n let parentEle =\n parent instanceof Document ? document.documentElement : parent;\n return getOffset(ele, parentEle);\n}\n\ntype Positions = 'top' | 'bottom' | 'start' | 'end';\n\n/**\n * The Sticker component is a toolbox for 'sticking' items to scrolling containers.\n *\n */\n@Component({\n tag: 'nano-sticker',\n styleUrl: 'sticker.scss',\n shadow: true,\n})\nexport class Sticker implements ComponentInterface {\n private isRtl: boolean = false;\n private io: IntersectionObserver;\n private contentSizeObserver: ResizeObserver;\n private parentSizeObserver: ResizeObserver;\n private sticker: HTMLDivElement;\n private content: HTMLDivElement;\n private scrollPosCache = 0;\n private scrollPosThresholdCache = 0;\n private cacheOffset: number | { v: number; h: number } = 0;\n private slottedContent: Element[];\n private pauseResizeWatcher = false;\n private listenForScrollParent = false;\n private stickToEleInitSize?: DOMRect;\n private positions: Positions[] = [];\n private pauseHide: boolean = false;\n private hasBootstrapped = false;\n\n @Element() host: HTMLNanoStickerElement;\n\n // Internal State\n\n @State() isStuck = false;\n @State() isRootSticker = true;\n @State() hide = false;\n @State() scrollHide = false;\n @State() multiStickerHide = false;\n @State() scrollingTo = false;\n @State() quietModeIsOn = false;\n @State() stuckCounter = 0;\n @State() stickerIndex = 0;\n @State() stickToEle?: HTMLNanoStickerElement;\n @State() triggerPos: { top: number; left: number };\n @State() trigger: HTMLDivElement;\n @State() _offset: number | { v: number; h: number } = 0;\n\n // Public API\n\n /** Only applicable to root stickers. When applied the sticker will grow or shrink to the scrollParent size */\n @Prop() autoResize = true;\n\n /** Manually enable / disabled sticky behaviour */\n @Prop({ mutable: true }) isSticky = true;\n\n /** Distance the item should be stuck from the sticky edge. */\n @Prop({ mutable: true }) offset: number | { v: number; h: number } = 0;\n\n /** The edge of the scroll-parent to stick to */\n @Prop() position: 'top' | 'bottom' = 'top';\n // other opts I'd like one day. 'start' | 'end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'\n\n /** When applied, the sticker will hide when the scroll-parent\n * is scrolling away from the sticker's stuck position and show when scrolling toward it.\n * By default this will apply when the parent is below either the h or w dimensions */\n @Prop() quietMode: 'on' | 'off' | { h: number; w: number } = {\n h: 600,\n w: 600,\n };\n\n /** When applied stickers will hide upon new stickers being stuck to the same position */\n @Prop() hideOnNewStickers = true;\n\n /** The max width of the item to implement sticky behaviour. */\n @Prop() breakPointMax: null | number = null;\n\n /** The min width of the item to implement sticky behaviour. */\n @Prop() breakPointMin: null | number = null;\n\n /** Define which scroll element to listen & stick to.\n * By default, it will find traverse the DOM to find the closest. */\n @Prop({ mutable: true }) scrollParent?: HTMLElement | Document;\n\n /** Upon being stuck, attach the sticker to another sticker element.\n * A JS query selector that returns a <nano-sticker> */\n @Prop() stickTo: string;\n\n // Broadcasted Events\n\n /** Emitted when a sticker is stuck */\n @Event() nanoStuck!: EventEmitter<{ sticker: HTMLNanoStickerElement }>;\n\n /** Emitted when a sticker is unstuck */\n @Event() nanoUnstuck!: EventEmitter<{ sticker: HTMLNanoStickerElement }>;\n\n /** Emitted when a sticker is hidden */\n @Event() nanoHide!: EventEmitter<{ sticker: HTMLNanoStickerElement }>;\n\n /** Emitted when a sticker is showing */\n @Event() nanoShow!: EventEmitter<{ sticker: HTMLNanoStickerElement }>;\n\n // Public methods\n\n /**\n * Method to return the visibility status of the sticker\n * @returns boolean\n */\n @Method()\n async isHiding() {\n return this.hide;\n }\n\n /**\n * Method to return the stuck status of the sticker\n * @returns boolean\n */\n @Method()\n async isSticking() {\n this.shouldStick();\n return this.isStuck;\n }\n\n /** @internal */\n @Method()\n async setTriggerPos(offset: number | { v: number; h: number }) {\n return (this._offset = offset);\n }\n\n /** @internal */\n @Method()\n async getTriggerPos() {\n return this.triggerPos;\n }\n\n /** @internal */\n @Method()\n async pauseHiding(pause: boolean) {\n return (this.pauseHide = pause);\n }\n\n // Watchers\n\n /** Keep a note of trigger position. Need this to track sticker order in the DOM */\n @Watch('trigger')\n @Watch('scrollParent')\n updateTriggerOffset() {\n if (!this.trigger || !this.scrollParent || !this.listenForScrollParent)\n return;\n this.triggerPos = _getOffset(this.trigger, this.scrollParent);\n }\n\n /** A root sticker is a fixed element Or this sticker is sticking to another.\n * We need a content resize watcher to make sure we maintain a correct placeholder size in the body */\n @Watch('position')\n stickerResizeListener() {\n if (this.contentSizeObserver) {\n this.contentSizeObserver.disconnect();\n this.contentSizeObserver = undefined;\n }\n\n this.contentSizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (this.pauseResizeWatcher) return;\n\n if (entry.contentRect.height) {\n if (this.position === 'top')\n this.host.style.height = entry.contentRect.height + 'px';\n if (this.position === 'bottom')\n this.host.style.minHeight = entry.contentRect.height + 'px';\n }\n }\n });\n this.contentSizeObserver.observe(this.content);\n }\n\n @Watch('quietMode')\n quietModeChange() {\n if (this.quietMode === 'on') raf(() => (this.quietModeIsOn = true));\n else if (this.quietMode === 'off') raf(() => (this.quietModeIsOn = false));\n }\n\n /** offset is part of the public API but we also use it to manipulate trigger points */\n @Watch('offset')\n @Watch('_offset')\n setOffset() {\n this.trigger.setAttribute('style', '');\n let v: number, h: number, _v: number, _h: number;\n let sticker: HTMLElement =\n this.isRootSticker || this.stickToEle ? this.sticker : this.host;\n\n if (!sticker) return;\n\n if (typeof this.offset === 'object') ({ v, h } = this.offset);\n else v = h = this.offset;\n\n if (typeof this._offset === 'object') ({ v = _v, h = _h } = this._offset);\n else _v = _h = this._offset;\n\n const setPos = (pos: 'top' | 'bottom' | 'left' | 'right') => {\n let u = pos.match(/(top|bottom)/) ? v : h;\n setTriggetPos(pos);\n sticker.style[pos] = u + 'px';\n if (!browserCanUseCssVariables()) return;\n if (u)\n this.host.style.setProperty(\n '--hide-transform-amount',\n `(110% + ${u}px)`\n );\n else this.host.style.setProperty('--hide-transform-amount', null);\n };\n\n const setTriggetPos = (pos: 'top' | 'bottom' | 'left' | 'right') => {\n let u = pos.match(/(top|bottom)/) ? v + _v : h + _h;\n this.trigger.style[pos] = u * -1 + 'px';\n this.trigger.style.position = 'relative';\n this.trigger.style.height = '1px';\n };\n\n if (\n (this.positions.includes('start') && this.isRtl) ||\n (this.positions.includes('end') && !this.isRtl)\n )\n setPos('right');\n\n if (\n (this.positions.includes('end') && this.isRtl) ||\n (this.positions.includes('start') && !this.isRtl)\n )\n setPos('left');\n\n if (this.positions.includes('top')) setPos('top');\n if (this.positions.includes('bottom')) setPos('bottom');\n }\n\n @Watch('position')\n positionChange() {\n this.positions = this.position.split('-') as Positions[];\n this.setOffset();\n }\n\n /** If this sticker is attached to a 'master' sticker (stickToEle),\n * here we move the content of this sticker in and out accordingly */\n @Watch('isStuck')\n async stuckChange() {\n if (this.isStuck) {\n if (this.stickToEle) {\n let content = hasShadowDom(this.host)\n ? this.host.children\n : this.content.children;\n this.slottedContent = Array.from(content);\n\n this.slottedContent.forEach((child: HTMLElement) => {\n if (hasShadowDom(this.host)) this.stickToEle.appendChild(child);\n else\n this.stickToEle\n .querySelector('.sticker-content')\n .appendChild(child);\n child.style.order = this.stickerIndex + '';\n });\n\n this.nanoStuck.emit({ sticker: this.stickToEle });\n } else this.nanoStuck.emit({ sticker: this.host });\n } else {\n this.scrollHide = false;\n\n if (this.stickToEle) {\n this.slottedContent.forEach((child: HTMLElement) => {\n this.host.appendChild(child);\n child.style.order = '';\n });\n this.nanoUnstuck.emit({ sticker: this.stickToEle });\n } else this.nanoUnstuck.emit({ sticker: this.host });\n }\n }\n\n /** attach scroll listener. 'hides' stickers when scrolling away from trigger and 'shows' when scrolling toward */\n @Watch('quietModeIsOn')\n attachScrollListeners() {\n if (this.quietModeIsOn)\n this.scrollParent.addEventListener('scroll', this.onScroll, {\n passive: true,\n capture: false,\n });\n else if (this.scrollParent) {\n this.scrollParent.removeEventListener('scroll', this.onScroll);\n this.moveTrigger(true);\n }\n }\n\n /** Add / remove parent scrolling listeners. If there's stickToEle we need to remove them */\n @Watch('scrollParent')\n @Watch('stickToEle')\n handleParentEvents(_, oldParent: null | HTMLElement = null) {\n if (!this.listenForScrollParent) return;\n if (oldParent) this.manageListenersOnParent(false, oldParent);\n if (this.scrollParent) this.manageListenersOnParent(!this.stickToEle);\n }\n\n /** Add remove specific listeners if we're sticking to a sticker.\n * We need to adjust triggers according to the status of the 'master' */\n @Watch('stickToEle')\n stickToEleChange(_, oldEle: null | HTMLNanoStickerElement) {\n if (this.stickToEle) {\n this.stickToEle.addEventListener('nanoHide', this.onStickToDisplayEvent);\n this.stickToEle.addEventListener('nanoShow', this.onStickToDisplayEvent);\n this.stickToEle.addEventListener('nanoStuck', this.onStickToDisplayEvent);\n this.stickToEle.addEventListener(\n 'nanoUnstuck',\n this.onStickToDisplayEvent\n );\n }\n if (oldEle) {\n oldEle.removeEventListener('nanoHide', this.onStickToDisplayEvent);\n oldEle.removeEventListener('nanoShow', this.onStickToDisplayEvent);\n oldEle.removeEventListener('nanoStuck', this.onStickToDisplayEvent);\n oldEle.removeEventListener('nanoUnstuck', this.onStickToDisplayEvent);\n }\n }\n\n /** Find and set the stickToEle from the public, selector string */\n @Watch('stickTo')\n stickToChange() {\n if (this.stickTo)\n this.stickToEle = this.scrollParent.querySelector(this.stickTo);\n else this.stickToEle = undefined;\n }\n\n /** 2 potential criteria for hiding. Multi-stickers or quietmode. */\n @Watch('multiStickerHide')\n @Watch('scrollHide')\n visibilityDecisionHandler() {\n if (this.multiStickerHide || this.scrollHide) this.hide = true;\n else this.hide = false;\n }\n\n @Watch('hide')\n handleHideChange() {\n if (this.hide) this.nanoHide.emit({ sticker: this.host });\n else this.nanoShow.emit({ sticker: this.host });\n }\n\n @Watch('scrollParent')\n setupIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n if (!this.scrollParent || !this.hasBootstrapped || !this.trigger) return;\n\n this.isRootSticker = this.scrollParent instanceof Document;\n let root = this.scrollParent;\n if (this.scrollParent instanceof Document) root = null;\n\n this.io = new window.IntersectionObserver(\n (_) => {\n if (this.pauseResizeWatcher || !this.isSticky) return;\n this.shouldStick(_.slice(-1)[0]);\n },\n { root: root as HTMLElement }\n );\n\n this.io.observe(this.trigger);\n }\n\n // Private methods / handlers\n\n /** Assesses the public API quitemode and works out if it should be applied atm.\n * If 'smallscreen', or there is a breakpointmax / min it will add a resizeobserver to conditionally add behaviour */\n private setupParentResizeListener = () => {\n if (this.parentSizeObserver) {\n this.parentSizeObserver.disconnect();\n this.parentSizeObserver = undefined;\n }\n\n this.parentSizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n let height: number, width: number;\n if (entry.contentRect.height) height = entry.contentRect.height;\n if (entry.contentRect.width) width = entry.contentRect.width;\n\n if (typeof this.quietMode === 'object') {\n if (width < this.quietMode.w || height < this.quietMode.h)\n this.quietModeIsOn = true;\n else this.quietModeIsOn = false;\n }\n\n if (this.breakPointMin) {\n if (width > this.breakPointMin) this.isSticky = true;\n else this.isSticky = false;\n }\n\n if (this.breakPointMax) {\n if (width < this.breakPointMax) this.isSticky = true;\n else this.isSticky = false;\n }\n\n if (this.isRootSticker && this.sticker && this.autoResize)\n this.sticker.style.width = this.host.scrollWidth + 'px';\n }\n });\n\n let toWatch =\n this.scrollParent instanceof Document\n ? this.scrollParent.documentElement\n : this.scrollParent;\n if (toWatch) this.parentSizeObserver.observe(toWatch);\n };\n\n /** For stickTo stickers. We listen to the events from the 'master' sticker to ammend the hide/show trigger\n * Main diffs from rootstickers / non is height being on 'master' */\n private onStickToDisplayEvent = (\n e: CustomEvent<{ sticker: HTMLNanoStickerElement }>\n ) => {\n if (e.detail.sticker !== this.stickToEle) return;\n\n switch (e.type) {\n case 'nanoHide':\n this._offset = 0;\n this.cacheOffset = this.offset;\n this.offset = 0;\n /** trigger moves down, underneath sticker if the main sticker hides */\n if (!this.isStuck) this.moveTrigger(false);\n\n /** If it's an actual 'position: sticky' element, we need to give the sticker an appropriate height.\n * This minimises content jumping around as items are added */\n if (!this.isRootSticker && this.quietModeIsOn) {\n raf(() => {\n this.stickToEle.style.minHeight =\n this.stickToEleInitSize.height +\n (this.host.scrollHeight +\n (typeof this.cacheOffset === 'object'\n ? this.cacheOffset.v\n : this.cacheOffset)) +\n 'px';\n this.stickToEle.setTriggerPos(this.stickToEleInitSize.height * -1);\n });\n }\n break;\n case 'nanoShow':\n this._offset = this.stickToEleInitSize.height;\n this.offset = this.cacheOffset;\n this.moveTrigger(true);\n\n /** reset master sticker size */\n if (!this.isRootSticker && this.quietModeIsOn) {\n raf(() => {\n this.stickToEle.style.minHeight = '';\n this.stickToEle.setTriggerPos(0);\n });\n }\n break;\n case 'nanoStuck':\n this.stickToEleInitSize = this.stickToEle.getBoundingClientRect();\n this._offset = this.stickToEleInitSize.height;\n break;\n }\n };\n\n /** Add or removes event listeners / observers on scrolling parent\n * for when the scrolling parent changes, or, this sticker is sticking to another */\n private manageListenersOnParent(\n addEvents: boolean,\n ele?: HTMLElement | Document\n ) {\n let scrollParent = ele || this.scrollParent;\n\n if (!scrollParent) return;\n\n if (!addEvents) {\n try {\n if (this.quietModeIsOn)\n scrollParent.removeEventListener('scroll', this.onScroll);\n scrollParent.removeEventListener('nanoStuck', this.onStickEvent);\n scrollParent.removeEventListener('nanoUnstuck', this.onStickEvent);\n } catch (e) {\n console.error('Events haven`t been added');\n }\n } else {\n scrollParent.addEventListener('nanoStuck', this.onStickEvent);\n scrollParent.addEventListener('nanoUnstuck', this.onStickEvent);\n\n if (this.quietModeIsOn) this.attachScrollListeners();\n }\n this.setupParentResizeListener();\n }\n\n /** Handler applied to scrolling parent. When 'hideOnNewStickers' is true, hide this sticker on subsequent stuck stickers. */\n private onStickEvent = async (\n e: CustomEvent<{ sticker: HTMLNanoStickerElement }>\n ) => {\n let sticker = e.detail ? e.detail.sticker : null;\n if (!sticker || sticker.position !== this.position) return;\n\n const incomingTriggerPos = await sticker.getTriggerPos();\n\n if (\n e.type === 'nanoStuck' &&\n sticker !== this.host &&\n sticker.scrollParent === this.host.scrollParent\n ) {\n this.stickerIndex++;\n\n if (!this.hideOnNewStickers) return;\n\n if (\n (this.positions.includes('top') &&\n this.triggerPos.top < incomingTriggerPos.top) ||\n (this.positions.includes('bottom') &&\n this.triggerPos.top > incomingTriggerPos.top)\n ) {\n this.multiStickerHide = true;\n this.stuckCounter++;\n }\n }\n\n if (\n e.type === 'nanoUnstuck' &&\n sticker !== this.host &&\n sticker.scrollParent === this.host.scrollParent\n ) {\n this.stickerIndex--;\n\n if (!this.hideOnNewStickers) return;\n\n if (\n (this.positions.includes('top') &&\n this.triggerPos.top < incomingTriggerPos.top) ||\n (this.positions.includes('bottom') &&\n this.triggerPos.top > incomingTriggerPos.top)\n ) {\n this.stuckCounter--;\n if (this.stuckCounter < 1) this.multiStickerHide = false;\n }\n }\n };\n\n /** Scroll handler applied to scrolling parent. Only applied when quietmode is on.\n * 'hides' stickers when scrolling over 100px away from trigger and 'shows' when scrolling toward */\n private onScroll = () => {\n let y: number = _getScrollTop(this.scrollParent);\n\n // scrolling up\n if (y < this.scrollPosCache) {\n if (!this.positions.includes('bottom')) this.handleScrollTo();\n else this.handleScrollAway(y);\n }\n\n // scrolling down\n if (y > this.scrollPosCache) {\n if (!this.positions.includes('bottom')) this.handleScrollAway(y);\n else this.handleScrollTo();\n }\n this.scrollPosCache = y;\n };\n\n /** Watch for scroll direction. Only applies when quietmode is on.\n * We need to addjust the position of the trigger when the sticker is hidden */\n private handleScrollTo() {\n this.scrollPosThresholdCache = null;\n if (!this.scrollHide) return;\n\n if (this.scrollingTo !== true) {\n this._offset = this.cacheOffset || this._offset;\n }\n this.scrollingTo = true;\n this.scrollHide = false;\n }\n\n private handleScrollAway(currScroll: number) {\n if (this.scrollHide) return;\n\n if (!this.isStuck) return;\n\n if (this.scrollingTo !== false) {\n this.cacheOffset = this._offset;\n this._offset = 0;\n }\n this.scrollingTo = false;\n\n if (!this.scrollPosThresholdCache)\n this.scrollPosThresholdCache = currScroll;\n else if (\n !this.pauseHide &&\n Math.abs(currScroll - this.scrollPosThresholdCache) > 100\n )\n this.scrollHide = true;\n }\n\n private moveTrigger(toInitial?: boolean) {\n if (\n (this.positions.includes('bottom') && !toInitial) ||\n (!this.positions.includes('bottom') && toInitial)\n ) {\n this.host.parentNode.insertBefore(this.trigger, this.host);\n } else\n this.host.parentNode.insertBefore(this.trigger, this.host.nextSibling);\n }\n\n /** Gets the 'closest' scrolling parent */\n private getScrollParent() {\n const regex = /(auto|scroll)/;\n const parents = (_node: Node, ps: Node[]) => {\n if (_node.parentNode === null) {\n return ps;\n }\n return parents(_node.parentNode, ps.concat([_node]));\n };\n const style = (_node, prop) =>\n getComputedStyle(_node, null).getPropertyValue(prop);\n const overflow = (_node) =>\n style(_node, 'overflow') +\n style(_node, 'overflow-y') +\n style(_node, 'overflow-x');\n const scroll = (_node) => regex.test(overflow(_node));\n const docHeight = document.documentElement.getBoundingClientRect().height;\n\n const scrollParent = (_node: HTMLElement) => {\n if (!(_node instanceof HTMLElement)) return;\n\n const ps = parents(_node, []);\n return (\n ps.find(\n (ele) =>\n scroll(ele) && ele.getBoundingClientRect().height !== docHeight\n ) || document\n );\n };\n\n return scrollParent(this.host);\n }\n\n private shouldStick(data?: IntersectionObserverEntry) {\n let scrollAmt: number;\n\n if (this.positions.includes('top')) {\n if (!this.isRootSticker)\n scrollAmt = _getOffset(this.trigger, this.scrollParent).top;\n else scrollAmt = this.trigger.getBoundingClientRect().top;\n this.isStuck = scrollAmt < -1;\n } else if (this.positions.includes('bottom')) {\n scrollAmt = this.trigger.getBoundingClientRect().top;\n const parentBounding =\n data && data.rootBounds\n ? data.rootBounds\n : (this.scrollParent instanceof Document\n ? document.documentElement\n : this.scrollParent\n ).getBoundingClientRect();\n this.isStuck = scrollAmt > parentBounding.height + parentBounding.top;\n }\n }\n\n private bootstrapGurantor() {\n this.hasBootstrapped = true;\n\n this.scrollParent = this.scrollParent || this.getScrollParent();\n this.isRootSticker = this.scrollParent instanceof Document;\n\n this.trigger = this.trigger || document.createElement('div');\n this.trigger.classList.add('sticker-trigger');\n\n this.positionChange();\n this.moveTrigger(true);\n this.quietModeChange();\n\n this.listenForScrollParent = true;\n this.handleParentEvents(true);\n\n this.stickerIndex = Array.from(\n this.scrollParent.querySelectorAll('nano-sticker')\n )\n .filter(\n (sticker: HTMLNanoStickerElement) => sticker.position === this.position\n )\n .findIndex((sticker) => sticker === this.host);\n\n this.setOffset();\n this.stickerResizeListener();\n this.setupParentResizeListener();\n\n // bit of a hack ... add default 'order'. Required for 'stickTo' elements.\n this.slottedContent = Array.from(this.host.children);\n this.slottedContent.forEach((child: HTMLElement) => {\n child.style.order = this.stickerIndex + '';\n });\n\n this.updateTriggerOffset();\n this.stickToChange();\n this.setupIO();\n this.onStickToDisplayEvent = debounce(this.onStickToDisplayEvent, 50);\n }\n\n // Stencil metthods\n\n connectedCallback() {\n this.isRtl =\n this.host.dir === 'rtl' ||\n (this.host.ownerDocument as Document).dir === 'rtl';\n\n // this is all horrible.... shrug\n document.documentElement.addEventListener('nanoComponentsReady', () => {\n setTimeout((_) => this.bootstrapGurantor(), 200);\n });\n setTimeout((_) => {\n if (!this.hasBootstrapped) this.bootstrapGurantor();\n }, 1000);\n }\n\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n\n if (this.parentSizeObserver) {\n this.parentSizeObserver.disconnect();\n this.parentSizeObserver = undefined;\n }\n\n this.scrollParent = null;\n this.hasBootstrapped = false;\n }\n\n render() {\n return (\n <Host\n sticky={!this.isRootSticker && !this.stickToEle && this.isSticky}\n hide={this.hide && this.isStuck}\n siblings={this.stuckCounter}\n index={this.stickerIndex}\n stuck={this.isStuck && this.isSticky}\n placed-bottom={this.positions.includes('bottom')}\n placed-top={this.positions.includes('top')}\n placed-end={this.positions.includes('end')}\n placed-start={this.positions.includes('start')}\n >\n <div\n class={{\n sticker: true,\n sticky: this.isRootSticker && this.isSticky,\n stuck: this.isStuck && this.isRootSticker && this.isSticky,\n hide: this.isRootSticker && this.hide && this.isStuck,\n }}\n ref={(div) => (this.sticker = div)}\n >\n <div class=\"sticker-content\" ref={(div) => (this.content = div)}>\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Web Components for Nanopore digital Web Apps
3
- */
4
- import{h as e,r as t,c as a,e as i,g as s}from"./p-b5c33aff.js";import{b as o,D as n,i as d,p as r,d as l,s as c,e as h,f as u,g as b,h as f,j as p,k as _,a as v}from"./p-f66958c1.js";import{c as x}from"./p-d99437a6.js";import{f as g}from"./p-f8f89998.js";var w;(function(e){e[e["Sunday"]=0]="Sunday";e[e["Monday"]=1]="Monday";e[e["Tuesday"]=2]="Tuesday";e[e["Wednesday"]=3]="Wednesday";e[e["Thursday"]=4]="Thursday";e[e["Friday"]=5]="Friday";e[e["Saturday"]=6]="Saturday"})(w||(w={}));function y(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function m(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function k(e,t=w.Monday){var a=new Date(e);var i=a.getDay();var s=(i<t?7:0)+i-t;a.setDate(a.getDate()-s);return a}function D(e,t=w.Monday){var a=new Date(e);var i=a.getDay();var s=(i<t?-7:0)+6-(i-t);a.setDate(a.getDate()+s);return a}function z(e){return new Date(e.getFullYear(),e.getMonth(),1)}function M(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function S(e,t,a){return C(e,t,a)===e}function C(e,t,a){const i=e.getTime();if(t&&t instanceof Date&&i<t.getTime()){return t}if(a&&a instanceof Date&&i>a.getTime()){return a}return e}function N(e,t){const a=[];let i=e;while(!y(i,t)){a.push(i);i=m(i,1)}a.push(i);return a}function T(e,t=w.Monday){const a=k(z(e),t);const i=D(M(e),t);return N(a,i)}const F=({focusedDay:t,today:a,day:i,onDaySelect:s,onKeyboardNavigation:o,focusedDayRef:n,inRange:d,disabled:r,isSelected:l})=>{const c=y(i,a);const h=y(i,t);const u=i.getMonth()!==t.getMonth()||r;const b=!d;function f(e){s(e,i)}return e("button",{class:{"duet-date__day":true,"is-outside":b,"is-disabled":u,"is-today":c},tabIndex:h?0:-1,onClick:f,onKeyDown:o,disabled:b,type:"button","aria-pressed":l?"true":"false",ref:e=>{if(h&&e&&n){n(e)}}},e("span",{"aria-hidden":"true"},i.getDate()),e("span",{class:"duet-date__vhidden"},i.toLocaleDateString(undefined,{day:"numeric",month:"long"})))};function j(e,t){const a=[];for(let i=0;i<e.length;i+=t){a.push(e.slice(i,i+t))}return a}function L(e,t,a){return e.map(((i,s)=>{const o=(s+t)%e.length;return a(e[o])}))}const A=({selectedDate:t,focusedDate:a,labelledById:i,localization:s,firstDayOfWeek:o,min:n,max:d,onDateSelect:r,onKeyboardNavigation:l,focusedDayRef:c,onMouseDown:h,onFocusIn:u,isDateDisabled:b})=>{const f=new Date;const p=T(a,o);return e("table",{class:"duet-date__table",role:"grid","aria-labelledby":i,onFocusin:u,onMouseDown:h},e("thead",null,e("tr",null,L(s.dayNames,o,(t=>e("th",{class:"duet-date__table-header",scope:"col"},e("span",{"aria-hidden":"true"},t.substr(0,2)),e("span",{class:"duet-date__vhidden"},t)))))),e("tbody",null,j(p,7).map((i=>e("tr",{class:"duet-date__row"},i.map((i=>e("td",{class:"duet-date__cell",role:"gridcell","aria-selected":y(i,t)?"true":undefined},e(F,{day:i,today:f,focusedDay:a,inRange:S(i,n,d),onDaySelect:r,onKeyboardNavigation:l,focusedDayRef:c,disabled:b(i),isSelected:y(i,t)})))))))))};const Y={buttonLabel:"Choose date",placeholder:"YYYY-MM-DD",selectedDateMessage:"Selected date is",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",keyboardInstruction:"You can use arrow keys to navigate dates",calendarHeading:"Choose a date",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};const I=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--background:var(--nano-layer-bg, #fff);--active-color:var(--nano-color-base, var(--nano-color-primary, #007495));--active-text-color:var(\n --nano-color-contrast,\n var(--nano-color-primary-contrast, #fff)\n );--focus-shadow:var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8)));--inactive-color:var(--nano-button-color, #f0efed);display:block;font-size:16px}:host(.nano-color){--active-color:var(--nano-color-base, var(--nano-color-primary, #007495));--active-text-color:var(--nano-color-contrast);--focus-shadow:0 0 0 0.1875rem rgba(var(--nano-color-tint-rgb), 0.56)}.duet-date *,.duet-date *::before,.duet-date *::after{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.duet-date{-webkit-box-sizing:border-box;box-sizing:border-box;color:currentColor;display:block;margin:0;position:relative;text-align:left;width:100%}.duet-date__dialog{display:-webkit-box;display:-ms-flexbox;display:flex;top:100%;max-width:100%;width:100%}.duet-date__dialog.is-left{left:auto;right:0;width:auto}.duet-date__dialog-content{background:var(--background);min-width:290px;padding:16px 16px 20px;position:relative;-webkit-transform:none;transform:none;max-width:100%;width:100%}.duet-date__table{border-collapse:collapse;border-spacing:0;font-size:1em;line-height:1.25;text-align:center;width:100%}.duet-date__table-header{font-size:0.75em;font-weight:600;letter-spacing:1px;line-height:1.25;padding-bottom:8px;text-decoration:none;text-transform:uppercase}.duet-date__cell{text-align:center}.duet-date__day{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-size:0.875em;font-variant-numeric:tabular-nums;line-height:1.25;position:relative;text-align:center;vertical-align:middle;z-index:1;-webkit-transition:0.15s ease all;transition:0.15s ease all;height:2.5em;width:2.5em}.duet-date__day.is-today{-webkit-box-shadow:0 0 0 1px var(--active-color);box-shadow:0 0 0 1px var(--active-color);position:relative}.duet-date__day:hover::before,.duet-date__day.is-today::before{content:"";background:var(--active-color);border-radius:50%;bottom:0;left:0;opacity:0.16;position:absolute;right:0;top:0}[aria-selected=true] .duet-date__day{background:var(--active-color);color:var(--active-text-color);-webkit-box-shadow:none;box-shadow:none;outline:0}.duet-date__day:active{background:var(--active-color);-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);color:var(--active-text-color)}.duet-date__day:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:0}.duet-date__day.is-disabled{background:transparent;-webkit-box-shadow:none;box-shadow:none;cursor:default;opacity:0.5}.duet-date__day.is-disabled::before{display:none}.duet-date__day.is-outside{background:var(--inactive-color);-webkit-box-shadow:none;box-shadow:none;cursor:default;opacity:0.6;pointer-events:none}.duet-date__day.is-outside::before{display:none}.duet-date__header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:16px;width:100%}.duet-date__nav{white-space:nowrap}.duet-date__prev,.duet-date__next{background:var(--inactive-color);-moz-appearance:none;-webkit-appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;appearance:none;border:0;border-radius:50%;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:distribute;justify-content:space-around;margin-left:8px;padding:0;-webkit-transition:background-color 300ms ease;transition:background-color 300ms ease;font-size:0.9em;height:2.2em;width:2.2em}.duet-date__prev:focus,.duet-date__next:focus{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow);outline:0}.duet-date__prev:active:focus,.duet-date__next:active:focus{-webkit-box-shadow:none;box-shadow:none}.duet-date__prev:disabled,.duet-date__next:disabled{cursor:default;opacity:0.5}.duet-date__prev nano-icon,.duet-date__next nano-icon{margin:0 auto}.duet-date__select{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-top:4px;position:relative}.duet-date__select span{margin-right:4px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.duet-date__select span{margin-right:unset;-webkit-margin-end:4px;margin-inline-end:4px}}.duet-date__select select{cursor:pointer;font-size:1em;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2}.duet-date__select select.focus-visible:focus+.duet-date__select-label{-webkit-box-shadow:var(--focus-shadow);box-shadow:var(--focus-shadow)}.duet-date__select-label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.25em;font-weight:600;line-height:1.25;padding:0 4px 0 8px;pointer-events:none;position:relative;width:100%;z-index:1}.duet-date__select-label nano-icon{font-size:0.55em}.duet-date__vhidden{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;top:0;width:1px}';function O(e,t){var a=[];for(var i=e;i<=t;i++){a.push(i)}return a}let R=class{constructor(e){t(this,e);this.nanoDatePicked=a(this,"nanoDatePicked",7);this.monthSelectId=o("NanoDateMonth");this.yearSelectId=o("NanoDateYear");this.dialogLabelId=o("NanoDateLabel");this.initialTouchX=null;this.initialTouchY=null;this.activeFocus=false;this.focusedDay=new Date;this.selectedDate="";this.min="";this.max="";this.firstDayOfWeek=n.Monday;this.localization=Y;this.isDateDisabled=()=>false;this.isModal=false;this.enableActiveFocus=()=>{this.activeFocus=true};this.disableActiveFocus=()=>{this.activeFocus=false};this.handleTouchStart=e=>{const t=e.changedTouches[0];this.initialTouchX=t.pageX;this.initialTouchY=t.pageY};this.handleTouchMove=e=>{e.preventDefault()};this.handleTouchEnd=e=>{const t=e.changedTouches[0];const a=t.pageX-this.initialTouchX;const i=t.pageY-this.initialTouchY;const s=70;const o=Math.abs(a)>=s&&Math.abs(i)<=s;if(o){this.addMonths(a<0?1:-1)}this.initialTouchY=null;this.initialTouchX=null};this.handleNextMonthClick=e=>{e.preventDefault();this.addMonths(1)};this.handlePreviousMonthClick=e=>{e.preventDefault();this.addMonths(-1)};this.handleKeyboardNavigation=e=>{if(e.key==="Tab"&&!e.shiftKey&&this.isModal){e.preventDefault();let t=this.firstFocusEle||this.firstFocusableElement;t.focus();return}var t=true;switch(e.key){case"ArrowRight":this.addDays(1);break;case"ArrowLeft":this.addDays(-1);break;case"ArrowDown":this.addDays(7);break;case"ArrowUp":this.addDays(-7);break;case"PageUp":if(e.shiftKey){this.addYears(-1)}else{this.addMonths(-1)}break;case"PageDown":if(e.shiftKey){this.addYears(1)}else{this.addMonths(1)}break;case"Home":this.startOfWeek();break;case"End":this.endOfWeek();break;default:t=false}if(t){e.preventDefault();this.enableActiveFocus()}};this.handleDaySelect=(e,t)=>{const a=!this.isDateDisabled(t);const i=d(t,r(this.min),r(this.max));if(!i||!a){return}if(t.getMonth()===this.focusedDay.getMonth()){this.setValue(t)}else{this.setFocusedDay(t)}};this.handleMonthSelect=e=>{this.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=e=>{this.setYear(parseInt(e.target.value,10))};this.processFocusedDayNode=e=>{this.focusedDayNode=e;if(this.activeFocus){setTimeout((()=>e.focus()),0)}}}async setFocus(e=false,t=false){this.setFocusedDay(r(this.selectedDate)||new Date);if(e){setTimeout((e=>this.focusedDayNode.focus()),20);return}clearTimeout(this.focusTimeoutId);this.focusTimeoutId=setTimeout((()=>{if(t)g.force(this.monthSelectNode);this.monthSelectNode.focus()}),20)}handleSelectedDateChange(){this.setFocus(true)}addDays(e){this.setFocusedDay(l(this.focusedDay,e))}addMonths(e){this.setMonth(this.focusedDay.getMonth()+e)}addYears(e){this.setYear(this.focusedDay.getFullYear()+e)}startOfWeek(){this.setFocusedDay(c(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(h(this.focusedDay,this.firstDayOfWeek))}setMonth(e){const t=u(b(this.focusedDay),e);const a=f(t);const i=u(this.focusedDay,e);this.setFocusedDay(p(i,t,a))}setYear(e){const t=_(b(this.focusedDay),e);const a=f(t);const i=_(this.focusedDay,e);this.setFocusedDay(p(i,t,a))}setFocusedDay(e){this.focusedDay=p(e,r(this.min),r(this.max))}setValue(e){this.selectedDate=v(e);this.nanoDatePicked.emit({value:this.selectedDate,valueAsDate:e})}connectedCallback(){if(this.yearSelectNode)g.observe(this.yearSelectNode);if(this.monthSelectNode)g.observe(this.monthSelectNode)}componentWillLoad(){this.handleSelectedDateChange()}componentDidLoad(){this.connectedCallback()}disconnectedCallback(){g.unobserve(this.yearSelectNode);g.unobserve(this.monthSelectNode)}render(){const t=r(this.selectedDate);const a=(t||this.focusedDay).getFullYear();const s=this.focusedDay.getMonth();const o=this.focusedDay.getFullYear();const n=r(this.min);const l=r(this.max);const c=n!=null&&n.getMonth()===s&&n.getFullYear()===o;const h=l!=null&&l.getMonth()===s&&l.getFullYear()===o;let u=a-10;let p=a+10;if(n)u=n.getFullYear();if(l)p=l.getFullYear();return e(i,{class:Object.assign({},x(this.color))},e("div",{class:"duet-date"},e("div",{class:{"duet-date__dialog":true,"is-active":true},onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},e("div",{class:"duet-date__dialog-content"},e("div",{class:"duet-date__vhidden duet-date__instructions","aria-live":"polite"},this.localization.keyboardInstruction),e("div",{class:"duet-date__header",onFocusin:this.disableActiveFocus},e("div",null,e("h2",{id:this.dialogLabelId,class:"duet-date__vhidden","aria-live":"polite"},this.localization.monthNames[s]," ",this.focusedDay.getFullYear()),e("label",{htmlFor:this.monthSelectId,class:"duet-date__vhidden"},this.localization.monthSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.monthSelectId,class:"duet-date__select--month",ref:e=>this.firstFocusableElement=this.monthSelectNode=e,onChange:this.handleMonthSelect},this.localization.monthNames.map(((t,a)=>e("option",{key:t,value:a,selected:a===s,disabled:!d(new Date(o,a,1),n?b(n):null,l?f(l):null)},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.localization.monthNamesShort[s]),e("nano-icon",{name:"light/chevron-down"}))),e("label",{htmlFor:this.yearSelectId,class:"duet-date__vhidden"},this.localization.yearSelectLabel),e("div",{class:"duet-date__select"},e("select",{id:this.yearSelectId,class:"duet-date__select--year",onChange:this.handleYearSelect,ref:e=>this.yearSelectNode=e},O(u,p).map((t=>e("option",{key:t,selected:t===o},t)))),e("div",{class:"duet-date__select-label","aria-hidden":"true"},e("span",null,this.focusedDay.getFullYear()),e("nano-icon",{name:"light/chevron-down"})))),e("div",{class:"duet-date__nav"},e("button",{class:"duet-date__prev",onClick:this.handlePreviousMonthClick,disabled:c,type:"button"},e("nano-icon",{name:"light/chevron-left"}),e("span",{class:"duet-date__vhidden"},this.localization.prevMonthLabel)),e("button",{class:"duet-date__next",onClick:this.handleNextMonthClick,disabled:h,type:"button"},e("nano-icon",{name:"light/chevron-right"}),e("span",{class:"duet-date__vhidden"},this.localization.nextMonthLabel)))),e("div",null,e(A,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,localization:this.localization,firstDayOfWeek:this.firstDayOfWeek,focusedDayRef:this.processFocusedDayNode,min:n,max:l,isDateDisabled:this.isDateDisabled}))))))}get host(){return s(this)}static get watchers(){return{selectedDate:["handleSelectedDateChange"]}}};R.style=I;export{R as nano_date_picker};
5
- //# sourceMappingURL=p-222d8095.entry.js.map
@@ -1,5 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t};
2
- /*!
3
- * Web Components for Nanopore digital Web Apps
4
- */System.register(["./p-f48be9f5.system.js","./p-b430a9b6.system.js","./p-ef053a2f.system.js"],(function(t){"use strict";var e,i,n,r,s,a,o,c;return{setters:[function(t){e=t.r;i=t.c;n=t.i;r=t.h;s=t.e;a=t.g},function(t){o=t.i},function(t){c=t.d}],execute:function(){var l=t("nano_resize_observe",function(){function t(t){var n=this;e(this,t);this.nanoResizeStateChange=i(this,"nanoResizeStateChange",7);this.classNames=[];this.assessChanges=function(){if(!n.currentWidth&&!n.currentHeight)return;var t={h:new Map,w:new Map};var e=false;Object.keys(n.appliedStates).forEach((function(i){var r;if(i==="h")r=n.currentHeight;else r=n.currentWidth;n.appliedStates[i].forEach((function(n,s){if(r>=s&&n.applied===false){n.applied=true;t[i].set(s,n);e=true}else if(r<s&&n.applied===true){n.applied=false;t[i].set(s,n);e=true}}))}));if(e)n.applyChanges(t);else if(!n.classNames.includes("is-ready"))n.classNames=["is-ready"]}}t.prototype.dimensionChanged=function(){this.assessChanges()};t.prototype.statesChanged=function(){var t=this;if(!this.states)return;if(!this.ro)this.attachRO();var e=function(t){var e=t.split(/(\d+)/).filter((function(t){return t.length}));return{bp:parseInt(e[0]),dir:e[1]}};this.appliedStates={h:new Map,w:new Map};this.states.split(",").map((function(i){i=i.trim();if(i.includes(" ")){var n=i.split(" "),r=n[0],s=n.slice(1);var a=e(r),o=a.bp,c=a.dir;t.appliedStates[c].set(o,{states:s,applied:false})}else{var l=e(i),o=l.bp,c=l.dir;t.appliedStates[c].set(o,{applied:false})}}))};t.prototype.applyChanges=function(t){var e=__spreadArray([],this.classNames);Object.keys(t).forEach((function(i){t[i].forEach((function(t){if(!t.states)return;t.states.map((function(i){if(t.applied)e.push(i);else e=e.filter((function(t){return t!==i}))}))}))}));this.classNames=__spreadArray(["is-ready"],e);this.nanoResizeStateChange.emit(this.toSimpleObj(t))};t.prototype.toSimpleObj=function(t){var e={};Object.keys(t).forEach((function(i){t[i].forEach((function(t,n){e[n+i]=t.applied}))}));return e};t.prototype.attachRO=function(){var t=this;this.ro=new o((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];t.currentWidth=r.contentRect.width;t.currentHeight=r.contentRect.height}}));this.ro.observe(this.host)};t.prototype.connectedCallback=function(){this.assessChanges=c(this.assessChanges,50)};t.prototype.componentDidLoad=function(){var t=this;if(!this.states)return;if(!this.currentWidth||!this.currentHeight){n((function(){var e=t.host.getBoundingClientRect(),i=e.width,n=e.height;t.currentWidth=i;t.currentHeight=n}))}this.statesChanged()};t.prototype.disconnectedCallback=function(){if(this.ro)this.ro.disconnect()};t.prototype.render=function(){var t;return r(s,{class:(t={},t[this.classNames.join(" ")]=true,t)},r("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{currentHeight:["dimensionChanged"],currentWidth:["dimensionChanged"],states:["statesChanged"]}},enumerable:false,configurable:true});return t}());l.style=":host { display: inline-block } div { height: 100%; }";var h=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--base-color-rgb:var(--nano-skeleton-base-rgb, 228, 230, 232);--color:var(--nano-skeleton-color, rgba(var(--base-color-rgb), 1));--tint:var(--nano-skeleton-tint, rgba(var(--base-color-rgb), 0.5));display:block;position:relative;border-radius:0.25rem;height:1em}.skeleton{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;height:100%;border-radius:inherit}.skeleton__indicator{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;background:var(--color);border-radius:inherit}.skeleton.animate .skeleton__indicator{background:-webkit-gradient(linear, right top, left top, from(var(--tint)), color-stop(var(--color)), color-stop(var(--color)), to(var(--tint)));background:linear-gradient(270deg, var(--tint), var(--color), var(--color), var(--tint));background-size:400% 100%;-webkit-animation:loader 6s ease-in-out infinite;animation:loader 6s ease-in-out infinite}@-webkit-keyframes loader{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes loader{0%{background-position:200% 0}to{background-position:-200% 0}}";var u=t("nano_skeleton",function(){function t(t){e(this,t);this.animated=true}t.prototype.render=function(){return r("div",{class:{skeleton:true,animate:this.animated}},r("div",{class:"skeleton__indicator"}))};return t}());u.style=h}}}));
5
- //# sourceMappingURL=p-241d90eb.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/resize-observe/resize-observe.tsx","src/components/skeleton/skeleton.scss?tag=nano-skeleton&encapsulation=shadow","src/components/skeleton/skeleton.tsx"],"names":["ResizeObserve","exports","class_1","hostRef","_this","this","classNames","assessChanges","currentWidth","currentHeight","changedStates","h","Map","w","hasChanged","Object","keys","appliedStates","forEach","dimType","dim","state","bp","applied","set","applyChanges","includes","prototype","dimensionChanged","statesChanged","states","ro","attachRO","toBpDir","bpDir","bpDirSpl","split","filter","bs","length","parseInt","dir","map","st","trim","_a","key","classes","slice","_b","_c","changes","__spreadArray","push","cl","nanoResizeStateChange","emit","toSimpleObj","stateMaps","retObj","ResizeObserver","entries","_i","entries_1","entry","contentRect","width","height","observe","host","connectedCallback","debounce","componentDidLoad","readTask","getBoundingClientRect","disconnectedCallback","disconnect","render","Host","class","join","skeletonCss","Skeleton","class_2","animated","skeleton","animate"],"mappings":";;;6QAiCaA,EAAaC,EAAA,sBAAA,WAL1B,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,4EAYWA,KAAAC,WAAuB,GA2CxBD,KAAAE,cAAgB,WACtB,IAAKH,EAAKI,eAAiBJ,EAAKK,cAAe,OAC/C,IAAMC,EAA2B,CAAEC,EAAG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AAyB,UAAA6C,iBAAA,WAAA,IAAApE,EAAAC,KACE,IAAKA,KAAKyB,OAAQ,OAClB,IAAKzB,KAAKG,eAAiBH,KAAKI,cAAe,CAC7CgE,GAAS,WACD,IAAA5B,EAAoBzC,EAAKiE,KAAKK,wBAA5BR,EAAKrB,EAAAqB,MAAEC,EAAMtB,EAAAsB,OACrB/D,EAAKI,aAAe0D,EACpB9D,EAAKK,cAAgB0D,KAGzB9D,KAAKwB,iBAGP3B,EAAAyB,UAAAgD,qBAAA,WACE,GAAItE,KAAK0B,GAAI1B,KAAK0B,GAAG6C,cAGvB1E,EAAAyB,UAAAkD,OAAA,iBACE,OACElE,EAACmE,EAAI,CACHC,OAAKlC,EAAA,GACHA,EAACxC,KAAKC,WAAW0E,KAAK,MAAO,SAG/BrE,EAAA,OAAA,8TA7IkB,oECjC1B,IAAMsE,EAAc,qsCCYPC,EAAQjF,EAAA,gBAAA,WALrB,SAAAkF,EAAAhF,aAOUE,KAAA+E,SAAW,KAEnBD,EAAAxD,UAAAkD,OAAA,WACE,OACElE,EAAA,MAAA,CACEoE,MAAO,CACLM,SAAU,KACVC,QAASjF,KAAK+E,WAGhBzE,EAAA,MAAA,CAAKoE,MAAM,mCAZE","sourcesContent":["import {\n Component,\n h,\n Prop,\n Element,\n Host,\n State,\n Watch,\n ComponentInterface,\n Event,\n EventEmitter,\n readTask,\n} from '@stencil/core';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { debounce } from '../../utils';\nimport type { ResizeStateChangeEventDetail } from '../../interface';\n\ntype ResizeObserverState = { states?: string[]; applied?: boolean };\ninterface StateMaps {\n h: Map<number, ResizeObserverState>;\n w: Map<number, ResizeObserverState>;\n}\n\n/**\n * A Resize-Observer utility component.\n * Takes a string list of sizes and optional class-names. Adds class-names and fires `nanoResizeStateChange` events when the component reaches those sizes.\n * @slot - Main slot for any content.\n */\n@Component({\n tag: 'nano-resize-observe',\n shadow: true,\n styles: `:host { display: inline-block } div { height: 100%; }`,\n})\nexport class ResizeObserve implements ComponentInterface {\n private ro: ResizeObserver;\n private appliedStates: StateMaps;\n\n @Element() host: HTMLNanoResizeObserveElement;\n @State() currentWidth: number;\n @State() currentHeight: number;\n @State() classNames: string[] = [];\n\n /** string list of sizes and optional class-names. Adds class-names and fires nanoResizeStateChange events. Upon hitting breakpoints.\n * Format: `states=\"800w, 300h class1 class2\"` */\n @Prop() states: string;\n\n /** A resize break point is switched on or off */\n @Event() nanoResizeStateChange!: EventEmitter<ResizeStateChangeEventDetail>;\n\n @Watch('currentHeight')\n @Watch('currentWidth')\n dimensionChanged() {\n this.assessChanges();\n }\n\n @Watch('states')\n statesChanged() {\n if (!this.states) return;\n if (!this.ro) this.attachRO();\n\n const toBpDir = (bpDir: string) => {\n const bpDirSpl = bpDir.split(/(\\d+)/).filter((bs) => bs.length);\n return { bp: parseInt(bpDirSpl[0]), dir: bpDirSpl[1] };\n };\n this.appliedStates = { h: new Map(), w: new Map() };\n\n // parse state string\n this.states.split(',').map((st) => {\n st = st.trim();\n if (st.includes(' ')) {\n const [key, ...classes] = st.split(' ');\n const { bp, dir } = toBpDir(key);\n this.appliedStates[dir as keyof StateMaps].set(bp, {\n states: classes,\n applied: false,\n });\n } else {\n const { bp, dir } = toBpDir(st);\n this.appliedStates[dir as keyof StateMaps].set(bp, { applied: false });\n }\n });\n }\n\n private assessChanges = () => {\n if (!this.currentWidth && !this.currentHeight) return;\n const changedStates: StateMaps = { h: new Map(), w: new Map() };\n let hasChanged = false;\n\n Object.keys(this.appliedStates).forEach((dimType) => {\n let dim: number;\n if (dimType === 'h') dim = this.currentHeight;\n else dim = this.currentWidth;\n\n this.appliedStates[dimType].forEach(\n (state: ResizeObserverState, bp: number) => {\n if (dim >= bp && state.applied === false) {\n state.applied = true;\n changedStates[dimType].set(bp, state);\n hasChanged = true;\n } else if (dim < bp && state.applied === true) {\n state.applied = false;\n changedStates[dimType].set(bp, state);\n hasChanged = true;\n }\n }\n );\n });\n if (hasChanged) this.applyChanges(changedStates);\n else if (!this.classNames.includes('is-ready'))\n this.classNames = ['is-ready'];\n };\n\n private applyChanges(changes: StateMaps) {\n let classNames = [...this.classNames];\n Object.keys(changes).forEach((dimType: keyof StateMaps) => {\n changes[dimType].forEach((state) => {\n if (!state.states) return;\n state.states.map((st) => {\n if (state.applied) classNames.push(st);\n else classNames = classNames.filter((cl) => cl !== st);\n });\n });\n });\n this.classNames = ['is-ready', ...classNames];\n this.nanoResizeStateChange.emit(this.toSimpleObj(changes));\n }\n\n private toSimpleObj(stateMaps: StateMaps) {\n const retObj = {};\n Object.keys(stateMaps).forEach((dimType: keyof StateMaps) => {\n stateMaps[dimType].forEach((state: ResizeObserverState, bp: number) => {\n retObj[bp + dimType] = state.applied;\n });\n });\n return retObj;\n }\n\n private attachRO() {\n this.ro = new ResizeObserver((entries) => {\n for (const entry of entries) {\n this.currentWidth = entry.contentRect.width;\n this.currentHeight = entry.contentRect.height;\n }\n });\n this.ro.observe(this.host);\n }\n\n connectedCallback() {\n this.assessChanges = debounce(this.assessChanges, 50);\n }\n\n componentDidLoad() {\n if (!this.states) return;\n if (!this.currentWidth || !this.currentHeight) {\n readTask(() => {\n const { width, height } = this.host.getBoundingClientRect();\n this.currentWidth = width;\n this.currentHeight = height;\n });\n }\n this.statesChanged();\n }\n\n disconnectedCallback() {\n if (this.ro) this.ro.disconnect();\n }\n\n render() {\n return (\n <Host\n class={{\n [this.classNames.join(' ')]: true,\n }}\n >\n <slot />\n </Host>\n );\n }\n}\n","@import '../../global/style/nano-theme/components';\n\n:host {\n /**\n * @prop --base-color-rgb: default #{$skeleton-color-rgb};\n * @prop --color: default var(--nano-skeleton-color, rgba(var(--base-color-rgb), 1));\n * @prop --tint: default var(--nano-skeleton-tint, rgba(var(--base-color-rgb), .3));\n */\n\n --base-color-rgb: #{$skeleton-color-rgb};\n --color: var(--nano-skeleton-color, rgba(var(--base-color-rgb), 1));\n --tint: var(--nano-skeleton-tint, rgba(var(--base-color-rgb), 0.5));\n\n display: block;\n position: relative;\n border-radius: 0.25rem;\n height: 1em;\n}\n\n.skeleton {\n display: flex;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n}\n\n.skeleton__indicator {\n flex: 1 1 auto;\n background: var(--color);\n border-radius: inherit;\n}\n\n.skeleton.animate .skeleton__indicator {\n background:\n linear-gradient(\n 270deg,\n var(--tint),\n var(--color),\n var(--color),\n var(--tint)\n );\n background-size: 400% 100%;\n animation: loader 6s ease-in-out infinite;\n}\n\n@keyframes loader {\n 0% {\n background-position: 200% 0;\n }\n\n to {\n background-position: -200% 0;\n }\n}\n","import { Component, Prop, h, ComponentInterface } from '@stencil/core';\n\n/**\n * Skeletons are used to show where content will eventually be drawn.\n * Simple containers for scaffolding layouts that mimic what users will see when content has finished loading.\n * Prevents large areas of empty space during asynchronous operations.\n */\n@Component({\n tag: 'nano-skeleton',\n styleUrl: 'skeleton.scss',\n shadow: true,\n})\nexport class Skeleton implements ComponentInterface {\n /** When `true`, the skeleton will animate. */\n @Prop() animated = true;\n\n render() {\n return (\n <div\n class={{\n skeleton: true,\n animate: this.animated,\n }}\n >\n <div class=\"skeleton__indicator\" />\n </div>\n );\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Web Components for Nanopore digital Web Apps
3
- */
4
- import{r as i,c as r,h as t,e as d,g as o}from"./p-b5c33aff.js";import{i as s}from"./p-debd9efc.js";import{d as n}from"./p-1da5f8df.js";const g=':host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--grid-col-gap:var(--nano-spacing-medium, 16px);--grid-row-gap:var(--nano-spacing-medium, 16px);--current-grid-size:"\'grid size: sm\'";display:block;opacity:0;-webkit-transition:0.2s ease opacity;transition:0.2s ease opacity}:host .grid{display:grid;grid-gap:var(--grid-row-gap) var(--grid-col-gap);height:inherit;min-height:inherit}:host .grid::slotted(*){border:0 solid transparent;background-clip:padding-box;border-width:var(--grid-row-gap) calc(var(--grid-col-gap) / 2)}:host(.ready){opacity:1}:host(.has-grid) .grid{display:-ms-grid;display:grid}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-1),:host(.has-grid) .grid::slotted(.nano-grid-col-start-1){-ms-grid-column:1 !important;grid-column-start:1 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-1),:host(.has-grid) .grid::slotted(.nano-grid-row-start-1){-ms-grid-row:1 !important;grid-row-start:1 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-1),:host(.has-grid) .grid::slotted(.nano-grid-col-span-1){-ms-grid-column-span:1 !important;grid-column-end:span 1 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-1),:host(.has-grid) .grid::slotted(.nano-grid-row-span-1){-ms-grid-row-span:1 !important;grid-row-end:span 1 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-2),:host(.has-grid) .grid::slotted(.nano-grid-col-start-2){-ms-grid-column:2 !important;grid-column-start:2 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-2),:host(.has-grid) .grid::slotted(.nano-grid-row-start-2){-ms-grid-row:2 !important;grid-row-start:2 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-2),:host(.has-grid) .grid::slotted(.nano-grid-col-span-2){-ms-grid-column-span:2 !important;grid-column-end:span 2 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-2),:host(.has-grid) .grid::slotted(.nano-grid-row-span-2){-ms-grid-row-span:2 !important;grid-row-end:span 2 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-3),:host(.has-grid) .grid::slotted(.nano-grid-col-start-3){-ms-grid-column:3 !important;grid-column-start:3 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-3),:host(.has-grid) .grid::slotted(.nano-grid-row-start-3){-ms-grid-row:3 !important;grid-row-start:3 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-3),:host(.has-grid) .grid::slotted(.nano-grid-col-span-3){-ms-grid-column-span:3 !important;grid-column-end:span 3 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-3),:host(.has-grid) .grid::slotted(.nano-grid-row-span-3){-ms-grid-row-span:3 !important;grid-row-end:span 3 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-4),:host(.has-grid) .grid::slotted(.nano-grid-col-start-4){-ms-grid-column:4 !important;grid-column-start:4 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-4),:host(.has-grid) .grid::slotted(.nano-grid-row-start-4){-ms-grid-row:4 !important;grid-row-start:4 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-4),:host(.has-grid) .grid::slotted(.nano-grid-col-span-4){-ms-grid-column-span:4 !important;grid-column-end:span 4 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-4),:host(.has-grid) .grid::slotted(.nano-grid-row-span-4){-ms-grid-row-span:4 !important;grid-row-end:span 4 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-5),:host(.has-grid) .grid::slotted(.nano-grid-col-start-5){-ms-grid-column:5 !important;grid-column-start:5 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-5),:host(.has-grid) .grid::slotted(.nano-grid-row-start-5){-ms-grid-row:5 !important;grid-row-start:5 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-5),:host(.has-grid) .grid::slotted(.nano-grid-col-span-5){-ms-grid-column-span:5 !important;grid-column-end:span 5 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-5),:host(.has-grid) .grid::slotted(.nano-grid-row-span-5){-ms-grid-row-span:5 !important;grid-row-end:span 5 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-6),:host(.has-grid) .grid::slotted(.nano-grid-col-start-6){-ms-grid-column:6 !important;grid-column-start:6 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-6),:host(.has-grid) .grid::slotted(.nano-grid-row-start-6){-ms-grid-row:6 !important;grid-row-start:6 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-6),:host(.has-grid) .grid::slotted(.nano-grid-col-span-6){-ms-grid-column-span:6 !important;grid-column-end:span 6 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-6),:host(.has-grid) .grid::slotted(.nano-grid-row-span-6){-ms-grid-row-span:6 !important;grid-row-end:span 6 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-7),:host(.has-grid) .grid::slotted(.nano-grid-col-start-7){-ms-grid-column:7 !important;grid-column-start:7 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-7),:host(.has-grid) .grid::slotted(.nano-grid-row-start-7){-ms-grid-row:7 !important;grid-row-start:7 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-7),:host(.has-grid) .grid::slotted(.nano-grid-col-span-7){-ms-grid-column-span:7 !important;grid-column-end:span 7 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-7),:host(.has-grid) .grid::slotted(.nano-grid-row-span-7){-ms-grid-row-span:7 !important;grid-row-end:span 7 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-8),:host(.has-grid) .grid::slotted(.nano-grid-col-start-8){-ms-grid-column:8 !important;grid-column-start:8 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-8),:host(.has-grid) .grid::slotted(.nano-grid-row-start-8){-ms-grid-row:8 !important;grid-row-start:8 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-8),:host(.has-grid) .grid::slotted(.nano-grid-col-span-8){-ms-grid-column-span:8 !important;grid-column-end:span 8 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-8),:host(.has-grid) .grid::slotted(.nano-grid-row-span-8){-ms-grid-row-span:8 !important;grid-row-end:span 8 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-9),:host(.has-grid) .grid::slotted(.nano-grid-col-start-9){-ms-grid-column:9 !important;grid-column-start:9 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-9),:host(.has-grid) .grid::slotted(.nano-grid-row-start-9){-ms-grid-row:9 !important;grid-row-start:9 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-9),:host(.has-grid) .grid::slotted(.nano-grid-col-span-9){-ms-grid-column-span:9 !important;grid-column-end:span 9 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-9),:host(.has-grid) .grid::slotted(.nano-grid-row-span-9){-ms-grid-row-span:9 !important;grid-row-end:span 9 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-start-10),:host(.has-grid) .grid::slotted(.nano-grid-col-start-10){-ms-grid-column:10 !important;grid-column-start:10 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-start-10),:host(.has-grid) .grid::slotted(.nano-grid-row-start-10){-ms-grid-row:10 !important;grid-row-start:10 !important}:host(.has-grid) .grid ::slotted(.nano-grid-col-span-10),:host(.has-grid) .grid::slotted(.nano-grid-col-span-10){-ms-grid-column-span:10 !important;grid-column-end:span 10 !important}:host(.has-grid) .grid ::slotted(.nano-grid-row-span-10),:host(.has-grid) .grid::slotted(.nano-grid-row-span-10){-ms-grid-row-span:10 !important;grid-row-end:span 10 !important}:host(.has-grid) .grid::slotted(*){border-width:calc(var(--grid-row-gap) / 2) calc(var(--grid-col-gap) / 2)}:host([is-legacy]){overflow:hidden}:host([is-legacy]) .grid{margin-bottom:calc(var(--grid-row-gap) * -0.5);margin-top:calc(var(--grid-row-gap) * -0.5);margin-left:calc(var(--grid-col-gap) * -0.5);margin-right:calc(var(--grid-col-gap) * -0.5)}nano-grid :host-context[is-legacy]{overflow:visible}nano-grid :host-context[is-legacy] .grid::slotted(:first-child){border-top-width:calc(var(--grid-row-gap) / 2)}nano-grid :host-context[is-legacy] .grid::slotted(:last-child){border-bottom-width:calc(var(--grid-row-gap) / 2)}:host([content-panel]:not([content-panel=false])){display:-ms-flexbox;-ms-flex-direction:column}:host([content-panel]:not([content-panel=false])) .grid{-ms-grid-rows:auto 1fr;grid-template-rows:auto 1fr}:host([full-height]:not([full-height=false])){height:100%}:host([full-height]:not([full-height=false])) .grid{-ms-grid-rows:1fr;grid-template-rows:1fr}:host([full-height]:not([full-height=false])) .grid::slotted(*){min-height:100%}:host([show-helper]:not([show-helper=false])) .grid{position:relative}:host([show-helper]:not([show-helper=false])) .grid::after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;pointer-events:none;background-image:repeating-linear-gradient(to right, rgba(126, 195, 241, 0.25), rgba(126, 195, 241, 0.25) var(--col-width), transparent var(--col-width), transparent var(--repeat-width));background-size:calc(100% + var(--grid-col-gap)) 100%;z-index:100}:host([show-helper]:not([show-helper=false])) .grid::before{content:var(--current-grid-size);font-size:30px;position:absolute;width:100%;left:0;text-align:center;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host(.nano-grid-1){--current-grid-size:"grid size: 1";--col-width:calc(100% - var(--grid-col-gap));--repeat-width:calc(100% / 1)}:host(.nano-grid-1) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[1];grid-template-columns:repeat(1, minmax(var(--col-width), 1fr))}:host(.nano-grid-1) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(2)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(3)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(4)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(5)){-ms-grid-row:5;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(6)){-ms-grid-row:6;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(7)){-ms-grid-row:7;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(8)){-ms-grid-row:8;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(9)){-ms-grid-row:9;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(10)){-ms-grid-row:10;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(11)){-ms-grid-row:11;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(12)){-ms-grid-row:12;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(13)){-ms-grid-row:13;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(14)){-ms-grid-row:14;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(15)){-ms-grid-row:15;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(16)){-ms-grid-row:16;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(17)){-ms-grid-row:17;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(18)){-ms-grid-row:18;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(19)){-ms-grid-row:19;-ms-grid-column:1}:host(.nano-grid-1) .grid::slotted(:nth-child(20)){-ms-grid-row:20;-ms-grid-column:1}:host(.nano-grid-2){--current-grid-size:"grid size: 2";--col-width:calc(50% - var(--grid-col-gap));--repeat-width:calc(100% / 2)}:host(.nano-grid-2) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[2];grid-template-columns:repeat(2, minmax(var(--col-width), 1fr))}:host(.nano-grid-2) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(3)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(4)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(5)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(6)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(7)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(8)){-ms-grid-row:4;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(9)){-ms-grid-row:5;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(10)){-ms-grid-row:5;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(11)){-ms-grid-row:6;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(12)){-ms-grid-row:6;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(13)){-ms-grid-row:7;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(14)){-ms-grid-row:7;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(15)){-ms-grid-row:8;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(16)){-ms-grid-row:8;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(17)){-ms-grid-row:9;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(18)){-ms-grid-row:9;-ms-grid-column:2}:host(.nano-grid-2) .grid::slotted(:nth-child(19)){-ms-grid-row:10;-ms-grid-column:1}:host(.nano-grid-2) .grid::slotted(:nth-child(20)){-ms-grid-row:10;-ms-grid-column:2}:host(.nano-grid-3){--current-grid-size:"grid size: 3";--col-width:calc(33.3333333333% - var(--grid-col-gap));--repeat-width:calc(100% / 3)}:host(.nano-grid-3) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[3];grid-template-columns:repeat(3, minmax(var(--col-width), 1fr))}:host(.nano-grid-3) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(4)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(5)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(6)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(7)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(8)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(9)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(10)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(11)){-ms-grid-row:4;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(12)){-ms-grid-row:4;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(13)){-ms-grid-row:5;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(14)){-ms-grid-row:5;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(15)){-ms-grid-row:5;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(16)){-ms-grid-row:6;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(17)){-ms-grid-row:6;-ms-grid-column:2}:host(.nano-grid-3) .grid::slotted(:nth-child(18)){-ms-grid-row:6;-ms-grid-column:3}:host(.nano-grid-3) .grid::slotted(:nth-child(19)){-ms-grid-row:7;-ms-grid-column:1}:host(.nano-grid-3) .grid::slotted(:nth-child(20)){-ms-grid-row:7;-ms-grid-column:2}:host(.nano-grid-4){--current-grid-size:"grid size: 4";--col-width:calc(25% - var(--grid-col-gap));--repeat-width:calc(100% / 4)}:host(.nano-grid-4) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[4];grid-template-columns:repeat(4, minmax(var(--col-width), 1fr))}:host(.nano-grid-4) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-4) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-4) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-4) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-4) .grid::slotted(:nth-child(5)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-4) .grid::slotted(:nth-child(6)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-4) .grid::slotted(:nth-child(7)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-4) .grid::slotted(:nth-child(8)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-4) .grid::slotted(:nth-child(9)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-4) .grid::slotted(:nth-child(10)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-4) .grid::slotted(:nth-child(11)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-4) .grid::slotted(:nth-child(12)){-ms-grid-row:3;-ms-grid-column:4}:host(.nano-grid-4) .grid::slotted(:nth-child(13)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-4) .grid::slotted(:nth-child(14)){-ms-grid-row:4;-ms-grid-column:2}:host(.nano-grid-4) .grid::slotted(:nth-child(15)){-ms-grid-row:4;-ms-grid-column:3}:host(.nano-grid-4) .grid::slotted(:nth-child(16)){-ms-grid-row:4;-ms-grid-column:4}:host(.nano-grid-4) .grid::slotted(:nth-child(17)){-ms-grid-row:5;-ms-grid-column:1}:host(.nano-grid-4) .grid::slotted(:nth-child(18)){-ms-grid-row:5;-ms-grid-column:2}:host(.nano-grid-4) .grid::slotted(:nth-child(19)){-ms-grid-row:5;-ms-grid-column:3}:host(.nano-grid-4) .grid::slotted(:nth-child(20)){-ms-grid-row:5;-ms-grid-column:4}:host(.nano-grid-5){--current-grid-size:"grid size: 5";--col-width:calc(20% - var(--grid-col-gap));--repeat-width:calc(100% / 5)}:host(.nano-grid-5) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[5];grid-template-columns:repeat(5, minmax(var(--col-width), 1fr))}:host(.nano-grid-5) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-5) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-5) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-5) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-5) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-5) .grid::slotted(:nth-child(6)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-5) .grid::slotted(:nth-child(7)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-5) .grid::slotted(:nth-child(8)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-5) .grid::slotted(:nth-child(9)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-5) .grid::slotted(:nth-child(10)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-5) .grid::slotted(:nth-child(11)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-5) .grid::slotted(:nth-child(12)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-5) .grid::slotted(:nth-child(13)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-5) .grid::slotted(:nth-child(14)){-ms-grid-row:3;-ms-grid-column:4}:host(.nano-grid-5) .grid::slotted(:nth-child(15)){-ms-grid-row:3;-ms-grid-column:5}:host(.nano-grid-5) .grid::slotted(:nth-child(16)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-5) .grid::slotted(:nth-child(17)){-ms-grid-row:4;-ms-grid-column:2}:host(.nano-grid-5) .grid::slotted(:nth-child(18)){-ms-grid-row:4;-ms-grid-column:3}:host(.nano-grid-5) .grid::slotted(:nth-child(19)){-ms-grid-row:4;-ms-grid-column:4}:host(.nano-grid-5) .grid::slotted(:nth-child(20)){-ms-grid-row:4;-ms-grid-column:5}:host(.nano-grid-6){--current-grid-size:"grid size: 6";--col-width:calc(16.6666666667% - var(--grid-col-gap));--repeat-width:calc(100% / 6)}:host(.nano-grid-6) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[6];grid-template-columns:repeat(6, minmax(var(--col-width), 1fr))}:host(.nano-grid-6) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-6) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-6) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-6) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-6) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-6) .grid::slotted(:nth-child(6)){-ms-grid-row:1;-ms-grid-column:6}:host(.nano-grid-6) .grid::slotted(:nth-child(7)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-6) .grid::slotted(:nth-child(8)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-6) .grid::slotted(:nth-child(9)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-6) .grid::slotted(:nth-child(10)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-6) .grid::slotted(:nth-child(11)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-6) .grid::slotted(:nth-child(12)){-ms-grid-row:2;-ms-grid-column:6}:host(.nano-grid-6) .grid::slotted(:nth-child(13)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-6) .grid::slotted(:nth-child(14)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-6) .grid::slotted(:nth-child(15)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-6) .grid::slotted(:nth-child(16)){-ms-grid-row:3;-ms-grid-column:4}:host(.nano-grid-6) .grid::slotted(:nth-child(17)){-ms-grid-row:3;-ms-grid-column:5}:host(.nano-grid-6) .grid::slotted(:nth-child(18)){-ms-grid-row:3;-ms-grid-column:6}:host(.nano-grid-6) .grid::slotted(:nth-child(19)){-ms-grid-row:4;-ms-grid-column:1}:host(.nano-grid-6) .grid::slotted(:nth-child(20)){-ms-grid-row:4;-ms-grid-column:2}:host(.nano-grid-7){--current-grid-size:"grid size: 7";--col-width:calc(14.2857142857% - var(--grid-col-gap));--repeat-width:calc(100% / 7)}:host(.nano-grid-7) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[7];grid-template-columns:repeat(7, minmax(var(--col-width), 1fr))}:host(.nano-grid-7) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-7) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-7) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-7) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-7) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-7) .grid::slotted(:nth-child(6)){-ms-grid-row:1;-ms-grid-column:6}:host(.nano-grid-7) .grid::slotted(:nth-child(7)){-ms-grid-row:1;-ms-grid-column:7}:host(.nano-grid-7) .grid::slotted(:nth-child(8)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-7) .grid::slotted(:nth-child(9)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-7) .grid::slotted(:nth-child(10)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-7) .grid::slotted(:nth-child(11)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-7) .grid::slotted(:nth-child(12)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-7) .grid::slotted(:nth-child(13)){-ms-grid-row:2;-ms-grid-column:6}:host(.nano-grid-7) .grid::slotted(:nth-child(14)){-ms-grid-row:2;-ms-grid-column:7}:host(.nano-grid-7) .grid::slotted(:nth-child(15)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-7) .grid::slotted(:nth-child(16)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-7) .grid::slotted(:nth-child(17)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-7) .grid::slotted(:nth-child(18)){-ms-grid-row:3;-ms-grid-column:4}:host(.nano-grid-7) .grid::slotted(:nth-child(19)){-ms-grid-row:3;-ms-grid-column:5}:host(.nano-grid-7) .grid::slotted(:nth-child(20)){-ms-grid-row:3;-ms-grid-column:6}:host(.nano-grid-8){--current-grid-size:"grid size: 8";--col-width:calc(12.5% - var(--grid-col-gap));--repeat-width:calc(100% / 8)}:host(.nano-grid-8) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[8];grid-template-columns:repeat(8, minmax(var(--col-width), 1fr))}:host(.nano-grid-8) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-8) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-8) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-8) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-8) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-8) .grid::slotted(:nth-child(6)){-ms-grid-row:1;-ms-grid-column:6}:host(.nano-grid-8) .grid::slotted(:nth-child(7)){-ms-grid-row:1;-ms-grid-column:7}:host(.nano-grid-8) .grid::slotted(:nth-child(8)){-ms-grid-row:1;-ms-grid-column:8}:host(.nano-grid-8) .grid::slotted(:nth-child(9)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-8) .grid::slotted(:nth-child(10)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-8) .grid::slotted(:nth-child(11)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-8) .grid::slotted(:nth-child(12)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-8) .grid::slotted(:nth-child(13)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-8) .grid::slotted(:nth-child(14)){-ms-grid-row:2;-ms-grid-column:6}:host(.nano-grid-8) .grid::slotted(:nth-child(15)){-ms-grid-row:2;-ms-grid-column:7}:host(.nano-grid-8) .grid::slotted(:nth-child(16)){-ms-grid-row:2;-ms-grid-column:8}:host(.nano-grid-8) .grid::slotted(:nth-child(17)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-8) .grid::slotted(:nth-child(18)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-8) .grid::slotted(:nth-child(19)){-ms-grid-row:3;-ms-grid-column:3}:host(.nano-grid-8) .grid::slotted(:nth-child(20)){-ms-grid-row:3;-ms-grid-column:4}:host(.nano-grid-9){--current-grid-size:"grid size: 9";--col-width:calc(11.1111111111% - var(--grid-col-gap));--repeat-width:calc(100% / 9)}:host(.nano-grid-9) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[9];grid-template-columns:repeat(9, minmax(var(--col-width), 1fr))}:host(.nano-grid-9) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-9) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-9) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-9) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-9) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-9) .grid::slotted(:nth-child(6)){-ms-grid-row:1;-ms-grid-column:6}:host(.nano-grid-9) .grid::slotted(:nth-child(7)){-ms-grid-row:1;-ms-grid-column:7}:host(.nano-grid-9) .grid::slotted(:nth-child(8)){-ms-grid-row:1;-ms-grid-column:8}:host(.nano-grid-9) .grid::slotted(:nth-child(9)){-ms-grid-row:1;-ms-grid-column:9}:host(.nano-grid-9) .grid::slotted(:nth-child(10)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-9) .grid::slotted(:nth-child(11)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-9) .grid::slotted(:nth-child(12)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-9) .grid::slotted(:nth-child(13)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-9) .grid::slotted(:nth-child(14)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-9) .grid::slotted(:nth-child(15)){-ms-grid-row:2;-ms-grid-column:6}:host(.nano-grid-9) .grid::slotted(:nth-child(16)){-ms-grid-row:2;-ms-grid-column:7}:host(.nano-grid-9) .grid::slotted(:nth-child(17)){-ms-grid-row:2;-ms-grid-column:8}:host(.nano-grid-9) .grid::slotted(:nth-child(18)){-ms-grid-row:2;-ms-grid-column:9}:host(.nano-grid-9) .grid::slotted(:nth-child(19)){-ms-grid-row:3;-ms-grid-column:1}:host(.nano-grid-9) .grid::slotted(:nth-child(20)){-ms-grid-row:3;-ms-grid-column:2}:host(.nano-grid-10){--current-grid-size:"grid size: 10";--col-width:calc(10% - var(--grid-col-gap));--repeat-width:calc(100% / 10)}:host(.nano-grid-10) .grid{-ms-grid-columns:(minmax(var(--col-width), 1fr))[10];grid-template-columns:repeat(10, minmax(var(--col-width), 1fr))}:host(.nano-grid-10) .grid::slotted(:nth-child(1)){-ms-grid-row:1;-ms-grid-column:1}:host(.nano-grid-10) .grid::slotted(:nth-child(2)){-ms-grid-row:1;-ms-grid-column:2}:host(.nano-grid-10) .grid::slotted(:nth-child(3)){-ms-grid-row:1;-ms-grid-column:3}:host(.nano-grid-10) .grid::slotted(:nth-child(4)){-ms-grid-row:1;-ms-grid-column:4}:host(.nano-grid-10) .grid::slotted(:nth-child(5)){-ms-grid-row:1;-ms-grid-column:5}:host(.nano-grid-10) .grid::slotted(:nth-child(6)){-ms-grid-row:1;-ms-grid-column:6}:host(.nano-grid-10) .grid::slotted(:nth-child(7)){-ms-grid-row:1;-ms-grid-column:7}:host(.nano-grid-10) .grid::slotted(:nth-child(8)){-ms-grid-row:1;-ms-grid-column:8}:host(.nano-grid-10) .grid::slotted(:nth-child(9)){-ms-grid-row:1;-ms-grid-column:9}:host(.nano-grid-10) .grid::slotted(:nth-child(10)){-ms-grid-row:1;-ms-grid-column:10}:host(.nano-grid-10) .grid::slotted(:nth-child(11)){-ms-grid-row:2;-ms-grid-column:1}:host(.nano-grid-10) .grid::slotted(:nth-child(12)){-ms-grid-row:2;-ms-grid-column:2}:host(.nano-grid-10) .grid::slotted(:nth-child(13)){-ms-grid-row:2;-ms-grid-column:3}:host(.nano-grid-10) .grid::slotted(:nth-child(14)){-ms-grid-row:2;-ms-grid-column:4}:host(.nano-grid-10) .grid::slotted(:nth-child(15)){-ms-grid-row:2;-ms-grid-column:5}:host(.nano-grid-10) .grid::slotted(:nth-child(16)){-ms-grid-row:2;-ms-grid-column:6}:host(.nano-grid-10) .grid::slotted(:nth-child(17)){-ms-grid-row:2;-ms-grid-column:7}:host(.nano-grid-10) .grid::slotted(:nth-child(18)){-ms-grid-row:2;-ms-grid-column:8}:host(.nano-grid-10) .grid::slotted(:nth-child(19)){-ms-grid-row:2;-ms-grid-column:9}:host(.nano-grid-10) .grid::slotted(:nth-child(20)){-ms-grid-row:2;-ms-grid-column:10}';const h=["col-span","col-start","row-span","row-start"];const l=!!document.head.attachShadow;let a=class{constructor(t){i(this,t);this.nanoBpChange=r(this,"nanoBpChange",7);this.generalClasses=[""];this.gridClass=null;this.isSizes=[null];this.ready=false;this.isSmall=false;this.isMedium=false;this.isLarge=false;this.isXL=false;this.isXXL=false;this.sSize=300;this.mSize=550;this.lSize=800;this.xlSize=1e3;this.showHelper=false;this.contentPanel=false;this.fullHeight=false;this.stateChange=n(this.stateChange.bind(this),100)}propChanged(){this.applySizeClasses()}applySizeClasses(){let i=this.currentWidth;this.isSmall=false;this.isMedium=false;this.isLarge=false;this.isXL=false;this.isXXL=false;this.generalClasses=[];this.gridClass=null;this.isSizes=[null];this.isSmall=true;this.generalClasses.push("is-small");if(this.sCols)this.gridClass=`nano-grid-${this.sCols}`;this.isSizes.push({size:"s",active:true});if(i>this.sSize){this.isMedium=true;this.generalClasses.push("is-medium");if(this.mCols)this.gridClass=`nano-grid-${this.mCols}`;this.isSizes.push({size:"m",active:true})}if(i>this.mSize){this.isLarge=true;this.generalClasses.push("is-large");if(this.lCols)this.gridClass=`nano-grid-${this.lCols}`;this.isSizes.push({size:"l",active:true})}if(i>this.lSize){this.isXL=true;this.generalClasses.push("is-xl");if(this.xlCols)this.gridClass=`nano-grid-${this.xlCols}`;this.isSizes.push({size:"xl",active:true})}if(i>this.xlSize){this.isXXL=true;this.generalClasses.push("is-xxl");if(this.xxlCols)this.gridClass=`nano-grid-${this.xxlCols}`;this.isSizes.push({size:"xxl",active:true})}this.el.style.setProperty("--current-grid-size",`'grid size: ${this.isSizes.slice().pop().size}'`);this.applyChildrenClasses();setTimeout((()=>this.ready=true),0)}stateChange(){this.nanoBpChange.emit(this.generalClasses)}applyChildrenClasses(){let i=this.el.querySelectorAll("nano-grid-item");if(i.length){i.forEach((i=>{i.changeBP(this.isSizes)}));return}let r=[""],t="",d,o,s,n;if(!l)n=this.el.querySelector(".grid")||this.el;else n=this.el;[].map.call(n.children,(i=>{if(!i.hasAttribute("grid-states"))return;s=i.className.split(" ").filter((i=>!i.startsWith("nano-grid-")));i.className=s.join(" ").trim();o=i.getAttribute("grid-states").split(" ");h.forEach((n=>{d=false;this.isSizes.slice().reverse().forEach((function(g){if(d||!g)return;d=o.find((i=>i.indexOf(`${g.size}-${n}`)===0));if(d){s=i.className.split(" ").filter((i=>!i.includes("nano-grid-${stateOpt}")));i.className=s.join(" ").trim();r=d.split("-");r.shift();t=r.join("-");i.classList.add(`nano-grid-${t}`)}}))}))}))}componentWillLoad(){let i,r;if(!l)r=this.el.querySelector(".grid")||this.el;else r=this.el;[].map.call(r.children,(r=>{if(!l){if(r.classList.contains("nano-griditem")||r.nodeName==="NANO-GRID-ITEM")return;i=document.createElement("div");if(r.hasAttribute("grid-states")){i.setAttribute("grid-states",r.getAttribute("grid-states"));r.removeAttribute("grid-states")}this.el.insertBefore(i,r);i.appendChild(r);i.classList.add("nano-griditem")}else if(r.nodeName!=="NANO-GRID-ITEM")r.classList.add("nano-griditem")}))}componentDidLoad(){this.ro=new s((i=>{for(const r of i){if(!r.contentRect.width)return;this.currentWidth=r.contentRect.width;this.applySizeClasses()}}));this.ro.observe(this.el)}disconnectedCallback(){if(this.ro)this.ro.disconnect()}render(){return t(d,{class:{[this.generalClasses.join(" ")]:true,"has-grid":!!this.gridClass,ready:this.ready,[this.gridClass]:true},"is-legacy":!l?true:undefined},t("div",{class:{grid:true}},t("slot",null)))}get el(){return o(this)}static get watchers(){return{sSize:["propChanged"],mSize:["propChanged"],lSize:["propChanged"],xlSize:["propChanged"],sCols:["propChanged"],mCols:["propChanged"],lCols:["propChanged"],xlCols:["propChanged"],xxlCols:["propChanged"],isSmall:["stateChange"],isMedium:["stateChange"],isLarge:["stateChange"],isXL:["stateChange"],isXXL:["stateChange"]}}};a.style=g;const m=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{display:block}";const e=["col-span","col-start","row-span","row-start"];let c=class{constructor(r){i(this,r);this.currGridSizes=[null];this.gridStates=""}updateGridClasses(){this.applyChildrenClasses()}async changeBP(i){if(this.currGridSizes===i)return;this.currGridSizes=i;if(!this.gridStates.length)return;this.applyChildrenClasses()}applyChildrenClasses(){let i=[""],r="",t,d,o;o=this.el.className.split(" ").filter((i=>!i.startsWith("nano-grid-")));this.el.className=o.join(" ").trim();d=this.gridStates.split(" ");e.forEach((s=>{t=false;this.currGridSizes.slice().reverse().forEach((n=>{if(t||!n)return;t=d.find((i=>i.indexOf(`${n.size}-${s}`)===0));if(t){o=this.el.className.split(" ").filter((i=>!i.includes("nano-grid-${stateOpt}")));this.el.className=o.join(" ").trim();i=t.split("-");i.shift();r=i.join("-");this.el.classList.add(`nano-grid-${r}`)}}))}))}render(){return t("slot",null)}get el(){return o(this)}static get watchers(){return{gridStates:["updateGridClasses"]}}};c.style=m;const u=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--padding:0;display:inline-block;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;min-height:inherit;height:100%;display:block;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit}.img__loader,.img__observer{position:absolute;top:0;left:0;bottom:0;right:0;height:100%;width:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;-webkit-transition:0.5s ease opacity, 0.3s ease filter 0.4s;transition:0.5s ease opacity, 0.3s ease filter 0.4s;-webkit-filter:blur(5px);filter:blur(5px)}.img__image.loaded,.img__bg.loaded{opacity:1;-webkit-filter:blur(0.1px);filter:blur(0.1px)}@media not all and (-webkit-min-device-pixel-ratio: 0), not all and (min-resolution: 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{-webkit-filter:blur(0);filter:blur(0)}}}.img__image{-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit;max-width:100%;height:auto}.img__image.hide{visibility:hidden}.img__image.hide.no-height{height:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;top:0;left:0;right:0;bottom:0}";let w=class{constructor(t){i(this,t);this.nanoImgWillLoad=r(this,"nanoImgWillLoad",7);this.nanoImgDidLoad=r(this,"nanoImgDidLoad",7);this.nanoImgError=r(this,"nanoImgError",7);this._srcSet={};this.hasLoaded=false;this.imgStates=null;this.lazy=true;this.autoHeight="content";this.onLoad=()=>{this.nanoImgDidLoad.emit();setTimeout((()=>this.hasLoaded=true),50)};this.onError=()=>{this.nanoImgError.emit()};this.onResize=i=>{Object.entries(i.detail).forEach((([i,r])=>{this._srcSet[i].active=r}));const r=[];Object.keys(this._srcSet).sort().forEach((i=>{if(this._srcSet[i].active)r.push(this._srcSet[i].src)}));if(r.length)this._src=r.slice(-1)[0];else this._src=this.src}}_srcChanged(){this.hasLoaded=false;this.addIO()}srcChanged(){this._src=this.src}srcSetChanged(){if(!this.srcSet)return;delete this._srcSet;this._srcSet={};this.imgStates=this.srcSet.split(",").map((i=>{const[r,t]=i.split(" ").filter((i=>i.length));this._srcSet[r]={src:t,active:false};return r})).join(", ")}lazyChanged(){if(!this.lazy)this.load()}addIO(){if(!this._src||this.hasLoaded)return;if(!this.lazy){this.load();return}if(typeof window!=="undefined"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype){this.removeIO();this.io=new IntersectionObserver((i=>{if(i[0].isIntersecting){this.load();this.removeIO()}}));this.io.observe(this.host)}else setTimeout((()=>this.load()),200)}load(){this.loadError=this.onError;this.loadSrc=this._src;this.nanoImgWillLoad.emit()}removeIO(){if(this.io){this.io.disconnect();this.io=undefined}}connectedCallback(){this.srcChanged();this.srcSetChanged();this.lazyChanged()}componentDidLoad(){this.addIO()}disconnectedCallback(){this.removeIO()}render(){const i=!!this.loadSrc?{"background-image":`url(${this.loadSrc})`}:{};return t("div",{class:"img"},t("nano-skeleton",{class:"img__loader"}),!!this.background&&t("div",{class:{loaded:this.hasLoaded,img__bg:true,"no-height":this.autoHeight==="image"},style:i},t("slot",null)),t("img",{class:{img__image:true,loaded:this.hasLoaded,hide:this.background,"no-height":this.autoHeight==="content"},decoding:"async",src:this.loadSrc,alt:this.alt,onLoad:this.onLoad,onError:this.loadError}),t("nano-resize-observe",{class:"img__observer",onNanoResizeStateChange:this.onResize,states:this.imgStates}))}get host(){return o(this)}static get watchers(){return{_src:["_srcChanged"],src:["srcChanged"],srcSet:["srcSetChanged"],lazy:["lazyChanged"]}}};w.style=u;export{a as nano_grid,c as nano_grid_item,w as nano_img};
5
- //# sourceMappingURL=p-2c8d7273.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/grid/grid.scss?tag=nano-grid&encapsulation=shadow","src/components/grid/grid.tsx","src/components/grid/grid-item.scss?tag=nano-grid-item&encapsulation=shadow","src/components/grid/grid-item.tsx","src/components/img/img.scss?tag=nano-img&encapsulation=shadow","src/components/img/img.tsx"],"names":["gridCss","STATEOPTS","CANSHADOW","document","head","attachShadow","Grid","[object Object]","hostRef","this","generalClasses","gridClass","isSizes","ready","isSmall","isMedium","isLarge","isXL","isXXL","sSize","mSize","lSize","xlSize","showHelper","contentPanel","fullHeight","stateChange","debounce","bind","applySizeClasses","size","currentWidth","push","sCols","active","mCols","lCols","xlCols","xxlCols","el","style","setProperty","slice","pop","applyChildrenClasses","setTimeout","nanoBpChange","emit","gridItems","querySelectorAll","length","forEach","gridItem","changeBP","stateArr","itemState","found","itemStates","classes","ctx","querySelector","map","call","children","gItem","hasAttribute","className","split","filter","c","startsWith","join","trim","getAttribute","stateOpt","reverse","find","state","indexOf","includes","shift","classList","add","wrapper","ele","contains","nodeName","createElement","setAttribute","removeAttribute","insertBefore","appendChild","ro","ResizeObserver","entries","entry","contentRect","width","observe","disconnect","h","Host","class","has-grid","is-legacy","undefined","grid","gridItemCss","GridItem","currGridSizes","gridStates","newGridSizes","imgCss","Img","_srcSet","hasLoaded","imgStates","lazy","autoHeight","onLoad","nanoImgDidLoad","onError","nanoImgError","onResize","e","Object","detail","bp","srcOpts","keys","sort","src","_src","addIO","srcSet","bpSrc","load","window","IntersectionObserverEntry","prototype","removeIO","io","IntersectionObserver","data","isIntersecting","host","loadError","loadSrc","nanoImgWillLoad","srcChanged","srcSetChanged","lazyChanged","bgStyle","background-image","background","loaded","img__bg","no-height","img__image","hide","decoding","alt","onNanoResizeStateChange","states"],"mappings":";;;wIAAA,MAAMA,EAAU,k04BCehB,MAAMC,EAAY,CAAC,WAAY,YAAa,WAAY,aACxD,MAAMC,IAAcC,SAASC,KAAKC,iBAWrBC,EAAI,MAQfC,YAAAC,wDALQC,KAAAC,eAAgC,CAAC,IACjCD,KAAAE,UAAoB,KACpBF,KAAAG,QAAuB,CAAC,MAOvBH,KAAAI,MAAiB,MACjBJ,KAAAK,QAAU,MACVL,KAAAM,SAAW,MACXN,KAAAO,QAAU,MACVP,KAAAQ,KAAO,MACPR,KAAAS,MAAQ,MAKTT,KAAAU,MAAgB,IAKhBV,KAAAW,MAAgB,IAKhBX,KAAAY,MAAgB,IAKhBZ,KAAAa,OAAiB,IA8BAb,KAAAc,WAAsB,MAKtBd,KAAAe,aAAwB,MAKxBf,KAAAgB,WAAsB,MApE7ChB,KAAKiB,YAAcC,EAASlB,KAAKiB,YAAYE,KAAKnB,MAAO,KAoF3DF,cACEE,KAAKoB,mBAGCtB,mBACN,IAAIuB,EAAOrB,KAAKsB,aAEhBtB,KAAKK,QAAU,MACfL,KAAKM,SAAW,MAChBN,KAAKO,QAAU,MACfP,KAAKQ,KAAO,MACZR,KAAKS,MAAQ,MAEbT,KAAKC,eAAiB,GACtBD,KAAKE,UAAY,KACjBF,KAAKG,QAAU,CAAC,MAEhBH,KAAKK,QAAU,KACfL,KAAKC,eAAesB,KAAK,YACzB,GAAIvB,KAAKwB,MAAOxB,KAAKE,UAAY,aAAaF,KAAKwB,QACnDxB,KAAKG,QAAQoB,KAAK,CAAEF,KAAM,IAAKI,OAAQ,OAEvC,GAAIJ,EAAOrB,KAAKU,MAAO,CACrBV,KAAKM,SAAW,KAChBN,KAAKC,eAAesB,KAAK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OAAA,OAGJA,EAAA,MAAA,CACEE,MAAO,CACLwD,WAAY,KACZH,OAAQlJ,KAAK0G,UACb4C,KAAMtJ,KAAKiJ,WACXG,YAAapJ,KAAK6G,aAAe,WAEnC0C,SAAS,QACT7B,IAAK1H,KAAK0I,QACVc,IAAKxJ,KAAKwJ,IACV1C,OAAQ9G,KAAK8G,OACbE,QAAShH,KAAKyI,YAEhB9C,EAAA,sBAAA,CACEE,MAAM,gBACN4D,wBAAyBzJ,KAAKkH,SAC9BwC,OAAQ1J,KAAK2G","sourcesContent":["// we use &::slotted selectors to target ie ... this is a due to a bug with how stencil makes css scoping for browsers without shadow-dom. Need to be mindful incase they ever fix this!\n\n@import '../../global/style/nano-theme/base';\n\n// ie 11 fixes ... maximum numbers we can place on the grid ... upping this number decreases performance a lot.\n$max-grid-cols: 10;\n\n@mixin grid($size: 1) {\n @at-root :host(.nano-grid-#{$size}) {\n --current-grid-size: 'grid size: #{$size}';\n --col-width: calc(#{100 / $size}% - var(--grid-col-gap));\n --repeat-width: calc(100% / #{$size});\n\n .grid {\n grid-template-columns: repeat(#{$size}, minmax(var(--col-width), 1fr));\n\n $current-column: 1;\n $current-row: 1;\n\n @for $i from 1 through ($max-grid-cols * 2) {\n @if $current-column > $size {\n $current-column: 1;\n $current-row: $current-row + 1;\n }\n\n &::slotted(:nth-child(#{$i})) {\n -ms-grid-row: $current-row;\n -ms-grid-column: $current-column;\n // use margin because there's no grid gap.\n }\n $current-column: $current-column + 1;\n }\n }\n }\n}\n\n@mixin grid-spans {\n @for $i from 1 through $max-grid-cols {\n ::slotted(.nano-grid-col-start-#{$i}),\n &::slotted(.nano-grid-col-start-#{$i}) {\n grid-column-start: #{$i} !important;\n }\n\n ::slotted(.nano-grid-row-start-#{$i}),\n &::slotted(.nano-grid-row-start-#{$i}) {\n grid-row-start: #{$i} !important;\n }\n\n ::slotted(.nano-grid-col-span-#{$i}),\n &::slotted(.nano-grid-col-span-#{$i}) {\n grid-column-end: span #{$i} !important;\n }\n\n ::slotted(.nano-grid-row-span-#{$i}),\n &::slotted(.nano-grid-row-span-#{$i}) {\n grid-row-end: span #{$i} !important;\n }\n }\n}\n\n:host {\n /**\n * @prop --grid-col-gap: gap between all columns. Defaults to theme's global padding\n * @prop --grid-row-gap: gap between all rows. Defaults to theme's global padding\n */\n\n --grid-col-gap: #{$spacing-medium};\n --grid-row-gap: #{$spacing-medium};\n --current-grid-size: \"'grid size: sm'\";\n\n display: block;\n opacity: 0;\n transition: 0.2s ease opacity;\n\n .grid {\n /* autoprefixer: ignore next */\n display: grid;\n\n /* autoprefixer: ignore next */\n grid-gap: var(--grid-row-gap) var(--grid-col-gap);\n height: inherit;\n min-height: inherit;\n\n &::slotted(*) {\n border: 0 solid transparent;\n background-clip: padding-box;\n border-width: var(--grid-row-gap) calc(var(--grid-col-gap) / 2);\n }\n }\n}\n\n:host(.ready) {\n opacity: 1;\n}\n\n:host(.has-grid) {\n .grid {\n display: grid;\n\n @include grid-spans;\n\n // ie 'grid gap'. use border because there's no grid gap.\n &::slotted(*) {\n border-width: calc(var(--grid-row-gap) / 2) calc(var(--grid-col-gap) / 2);\n }\n }\n}\n\n// All sorts of IE fuckery to recreate grid-gap when nested etc\n:host([is-legacy]) {\n overflow: hidden;\n\n .grid {\n margin-bottom: calc(var(--grid-row-gap) * -0.5);\n margin-top: calc(var(--grid-row-gap) * -0.5);\n margin-left: calc(var(--grid-col-gap) * -0.5);\n margin-right: calc(var(--grid-col-gap) * -0.5);\n }\n}\n\n// nested\nnano-grid :host-context[is-legacy] {\n overflow: visible;\n\n .grid {\n &::slotted(:first-child) {\n border-top-width: calc(var(--grid-row-gap) / 2);\n }\n\n &::slotted(:last-child) {\n border-bottom-width: calc(var(--grid-row-gap) / 2);\n }\n }\n}\n\n:host([content-panel]:not([content-panel='false'])) {\n display: -ms-flexbox;\n -ms-flex-direction: column;\n\n .grid {\n grid-template-rows: auto 1fr;\n }\n}\n\n:host([full-height]:not([full-height='false'])) {\n height: 100%;\n\n .grid {\n grid-template-rows: 1fr;\n\n &::slotted(*) {\n min-height: 100%;\n }\n }\n}\n\n:host([show-helper]:not([show-helper='false'])) {\n .grid {\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n pointer-events: none;\n background-image:\n repeating-linear-gradient(\n to right,\n hsla(204, 80%, 72%, 0.25),\n hsla(204, 80%, 72%, 0.25) var(--col-width),\n transparent var(--col-width),\n transparent var(--repeat-width)\n );\n background-size: calc(100% + var(--grid-col-gap)) 100%;\n z-index: 100;\n }\n\n &::before {\n content: var(--current-grid-size);\n font-size: 30px;\n position: absolute;\n width: 100%;\n left: 0;\n text-align: center;\n top: 50%;\n transform: translateY(-50%);\n color: rgba(0, 0, 0, 0.2);\n text-transform: uppercase;\n z-index: 99;\n pointer-events: none;\n }\n }\n}\n\n@for $i from 1 through $max-grid-cols {\n @include grid($i);\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Host,\n State,\n Watch,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport ResizeObserver from 'resize-observer-polyfill';\nimport { GridSizes } from '../../interface';\nimport { debounce } from '../../utils';\n\nconst STATEOPTS = ['col-span', 'col-start', 'row-span', 'row-start'];\nconst CANSHADOW = !!document.head.attachShadow;\n\n/**\n * A context-aware CSS grid implementation.\n * Uses it's own width to choose column number - not screen width.\n */\n@Component({\n tag: 'nano-grid',\n styleUrl: 'grid.scss',\n shadow: true,\n})\nexport class Grid {\n @Element() private el: HTMLNanoGridElement;\n private ro: ResizeObserver;\n private generalClasses: Array<string> = [''];\n private gridClass: string = null;\n private isSizes: GridSizes[] = [null];\n private currentWidth: number;\n\n constructor() {\n this.stateChange = debounce(this.stateChange.bind(this), 100);\n }\n\n @State() ready: boolean = false;\n @State() isSmall = false;\n @State() isMedium = false;\n @State() isLarge = false;\n @State() isXL = false;\n @State() isXXL = false;\n\n /**\n * the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.\n */\n @Prop() sSize: number = 300;\n\n /**\n * the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.\n */\n @Prop() mSize: number = 550;\n\n /**\n * the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.\n */\n @Prop() lSize: number = 800;\n\n /**\n * the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.\n */\n @Prop() xlSize: number = 1000;\n\n /**\n * the number of columns the grid has at the small breakpoint.\n */\n @Prop() sCols: number;\n\n /**\n * the number of columns the grid has at the medium breakpoint.\n */\n @Prop() mCols: number;\n\n /**\n * the number of columns the grid has at the large breakpoint.\n */\n @Prop() lCols: number;\n\n /**\n * the number of columns the grid has at the xl breakpoint.\n */\n @Prop() xlCols: number;\n\n /**\n * the number of columns the grid has at the xxl breakpoint (anything greater than the xl breakpoint)\n */\n @Prop() xxlCols: number;\n\n /**\n * shows a grid helper to visualise where columns are\n */\n @Prop({ reflect: true }) showHelper: boolean = false;\n\n /**\n * shortcut for a traditional website like grid (requires more than one row). The second row will auto expand to fill the grid height. The first row and > 2nd row will be the size of their content. e.g. header, body and footer.\n */\n @Prop({ reflect: true }) contentPanel: boolean = false;\n\n /**\n * Helper to make grid items expand to full height in IE11\n */\n @Prop({ reflect: true }) fullHeight: boolean = false;\n\n /**\n * Emitted when the `nano-grid` changes breakpoint\n */\n @Event() nanoBpChange: EventEmitter<string[]>;\n\n @Watch('sSize')\n @Watch('mSize')\n @Watch('lSize')\n @Watch('xlSize')\n @Watch('sCols')\n @Watch('mCols')\n @Watch('lCols')\n @Watch('xlCols')\n @Watch('xxlCols')\n propChanged() {\n this.applySizeClasses();\n }\n\n private applySizeClasses() {\n let size = this.currentWidth;\n\n this.isSmall = false;\n this.isMedium = false;\n this.isLarge = false;\n this.isXL = false;\n this.isXXL = false;\n\n this.generalClasses = [];\n this.gridClass = null;\n this.isSizes = [null];\n\n this.isSmall = true;\n this.generalClasses.push('is-small');\n if (this.sCols) this.gridClass = `nano-grid-${this.sCols}`;\n this.isSizes.push({ size: 's', active: true });\n\n if (size > this.sSize) {\n this.isMedium = true;\n this.generalClasses.push('is-medium');\n if (this.mCols) this.gridClass = `nano-grid-${this.mCols}`;\n this.isSizes.push({ size: 'm', active: true });\n }\n\n if (size > this.mSize) {\n this.isLarge = true;\n this.generalClasses.push('is-large');\n if (this.lCols) this.gridClass = `nano-grid-${this.lCols}`;\n this.isSizes.push({ size: 'l', active: true });\n }\n\n if (size > this.lSize) {\n this.isXL = true;\n this.generalClasses.push('is-xl');\n if (this.xlCols) this.gridClass = `nano-grid-${this.xlCols}`;\n this.isSizes.push({ size: 'xl', active: true });\n }\n\n if (size > this.xlSize) {\n this.isXXL = true;\n this.generalClasses.push('is-xxl');\n if (this.xxlCols) this.gridClass = `nano-grid-${this.xxlCols}`;\n this.isSizes.push({ size: 'xxl', active: true });\n }\n\n this.el.style.setProperty(\n '--current-grid-size',\n `'grid size: ${this.isSizes.slice().pop().size}'`\n );\n this.applyChildrenClasses();\n setTimeout(() => (this.ready = true), 0);\n }\n\n @Watch('isSmall')\n @Watch('isMedium')\n @Watch('isLarge')\n @Watch('isXL')\n @Watch('isXXL')\n stateChange() {\n this.nanoBpChange.emit(this.generalClasses);\n }\n\n private applyChildrenClasses() {\n let gridItems = this.el.querySelectorAll('nano-grid-item');\n if (gridItems.length) {\n gridItems.forEach((gridItem: HTMLNanoGridItemElement) => {\n gridItem.changeBP(this.isSizes);\n });\n return;\n }\n\n // this logic has been put into grid-item. Keep here for legacy for now\n let stateArr: Array<string> = [''],\n itemState: string = '',\n found: any,\n itemStates: Array<string>,\n classes: Array<string>,\n ctx: HTMLElement;\n\n if (!CANSHADOW) ctx = this.el.querySelector('.grid') || this.el;\n else ctx = this.el;\n\n // item states come in 4 possible flavours at every breakpoint. E.g.\n // xl-col-span-2\n // xl-col-start-2\n // xl-row-span-2\n // xl-row-start-2\n\n // loop through all grid items with states.\n [].map.call(ctx.children, (gItem: HTMLElement) => {\n if (!gItem.hasAttribute('grid-states')) return;\n\n // gridItems.forEach(gItem => {\n\n // clear all previous grid state classnames\n classes = gItem.className\n .split(' ')\n .filter((c) => !c.startsWith('nano-grid-'));\n gItem.className = classes.join(' ').trim();\n\n // get all potential states this element can have\n itemStates = gItem.getAttribute('grid-states').split(' ');\n\n // loop through all potential state options: col & row span & start\n STATEOPTS.forEach((stateOpt) => {\n // reset found flag\n found = false;\n\n // loop through all the current valid breakpoints / sizes backwards because\n // we only care about the item's state at the largest current breakpoint.\n this.isSizes\n .slice()\n .reverse()\n .forEach(function (size) {\n if (found || !size) return;\n found = itemStates.find(\n (state) => state.indexOf(`${size.size}-${stateOpt}`) === 0\n );\n\n // found a state at this current size. apply class.\n if (found) {\n // clear previous grid state classname\n classes = gItem.className\n .split(' ')\n .filter((c) => !c.includes('nano-grid-${stateOpt}'));\n gItem.className = classes.join(' ').trim();\n\n stateArr = found.split('-');\n\n // remove the size of the state\n stateArr.shift();\n itemState = stateArr.join('-');\n\n // add new class\n gItem.classList.add(`nano-grid-${itemState}`);\n }\n });\n });\n });\n }\n\n componentWillLoad() {\n let wrapper: HTMLElement, ctx;\n\n if (!CANSHADOW) ctx = this.el.querySelector('.grid') || this.el;\n else ctx = this.el;\n\n [].map.call(ctx.children, (ele: HTMLElement) => {\n if (!CANSHADOW) {\n if (\n ele.classList.contains('nano-griditem') ||\n ele.nodeName === 'NANO-GRID-ITEM'\n )\n return;\n\n wrapper = document.createElement('div');\n if (ele.hasAttribute('grid-states')) {\n wrapper.setAttribute('grid-states', ele.getAttribute('grid-states'));\n ele.removeAttribute('grid-states');\n }\n\n this.el.insertBefore(wrapper, ele);\n wrapper.appendChild(ele);\n wrapper.classList.add('nano-griditem');\n } else if (ele.nodeName !== 'NANO-GRID-ITEM')\n ele.classList.add('nano-griditem');\n });\n }\n\n componentDidLoad() {\n this.ro = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (!entry.contentRect.width) return;\n this.currentWidth = entry.contentRect.width;\n this.applySizeClasses();\n }\n });\n this.ro.observe(this.el);\n }\n\n disconnectedCallback() {\n if (this.ro) this.ro.disconnect();\n }\n\n render() {\n return (\n <Host\n class={{\n [this.generalClasses.join(' ')]: true,\n 'has-grid': !!this.gridClass,\n ready: this.ready,\n [this.gridClass]: true,\n }}\n is-legacy={!CANSHADOW ? true : undefined}\n >\n <div\n class={{\n grid: true,\n }}\n >\n <slot />\n </div>\n </Host>\n );\n }\n}\n\n// <Host class={{\n// [this.generalClasses.join(' ')]: true,\n// [this.gridClass]: true,\n// 'helper': this.showHelper,\n// 'has-grid': !!this.gridClass,\n// 'legacy': !CANSHADOW,\n// 'content-panel': this.contentPanel,\n// 'full-height': this.fullHeight,\n// 'ready': this.ready\n// }}></Host>\n",":host {\n display: block;\n}\n","import { Component, h, Prop, Element, Method, Watch } from '@stencil/core';\nimport { GridSizes } from '../../interface';\n\nconst STATEOPTS = ['col-span', 'col-start', 'row-span', 'row-start'];\n\n/**\n * Grid items to be used with [grid](/story/nano-components-grid) elements\n */\n@Component({\n tag: 'nano-grid-item',\n styleUrl: 'grid-item.scss',\n shadow: true,\n})\nexport class GridItem {\n private currGridSizes: GridSizes[] = [null];\n\n @Element() private el: HTMLNanoGridItemElement;\n /**\n * How to position this item within it's parent grid at different break points. Examples:\n * xl-col-span-2\n * l-col-start-2\n * xxl-row-span-2\n * m-row-start-2\n */\n @Prop() gridStates: string = '';\n\n @Watch('gridStates')\n updateGridClasses() {\n this.applyChildrenClasses();\n }\n\n /**\n * Called by parent grid to trigger new classes\n * @internal\n */\n @Method()\n async changeBP(newGridSizes: GridSizes[]) {\n if (this.currGridSizes === newGridSizes) return;\n this.currGridSizes = newGridSizes;\n\n if (!this.gridStates.length) return;\n this.applyChildrenClasses();\n }\n\n private applyChildrenClasses() {\n let stateArr: Array<string> = [''],\n itemState: string = '',\n found: any,\n itemStates: Array<string>,\n classes: Array<string>;\n\n // item states come in 4 possible flavours at every breakpoint. E.g.\n // xl-col-span-2\n // xl-col-start-2\n // xl-row-span-2\n // xl-row-start-2\n\n // clear all previous grid state classnames\n classes = this.el.className\n .split(' ')\n .filter((c) => !c.startsWith('nano-grid-'));\n this.el.className = classes.join(' ').trim();\n\n // get all potential states this element can have\n itemStates = this.gridStates.split(' ');\n\n // loop through all potential state options: col & row span & start\n STATEOPTS.forEach((stateOpt) => {\n // reset found flag\n found = false;\n\n // loop through all the current valid breakpoints / sizes backwards because\n // we only care about the item's state at the largest current breakpoint.\n this.currGridSizes\n .slice()\n .reverse()\n .forEach((size) => {\n if (found || !size) return;\n found = itemStates.find(\n (state) => state.indexOf(`${size.size}-${stateOpt}`) === 0\n );\n\n // found a state at this current size. apply class.\n if (found) {\n // clear previous grid state classname\n classes = this.el.className\n .split(' ')\n .filter((c) => !c.includes('nano-grid-${stateOpt}'));\n this.el.className = classes.join(' ').trim();\n\n stateArr = found.split('-');\n\n // remove the size of the state\n stateArr.shift();\n itemState = stateArr.join('-');\n\n // add new class\n this.el.classList.add(`nano-grid-${itemState}`);\n }\n });\n });\n }\n\n render() {\n return <slot />;\n }\n}\n",":host {\n /**\n * @prop --padding: padding around any content. Only relevent on `<nano-img background>`\n */\n --padding: 0;\n\n display: inline-block;\n object-fit: cover;\n object-position: center;\n background-size: cover;\n background-position: center;\n\n * {\n border-radius: inherit;\n }\n}\n\n:host([background]:not([background='false'])) {\n display: block;\n}\n\n.img {\n position: relative;\n min-height: inherit;\n height: 100%;\n display: block;\n object-fit: inherit;\n object-position: inherit;\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n}\n\n.img__loader,\n.img__observer {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n z-index: -1;\n}\n\n.img__image,\n.img__bg {\n border-radius: inherit;\n display: block;\n opacity: 0;\n transition: 0.5s ease opacity, 0.3s ease filter 0.4s;\n filter: blur(5px);\n\n &.loaded {\n opacity: 1;\n filter: blur(0.1px);\n\n @media not all and (min-resolution: 0.001dpcm) {\n @supports (-webkit-appearance: none) {\n filter: blur(0);\n }\n }\n }\n}\n\n.img__image {\n object-fit: inherit;\n object-position: inherit;\n max-width: 100%;\n height: auto;\n\n &.hide {\n visibility: hidden;\n\n &.no-height {\n height: 1px;\n position: absolute;\n z-index: -1;\n }\n }\n}\n\n.img__bg {\n background-color: inherit;\n background-position: inherit;\n background-size: inherit;\n background-origin: inherit;\n background-attachment: inherit;\n background-repeat: inherit;\n overflow: auto;\n padding: var(--padding);\n\n &.no-height {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n State,\n Prop,\n Watch,\n h,\n ComponentInterface,\n} from '@stencil/core';\nimport { ResizeStateChangeEventDetail } from '../../interface';\n\n/**\n * Img with benefits. Lazy loading. Simple `srcSet` solution for both `<img>` and `background-image` varieties.\n * @slot - Main slot. Only relevant with `<nano-img background>`\n */\n@Component({\n tag: 'nano-img',\n styleUrl: 'img.scss',\n shadow: true,\n})\nexport class Img implements ComponentInterface {\n private io?: IntersectionObserver;\n private _srcSet: { [key: string]: { src: string; active: boolean } } = {};\n\n @Element() host!: HTMLNanoImgElement;\n\n @State() loadSrc?: string;\n @State() loadError?: () => void;\n @State() hasLoaded: boolean = false;\n @State() imgStates: string = null;\n @State() _src: string;\n @Watch('_src')\n _srcChanged() {\n this.hasLoaded = false;\n this.addIO();\n }\n\n /** This attribute defines the alternative text describing the image.\n * Users will see this text displayed if the image URL is wrong, or if the image is not yet downloaded. */\n @Prop() alt?: string;\n\n /** The image URL. This attribute is mandatory for the `<img>` element. */\n @Prop() src!: string;\n @Watch('src')\n srcChanged() {\n this._src = this.src;\n }\n\n /** Optional list string providing media sizes with corresponding image srcs.\n * i.e. show img-x at 300px wide. Format `srcSet=\"200w src/imgSmall.jpg, 500h src/imgMed.png\"` */\n @Prop() srcSet?: string;\n @Watch('srcSet')\n srcSetChanged() {\n if (!this.srcSet) return;\n\n delete this._srcSet;\n this._srcSet = {};\n\n this.imgStates = this.srcSet\n .split(',')\n .map((bpSrc) => {\n const [bp, src] = bpSrc.split(' ').filter((bp) => bp.length);\n this._srcSet[bp] = { src: src, active: false };\n return bp;\n })\n .join(', ');\n }\n\n /** Render image lazily, when it comes into the browser viewport **/\n @Prop() lazy: boolean = true;\n @Watch('lazy')\n lazyChanged() {\n if (!this.lazy) this.load();\n }\n\n /** Render the image as a background image **/\n @Prop() background?: boolean;\n\n /** When the image is rendered as a background, and there is no preset dimensions of the component,\n * you can set how the component height will be set. Via image size or via the content **/\n @Prop() autoHeight: 'content' | 'image' = 'content';\n\n /** Emitted when the img src has been set */\n @Event() nanoImgWillLoad!: EventEmitter<void>;\n\n /** Emitted when the image has finished loading */\n @Event() nanoImgDidLoad!: EventEmitter<void>;\n\n /** Emitted when the img fails to load */\n @Event() nanoImgError!: EventEmitter<void>;\n\n private addIO() {\n if (!this._src || this.hasLoaded) return;\n if (!this.lazy) {\n this.load();\n return;\n }\n if (\n typeof (window as any) !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype\n ) {\n this.removeIO();\n this.io = new IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n\n this.io.observe(this.host);\n } else setTimeout(() => this.load(), 200);\n }\n\n private load() {\n this.loadError = this.onError;\n this.loadSrc = this._src;\n this.nanoImgWillLoad.emit();\n }\n\n private onLoad = () => {\n this.nanoImgDidLoad.emit();\n setTimeout(() => (this.hasLoaded = true), 50);\n };\n\n private onError = () => {\n this.nanoImgError.emit();\n };\n\n private onResize = (e: { detail: ResizeStateChangeEventDetail }) => {\n Object.entries(e.detail).forEach(([bp, active]) => {\n this._srcSet[bp].active = active;\n });\n\n // sort and find the highest sized matching image.\n const srcOpts = [];\n Object.keys(this._srcSet)\n .sort()\n .forEach((bp) => {\n if (this._srcSet[bp].active) srcOpts.push(this._srcSet[bp].src);\n });\n\n if (srcOpts.length) this._src = srcOpts.slice(-1)[0];\n // no matching image? Set back to default\n else this._src = this.src;\n };\n\n private removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n connectedCallback() {\n this.srcChanged();\n this.srcSetChanged();\n this.lazyChanged();\n }\n\n componentDidLoad() {\n this.addIO();\n }\n\n disconnectedCallback() {\n this.removeIO();\n }\n\n render() {\n const bgStyle = !!this.loadSrc\n ? { 'background-image': `url(${this.loadSrc})` }\n : {};\n return (\n <div class=\"img\">\n <nano-skeleton class=\"img__loader\"></nano-skeleton>\n {!!this.background && (\n <div\n class={{\n loaded: this.hasLoaded,\n img__bg: true,\n 'no-height': this.autoHeight === 'image',\n }}\n style={bgStyle}\n >\n <slot />\n </div>\n )}\n <img\n class={{\n img__image: true,\n loaded: this.hasLoaded,\n hide: this.background,\n 'no-height': this.autoHeight === 'content',\n }}\n decoding=\"async\"\n src={this.loadSrc}\n alt={this.alt}\n onLoad={this.onLoad}\n onError={this.loadError}\n />\n <nano-resize-observe\n class=\"img__observer\"\n onNanoResizeStateChange={this.onResize}\n states={this.imgStates}\n />\n </div>\n );\n }\n}\n"]}