@swisspost/design-system-components 1.5.0 → 1.6.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 (302) hide show
  1. package/dist/cjs/check-non-empty-ae713942.js +13 -0
  2. package/dist/cjs/check-non-empty-ae713942.js.map +1 -0
  3. package/dist/cjs/{check-one-of-4c2e8b2e.js → check-one-of-27ad3154.js} +1 -1
  4. package/dist/cjs/check-one-of-27ad3154.js.map +1 -0
  5. package/dist/cjs/constants-238701d3.js +7 -0
  6. package/dist/cjs/constants-238701d3.js.map +1 -0
  7. package/dist/cjs/fade-35a3633a.js +12 -0
  8. package/dist/cjs/fade-35a3633a.js.map +1 -0
  9. package/dist/cjs/index-b38a23e0.js +41 -0
  10. package/dist/cjs/index-b38a23e0.js.map +1 -0
  11. package/dist/cjs/{index-12cc37c9.js → index-b619e205.js} +245 -41
  12. package/dist/cjs/index-b619e205.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +26 -0
  14. package/dist/cjs/index.cjs.js.map +1 -1
  15. package/dist/cjs/loader.cjs.js +3 -12
  16. package/dist/cjs/loader.cjs.js.map +1 -1
  17. package/dist/cjs/package-7c4db872.js +7 -0
  18. package/dist/cjs/package-7c4db872.js.map +1 -0
  19. package/dist/cjs/post-accordion.cjs.entry.js +89 -0
  20. package/dist/cjs/post-accordion.cjs.entry.js.map +1 -0
  21. package/dist/cjs/post-alert-c037e6a3.js +101 -0
  22. package/dist/cjs/post-alert-c037e6a3.js.map +1 -0
  23. package/dist/cjs/post-alert.cjs.entry.js +9 -97
  24. package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
  25. package/dist/cjs/post-collapsible-7c9d23a2.js +93 -0
  26. package/dist/cjs/post-collapsible-7c9d23a2.js.map +1 -0
  27. package/dist/cjs/post-collapsible.cjs.entry.js +7 -119
  28. package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
  29. package/dist/cjs/post-components.cjs.js +3 -6
  30. package/dist/cjs/post-components.cjs.js.map +1 -1
  31. package/dist/cjs/post-icon-f418f76a.js +105 -0
  32. package/dist/cjs/post-icon-f418f76a.js.map +1 -0
  33. package/dist/cjs/post-icon.cjs.entry.js +8 -100
  34. package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
  35. package/dist/cjs/post-tab-header-e08c2a42.js +33 -0
  36. package/dist/cjs/post-tab-header-e08c2a42.js.map +1 -0
  37. package/dist/cjs/post-tab-header.cjs.entry.js +6 -26
  38. package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
  39. package/dist/cjs/post-tab-panel-721f7f32.js +27 -0
  40. package/dist/cjs/post-tab-panel-721f7f32.js.map +1 -0
  41. package/dist/cjs/post-tab-panel.cjs.entry.js +4 -20
  42. package/dist/cjs/post-tab-panel.cjs.entry.js.map +1 -1
  43. package/dist/cjs/post-tabs-4bcc867b.js +153 -0
  44. package/dist/cjs/post-tabs-4bcc867b.js.map +1 -0
  45. package/dist/cjs/post-tabs.cjs.entry.js +5 -127
  46. package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
  47. package/dist/cjs/post-tooltip-261c5cda.js +5095 -0
  48. package/dist/cjs/post-tooltip-261c5cda.js.map +1 -0
  49. package/dist/cjs/post-tooltip.cjs.entry.js +5 -5088
  50. package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
  51. package/dist/collection/animations/collapse.js +13 -0
  52. package/dist/collection/animations/collapse.js.map +1 -0
  53. package/dist/collection/animations/fade.js +4 -4
  54. package/dist/collection/animations/fade.js.map +1 -1
  55. package/dist/collection/collection-manifest.json +10 -9
  56. package/dist/collection/components/post-accordion/post-accordion.css +1 -0
  57. package/dist/collection/components/post-accordion/post-accordion.js +178 -0
  58. package/dist/collection/components/post-accordion/post-accordion.js.map +1 -0
  59. package/dist/collection/components/post-alert/post-alert.css +6 -534
  60. package/dist/collection/components/post-alert/post-alert.js +10 -9
  61. package/dist/collection/components/post-alert/post-alert.js.map +1 -1
  62. package/dist/collection/components/post-collapsible/heading-levels.js +2 -0
  63. package/dist/collection/components/post-collapsible/heading-levels.js.map +1 -0
  64. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -261
  65. package/dist/collection/components/post-collapsible/post-collapsible.js +65 -63
  66. package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
  67. package/dist/collection/components/post-icon/post-icon.css +1 -102
  68. package/dist/collection/components/post-icon/post-icon.js +5 -4
  69. package/dist/collection/components/post-icon/post-icon.js.map +1 -1
  70. package/dist/collection/components/post-tab-header/post-tab-header.css +3 -337
  71. package/dist/collection/components/post-tab-header/post-tab-header.js +6 -5
  72. package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
  73. package/dist/collection/components/post-tab-panel/post-tab-panel.css +1 -3
  74. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
  75. package/dist/collection/components/post-tabs/post-tabs.css +1 -148
  76. package/dist/collection/components/post-tabs/post-tabs.js +36 -13
  77. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  78. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -194
  79. package/dist/collection/components/post-tooltip/post-tooltip.js +22 -15
  80. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
  81. package/dist/collection/index.js +8 -1
  82. package/dist/collection/index.js.map +1 -1
  83. package/dist/collection/utils/index.js +1 -3
  84. package/dist/collection/utils/index.js.map +1 -1
  85. package/dist/collection/utils/is-motion-reduced.js +4 -0
  86. package/dist/collection/utils/is-motion-reduced.js.map +1 -0
  87. package/dist/collection/utils/property-checkers/check-non-empty.js +1 -1
  88. package/dist/collection/utils/property-checkers/empty-or.js +1 -1
  89. package/dist/collection/utils/property-checkers/index.js +4 -4
  90. package/dist/components/check-non-empty.js +2 -2
  91. package/dist/components/check-non-empty.js.map +1 -1
  92. package/dist/components/check-one-of.js.map +1 -1
  93. package/dist/components/constants.js +5 -0
  94. package/dist/components/constants.js.map +1 -0
  95. package/dist/components/fade.js +4 -4
  96. package/dist/components/fade.js.map +1 -1
  97. package/dist/components/index.d.ts +6 -0
  98. package/dist/components/index.js +8 -1
  99. package/dist/components/index.js.map +1 -1
  100. package/dist/components/index2.js +36 -0
  101. package/dist/components/index2.js.map +1 -0
  102. package/dist/components/package.js +1 -1
  103. package/dist/components/post-accordion.d.ts +11 -0
  104. package/dist/components/post-accordion.js +108 -0
  105. package/dist/components/post-accordion.js.map +1 -0
  106. package/dist/components/post-alert.js +1 -129
  107. package/dist/components/post-alert.js.map +1 -1
  108. package/dist/components/post-alert2.js +138 -0
  109. package/dist/components/post-alert2.js.map +1 -0
  110. package/dist/components/post-collapsible.js +1 -146
  111. package/dist/components/post-collapsible.js.map +1 -1
  112. package/dist/components/post-collapsible2.js +117 -0
  113. package/dist/components/post-collapsible2.js.map +1 -0
  114. package/dist/components/post-icon2.js +12 -22
  115. package/dist/components/post-icon2.js.map +1 -1
  116. package/dist/components/post-tab-header.js +1 -45
  117. package/dist/components/post-tab-header.js.map +1 -1
  118. package/dist/components/post-tab-header2.js +51 -0
  119. package/dist/components/post-tab-header2.js.map +1 -0
  120. package/dist/components/post-tab-panel.js +1 -39
  121. package/dist/components/post-tab-panel.js.map +1 -1
  122. package/dist/components/post-tab-panel2.js +43 -0
  123. package/dist/components/post-tab-panel2.js.map +1 -0
  124. package/dist/components/post-tabs.js +1 -146
  125. package/dist/components/post-tabs.js.map +1 -1
  126. package/dist/components/post-tabs2.js +169 -0
  127. package/dist/components/post-tabs2.js.map +1 -0
  128. package/dist/components/post-tooltip.js +1 -5111
  129. package/dist/components/post-tooltip.js.map +1 -1
  130. package/dist/components/post-tooltip2.js +5117 -0
  131. package/dist/components/post-tooltip2.js.map +1 -0
  132. package/dist/docs.d.ts +334 -235
  133. package/dist/docs.json +458 -14
  134. package/dist/esm/check-non-empty-09c39561.js +11 -0
  135. package/dist/esm/check-non-empty-09c39561.js.map +1 -0
  136. package/dist/esm/{check-one-of-ded5e15e.js → check-one-of-74750af9.js} +1 -1
  137. package/dist/esm/check-one-of-74750af9.js.map +1 -0
  138. package/dist/esm/constants-8d548297.js +5 -0
  139. package/dist/esm/constants-8d548297.js.map +1 -0
  140. package/dist/esm/fade-7fd71785.js +9 -0
  141. package/dist/esm/fade-7fd71785.js.map +1 -0
  142. package/dist/esm/index-35921354.js +36 -0
  143. package/dist/esm/index-35921354.js.map +1 -0
  144. package/dist/esm/{index-5611074b.js → index-4eff5fc5.js} +245 -41
  145. package/dist/esm/index-4eff5fc5.js.map +1 -0
  146. package/dist/esm/index.js +14 -1
  147. package/dist/esm/index.js.map +1 -1
  148. package/dist/esm/loader.js +4 -13
  149. package/dist/esm/loader.js.map +1 -1
  150. package/dist/esm/package-3bbdb32c.js +5 -0
  151. package/dist/esm/package-3bbdb32c.js.map +1 -0
  152. package/dist/esm/post-accordion.entry.js +85 -0
  153. package/dist/esm/post-accordion.entry.js.map +1 -0
  154. package/dist/esm/post-alert-5dd43c8b.js +99 -0
  155. package/dist/esm/post-alert-5dd43c8b.js.map +1 -0
  156. package/dist/esm/post-alert.entry.js +8 -100
  157. package/dist/esm/post-alert.entry.js.map +1 -1
  158. package/dist/esm/post-collapsible-26dc2340.js +91 -0
  159. package/dist/esm/post-collapsible-26dc2340.js.map +1 -0
  160. package/dist/esm/post-collapsible.entry.js +6 -122
  161. package/dist/esm/post-collapsible.entry.js.map +1 -1
  162. package/dist/esm/post-components.js +4 -7
  163. package/dist/esm/post-components.js.map +1 -1
  164. package/dist/esm/post-icon-fb0eb8aa.js +103 -0
  165. package/dist/esm/post-icon-fb0eb8aa.js.map +1 -0
  166. package/dist/esm/post-icon.entry.js +7 -103
  167. package/dist/esm/post-icon.entry.js.map +1 -1
  168. package/dist/esm/post-tab-header-deebc551.js +31 -0
  169. package/dist/esm/post-tab-header-deebc551.js.map +1 -0
  170. package/dist/esm/post-tab-header.entry.js +5 -29
  171. package/dist/esm/post-tab-header.entry.js.map +1 -1
  172. package/dist/esm/post-tab-panel-4b820f71.js +25 -0
  173. package/dist/esm/post-tab-panel-4b820f71.js.map +1 -0
  174. package/dist/esm/post-tab-panel.entry.js +3 -23
  175. package/dist/esm/post-tab-panel.entry.js.map +1 -1
  176. package/dist/esm/post-tabs-2d8d6a33.js +151 -0
  177. package/dist/esm/post-tabs-2d8d6a33.js.map +1 -0
  178. package/dist/esm/post-tabs.entry.js +4 -130
  179. package/dist/esm/post-tabs.entry.js.map +1 -1
  180. package/dist/esm/post-tooltip-811309c5.js +5093 -0
  181. package/dist/esm/post-tooltip-811309c5.js.map +1 -0
  182. package/dist/esm/post-tooltip.entry.js +4 -5091
  183. package/dist/esm/post-tooltip.entry.js.map +1 -1
  184. package/dist/post-components/index.esm.js +1 -1
  185. package/dist/post-components/{p-2b6ab354.entry.js → p-01e8dfe6.js} +3 -3
  186. package/dist/post-components/p-01e8dfe6.js.map +1 -0
  187. package/dist/post-components/p-0a49c1a3.entry.js +2 -0
  188. package/dist/post-components/{p-bcc705f1.js → p-1339f8cd.js} +1 -1
  189. package/dist/post-components/p-1339f8cd.js.map +1 -0
  190. package/dist/post-components/p-1a8a8ef2.js +2 -0
  191. package/dist/post-components/p-1a8a8ef2.js.map +1 -0
  192. package/dist/post-components/p-27092ac3.entry.js +2 -0
  193. package/dist/post-components/p-27092ac3.entry.js.map +1 -0
  194. package/dist/post-components/{p-e5306504.js → p-2737eaf5.js} +1 -1
  195. package/dist/post-components/p-2737eaf5.js.map +1 -0
  196. package/dist/post-components/p-332eef46.js +2 -0
  197. package/dist/post-components/p-332eef46.js.map +1 -0
  198. package/dist/post-components/p-440193f4.js +2 -0
  199. package/dist/post-components/p-440193f4.js.map +1 -0
  200. package/dist/post-components/p-541142fd.js +2 -0
  201. package/dist/post-components/p-541142fd.js.map +1 -0
  202. package/dist/post-components/p-574acdb0.js +2 -0
  203. package/dist/post-components/p-574acdb0.js.map +1 -0
  204. package/dist/post-components/p-66460e3f.entry.js +2 -0
  205. package/dist/post-components/p-66460e3f.entry.js.map +1 -0
  206. package/dist/post-components/p-810ee105.entry.js +2 -0
  207. package/dist/post-components/p-810ee105.entry.js.map +1 -0
  208. package/dist/post-components/p-939df031.entry.js +2 -0
  209. package/dist/post-components/p-939df031.entry.js.map +1 -0
  210. package/dist/post-components/p-94b3f291.entry.js +2 -0
  211. package/dist/post-components/p-94b3f291.entry.js.map +1 -0
  212. package/dist/post-components/p-97000cb6.js +2 -0
  213. package/dist/post-components/p-97000cb6.js.map +1 -0
  214. package/dist/post-components/p-a7649277.js +3 -0
  215. package/dist/post-components/p-a7649277.js.map +1 -0
  216. package/dist/post-components/p-abd149b3.entry.js +2 -0
  217. package/dist/post-components/p-abd149b3.entry.js.map +1 -0
  218. package/dist/post-components/p-b531475e.js +2 -0
  219. package/dist/post-components/p-b531475e.js.map +1 -0
  220. package/dist/post-components/p-c6b73d6e.js +2 -0
  221. package/dist/post-components/p-c6b73d6e.js.map +1 -0
  222. package/dist/post-components/{p-29535fea.entry.js → p-d4fb9f16.js} +2 -2
  223. package/dist/post-components/p-d4fb9f16.js.map +1 -0
  224. package/dist/post-components/p-dfe29f7f.js +2 -0
  225. package/dist/post-components/p-dfe29f7f.js.map +1 -0
  226. package/dist/post-components/p-e9dc9039.entry.js +2 -0
  227. package/dist/post-components/p-e9dc9039.entry.js.map +1 -0
  228. package/dist/post-components/post-components.esm.js +1 -1
  229. package/dist/post-components/post-components.esm.js.map +1 -1
  230. package/dist/types/animations/collapse.d.ts +2 -0
  231. package/dist/types/components/post-accordion/post-accordion.d.ts +28 -0
  232. package/dist/types/components/post-alert/post-alert.d.ts +1 -1
  233. package/dist/types/components/post-collapsible/heading-levels.d.ts +2 -0
  234. package/dist/types/components/post-collapsible/post-collapsible.d.ts +16 -12
  235. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -0
  236. package/dist/types/components.d.ts +79 -3
  237. package/dist/types/index.d.ts +7 -0
  238. package/dist/types/stencil-public-runtime.d.ts +38 -5
  239. package/dist/types/utils/index.d.ts +1 -3
  240. package/dist/types/utils/is-motion-reduced.d.ts +1 -0
  241. package/loader/index.d.ts +1 -1
  242. package/package.json +8 -8
  243. package/dist/cjs/check-non-empty-35b4d0b5.js +0 -14
  244. package/dist/cjs/check-non-empty-35b4d0b5.js.map +0 -1
  245. package/dist/cjs/check-one-of-4c2e8b2e.js.map +0 -1
  246. package/dist/cjs/check-type-508a21a5.js +0 -18
  247. package/dist/cjs/check-type-508a21a5.js.map +0 -1
  248. package/dist/cjs/fade-8c6d4fa7.js +0 -12
  249. package/dist/cjs/fade-8c6d4fa7.js.map +0 -1
  250. package/dist/cjs/index-12cc37c9.js.map +0 -1
  251. package/dist/cjs/index-f8f6f146.js +0 -28
  252. package/dist/cjs/index-f8f6f146.js.map +0 -1
  253. package/dist/cjs/package-67091813.js +0 -7
  254. package/dist/cjs/package-67091813.js.map +0 -1
  255. package/dist/collection/utils/get-element-height.js +0 -12
  256. package/dist/collection/utils/get-element-height.js.map +0 -1
  257. package/dist/collection/utils/on-transition-end.js +0 -15
  258. package/dist/collection/utils/on-transition-end.js.map +0 -1
  259. package/dist/collection/utils/should-reduce-motion.js +0 -4
  260. package/dist/collection/utils/should-reduce-motion.js.map +0 -1
  261. package/dist/components/check-type.js +0 -16
  262. package/dist/components/check-type.js.map +0 -1
  263. package/dist/esm/check-non-empty-554bdf88.js +0 -11
  264. package/dist/esm/check-non-empty-554bdf88.js.map +0 -1
  265. package/dist/esm/check-one-of-ded5e15e.js.map +0 -1
  266. package/dist/esm/check-type-18ebb4e7.js +0 -16
  267. package/dist/esm/check-type-18ebb4e7.js.map +0 -1
  268. package/dist/esm/fade-671f1489.js +0 -9
  269. package/dist/esm/fade-671f1489.js.map +0 -1
  270. package/dist/esm/index-5611074b.js.map +0 -1
  271. package/dist/esm/index-7f723686.js +0 -24
  272. package/dist/esm/index-7f723686.js.map +0 -1
  273. package/dist/esm/package-f5cb3167.js +0 -5
  274. package/dist/esm/package-f5cb3167.js.map +0 -1
  275. package/dist/esm/polyfills/css-shim.js +0 -1
  276. package/dist/post-components/p-12046db8.entry.js +0 -2
  277. package/dist/post-components/p-12046db8.entry.js.map +0 -1
  278. package/dist/post-components/p-15fc087f.js +0 -2
  279. package/dist/post-components/p-15fc087f.js.map +0 -1
  280. package/dist/post-components/p-24b07f64.js +0 -2
  281. package/dist/post-components/p-29535fea.entry.js.map +0 -1
  282. package/dist/post-components/p-296af738.entry.js +0 -2
  283. package/dist/post-components/p-296af738.entry.js.map +0 -1
  284. package/dist/post-components/p-2b6ab354.entry.js.map +0 -1
  285. package/dist/post-components/p-75a7b352.js +0 -2
  286. package/dist/post-components/p-75a7b352.js.map +0 -1
  287. package/dist/post-components/p-a14ec7bb.entry.js +0 -2
  288. package/dist/post-components/p-a14ec7bb.entry.js.map +0 -1
  289. package/dist/post-components/p-bcc705f1.js.map +0 -1
  290. package/dist/post-components/p-c7497ecb.entry.js +0 -2
  291. package/dist/post-components/p-c7497ecb.entry.js.map +0 -1
  292. package/dist/post-components/p-c8efe0ae.js +0 -2
  293. package/dist/post-components/p-c8efe0ae.js.map +0 -1
  294. package/dist/post-components/p-cc6e4eb8.entry.js +0 -2
  295. package/dist/post-components/p-cc6e4eb8.entry.js.map +0 -1
  296. package/dist/post-components/p-d94db268.js +0 -3
  297. package/dist/post-components/p-d94db268.js.map +0 -1
  298. package/dist/post-components/p-e5306504.js.map +0 -1
  299. package/dist/types/utils/get-element-height.d.ts +0 -3
  300. package/dist/types/utils/on-transition-end.d.ts +0 -1
  301. package/dist/types/utils/should-reduce-motion.d.ts +0 -1
  302. /package/dist/post-components/{p-24b07f64.js.map → p-0a49c1a3.entry.js.map} +0 -0
package/dist/docs.d.ts CHANGED
@@ -3,161 +3,255 @@
3
3
  * This is an autogenerated file created by the Stencil compiler.
4
4
  * DO NOT MODIFY IT MANUALLY
5
5
  */
6
+ interface ComponentCompilerPropertyComplexType {
7
+ /**
8
+ * The string of the original type annotation in the Stencil source code
9
+ */
10
+ original: string;
11
+ /**
12
+ * A 'resolved' type, where e.g. imported types have been resolved and inlined
13
+ *
14
+ * For instance, an annotation like `(foo: Foo) => string;` will be
15
+ * converted to `(foo: { foo: string }) => string;`.
16
+ */
17
+ resolved: string;
18
+ /**
19
+ * A record of the types which were referenced in the assorted type
20
+ * annotation in the original source file.
21
+ */
22
+ references: ComponentCompilerTypeReferences;
23
+ }
24
+ type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
25
+ interface ComponentCompilerTypeReference {
26
+ /**
27
+ * A type may be defined:
28
+ * - locally (in the same file as the component that uses it)
29
+ * - globally
30
+ * - by importing it into a file (and is defined elsewhere)
31
+ */
32
+ location: "local" | "global" | "import";
33
+ /**
34
+ * The path to the type reference, if applicable (global types should not need a path associated with them)
35
+ */
36
+ path?: string;
37
+ /**
38
+ * An ID for this type which is unique within a Stencil project.
39
+ */
40
+ id: string;
41
+ }
42
+ interface ComponentCompilerReferencedType {
43
+ /**
44
+ * The path to the module where the type is declared.
45
+ */
46
+ path: string;
47
+ /**
48
+ * The string of the original type annotation in the Stencil source code
49
+ */
50
+ declaration: string;
51
+ /**
52
+ * An extracted docstring
53
+ */
54
+ docstring: string;
55
+ }
56
+ interface ComponentCompilerEventComplexType {
57
+ original: string;
58
+ resolved: string;
59
+ references: ComponentCompilerTypeReferences;
60
+ }
61
+ interface ComponentCompilerMethodComplexType {
62
+ signature: string;
63
+ parameters: CompilerJsDoc[];
64
+ references: ComponentCompilerTypeReferences;
65
+ return: string;
66
+ }
67
+ interface CompilerJsDoc {
68
+ /**
69
+ * The text associated with the JSDoc
70
+ */
71
+ text: string;
72
+ /**
73
+ * Tags included in the JSDoc
74
+ */
75
+ tags: CompilerJsDocTagInfo[];
76
+ }
77
+ interface CompilerJsDocTagInfo {
78
+ /**
79
+ * The name of the tag - e.g. `@deprecated`
80
+ */
81
+ name: string;
82
+ /**
83
+ * Additional text that is associated with the tag - e.g. `@deprecated use v2 of this API`
84
+ */
85
+ text?: string;
86
+ }
87
+ /**
88
+ * The Type Library holds information about the types which are used in a
89
+ * Stencil project. During compilation, Stencil gathers information about the
90
+ * types which form part of a component's public API, such as properties
91
+ * decorated with `@Prop`, `@Event`, `@Watch`, etc. This type information is
92
+ * then added to the Type Library, where it can be accessed later on for
93
+ * generating documentation.
94
+ *
95
+ * This information is included in the file written by the `docs-json` output
96
+ * target (see {@link JsonDocs.typeLibrary}).
97
+ */
98
+ export type JsonDocsTypeLibrary = Record<string, ComponentCompilerReferencedType>;
6
99
  /**
7
100
  * A container for JSDoc metadata for a project
8
101
  */
9
102
  export interface JsonDocs {
103
+ /**
104
+ * The metadata for the JSDocs for each component in a Stencil project
105
+ */
106
+ components: JsonDocsComponent[];
107
+ /**
108
+ * The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
109
+ */
110
+ timestamp: string;
111
+ compiler: {
112
+ /**
113
+ * The name of the compiler that generated the metadata
114
+ */
115
+ name: string;
10
116
  /**
11
- * The metadata for the JSDocs for each component in a Stencil project
117
+ * The version of the Stencil compiler that generated the metadata
12
118
  */
13
- components: JsonDocsComponent[];
119
+ version: string;
14
120
  /**
15
- * The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
121
+ * The version of TypeScript that was used to generate the metadata
16
122
  */
17
- timestamp: string;
18
- compiler: {
19
- /**
20
- * The name of the compiler that generated the metadata
21
- */
22
- name: string;
23
- /**
24
- * The version of the Stencil compiler that generated the metadata
25
- */
26
- version: string;
27
- /**
28
- * The version of TypeScript that was used to generate the metadata
29
- */
30
- typescriptVersion: string;
31
- };
123
+ typescriptVersion: string;
124
+ };
125
+ typeLibrary: JsonDocsTypeLibrary;
32
126
  }
33
127
  /**
34
128
  * Container for JSDoc metadata for a single Stencil component
35
129
  */
36
130
  export interface JsonDocsComponent {
37
- /**
38
- * The directory containing the Stencil component, minus the file name.
39
- *
40
- * @example /workspaces/stencil-project/src/components/my-component
41
- */
42
- dirPath?: string;
43
- /**
44
- * The name of the file containing the Stencil component, with no path
45
- *
46
- * @example my-component.tsx
47
- */
48
- fileName?: string;
49
- /**
50
- * The full path of the file containing the Stencil component
51
- *
52
- * @example /workspaces/stencil-project/src/components/my-component/my-component.tsx
53
- */
54
- filePath?: string;
55
- /**
56
- * The path to the component's `readme.md` file, including the filename
57
- *
58
- * @example /workspaces/stencil-project/src/components/my-component/readme.md
59
- */
60
- readmePath?: string;
61
- /**
62
- * The path to the component's `usage` directory
63
- *
64
- * @example /workspaces/stencil-project/src/components/my-component/usage/
65
- */
66
- usagesDir?: string;
67
- /**
68
- * The encapsulation strategy for a component
69
- */
70
- encapsulation: 'shadow' | 'scoped' | 'none';
71
- /**
72
- * The tag name for the component, for use in HTML
73
- */
74
- tag: string;
75
- /**
76
- * The contents of a component's `readme.md` that are user generated.
77
- *
78
- * Auto-generated contents are not stored in this reference.
79
- */
80
- readme: string;
81
- /**
82
- * The description of a Stencil component, found in the JSDoc that sits above the component's declaration
83
- */
84
- docs: string;
85
- /**
86
- * JSDoc tags found in the JSDoc comment written atop a component's declaration
87
- */
88
- docsTags: JsonDocsTag[];
89
- /**
90
- * The text from the class-level JSDoc for a Stencil component, if present.
91
- */
92
- overview?: string;
93
- /**
94
- * A mapping of usage example file names to their contents for the component.
95
- */
96
- usage: JsonDocsUsage;
97
- /**
98
- * Array of metadata for a component's `@Prop`s
99
- */
100
- props: JsonDocsProp[];
101
- /**
102
- * Array of metadata for a component's `@Method`s
103
- */
104
- methods: JsonDocsMethod[];
105
- /**
106
- * Array of metadata for a component's `@Event`s
107
- */
108
- events: JsonDocsEvent[];
109
- /**
110
- * Array of metadata for a component's `@Listen` handlers
111
- */
112
- listeners: JsonDocsListener[];
113
- /**
114
- * Array of metadata for a component's CSS styling information
115
- */
116
- styles: JsonDocsStyle[];
117
- /**
118
- * Array of component Slot information, generated from `@slot` tags
119
- */
120
- slots: JsonDocsSlot[];
121
- /**
122
- * Array of component Parts information, generate from `@part` tags
123
- */
124
- parts: JsonDocsPart[];
125
- /**
126
- * Array of metadata describing where the current component is used
127
- */
128
- dependents: string[];
129
- /**
130
- * Array of metadata listing the components which are used in current component
131
- */
132
- dependencies: string[];
133
- /**
134
- * Describes a tree of components coupling
135
- */
136
- dependencyGraph: JsonDocsDependencyGraph;
137
- /**
138
- * A deprecation reason/description found following a `@deprecated` tag
139
- */
140
- deprecation?: string;
131
+ /**
132
+ * The directory containing the Stencil component, minus the file name.
133
+ *
134
+ * @example /workspaces/stencil-project/src/components/my-component
135
+ */
136
+ dirPath?: string;
137
+ /**
138
+ * The name of the file containing the Stencil component, with no path
139
+ *
140
+ * @example my-component.tsx
141
+ */
142
+ fileName?: string;
143
+ /**
144
+ * The full path of the file containing the Stencil component
145
+ *
146
+ * @example /workspaces/stencil-project/src/components/my-component/my-component.tsx
147
+ */
148
+ filePath?: string;
149
+ /**
150
+ * The path to the component's `readme.md` file, including the filename
151
+ *
152
+ * @example /workspaces/stencil-project/src/components/my-component/readme.md
153
+ */
154
+ readmePath?: string;
155
+ /**
156
+ * The path to the component's `usage` directory
157
+ *
158
+ * @example /workspaces/stencil-project/src/components/my-component/usage/
159
+ */
160
+ usagesDir?: string;
161
+ /**
162
+ * The encapsulation strategy for a component
163
+ */
164
+ encapsulation: "shadow" | "scoped" | "none";
165
+ /**
166
+ * The tag name for the component, for use in HTML
167
+ */
168
+ tag: string;
169
+ /**
170
+ * The contents of a component's `readme.md` that are user generated.
171
+ *
172
+ * Auto-generated contents are not stored in this reference.
173
+ */
174
+ readme: string;
175
+ /**
176
+ * The description of a Stencil component, found in the JSDoc that sits above the component's declaration
177
+ */
178
+ docs: string;
179
+ /**
180
+ * JSDoc tags found in the JSDoc comment written atop a component's declaration
181
+ */
182
+ docsTags: JsonDocsTag[];
183
+ /**
184
+ * The text from the class-level JSDoc for a Stencil component, if present.
185
+ */
186
+ overview?: string;
187
+ /**
188
+ * A mapping of usage example file names to their contents for the component.
189
+ */
190
+ usage: JsonDocsUsage;
191
+ /**
192
+ * Array of metadata for a component's `@Prop`s
193
+ */
194
+ props: JsonDocsProp[];
195
+ /**
196
+ * Array of metadata for a component's `@Method`s
197
+ */
198
+ methods: JsonDocsMethod[];
199
+ /**
200
+ * Array of metadata for a component's `@Event`s
201
+ */
202
+ events: JsonDocsEvent[];
203
+ /**
204
+ * Array of metadata for a component's `@Listen` handlers
205
+ */
206
+ listeners: JsonDocsListener[];
207
+ /**
208
+ * Array of metadata for a component's CSS styling information
209
+ */
210
+ styles: JsonDocsStyle[];
211
+ /**
212
+ * Array of component Slot information, generated from `@slot` tags
213
+ */
214
+ slots: JsonDocsSlot[];
215
+ /**
216
+ * Array of component Parts information, generate from `@part` tags
217
+ */
218
+ parts: JsonDocsPart[];
219
+ /**
220
+ * Array of metadata describing where the current component is used
221
+ */
222
+ dependents: string[];
223
+ /**
224
+ * Array of metadata listing the components which are used in current component
225
+ */
226
+ dependencies: string[];
227
+ /**
228
+ * Describes a tree of components coupling
229
+ */
230
+ dependencyGraph: JsonDocsDependencyGraph;
231
+ /**
232
+ * A deprecation reason/description found following a `@deprecated` tag
233
+ */
234
+ deprecation?: string;
141
235
  }
142
236
  export interface JsonDocsDependencyGraph {
143
- [tagName: string]: string[];
237
+ [tagName: string]: string[];
144
238
  }
145
239
  /**
146
240
  * A descriptor for a single JSDoc tag found in a block comment
147
241
  */
148
242
  export interface JsonDocsTag {
149
- /**
150
- * The tag name (immediately following the '@')
151
- */
152
- name: string;
153
- /**
154
- * The description that immediately follows the tag name
155
- */
156
- text?: string;
243
+ /**
244
+ * The tag name (immediately following the '@')
245
+ */
246
+ name: string;
247
+ /**
248
+ * The description that immediately follows the tag name
249
+ */
250
+ text?: string;
157
251
  }
158
252
  export interface JsonDocsValue {
159
- value?: string;
160
- type: string;
253
+ value?: string;
254
+ type: string;
161
255
  }
162
256
  /**
163
257
  * A mapping of file names to their contents.
@@ -180,106 +274,109 @@ export interface JsonDocsValue {
180
274
  * ```
181
275
  */
182
276
  export interface JsonDocsUsage {
183
- [key: string]: string;
277
+ [key: string]: string;
184
278
  }
185
279
  /**
186
280
  * An intermediate representation of a `@Prop` decorated member's JSDoc
187
281
  */
188
282
  export interface JsonDocsProp {
189
- /**
190
- * the name of the prop
191
- */
192
- name: string;
193
- /**
194
- * the type of the prop, in terms of the TypeScript type system (as opposed to JavaScript's or HTML's)
195
- */
196
- type: string;
197
- /**
198
- * `true` if the prop was configured as "mutable" where it was declared, `false` otherwise
199
- */
200
- mutable: boolean;
201
- /**
202
- * The name of the attribute that is exposed to configure a compiled web component
203
- */
204
- attr?: string;
205
- /**
206
- * `true` if the prop was configured to "reflect" back to HTML where it (the prop) was declared, `false` otherwise
207
- */
208
- reflectToAttr: boolean;
209
- /**
210
- * the JSDoc description text associated with the prop
211
- */
212
- docs: string;
213
- /**
214
- * JSDoc tags associated with the prop
215
- */
216
- docsTags: JsonDocsTag[];
217
- /**
218
- * The default value of the prop
219
- */
220
- default: string;
221
- /**
222
- * Deprecation text associated with the prop. This is the text that immediately follows a `@deprecated` tag
223
- */
224
- deprecation?: string;
225
- values: JsonDocsValue[];
226
- /**
227
- * `true` if a component is declared with a '?', `false` otherwise
228
- *
229
- * @example
230
- * ```tsx
231
- * @Prop() componentProps?: any;
232
- * ```
233
- */
234
- optional: boolean;
235
- /**
236
- * `true` if a component is declared with a '!', `false` otherwise
237
- *
238
- * @example
239
- * ```tsx
240
- * @Prop() componentProps!: any;
241
- * ```
242
- */
243
- required: boolean;
283
+ /**
284
+ * the name of the prop
285
+ */
286
+ name: string;
287
+ complexType?: ComponentCompilerPropertyComplexType;
288
+ /**
289
+ * the type of the prop, in terms of the TypeScript type system (as opposed to JavaScript's or HTML's)
290
+ */
291
+ type: string;
292
+ /**
293
+ * `true` if the prop was configured as "mutable" where it was declared, `false` otherwise
294
+ */
295
+ mutable: boolean;
296
+ /**
297
+ * The name of the attribute that is exposed to configure a compiled web component
298
+ */
299
+ attr?: string;
300
+ /**
301
+ * `true` if the prop was configured to "reflect" back to HTML where it (the prop) was declared, `false` otherwise
302
+ */
303
+ reflectToAttr: boolean;
304
+ /**
305
+ * the JSDoc description text associated with the prop
306
+ */
307
+ docs: string;
308
+ /**
309
+ * JSDoc tags associated with the prop
310
+ */
311
+ docsTags: JsonDocsTag[];
312
+ /**
313
+ * The default value of the prop
314
+ */
315
+ default?: string;
316
+ /**
317
+ * Deprecation text associated with the prop. This is the text that immediately follows a `@deprecated` tag
318
+ */
319
+ deprecation?: string;
320
+ values: JsonDocsValue[];
321
+ /**
322
+ * `true` if a component is declared with a '?', `false` otherwise
323
+ *
324
+ * @example
325
+ * ```tsx
326
+ * @Prop() componentProps?: any;
327
+ * ```
328
+ */
329
+ optional: boolean;
330
+ /**
331
+ * `true` if a component is declared with a '!', `false` otherwise
332
+ *
333
+ * @example
334
+ * ```tsx
335
+ * @Prop() componentProps!: any;
336
+ * ```
337
+ */
338
+ required: boolean;
244
339
  }
245
340
  export interface JsonDocsMethod {
246
- name: string;
247
- docs: string;
248
- docsTags: JsonDocsTag[];
249
- deprecation?: string;
250
- signature: string;
251
- returns: JsonDocsMethodReturn;
252
- parameters: JsonDocMethodParameter[];
341
+ name: string;
342
+ docs: string;
343
+ docsTags: JsonDocsTag[];
344
+ deprecation?: string;
345
+ signature: string;
346
+ returns: JsonDocsMethodReturn;
347
+ parameters: JsonDocMethodParameter[];
348
+ complexType: ComponentCompilerMethodComplexType;
253
349
  }
254
350
  export interface JsonDocsMethodReturn {
255
- type: string;
256
- docs: string;
351
+ type: string;
352
+ docs: string;
257
353
  }
258
354
  export interface JsonDocMethodParameter {
259
- name: string;
260
- type: string;
261
- docs: string;
355
+ name: string;
356
+ type: string;
357
+ docs: string;
262
358
  }
263
359
  export interface JsonDocsEvent {
264
- event: string;
265
- bubbles: boolean;
266
- cancelable: boolean;
267
- composed: boolean;
268
- docs: string;
269
- docsTags: JsonDocsTag[];
270
- deprecation?: string;
271
- detail: string;
360
+ event: string;
361
+ bubbles: boolean;
362
+ cancelable: boolean;
363
+ composed: boolean;
364
+ complexType: ComponentCompilerEventComplexType;
365
+ docs: string;
366
+ docsTags: JsonDocsTag[];
367
+ deprecation?: string;
368
+ detail: string;
272
369
  }
273
370
  export interface JsonDocsStyle {
274
- name: string;
275
- docs: string;
276
- annotation: string;
371
+ name: string;
372
+ docs: string;
373
+ annotation: string;
277
374
  }
278
375
  export interface JsonDocsListener {
279
- event: string;
280
- target?: string;
281
- capture: boolean;
282
- passive: boolean;
376
+ event: string;
377
+ target?: string;
378
+ capture: boolean;
379
+ passive: boolean;
283
380
  }
284
381
  /**
285
382
  * A descriptor for a slot
@@ -287,14 +384,14 @@ export interface JsonDocsListener {
287
384
  * Objects of this type are translated from the JSDoc tag, `@slot`
288
385
  */
289
386
  export interface JsonDocsSlot {
290
- /**
291
- * The name of the slot. Defaults to an empty string for an unnamed slot.
292
- */
293
- name: string;
294
- /**
295
- * A textual description of the slot.
296
- */
297
- docs: string;
387
+ /**
388
+ * The name of the slot. Defaults to an empty string for an unnamed slot.
389
+ */
390
+ name: string;
391
+ /**
392
+ * A textual description of the slot.
393
+ */
394
+ docs: string;
298
395
  }
299
396
  /**
300
397
  * A descriptor of a CSS Shadow Part
@@ -303,20 +400,22 @@ export interface JsonDocsSlot {
303
400
  * attribute on a component in TSX
304
401
  */
305
402
  export interface JsonDocsPart {
306
- /**
307
- * The name of the Shadow part
308
- */
309
- name: string;
310
- /**
311
- * A textual description of the Shadow part.
312
- */
313
- docs: string;
403
+ /**
404
+ * The name of the Shadow part
405
+ */
406
+ name: string;
407
+ /**
408
+ * A textual description of the Shadow part.
409
+ */
410
+ docs: string;
314
411
  }
315
412
  export interface StyleDoc {
316
- name: string;
317
- docs: string;
318
- annotation: 'prop';
413
+ name: string;
414
+ docs: string;
415
+ annotation: "prop";
319
416
  }
320
417
 
418
+ export {};
419
+
321
420
  declare const _default: JsonDocs;
322
421
  export default _default;