@nanoporetech-digital/components 2.9.0 → 2.10.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 (473) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/{algoliasearch.umd-dcf18a4a.js → algoliasearch.umd-7ee60729.js} +3 -3
  3. package/dist/cjs/{algoliasearch.umd-dcf18a4a.js.map → algoliasearch.umd-7ee60729.js.map} +1 -1
  4. package/dist/cjs/{component-store-722032a5.js → component-store-19844199.js} +37 -25
  5. package/dist/cjs/component-store-19844199.js.map +1 -0
  6. package/dist/cjs/index-cb62df44.js +5 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/nano-algolia-filter.cjs.entry.js +1 -1
  9. package/dist/cjs/nano-algolia-input.cjs.entry.js +2 -2
  10. package/dist/cjs/nano-algolia.cjs.entry.js +2 -2
  11. package/dist/cjs/nano-checkbox-group.cjs.entry.js +58 -20
  12. package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nano-checkbox.cjs.entry.js +27 -15
  14. package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
  15. package/dist/cjs/nano-components.cjs.js +1 -1
  16. package/dist/cjs/nano-date-input.cjs.entry.js +17 -4
  17. package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nano-dialog.cjs.entry.js +13 -2
  19. package/dist/cjs/nano-dialog.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nano-field-validator.cjs.entry.js +529 -0
  21. package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -0
  22. package/dist/cjs/nano-file-upload.cjs.entry.js +59 -36
  23. package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
  25. package/dist/cjs/nano-icon.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nano-input.cjs.entry.js +25 -13
  27. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nano-nav-item_2.cjs.entry.js +40 -15
  29. package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  31. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nano-tab-group.cjs.entry.js +1 -1
  33. package/dist/collection/collection-manifest.json +2 -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.css +5 -5
  41. package/dist/collection/components/checkbox/checkbox-group.js +119 -25
  42. package/dist/collection/components/checkbox/checkbox-group.js.map +1 -1
  43. package/dist/collection/components/checkbox/checkbox.css +1 -1
  44. package/dist/collection/components/checkbox/checkbox.js +83 -22
  45. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  46. package/dist/collection/components/datalist/datalist.js +1 -1
  47. package/dist/collection/components/date-input/date-input.js +44 -12
  48. package/dist/collection/components/date-input/date-input.js.map +1 -1
  49. package/dist/collection/components/date-picker/date-picker.js +5 -5
  50. package/dist/collection/components/details/details.js +1 -1
  51. package/dist/collection/components/dialog/dialog.js +34 -1
  52. package/dist/collection/components/dialog/dialog.js.map +1 -1
  53. package/dist/collection/components/dropdown/dropdown.js +1 -1
  54. package/dist/collection/components/field-validator/field-validator.js +577 -0
  55. package/dist/collection/components/field-validator/field-validator.js.map +1 -0
  56. package/dist/collection/components/file-upload/file-upload.css +17 -5
  57. package/dist/collection/components/file-upload/file-upload.js +111 -44
  58. package/dist/collection/components/file-upload/file-upload.js.map +1 -1
  59. package/dist/collection/components/global-nav/global-nav.js +4 -4
  60. package/dist/collection/components/grid/grid-item.js +1 -1
  61. package/dist/collection/components/icon/icon.js +2 -2
  62. package/dist/collection/components/icon/icon.js.map +1 -1
  63. package/dist/collection/components/input/input.css +2 -2
  64. package/dist/collection/components/input/input.js +51 -22
  65. package/dist/collection/components/input/input.js.map +1 -1
  66. package/dist/collection/components/nav-item/nav-item.js +4 -4
  67. package/dist/collection/components/range/range.js +4 -4
  68. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  69. package/dist/collection/components/select/select.css +2 -2
  70. package/dist/collection/components/select/select.js +74 -25
  71. package/dist/collection/components/select/select.js.map +1 -1
  72. package/dist/collection/components/slides/slides.js +7 -7
  73. package/dist/collection/components/{sticky → sticker}/sticker.css +0 -0
  74. package/dist/collection/components/{sticky → sticker}/sticker.js +2 -2
  75. package/dist/collection/components/sticker/sticker.js.map +1 -0
  76. package/dist/collection/components/tabs/tab-group.js +2 -2
  77. package/dist/collection/utils/store/component-store.js +4 -13
  78. package/dist/collection/utils/store/component-store.js.map +1 -1
  79. package/dist/collection/utils/store/get-set.js +15 -1
  80. package/dist/collection/utils/store/get-set.js.map +1 -1
  81. package/dist/components/algoliasearch.umd.js +2 -2
  82. package/dist/components/algoliasearch.umd.js.map +1 -1
  83. package/dist/components/component-store.js +36 -24
  84. package/dist/components/component-store.js.map +1 -1
  85. package/dist/components/icon.js.map +1 -1
  86. package/dist/components/input.js +27 -14
  87. package/dist/components/input.js.map +1 -1
  88. package/dist/components/nano-checkbox-group.js +62 -21
  89. package/dist/components/nano-checkbox-group.js.map +1 -1
  90. package/dist/components/nano-checkbox.js +31 -17
  91. package/dist/components/nano-checkbox.js.map +1 -1
  92. package/dist/components/nano-date-input.js +18 -4
  93. package/dist/components/nano-date-input.js.map +1 -1
  94. package/dist/components/nano-dialog.js +13 -1
  95. package/dist/components/nano-dialog.js.map +1 -1
  96. package/dist/components/nano-field-validator.d.ts +11 -0
  97. package/dist/components/nano-field-validator.js +557 -0
  98. package/dist/components/nano-field-validator.js.map +1 -0
  99. package/dist/components/nano-file-upload.js +62 -37
  100. package/dist/components/nano-file-upload.js.map +1 -1
  101. package/dist/components/select.js +44 -17
  102. package/dist/components/select.js.map +1 -1
  103. package/dist/components/sticker.js +2 -2
  104. package/dist/components/sticker.js.map +1 -1
  105. package/dist/custom-elements/index.d.ts +6 -0
  106. package/dist/custom-elements/index.js +2436 -554
  107. package/dist/custom-elements/index.js.map +1 -1
  108. package/dist/esm/{algolia-data-dd72d1b7.js → algolia-data-80c1169a.js} +2 -2
  109. package/dist/esm/{algolia-data-dd72d1b7.js.map → algolia-data-80c1169a.js.map} +1 -1
  110. package/dist/esm/{algoliasearch.umd-6143495f.js → algoliasearch.umd-86359963.js} +3 -3
  111. package/dist/esm/{algoliasearch.umd-6143495f.js.map → algoliasearch.umd-86359963.js.map} +1 -1
  112. package/dist/esm/{component-store-b6fbfa35.js → component-store-d238fee4.js} +38 -26
  113. package/dist/esm/component-store-d238fee4.js.map +1 -0
  114. package/dist/esm/{form-control-cf23c6a2.js → form-control-ad05507c.js} +2 -2
  115. package/dist/esm/{form-control-cf23c6a2.js.map → form-control-ad05507c.js.map} +1 -1
  116. package/dist/esm/{index-5f8d16e7.js → index-c42becad.js} +7 -2
  117. package/dist/esm/{index-5f8d16e7.js.map → index-c42becad.js.map} +1 -1
  118. package/dist/esm/loader.js +2 -2
  119. package/dist/esm/nano-accordion.entry.js +1 -1
  120. package/dist/esm/nano-alert.entry.js +1 -1
  121. package/dist/esm/nano-algolia-filter.entry.js +3 -3
  122. package/dist/esm/nano-algolia-input.entry.js +4 -4
  123. package/dist/esm/nano-algolia-pagination.entry.js +2 -2
  124. package/dist/esm/nano-algolia-results.entry.js +2 -2
  125. package/dist/esm/nano-algolia.entry.js +4 -4
  126. package/dist/esm/nano-aspect-ratio.entry.js +1 -1
  127. package/dist/esm/nano-checkbox-group.entry.js +59 -21
  128. package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
  129. package/dist/esm/nano-checkbox.entry.js +28 -16
  130. package/dist/esm/nano-checkbox.entry.js.map +1 -1
  131. package/dist/esm/nano-components.js +2 -2
  132. package/dist/esm/nano-datalist_3.entry.js +1 -1
  133. package/dist/esm/nano-date-input.entry.js +18 -5
  134. package/dist/esm/nano-date-input.entry.js.map +1 -1
  135. package/dist/esm/nano-date-picker.entry.js +1 -1
  136. package/dist/esm/nano-details.entry.js +1 -1
  137. package/dist/esm/nano-dialog.entry.js +14 -3
  138. package/dist/esm/nano-dialog.entry.js.map +1 -1
  139. package/dist/esm/nano-drawer.entry.js +1 -1
  140. package/dist/esm/nano-dropdown.entry.js +1 -1
  141. package/dist/esm/nano-field-validator.entry.js +525 -0
  142. package/dist/esm/nano-field-validator.entry.js.map +1 -0
  143. package/dist/esm/nano-file-upload.entry.js +60 -37
  144. package/dist/esm/nano-file-upload.entry.js.map +1 -1
  145. package/dist/esm/nano-global-nav.entry.js +3 -3
  146. package/dist/esm/nano-global-search-results.entry.js +1 -1
  147. package/dist/esm/nano-grid_3.entry.js +1 -1
  148. package/dist/esm/nano-hero.entry.js +1 -1
  149. package/dist/esm/nano-icon-button.entry.js +1 -1
  150. package/dist/esm/nano-icon.entry.js +1 -1
  151. package/dist/esm/nano-icon.entry.js.map +1 -1
  152. package/dist/esm/nano-input.entry.js +28 -16
  153. package/dist/esm/nano-input.entry.js.map +1 -1
  154. package/dist/esm/nano-menu-drawer.entry.js +1 -1
  155. package/dist/esm/nano-nav-item_2.entry.js +43 -18
  156. package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
  157. package/dist/esm/nano-range.entry.js +1 -1
  158. package/dist/esm/nano-rating.entry.js +1 -1
  159. package/dist/esm/nano-resize-observe_2.entry.js +1 -1
  160. package/dist/esm/nano-slide.entry.js +1 -1
  161. package/dist/esm/nano-slides.entry.js +1 -1
  162. package/dist/esm/nano-spinner.entry.js +1 -1
  163. package/dist/esm/nano-split-pane.entry.js +1 -1
  164. package/dist/esm/nano-sticker.entry.js +3 -3
  165. package/dist/esm/nano-sticker.entry.js.map +1 -1
  166. package/dist/esm/nano-tab-content.entry.js +1 -1
  167. package/dist/esm/nano-tab-group.entry.js +2 -2
  168. package/dist/esm/nano-tab.entry.js +1 -1
  169. package/dist/esm/nano-tooltip.entry.js +1 -1
  170. package/dist/esm-es5/{algolia-data-dd72d1b7.js → algolia-data-80c1169a.js} +2 -2
  171. package/dist/esm-es5/{algolia-data-dd72d1b7.js.map → algolia-data-80c1169a.js.map} +0 -0
  172. package/dist/esm-es5/{algoliasearch.umd-6143495f.js → algoliasearch.umd-86359963.js} +3 -3
  173. package/dist/esm-es5/{algoliasearch.umd-6143495f.js.map → algoliasearch.umd-86359963.js.map} +1 -1
  174. package/dist/esm-es5/component-store-d238fee4.js +5 -0
  175. package/dist/esm-es5/component-store-d238fee4.js.map +1 -0
  176. package/dist/esm-es5/{form-control-cf23c6a2.js → form-control-ad05507c.js} +2 -2
  177. package/dist/esm-es5/{form-control-cf23c6a2.js.map → form-control-ad05507c.js.map} +0 -0
  178. package/dist/esm-es5/{index-5f8d16e7.js → index-c42becad.js} +2 -2
  179. package/dist/esm-es5/{index-5f8d16e7.js.map → index-c42becad.js.map} +0 -0
  180. package/dist/esm-es5/loader.js +1 -1
  181. package/dist/esm-es5/loader.js.map +1 -1
  182. package/dist/esm-es5/nano-accordion.entry.js +1 -1
  183. package/dist/esm-es5/nano-alert.entry.js +1 -1
  184. package/dist/esm-es5/nano-algolia-filter.entry.js +1 -1
  185. package/dist/esm-es5/nano-algolia-input.entry.js +1 -1
  186. package/dist/esm-es5/nano-algolia-pagination.entry.js +1 -1
  187. package/dist/esm-es5/nano-algolia-results.entry.js +1 -1
  188. package/dist/esm-es5/nano-algolia.entry.js +1 -1
  189. package/dist/esm-es5/nano-aspect-ratio.entry.js +1 -1
  190. package/dist/esm-es5/nano-checkbox-group.entry.js +2 -2
  191. package/dist/esm-es5/nano-checkbox-group.entry.js.map +1 -1
  192. package/dist/esm-es5/nano-checkbox.entry.js +1 -1
  193. package/dist/esm-es5/nano-checkbox.entry.js.map +1 -1
  194. package/dist/esm-es5/nano-components.js +1 -1
  195. package/dist/esm-es5/nano-components.js.map +1 -1
  196. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  197. package/dist/esm-es5/nano-date-input.entry.js +1 -1
  198. package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
  199. package/dist/esm-es5/nano-date-picker.entry.js +1 -1
  200. package/dist/esm-es5/nano-details.entry.js +1 -1
  201. package/dist/esm-es5/nano-dialog.entry.js +1 -1
  202. package/dist/esm-es5/nano-dialog.entry.js.map +1 -1
  203. package/dist/esm-es5/nano-drawer.entry.js +1 -1
  204. package/dist/esm-es5/nano-dropdown.entry.js +1 -1
  205. package/dist/esm-es5/nano-field-validator.entry.js +5 -0
  206. package/dist/esm-es5/nano-field-validator.entry.js.map +1 -0
  207. package/dist/esm-es5/nano-file-upload.entry.js +2 -2
  208. package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
  209. package/dist/esm-es5/nano-global-nav.entry.js +1 -1
  210. package/dist/esm-es5/nano-global-search-results.entry.js +1 -1
  211. package/dist/esm-es5/nano-grid_3.entry.js +1 -1
  212. package/dist/esm-es5/nano-hero.entry.js +1 -1
  213. package/dist/esm-es5/nano-icon-button.entry.js +1 -1
  214. package/dist/esm-es5/nano-icon.entry.js +1 -1
  215. package/dist/esm-es5/nano-icon.entry.js.map +1 -1
  216. package/dist/esm-es5/nano-input.entry.js +1 -1
  217. package/dist/esm-es5/nano-input.entry.js.map +1 -1
  218. package/dist/esm-es5/nano-menu-drawer.entry.js +1 -1
  219. package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
  220. package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
  221. package/dist/esm-es5/nano-range.entry.js +1 -1
  222. package/dist/esm-es5/nano-rating.entry.js +1 -1
  223. package/dist/esm-es5/nano-resize-observe_2.entry.js +1 -1
  224. package/dist/esm-es5/nano-slide.entry.js +1 -1
  225. package/dist/esm-es5/nano-slides.entry.js +1 -1
  226. package/dist/esm-es5/nano-spinner.entry.js +1 -1
  227. package/dist/esm-es5/nano-split-pane.entry.js +1 -1
  228. package/dist/esm-es5/nano-sticker.entry.js +1 -1
  229. package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
  230. package/dist/esm-es5/nano-tab-content.entry.js +1 -1
  231. package/dist/esm-es5/nano-tab-group.entry.js +1 -1
  232. package/dist/esm-es5/nano-tab.entry.js +2 -2
  233. package/dist/esm-es5/nano-tooltip.entry.js +1 -1
  234. package/dist/nano-components/nano-components.css +1 -1
  235. package/dist/nano-components/nano-components.esm.js +1 -1
  236. package/dist/nano-components/nano-components.esm.js.map +1 -1
  237. package/dist/nano-components/nano-components.js +1 -1
  238. package/dist/nano-components/{p-6f94d755.entry.js → p-00eaa36a.entry.js} +2 -2
  239. package/dist/nano-components/{p-6f94d755.entry.js.map → p-00eaa36a.entry.js.map} +0 -0
  240. package/dist/nano-components/{p-4429caac.system.entry.js → p-0c6c2141.system.entry.js} +2 -2
  241. package/dist/nano-components/{p-4429caac.system.entry.js.map → p-0c6c2141.system.entry.js.map} +0 -0
  242. package/dist/nano-components/{p-7232c046.system.entry.js → p-0d0dfc06.system.entry.js} +2 -2
  243. package/dist/nano-components/{p-7232c046.system.entry.js.map → p-0d0dfc06.system.entry.js.map} +0 -0
  244. package/dist/nano-components/{p-e562bffd.entry.js → p-0e2e3f4a.entry.js} +2 -2
  245. package/dist/nano-components/{p-e562bffd.entry.js.map → p-0e2e3f4a.entry.js.map} +0 -0
  246. package/dist/nano-components/{p-56ba0d63.entry.js → p-1030797a.entry.js} +2 -2
  247. package/dist/nano-components/{p-56ba0d63.entry.js.map → p-1030797a.entry.js.map} +0 -0
  248. package/dist/nano-components/p-11451a4b.system.entry.js +5 -0
  249. package/dist/nano-components/p-11451a4b.system.entry.js.map +1 -0
  250. package/dist/nano-components/p-129e2b4b.system.js +5 -0
  251. package/dist/nano-components/p-129e2b4b.system.js.map +1 -0
  252. package/dist/nano-components/{p-c0ddb4c3.entry.js → p-166ade3e.entry.js} +2 -2
  253. package/dist/nano-components/{p-c0ddb4c3.entry.js.map → p-166ade3e.entry.js.map} +0 -0
  254. package/dist/nano-components/{p-5653961d.system.entry.js → p-1a30dfdd.system.entry.js} +2 -2
  255. package/dist/nano-components/p-1a30dfdd.system.entry.js.map +1 -0
  256. package/dist/nano-components/p-1b120f53.entry.js +5 -0
  257. package/dist/nano-components/p-1b120f53.entry.js.map +1 -0
  258. package/dist/nano-components/{p-7d351076.system.entry.js → p-21af2a5e.system.entry.js} +2 -2
  259. package/dist/nano-components/{p-7d351076.system.entry.js.map → p-21af2a5e.system.entry.js.map} +0 -0
  260. package/dist/nano-components/{p-346588cc.entry.js → p-222d8095.entry.js} +2 -2
  261. package/dist/nano-components/{p-346588cc.entry.js.map → p-222d8095.entry.js.map} +0 -0
  262. package/dist/nano-components/{p-933c35a6.system.entry.js → p-241d90eb.system.entry.js} +2 -2
  263. package/dist/nano-components/{p-933c35a6.system.entry.js.map → p-241d90eb.system.entry.js.map} +0 -0
  264. package/dist/nano-components/{p-040b6cda.entry.js → p-2649fc8e.entry.js} +2 -2
  265. package/dist/nano-components/{p-040b6cda.entry.js.map → p-2649fc8e.entry.js.map} +0 -0
  266. package/dist/nano-components/{p-3456db01.entry.js → p-27efac97.entry.js} +2 -2
  267. package/dist/nano-components/{p-3456db01.entry.js.map → p-27efac97.entry.js.map} +0 -0
  268. package/dist/nano-components/{p-462ad4f1.entry.js → p-2c8d7273.entry.js} +2 -2
  269. package/dist/nano-components/{p-462ad4f1.entry.js.map → p-2c8d7273.entry.js.map} +0 -0
  270. package/dist/nano-components/{p-2e6c55e2.entry.js → p-2d53d1a0.entry.js} +2 -2
  271. package/dist/nano-components/{p-2e6c55e2.entry.js.map → p-2d53d1a0.entry.js.map} +0 -0
  272. package/dist/nano-components/{p-1f99d776.entry.js → p-3093915f.entry.js} +2 -2
  273. package/dist/nano-components/{p-1f99d776.entry.js.map → p-3093915f.entry.js.map} +0 -0
  274. package/dist/nano-components/{p-8a8f893b.system.entry.js → p-316f83a9.system.entry.js} +2 -2
  275. package/dist/nano-components/{p-8a8f893b.system.entry.js.map → p-316f83a9.system.entry.js.map} +0 -0
  276. package/dist/nano-components/{p-7246bef5.entry.js → p-325c1cad.entry.js} +2 -2
  277. package/dist/nano-components/{p-7246bef5.entry.js.map → p-325c1cad.entry.js.map} +0 -0
  278. package/dist/nano-components/{p-ec39b143.system.entry.js → p-32f396c0.system.entry.js} +2 -2
  279. package/dist/nano-components/{p-ec39b143.system.entry.js.map → p-32f396c0.system.entry.js.map} +0 -0
  280. package/dist/nano-components/p-32f4516e.js +5 -0
  281. package/dist/nano-components/p-32f4516e.js.map +1 -0
  282. package/dist/nano-components/{p-43543d18.entry.js → p-333237e8.entry.js} +2 -2
  283. package/dist/nano-components/{p-43543d18.entry.js.map → p-333237e8.entry.js.map} +0 -0
  284. package/dist/nano-components/{p-1e8321ea.entry.js → p-35108e08.entry.js} +2 -2
  285. package/dist/nano-components/{p-1e8321ea.entry.js.map → p-35108e08.entry.js.map} +0 -0
  286. package/dist/nano-components/{p-a898bf92.system.entry.js → p-379e21d9.system.entry.js} +2 -2
  287. package/dist/nano-components/{p-a898bf92.system.entry.js.map → p-379e21d9.system.entry.js.map} +0 -0
  288. package/dist/nano-components/{p-3ad1d5aa.system.entry.js → p-39d36fd1.system.entry.js} +2 -2
  289. package/dist/nano-components/{p-3ad1d5aa.system.entry.js.map → p-39d36fd1.system.entry.js.map} +0 -0
  290. package/dist/nano-components/{p-41a2e2e4.system.js → p-3a00de47.system.js} +2 -2
  291. package/dist/nano-components/{p-41a2e2e4.system.js.map → p-3a00de47.system.js.map} +0 -0
  292. package/dist/nano-components/{p-6afdb510.system.entry.js → p-3ccb176c.system.entry.js} +2 -2
  293. package/dist/nano-components/{p-6afdb510.system.entry.js.map → p-3ccb176c.system.entry.js.map} +0 -0
  294. package/dist/nano-components/{p-08b43111.entry.js → p-3e930ac7.entry.js} +2 -2
  295. package/dist/nano-components/{p-08b43111.entry.js.map → p-3e930ac7.entry.js.map} +0 -0
  296. package/dist/nano-components/{p-d8d8bac6.system.entry.js → p-42cebbfe.system.entry.js} +2 -2
  297. package/dist/nano-components/{p-d8d8bac6.system.entry.js.map → p-42cebbfe.system.entry.js.map} +0 -0
  298. package/dist/nano-components/{p-1ca46443.entry.js → p-45070c8f.entry.js} +2 -2
  299. package/dist/nano-components/{p-1ca46443.entry.js.map → p-45070c8f.entry.js.map} +0 -0
  300. package/dist/nano-components/{p-3ef30ded.system.entry.js → p-48874481.system.entry.js} +2 -2
  301. package/dist/nano-components/{p-3ef30ded.system.entry.js.map → p-48874481.system.entry.js.map} +0 -0
  302. package/dist/nano-components/{p-08ffc9a1.entry.js → p-4e2c0abb.entry.js} +2 -2
  303. package/dist/nano-components/{p-08ffc9a1.entry.js.map → p-4e2c0abb.entry.js.map} +0 -0
  304. package/dist/nano-components/{p-090f22a9.system.entry.js → p-5100ae70.system.entry.js} +2 -2
  305. package/dist/nano-components/{p-090f22a9.system.entry.js.map → p-5100ae70.system.entry.js.map} +0 -0
  306. package/dist/nano-components/{p-593de29b.system.entry.js → p-52769304.system.entry.js} +2 -2
  307. package/dist/nano-components/{p-593de29b.system.entry.js.map → p-52769304.system.entry.js.map} +0 -0
  308. package/dist/nano-components/{p-8278c5d2.system.entry.js → p-56f86047.system.entry.js} +2 -2
  309. package/dist/nano-components/{p-8278c5d2.system.entry.js.map → p-56f86047.system.entry.js.map} +0 -0
  310. package/dist/nano-components/{p-2057d480.system.entry.js → p-5b66bb8f.system.entry.js} +2 -2
  311. package/dist/nano-components/{p-2057d480.system.entry.js.map → p-5b66bb8f.system.entry.js.map} +0 -0
  312. package/dist/nano-components/{p-033296c7.system.entry.js → p-5d17cfbb.system.entry.js} +2 -2
  313. package/dist/nano-components/{p-033296c7.system.entry.js.map → p-5d17cfbb.system.entry.js.map} +0 -0
  314. package/dist/nano-components/{p-88f17c86.system.entry.js → p-5d5ea4ab.system.entry.js} +2 -2
  315. package/dist/nano-components/{p-88f17c86.system.entry.js.map → p-5d5ea4ab.system.entry.js.map} +0 -0
  316. package/dist/nano-components/{p-20387cde.system.entry.js → p-6b4dd158.system.entry.js} +2 -2
  317. package/dist/nano-components/{p-20387cde.system.entry.js.map → p-6b4dd158.system.entry.js.map} +0 -0
  318. package/dist/nano-components/{p-d24811c8.system.js → p-6b5760b1.system.js} +3 -3
  319. package/dist/nano-components/{p-d24811c8.system.js.map → p-6b5760b1.system.js.map} +1 -1
  320. package/dist/nano-components/p-6d138abf.entry.js +5 -0
  321. package/dist/nano-components/p-6d138abf.entry.js.map +1 -0
  322. package/dist/nano-components/{p-5066e563.system.entry.js → p-6dad332b.system.entry.js} +2 -2
  323. package/dist/nano-components/{p-5066e563.system.entry.js.map → p-6dad332b.system.entry.js.map} +0 -0
  324. package/dist/nano-components/{p-730f60ea.entry.js → p-6ddb51e4.entry.js} +2 -2
  325. package/dist/nano-components/p-6ddb51e4.entry.js.map +1 -0
  326. package/dist/nano-components/p-71bbb7ba.entry.js +5 -0
  327. package/dist/nano-components/p-71bbb7ba.entry.js.map +1 -0
  328. package/dist/nano-components/{p-a6c84740.js → p-71e9fa33.js} +2 -2
  329. package/dist/nano-components/{p-a6c84740.js.map → p-71e9fa33.js.map} +0 -0
  330. package/dist/nano-components/{p-39a5280e.system.entry.js → p-72ed603c.system.entry.js} +2 -2
  331. package/dist/nano-components/{p-39a5280e.system.entry.js.map → p-72ed603c.system.entry.js.map} +0 -0
  332. package/dist/nano-components/{p-313970ff.entry.js → p-73985eda.entry.js} +2 -2
  333. package/dist/nano-components/{p-313970ff.entry.js.map → p-73985eda.entry.js.map} +0 -0
  334. package/dist/nano-components/{p-58d7f10f.entry.js → p-76c903db.entry.js} +2 -2
  335. package/dist/nano-components/{p-58d7f10f.entry.js.map → p-76c903db.entry.js.map} +0 -0
  336. package/dist/nano-components/{p-3aa1d07d.entry.js → p-76d9d1d4.entry.js} +2 -2
  337. package/dist/nano-components/p-76d9d1d4.entry.js.map +1 -0
  338. package/dist/nano-components/{p-f53989c3.system.entry.js → p-7aa7425d.system.entry.js} +2 -2
  339. package/dist/nano-components/{p-f53989c3.system.entry.js.map → p-7aa7425d.system.entry.js.map} +1 -1
  340. package/dist/nano-components/{p-531d5275.system.entry.js → p-7ad4a27a.system.entry.js} +2 -2
  341. package/dist/nano-components/p-7ad4a27a.system.entry.js.map +1 -0
  342. package/dist/nano-components/{p-2ae4918d.system.entry.js → p-7e55b214.system.entry.js} +2 -2
  343. package/dist/nano-components/{p-2ae4918d.system.entry.js.map → p-7e55b214.system.entry.js.map} +0 -0
  344. package/dist/nano-components/{p-62ecd3a1.system.entry.js → p-7f1374b6.system.entry.js} +2 -2
  345. package/dist/nano-components/{p-62ecd3a1.system.entry.js.map → p-7f1374b6.system.entry.js.map} +0 -0
  346. package/dist/nano-components/{p-1e974cad.entry.js → p-7fe9d769.entry.js} +2 -2
  347. package/dist/nano-components/{p-1e974cad.entry.js.map → p-7fe9d769.entry.js.map} +0 -0
  348. package/dist/nano-components/p-85c8b070.system.entry.js +5 -0
  349. package/dist/nano-components/p-85c8b070.system.entry.js.map +1 -0
  350. package/dist/nano-components/{p-f2e7d2f9.system.entry.js → p-88779174.system.entry.js} +2 -2
  351. package/dist/nano-components/{p-f2e7d2f9.system.entry.js.map → p-88779174.system.entry.js.map} +0 -0
  352. package/dist/nano-components/{p-4535e3bb.entry.js → p-8b6fcd6d.entry.js} +2 -2
  353. package/dist/nano-components/{p-4535e3bb.entry.js.map → p-8b6fcd6d.entry.js.map} +0 -0
  354. package/dist/nano-components/{p-6ade3290.entry.js → p-8eb4f24a.entry.js} +2 -2
  355. package/dist/nano-components/{p-6ade3290.entry.js.map → p-8eb4f24a.entry.js.map} +0 -0
  356. package/dist/nano-components/{p-07bdf44d.entry.js → p-8fe2f846.entry.js} +2 -2
  357. package/dist/nano-components/{p-07bdf44d.entry.js.map → p-8fe2f846.entry.js.map} +0 -0
  358. package/dist/nano-components/p-96150b2c.system.entry.js +5 -0
  359. package/dist/nano-components/p-96150b2c.system.entry.js.map +1 -0
  360. package/dist/nano-components/{p-bcd69559.entry.js → p-97b13ad2.entry.js} +2 -2
  361. package/dist/nano-components/{p-bcd69559.entry.js.map → p-97b13ad2.entry.js.map} +0 -0
  362. package/dist/nano-components/{p-c9c1a345.system.entry.js → p-a02cc654.system.entry.js} +2 -2
  363. package/dist/nano-components/{p-c9c1a345.system.entry.js.map → p-a02cc654.system.entry.js.map} +0 -0
  364. package/dist/nano-components/{p-a77e3fbb.js → p-a0b93616.js} +3 -3
  365. package/dist/nano-components/{p-a77e3fbb.js.map → p-a0b93616.js.map} +1 -1
  366. package/dist/nano-components/p-a4969844.entry.js +5 -0
  367. package/dist/nano-components/p-a4969844.entry.js.map +1 -0
  368. package/dist/nano-components/{p-70dec19f.entry.js → p-a6327a9a.entry.js} +2 -2
  369. package/dist/nano-components/{p-70dec19f.entry.js.map → p-a6327a9a.entry.js.map} +0 -0
  370. package/dist/nano-components/p-a81db037.entry.js +5 -0
  371. package/dist/nano-components/p-a81db037.entry.js.map +1 -0
  372. package/dist/nano-components/{p-a315ed2c.entry.js → p-a9a4fc3e.entry.js} +2 -2
  373. package/dist/nano-components/{p-a315ed2c.entry.js.map → p-a9a4fc3e.entry.js.map} +1 -1
  374. package/dist/nano-components/{p-98222c39.system.entry.js → p-ab07c1fa.system.entry.js} +2 -2
  375. package/dist/nano-components/{p-98222c39.system.entry.js.map → p-ab07c1fa.system.entry.js.map} +0 -0
  376. package/dist/nano-components/{p-ab5813a7.js → p-b5c33aff.js} +2 -2
  377. package/dist/nano-components/{p-ab5813a7.js.map → p-b5c33aff.js.map} +0 -0
  378. package/dist/nano-components/p-bc394857.system.entry.js +5 -0
  379. package/dist/nano-components/p-bc394857.system.entry.js.map +1 -0
  380. package/dist/nano-components/{p-b4f8e541.entry.js → p-bce998f2.entry.js} +2 -2
  381. package/dist/nano-components/{p-b4f8e541.entry.js.map → p-bce998f2.entry.js.map} +0 -0
  382. package/dist/nano-components/{p-92f85aaf.system.entry.js → p-bf9aa89d.system.entry.js} +2 -2
  383. package/dist/nano-components/{p-92f85aaf.system.entry.js.map → p-bf9aa89d.system.entry.js.map} +0 -0
  384. package/dist/nano-components/p-c070ffd3.system.entry.js +5 -0
  385. package/dist/nano-components/p-c070ffd3.system.entry.js.map +1 -0
  386. package/dist/nano-components/{p-50514e5e.entry.js → p-c4156fea.entry.js} +2 -2
  387. package/dist/nano-components/{p-50514e5e.entry.js.map → p-c4156fea.entry.js.map} +0 -0
  388. package/dist/nano-components/p-c9a2d24c.entry.js +5 -0
  389. package/dist/nano-components/p-c9a2d24c.entry.js.map +1 -0
  390. package/dist/nano-components/{p-6eb25600.system.js → p-d01bd3c3.system.js} +2 -2
  391. package/dist/nano-components/{p-6eb25600.system.js.map → p-d01bd3c3.system.js.map} +0 -0
  392. package/dist/nano-components/{p-1238f0fc.system.entry.js → p-d0385948.system.entry.js} +2 -2
  393. package/dist/nano-components/{p-1238f0fc.system.entry.js.map → p-d0385948.system.entry.js.map} +0 -0
  394. package/dist/nano-components/{p-b59d2bd5.entry.js → p-d122b1ff.entry.js} +2 -2
  395. package/dist/nano-components/{p-b59d2bd5.entry.js.map → p-d122b1ff.entry.js.map} +0 -0
  396. package/dist/nano-components/{p-394c3c19.entry.js → p-defd4552.entry.js} +2 -2
  397. package/dist/nano-components/{p-394c3c19.entry.js.map → p-defd4552.entry.js.map} +0 -0
  398. package/dist/nano-components/p-e7140887.system.js +5 -0
  399. package/dist/nano-components/p-e7140887.system.js.map +1 -0
  400. package/dist/nano-components/{p-69439aa1.system.entry.js → p-e817ab4a.system.entry.js} +2 -2
  401. package/dist/nano-components/{p-69439aa1.system.entry.js.map → p-e817ab4a.system.entry.js.map} +0 -0
  402. package/dist/nano-components/{p-22884654.system.entry.js → p-eacf5b5b.system.entry.js} +2 -2
  403. package/dist/nano-components/{p-22884654.system.entry.js.map → p-eacf5b5b.system.entry.js.map} +0 -0
  404. package/dist/nano-components/p-ed336501.entry.js +5 -0
  405. package/dist/nano-components/p-ed336501.entry.js.map +1 -0
  406. package/dist/nano-components/{p-5ae80fd7.js → p-ef7f1e9c.js} +2 -2
  407. package/dist/nano-components/{p-5ae80fd7.js.map → p-ef7f1e9c.js.map} +0 -0
  408. package/dist/nano-components/{p-59b3d24b.system.js → p-f48be9f5.system.js} +2 -2
  409. package/dist/nano-components/{p-59b3d24b.system.js.map → p-f48be9f5.system.js.map} +0 -0
  410. package/dist/nano-components/p-f710c763.system.entry.js +5 -0
  411. package/dist/nano-components/p-f710c763.system.entry.js.map +1 -0
  412. package/dist/nano-components/{p-65c10b3f.entry.js → p-fbe3c89e.entry.js} +2 -2
  413. package/dist/nano-components/{p-65c10b3f.entry.js.map → p-fbe3c89e.entry.js.map} +0 -0
  414. package/dist/nano-components/p-fc3702a0.system.entry.js +5 -0
  415. package/dist/nano-components/p-fc3702a0.system.entry.js.map +1 -0
  416. package/dist/nano-components/{p-ba13bb56.entry.js → p-ffc2063a.entry.js} +2 -2
  417. package/dist/nano-components/{p-ba13bb56.entry.js.map → p-ffc2063a.entry.js.map} +0 -0
  418. package/dist/nano-components/{p-4870e76d.system.entry.js → p-fff27907.system.entry.js} +2 -2
  419. package/dist/nano-components/{p-4870e76d.system.entry.js.map → p-fff27907.system.entry.js.map} +0 -0
  420. package/dist/types/components/checkbox/checkbox-group.d.ts +12 -1
  421. package/dist/types/components/checkbox/checkbox.d.ts +11 -3
  422. package/dist/types/components/date-input/date-input.d.ts +4 -0
  423. package/dist/types/components/dialog/dialog.d.ts +4 -1
  424. package/dist/types/components/field-validator/field-validator.d.ts +125 -0
  425. package/dist/types/components/file-upload/file-upload.d.ts +8 -0
  426. package/dist/types/components/icon/icon.d.ts +1 -1
  427. package/dist/types/components/input/input.d.ts +6 -1
  428. package/dist/types/components/select/select.d.ts +7 -1
  429. package/dist/types/components/{sticky → sticker}/sticker.d.ts +0 -0
  430. package/dist/types/components.d.ts +187 -4
  431. package/dist/types/utils/store/get-set.d.ts +1 -1
  432. package/docs-json.json +436 -14
  433. package/docs-vscode.json +77 -1
  434. package/package.json +3 -2
  435. package/dist/cjs/component-store-722032a5.js.map +0 -1
  436. package/dist/collection/components/sticky/sticker.js.map +0 -1
  437. package/dist/esm/component-store-b6fbfa35.js.map +0 -1
  438. package/dist/esm-es5/component-store-b6fbfa35.js +0 -5
  439. package/dist/esm-es5/component-store-b6fbfa35.js.map +0 -1
  440. package/dist/nano-components/p-096682d9.system.js +0 -5
  441. package/dist/nano-components/p-096682d9.system.js.map +0 -1
  442. package/dist/nano-components/p-09e38c5f.system.entry.js +0 -5
  443. package/dist/nano-components/p-09e38c5f.system.entry.js.map +0 -1
  444. package/dist/nano-components/p-10a6216d.system.entry.js +0 -5
  445. package/dist/nano-components/p-10a6216d.system.entry.js.map +0 -1
  446. package/dist/nano-components/p-3aa1d07d.entry.js.map +0 -1
  447. package/dist/nano-components/p-4265cf95.system.entry.js +0 -5
  448. package/dist/nano-components/p-4265cf95.system.entry.js.map +0 -1
  449. package/dist/nano-components/p-44c08842.system.entry.js +0 -5
  450. package/dist/nano-components/p-44c08842.system.entry.js.map +0 -1
  451. package/dist/nano-components/p-457d4893.entry.js +0 -5
  452. package/dist/nano-components/p-457d4893.entry.js.map +0 -1
  453. package/dist/nano-components/p-531d5275.system.entry.js.map +0 -1
  454. package/dist/nano-components/p-5653961d.system.entry.js.map +0 -1
  455. package/dist/nano-components/p-5a0095f9.js +0 -5
  456. package/dist/nano-components/p-5a0095f9.js.map +0 -1
  457. package/dist/nano-components/p-5a315696.entry.js +0 -5
  458. package/dist/nano-components/p-5a315696.entry.js.map +0 -1
  459. package/dist/nano-components/p-730f60ea.entry.js.map +0 -1
  460. package/dist/nano-components/p-802e1416.system.entry.js +0 -5
  461. package/dist/nano-components/p-802e1416.system.entry.js.map +0 -1
  462. package/dist/nano-components/p-84767e87.entry.js +0 -5
  463. package/dist/nano-components/p-84767e87.entry.js.map +0 -1
  464. package/dist/nano-components/p-971b40a4.system.entry.js +0 -5
  465. package/dist/nano-components/p-971b40a4.system.entry.js.map +0 -1
  466. package/dist/nano-components/p-9d35768b.entry.js +0 -5
  467. package/dist/nano-components/p-9d35768b.entry.js.map +0 -1
  468. package/dist/nano-components/p-9ea13fbe.entry.js +0 -5
  469. package/dist/nano-components/p-9ea13fbe.entry.js.map +0 -1
  470. package/dist/nano-components/p-e1f46998.system.js +0 -5
  471. package/dist/nano-components/p-e1f46998.system.js.map +0 -1
  472. package/dist/nano-components/p-e7c69d4f.entry.js +0 -5
  473. package/dist/nano-components/p-e7c69d4f.entry.js.map +0 -1
@@ -0,0 +1,125 @@
1
+ import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
+ import { ObservableMap } from '@stencil/store';
3
+ declare type NanoFormEles = HTMLNanoInputElement | HTMLNanoCheckboxElement | HTMLNanoSelectElement | HTMLNanoDateInputElement | HTMLNanoFileUploadElement;
4
+ interface ValueStore {
5
+ [key: string]: any;
6
+ }
7
+ interface ValidationState {
8
+ fields: NanoFormEles[];
9
+ valid: boolean;
10
+ validityMessage: string;
11
+ dirty: boolean;
12
+ name: string | number;
13
+ value: any;
14
+ }
15
+ /**
16
+ * A toolbox for `nano-...` form fields and form validation.
17
+ *
18
+ * - Easy to add validation accross field dependencies - e.g. "When Field1 contains '123' Field2 must contain '456'"
19
+ * - Easy access to whole form and individual field validity states
20
+ * - Easy access to form data payload
21
+ * - Scroll to invalid field on submit
22
+ */
23
+ export declare class FieldValidator implements ComponentInterface {
24
+ host: HTMLNanoFieldValidatorElement;
25
+ store: ObservableMap<ValueStore>;
26
+ userForm: HTMLFormElement;
27
+ submitted: boolean;
28
+ userFormChange(): void;
29
+ private get activeForm();
30
+ private set activeForm(value);
31
+ private _activeForm;
32
+ private mo;
33
+ private fields;
34
+ private internalValidate;
35
+ /** When should the fields perform validation. Will override / sync all nested `nano-...` controls */
36
+ validateOn?: 'dirty' | 'submit' | 'submitThenDirty';
37
+ /** Sync up validateOn with all fields */
38
+ validateOnChange(): void;
39
+ /** Tries to scroll to the first invalid field on submit */
40
+ scrollToInvalid: boolean;
41
+ /** Returns true if any nested fields have been changed @readonly */
42
+ get dirty(): boolean;
43
+ _dirty: boolean;
44
+ /** Returns true if all the nested fields are currently valid @readonly */
45
+ get valid(): boolean;
46
+ _valid: boolean;
47
+ /** The current form payload as a reactive store. @readonly */
48
+ get payload(): ValueStore;
49
+ /** Returns true if validation errors will be displayed to the user */
50
+ get showValidation(): boolean;
51
+ /** Get the current validation state of all form fields. @readonly
52
+ * ```
53
+ {
54
+ fields: NanoFormEles[];
55
+ valid: boolean;
56
+ validityMessage: string;
57
+ dirty: boolean;
58
+ name: string | number;
59
+ value: any;
60
+ }[]
61
+ ```
62
+ */
63
+ get validationState(): ValidationState[];
64
+ /** A validation callback method.
65
+ * @param field - The field name currently being evaluated
66
+ * @param value - The value of the field currently being evaluated
67
+ * @param fields - an array of all currently observered form fields and values
68
+ * @returns field names mapped to an object of status message and validity e.g.
69
+ * ```js
70
+ * {field1: {msg: `This is invalid!`}, field2: {msg: `This is valid!`, valid: true}}
71
+ * ```
72
+ */
73
+ validation: (field: string, value: string, fields: ValueStore) => {
74
+ [key: string]: {
75
+ msg: string;
76
+ valid?: boolean;
77
+ };
78
+ };
79
+ /** Fired whenever the payload changes */
80
+ nanoPayloadChange: EventEmitter<ValueStore>;
81
+ /**
82
+ * Fired on valid form submission.
83
+ * Note: if you wish to prevent a form from submitting, instead
84
+ * of using / preventing the native `submit` event, use this event
85
+ * ```js
86
+ * ele.addEventListener('nanoSubmit', (e) => {
87
+ * e.preventDefault()
88
+ * })
89
+ * ```
90
+ */
91
+ nanoSubmit: EventEmitter;
92
+ /** Fire on invalid form submission attempt */
93
+ nanoInvalid: EventEmitter;
94
+ private attachSlotObserver;
95
+ /** Checks for new `nano-...` fields and adds them to our watch array and value store */
96
+ private setupFields;
97
+ /** Loops through all `nano-...` fields and extracts their values into our store */
98
+ private setFieldValue;
99
+ /** Checks for user defined validations */
100
+ private validate;
101
+ /**
102
+ * Utility to smooth out setting error messages
103
+ * (it's a different method on `nano-checkbox` 'cos they don't show errors themselves)
104
+ * @param field
105
+ * @param msg
106
+ */
107
+ private setFieldError;
108
+ /** Loops through all store entries and checks field validity */
109
+ private validateAllFields;
110
+ private scrollToFirstInvalid;
111
+ private submitForm;
112
+ /** Fired whenever store values change and potentially checks validity */
113
+ private handleStoreChange;
114
+ /** Handles field value changes and passes to store */
115
+ private handleFieldChange;
116
+ /** Handles default field validation events */
117
+ private handleFormInvalid;
118
+ /** stops default form submission, checks if valid, then submits manually */
119
+ private handleSubmit;
120
+ connectedCallback(): void;
121
+ componentDidLoad(): void;
122
+ disconnectedCallback(): void;
123
+ render(): any;
124
+ }
125
+ export {};
@@ -58,11 +58,17 @@ export declare class FileUpload implements ComponentInterface {
58
58
  showInlineError: boolean;
59
59
  /** When should the field perform validation */
60
60
  validateOn?: 'dirty' | 'submit' | 'submitThenDirty';
61
+ /** The form element to associate with this input (its form owner). Must be the id of a form. */
62
+ form?: string | null;
61
63
  protected shouldValidate(): void;
62
64
  _invalid: boolean;
63
65
  /** This will be true when the control is in an invalid state.
64
66
  * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly */
65
67
  get invalid(): boolean;
68
+ /**
69
+ * Current validation message - if any. @readonly
70
+ */
71
+ get validityMessage(): string;
66
72
  /** A File array that lists every selected file.
67
73
  * Has an added `objectURL` property returning a `DOMString`
68
74
  * containing an object URL that can be used to reference the contents of the specified source
@@ -96,6 +102,7 @@ export declare class FileUpload implements ComponentInterface {
96
102
  showError(message: string): Promise<void>;
97
103
  globalClickHandler(e: Event): void;
98
104
  globalKeydownHandler(e: KeyboardEvent): void;
105
+ onReset(e: any): void;
99
106
  private onClearClick;
100
107
  private onBlur;
101
108
  private onFocus;
@@ -103,6 +110,7 @@ export declare class FileUpload implements ComponentInterface {
103
110
  private checkFileSize;
104
111
  private checkFileType;
105
112
  private validate;
113
+ private showInlineValidation;
106
114
  private slotChangeObserver;
107
115
  private processSlottedContent;
108
116
  private addNewFiles;
@@ -16,7 +16,7 @@ export declare class Icon {
16
16
  /**
17
17
  * Specifies the label to use for accessibility. Defaults to the icon name.
18
18
  */
19
- ariaLabel?: string;
19
+ ariaLabel: string;
20
20
  /**
21
21
  * Specifies whether the icon should horizontally flip when `dir` is `"rtl"`.
22
22
  */
@@ -25,6 +25,7 @@ export declare class Input implements ComponentInterface {
25
25
  private _nativeInputWrap;
26
26
  private get nativeInputWrap();
27
27
  private set nativeInputWrap(value);
28
+ constructor();
28
29
  hasFocus: boolean;
29
30
  hasLabelSlot: boolean;
30
31
  hasHelperSlot: boolean;
@@ -39,6 +40,10 @@ export declare class Input implements ComponentInterface {
39
40
  */
40
41
  get invalid(): boolean;
41
42
  _invalid: boolean;
43
+ /**
44
+ * Current validation message - if any. @readonly
45
+ */
46
+ get validityMessage(): string;
42
47
  /**
43
48
  * The color to use from the application's color palette.
44
49
  */
@@ -163,7 +168,7 @@ export declare class Input implements ComponentInterface {
163
168
  */
164
169
  type: TextFieldTypes;
165
170
  /**
166
- * The form element to associate the select with (its form owner). Must be the id of a form.
171
+ * The form element to associate the input with (its form owner). Must be the id of a form.
167
172
  */
168
173
  form?: string | null;
169
174
  /**
@@ -33,6 +33,7 @@ export declare class Select implements ComponentInterface {
33
33
  private _datalist;
34
34
  private get datalist();
35
35
  private set datalist(value);
36
+ constructor();
36
37
  currInsertIndex: number;
37
38
  showErrorMsg: boolean;
38
39
  errorMessage: string;
@@ -47,7 +48,11 @@ export declare class Select implements ComponentInterface {
47
48
  * Validity is determined by the `required` prop. Or if custom validity message is set.
48
49
  */
49
50
  get invalid(): boolean;
50
- private _invalid;
51
+ _invalid: boolean;
52
+ /**
53
+ * Current validation message - if any. @readonly
54
+ */
55
+ get validityMessage(): string;
51
56
  /**
52
57
  * The color to use from your application's color palette.
53
58
  * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
@@ -220,6 +225,7 @@ export declare class Select implements ComponentInterface {
220
225
  private slotChangeObserver;
221
226
  private processSlottedContent;
222
227
  private getLabel;
228
+ onReset(e: any): void;
223
229
  handleBlur(e: KeyboardEvent | MouseEvent): void;
224
230
  private setOptions;
225
231
  private handleDocumentKeyDown;
@@ -245,6 +245,10 @@ export namespace Components {
245
245
  * If `true`, the user cannot interact with the checkbox.
246
246
  */
247
247
  "disabled": boolean;
248
+ /**
249
+ * The form element to associate the input with (its form owner). Must be the id of a form.
250
+ */
251
+ "form"?: string | null;
248
252
  /**
249
253
  * Returns the native input control
250
254
  */
@@ -283,7 +287,7 @@ export namespace Components {
283
287
  /**
284
288
  * Sets a custom validation message. If `message` is not empty, the field will be considered invalid. Use in conjunction with `nano-checkbox-group`
285
289
  */
286
- "setError": (message: string) => Promise<void>;
290
+ "setError": (message: string, updateStatus?: boolean) => Promise<void>;
287
291
  /**
288
292
  * Sets focus on the checkbox.
289
293
  */
@@ -296,6 +300,10 @@ export namespace Components {
296
300
  | 'tag'
297
301
  | 'segment'
298
302
  | 'segment-pill';
303
+ /**
304
+ * Current validation message - if any. @readonly
305
+ */
306
+ "validityMessage": string;
299
307
  /**
300
308
  * The value of a checkbox is analogous to the value of an `<input type='checkbox'>`, it's only present when `checked` is true.
301
309
  */
@@ -328,6 +336,12 @@ export namespace Components {
328
336
  * @returns `{ isValid: boolean, errorMessage: string }`
329
337
  */
330
338
  "reportValidity": (validateFirst: boolean) => Promise<ControlValidity>;
339
+ /**
340
+ * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.
341
+ * @param message - the error message to show
342
+ * @param optVal - optionally supply an option value to target which checkbox to show invalidate against (default is the first)
343
+ */
344
+ "showError": (message: string, optVal?: string) => Promise<void>;
331
345
  /**
332
346
  * Whether to show validation errors underneath input
333
347
  */
@@ -336,6 +350,10 @@ export namespace Components {
336
350
  * When should the field perform validation
337
351
  */
338
352
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
353
+ /**
354
+ * Current validation message - if any. @readonly
355
+ */
356
+ "validityMessage": string;
339
357
  }
340
358
  interface NanoDatalist {
341
359
  /**
@@ -506,6 +524,10 @@ export namespace Components {
506
524
  * When should the field perform validation
507
525
  */
508
526
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
527
+ /**
528
+ * Current validation message - if any. @readonly
529
+ */
530
+ "validityMessage": string;
509
531
  /**
510
532
  * Current value. Must be in IS0-8601 format: YYYY-MM-DD.
511
533
  */
@@ -579,6 +601,10 @@ export namespace Components {
579
601
  * Hides the dialog
580
602
  */
581
603
  "hide": () => Promise<void>;
604
+ /**
605
+ * Relocate the dialog to the root of the DOM. Useful for elements bound via css `transform: ...`
606
+ */
607
+ "hoist": boolean;
582
608
  /**
583
609
  * The dialog's label as displayed in the header. You should always include a relevant label even when using `no-header`, as it is required for proper accessibility.
584
610
  */
@@ -704,6 +730,48 @@ export namespace Components {
704
730
  */
705
731
  "tetherTo": HTMLElement;
706
732
  }
733
+ interface NanoFieldValidator {
734
+ /**
735
+ * Returns true if any nested fields have been changed @readonly
736
+ */
737
+ "dirty": boolean;
738
+ /**
739
+ * The current form payload as a reactive store. @readonly
740
+ */
741
+ "payload": ValueStore;
742
+ /**
743
+ * Tries to scroll to the first invalid field on submit
744
+ */
745
+ "scrollToInvalid": boolean;
746
+ /**
747
+ * Returns true if validation errors will be displayed to the user
748
+ */
749
+ "showValidation": boolean;
750
+ /**
751
+ * Returns true if all the nested fields are currently valid @readonly
752
+ */
753
+ "valid": boolean;
754
+ /**
755
+ * When should the fields perform validation. Will override / sync all nested `nano-...` controls
756
+ */
757
+ "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
758
+ /**
759
+ * A validation callback method.
760
+ * @param field - The field name currently being evaluated
761
+ * @param value - The value of the field currently being evaluated
762
+ * @param fields - an array of all currently observered form fields and values
763
+ * @returns field names mapped to an object of status message and validity e.g. ```js {field1: {msg: `This is invalid!`}, field2: {msg: `This is valid!`, valid: true}} ```
764
+ */
765
+ "validation": (
766
+ field: string,
767
+ value: string,
768
+ fields: ValueStore
769
+ ) => { [key: string]: { msg: string; valid?: boolean } };
770
+ /**
771
+ * Get the current validation state of all form fields. @readonly ``` { fields: NanoFormEles[]; valid: boolean; validityMessage: string; dirty: boolean; name: string | number; value: any; }[] ```
772
+ */
773
+ "validationState": ValidationState[];
774
+ }
707
775
  interface NanoFileUpload {
708
776
  /**
709
777
  * The accept attribute value is a string that defines the file types the file input should accept. E.g. for a MS Word file: `.doc, .docx,application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document`
@@ -725,6 +793,10 @@ export namespace Components {
725
793
  * A File array that lists every selected file. Has an added `objectURL` property returning a `DOMString` containing an object URL that can be used to reference the contents of the specified source This list has no more than one member unless the multiple attribute is specified. @readonly
726
794
  */
727
795
  "files": FileWithUrl[];
796
+ /**
797
+ * The form element to associate with this input (its form owner). Must be the id of a form.
798
+ */
799
+ "form"?: string | null;
728
800
  /**
729
801
  * Returns the native `<input>` element used under the hood
730
802
  */
@@ -784,6 +856,10 @@ export namespace Components {
784
856
  * When should the field perform validation
785
857
  */
786
858
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
859
+ /**
860
+ * Current validation message - if any. @readonly
861
+ */
862
+ "validityMessage": string;
787
863
  /**
788
864
  * A file input's value attribute contains a DOMString that represents the path to the selected file(s). If the user selected multiple files, the value represents the first file in the list of files they selected. You can reset the file-upload control by setting the value to an emptry string e.g. `var input.value = ''`
789
865
  */
@@ -969,7 +1045,7 @@ export namespace Components {
969
1045
  /**
970
1046
  * Specifies the label to use for accessibility. Defaults to the icon name.
971
1047
  */
972
- "ariaLabel"?: string;
1048
+ "ariaLabel": string;
973
1049
  /**
974
1050
  * Color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
975
1051
  */
@@ -1109,7 +1185,7 @@ export namespace Components {
1109
1185
  */
1110
1186
  "floatLabel": boolean;
1111
1187
  /**
1112
- * The form element to associate the select with (its form owner). Must be the id of a form.
1188
+ * The form element to associate the input with (its form owner). Must be the id of a form.
1113
1189
  */
1114
1190
  "form"?: string | null;
1115
1191
  /**
@@ -1229,6 +1305,10 @@ export namespace Components {
1229
1305
  * When should the field perform validation
1230
1306
  */
1231
1307
  "validateOn": 'dirty' | 'submit' | 'submitThenDirty';
1308
+ /**
1309
+ * Current validation message - if any. @readonly
1310
+ */
1311
+ "validityMessage": string;
1232
1312
  /**
1233
1313
  * The value of the input.
1234
1314
  */
@@ -1559,6 +1639,10 @@ export namespace Components {
1559
1639
  * When should the field perform validation
1560
1640
  */
1561
1641
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
1642
+ /**
1643
+ * Current validation message - if any. @readonly
1644
+ */
1645
+ "validityMessage": string;
1562
1646
  /**
1563
1647
  * The value of the select.
1564
1648
  */
@@ -2002,6 +2086,12 @@ declare global {
2002
2086
  prototype: HTMLNanoDropdownElement;
2003
2087
  new (): HTMLNanoDropdownElement;
2004
2088
  };
2089
+ interface HTMLNanoFieldValidatorElement extends Components.NanoFieldValidator, HTMLStencilElement {
2090
+ }
2091
+ var HTMLNanoFieldValidatorElement: {
2092
+ prototype: HTMLNanoFieldValidatorElement;
2093
+ new (): HTMLNanoFieldValidatorElement;
2094
+ };
2005
2095
  interface HTMLNanoFileUploadElement extends Components.NanoFileUpload, HTMLStencilElement {
2006
2096
  }
2007
2097
  var HTMLNanoFileUploadElement: {
@@ -2188,6 +2278,7 @@ declare global {
2188
2278
  "nano-dialog": HTMLNanoDialogElement;
2189
2279
  "nano-drawer": HTMLNanoDrawerElement;
2190
2280
  "nano-dropdown": HTMLNanoDropdownElement;
2281
+ "nano-field-validator": HTMLNanoFieldValidatorElement;
2191
2282
  "nano-file-upload": HTMLNanoFileUploadElement;
2192
2283
  "nano-global-nav": HTMLNanoGlobalNavElement;
2193
2284
  "nano-global-search-results": HTMLNanoGlobalSearchResultsElement;
@@ -2480,6 +2571,10 @@ declare namespace LocalJSX {
2480
2571
  * If `true`, the user cannot interact with the checkbox.
2481
2572
  */
2482
2573
  "disabled"?: boolean;
2574
+ /**
2575
+ * The form element to associate the input with (its form owner). Must be the id of a form.
2576
+ */
2577
+ "form"?: string | null;
2483
2578
  /**
2484
2579
  * If `true`, the checkbox will visually appear as indeterminate (only relevant for type="checkbox")
2485
2580
  */
@@ -2520,6 +2615,10 @@ declare namespace LocalJSX {
2520
2615
  | 'tag'
2521
2616
  | 'segment'
2522
2617
  | 'segment-pill';
2618
+ /**
2619
+ * Current validation message - if any. @readonly
2620
+ */
2621
+ "validityMessage"?: string;
2523
2622
  /**
2524
2623
  * The value of a checkbox is analogous to the value of an `<input type='checkbox'>`, it's only present when `checked` is true.
2525
2624
  */
@@ -2559,6 +2658,10 @@ declare namespace LocalJSX {
2559
2658
  * When should the field perform validation
2560
2659
  */
2561
2660
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
2661
+ /**
2662
+ * Current validation message - if any. @readonly
2663
+ */
2664
+ "validityMessage"?: string;
2562
2665
  }
2563
2666
  interface NanoDatalist {
2564
2667
  /**
@@ -2732,6 +2835,10 @@ declare namespace LocalJSX {
2732
2835
  * When should the field perform validation
2733
2836
  */
2734
2837
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
2838
+ /**
2839
+ * Current validation message - if any. @readonly
2840
+ */
2841
+ "validityMessage"?: string;
2735
2842
  /**
2736
2843
  * Current value. Must be in IS0-8601 format: YYYY-MM-DD.
2737
2844
  */
@@ -2806,6 +2913,10 @@ declare namespace LocalJSX {
2806
2913
  "open"?: boolean;
2807
2914
  }
2808
2915
  interface NanoDialog {
2916
+ /**
2917
+ * Relocate the dialog to the root of the DOM. Useful for elements bound via css `transform: ...`
2918
+ */
2919
+ "hoist"?: boolean;
2809
2920
  /**
2810
2921
  * The dialog's label as displayed in the header. You should always include a relevant label even when using `no-header`, as it is required for proper accessibility.
2811
2922
  */
@@ -2971,6 +3082,60 @@ declare namespace LocalJSX {
2971
3082
  */
2972
3083
  "tetherTo"?: HTMLElement;
2973
3084
  }
3085
+ interface NanoFieldValidator {
3086
+ /**
3087
+ * Returns true if any nested fields have been changed @readonly
3088
+ */
3089
+ "dirty"?: boolean;
3090
+ /**
3091
+ * Fire on invalid form submission attempt
3092
+ */
3093
+ "onNanoInvalid"?: (event: CustomEvent<any>) => void;
3094
+ /**
3095
+ * Fired whenever the payload changes
3096
+ */
3097
+ "onNanoPayloadChange"?: (event: CustomEvent<ValueStore>) => void;
3098
+ /**
3099
+ * Fired on valid form submission. Note: if you wish to prevent a form from submitting, instead of using / preventing the native `submit` event, use this event ```js ele.addEventListener('nanoSubmit', (e) => { e.preventDefault() }) ```
3100
+ */
3101
+ "onNanoSubmit"?: (event: CustomEvent<any>) => void;
3102
+ /**
3103
+ * The current form payload as a reactive store. @readonly
3104
+ */
3105
+ "payload"?: ValueStore;
3106
+ /**
3107
+ * Tries to scroll to the first invalid field on submit
3108
+ */
3109
+ "scrollToInvalid"?: boolean;
3110
+ /**
3111
+ * Returns true if validation errors will be displayed to the user
3112
+ */
3113
+ "showValidation"?: boolean;
3114
+ /**
3115
+ * Returns true if all the nested fields are currently valid @readonly
3116
+ */
3117
+ "valid"?: boolean;
3118
+ /**
3119
+ * When should the fields perform validation. Will override / sync all nested `nano-...` controls
3120
+ */
3121
+ "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
3122
+ /**
3123
+ * A validation callback method.
3124
+ * @param field - The field name currently being evaluated
3125
+ * @param value - The value of the field currently being evaluated
3126
+ * @param fields - an array of all currently observered form fields and values
3127
+ * @returns field names mapped to an object of status message and validity e.g. ```js {field1: {msg: `This is invalid!`}, field2: {msg: `This is valid!`, valid: true}} ```
3128
+ */
3129
+ "validation"?: (
3130
+ field: string,
3131
+ value: string,
3132
+ fields: ValueStore
3133
+ ) => { [key: string]: { msg: string; valid?: boolean } };
3134
+ /**
3135
+ * Get the current validation state of all form fields. @readonly ``` { fields: NanoFormEles[]; valid: boolean; validityMessage: string; dirty: boolean; name: string | number; value: any; }[] ```
3136
+ */
3137
+ "validationState"?: ValidationState[];
3138
+ }
2974
3139
  interface NanoFileUpload {
2975
3140
  /**
2976
3141
  * The accept attribute value is a string that defines the file types the file input should accept. E.g. for a MS Word file: `.doc, .docx,application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document`
@@ -2992,6 +3157,10 @@ declare namespace LocalJSX {
2992
3157
  * A File array that lists every selected file. Has an added `objectURL` property returning a `DOMString` containing an object URL that can be used to reference the contents of the specified source This list has no more than one member unless the multiple attribute is specified. @readonly
2993
3158
  */
2994
3159
  "files"?: FileWithUrl[];
3160
+ /**
3161
+ * The form element to associate with this input (its form owner). Must be the id of a form.
3162
+ */
3163
+ "form"?: string | null;
2995
3164
  /**
2996
3165
  * Visually hide the label - but make it accessible.
2997
3166
  */
@@ -3049,6 +3218,10 @@ declare namespace LocalJSX {
3049
3218
  * When should the field perform validation
3050
3219
  */
3051
3220
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
3221
+ /**
3222
+ * Current validation message - if any. @readonly
3223
+ */
3224
+ "validityMessage"?: string;
3052
3225
  /**
3053
3226
  * A file input's value attribute contains a DOMString that represents the path to the selected file(s). If the user selected multiple files, the value represents the first file in the list of files they selected. You can reset the file-upload control by setting the value to an emptry string e.g. `var input.value = ''`
3054
3227
  */
@@ -3398,7 +3571,7 @@ declare namespace LocalJSX {
3398
3571
  */
3399
3572
  "floatLabel"?: boolean;
3400
3573
  /**
3401
- * The form element to associate the select with (its form owner). Must be the id of a form.
3574
+ * The form element to associate the input with (its form owner). Must be the id of a form.
3402
3575
  */
3403
3576
  "form"?: string | null;
3404
3577
  /**
@@ -3521,6 +3694,10 @@ declare namespace LocalJSX {
3521
3694
  * When should the field perform validation
3522
3695
  */
3523
3696
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
3697
+ /**
3698
+ * Current validation message - if any. @readonly
3699
+ */
3700
+ "validityMessage"?: string;
3524
3701
  /**
3525
3702
  * The value of the input.
3526
3703
  */
@@ -3894,6 +4071,10 @@ declare namespace LocalJSX {
3894
4071
  * When should the field perform validation
3895
4072
  */
3896
4073
  "validateOn"?: 'dirty' | 'submit' | 'submitThenDirty';
4074
+ /**
4075
+ * Current validation message - if any. @readonly
4076
+ */
4077
+ "validityMessage"?: string;
3897
4078
  /**
3898
4079
  * The value of the select.
3899
4080
  */
@@ -4252,6 +4433,7 @@ declare namespace LocalJSX {
4252
4433
  "nano-dialog": NanoDialog;
4253
4434
  "nano-drawer": NanoDrawer;
4254
4435
  "nano-dropdown": NanoDropdown;
4436
+ "nano-field-validator": NanoFieldValidator;
4255
4437
  "nano-file-upload": NanoFileUpload;
4256
4438
  "nano-global-nav": NanoGlobalNav;
4257
4439
  "nano-global-search-results": NanoGlobalSearchResults;
@@ -4303,6 +4485,7 @@ declare module "@stencil/core" {
4303
4485
  "nano-dialog": LocalJSX.NanoDialog & JSXBase.HTMLAttributes<HTMLNanoDialogElement>;
4304
4486
  "nano-drawer": LocalJSX.NanoDrawer & JSXBase.HTMLAttributes<HTMLNanoDrawerElement>;
4305
4487
  "nano-dropdown": LocalJSX.NanoDropdown & JSXBase.HTMLAttributes<HTMLNanoDropdownElement>;
4488
+ "nano-field-validator": LocalJSX.NanoFieldValidator & JSXBase.HTMLAttributes<HTMLNanoFieldValidatorElement>;
4306
4489
  "nano-file-upload": LocalJSX.NanoFileUpload & JSXBase.HTMLAttributes<HTMLNanoFileUploadElement>;
4307
4490
  "nano-global-nav": LocalJSX.NanoGlobalNav & JSXBase.HTMLAttributes<HTMLNanoGlobalNavElement>;
4308
4491
  "nano-global-search-results": LocalJSX.NanoGlobalSearchResults & JSXBase.HTMLAttributes<HTMLNanoGlobalSearchResultsElement>;
@@ -1,4 +1,4 @@
1
- export declare const urlSet: (object: object, to?: 'hash' | 'query', win?: Window, method?: 'replace' | 'push') => void;
1
+ export declare const urlSet: (id: string, data: object, to?: 'hash' | 'query', win?: Window, method?: 'replace' | 'push') => void;
2
2
  export declare const urlGet: (key: string, to?: 'hash' | 'query', win?: Window) => any;
3
3
  export declare const sessionSet: (key: string, object: object, win?: Window) => void;
4
4
  export declare const sessionGet: (key: string, win?: Window) => any;