@xyd-js/components 0.1.0-xyd.5 → 0.1.0-xyd.52

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 (530) hide show
  1. package/.idea/git_toolbox_blame.xml +6 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/.idea/xyd-components.iml +12 -0
  5. package/CHANGELOG.md +378 -0
  6. package/LICENSE +21 -0
  7. package/TODO.md +1 -0
  8. package/content.ts +0 -2
  9. package/dist/CTABanner-4mVtgtg1.js +2 -0
  10. package/dist/CTABanner-4mVtgtg1.js.map +1 -0
  11. package/dist/CTABanner-8awHx3iq.js +2 -0
  12. package/dist/CTABanner-8awHx3iq.js.map +1 -0
  13. package/dist/CTABanner-BW4YN4-n.js +2 -0
  14. package/dist/CTABanner-BW4YN4-n.js.map +1 -0
  15. package/dist/CTABanner-C-6auNiO.js +2 -0
  16. package/dist/CTABanner-C-6auNiO.js.map +1 -0
  17. package/dist/CTABanner-CUwluXcM.js +2 -0
  18. package/dist/CTABanner-CUwluXcM.js.map +1 -0
  19. package/dist/CTABanner-CV8B6kGd.js +2 -0
  20. package/dist/CTABanner-CV8B6kGd.js.map +1 -0
  21. package/dist/CTABanner-CYq6zqzK.js +2 -0
  22. package/dist/CTABanner-CYq6zqzK.js.map +1 -0
  23. package/dist/CTABanner-CmOPCiBU.js +2 -0
  24. package/dist/CTABanner-CmOPCiBU.js.map +1 -0
  25. package/dist/CTABanner-DW0jn0tm.js +2 -0
  26. package/dist/CTABanner-DW0jn0tm.js.map +1 -0
  27. package/dist/CTABanner-D_vBSERH.js +2 -0
  28. package/dist/CTABanner-D_vBSERH.js.map +1 -0
  29. package/dist/CTABanner-RYtzotAc.js +2 -0
  30. package/dist/CTABanner-RYtzotAc.js.map +1 -0
  31. package/dist/CTABanner-d0dU_3UV.js +2 -0
  32. package/dist/CTABanner-d0dU_3UV.js.map +1 -0
  33. package/dist/CTABanner-f-kYjXeS.js +2 -0
  34. package/dist/CTABanner-f-kYjXeS.js.map +1 -0
  35. package/dist/CTABanner-hl7edywo.js +2 -0
  36. package/dist/CTABanner-hl7edywo.js.map +1 -0
  37. package/dist/CTABanner-kg01fEFO.js +2 -0
  38. package/dist/CTABanner-kg01fEFO.js.map +1 -0
  39. package/dist/CTABanner-yKuWX36F.js +2 -0
  40. package/dist/CTABanner-yKuWX36F.js.map +1 -0
  41. package/dist/CTABanner-zHhZFxmC.js +2 -0
  42. package/dist/CTABanner-zHhZFxmC.js.map +1 -0
  43. package/dist/CodeSample-60eygvma.js +2 -0
  44. package/dist/CodeSample-60eygvma.js.map +1 -0
  45. package/dist/CodeSample-BOwTybu7.js +2 -0
  46. package/dist/CodeSample-BOwTybu7.js.map +1 -0
  47. package/dist/CodeSample-BabNvAXq.js +2 -0
  48. package/dist/CodeSample-BabNvAXq.js.map +1 -0
  49. package/dist/CodeSample-BeKAECzE.js +2 -0
  50. package/dist/CodeSample-BeKAECzE.js.map +1 -0
  51. package/dist/CodeSample-Bmj6O9cO.js +2 -0
  52. package/dist/CodeSample-Bmj6O9cO.js.map +1 -0
  53. package/dist/CodeSample-By1h0pjl.js +2 -0
  54. package/dist/CodeSample-By1h0pjl.js.map +1 -0
  55. package/dist/CodeSample-C1A9mpxa.js +2 -0
  56. package/dist/CodeSample-C1A9mpxa.js.map +1 -0
  57. package/dist/CodeSample-C8UmShST.js +2 -0
  58. package/dist/CodeSample-C8UmShST.js.map +1 -0
  59. package/dist/CodeSample-CirMT2VK.js +2 -0
  60. package/dist/CodeSample-CirMT2VK.js.map +1 -0
  61. package/dist/CodeSample-D1cQIpZA.js +2 -0
  62. package/dist/CodeSample-D1cQIpZA.js.map +1 -0
  63. package/dist/CodeSample-D8oms9v4.js +2 -0
  64. package/dist/CodeSample-D8oms9v4.js.map +1 -0
  65. package/dist/CodeSample-DAYrHZ42.js +2 -0
  66. package/dist/CodeSample-DAYrHZ42.js.map +1 -0
  67. package/dist/CodeSample-DV4gehAY.js +2 -0
  68. package/dist/CodeSample-DV4gehAY.js.map +1 -0
  69. package/dist/CodeSample-DkfSxkpp.js +2 -0
  70. package/dist/CodeSample-DkfSxkpp.js.map +1 -0
  71. package/dist/CodeSample-VlH3bfzC.js +2 -0
  72. package/dist/CodeSample-VlH3bfzC.js.map +1 -0
  73. package/dist/CodeSample-dW2vKCd1.js +2 -0
  74. package/dist/CodeSample-dW2vKCd1.js.map +1 -0
  75. package/dist/CodeSample-vnPcdu-x.js +2 -0
  76. package/dist/CodeSample-vnPcdu-x.js.map +1 -0
  77. package/dist/HomeView-B9Ve1Kuh.js +2 -0
  78. package/dist/HomeView-B9Ve1Kuh.js.map +1 -0
  79. package/dist/HomeView-CH5Po1Ed.js +2 -0
  80. package/dist/HomeView-CH5Po1Ed.js.map +1 -0
  81. package/dist/HomeView-CL0kAYj1.js +2 -0
  82. package/dist/HomeView-CL0kAYj1.js.map +1 -0
  83. package/dist/HomeView-CMvkJdJa.js +2 -0
  84. package/dist/HomeView-CMvkJdJa.js.map +1 -0
  85. package/dist/HomeView-CQK9q_tO.js +2 -0
  86. package/dist/HomeView-CQK9q_tO.js.map +1 -0
  87. package/dist/HomeView-CTDZ19B3.js +2 -0
  88. package/dist/HomeView-CTDZ19B3.js.map +1 -0
  89. package/dist/HomeView-CU-l-tLg.js +2 -0
  90. package/dist/HomeView-CU-l-tLg.js.map +1 -0
  91. package/dist/HomeView-CWNvXmSg.js +2 -0
  92. package/dist/HomeView-CWNvXmSg.js.map +1 -0
  93. package/dist/HomeView-CdyaQH15.js +2 -0
  94. package/dist/HomeView-CdyaQH15.js.map +1 -0
  95. package/dist/HomeView-CzlycqNf.js +2 -0
  96. package/dist/HomeView-CzlycqNf.js.map +1 -0
  97. package/dist/HomeView-D0NBPUfo.js +2 -0
  98. package/dist/HomeView-D0NBPUfo.js.map +1 -0
  99. package/dist/HomeView-D8G2HjcZ.js +2 -0
  100. package/dist/HomeView-D8G2HjcZ.js.map +1 -0
  101. package/dist/HomeView-DGW10Fml.js +2 -0
  102. package/dist/HomeView-DGW10Fml.js.map +1 -0
  103. package/dist/HomeView-DgQI-VH2.js +2 -0
  104. package/dist/HomeView-DgQI-VH2.js.map +1 -0
  105. package/dist/HomeView-FTlkTnsT.js +2 -0
  106. package/dist/HomeView-FTlkTnsT.js.map +1 -0
  107. package/dist/HomeView-hSpU5kot.js +2 -0
  108. package/dist/HomeView-hSpU5kot.js.map +1 -0
  109. package/dist/HomeView-vZozpVGs.js +2 -0
  110. package/dist/HomeView-vZozpVGs.js.map +1 -0
  111. package/dist/Icon-B2OPWMtK.js +2 -0
  112. package/dist/Icon-B2OPWMtK.js.map +1 -0
  113. package/dist/Icon-BRAhu_Eb.js +2 -0
  114. package/dist/Icon-BRAhu_Eb.js.map +1 -0
  115. package/dist/Icon-C822nO1R.js +2 -0
  116. package/dist/Icon-C822nO1R.js.map +1 -0
  117. package/dist/Icon-CEm2iFxX.js +2 -0
  118. package/dist/Icon-CEm2iFxX.js.map +1 -0
  119. package/dist/Icon-CINO4Gs-.js +2 -0
  120. package/dist/Icon-CINO4Gs-.js.map +1 -0
  121. package/dist/Icon-CNvRfLaE.js +2 -0
  122. package/dist/Icon-CNvRfLaE.js.map +1 -0
  123. package/dist/Icon-CWAF56rs.js +2 -0
  124. package/dist/Icon-CWAF56rs.js.map +1 -0
  125. package/dist/Icon-CzVtM54u.js +2 -0
  126. package/dist/Icon-CzVtM54u.js.map +1 -0
  127. package/dist/Icon-D-fnSCsP.js +2 -0
  128. package/dist/Icon-D-fnSCsP.js.map +1 -0
  129. package/dist/Icon-D4gOtCv9.js +2 -0
  130. package/dist/Icon-D4gOtCv9.js.map +1 -0
  131. package/dist/Icon-DP1qesF5.js +2 -0
  132. package/dist/Icon-DP1qesF5.js.map +1 -0
  133. package/dist/Icon-DQdRqDU9.js +2 -0
  134. package/dist/Icon-DQdRqDU9.js.map +1 -0
  135. package/dist/Icon-Dogc3o95.js +2 -0
  136. package/dist/Icon-Dogc3o95.js.map +1 -0
  137. package/dist/Icon-FVBVv2mV.js +2 -0
  138. package/dist/Icon-FVBVv2mV.js.map +1 -0
  139. package/dist/Icon-KY6ULovn.js +2 -0
  140. package/dist/Icon-KY6ULovn.js.map +1 -0
  141. package/dist/Icon-XgHKz5VO.js +2 -0
  142. package/dist/Icon-XgHKz5VO.js.map +1 -0
  143. package/dist/Icon-sBVn0l7I.js +2 -0
  144. package/dist/Icon-sBVn0l7I.js.map +1 -0
  145. package/dist/Text-B-0yh8la.js +2 -0
  146. package/dist/Text-B-0yh8la.js.map +1 -0
  147. package/dist/Text-BCFz4JU-.js +2 -0
  148. package/dist/Text-BCFz4JU-.js.map +1 -0
  149. package/dist/Text-BNiddUr4.js +2 -0
  150. package/dist/Text-BNiddUr4.js.map +1 -0
  151. package/dist/Text-Bf364_Q8.js +2 -0
  152. package/dist/Text-Bf364_Q8.js.map +1 -0
  153. package/dist/Text-Bxe0mzUL.js +2 -0
  154. package/dist/Text-Bxe0mzUL.js.map +1 -0
  155. package/dist/Text-CfVL9URz.js +2 -0
  156. package/dist/Text-CfVL9URz.js.map +1 -0
  157. package/dist/Text-ChiAdn4X.js +2 -0
  158. package/dist/Text-ChiAdn4X.js.map +1 -0
  159. package/dist/Text-D5uguhzM.js +2 -0
  160. package/dist/Text-D5uguhzM.js.map +1 -0
  161. package/dist/Text-D9DhNy4J.js +2 -0
  162. package/dist/Text-D9DhNy4J.js.map +1 -0
  163. package/dist/Text-DFWZt4lj.js +2 -0
  164. package/dist/Text-DFWZt4lj.js.map +1 -0
  165. package/dist/Text-DGY59P42.js +2 -0
  166. package/dist/Text-DGY59P42.js.map +1 -0
  167. package/dist/Text-DfXk3ZuK.js +2 -0
  168. package/dist/Text-DfXk3ZuK.js.map +1 -0
  169. package/dist/Text-DwHGYbrw.js +2 -0
  170. package/dist/Text-DwHGYbrw.js.map +1 -0
  171. package/dist/Text-DxqdnsZ5.js +2 -0
  172. package/dist/Text-DxqdnsZ5.js.map +1 -0
  173. package/dist/Text-K_2YR6jw.js +2 -0
  174. package/dist/Text-K_2YR6jw.js.map +1 -0
  175. package/dist/Text-XHfscYPw.js +2 -0
  176. package/dist/Text-XHfscYPw.js.map +1 -0
  177. package/dist/Text-b8fT0OYO.js +2 -0
  178. package/dist/Text-b8fT0OYO.js.map +1 -0
  179. package/dist/Update-48mkPPHi.js +2 -0
  180. package/dist/Update-48mkPPHi.js.map +1 -0
  181. package/dist/Update-6IvrCbUn.js +2 -0
  182. package/dist/Update-6IvrCbUn.js.map +1 -0
  183. package/dist/Update-B31SkKLO.js +2 -0
  184. package/dist/Update-B31SkKLO.js.map +1 -0
  185. package/dist/Update-BDC6jF5Q.js +2 -0
  186. package/dist/Update-BDC6jF5Q.js.map +1 -0
  187. package/dist/Update-BdhhXj2D.js +2 -0
  188. package/dist/Update-BdhhXj2D.js.map +1 -0
  189. package/dist/Update-BzuP6PUF.js +2 -0
  190. package/dist/Update-BzuP6PUF.js.map +1 -0
  191. package/dist/Update-C-w0Og8S.js +2 -0
  192. package/dist/Update-C-w0Og8S.js.map +1 -0
  193. package/dist/Update-CRZyUhwE.js +2 -0
  194. package/dist/Update-CRZyUhwE.js.map +1 -0
  195. package/dist/Update-Cmw6WVrs.js +2 -0
  196. package/dist/Update-Cmw6WVrs.js.map +1 -0
  197. package/dist/Update-D5pUmk9V.js +2 -0
  198. package/dist/Update-D5pUmk9V.js.map +1 -0
  199. package/dist/Update-D7tzid9y.js +2 -0
  200. package/dist/Update-D7tzid9y.js.map +1 -0
  201. package/dist/Update-DDQewhuu.js +2 -0
  202. package/dist/Update-DDQewhuu.js.map +1 -0
  203. package/dist/Update-DPeHa_01.js +2 -0
  204. package/dist/Update-DPeHa_01.js.map +1 -0
  205. package/dist/Update-DUFcLP3-.js +2 -0
  206. package/dist/Update-DUFcLP3-.js.map +1 -0
  207. package/dist/Update-DbvzJGdB.js +2 -0
  208. package/dist/Update-DbvzJGdB.js.map +1 -0
  209. package/dist/Update-SFXhorqS.js +2 -0
  210. package/dist/Update-SFXhorqS.js.map +1 -0
  211. package/dist/Update-b8FT7xsG.js +2 -0
  212. package/dist/Update-b8FT7xsG.js.map +1 -0
  213. package/dist/VideoGuide-B0uoxh7k.js +2 -0
  214. package/dist/VideoGuide-B0uoxh7k.js.map +1 -0
  215. package/dist/VideoGuide-BELHPOmy.js +2 -0
  216. package/dist/VideoGuide-BELHPOmy.js.map +1 -0
  217. package/dist/VideoGuide-BPpz9He-.js +2 -0
  218. package/dist/VideoGuide-BPpz9He-.js.map +1 -0
  219. package/dist/VideoGuide-CMURpSE8.js +2 -0
  220. package/dist/VideoGuide-CMURpSE8.js.map +1 -0
  221. package/dist/VideoGuide-CXGDgkuc.js +2 -0
  222. package/dist/VideoGuide-CXGDgkuc.js.map +1 -0
  223. package/dist/VideoGuide-CXL3G2yS.js +2 -0
  224. package/dist/VideoGuide-CXL3G2yS.js.map +1 -0
  225. package/dist/VideoGuide-Cdi9zWS2.js +2 -0
  226. package/dist/VideoGuide-Cdi9zWS2.js.map +1 -0
  227. package/dist/VideoGuide-CrW6tvqB.js +2 -0
  228. package/dist/VideoGuide-CrW6tvqB.js.map +1 -0
  229. package/dist/VideoGuide-D6TRphry.js +2 -0
  230. package/dist/VideoGuide-D6TRphry.js.map +1 -0
  231. package/dist/VideoGuide-DkMriANN.js +2 -0
  232. package/dist/VideoGuide-DkMriANN.js.map +1 -0
  233. package/dist/VideoGuide-Ds1vQrb7.js +2 -0
  234. package/dist/VideoGuide-Ds1vQrb7.js.map +1 -0
  235. package/dist/VideoGuide-Dyf3clMb.js +2 -0
  236. package/dist/VideoGuide-Dyf3clMb.js.map +1 -0
  237. package/dist/VideoGuide-QouYMQx_.js +2 -0
  238. package/dist/VideoGuide-QouYMQx_.js.map +1 -0
  239. package/dist/VideoGuide-ZBarZs4D.js +2 -0
  240. package/dist/VideoGuide-ZBarZs4D.js.map +1 -0
  241. package/dist/VideoGuide-oYwuE6Lg.js +2 -0
  242. package/dist/VideoGuide-oYwuE6Lg.js.map +1 -0
  243. package/dist/VideoGuide-qcVqW6Su.js +2 -0
  244. package/dist/VideoGuide-qcVqW6Su.js.map +1 -0
  245. package/dist/VideoGuide-yyBprKvP.js +2 -0
  246. package/dist/VideoGuide-yyBprKvP.js.map +1 -0
  247. package/dist/_rollupPluginBabelHelpers-B1yJb5Rh.js +4 -0
  248. package/dist/_rollupPluginBabelHelpers-B1yJb5Rh.js.map +1 -0
  249. package/dist/_rollupPluginBabelHelpers-BaNafudn.js +4 -0
  250. package/dist/_rollupPluginBabelHelpers-BaNafudn.js.map +1 -0
  251. package/dist/_rollupPluginBabelHelpers-BuF1bLAd.js +4 -0
  252. package/dist/_rollupPluginBabelHelpers-BuF1bLAd.js.map +1 -0
  253. package/dist/_rollupPluginBabelHelpers-C10TYBta.js +4 -0
  254. package/dist/_rollupPluginBabelHelpers-C10TYBta.js.map +1 -0
  255. package/dist/_rollupPluginBabelHelpers-CV-SOB7x.js +4 -0
  256. package/dist/_rollupPluginBabelHelpers-CV-SOB7x.js.map +1 -0
  257. package/dist/_rollupPluginBabelHelpers-CVesZFRP.js +4 -0
  258. package/dist/_rollupPluginBabelHelpers-CVesZFRP.js.map +1 -0
  259. package/dist/_rollupPluginBabelHelpers-Ch3Y817m.js +4 -0
  260. package/dist/_rollupPluginBabelHelpers-Ch3Y817m.js.map +1 -0
  261. package/dist/_rollupPluginBabelHelpers-CxxbOh5W.js +4 -0
  262. package/dist/_rollupPluginBabelHelpers-CxxbOh5W.js.map +1 -0
  263. package/dist/_rollupPluginBabelHelpers-D19Us8SI.js +4 -0
  264. package/dist/_rollupPluginBabelHelpers-D19Us8SI.js.map +1 -0
  265. package/dist/_rollupPluginBabelHelpers-D2-m_SFt.js +4 -0
  266. package/dist/_rollupPluginBabelHelpers-D2-m_SFt.js.map +1 -0
  267. package/dist/_rollupPluginBabelHelpers-D5TiGB2z.js +4 -0
  268. package/dist/_rollupPluginBabelHelpers-D5TiGB2z.js.map +1 -0
  269. package/dist/_rollupPluginBabelHelpers-D6C3DhAR.js +4 -0
  270. package/dist/_rollupPluginBabelHelpers-D6C3DhAR.js.map +1 -0
  271. package/dist/_rollupPluginBabelHelpers-IYA2a-lX.js +4 -0
  272. package/dist/_rollupPluginBabelHelpers-IYA2a-lX.js.map +1 -0
  273. package/dist/_rollupPluginBabelHelpers-IZwOU41g.js +4 -0
  274. package/dist/_rollupPluginBabelHelpers-IZwOU41g.js.map +1 -0
  275. package/dist/_rollupPluginBabelHelpers-PCuXrt2F.js +4 -0
  276. package/dist/_rollupPluginBabelHelpers-PCuXrt2F.js.map +1 -0
  277. package/dist/_rollupPluginBabelHelpers-k3SPIMH4.js +4 -0
  278. package/dist/_rollupPluginBabelHelpers-k3SPIMH4.js.map +1 -0
  279. package/dist/_rollupPluginBabelHelpers-mdhlT6e0.js +4 -0
  280. package/dist/_rollupPluginBabelHelpers-mdhlT6e0.js.map +1 -0
  281. package/dist/brand.d.ts +9 -9
  282. package/dist/brand.js +1 -1
  283. package/dist/brand.js.map +1 -1
  284. package/dist/coder/themes/cosmo-light.js.map +1 -1
  285. package/dist/coder.d.ts +33 -9
  286. package/dist/coder.js +1 -1
  287. package/dist/coder.js.map +1 -1
  288. package/dist/content.d.ts +260 -171
  289. package/dist/content.js +1 -1
  290. package/dist/content.js.map +1 -1
  291. package/dist/index.css +267 -137
  292. package/dist/layouts.d.ts +23 -14
  293. package/dist/layouts.js +1 -1
  294. package/dist/layouts.js.map +1 -1
  295. package/dist/pages.js +1 -1
  296. package/dist/pages.js.map +1 -1
  297. package/dist/system.d.ts +10 -0
  298. package/dist/system.js +2 -0
  299. package/dist/system.js.map +1 -0
  300. package/dist/tslib.es6-2HddmpXk.js +2 -0
  301. package/dist/{tslib.es6-BS8I3nP0.js.map → tslib.es6-2HddmpXk.js.map} +1 -1
  302. package/dist/tslib.es6-B3WQO7bC.js +2 -0
  303. package/dist/{tslib.es6-DNz-U5oh.js.map → tslib.es6-B3WQO7bC.js.map} +1 -1
  304. package/dist/tslib.es6-B4LqmUlh.js +2 -0
  305. package/dist/{tslib.es6-BJOaQ_lJ.js.map → tslib.es6-B4LqmUlh.js.map} +1 -1
  306. package/dist/tslib.es6-BJtAe2Ef.js +2 -0
  307. package/dist/tslib.es6-BJtAe2Ef.js.map +1 -0
  308. package/dist/tslib.es6-BUCTXb7p.js +2 -0
  309. package/dist/tslib.es6-BUCTXb7p.js.map +1 -0
  310. package/dist/tslib.es6-BVagjPgu.js +2 -0
  311. package/dist/tslib.es6-BVagjPgu.js.map +1 -0
  312. package/dist/tslib.es6-Baxakhew.js +2 -0
  313. package/dist/tslib.es6-Baxakhew.js.map +1 -0
  314. package/dist/tslib.es6-BeaYjpg4.js +2 -0
  315. package/dist/tslib.es6-BeaYjpg4.js.map +1 -0
  316. package/dist/tslib.es6-C5x7jiZr.js +2 -0
  317. package/dist/tslib.es6-C5x7jiZr.js.map +1 -0
  318. package/dist/tslib.es6-CGuo9hNf.js +2 -0
  319. package/dist/tslib.es6-CGuo9hNf.js.map +1 -0
  320. package/dist/tslib.es6-CaUFBY2d.js +2 -0
  321. package/dist/tslib.es6-CaUFBY2d.js.map +1 -0
  322. package/dist/tslib.es6-CiOfWANY.js +2 -0
  323. package/dist/tslib.es6-CiOfWANY.js.map +1 -0
  324. package/dist/tslib.es6-D6Dmrhuy.js +2 -0
  325. package/dist/tslib.es6-D6Dmrhuy.js.map +1 -0
  326. package/dist/tslib.es6-DS8w8jUy.js +2 -0
  327. package/dist/tslib.es6-DS8w8jUy.js.map +1 -0
  328. package/dist/tslib.es6-DhpaRs87.js +2 -0
  329. package/dist/tslib.es6-DhpaRs87.js.map +1 -0
  330. package/dist/tslib.es6-Y3-sJK9A.js +2 -0
  331. package/dist/tslib.es6-Y3-sJK9A.js.map +1 -0
  332. package/dist/tslib.es6-iVzSobQR.js +2 -0
  333. package/dist/tslib.es6-iVzSobQR.js.map +1 -0
  334. package/dist/views.js +1 -1
  335. package/dist/writer.d.ts +427 -53
  336. package/dist/writer.js +1 -1
  337. package/dist/writer.js.map +1 -1
  338. package/docs/.nojekyll +1 -0
  339. package/docs/assets/hierarchy.js +1 -0
  340. package/docs/assets/highlight.css +22 -0
  341. package/docs/assets/icons.js +18 -0
  342. package/docs/assets/icons.svg +1 -0
  343. package/docs/assets/main.js +60 -0
  344. package/docs/assets/navigation.js +1 -0
  345. package/docs/assets/search.js +1 -0
  346. package/docs/assets/style.css +1640 -0
  347. package/docs/functions/GuideCard.html +6 -0
  348. package/docs/hierarchy.html +1 -0
  349. package/docs/index.html +2 -0
  350. package/docs/interfaces/GuideCardProps.html +18 -0
  351. package/docs/modules.html +1 -0
  352. package/index.ts +0 -1
  353. package/package.json +16 -20
  354. package/project.json +677 -0
  355. package/rollup.config.js +32 -3
  356. package/src/brand/Button/Button.styles.tsx +28 -0
  357. package/src/brand/Button/Button.tsx +3 -35
  358. package/src/brand/CTABanner/CTABanner.styles.tsx +80 -0
  359. package/src/brand/CTABanner/CTABanner.tsx +34 -112
  360. package/src/brand/Footer/Footer.styles.tsx +18 -0
  361. package/src/brand/Footer/Footer.tsx +4 -24
  362. package/src/brand/TODO.md +1 -0
  363. package/src/coder/Code/Code.styles.tsx +134 -35
  364. package/src/coder/Code/Code.tsx +131 -43
  365. package/src/coder/Code/CodeLoader.tsx +10 -0
  366. package/src/coder/Code/annotations.tsx +28 -8
  367. package/src/coder/Code/highlight.ts +38 -0
  368. package/src/coder/Code/index.ts +6 -2
  369. package/src/coder/CodeCopy/{CodeCopy.style.tsx → CodeCopy.styles.tsx} +6 -6
  370. package/src/coder/CodeCopy/CodeCopy.tsx +6 -6
  371. package/src/coder/CodeSample/CodeSample.tsx +87 -19
  372. package/src/coder/CodeTabs/CodeTabs.styles.tsx +98 -66
  373. package/src/coder/CodeTabs/CodeTabs.tsx +78 -47
  374. package/src/coder/CodeTheme/CodeTheme.tsx +89 -48
  375. package/src/coder/CodeTheme/index.ts +0 -1
  376. package/src/coder/CoderProvider.tsx +26 -0
  377. package/src/coder/hooks/highlight.ts +182 -0
  378. package/src/coder/index.ts +11 -7
  379. package/src/content/ContentDecoator.styles.tsx +113 -0
  380. package/src/content/ContentDecorator.tsx +17 -0
  381. package/src/content/GridDecorator.styles.tsx +67 -0
  382. package/src/content/GridDecorator.tsx +21 -0
  383. package/src/content/ReactContent.tsx +575 -0
  384. package/src/content/index.ts +10 -2
  385. package/src/icons/index.ts +0 -0
  386. package/src/kit/Loader/Loader.styles.tsx +53 -0
  387. package/src/kit/Loader/Loader.tsx +22 -0
  388. package/src/kit/TODO.md +2 -0
  389. package/src/kit/index.ts +1 -0
  390. package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +305 -0
  391. package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +237 -0
  392. package/src/layouts/LayoutPrimary/index.ts +3 -0
  393. package/src/layouts/index.ts +2 -3
  394. package/src/pages/HomePage/HomePage.styles.tsx +16 -0
  395. package/src/pages/HomePage/HomePage.tsx +7 -21
  396. package/src/pages/TODO.md +1 -0
  397. package/src/system/SearchButton/SearchButton.styles.tsx +86 -0
  398. package/src/system/SearchButton/SearchButton.tsx +116 -0
  399. package/src/system/SearchButton/index.ts +1 -0
  400. package/src/system/index.ts +1 -0
  401. package/src/utils/useStyle.ts +19 -0
  402. package/src/views/HomeView/HomeView.styles.tsx +37 -0
  403. package/src/views/HomeView/HomeView.tsx +5 -45
  404. package/src/views/TODO.md +1 -0
  405. package/src/writer/Anchor/Anchor.styles.tsx +11 -0
  406. package/src/writer/Anchor/Anchor.tsx +51 -0
  407. package/src/writer/Anchor/index.tsx +1 -0
  408. package/src/writer/Badge/Badge.styles.tsx +39 -28
  409. package/src/writer/Badge/Badge.tsx +37 -20
  410. package/src/writer/Banner/Banner.styles.tsx +91 -0
  411. package/src/writer/Banner/Banner.tsx +70 -0
  412. package/src/writer/Banner/index.ts +1 -0
  413. package/src/writer/Blockquote/Blockquote.styles.tsx +4 -4
  414. package/src/writer/Blockquote/Blockquote.tsx +6 -3
  415. package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +22 -21
  416. package/src/writer/Breadcrumbs/Breadcrumbs.tsx +19 -13
  417. package/src/writer/Button/Button.styles.tsx +137 -0
  418. package/src/writer/Button/Button.tsx +75 -0
  419. package/src/writer/Button/index.ts +2 -0
  420. package/src/writer/Callout/Callout.styles.tsx +29 -40
  421. package/src/writer/Callout/Callout.tsx +31 -16
  422. package/src/writer/Card/Card.styles.tsx +47 -0
  423. package/src/writer/Card/Card.tsx +69 -0
  424. package/src/writer/Card/index.ts +1 -0
  425. package/src/writer/Code/Code.styles.tsx +10 -11
  426. package/src/writer/Code/Code.tsx +7 -4
  427. package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +172 -0
  428. package/src/writer/ColorSchemeButton/index.ts +1 -0
  429. package/src/writer/Details/Details.styles.tsx +85 -68
  430. package/src/writer/Details/Details.tsx +83 -46
  431. package/src/writer/Example/index.tsx +5 -0
  432. package/src/writer/GuideCard/GuideCard.styles.tsx +108 -107
  433. package/src/writer/GuideCard/GuideCard.tsx +72 -37
  434. package/src/writer/Heading/Heading.styles.tsx +69 -49
  435. package/src/writer/Heading/Heading.tsx +92 -22
  436. package/src/writer/Hr/Hr.styles.tsx +5 -5
  437. package/src/writer/Hr/Hr.tsx +3 -6
  438. package/src/writer/Icon/Icon.tsx +48 -0
  439. package/src/writer/Icon/index.ts +1 -0
  440. package/src/writer/Image/Image.styles.tsx +9 -0
  441. package/src/writer/Image/Image.tsx +19 -0
  442. package/src/writer/Image/index.ts +1 -0
  443. package/src/writer/List/List.styles.tsx +47 -0
  444. package/src/writer/List/List.tsx +29 -0
  445. package/src/writer/List/index.ts +4 -0
  446. package/src/writer/NavLinks/NavLinks.styles.ts +23 -23
  447. package/src/writer/NavLinks/NavLinks.tsx +66 -19
  448. package/src/writer/Pre/Pre.styles.tsx +5 -5
  449. package/src/writer/Pre/Pre.tsx +4 -3
  450. package/src/writer/Steps/Steps.styles.tsx +14 -12
  451. package/src/writer/Steps/Steps.tsx +39 -10
  452. package/src/writer/Table/Table.styles.tsx +62 -30
  453. package/src/writer/Table/Table.tsx +121 -11
  454. package/src/writer/Table/index.ts +0 -7
  455. package/src/writer/Tabs/Tabs.styles.tsx +63 -70
  456. package/src/writer/Tabs/Tabs.tsx +31 -29
  457. package/src/writer/Text/Text.styles.tsx +66 -0
  458. package/src/writer/Text/Text.tsx +79 -0
  459. package/src/writer/Text/index.ts +3 -0
  460. package/src/writer/TocCard/TocCard.module.css +44 -0
  461. package/src/writer/TocCard/TocCard.tsx +42 -0
  462. package/src/writer/TocCard/index.ts +3 -0
  463. package/src/writer/UnderlineNav/Tabs.tsx +51 -0
  464. package/src/writer/UnderlineNav/TabsPrimary.styles.tsx +184 -0
  465. package/src/writer/UnderlineNav/TabsPrimary.tsx +209 -0
  466. package/src/writer/UnderlineNav/TabsSecondary.styles.tsx +77 -0
  467. package/src/writer/UnderlineNav/TabsSecondary.tsx +171 -0
  468. package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +181 -45
  469. package/src/writer/UnderlineNav/UnderlineNav.tsx +258 -23
  470. package/src/writer/UnderlineNav/index.ts +2 -1
  471. package/src/writer/UnderlineNav/useValueChange.ts +60 -0
  472. package/src/writer/Update/Update.styles.tsx +33 -0
  473. package/src/writer/Update/Update.tsx +37 -0
  474. package/src/writer/Update/index.ts +1 -0
  475. package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
  476. package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
  477. package/src/writer/VideoGuide/index.ts +1 -0
  478. package/src/writer/index.ts +23 -1
  479. package/tsconfig.json +11 -6
  480. package/types.d.ts +50 -0
  481. package/writer.ts +1 -1
  482. package/dist/CTABanner-B-metiuR.js +0 -2
  483. package/dist/CTABanner-B-metiuR.js.map +0 -1
  484. package/dist/CTABanner-BytLRAOg.js +0 -2
  485. package/dist/CTABanner-BytLRAOg.js.map +0 -1
  486. package/dist/CTABanner-hcWUnRIm.js +0 -2
  487. package/dist/CTABanner-hcWUnRIm.js.map +0 -1
  488. package/dist/CodeSample-Bkdm9TLb.js +0 -2
  489. package/dist/CodeSample-Bkdm9TLb.js.map +0 -1
  490. package/dist/CodeSample-Bt6WJOYx.js +0 -2
  491. package/dist/CodeSample-Bt6WJOYx.js.map +0 -1
  492. package/dist/CodeSample-D-bGz40b.js +0 -2
  493. package/dist/CodeSample-D-bGz40b.js.map +0 -1
  494. package/dist/HomeView-C70Vzl0K.js +0 -2
  495. package/dist/HomeView-C70Vzl0K.js.map +0 -1
  496. package/dist/HomeView-DA0hRPl2.js +0 -2
  497. package/dist/HomeView-DA0hRPl2.js.map +0 -1
  498. package/dist/HomeView-sbl_99l1.js +0 -2
  499. package/dist/HomeView-sbl_99l1.js.map +0 -1
  500. package/dist/UnderlineNav-3vpnAIF7.js +0 -2
  501. package/dist/UnderlineNav-3vpnAIF7.js.map +0 -1
  502. package/dist/UnderlineNav-CnSXtQ0o.js +0 -2
  503. package/dist/UnderlineNav-CnSXtQ0o.js.map +0 -1
  504. package/dist/UnderlineNav-hAt4ieuk.js +0 -2
  505. package/dist/UnderlineNav-hAt4ieuk.js.map +0 -1
  506. package/dist/_rollupPluginBabelHelpers-CdarGYFF.js +0 -2
  507. package/dist/_rollupPluginBabelHelpers-CdarGYFF.js.map +0 -1
  508. package/dist/_rollupPluginBabelHelpers-DNCsaSlj.js +0 -2
  509. package/dist/_rollupPluginBabelHelpers-DNCsaSlj.js.map +0 -1
  510. package/dist/_rollupPluginBabelHelpers-Dyp77Dty.js +0 -2
  511. package/dist/_rollupPluginBabelHelpers-Dyp77Dty.js.map +0 -1
  512. package/dist/index-Bj8cSv3b.js +0 -2
  513. package/dist/index-Bj8cSv3b.js.map +0 -1
  514. package/dist/index-ByyyJDhj.js +0 -2
  515. package/dist/index-ByyyJDhj.js.map +0 -1
  516. package/dist/index-DcT-QJgO.js +0 -2
  517. package/dist/index-DcT-QJgO.js.map +0 -1
  518. package/dist/tslib.es6-BJOaQ_lJ.js +0 -2
  519. package/dist/tslib.es6-BS8I3nP0.js +0 -2
  520. package/dist/tslib.es6-DNz-U5oh.js +0 -2
  521. package/src/content/Anchor/Anchor.tsx +0 -63
  522. package/src/content/Anchor/index.tsx +0 -3
  523. package/src/content/Content/Content.tsx +0 -21
  524. package/src/content/Content/index.tsx +0 -3
  525. package/src/content/Content.tsx +0 -171
  526. package/src/content/Subtitle/Subtitle.tsx +0 -21
  527. package/src/content/Subtitle/index.tsx +0 -3
  528. package/src/layouts/Layout.styles.tsx +0 -151
  529. package/src/layouts/Layout.tsx +0 -121
  530. package/src/writer/Icon/index.tsx +0 -342
@@ -0,0 +1,86 @@
1
+ import { css } from "@linaria/core";
2
+
3
+ export const SearchButton = css`
4
+ @layer defaults {
5
+ background-color: transparent;
6
+ border-radius: 8px;
7
+ border: 1px solid var(--dark32);
8
+ color: var(--text-primary);
9
+ background: var(--dark16);
10
+ font-size: var(--xyd-font-size-small);
11
+ font-weight: var(--xyd-font-weight-semibold);
12
+ height: 36px;
13
+ justify-content: space-between;
14
+ display: flex;
15
+ align-items: center;
16
+ flex: 1;
17
+
18
+ padding: 0 8px;
19
+ margin: 12px 0 0;
20
+ user-select: none;
21
+ width: 100%;
22
+ transition: border-color .15s ease;
23
+
24
+
25
+ max-width: 300px;
26
+ margin: 0;
27
+
28
+ cursor: pointer;
29
+
30
+ &:hover {
31
+ background: var(--dark16);
32
+ box-shadow: none;
33
+ color: var(--dark48);
34
+ outline: none;
35
+
36
+ box-shadow: none;
37
+ border-color: var(--dark48);
38
+ }
39
+
40
+ [part="container"] {
41
+ align-items: center;
42
+ display: flex;
43
+ }
44
+
45
+ [part="placeholder"] {
46
+ display: block !important;
47
+ font-size: var(--xyd-font-size-small);
48
+ color: var(--dark48);
49
+ font-weight: var(--xyd-font-weight-normal);
50
+ }
51
+
52
+ [part="icon"] {
53
+ stroke-width: 1.4;
54
+ color: var(--dark48) !important;
55
+ height: 15px;
56
+ transition: color .15s var(--cubic-enter);
57
+ }
58
+
59
+
60
+ [part="keys"] {
61
+ display: flex;
62
+ gap: 4px;
63
+ min-width: auto;
64
+ }
65
+
66
+ [part="key"] {
67
+ align-items: center;
68
+ background: var(--dark16);
69
+ border-radius: 3px;
70
+ box-shadow: none;
71
+ color: var(--dark48);
72
+ display: flex;
73
+ height: 18px;
74
+ line-height: 18px;
75
+ justify-content: center;
76
+ font-size: 12px;
77
+ letter-spacing: 1px;
78
+ position: relative;
79
+ padding: 0;
80
+ margin: 0;
81
+ border: 0px;
82
+ top: 0;
83
+ width: 20px;
84
+ }
85
+ }
86
+ `
@@ -0,0 +1,116 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+
3
+ import * as cn from "./SearchButton.styles";
4
+
5
+ interface SearchButtonProps {
6
+ onClick?: () => void;
7
+ placeholder?: string;
8
+ shortcutKeys?: string[];
9
+ }
10
+
11
+ export function SearchButton({
12
+ shortcutKeys = ['⌘', 'K'],
13
+ ...props
14
+ }: SearchButtonProps) {
15
+ useShortcuts(shortcutKeys, () => props.onClick?.());
16
+
17
+ useEffect(() => {
18
+ // @ts-ignore - !!! FIX IN THE FUTURE !!! its a fix for loading virtual-component:Search twice? original and from plugin - check if exists on prod
19
+ window.__UNSAFE_xyd_search_button_inited = true
20
+
21
+ return () => {
22
+ // @ts-ignore
23
+ window.__UNSAFE_xyd_search_button_inited = false
24
+ }
25
+ }, [])
26
+
27
+ return (
28
+ <xyd-search-button
29
+ className={cn.SearchButton}
30
+ aria-label="Search"
31
+ onClick={props.onClick}
32
+ >
33
+ <span part="container">
34
+ <svg
35
+ width={20}
36
+ height={20}
37
+ part="icon"
38
+ viewBox="0 0 20 20"
39
+ >
40
+ <path
41
+ d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z"
42
+ stroke="currentColor"
43
+ fill="none"
44
+ fillRule="evenodd"
45
+ strokeLinecap="round"
46
+ strokeLinejoin="round"
47
+ />
48
+ </svg>
49
+ <span part="placeholder">{props.placeholder || "Search"}</span>
50
+ </span>
51
+
52
+ {
53
+ shortcutKeys.length > 0 && (
54
+ <span part="keys">
55
+ {shortcutKeys.map((key, index) => (
56
+ <kbd key={index} part="key">{key}</kbd>
57
+ ))}
58
+ </span>
59
+ )
60
+ }
61
+ </xyd-search-button>
62
+ )
63
+ }
64
+
65
+ function useShortcuts(shortcutKeys: string[], onTrigger: () => void): void {
66
+ // Keep latest handler reference to avoid stale closures
67
+ const savedHandler = useRef(onTrigger);
68
+
69
+ useEffect(() => {
70
+ savedHandler.current = onTrigger;
71
+ }, [onTrigger]);
72
+
73
+ useEffect(() => {
74
+ // @ts-ignore
75
+ if (window.__UNSAFE_xyd_search_button_inited) {
76
+ return
77
+ }
78
+
79
+ const listener = (event: KeyboardEvent) => {
80
+ // For single key shortcuts
81
+ if (shortcutKeys.length === 1) {
82
+ if (event.key.toLowerCase() === shortcutKeys[0].toLowerCase()) {
83
+ event.preventDefault();
84
+
85
+ savedHandler.current();
86
+ }
87
+ return;
88
+ }
89
+
90
+ // For modifier combinations
91
+ if (shortcutKeys.length === 2) {
92
+ const [modifier, key] = shortcutKeys;
93
+ const pressedKey = event.key.toLowerCase();
94
+
95
+ const isModifierMatch =
96
+ (modifier === '⌘' && event.metaKey) ||
97
+ (modifier === 'Ctrl' && event.ctrlKey);
98
+
99
+ if (isModifierMatch && pressedKey === key.toLowerCase()) {
100
+ event.preventDefault();
101
+
102
+ savedHandler.current();
103
+ }
104
+ }
105
+ };
106
+
107
+ // Use capture phase and listen to both keydown and keyup
108
+ window.addEventListener('keydown', listener, { capture: true });
109
+ window.addEventListener('keyup', listener, { capture: true });
110
+
111
+ return () => {
112
+ window.removeEventListener('keydown', listener, { capture: true });
113
+ window.removeEventListener('keyup', listener, { capture: true });
114
+ };
115
+ }, []);
116
+ }
@@ -0,0 +1 @@
1
+ export { SearchButton } from "./SearchButton";
@@ -0,0 +1 @@
1
+ export { SearchButton } from "./SearchButton";
@@ -0,0 +1,19 @@
1
+ import {css} from '@linaria/core';
2
+
3
+ type StyleObject = Record<string, string>;
4
+ type StyleFunction = (strings: TemplateStringsArray, ...values: any[]) => string;
5
+
6
+ export function useStyle<T extends StyleObject>(component: { styles: T }) {
7
+ const styled = {} as Record<keyof T, StyleFunction>;
8
+
9
+ for (const key of Object.keys(component.styles)) {
10
+ styled[key as keyof T] = (strings: TemplateStringsArray, ...values: any[]) => {
11
+ const customStyles = css`
12
+ ${strings.reduce((result, str, i) => result + str + (values[i] || ''), '')}
13
+ `;
14
+ return `${component.styles[key]} ${customStyles}`;
15
+ };
16
+ }
17
+
18
+ return styled;
19
+ }
@@ -0,0 +1,37 @@
1
+ import {css} from "@linaria/core";
2
+
3
+ export const HomeViewHost = css`
4
+ display: flex;
5
+ flex-direction: column;
6
+ min-height: 100vh;
7
+ `;
8
+
9
+ export const HomeViewBodyHost = css`
10
+ background: radial-gradient(circle, hsl(0 0% 9% / .3) 1px, transparent 1px);
11
+ backdrop-filter: sepia(10%);
12
+ background-size: 30px 30px;
13
+ padding: 60px;
14
+ flex: 1;
15
+ `;
16
+
17
+ export const HomeViewBodyHostSecondary = css`
18
+ background: repeating-linear-gradient(to right, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px), repeating-linear-gradient(to bottom, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px);
19
+ `;
20
+
21
+ export const HomeViewBodyContent = css`
22
+ width: 1200px;
23
+ margin: 0 auto;
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: 80px;
27
+
28
+ @media (max-width: 1200px) {
29
+ width: 100%;
30
+ padding: 0 20px;
31
+ }
32
+
33
+ @media (max-width: 768px) {
34
+ width: 100%;
35
+ padding: 0 10px;
36
+ }
37
+ `;
@@ -1,13 +1,5 @@
1
1
  import React from "react"
2
- import {css} from "@linaria/core";
3
-
4
- const $homeView = {
5
- host: css`
6
- display: flex;
7
- flex-direction: column;
8
- min-height: 100vh;
9
- `,
10
- }
2
+ import * as cn from "./HomeView.styles";
11
3
 
12
4
  export interface HomeViewProps {
13
5
  header: React.ReactNode
@@ -16,43 +8,13 @@ export interface HomeViewProps {
16
8
  }
17
9
 
18
10
  export function HomeView({header, body, footer}: HomeViewProps) {
19
- return <div className={$homeView.host}>
11
+ return <div className={cn.HomeViewHost}>
20
12
  {header}
21
13
  {body}
22
14
  {footer}
23
15
  </div>
24
16
  }
25
17
 
26
- const $body = {
27
- host: css`
28
- background: radial-gradient(circle, hsl(0 0% 9% / .3) 1px, transparent 1px);
29
- backdrop-filter: sepia(10%);
30
- background-size: 30px 30px;
31
- padding: 60px;
32
- flex: 1;
33
- `,
34
- host$$secondary: css`
35
- background: repeating-linear-gradient(to right, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px), repeating-linear-gradient(to bottom, hsl(0 0% 9% / .1), hsl(0 0% 9% / .1) 1px, transparent 1px, transparent 50px);
36
- `,
37
- body: css`
38
- width: 1200px;
39
- margin: 0 auto;
40
- display: flex;
41
- flex-direction: column;
42
- gap: 80px;
43
-
44
- @media (max-width: 1200px) {
45
- width: 100%;
46
- padding: 0 20px;
47
- }
48
-
49
- @media (max-width: 768px) {
50
- width: 100%;
51
- padding: 0 10px;
52
- }
53
- `
54
- }
55
-
56
18
  export interface HomeViewBodyProps {
57
19
  children: React.ReactNode
58
20
  kind?: "secondary"
@@ -60,12 +22,10 @@ export interface HomeViewBodyProps {
60
22
 
61
23
  HomeView.Body = function HomeViewBody({children, kind}: HomeViewBodyProps) {
62
24
  return <div className={`
63
- ${$body.host}
64
- ${kind === "secondary" ? $body.host$$secondary : ""}
25
+ ${cn.HomeViewBodyHost}
26
+ ${kind === "secondary" ? cn.HomeViewBodyHostSecondary : ""}
65
27
  `}>
66
- <div className={`
67
- ${$body.body}
68
- `}>
28
+ <div className={cn.HomeViewBodyContent}>
69
29
  {children}
70
30
  </div>
71
31
  </div>
@@ -0,0 +1 @@
1
+ move to `@xyd-js/pages` ?
@@ -0,0 +1,11 @@
1
+ import {css} from "@linaria/core";
2
+
3
+ export const AnchorHost = css`
4
+ @layer defaults {
5
+ color: var(--xyd-anchor-color);
6
+
7
+ &:hover {
8
+ color: var(--xyd-anchor-color--hover);
9
+ }
10
+ }
11
+ `;
@@ -0,0 +1,51 @@
1
+ import React, { forwardRef } from 'react'
2
+ import type { ComponentProps, ReactElement } from 'react'
3
+
4
+ import * as cn from "./Anchor.styles";
5
+
6
+ export type AnchorProps = Omit<ComponentProps<'a'>, 'ref'> & {
7
+ newWindow?: boolean
8
+ as?: React.ElementType
9
+ }
10
+
11
+ export const Anchor = forwardRef<HTMLAnchorElement, AnchorProps>(function (
12
+ { href = '', children, newWindow, as, ...props },
13
+ // ref is used in <NavbarMenu />
14
+ forwardedRef
15
+ ): ReactElement {
16
+ const Link = as || $Anchor
17
+
18
+ if (newWindow) {
19
+ return (
20
+ <Link
21
+ ref={forwardedRef}
22
+ href={href}
23
+ target="_blank"
24
+ rel="noreferrer"
25
+ className={cn.AnchorHost}
26
+ {...props}
27
+ >
28
+ {children}
29
+ </Link>
30
+ )
31
+ }
32
+
33
+ return (
34
+ <Link
35
+ ref={forwardedRef}
36
+ className={cn.AnchorHost}
37
+ href={href || undefined}
38
+ {...props}
39
+ >
40
+ {children}
41
+ </Link>
42
+ )
43
+ })
44
+
45
+ Anchor.displayName = 'Anchor'
46
+
47
+ function $Anchor({ children, ...rest }) {
48
+ return <a {...rest}>
49
+ {children}
50
+ </a>
51
+ }
@@ -0,0 +1 @@
1
+ export {Anchor} from "./Anchor";
@@ -1,33 +1,44 @@
1
1
  import {css} from "@linaria/core";
2
2
 
3
- export const $badge = {
4
- host: css`
3
+ export const BadgeHost = css`
4
+ @layer defaults {
5
5
  display: inline-flex;
6
6
  align-items: center;
7
- line-height: 1rem;
8
- font-style: normal;
9
- font-weight: 500;
10
- letter-spacing: normal;
11
- white-space: nowrap;
12
- text-transform: none;
13
- `,
14
- host$$warning: css`
15
- color: #000;
16
- background-color: #f8d047;
17
- `,
18
- host$$info: css`
19
- color: #fff;
20
- background-color: #1FA6F2;
21
- `,
22
- host$$sm: css`
23
- font-size: 12px;
24
- height: 18px;
25
- padding: 0 6px;
26
- gap: 3px;
27
- border-radius: 6px;
28
- `,
7
+
8
+ /* Size variants */
9
+ &[data-size="xs"] {
10
+ height: 15px;
11
+ padding: 6px;
12
+ gap: 3px;
13
+ border-radius: 6px;
14
+ font-size: var(--xyd-font-size-xsmall);
15
+ }
16
+
17
+ &[data-size="sm"] {
18
+ height: 18px;
19
+ padding: 10px;
20
+ gap: 3px;
21
+ border-radius: 6px;
22
+ font-size: var(--xyd-font-size-xsmall);
23
+ }
24
+
25
+ /* Kind variants */
26
+ &[data-kind="default"] {
27
+ color: var(--xyd-badge-color--default);
28
+ background-color: var(--xyd-badge-bgcolor--default);
29
+ }
30
+ &[data-kind="warning"] {
31
+ color: var(--xyd-badge-color--warning);
32
+ background-color: var(--xyd-badge-bgcolor--warning);
33
+ }
34
+ &[data-kind="info"] {
35
+ color: var(--xyd-badge-color--info);
36
+ background-color: var(--xyd-badge-bgcolor--info);
37
+ }
38
+
39
+ [part="child"] {
40
+ position: relative;
41
+ }
42
+ }
43
+ `;
29
44
 
30
- item: css`
31
- position: relative;
32
- `
33
- }
@@ -1,30 +1,47 @@
1
1
  import React from "react"
2
2
 
3
- import {$badge} from "./Badge.styles";
3
+ import * as cn from "./Badge.styles";
4
4
 
5
5
  export interface BadgeProps {
6
- children: React.ReactNode;
6
+ /**
7
+ * The class name of the badge.
8
+ */
9
+ className?: string;
7
10
 
8
- size?: "sm"
9
- kind?: "warning" | "info"
11
+ /**
12
+ * The children of the badge.
13
+ */
14
+ children?: React.ReactNode;
15
+
16
+ /**
17
+ * The size of the badge.
18
+ */
19
+ size?: "sm" | "xs"
20
+
21
+ /**
22
+ * The kind of the badge.
23
+ */
24
+ kind?: "warning" | "info" | "default"
10
25
  }
11
26
 
27
+ /**
28
+ * Badge component is used to display a badge.
29
+ *
30
+ * @group Components
31
+ */
12
32
  export function Badge({
13
- children,
14
- size = "sm",
15
- kind = "warning"
16
- }: BadgeProps) {
17
- return <div className={`
18
- ${$badge.host}
19
-
20
- ${size === "sm" && $badge.host$$sm}
21
-
22
- ${kind === "warning" && $badge.host$$warning}
23
-
24
- ${kind === "info" && $badge.host$$info}
25
- `}>
26
- <span className={$badge.item}>
33
+ className,
34
+ children,
35
+ size = "sm",
36
+ kind = "default"
37
+ }: BadgeProps) {
38
+ return <xyd-badge
39
+ className={`${cn.BadgeHost} ${className || ''}`}
40
+ data-size={size}
41
+ data-kind={kind}
42
+ >
43
+ <span part="child">
27
44
  {children}
28
45
  </span>
29
- </div>
30
- }
46
+ </xyd-badge>
47
+ }