@xyd-js/components 0.1.0-xyd.8 → 0.1.0-xyd.94

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 (322) 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 +712 -0
  6. package/TODO.md +1 -0
  7. package/content.ts +0 -2
  8. package/dist/CTABanner-Bc77pnms.js +2 -0
  9. package/dist/CTABanner-Bc77pnms.js.map +1 -0
  10. package/dist/CTABanner-DzO62aGj.js +2 -0
  11. package/dist/CTABanner-DzO62aGj.js.map +1 -0
  12. package/dist/CodeSample-BWPDgd2G.js +2 -0
  13. package/dist/CodeSample-BWPDgd2G.js.map +1 -0
  14. package/dist/CodeSample-DLnR-knP.js +2 -0
  15. package/dist/CodeSample-DLnR-knP.js.map +1 -0
  16. package/dist/HomeView-C8QlNdKh.js +2 -0
  17. package/dist/{HomeView-ACBdUgyz.js.map → HomeView-C8QlNdKh.js.map} +1 -1
  18. package/dist/HomeView-ZAP5saNy.js +2 -0
  19. package/dist/{HomeView-B0ATNUF1.js.map → HomeView-ZAP5saNy.js.map} +1 -1
  20. package/dist/Icon-BESh23UN.js +2 -0
  21. package/dist/Icon-BESh23UN.js.map +1 -0
  22. package/dist/Icon-xNucOqd2.js +2 -0
  23. package/dist/Icon-xNucOqd2.js.map +1 -0
  24. package/dist/Text-CfN9RkYA.js +2 -0
  25. package/dist/Text-CfN9RkYA.js.map +1 -0
  26. package/dist/Text-DKycD2zu.js +2 -0
  27. package/dist/Text-DKycD2zu.js.map +1 -0
  28. package/dist/Update-0XruJHjj.js +2 -0
  29. package/dist/Update-0XruJHjj.js.map +1 -0
  30. package/dist/Update-DKOAw8p9.js +2 -0
  31. package/dist/Update-DKOAw8p9.js.map +1 -0
  32. package/dist/VideoGuide-BUyomFVz.js +2 -0
  33. package/dist/VideoGuide-BUyomFVz.js.map +1 -0
  34. package/dist/VideoGuide-B_iUKKv7.js +2 -0
  35. package/dist/VideoGuide-B_iUKKv7.js.map +1 -0
  36. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js +4 -0
  37. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js.map +1 -0
  38. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js +4 -0
  39. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js.map +1 -0
  40. package/dist/brand.js +1 -1
  41. package/dist/brand.js.map +1 -1
  42. package/dist/coder/themes/cosmo-light.js.map +1 -1
  43. package/dist/coder.d.ts +29 -9
  44. package/dist/coder.js +1 -1
  45. package/dist/coder.js.map +1 -1
  46. package/dist/content.d.ts +264 -201
  47. package/dist/content.js +1 -1
  48. package/dist/content.js.map +1 -1
  49. package/dist/index.css +261 -211
  50. package/dist/layouts.d.ts +20 -21
  51. package/dist/layouts.js +1 -1
  52. package/dist/layouts.js.map +1 -1
  53. package/dist/pages.js +1 -1
  54. package/dist/pages.js.map +1 -1
  55. package/dist/system.d.ts +10 -0
  56. package/dist/system.js +2 -0
  57. package/dist/system.js.map +1 -0
  58. package/dist/tslib.es6-DyL9kPq9.js +2 -0
  59. package/dist/{tslib.es6-BBkx4Se1.js.map → tslib.es6-DyL9kPq9.js.map} +1 -1
  60. package/dist/tslib.es6-Hqk-Mdr9.js +2 -0
  61. package/dist/{tslib.es6-BF6ZLEXa.js.map → tslib.es6-Hqk-Mdr9.js.map} +1 -1
  62. package/dist/views.js +1 -1
  63. package/dist/writer.d.ts +409 -77
  64. package/dist/writer.js +1 -1
  65. package/dist/writer.js.map +1 -1
  66. package/docs/.nojekyll +1 -0
  67. package/docs/assets/hierarchy.js +1 -0
  68. package/docs/assets/highlight.css +22 -0
  69. package/docs/assets/icons.js +18 -0
  70. package/docs/assets/icons.svg +1 -0
  71. package/docs/assets/main.js +60 -0
  72. package/docs/assets/navigation.js +1 -0
  73. package/docs/assets/search.js +1 -0
  74. package/docs/assets/style.css +1640 -0
  75. package/docs/functions/GuideCard.html +6 -0
  76. package/docs/hierarchy.html +1 -0
  77. package/docs/index.html +2 -0
  78. package/docs/interfaces/GuideCardProps.html +18 -0
  79. package/docs/modules.html +1 -0
  80. package/index.ts +0 -1
  81. package/package.json +9 -15
  82. package/project.json +677 -0
  83. package/rollup.config.js +30 -20
  84. package/src/brand/Button/Button.styles.tsx +0 -3
  85. package/src/brand/CTABanner/CTABanner.styles.tsx +2 -4
  86. package/src/brand/Footer/Footer.styles.tsx +0 -3
  87. package/src/coder/Code/Code.styles.tsx +135 -33
  88. package/src/coder/Code/Code.tsx +129 -38
  89. package/src/coder/Code/CodeLoader.tsx +3 -3
  90. package/src/coder/Code/annotations.tsx +28 -8
  91. package/src/coder/Code/highlight.ts +38 -0
  92. package/src/coder/Code/index.ts +2 -1
  93. package/src/coder/CodeCopy/CodeCopy.styles.tsx +13 -11
  94. package/src/coder/CodeCopy/CodeCopy.tsx +5 -3
  95. package/src/coder/CodeSample/CodeSample.tsx +83 -27
  96. package/src/coder/CodeTabs/CodeTabs.styles.tsx +111 -94
  97. package/src/coder/CodeTabs/CodeTabs.tsx +69 -51
  98. package/src/coder/CodeTheme/CodeTheme.tsx +89 -49
  99. package/src/coder/CodeTheme/index.ts +0 -1
  100. package/src/coder/CoderProvider.tsx +26 -0
  101. package/src/coder/index.ts +8 -4
  102. package/src/content/ContentDecoator.styles.tsx +113 -0
  103. package/src/content/ContentDecorator.tsx +17 -0
  104. package/src/content/GridDecorator.styles.tsx +67 -0
  105. package/src/content/GridDecorator.tsx +21 -0
  106. package/src/content/ReactContent.tsx +575 -0
  107. package/src/content/index.ts +10 -2
  108. package/src/icons/index.ts +0 -0
  109. package/src/kit/Loader/Loader.styles.tsx +53 -0
  110. package/src/kit/Loader/Loader.tsx +22 -0
  111. package/src/kit/index.ts +1 -0
  112. package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +270 -306
  113. package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +171 -91
  114. package/src/layouts/LayoutPrimary/index.ts +0 -2
  115. package/src/layouts/index.ts +0 -7
  116. package/src/system/SearchButton/SearchButton.styles.tsx +86 -0
  117. package/src/system/SearchButton/SearchButton.tsx +116 -0
  118. package/src/system/SearchButton/index.ts +1 -0
  119. package/src/system/index.ts +1 -0
  120. package/src/writer/Anchor/Anchor.styles.tsx +11 -0
  121. package/src/{content → writer}/Anchor/Anchor.tsx +20 -22
  122. package/src/writer/Anchor/index.tsx +1 -0
  123. package/src/writer/Badge/Badge.styles.tsx +37 -27
  124. package/src/writer/Badge/Badge.tsx +34 -48
  125. package/src/writer/Banner/Banner.styles.tsx +91 -0
  126. package/src/writer/Banner/Banner.tsx +70 -0
  127. package/src/writer/Banner/index.ts +1 -0
  128. package/src/writer/Blockquote/Blockquote.styles.tsx +6 -4
  129. package/src/writer/Blockquote/Blockquote.tsx +5 -2
  130. package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +25 -25
  131. package/src/writer/Breadcrumbs/Breadcrumbs.tsx +18 -12
  132. package/src/writer/Button/Button.styles.tsx +137 -0
  133. package/src/writer/Button/Button.tsx +75 -0
  134. package/src/writer/Button/index.ts +2 -0
  135. package/src/writer/Callout/Callout.styles.tsx +35 -42
  136. package/src/writer/Callout/Callout.tsx +30 -15
  137. package/src/writer/Card/Card.styles.tsx +47 -0
  138. package/src/writer/Card/Card.tsx +69 -0
  139. package/src/writer/Card/index.ts +1 -0
  140. package/src/writer/Code/Code.styles.tsx +12 -11
  141. package/src/writer/Code/Code.tsx +6 -3
  142. package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +172 -0
  143. package/src/writer/ColorSchemeButton/index.ts +1 -0
  144. package/src/writer/Details/Details.styles.tsx +87 -98
  145. package/src/writer/Details/Details.tsx +65 -44
  146. package/src/writer/Example/index.tsx +5 -0
  147. package/src/writer/GuideCard/GuideCard.styles.tsx +100 -103
  148. package/src/writer/GuideCard/GuideCard.tsx +72 -37
  149. package/src/writer/Heading/Heading.styles.tsx +76 -60
  150. package/src/writer/Heading/Heading.tsx +92 -22
  151. package/src/writer/Hr/Hr.styles.tsx +3 -1
  152. package/src/writer/Hr/Hr.tsx +2 -5
  153. package/src/writer/Icon/Icon.tsx +48 -0
  154. package/src/writer/Icon/index.ts +1 -0
  155. package/src/writer/Image/Image.styles.tsx +9 -0
  156. package/src/writer/Image/Image.tsx +19 -0
  157. package/src/writer/Image/index.ts +1 -0
  158. package/src/writer/List/List.styles.tsx +47 -0
  159. package/src/writer/List/List.tsx +29 -0
  160. package/src/writer/List/index.ts +4 -0
  161. package/src/writer/NavLinks/NavLinks.styles.ts +26 -26
  162. package/src/writer/NavLinks/NavLinks.tsx +65 -18
  163. package/src/writer/Pre/Pre.styles.tsx +8 -6
  164. package/src/writer/Pre/Pre.tsx +3 -2
  165. package/src/writer/Steps/Steps.styles.tsx +27 -24
  166. package/src/writer/Steps/Steps.tsx +38 -8
  167. package/src/writer/Table/Table.styles.tsx +65 -34
  168. package/src/writer/Table/Table.tsx +121 -11
  169. package/src/writer/Table/index.ts +0 -11
  170. package/src/writer/Tabs/Tabs.styles.tsx +51 -55
  171. package/src/writer/Tabs/Tabs.tsx +30 -23
  172. package/src/writer/Text/Text.styles.tsx +66 -0
  173. package/src/writer/Text/Text.tsx +79 -0
  174. package/src/writer/Text/index.ts +3 -0
  175. package/src/writer/TocCard/TocCard.module.css +44 -0
  176. package/src/writer/TocCard/TocCard.tsx +42 -0
  177. package/src/writer/TocCard/index.ts +3 -0
  178. package/src/writer/UnderlineNav/Tabs.tsx +51 -0
  179. package/src/writer/UnderlineNav/TabsPrimary.styles.tsx +184 -0
  180. package/src/writer/UnderlineNav/TabsPrimary.tsx +209 -0
  181. package/src/writer/UnderlineNav/TabsSecondary.styles.tsx +77 -0
  182. package/src/writer/UnderlineNav/TabsSecondary.tsx +171 -0
  183. package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +165 -31
  184. package/src/writer/UnderlineNav/UnderlineNav.tsx +257 -22
  185. package/src/writer/UnderlineNav/index.ts +2 -1
  186. package/src/writer/UnderlineNav/useValueChange.ts +60 -0
  187. package/src/writer/Update/Update.styles.tsx +33 -0
  188. package/src/writer/Update/Update.tsx +37 -0
  189. package/src/writer/Update/index.ts +1 -0
  190. package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
  191. package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
  192. package/src/writer/VideoGuide/index.ts +1 -0
  193. package/src/writer/index.ts +23 -1
  194. package/tsconfig.json +9 -3
  195. package/types.d.ts +50 -0
  196. package/writer.ts +1 -1
  197. package/dist/CTABanner-4FVIoaTR.js +0 -2
  198. package/dist/CTABanner-4FVIoaTR.js.map +0 -1
  199. package/dist/CTABanner-C6afsXoE.js +0 -2
  200. package/dist/CTABanner-C6afsXoE.js.map +0 -1
  201. package/dist/CTABanner-CEKs-Hb-.js +0 -2
  202. package/dist/CTABanner-CEKs-Hb-.js.map +0 -1
  203. package/dist/CTABanner-CUNcTr6s.js +0 -2
  204. package/dist/CTABanner-CUNcTr6s.js.map +0 -1
  205. package/dist/CTABanner-D02aIAsD.js +0 -2
  206. package/dist/CTABanner-D02aIAsD.js.map +0 -1
  207. package/dist/CTABanner-Dm3tUG3I.js +0 -2
  208. package/dist/CTABanner-Dm3tUG3I.js.map +0 -1
  209. package/dist/CTABanner-MCOcVowa.js +0 -2
  210. package/dist/CTABanner-MCOcVowa.js.map +0 -1
  211. package/dist/CTABanner-X6K49gSr.js +0 -2
  212. package/dist/CTABanner-X6K49gSr.js.map +0 -1
  213. package/dist/CodeSample-B9VUhTKF.js +0 -2
  214. package/dist/CodeSample-B9VUhTKF.js.map +0 -1
  215. package/dist/CodeSample-BSXeFy0x.js +0 -2
  216. package/dist/CodeSample-BSXeFy0x.js.map +0 -1
  217. package/dist/CodeSample-BwP208sQ.js +0 -2
  218. package/dist/CodeSample-BwP208sQ.js.map +0 -1
  219. package/dist/CodeSample-CUemtj_W.js +0 -2
  220. package/dist/CodeSample-CUemtj_W.js.map +0 -1
  221. package/dist/CodeSample-D0iKih-A.js +0 -2
  222. package/dist/CodeSample-D0iKih-A.js.map +0 -1
  223. package/dist/CodeSample-D33vTa6M.js +0 -2
  224. package/dist/CodeSample-D33vTa6M.js.map +0 -1
  225. package/dist/CodeSample-DUSx2KBt.js +0 -2
  226. package/dist/CodeSample-DUSx2KBt.js.map +0 -1
  227. package/dist/CodeSample-P4yxkHPW.js +0 -2
  228. package/dist/CodeSample-P4yxkHPW.js.map +0 -1
  229. package/dist/HomeView-ACBdUgyz.js +0 -2
  230. package/dist/HomeView-B0ATNUF1.js +0 -2
  231. package/dist/HomeView-COJrg8Ju.js +0 -2
  232. package/dist/HomeView-COJrg8Ju.js.map +0 -1
  233. package/dist/HomeView-Cun4apuy.js +0 -2
  234. package/dist/HomeView-Cun4apuy.js.map +0 -1
  235. package/dist/HomeView-D4DXEOOn.js +0 -2
  236. package/dist/HomeView-D4DXEOOn.js.map +0 -1
  237. package/dist/HomeView-DaH1PSBB.js +0 -2
  238. package/dist/HomeView-DaH1PSBB.js.map +0 -1
  239. package/dist/HomeView-O_lj2c2t.js +0 -2
  240. package/dist/HomeView-O_lj2c2t.js.map +0 -1
  241. package/dist/HomeView-_Nu2RcOM.js +0 -2
  242. package/dist/HomeView-_Nu2RcOM.js.map +0 -1
  243. package/dist/UnderlineNav-BCyB0G5d.js +0 -2
  244. package/dist/UnderlineNav-BCyB0G5d.js.map +0 -1
  245. package/dist/UnderlineNav-BEhDJk0H.js +0 -2
  246. package/dist/UnderlineNav-BEhDJk0H.js.map +0 -1
  247. package/dist/UnderlineNav-BqZ2xAp7.js +0 -2
  248. package/dist/UnderlineNav-BqZ2xAp7.js.map +0 -1
  249. package/dist/UnderlineNav-C2-4Vyj8.js +0 -2
  250. package/dist/UnderlineNav-C2-4Vyj8.js.map +0 -1
  251. package/dist/UnderlineNav-Co08Gykm.js +0 -2
  252. package/dist/UnderlineNav-Co08Gykm.js.map +0 -1
  253. package/dist/UnderlineNav-DC3UVmnZ.js +0 -2
  254. package/dist/UnderlineNav-DC3UVmnZ.js.map +0 -1
  255. package/dist/UnderlineNav-DsRYwuGB.js +0 -2
  256. package/dist/UnderlineNav-DsRYwuGB.js.map +0 -1
  257. package/dist/UnderlineNav-FbclXKUW.js +0 -2
  258. package/dist/UnderlineNav-FbclXKUW.js.map +0 -1
  259. package/dist/_rollupPluginBabelHelpers-BEouSrrZ.js +0 -2
  260. package/dist/_rollupPluginBabelHelpers-BEouSrrZ.js.map +0 -1
  261. package/dist/_rollupPluginBabelHelpers-BHehKRBq.js +0 -2
  262. package/dist/_rollupPluginBabelHelpers-BHehKRBq.js.map +0 -1
  263. package/dist/_rollupPluginBabelHelpers-Bunpz22T.js +0 -2
  264. package/dist/_rollupPluginBabelHelpers-Bunpz22T.js.map +0 -1
  265. package/dist/_rollupPluginBabelHelpers-CVblpRvU.js +0 -2
  266. package/dist/_rollupPluginBabelHelpers-CVblpRvU.js.map +0 -1
  267. package/dist/_rollupPluginBabelHelpers-CxmswfqM.js +0 -2
  268. package/dist/_rollupPluginBabelHelpers-CxmswfqM.js.map +0 -1
  269. package/dist/_rollupPluginBabelHelpers-DQJTK9EO.js +0 -2
  270. package/dist/_rollupPluginBabelHelpers-DQJTK9EO.js.map +0 -1
  271. package/dist/_rollupPluginBabelHelpers-DuRQdJ01.js +0 -2
  272. package/dist/_rollupPluginBabelHelpers-DuRQdJ01.js.map +0 -1
  273. package/dist/_rollupPluginBabelHelpers-tRAa4O0f.js +0 -2
  274. package/dist/_rollupPluginBabelHelpers-tRAa4O0f.js.map +0 -1
  275. package/dist/index-B0FncPxO.js +0 -2
  276. package/dist/index-B0FncPxO.js.map +0 -1
  277. package/dist/index-BEm-xkm-.js +0 -2
  278. package/dist/index-BEm-xkm-.js.map +0 -1
  279. package/dist/index-BHwtxG27.js +0 -2
  280. package/dist/index-BHwtxG27.js.map +0 -1
  281. package/dist/index-BTcmIG47.js +0 -2
  282. package/dist/index-BTcmIG47.js.map +0 -1
  283. package/dist/index-CNkHt1r7.js +0 -2
  284. package/dist/index-CNkHt1r7.js.map +0 -1
  285. package/dist/index-D0XuyFm7.js +0 -2
  286. package/dist/index-D0XuyFm7.js.map +0 -1
  287. package/dist/index-DBspcqWq.js +0 -2
  288. package/dist/index-DBspcqWq.js.map +0 -1
  289. package/dist/index-DVBO4gYE.js +0 -2
  290. package/dist/index-DVBO4gYE.js.map +0 -1
  291. package/dist/tslib.es6-BBkx4Se1.js +0 -2
  292. package/dist/tslib.es6-BF6ZLEXa.js +0 -2
  293. package/dist/tslib.es6-BOZCDgb8.js +0 -2
  294. package/dist/tslib.es6-BOZCDgb8.js.map +0 -1
  295. package/dist/tslib.es6-Cjl5tesf.js +0 -2
  296. package/dist/tslib.es6-Cjl5tesf.js.map +0 -1
  297. package/dist/tslib.es6-DEH7Dkgy.js +0 -2
  298. package/dist/tslib.es6-DEH7Dkgy.js.map +0 -1
  299. package/dist/tslib.es6-DTeJ7dWi.js +0 -2
  300. package/dist/tslib.es6-DTeJ7dWi.js.map +0 -1
  301. package/dist/tslib.es6-U9-f6pA7.js +0 -2
  302. package/dist/tslib.es6-U9-f6pA7.js.map +0 -1
  303. package/dist/tslib.es6-cb69JjeS.js +0 -2
  304. package/dist/tslib.es6-cb69JjeS.js.map +0 -1
  305. package/src/content/Anchor/Anchor.styles.tsx +0 -5
  306. package/src/content/Anchor/index.tsx +0 -3
  307. package/src/content/Content/Content.styles.tsx +0 -9
  308. package/src/content/Content/Content.tsx +0 -13
  309. package/src/content/Content/index.tsx +0 -3
  310. package/src/content/Content.tsx +0 -179
  311. package/src/content/Subtitle/Subtitle.styles.ts +0 -8
  312. package/src/content/Subtitle/Subtitle.tsx +0 -12
  313. package/src/content/Subtitle/index.tsx +0 -3
  314. package/src/layouts/Layout.styles.tsx +0 -155
  315. package/src/layouts/Layout.tsx +0 -119
  316. package/src/ui/Loader/Loader.styles.tsx +0 -54
  317. package/src/ui/Loader/Loader.tsx +0 -26
  318. package/src/ui/index.ts +0 -1
  319. package/src/writer/Icon/index.tsx +0 -355
  320. package/src/writer/Table/TableV2.styles.tsx +0 -117
  321. package/src/writer/Table/TableV2.tsx +0 -83
  322. /package/src/{ui → kit}/TODO.md +0 -0
@@ -1,32 +1,32 @@
1
1
  import {css} from "@linaria/core";
2
- import colors from "@livesession/design-system-colors";
3
2
 
4
3
  export const NavLinksHost = css`
5
- display: flex;
6
- padding-top: 2rem;
7
- margin-top: 2rem;
8
- margin-bottom: 2rem;
9
- justify-content: space-between;
10
- align-items: center;
11
- border-top-width: 1px;
12
- border-color: ${colors.dark32};
13
- `;
4
+ @layer defaults {
5
+ font-weight: var(--xyd-font-weight-semibold);
6
+ display: flex;
7
+ padding-top: 2rem;
8
+ margin-top: 2rem;
9
+ margin-bottom: 2rem;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ border-top-width: 1px;
13
+ border-color: var(--xyd-navlinks-border-color);
14
14
 
15
- export const NavLinksLink = css`
16
- display: flex;
17
- gap: 8px;
18
- align-items: center;
19
- font-size: 16px;
20
- line-height: 1.5;
21
- font-weight: 600;
22
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
23
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
24
- transition-duration: 300ms;
25
- max-width: 50%;
26
- `;
15
+ [part="link"] {
16
+ display: flex;
17
+ gap: 8px;
18
+ align-items: center;
19
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
20
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
21
+ transition-duration: 300ms;
22
+ max-width: 50%;
23
+ }
27
24
 
28
- export const NavLinksIcon = css`
29
- display: inline;
30
- height: 1.25rem;
31
- flex-shrink: 0;
25
+ [part="icon"] {
26
+ display: inline;
27
+ height: 1.25rem;
28
+ flex-shrink: 0;
29
+ }
30
+ }
32
31
  `;
32
+
@@ -1,14 +1,7 @@
1
1
  import React from "react"
2
- import {ArrowLeftIcon, ArrowRightIcon} from '@radix-ui/react-icons'
3
2
 
4
3
  import * as cn from "./NavLinks.styles";
5
4
 
6
- function Anchor({children, ...rest}) {
7
- return <a {...rest}>
8
- {children}
9
- </a>
10
- }
11
-
12
5
  export interface NavLinksProps {
13
6
  prev?: {
14
7
  title: string
@@ -18,31 +11,85 @@ export interface NavLinksProps {
18
11
  title: string
19
12
  href: string
20
13
  }
14
+
15
+ as?: React.ElementType
16
+
17
+ className?: string
21
18
  }
22
19
 
23
- export function NavLinks(props: NavLinksProps) {
20
+ export function NavLinks(
21
+ props: NavLinksProps
22
+ ) {
23
+ const Link = props.as || $Anchor
24
+
24
25
  return (
25
- <div className={cn.NavLinksHost}>
26
+ <xyd-navlinks
27
+ className={`${cn.NavLinksHost} ${props.className || ""}`}
28
+ >
26
29
  {props.prev ? (
27
- <Anchor
30
+ <Link
28
31
  href={props.prev.href}
29
32
  title={props.prev.title}
30
- className={cn.NavLinksLink}
33
+ part="link"
31
34
  >
32
- <ArrowLeftIcon className={cn.NavLinksIcon}/>
35
+ <$ArrowLeftIcon part="icon"/>
33
36
  {props.prev.title}
34
- </Anchor>
37
+ </Link>
35
38
  ) : <div/>}
36
39
  {props.next && (
37
- <Anchor
40
+ <Link
38
41
  href={props.next.href}
39
42
  title={props.next.title}
40
- className={cn.NavLinksLink}
43
+ part="link"
41
44
  >
42
45
  {props.next.title}
43
- <ArrowRightIcon className={cn.NavLinksIcon}/>
44
- </Anchor>
46
+ <$ArrowRightIcon part="icon"/>
47
+ </Link>
45
48
  )}
46
- </div>
49
+ </xyd-navlinks>
47
50
  )
48
51
  }
52
+
53
+
54
+ function $Anchor({children, ...rest}) {
55
+ return <a {...rest}>
56
+ {children}
57
+ </a>
58
+ }
59
+
60
+
61
+ function $ArrowRightIcon(props: React.SVGProps<SVGSVGElement>) {
62
+ return <svg
63
+ width={15}
64
+ height={15}
65
+ viewBox="0 0 15 15"
66
+ fill="none"
67
+ xmlns="http://www.w3.org/2000/svg"
68
+ {...props}
69
+ >
70
+ <path
71
+ d="M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z"
72
+ fill="currentColor"
73
+ fillRule="evenodd"
74
+ clipRule="evenodd"
75
+ />
76
+ </svg>
77
+ }
78
+
79
+ function $ArrowLeftIcon(props: React.SVGProps<SVGSVGElement>) {
80
+ return <svg
81
+ width={15}
82
+ height={15}
83
+ viewBox="0 0 15 15"
84
+ fill="none"
85
+ xmlns="http://www.w3.org/2000/svg"
86
+ {...props}
87
+ >
88
+ <path
89
+ d="M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z"
90
+ fill="currentColor"
91
+ fillRule="evenodd"
92
+ clipRule="evenodd"
93
+ />
94
+ </svg>
95
+ }
@@ -1,11 +1,13 @@
1
1
  import {css} from "@linaria/core";
2
2
 
3
3
  export const PreHost = css`
4
- margin-top: 0;
5
- border-radius: 6px;
6
- padding: 16px;
7
- border: 0;
4
+ @layer defaults {
5
+ margin-top: 0;
6
+ border-radius: 6px;
7
+ padding: 16px;
8
+ border: 0;
8
9
 
9
- background-color: rgb(246, 248, 250);
10
- overflow: auto;
10
+ background-color: var(--xyd-pre-bgcolor);
11
+ overflow: auto;
12
+ }
11
13
  `;
@@ -4,10 +4,11 @@ import * as cn from "./Pre.styles"
4
4
 
5
5
  export interface PreProps {
6
6
  children: React.ReactNode
7
+ className?: string
7
8
  }
8
9
 
9
- export function Pre({children}: PreProps) {
10
- return <pre className={cn.PreHost}>
10
+ export function Pre({ children, className }: PreProps) {
11
+ return <pre className={`${cn.PreHost} ${className || ""}`}>
11
12
  {children}
12
13
  </pre>
13
14
  }
@@ -1,35 +1,38 @@
1
1
  import {css} from "@linaria/core";
2
2
 
3
3
  export const StepsHost = css`
4
- padding-left: 0;
5
- list-style: none;
6
- counter-reset: ordered-listitem;
4
+ @layer defaults {
5
+ padding-left: 0;
6
+ list-style: none;
7
+ counter-reset: ordered-listitem;
7
8
 
8
- display: flex;
9
- flex-direction: column;
10
- gap: 6px;
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 6px;
12
+ }
11
13
  `;
12
14
 
13
15
  export const StepsLi = css`
14
- padding-left: 32px;
15
- position: relative;
16
- line-height: 1.5;
16
+ @layer defaults {
17
+ padding-left: 32px;
18
+ position: relative;
17
19
 
18
- &::after {
19
- position: absolute;
20
- top: 0;
21
- left: 0;
22
- counter-increment: ordered-listitem;
23
- content: counter(ordered-listitem);
20
+ &::after {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ counter-increment: ordered-listitem;
25
+ content: counter(ordered-listitem);
24
26
 
25
- background: #ececf1;
26
- color: #353740;
27
- font-size: 12px;
28
- line-height: 24px;
29
- font-weight: 500;
30
- text-align: center;
31
- height: 24px;
32
- width: 24px;
33
- border-radius: 12px;
27
+ background: var(--xyd-steps-marker-bgcolor);
28
+ color: var(--xyd-steps-marker-color);
29
+ font-size: var(--xyd-font-size-xsmall);
30
+ line-height: var(--xyd-line-height-medium);
31
+ font-weight: var(--xyd-font-weight-medium);
32
+ text-align: center;
33
+ height: 24px;
34
+ width: 24px;
35
+ border-radius: 12px;
36
+ }
34
37
  }
35
38
  `;
@@ -2,22 +2,52 @@ import React from "react"
2
2
 
3
3
  import * as cn from "./Steps.styles";
4
4
 
5
+ /**
6
+ * Props for the Steps component
7
+ */
5
8
  export interface StepsProps {
9
+ /** Content to be rendered inside the steps list */
6
10
  children: React.ReactNode;
11
+
12
+ /** Optional CSS class name to be applied to the steps container */
13
+ className?: string;
7
14
  }
8
15
 
9
- export function Steps({children}: StepsProps) {
10
- return <ol className={cn.StepsHost}>
11
- {children}
12
- </ol>
16
+ /**
17
+ * Steps component that renders a numbered list of steps or stages.
18
+ * Use this component to display a sequence of steps in a process or workflow.
19
+ *
20
+ * @category Component
21
+ */
22
+ export function Steps({ children, className }: StepsProps) {
23
+ return <xyd-steps>
24
+ <ol className={`${cn.StepsHost} ${className || ""}`}>
25
+ {children}
26
+ </ol>
27
+ </xyd-steps>
13
28
  }
14
29
 
30
+ /**
31
+ * Props for the Steps.Item component
32
+ */
15
33
  export interface StepsItemProps {
34
+ /** Content to be rendered inside the step item */
16
35
  children: React.ReactNode;
36
+
37
+ /** Optional CSS class name to be applied to the step item */
38
+ className?: string;
17
39
  }
18
40
 
19
- Steps.Item = function StepsItem({children}: StepsItemProps) {
20
- return <li className={cn.StepsLi}>
21
- {children}
22
- </li>
41
+ /**
42
+ * Individual step item component that represents a single step in the sequence.
43
+ * This component should be used as a child of the Steps component.
44
+ *
45
+ * @category Component
46
+ */
47
+ Steps.Item = function StepsItem({ children, className }: StepsItemProps) {
48
+ return <xyd-steps-item>
49
+ <li className={`${cn.StepsLi} ${className || ""}`}>
50
+ {children}
51
+ </li>
52
+ </xyd-steps-item>
23
53
  }
@@ -1,40 +1,71 @@
1
1
  import {css} from "@linaria/core";
2
2
 
3
- const colors = {
4
- primary: "#D1D5DB"
5
- }
6
3
 
7
- export const TableHost = css`
8
- display: block;
9
- overflow-x: scroll;
4
+ export default {
5
+ Host: css`
6
+ @layer defaults {
7
+ display: table;
8
+ width: 100%;
9
+ min-width: 640px; // Ensures table doesn't get too squished
10
+ border-collapse: separate;
11
+ border-spacing: 0;
12
+ border: 1px solid var(--xyd-table-border-color);
13
+ border-radius: 8px;
14
+ margin-top: 1rem;
15
+ overflow: hidden;
16
+ }
17
+ `,
18
+ Thead: css`
19
+ @layer defaults {
20
+ background: var(--xyd-table-bgcolor);
21
+ }
22
+ `,
23
+ Tbody: css`
24
+
25
+ `,
26
+ Th: css`
27
+ @layer defaults {
28
+ text-align: left;
29
+ font-weight: var(--xyd-font-weight-medium);
30
+ padding: 0.5rem 1rem;
31
+ white-space: nowrap;
32
+ vertical-align: middle;
33
+ color: var(--xyd-table-color);
34
+ border-bottom: 1px solid var(--xyd-table-border-color);
35
+ border-right: 1px solid var(--xyd-table-border-color);
36
+ }
37
+ `,
38
+ Tr: css`
39
+ @layer defaults {
40
+ &:not(:last-child) {
41
+ border-bottom: 1px solid var(--xyd-table-border-color);
42
+ }
43
+ }
44
+ `,
45
+ Td: css`
46
+ @layer defaults {
47
+ padding: 0.5rem 1rem;
48
+ vertical-align: middle;
49
+ border-top: 1px solid var(--xyd-table-border-color);
50
+ border-right: 1px solid var(--xyd-table-border-color);
10
51
 
11
- border-collapse: collapse;
12
- border-radius: 3px;
13
- `;
14
-
15
- export const TableTh = css`
16
- padding: 0.5rem 1rem;
17
- margin: 0;
18
-
19
- font-weight: 600;
20
- border-width: 1px;
21
- border-color: ${colors.primary};
22
- background: rgba(234, 238, 242, 0.5);
23
- `;
24
-
25
- export const TableTr = css`
26
- padding: 0;
27
- margin: 0;
28
- border-top-width: 1px;
29
- border-color: ${colors.primary};
30
- `;
31
-
32
- export const TableTd = css`
33
- padding: 0.5rem 1rem;
34
- margin: 0;
35
-
36
- border-width: 1px;
37
- border-color: ${colors.primary};
38
- `;
52
+ @media (max-width: 768px) {
53
+ padding: 0.5rem;
54
+ }
55
+ }
56
+ `,
57
+ Cell: css`
58
+ @layer defaults {
59
+ display: flex;
60
+ align-items: baseline;
61
+ width: 100%;
62
+ gap: 0.5rem;
39
63
 
64
+ [part="child"] {
65
+ flex: 1;
66
+ text-align: right;
67
+ }
68
+ }
69
+ `
70
+ }
40
71
 
@@ -1,45 +1,155 @@
1
1
  import React from "react"
2
2
 
3
- import * as cn from "./Table.styles";
3
+ import cn from "./Table.styles";
4
4
 
5
+ /**
6
+ * Props for the Table component
7
+ */
5
8
  export interface TableProps {
9
+ /** The content to be rendered inside the table */
10
+ children: React.ReactNode;
11
+
12
+ /** Optional CSS class name to be applied to the table */
13
+ className?: string;
14
+ }
15
+
16
+ /**
17
+ * A table component that provides a structured way to display tabular data.
18
+ * It supports custom styling through className prop and can contain various table elements.
19
+ *
20
+ * @category Component
21
+ */
22
+ export function Table({ children, className }: TableProps) {
23
+ return (
24
+ <table className={`${cn.Host} ${className || ''}`}>
25
+ {children}
26
+ </table>
27
+ );
28
+ }
29
+
30
+ /**
31
+ * Props for the TableHead component
32
+ */
33
+ export interface TableHeadProps {
34
+ /** The content to be rendered inside the table header */
6
35
  children: React.ReactNode;
7
36
  }
8
37
 
9
- export function Table({children}: TableProps) {
10
- return <table className={cn.TableHost}>
38
+ /**
39
+ * Represents the header section of a table.
40
+ * Use this component to group header content at the top of the table.
41
+ */
42
+ Table.Head = function TableHead({ children }: TableHeadProps) {
43
+ return <thead className={cn.Thead}>
11
44
  {children}
12
- </table>
45
+ </thead>
13
46
  }
14
47
 
48
+ /**
49
+ * Props for the TableTh component
50
+ */
15
51
  export interface TableThProps {
52
+ /** The content to be rendered inside the table header cell */
16
53
  children: React.ReactNode;
54
+
55
+ /** Whether the cell content should be right-aligned (for numeric values) */
56
+ numeric?: boolean;
17
57
  }
18
58
 
19
- Table.Th = function TableTh({children}: TableThProps) {
20
- return <th className={cn.TableTh}>
59
+ /**
60
+ * Represents a header cell in the table.
61
+ * Use this component for column headers in the table.
62
+ */
63
+ Table.Th = function TableTh({ children, numeric }: TableThProps) {
64
+ return <th className={`${cn.Th} ${numeric ? 'numeric' : ''}`}>
21
65
  {children}
22
66
  </th>
23
67
  }
24
68
 
69
+ /**
70
+ * Props for the TableTr component
71
+ */
25
72
  export interface TableTrProps {
73
+ /** The content to be rendered inside the table row */
26
74
  children: React.ReactNode;
27
75
  }
28
76
 
29
- Table.Tr = function TableTr({children}: TableTrProps) {
30
- return <tr className={cn.TableTr}>
77
+ /**
78
+ * Represents a row in the table.
79
+ * Use this component to create rows in the table body or header.
80
+ */
81
+ Table.Tr = function TableTr({ children }: TableTrProps) {
82
+ return <tr className={cn.Tr}>
31
83
  {children}
32
84
  </tr>
85
+ }
86
+
87
+ /**
88
+ * Props for the TableBody component
89
+ */
90
+ export interface TableBodyProps {
91
+ /** The content to be rendered inside the table body */
92
+ children: React.ReactNode;
93
+ }
33
94
 
95
+ /**
96
+ * Represents the main content area of the table.
97
+ * Use this component to group the main content rows of the table.
98
+ */
99
+ Table.Body = function TableBody({ children }: TableBodyProps) {
100
+ return <tbody className={cn.Tbody}>
101
+ {children}
102
+ </tbody>
34
103
  }
35
104
 
105
+ /**
106
+ * Props for the TableTd component
107
+ */
36
108
  export interface TableTdProps {
109
+ /** The content to be rendered inside the table cell */
37
110
  children: React.ReactNode;
111
+
112
+ /** Whether the cell content should be right-aligned (for numeric values) */
113
+ numeric?: boolean;
114
+
115
+ /** Whether the cell should have a muted appearance */
116
+ muted?: boolean;
38
117
  }
39
118
 
40
- Table.Td = function TableTd({children}: TableTdProps) {
41
- return <td className={cn.TableTd}>
119
+ /**
120
+ * Represents a data cell in the table.
121
+ * Use this component for regular data cells in the table body.
122
+ */
123
+ Table.Td = function TableTd({ children, numeric, muted }: TableTdProps) {
124
+ return <td className={`${cn.Td} ${numeric ? 'numeric' : ''} ${muted ? 'muted' : ''}`}>
42
125
  {children}
43
126
  </td>
127
+ }
128
+
129
+ /**
130
+ * Props for the TableCell component
131
+ */
132
+ export interface TableCellProps {
133
+ /** The content to be rendered inside the table cell */
134
+ children: React.ReactNode;
135
+ }
136
+
137
+ /**
138
+ * A custom table cell component that wraps content in a div with specific styling.
139
+ * Use this component when you need a custom-styled cell with additional structure.
140
+ */
141
+ Table.Cell = function TableCell({ children }: TableCellProps) {
142
+ return <xyd-table-cell className={cn.Cell}>
143
+ <div part="child">
144
+ {children}
145
+ </div>
146
+ </xyd-table-cell>
147
+ }
44
148
 
45
- }
149
+ /**
150
+ * Props for the TableModelCell component
151
+ */
152
+ export interface TableModelCellProps {
153
+ /** The content to be rendered inside the model cell */
154
+ children: React.ReactNode;
155
+ }
@@ -1,14 +1,3 @@
1
1
  export {
2
2
  Table
3
3
  } from "./Table"
4
-
5
- export type {
6
- TableProps,
7
- TableThProps,
8
- TableTrProps,
9
- TableTdProps
10
- } from "./Table"
11
-
12
- export {
13
- TableV2
14
- } from "./TableV2"