@xyd-js/components 0.1.0-build.168

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 (314) 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 +1369 -0
  6. package/LICENSE +21 -0
  7. package/README.md +3 -0
  8. package/TODO.md +1 -0
  9. package/coder.ts +1 -0
  10. package/content.ts +1 -0
  11. package/dist/Button-BLA2ghHZ.js +2 -0
  12. package/dist/Button-BLA2ghHZ.js.map +1 -0
  13. package/dist/Button-BTJ2hIal.js +2 -0
  14. package/dist/Button-BTJ2hIal.js.map +1 -0
  15. package/dist/Button-r4BCrEjy.js +2 -0
  16. package/dist/Button-r4BCrEjy.js.map +1 -0
  17. package/dist/CodeSample-BZ5tvyWY.js +2 -0
  18. package/dist/CodeSample-BZ5tvyWY.js.map +1 -0
  19. package/dist/CodeSample-BqXDbWdi.js +2 -0
  20. package/dist/CodeSample-BqXDbWdi.js.map +1 -0
  21. package/dist/CodeSample-Cqv86IdN.js +2 -0
  22. package/dist/CodeSample-Cqv86IdN.js.map +1 -0
  23. package/dist/Icon--77MqplU.js +2 -0
  24. package/dist/Icon--77MqplU.js.map +1 -0
  25. package/dist/Icon-DbNmvK_Q.js +2 -0
  26. package/dist/Icon-DbNmvK_Q.js.map +1 -0
  27. package/dist/Icon-uVIU1LW6.js +2 -0
  28. package/dist/Icon-uVIU1LW6.js.map +1 -0
  29. package/dist/PageFirstSlide-BDNmCTiJ.js +2 -0
  30. package/dist/PageFirstSlide-BDNmCTiJ.js.map +1 -0
  31. package/dist/PageFirstSlide-BpZ42bEU.js +2 -0
  32. package/dist/PageFirstSlide-BpZ42bEU.js.map +1 -0
  33. package/dist/PageFirstSlide-CqxiyK57.js +2 -0
  34. package/dist/PageFirstSlide-CqxiyK57.js.map +1 -0
  35. package/dist/TabsAnalytics-B_JYpawG.js +2 -0
  36. package/dist/TabsAnalytics-B_JYpawG.js.map +1 -0
  37. package/dist/TabsAnalytics-DAOfTZgv.js +2 -0
  38. package/dist/TabsAnalytics-DAOfTZgv.js.map +1 -0
  39. package/dist/TabsAnalytics-Dhyadlbu.js +2 -0
  40. package/dist/TabsAnalytics-Dhyadlbu.js.map +1 -0
  41. package/dist/Update-53fEhmjh.js +2 -0
  42. package/dist/Update-53fEhmjh.js.map +1 -0
  43. package/dist/Update-CFi6uapq.js +2 -0
  44. package/dist/Update-CFi6uapq.js.map +1 -0
  45. package/dist/Update-CiMIOgZi.js +2 -0
  46. package/dist/Update-CiMIOgZi.js.map +1 -0
  47. package/dist/VideoGuide-C0K9fFar.js +2 -0
  48. package/dist/VideoGuide-C0K9fFar.js.map +1 -0
  49. package/dist/VideoGuide-CJYkuLst.js +2 -0
  50. package/dist/VideoGuide-CJYkuLst.js.map +1 -0
  51. package/dist/VideoGuide-DBY-EyxG.js +2 -0
  52. package/dist/VideoGuide-DBY-EyxG.js.map +1 -0
  53. package/dist/_rollupPluginBabelHelpers-CvhQFv1t.js +4 -0
  54. package/dist/_rollupPluginBabelHelpers-CvhQFv1t.js.map +1 -0
  55. package/dist/_rollupPluginBabelHelpers-DSwDY1Dm.js +4 -0
  56. package/dist/_rollupPluginBabelHelpers-DSwDY1Dm.js.map +1 -0
  57. package/dist/_rollupPluginBabelHelpers-Dc-ocx4G.js +4 -0
  58. package/dist/_rollupPluginBabelHelpers-Dc-ocx4G.js.map +1 -0
  59. package/dist/coder/themes/classic.css +57 -0
  60. package/dist/coder/themes/classic.d.ts +96 -0
  61. package/dist/coder/themes/classic.js +2 -0
  62. package/dist/coder/themes/classic.js.map +1 -0
  63. package/dist/coder/themes/cosmo.css +64 -0
  64. package/dist/coder/themes/cosmo.d.ts +96 -0
  65. package/dist/coder/themes/cosmo.js +2 -0
  66. package/dist/coder/themes/cosmo.js.map +1 -0
  67. package/dist/coder.d.ts +94 -0
  68. package/dist/coder.js +2 -0
  69. package/dist/coder.js.map +1 -0
  70. package/dist/content.d.ts +411 -0
  71. package/dist/content.js +2 -0
  72. package/dist/content.js.map +1 -0
  73. package/dist/index.css +282 -0
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.js +2 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/layouts.d.ts +33 -0
  78. package/dist/layouts.js +2 -0
  79. package/dist/layouts.js.map +1 -0
  80. package/dist/pages.d.ts +176 -0
  81. package/dist/pages.js +2 -0
  82. package/dist/pages.js.map +1 -0
  83. package/dist/system.d.ts +45 -0
  84. package/dist/system.js +2 -0
  85. package/dist/system.js.map +1 -0
  86. package/dist/useUXClick-DK3cTAMR.js +2 -0
  87. package/dist/useUXClick-DK3cTAMR.js.map +1 -0
  88. package/dist/useUXClick-DO6qBcRy.js +2 -0
  89. package/dist/useUXClick-DO6qBcRy.js.map +1 -0
  90. package/dist/useUXClick-NwpsiuK9.js +2 -0
  91. package/dist/useUXClick-NwpsiuK9.js.map +1 -0
  92. package/dist/useUXEvents-CJtgGV4R.js +2 -0
  93. package/dist/useUXEvents-CJtgGV4R.js.map +1 -0
  94. package/dist/useUXEvents-Cxgl7xb-.js +2 -0
  95. package/dist/useUXEvents-Cxgl7xb-.js.map +1 -0
  96. package/dist/useUXEvents-XqAGxoEj.js +2 -0
  97. package/dist/useUXEvents-XqAGxoEj.js.map +1 -0
  98. package/dist/useUXScrollDepth-3rk3Z95r.js +2 -0
  99. package/dist/useUXScrollDepth-3rk3Z95r.js.map +1 -0
  100. package/dist/useUXScrollDepth-BwK-XOBg.js +2 -0
  101. package/dist/useUXScrollDepth-BwK-XOBg.js.map +1 -0
  102. package/dist/useUXScrollDepth-DKre7PBz.js +2 -0
  103. package/dist/useUXScrollDepth-DKre7PBz.js.map +1 -0
  104. package/dist/uxsdk.d.ts +53 -0
  105. package/dist/uxsdk.js +2 -0
  106. package/dist/uxsdk.js.map +1 -0
  107. package/dist/views.d.ts +18 -0
  108. package/dist/views.js +2 -0
  109. package/dist/views.js.map +1 -0
  110. package/dist/writer.d.ts +580 -0
  111. package/dist/writer.js +2 -0
  112. package/dist/writer.js.map +1 -0
  113. package/docs/.nojekyll +1 -0
  114. package/docs/assets/hierarchy.js +1 -0
  115. package/docs/assets/highlight.css +22 -0
  116. package/docs/assets/icons.js +18 -0
  117. package/docs/assets/icons.svg +1 -0
  118. package/docs/assets/main.js +60 -0
  119. package/docs/assets/navigation.js +1 -0
  120. package/docs/assets/search.js +1 -0
  121. package/docs/assets/style.css +1640 -0
  122. package/docs/functions/GuideCard.html +6 -0
  123. package/docs/hierarchy.html +1 -0
  124. package/docs/index.html +2 -0
  125. package/docs/interfaces/GuideCardProps.html +18 -0
  126. package/docs/modules.html +1 -0
  127. package/index.ts +0 -0
  128. package/layouts.ts +1 -0
  129. package/output.txt +13 -0
  130. package/package.json +81 -0
  131. package/pages.ts +1 -0
  132. package/postcss.config.cjs +5 -0
  133. package/rollup.config.js +195 -0
  134. package/src/coder/Code/Code.styles.tsx +151 -0
  135. package/src/coder/Code/Code.tsx +171 -0
  136. package/src/coder/Code/CodeLoader.tsx +10 -0
  137. package/src/coder/Code/annotations.tsx +51 -0
  138. package/src/coder/Code/highlight.ts +208 -0
  139. package/src/coder/Code/index.ts +16 -0
  140. package/src/coder/CodeCopy/CodeCopy.styles.tsx +21 -0
  141. package/src/coder/CodeCopy/CodeCopy.tsx +36 -0
  142. package/src/coder/CodeCopy/index.ts +7 -0
  143. package/src/coder/CodeSample/CodeSample.tsx +118 -0
  144. package/src/coder/CodeSample/CodeSampleAnalytics.tsx +112 -0
  145. package/src/coder/CodeSample/index.ts +11 -0
  146. package/src/coder/CodeSample/withLocalStored.tsx +50 -0
  147. package/src/coder/CodeTabs/CodeTabs.styles.tsx +126 -0
  148. package/src/coder/CodeTabs/CodeTabs.tsx +128 -0
  149. package/src/coder/CodeTabs/index.ts +6 -0
  150. package/src/coder/CodeTheme/CodeTheme.tsx +126 -0
  151. package/src/coder/CodeTheme/index.ts +7 -0
  152. package/src/coder/CoderProvider.tsx +26 -0
  153. package/src/coder/README.md +1 -0
  154. package/src/coder/hooks/highlight.ts +182 -0
  155. package/src/coder/index.ts +37 -0
  156. package/src/coder/themes/classic.css +57 -0
  157. package/src/coder/themes/classic.ts +270 -0
  158. package/src/coder/themes/cosmo.css +64 -0
  159. package/src/coder/themes/cosmo.ts +264 -0
  160. package/src/content/AppearanceDecorator.styles.tsx +11 -0
  161. package/src/content/ContentDecoator.styles.tsx +180 -0
  162. package/src/content/ContentDecorator.tsx +17 -0
  163. package/src/content/GridDecorator.styles.tsx +86 -0
  164. package/src/content/GridDecorator.tsx +23 -0
  165. package/src/content/ReactContent.tsx +671 -0
  166. package/src/content/TODO.md +1 -0
  167. package/src/content/index.ts +13 -0
  168. package/src/kit/Loader/Loader.styles.tsx +53 -0
  169. package/src/kit/Loader/Loader.tsx +22 -0
  170. package/src/kit/TODO.md +2 -0
  171. package/src/kit/index.ts +1 -0
  172. package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +325 -0
  173. package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +252 -0
  174. package/src/layouts/LayoutPrimary/index.ts +3 -0
  175. package/src/layouts/index.ts +6 -0
  176. package/src/pages/PageBlogHome/PageBlogHome.styles.tsx +67 -0
  177. package/src/pages/PageBlogHome/PageBlogHome.tsx +64 -0
  178. package/src/pages/PageBlogHome/index.ts +3 -0
  179. package/src/pages/PageBlogHome/types.ts +35 -0
  180. package/src/pages/PageBlogPost/PageBlogPost.styles.tsx +4 -0
  181. package/src/pages/PageBlogPost/PageBlogPost.tsx +9 -0
  182. package/src/pages/PageBlogPost/index.ts +3 -0
  183. package/src/pages/PageFirstSlide/PageFirstSlide.styles.tsx +134 -0
  184. package/src/pages/PageFirstSlide/PageFirstSlide.tsx +56 -0
  185. package/src/pages/PageFirstSlide/index.ts +1 -0
  186. package/src/pages/PageFirstSlide/types.ts +67 -0
  187. package/src/pages/PageHome/PageHome.styles.tsx +51 -0
  188. package/src/pages/PageHome/PageHome.tsx +62 -0
  189. package/src/pages/PageHome/index.ts +3 -0
  190. package/src/pages/PageHome/types.ts +79 -0
  191. package/src/pages/index.ts +7 -0
  192. package/src/system/Baseline/Baseline.styles.tsx +128 -0
  193. package/src/system/Baseline/Baseline.tsx +40 -0
  194. package/src/system/Baseline/bun.svg +1 -0
  195. package/src/system/Baseline/check.svg +1 -0
  196. package/src/system/Baseline/index.ts +1 -0
  197. package/src/system/Baseline/logo.svg +1 -0
  198. package/src/system/Baseline/node.svg +7 -0
  199. package/src/system/Baseline/npm.svg +5 -0
  200. package/src/system/Baseline/pnpm.svg +1 -0
  201. package/src/system/Footer/Footer.styles.tsx +213 -0
  202. package/src/system/Footer/Footer.tsx +105 -0
  203. package/src/system/Footer/index.ts +1 -0
  204. package/src/system/SearchButton/SearchButton.styles.tsx +89 -0
  205. package/src/system/SearchButton/SearchButton.tsx +118 -0
  206. package/src/system/SearchButton/index.ts +1 -0
  207. package/src/system/index.ts +3 -0
  208. package/src/utils/useStyle.ts +19 -0
  209. package/src/uxsdk/const.ts +1 -0
  210. package/src/uxsdk/index.ts +21 -0
  211. package/src/uxsdk/useUXClick.ts +21 -0
  212. package/src/uxsdk/useUXEvents.ts +105 -0
  213. package/src/uxsdk/useUXScrollDepth.ts +49 -0
  214. package/src/uxsdk/useUXUnreachableElementTracker.ts +100 -0
  215. package/src/views/HomeView/HomeView.styles.tsx +37 -0
  216. package/src/views/HomeView/HomeView.tsx +34 -0
  217. package/src/views/HomeView/index.ts +3 -0
  218. package/src/writer/Anchor/Anchor.styles.tsx +26 -0
  219. package/src/writer/Anchor/Anchor.tsx +51 -0
  220. package/src/writer/Anchor/index.tsx +1 -0
  221. package/src/writer/Badge/Badge.styles.tsx +44 -0
  222. package/src/writer/Badge/Badge.tsx +47 -0
  223. package/src/writer/Badge/index.ts +7 -0
  224. package/src/writer/Banner/Banner.styles.tsx +111 -0
  225. package/src/writer/Banner/Banner.tsx +151 -0
  226. package/src/writer/Banner/index.ts +1 -0
  227. package/src/writer/Blockquote/Blockquote.styles.tsx +20 -0
  228. package/src/writer/Blockquote/Blockquote.tsx +38 -0
  229. package/src/writer/Blockquote/index.ts +7 -0
  230. package/src/writer/BlogCard/BlogCard.styles.tsx +4 -0
  231. package/src/writer/BlogCard/BlogCard.tsx +9 -0
  232. package/src/writer/BlogCard/index.ts +3 -0
  233. package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +24 -0
  234. package/src/writer/Breadcrumbs/Breadcrumbs.tsx +57 -0
  235. package/src/writer/Breadcrumbs/index.ts +7 -0
  236. package/src/writer/Button/Button.styles.tsx +149 -0
  237. package/src/writer/Button/Button.tsx +82 -0
  238. package/src/writer/Button/index.ts +2 -0
  239. package/src/writer/Callout/Callout.styles.tsx +102 -0
  240. package/src/writer/Callout/Callout.tsx +166 -0
  241. package/src/writer/Callout/index.tsx +3 -0
  242. package/src/writer/Card/Card.styles.tsx +110 -0
  243. package/src/writer/Card/Card.tsx +94 -0
  244. package/src/writer/Card/index.ts +1 -0
  245. package/src/writer/Code/Code.styles.tsx +16 -0
  246. package/src/writer/Code/Code.tsx +16 -0
  247. package/src/writer/Code/index.ts +3 -0
  248. package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +191 -0
  249. package/src/writer/ColorSchemeButton/index.ts +1 -0
  250. package/src/writer/Details/Details.styles.tsx +101 -0
  251. package/src/writer/Details/Details.tsx +168 -0
  252. package/src/writer/Details/DetailsProps.tsx +34 -0
  253. package/src/writer/Details/index.ts +6 -0
  254. package/src/writer/GuideCard/GuideCard.styles.tsx +129 -0
  255. package/src/writer/GuideCard/GuideCard.tsx +123 -0
  256. package/src/writer/GuideCard/index.ts +1 -0
  257. package/src/writer/Heading/Heading.styles.tsx +93 -0
  258. package/src/writer/Heading/Heading.tsx +123 -0
  259. package/src/writer/Heading/index.ts +7 -0
  260. package/src/writer/Hr/Hr.styles.tsx +7 -0
  261. package/src/writer/Hr/Hr.tsx +10 -0
  262. package/src/writer/Hr/index.ts +3 -0
  263. package/src/writer/Icon/Icon.styles.tsx +15 -0
  264. package/src/writer/Icon/Icon.tsx +99 -0
  265. package/src/writer/Icon/index.ts +1 -0
  266. package/src/writer/IconSocial/IconSocial.tsx +107 -0
  267. package/src/writer/IconSocial/index.ts +1 -0
  268. package/src/writer/Image/Image.styles.tsx +9 -0
  269. package/src/writer/Image/Image.tsx +35 -0
  270. package/src/writer/Image/index.ts +1 -0
  271. package/src/writer/List/List.styles.tsx +47 -0
  272. package/src/writer/List/List.tsx +29 -0
  273. package/src/writer/List/index.ts +4 -0
  274. package/src/writer/NavLinks/NavLinks.styles.ts +32 -0
  275. package/src/writer/NavLinks/NavLinks.tsx +95 -0
  276. package/src/writer/NavLinks/index.ts +7 -0
  277. package/src/writer/Pre/Pre.styles.tsx +13 -0
  278. package/src/writer/Pre/Pre.tsx +14 -0
  279. package/src/writer/Pre/index.ts +3 -0
  280. package/src/writer/README.md +1 -0
  281. package/src/writer/Steps/Steps.styles.tsx +91 -0
  282. package/src/writer/Steps/Steps.tsx +75 -0
  283. package/src/writer/Steps/index.ts +5 -0
  284. package/src/writer/Table/Table.styles.tsx +100 -0
  285. package/src/writer/Table/Table.tsx +158 -0
  286. package/src/writer/Table/index.ts +3 -0
  287. package/src/writer/Tabs/Tabs.tsx +67 -0
  288. package/src/writer/Tabs/TabsAnalytics.tsx +25 -0
  289. package/src/writer/Tabs/TabsPrimary.styles.tsx +187 -0
  290. package/src/writer/Tabs/TabsPrimary.tsx +215 -0
  291. package/src/writer/Tabs/TabsProps.tsx +13 -0
  292. package/src/writer/Tabs/TabsSecondary.styles.tsx +78 -0
  293. package/src/writer/Tabs/TabsSecondary.tsx +176 -0
  294. package/src/writer/Tabs/index.ts +2 -0
  295. package/src/writer/Tabs/useValueChange.ts +84 -0
  296. package/src/writer/Text/Text.styles.tsx +66 -0
  297. package/src/writer/Text/Text.tsx +79 -0
  298. package/src/writer/Text/index.ts +3 -0
  299. package/src/writer/TocCard/TocCard.module.css +44 -0
  300. package/src/writer/TocCard/TocCard.tsx +42 -0
  301. package/src/writer/TocCard/index.ts +3 -0
  302. package/src/writer/Update/Update.styles.tsx +33 -0
  303. package/src/writer/Update/Update.tsx +37 -0
  304. package/src/writer/Update/index.ts +1 -0
  305. package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
  306. package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
  307. package/src/writer/VideoGuide/index.ts +1 -0
  308. package/src/writer/index.ts +53 -0
  309. package/system.ts +1 -0
  310. package/tsconfig.json +46 -0
  311. package/types.d.ts +52 -0
  312. package/uxsdk.ts +1 -0
  313. package/views.ts +2 -0
  314. package/writer.ts +1 -0
@@ -0,0 +1,79 @@
1
+ import React from "react"
2
+
3
+ import * as cn from "./Text.styles";
4
+
5
+ /**
6
+ * Available font sizes for the Text component
7
+ */
8
+ export type TextFontSizes = "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
9
+
10
+ /**
11
+ * Available text styles/kinds for the Text component
12
+ */
13
+ export type TextKindTypes = "default" | "ghost" | "success" | "warn" | "error" | "primary" | "secondary";
14
+
15
+ /**
16
+ * Available font weights for the Text component
17
+ */
18
+ export type TextFontWeights = "normal" | "bold" | "extra-bold";
19
+
20
+ /**
21
+ * Props for the Text component
22
+ */
23
+ export interface TextProps {
24
+ /** Font size of the text */
25
+ size?: TextFontSizes
26
+
27
+ /** Visual style/kind of the text */
28
+ kind?: TextKindTypes
29
+
30
+ /** Font weight of the text */
31
+ weight?: TextFontWeights
32
+
33
+ /** Content to be rendered inside the text component */
34
+ children?: React.ReactNode
35
+
36
+ /** Additional CSS class name */
37
+ className?: string
38
+
39
+ /** HTML id attribute */
40
+ id?: string
41
+
42
+ /** Click event handler */
43
+ onClick?: () => void
44
+
45
+ /** HTML tag to render the text as */
46
+ as?: "span" | "p"
47
+ }
48
+
49
+ /**
50
+ * A flexible text component that supports different sizes, styles, and weights.
51
+ *
52
+ * @category Component
53
+ */
54
+ export function Text({
55
+ size = "medium",
56
+ kind = "default",
57
+ weight = "normal",
58
+ children,
59
+ className,
60
+ id,
61
+ onClick,
62
+ as = "p"
63
+ }: TextProps) {
64
+ const Tag = as || "p";
65
+
66
+ return (
67
+ <Tag
68
+ className={`${cn.TextHost} ${className || ''}`}
69
+ data-size={size}
70
+ data-kind={kind}
71
+ data-weight={weight}
72
+ onClick={onClick}
73
+ id={id}
74
+ >
75
+ {children}
76
+ </Tag>
77
+ )
78
+ }
79
+
@@ -0,0 +1,3 @@
1
+ export {
2
+ Text
3
+ } from "./Text";
@@ -0,0 +1,44 @@
1
+ @layer defaults {
2
+ .TocCardHost {
3
+ display: block;
4
+ max-width: 250px;
5
+
6
+ [part="container"] {
7
+ }
8
+
9
+ [part="description"] {
10
+ color: var(--xyd-toccard-color);
11
+ letter-spacing: 0;
12
+ }
13
+
14
+ [part="link"] {
15
+ display: block;
16
+ border: 1px solid var(--xyd-toccard-border-color);
17
+ border-radius: 6px;
18
+ padding: 8px 16px 12px;
19
+ text-decoration: none;
20
+
21
+ &:hover {
22
+ border-color: var(--xyd-toccard-border-color--active);
23
+ }
24
+ }
25
+
26
+ [part="title-container"] {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: space-between;
30
+ }
31
+
32
+ [part="title"] {
33
+ color: var(--xyd-toccard-title-color);
34
+ margin-bottom: 2px;
35
+ }
36
+
37
+ [part="link-icon"] {
38
+ width: 1em;
39
+ height: 1em;
40
+ object-fit: contain;
41
+ color: var(--xyd-toccard-icon-color);
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+
3
+ import cn from "./TocCard.module.css";
4
+ import { Icon } from "../../../writer";
5
+
6
+ interface TocCardProps {
7
+ title: string;
8
+ description: string;
9
+ href: string;
10
+ className?: string;
11
+ icon?: string;
12
+ as?: React.ElementType;
13
+ }
14
+
15
+ export function TocCard({ title, description, href, className, icon, as }: TocCardProps) {
16
+ const Link = as || $Link;
17
+
18
+ return <xyd-toccard
19
+ className={`${cn.TocCardHost} ${className || ""}`}
20
+ >
21
+ <div part="container">
22
+ <Link
23
+ part="link"
24
+ href={href}
25
+ target="_blank"
26
+ rel="noreferrer"
27
+ >
28
+ <div part="title-container">
29
+ <div part="title">{title}</div>
30
+ {icon && <Icon name={icon} size={16} />}
31
+ </div>
32
+ <div part="description">
33
+ {description}
34
+ </div>
35
+ </Link>
36
+ </div>
37
+ </xyd-toccard>
38
+ }
39
+
40
+ function $Link({ children, href, ...props }: React.ComponentProps<'a'>) {
41
+ return <a href={href} {...props}>{children}</a>
42
+ }
@@ -0,0 +1,3 @@
1
+ export {
2
+ TocCard
3
+ } from "./TocCard";
@@ -0,0 +1,33 @@
1
+ import { css } from "@linaria/core"
2
+
3
+ export const UpdateHost = css`
4
+ @layer defaults {
5
+ gap: 24px;
6
+ flex-direction: row;
7
+ padding-top: 32px;
8
+ padding-bottom: 32px;
9
+ align-items: flex-start;
10
+ width: 100%;
11
+ display: flex;
12
+ position: relative;
13
+
14
+ [part="meta"] {
15
+ width: 160px;
16
+ position: sticky;
17
+ justify-content: flex-start;
18
+ align-items: flex-start;
19
+ flex-direction: column;
20
+ flex-shrink: 0;
21
+ display: flex;
22
+ gap: 10px;
23
+ }
24
+
25
+ [part="content-container"] {
26
+ padding-left: 2px;
27
+ padding-right: 2px;
28
+ overflow: hidden;
29
+ flex: 1 1 0%;
30
+ max-width: 100%;
31
+ }
32
+ }
33
+ `;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+
3
+ import { Badge } from '../Badge';
4
+ import { Text } from '../Text';
5
+
6
+ import * as cn from "./Update.styles"
7
+
8
+ interface UpdateProps {
9
+ children: React.ReactNode
10
+
11
+ version: string
12
+
13
+ date?: string
14
+ }
15
+
16
+ export function Update(props: UpdateProps) {
17
+ const { date, version, children } = props;
18
+ return (
19
+ <xyd-update className={cn.UpdateHost}>
20
+ <div part="meta">
21
+ {date && <div part="date">
22
+ <Badge>
23
+ {date}
24
+ </Badge>
25
+ </div>}
26
+ <div part="version">
27
+ <Text size="small">
28
+ {version}
29
+ </Text>
30
+ </div>
31
+ </div>
32
+ <div part="content-container">
33
+ <div part="content">{children}</div>
34
+ </div>
35
+ </xyd-update>
36
+ );
37
+ }
@@ -0,0 +1 @@
1
+ export {Update} from "./Update"
@@ -0,0 +1,105 @@
1
+ @layer defaults {
2
+ .VideoPlayerHost {
3
+ z-index: var(--xyd-videoguide-miniature-z-index);
4
+ width: var(--xyd-videoguide-miniature-mini-width);
5
+ height: var(--xyd-videoguide-miniature-mini-height);
6
+ overflow: visible;
7
+
8
+ [part="shape"] {
9
+ position: relative;
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ overflow: visible;
14
+ box-shadow: var(--xyd-videoguide-miniature-shadow);
15
+ border-radius: var(--xyd-videoguide-miniature-radius);
16
+ box-sizing: border-box;
17
+ background-color: var(--xyd-videoguide-miniature-bgcolor);
18
+ }
19
+
20
+ [part="frame"] {
21
+ position: relative;
22
+ width: 100%;
23
+ height: var(--xyd-videoguide-miniature-mini-height);
24
+
25
+ background-color: var(--xyd-videoguide-miniature-bgcolor);
26
+ overflow: hidden;
27
+ border-radius: var(--xyd-videoguide-miniature-radius);
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ [part="thumbnail"] {
32
+ position: absolute;
33
+ top: 0;
34
+ left: 0;
35
+ width: 100%;
36
+ height: 100%;
37
+ background-image: url(https://xyd-land.netlify.app/docs-hero.png);
38
+ background-size: cover;
39
+ background-position: center;
40
+ }
41
+
42
+ [part="cover"] {
43
+ background-color: transparent;
44
+ backdrop-filter: brightness(60%) blur(10px);
45
+ -webkit-backdrop-filter: brightness(60%) blur(10px);
46
+
47
+ position: absolute;
48
+ top: 0;
49
+ bottom: 0;
50
+ left: 0;
51
+ right: 0;
52
+ transition: backdrop-filter .1s ease-in-out, -webkit-backdrop-filter .1s ease-in-out, opacity .1s ease-in-out, background-color .1s ease-in-out;
53
+
54
+ overflow: hidden;
55
+
56
+ border-radius: var(--xyd-videoguide-miniature-radius);
57
+ box-sizing: border-box;
58
+ }
59
+
60
+ [part="controls"] {
61
+ position: absolute;
62
+ top: 0;
63
+ bottom: 0;
64
+ left: 0;
65
+ right: 0;
66
+ box-sizing: border-box;
67
+ }
68
+
69
+ [part="button"] {
70
+ display: flex;
71
+ flex-direction: column;
72
+ align-items: center;
73
+ justify-content: center;
74
+ width: 100%;
75
+ height: 100%;
76
+ }
77
+
78
+ [part="icon"] {
79
+ color: var(--xyd-videoguide-miniature-color);
80
+ display: flex;
81
+ box-sizing: border-box;
82
+
83
+ svg {
84
+ fill: currentColor;
85
+ }
86
+ }
87
+
88
+ [part="description"] {
89
+ box-sizing: border-box;
90
+ margin-top: 8px;
91
+ }
92
+
93
+ [part="description-container"] {
94
+ box-sizing: border-box;
95
+ margin-top: 8px;
96
+ }
97
+
98
+ [part="description"] {
99
+ text-align: center;
100
+ color: var(--xyd-videoguide-miniature-color);
101
+ display: block;
102
+ white-space: normal;
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,75 @@
1
+ import React from "react";
2
+
3
+ import cn from "./VideoGuide.module.css";
4
+
5
+ export function VideoGuide() {
6
+ return null
7
+ };
8
+
9
+ interface VideoGuideMiniatureProps {
10
+ videoSrc?: string;
11
+ description?: string;
12
+ className?: string;
13
+ }
14
+
15
+ VideoGuide.Miniature = function VideoGuideMiniature(props: VideoGuideMiniatureProps) {
16
+ const {
17
+ videoSrc,
18
+ description = "Watch the video guide"
19
+ } = props;
20
+
21
+ return <xyd-videoguide-miniature
22
+ className={`${cn.VideoPlayerHost} ${props.className || ""}`}
23
+ >
24
+ <div part="shape" >
25
+ <div part="frame" >
26
+ <iframe
27
+ width="100%"
28
+ height="100%"
29
+ allow="autoplay; fullscreen"
30
+ src={videoSrc}
31
+ />
32
+ <div part="thumbnail" />
33
+ </div>
34
+
35
+ <div part="cover">
36
+ <div part="controls">
37
+ <button part="button" type="button">
38
+ <div
39
+ aria-hidden="true"
40
+ part="icon"
41
+ >
42
+ <$PlayIcon />
43
+ </div>
44
+
45
+ <div part="description-container" >
46
+ <span part="description" >
47
+ {description}
48
+ </span>
49
+ </div>
50
+ </button>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </xyd-videoguide-miniature>
55
+ };
56
+
57
+
58
+ function $PlayIcon() {
59
+ return <svg
60
+ aria-hidden="true"
61
+ height={32}
62
+ width={32}
63
+ viewBox="0 0 16 16"
64
+ fill="none"
65
+ xmlns="http://www.w3.org/2000/svg"
66
+ >
67
+ <path
68
+ fillRule="evenodd"
69
+ clipRule="evenodd"
70
+ d="M8 14.25A6.25 6.25 0 0 0 14.25 8 6.242 6.242 0 0 0 8 1.75 6.25 6.25 0 0 0 1.75 8 6.25 6.25 0 0 0 8 14.25ZM8 16a8 8 0 0 0 8-8c0-4.419-3.57-8-8-8a8 8 0 0 0-8 8 8 8 0 0 0 8 8Z"
71
+ />
72
+ <path
73
+ d="M10.817 7.659A.415.415 0 0 1 11 8a.415.415 0 0 1-.183.341L7.242 10.91c-.305.218-.742.02-.742-.34V5.431c0-.36.437-.56.742-.341l3.575 2.568Z" />
74
+ </svg>
75
+ }
@@ -0,0 +1 @@
1
+ export {VideoGuide} from './VideoGuide';
@@ -0,0 +1,53 @@
1
+ export * from "./Anchor"
2
+
3
+ export * from "./Badge"
4
+
5
+ export * from "./Banner"
6
+
7
+ export * from "./Blockquote"
8
+
9
+ export * from "./Breadcrumbs"
10
+
11
+ export * from "./Button"
12
+
13
+ export * from "./Callout"
14
+
15
+ export * from "./Card"
16
+
17
+ export * from "./Code"
18
+
19
+ export * from "./ColorSchemeButton"
20
+
21
+ export * from "./Details"
22
+
23
+ export * from "./GuideCard"
24
+
25
+ export * from "./Heading"
26
+
27
+ export * from "./Hr"
28
+
29
+ export * from "./Icon"
30
+
31
+ export * from "./IconSocial"
32
+
33
+ export * from "./Image"
34
+
35
+ export * from "./List"
36
+
37
+ export * from "./NavLinks"
38
+
39
+ export * from "./Pre"
40
+
41
+ export * from "./Steps"
42
+
43
+ export * from "./Table"
44
+
45
+ export * from "./Tabs"
46
+
47
+ export * from "./Text"
48
+
49
+ export * from "./TocCard"
50
+
51
+ export * from "./Update"
52
+
53
+ export * from "./VideoGuide"
package/system.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/system"
package/tsconfig.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "esnext",
4
+ "esModuleInterop": true,
5
+ "moduleResolution": "bundler",
6
+ "target": "ES6",
7
+ "lib": [
8
+ "dom",
9
+ "dom.iterable",
10
+ "esnext"
11
+ ],
12
+ "allowJs": true,
13
+ "skipLibCheck": true,
14
+ "strict": false,
15
+ "noEmit": false,
16
+ "incremental": false,
17
+ "resolveJsonModule": true,
18
+ "isolatedModules": true,
19
+ "jsx": "react",
20
+ "plugins": [
21
+ {
22
+ "name": "next"
23
+ }
24
+ ],
25
+ "strictNullChecks": true,
26
+ "baseUrl": ".",
27
+ "paths": {
28
+ "@xyd-js/core": [
29
+ "../xyd-core/index.ts"
30
+ ],
31
+ },
32
+ "typeRoots": [
33
+ "./types.d.ts"
34
+ ]
35
+ },
36
+ "include": [
37
+ "next-env.d.ts",
38
+ "**/*.ts",
39
+ "**/*.tsx",
40
+ ".next/types/**/*.ts",
41
+ "types.d.ts"
42
+ ],
43
+ "exclude": [
44
+ "node_modules"
45
+ ]
46
+ }
package/types.d.ts ADDED
@@ -0,0 +1,52 @@
1
+ import * as React from 'react'
2
+
3
+ declare global {
4
+ namespace React {
5
+ namespace JSX {
6
+ interface IntrinsicElements {
7
+ // Code
8
+ 'xyd-code-bg': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
9
+ 'xyd-code-mark-inline': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
10
+ 'xyd-code-linenumber': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
11
+ 'xyd-code-mark': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
12
+ 'xyd-code-pre': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
13
+ 'xyd-code-loader': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
+ 'xyd-code-copy': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
15
+ 'xyd-codetabs': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
16
+ 'xyd-codetabs-languages': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
17
+
18
+ // Layout
19
+ 'xyd-layout-primary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
20
+
21
+ // Components
22
+ 'xyd-badge': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
23
+ 'xyd-banner': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
24
+ 'xyd-callout': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
25
+ 'xyd-card': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
26
+ 'xyd-breadcrumbs': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
27
+ 'xyd-guidecard': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
28
+ 'xyd-guidecard-list': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
29
+ 'xyd-navlinks': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
30
+ 'xyd-steps': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
31
+ 'xyd-steps-item': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
32
+ 'xyd-table-cell': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
33
+ 'xyd-tabs': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
34
+ 'xyd-toccard': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
35
+ 'xyd-videoguide-miniature': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
36
+ 'xyd-content-decorator': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
37
+ 'xyd-grid-decorator': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
38
+
39
+ // Kit
40
+ 'xyd-loader': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
41
+
42
+ // System
43
+ 'xyd-search-button': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
44
+
45
+ // Pages
46
+ 'page-home': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
47
+ 'page-first-slide': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
48
+ 'page-blog-home': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
49
+ }
50
+ }
51
+ }
52
+ }
package/uxsdk.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/uxsdk";
package/views.ts ADDED
@@ -0,0 +1,2 @@
1
+ // TODO: rename to @xyd-js/components/pages
2
+ export * from "./src/views/HomeView";
package/writer.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/writer"