@xyd-js/components 0.1.0-xyd.7 → 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 (251) 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 +718 -0
  6. package/LICENSE +21 -0
  7. package/TODO.md +1 -0
  8. package/content.ts +0 -2
  9. package/dist/CTABanner-Bc77pnms.js +2 -0
  10. package/dist/CTABanner-Bc77pnms.js.map +1 -0
  11. package/dist/CTABanner-DzO62aGj.js +2 -0
  12. package/dist/CTABanner-DzO62aGj.js.map +1 -0
  13. package/dist/CodeSample-BWPDgd2G.js +2 -0
  14. package/dist/CodeSample-BWPDgd2G.js.map +1 -0
  15. package/dist/CodeSample-DLnR-knP.js +2 -0
  16. package/dist/CodeSample-DLnR-knP.js.map +1 -0
  17. package/dist/HomeView-C8QlNdKh.js +2 -0
  18. package/dist/HomeView-C8QlNdKh.js.map +1 -0
  19. package/dist/HomeView-ZAP5saNy.js +2 -0
  20. package/dist/HomeView-ZAP5saNy.js.map +1 -0
  21. package/dist/Icon-BESh23UN.js +2 -0
  22. package/dist/Icon-BESh23UN.js.map +1 -0
  23. package/dist/Icon-xNucOqd2.js +2 -0
  24. package/dist/Icon-xNucOqd2.js.map +1 -0
  25. package/dist/Text-CfN9RkYA.js +2 -0
  26. package/dist/Text-CfN9RkYA.js.map +1 -0
  27. package/dist/Text-DKycD2zu.js +2 -0
  28. package/dist/Text-DKycD2zu.js.map +1 -0
  29. package/dist/Update-0XruJHjj.js +2 -0
  30. package/dist/Update-0XruJHjj.js.map +1 -0
  31. package/dist/Update-DKOAw8p9.js +2 -0
  32. package/dist/Update-DKOAw8p9.js.map +1 -0
  33. package/dist/VideoGuide-BUyomFVz.js +2 -0
  34. package/dist/VideoGuide-BUyomFVz.js.map +1 -0
  35. package/dist/VideoGuide-B_iUKKv7.js +2 -0
  36. package/dist/VideoGuide-B_iUKKv7.js.map +1 -0
  37. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js +4 -0
  38. package/dist/_rollupPluginBabelHelpers-CxSUtGup.js.map +1 -0
  39. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js +4 -0
  40. package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js.map +1 -0
  41. package/dist/brand.d.ts +9 -9
  42. package/dist/brand.js +1 -1
  43. package/dist/brand.js.map +1 -1
  44. package/dist/coder/themes/cosmo-light.js.map +1 -1
  45. package/dist/coder.d.ts +29 -9
  46. package/dist/coder.js +1 -1
  47. package/dist/coder.js.map +1 -1
  48. package/dist/content.d.ts +268 -204
  49. package/dist/content.js +1 -1
  50. package/dist/content.js.map +1 -1
  51. package/dist/index.css +267 -216
  52. package/dist/layouts.d.ts +20 -21
  53. package/dist/layouts.js +1 -1
  54. package/dist/layouts.js.map +1 -1
  55. package/dist/pages.js +1 -1
  56. package/dist/pages.js.map +1 -1
  57. package/dist/system.d.ts +10 -0
  58. package/dist/system.js +2 -0
  59. package/dist/system.js.map +1 -0
  60. package/dist/tslib.es6-DyL9kPq9.js +2 -0
  61. package/dist/{tslib.es6-DDIOdJiV.js.map → tslib.es6-DyL9kPq9.js.map} +1 -1
  62. package/dist/tslib.es6-Hqk-Mdr9.js +2 -0
  63. package/dist/{tslib.es6-DUrRPhZd.js.map → tslib.es6-Hqk-Mdr9.js.map} +1 -1
  64. package/dist/views.js +1 -1
  65. package/dist/writer.d.ts +411 -78
  66. package/dist/writer.js +1 -1
  67. package/dist/writer.js.map +1 -1
  68. package/docs/.nojekyll +1 -0
  69. package/docs/assets/hierarchy.js +1 -0
  70. package/docs/assets/highlight.css +22 -0
  71. package/docs/assets/icons.js +18 -0
  72. package/docs/assets/icons.svg +1 -0
  73. package/docs/assets/main.js +60 -0
  74. package/docs/assets/navigation.js +1 -0
  75. package/docs/assets/search.js +1 -0
  76. package/docs/assets/style.css +1640 -0
  77. package/docs/functions/GuideCard.html +6 -0
  78. package/docs/hierarchy.html +1 -0
  79. package/docs/index.html +2 -0
  80. package/docs/interfaces/GuideCardProps.html +18 -0
  81. package/docs/modules.html +1 -0
  82. package/index.ts +0 -1
  83. package/package.json +13 -18
  84. package/project.json +677 -0
  85. package/rollup.config.js +32 -3
  86. package/src/brand/Button/Button.styles.tsx +28 -0
  87. package/src/brand/Button/Button.tsx +3 -35
  88. package/src/brand/CTABanner/CTABanner.styles.tsx +80 -0
  89. package/src/brand/CTABanner/CTABanner.tsx +34 -112
  90. package/src/brand/Footer/Footer.styles.tsx +18 -0
  91. package/src/brand/Footer/Footer.tsx +4 -24
  92. package/src/brand/TODO.md +1 -0
  93. package/src/coder/Code/Code.styles.tsx +134 -35
  94. package/src/coder/Code/Code.tsx +131 -40
  95. package/src/coder/Code/CodeLoader.tsx +4 -4
  96. package/src/coder/Code/annotations.tsx +28 -8
  97. package/src/coder/Code/highlight.ts +38 -0
  98. package/src/coder/Code/index.ts +2 -1
  99. package/src/coder/CodeCopy/{CodeCopy.style.tsx → CodeCopy.styles.tsx} +6 -6
  100. package/src/coder/CodeCopy/CodeCopy.tsx +6 -6
  101. package/src/coder/CodeSample/CodeSample.tsx +83 -27
  102. package/src/coder/CodeTabs/CodeTabs.styles.tsx +99 -78
  103. package/src/coder/CodeTabs/CodeTabs.tsx +71 -56
  104. package/src/coder/CodeTheme/CodeTheme.tsx +89 -49
  105. package/src/coder/CodeTheme/index.ts +0 -1
  106. package/src/coder/CoderProvider.tsx +26 -0
  107. package/src/coder/index.ts +8 -4
  108. package/src/content/ContentDecoator.styles.tsx +113 -0
  109. package/src/content/ContentDecorator.tsx +17 -0
  110. package/src/content/GridDecorator.styles.tsx +67 -0
  111. package/src/content/GridDecorator.tsx +21 -0
  112. package/src/content/ReactContent.tsx +575 -0
  113. package/src/content/index.ts +10 -2
  114. package/src/icons/index.ts +0 -0
  115. package/src/kit/Loader/Loader.styles.tsx +53 -0
  116. package/src/kit/Loader/Loader.tsx +22 -0
  117. package/src/kit/TODO.md +2 -0
  118. package/src/kit/index.ts +1 -0
  119. package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +263 -278
  120. package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +173 -96
  121. package/src/layouts/LayoutPrimary/index.ts +0 -2
  122. package/src/layouts/index.ts +0 -7
  123. package/src/pages/HomePage/HomePage.styles.tsx +16 -0
  124. package/src/pages/HomePage/HomePage.tsx +7 -21
  125. package/src/pages/TODO.md +1 -0
  126. package/src/system/SearchButton/SearchButton.styles.tsx +86 -0
  127. package/src/system/SearchButton/SearchButton.tsx +116 -0
  128. package/src/system/SearchButton/index.ts +1 -0
  129. package/src/system/index.ts +1 -0
  130. package/src/utils/useStyle.ts +19 -0
  131. package/src/views/HomeView/HomeView.styles.tsx +37 -0
  132. package/src/views/HomeView/HomeView.tsx +5 -45
  133. package/src/views/TODO.md +1 -0
  134. package/src/writer/Anchor/Anchor.styles.tsx +11 -0
  135. package/src/writer/Anchor/Anchor.tsx +51 -0
  136. package/src/writer/Anchor/index.tsx +1 -0
  137. package/src/writer/Badge/Badge.styles.tsx +39 -28
  138. package/src/writer/Badge/Badge.tsx +37 -20
  139. package/src/writer/Banner/Banner.styles.tsx +91 -0
  140. package/src/writer/Banner/Banner.tsx +70 -0
  141. package/src/writer/Banner/index.ts +1 -0
  142. package/src/writer/Blockquote/Blockquote.styles.tsx +4 -4
  143. package/src/writer/Blockquote/Blockquote.tsx +6 -3
  144. package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +22 -21
  145. package/src/writer/Breadcrumbs/Breadcrumbs.tsx +19 -13
  146. package/src/writer/Button/Button.styles.tsx +137 -0
  147. package/src/writer/Button/Button.tsx +75 -0
  148. package/src/writer/Button/index.ts +2 -0
  149. package/src/writer/Callout/Callout.styles.tsx +29 -40
  150. package/src/writer/Callout/Callout.tsx +31 -16
  151. package/src/writer/Card/Card.styles.tsx +47 -0
  152. package/src/writer/Card/Card.tsx +69 -0
  153. package/src/writer/Card/index.ts +1 -0
  154. package/src/writer/Code/Code.styles.tsx +10 -11
  155. package/src/writer/Code/Code.tsx +7 -4
  156. package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +172 -0
  157. package/src/writer/ColorSchemeButton/index.ts +1 -0
  158. package/src/writer/Details/Details.styles.tsx +84 -84
  159. package/src/writer/Details/Details.tsx +71 -51
  160. package/src/writer/Example/index.tsx +5 -0
  161. package/src/writer/GuideCard/GuideCard.styles.tsx +108 -107
  162. package/src/writer/GuideCard/GuideCard.tsx +72 -37
  163. package/src/writer/Heading/Heading.styles.tsx +69 -49
  164. package/src/writer/Heading/Heading.tsx +92 -22
  165. package/src/writer/Hr/Hr.styles.tsx +5 -5
  166. package/src/writer/Hr/Hr.tsx +3 -6
  167. package/src/writer/Icon/Icon.tsx +48 -0
  168. package/src/writer/Icon/index.ts +1 -0
  169. package/src/writer/Image/Image.styles.tsx +9 -0
  170. package/src/writer/Image/Image.tsx +19 -0
  171. package/src/writer/Image/index.ts +1 -0
  172. package/src/writer/List/List.styles.tsx +47 -0
  173. package/src/writer/List/List.tsx +29 -0
  174. package/src/writer/List/index.ts +4 -0
  175. package/src/writer/NavLinks/NavLinks.styles.ts +23 -24
  176. package/src/writer/NavLinks/NavLinks.tsx +66 -19
  177. package/src/writer/Pre/Pre.styles.tsx +5 -5
  178. package/src/writer/Pre/Pre.tsx +4 -3
  179. package/src/writer/Steps/Steps.styles.tsx +14 -12
  180. package/src/writer/Steps/Steps.tsx +39 -10
  181. package/src/writer/Table/Table.styles.tsx +62 -30
  182. package/src/writer/Table/Table.tsx +121 -11
  183. package/src/writer/Table/index.ts +0 -11
  184. package/src/writer/Tabs/Tabs.styles.tsx +63 -70
  185. package/src/writer/Tabs/Tabs.tsx +31 -29
  186. package/src/writer/Text/Text.styles.tsx +66 -0
  187. package/src/writer/Text/Text.tsx +79 -0
  188. package/src/writer/Text/index.ts +3 -0
  189. package/src/writer/TocCard/TocCard.module.css +44 -0
  190. package/src/writer/TocCard/TocCard.tsx +42 -0
  191. package/src/writer/TocCard/index.ts +3 -0
  192. package/src/writer/UnderlineNav/Tabs.tsx +51 -0
  193. package/src/writer/UnderlineNav/TabsPrimary.styles.tsx +184 -0
  194. package/src/writer/UnderlineNav/TabsPrimary.tsx +209 -0
  195. package/src/writer/UnderlineNav/TabsSecondary.styles.tsx +77 -0
  196. package/src/writer/UnderlineNav/TabsSecondary.tsx +171 -0
  197. package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +181 -45
  198. package/src/writer/UnderlineNav/UnderlineNav.tsx +258 -23
  199. package/src/writer/UnderlineNav/index.ts +2 -1
  200. package/src/writer/UnderlineNav/useValueChange.ts +60 -0
  201. package/src/writer/Update/Update.styles.tsx +33 -0
  202. package/src/writer/Update/Update.tsx +37 -0
  203. package/src/writer/Update/index.ts +1 -0
  204. package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
  205. package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
  206. package/src/writer/VideoGuide/index.ts +1 -0
  207. package/src/writer/index.ts +23 -1
  208. package/tsconfig.json +11 -6
  209. package/types.d.ts +50 -0
  210. package/writer.ts +1 -1
  211. package/dist/CTABanner-BrdYlhnD.js +0 -2
  212. package/dist/CTABanner-BrdYlhnD.js.map +0 -1
  213. package/dist/CTABanner-XQNnnpUx.js +0 -2
  214. package/dist/CTABanner-XQNnnpUx.js.map +0 -1
  215. package/dist/CodeSample-Cp42Adjc.js +0 -2
  216. package/dist/CodeSample-Cp42Adjc.js.map +0 -1
  217. package/dist/CodeSample-DxPp80ID.js +0 -2
  218. package/dist/CodeSample-DxPp80ID.js.map +0 -1
  219. package/dist/HomeView-BN9mZXh9.js +0 -2
  220. package/dist/HomeView-BN9mZXh9.js.map +0 -1
  221. package/dist/HomeView-BVaaV0uE.js +0 -2
  222. package/dist/HomeView-BVaaV0uE.js.map +0 -1
  223. package/dist/UnderlineNav-Bs7Ot9Ch.js +0 -2
  224. package/dist/UnderlineNav-Bs7Ot9Ch.js.map +0 -1
  225. package/dist/UnderlineNav-C2aEVraN.js +0 -2
  226. package/dist/UnderlineNav-C2aEVraN.js.map +0 -1
  227. package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js +0 -2
  228. package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js.map +0 -1
  229. package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js +0 -2
  230. package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js.map +0 -1
  231. package/dist/index-BVUz77Tm.js +0 -2
  232. package/dist/index-BVUz77Tm.js.map +0 -1
  233. package/dist/index-jxd3nv2J.js +0 -2
  234. package/dist/index-jxd3nv2J.js.map +0 -1
  235. package/dist/tslib.es6-DDIOdJiV.js +0 -2
  236. package/dist/tslib.es6-DUrRPhZd.js +0 -2
  237. package/src/content/Anchor/Anchor.tsx +0 -63
  238. package/src/content/Anchor/index.tsx +0 -3
  239. package/src/content/Content/Content.tsx +0 -21
  240. package/src/content/Content/index.tsx +0 -3
  241. package/src/content/Content.tsx +0 -180
  242. package/src/content/Subtitle/Subtitle.tsx +0 -21
  243. package/src/content/Subtitle/index.tsx +0 -3
  244. package/src/layouts/Layout.styles.tsx +0 -151
  245. package/src/layouts/Layout.tsx +0 -121
  246. package/src/ui/Loader/Loader.styles.tsx +0 -52
  247. package/src/ui/Loader/Loader.tsx +0 -26
  248. package/src/ui/index.ts +0 -1
  249. package/src/writer/Icon/index.tsx +0 -355
  250. package/src/writer/Table/TableV2.styles.tsx +0 -117
  251. package/src/writer/Table/TableV2.tsx +0 -83
package/dist/writer.d.ts CHANGED
@@ -1,100 +1,269 @@
1
1
  import React, { ReactElement } from 'react';
2
2
 
3
+ declare const Anchor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
4
+ newWindow?: boolean;
5
+ as?: React.ElementType;
6
+ } & React.RefAttributes<HTMLAnchorElement>>;
7
+
3
8
  interface BadgeProps {
9
+ /**
10
+ * The class name of the badge.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * The children of the badge.
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * The size of the badge.
19
+ */
20
+ size?: "sm" | "xs";
21
+ /**
22
+ * The kind of the badge.
23
+ */
24
+ kind?: "warning" | "info" | "default";
25
+ }
26
+ /**
27
+ * Badge component is used to display a badge.
28
+ *
29
+ * @group Components
30
+ */
31
+ declare function Badge({ className, children, size, kind }: BadgeProps): React.JSX.Element;
32
+
33
+ interface BannerProps {
4
34
  children: React.ReactNode;
5
- size?: "sm";
6
- kind?: "warning" | "info";
35
+ kind?: "secondary";
36
+ label?: string;
37
+ href?: string;
38
+ icon?: React.ReactNode | string;
39
+ }
40
+ declare function Banner(props: BannerProps): React.JSX.Element;
41
+ declare namespace Banner {
42
+ var Secondary: (props: BannerProps) => React.JSX.Element;
7
43
  }
8
- declare function Badge({ children, size, kind }: BadgeProps): React.JSX.Element;
9
44
 
10
45
  interface BlockquoteProps {
46
+ className?: string;
11
47
  children: React.ReactNode;
12
48
  }
13
- declare function Blockquote({ children }: BlockquoteProps): React.JSX.Element;
49
+ declare function Blockquote({ className, children }: BlockquoteProps): React.JSX.Element;
14
50
 
15
51
  interface BreadcrumbsProps {
52
+ className?: string;
16
53
  items: {
17
54
  title: string;
18
55
  href?: string;
19
56
  }[];
20
57
  }
21
- declare function Breadcrumbs(props: BreadcrumbsProps): ReactElement;
58
+ declare function Breadcrumbs({ className, items }: BreadcrumbsProps): ReactElement;
59
+
60
+ interface ButtonProps {
61
+ children?: React.ReactNode;
62
+ kind?: "primary" | "secondary" | "tertiary" | undefined;
63
+ theme?: "ghost";
64
+ size?: "sm" | "md" | "lg";
65
+ className?: string;
66
+ onClick?: () => void;
67
+ disabled?: boolean;
68
+ icon?: React.ReactElement;
69
+ iconPosition?: "left" | "right";
70
+ href?: string;
71
+ }
72
+ declare function Button({ children, kind, theme, size, className, onClick, disabled, icon, iconPosition, href }: ButtonProps): React.JSX.Element;
22
73
 
74
+ /**
75
+ * Props for the Callout component
76
+ */
23
77
  interface CalloutProps {
78
+ /** Additional CSS class name to be applied to the callout */
79
+ className?: string;
80
+ /** Content to be displayed inside the callout */
24
81
  children: React.ReactNode;
25
82
  }
26
- declare function Callout({ children }: CalloutProps): React.JSX.Element;
83
+ /**
84
+ * A Callout component that displays important information or notices in a visually distinct way.
85
+ * It includes an info icon and a message area for content.
86
+ *
87
+ * @category Component
88
+ */
89
+ declare function Callout({ className, children }: CalloutProps): React.JSX.Element;
90
+
91
+ interface CardProps {
92
+ title: string;
93
+ href?: string;
94
+ link?: React.ElementType;
95
+ description?: string;
96
+ imgSrc?: string;
97
+ imgAlt?: string;
98
+ shadow?: "md";
99
+ }
100
+ declare function Card(props: CardProps): React.JSX.Element;
27
101
 
28
102
  interface CodeProps {
103
+ className?: string;
29
104
  children: React.ReactNode;
30
105
  }
31
- declare function Code({ children }: CodeProps): React.JSX.Element;
106
+ declare function Code({ className, children }: CodeProps): React.JSX.Element;
107
+
108
+ declare function ColorSchemeButton(): React.JSX.Element;
109
+ declare function useColorScheme(): (string | (() => void))[];
32
110
 
111
+ /**
112
+ * Base interface for all Details component variants
113
+ */
33
114
  interface BaseDetailsProps {
115
+ /** Content to be displayed inside the details element */
34
116
  children: React.ReactNode;
117
+ /** Label text displayed in the summary */
35
118
  label: string;
36
- icon?: React.SVGProps<SVGSVGElement>;
119
+ /** Optional icon element to be displayed in the summary */
120
+ icon?: React.ReactElement;
121
+ /** Optional CSS class name for custom styling */
122
+ className?: string;
37
123
  }
124
+ /**
125
+ * Props for the tertiary variant of the Details component
126
+ */
38
127
  interface TertiaryDetailsProps extends BaseDetailsProps {
128
+ /** Specifies the tertiary variant */
39
129
  kind: "tertiary";
130
+ /** Title text or element displayed in the summary */
40
131
  title: string | React.ReactNode;
41
132
  }
133
+ /**
134
+ * Props for the secondary variant of the Details component
135
+ */
42
136
  interface SecondaryDetailsProps extends BaseDetailsProps {
137
+ /** Specifies the secondary variant */
43
138
  kind: "secondary";
139
+ /** Title text or element displayed in the summary */
44
140
  title: string | React.ReactNode;
45
141
  }
142
+ /**
143
+ * Props for the primary variant of the Details component
144
+ */
46
145
  interface PrimaryDetailsProps extends BaseDetailsProps {
146
+ /** Specifies the primary variant (default) */
47
147
  kind?: "primary";
48
148
  }
149
+ /** Union type of all possible Details component variants */
49
150
  type DetailsProps = PrimaryDetailsProps | SecondaryDetailsProps | TertiaryDetailsProps;
50
- declare function Details(props: DetailsProps): React.JSX.Element;
151
+ /**
152
+ * A collapsible details component that supports three variants: primary, secondary, and tertiary.
153
+ * Each variant has a different visual style and structure.
154
+ *
155
+ * @param props - The component props
156
+ * @returns A details element with collapsible content
157
+ *
158
+ * @category Component
159
+ */
160
+ declare function Details(props: DetailsProps): React.ReactElement;
51
161
 
162
+ /**
163
+ * Props for the GuideCard component
164
+ */
52
165
  interface GuideCardProps {
166
+ /** Content to be displayed in the card body */
53
167
  children: React.ReactNode;
168
+ /** URL the card links to */
54
169
  href: string;
170
+ /** Title displayed at the top of the card */
55
171
  title: string;
172
+ /** Optional icon displayed to the left of the content */
56
173
  icon?: React.ReactNode;
174
+ /** Visual style variant of the card */
57
175
  kind?: "secondary";
176
+ /** Size variant of the card */
58
177
  size?: "sm" | "md";
59
- }
60
- declare function GuideCard({ children, href, icon, title, kind, size, }: GuideCardProps): React.JSX.Element;
178
+ /** Additional CSS class names to apply to the card */
179
+ className?: string;
180
+ /** Additional props to pass to the link element */
181
+ as?: React.ElementType;
182
+ }
183
+ /**
184
+ * A card component that displays content with a title and optional icon.
185
+ * The entire card is clickable and links to the specified URL.
186
+ *
187
+ * @category Component
188
+ */
189
+ declare function GuideCard({ children, href, icon, title, kind, size, className, as, }: GuideCardProps): React.JSX.Element;
61
190
  declare namespace GuideCard {
62
191
  var List: ({ children }: {
63
192
  children: React.ReactNode;
64
193
  }) => React.JSX.Element;
65
194
  }
66
195
 
196
+ /**
197
+ * Props for the Heading component
198
+ * @interface HeadingProps
199
+ */
67
200
  interface HeadingProps {
201
+ /** Content to be rendered inside the heading */
68
202
  children: React.ReactNode;
203
+ /** The size of the heading (1-6, corresponding to h1-h6) */
69
204
  size: 1 | 2 | 3 | 4 | 5 | 6;
205
+ /** Optional HTML element to render as (div or span) */
70
206
  as?: "div" | "span";
207
+ /** Optional ID for the heading element */
71
208
  id?: string;
209
+ /** Optional visual style variant */
210
+ kind?: "muted";
211
+ /** Optional click handler */
72
212
  onClick?: () => void;
73
- }
74
- declare function Heading({ children, size, as, id, onClick }: HeadingProps): React.JSX.Element;
213
+ /** Optional additional CSS class name */
214
+ className?: string;
215
+ /** Optional active state */
216
+ active?: boolean;
217
+ /** Optional label for the heading */
218
+ label?: string;
219
+ /** Optional subtitle for the heading */
220
+ subtitle?: string;
221
+ /** Optional to hide the anchor icon */
222
+ noanchor?: boolean;
223
+ /** Optional ref for the heading element */
224
+ ref?: React.RefObject<HTMLHeadingElement>;
225
+ style?: React.CSSProperties;
226
+ }
227
+ /**
228
+ * A flexible heading component that can render as any heading level (h1-h6) or as a div/span
229
+ *
230
+ * @category Component
231
+ */
232
+ declare function Heading(props: HeadingProps): React.JSX.Element;
75
233
 
76
234
  interface HrProps {
235
+ }
236
+ declare function Hr(): React.JSX.Element;
237
+
238
+ declare const IconProvider: React.Context<{
239
+ iconSet: {};
240
+ }>;
241
+ interface IconProps {
242
+ name: string;
243
+ size?: number;
244
+ color?: string;
245
+ }
246
+ declare function Icon(props: IconProps): ReactElement | null;
247
+
248
+ interface ImageProps {
249
+ src: string;
250
+ alt: string;
251
+ style?: React.CSSProperties;
252
+ }
253
+ declare function Image(props: ImageProps): React.JSX.Element;
254
+
255
+ interface ListProps {
256
+ children: React.ReactNode;
257
+ }
258
+ declare function List({ children }: ListProps): React.JSX.Element;
259
+ declare namespace List {
260
+ var Item: typeof ListItem;
261
+ }
262
+ declare function ListOl({ children }: ListProps): React.JSX.Element;
263
+ interface ListItemProps {
77
264
  children: React.ReactNode;
78
265
  }
79
- declare function Hr({ children }: HrProps): React.JSX.Element;
80
-
81
- declare function IconSessionReplay(): React.JSX.Element;
82
- declare function IconMetrics(): React.JSX.Element;
83
- declare function IconFunnels(): React.JSX.Element;
84
- declare function IconCode(): React.JSX.Element;
85
- declare function IconCustomEvent(): React.JSX.Element;
86
- declare function IconAlert(): React.JSX.Element;
87
- declare function IconBrowser(): React.JSX.Element;
88
- declare function IconREST(): React.JSX.Element;
89
- declare function IconGraphQL(): React.JSX.Element;
90
- declare function IconWebhooks(): React.JSX.Element;
91
- declare function IconJSBrowser(): React.JSX.Element;
92
- declare function IconJSNode(): React.JSX.Element;
93
- declare function IconStorybook(): React.JSX.Element;
94
- declare function IconReactRouter(): React.JSX.Element;
95
- declare function IconNextJS(): React.JSX.Element;
96
- declare function IconAppTemplate(): React.JSX.Element;
97
- declare function IconQuote(): React.JSX.Element;
266
+ declare function ListItem({ children }: ListItemProps): React.JSX.Element;
98
267
 
99
268
  interface NavLinksProps {
100
269
  prev?: {
@@ -105,106 +274,270 @@ interface NavLinksProps {
105
274
  title: string;
106
275
  href: string;
107
276
  };
277
+ as?: React.ElementType;
278
+ className?: string;
108
279
  }
109
280
  declare function NavLinks(props: NavLinksProps): React.JSX.Element;
110
281
 
111
282
  interface PreProps {
112
283
  children: React.ReactNode;
284
+ className?: string;
113
285
  }
114
- declare function Pre({ children }: PreProps): React.JSX.Element;
286
+ declare function Pre({ children, className }: PreProps): React.JSX.Element;
115
287
 
288
+ /**
289
+ * Props for the Steps component
290
+ */
116
291
  interface StepsProps {
292
+ /** Content to be rendered inside the steps list */
117
293
  children: React.ReactNode;
294
+ /** Optional CSS class name to be applied to the steps container */
295
+ className?: string;
118
296
  }
119
- declare function Steps({ children }: StepsProps): React.JSX.Element;
297
+ /**
298
+ * Steps component that renders a numbered list of steps or stages.
299
+ * Use this component to display a sequence of steps in a process or workflow.
300
+ *
301
+ * @category Component
302
+ */
303
+ declare function Steps({ children, className }: StepsProps): React.JSX.Element;
120
304
  declare namespace Steps {
121
- var Item: ({ children }: StepsItemProps) => React.JSX.Element;
305
+ var Item: ({ children, className }: StepsItemProps) => React.JSX.Element;
122
306
  }
307
+ /**
308
+ * Props for the Steps.Item component
309
+ */
123
310
  interface StepsItemProps {
311
+ /** Content to be rendered inside the step item */
124
312
  children: React.ReactNode;
313
+ /** Optional CSS class name to be applied to the step item */
314
+ className?: string;
125
315
  }
126
316
 
317
+ /**
318
+ * Props for the Table component
319
+ */
127
320
  interface TableProps {
321
+ /** The content to be rendered inside the table */
128
322
  children: React.ReactNode;
129
- }
130
- declare function Table({ children }: TableProps): React.JSX.Element;
131
- declare namespace Table {
132
- var Th: ({ children }: TableThProps$1) => React.JSX.Element;
133
- var Tr: ({ children }: TableTrProps$1) => React.JSX.Element;
134
- var Td: ({ children }: TableTdProps$1) => React.JSX.Element;
135
- }
136
- interface TableThProps$1 {
137
- children: React.ReactNode;
138
- }
139
- interface TableTrProps$1 {
140
- children: React.ReactNode;
141
- }
142
- interface TableTdProps$1 {
143
- children: React.ReactNode;
144
- }
145
-
146
- interface TableV2Props {
147
- children: React.ReactNode;
323
+ /** Optional CSS class name to be applied to the table */
148
324
  className?: string;
149
325
  }
150
- declare function TableV2({ children, className }: TableV2Props): React.JSX.Element;
151
- declare namespace TableV2 {
326
+ /**
327
+ * A table component that provides a structured way to display tabular data.
328
+ * It supports custom styling through className prop and can contain various table elements.
329
+ *
330
+ * @category Component
331
+ */
332
+ declare function Table({ children, className }: TableProps): React.JSX.Element;
333
+ declare namespace Table {
152
334
  var Head: ({ children }: TableHeadProps) => React.JSX.Element;
153
335
  var Th: ({ children, numeric }: TableThProps) => React.JSX.Element;
154
336
  var Tr: ({ children }: TableTrProps) => React.JSX.Element;
337
+ var Body: ({ children }: TableBodyProps) => React.JSX.Element;
155
338
  var Td: ({ children, numeric, muted }: TableTdProps) => React.JSX.Element;
156
339
  var Cell: ({ children }: TableCellProps) => React.JSX.Element;
157
- var ModelCell: ({ children }: TableModelCellProps) => React.JSX.Element;
158
340
  }
341
+ /**
342
+ * Props for the TableHead component
343
+ */
159
344
  interface TableHeadProps {
345
+ /** The content to be rendered inside the table header */
160
346
  children: React.ReactNode;
161
347
  }
348
+ /**
349
+ * Props for the TableTh component
350
+ */
162
351
  interface TableThProps {
352
+ /** The content to be rendered inside the table header cell */
163
353
  children: React.ReactNode;
354
+ /** Whether the cell content should be right-aligned (for numeric values) */
164
355
  numeric?: boolean;
165
356
  }
357
+ /**
358
+ * Props for the TableTr component
359
+ */
166
360
  interface TableTrProps {
361
+ /** The content to be rendered inside the table row */
167
362
  children: React.ReactNode;
168
363
  }
364
+ /**
365
+ * Props for the TableBody component
366
+ */
367
+ interface TableBodyProps {
368
+ /** The content to be rendered inside the table body */
369
+ children: React.ReactNode;
370
+ }
371
+ /**
372
+ * Props for the TableTd component
373
+ */
169
374
  interface TableTdProps {
375
+ /** The content to be rendered inside the table cell */
170
376
  children: React.ReactNode;
377
+ /** Whether the cell content should be right-aligned (for numeric values) */
171
378
  numeric?: boolean;
379
+ /** Whether the cell should have a muted appearance */
172
380
  muted?: boolean;
173
381
  }
382
+ /**
383
+ * Props for the TableCell component
384
+ */
174
385
  interface TableCellProps {
386
+ /** The content to be rendered inside the table cell */
175
387
  children: React.ReactNode;
176
388
  }
177
- interface TableModelCellProps {
178
- children: React.ReactNode;
389
+
390
+ /**
391
+ * Available font sizes for the Text component
392
+ */
393
+ type TextFontSizes = "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
394
+ /**
395
+ * Available text styles/kinds for the Text component
396
+ */
397
+ type TextKindTypes = "default" | "ghost" | "success" | "warn" | "error" | "primary" | "secondary";
398
+ /**
399
+ * Available font weights for the Text component
400
+ */
401
+ type TextFontWeights = "normal" | "bold" | "extra-bold";
402
+ /**
403
+ * Props for the Text component
404
+ */
405
+ interface TextProps {
406
+ /** Font size of the text */
407
+ size?: TextFontSizes;
408
+ /** Visual style/kind of the text */
409
+ kind?: TextKindTypes;
410
+ /** Font weight of the text */
411
+ weight?: TextFontWeights;
412
+ /** Content to be rendered inside the text component */
413
+ children?: React.ReactNode;
414
+ /** Additional CSS class name */
415
+ className?: string;
416
+ /** HTML id attribute */
417
+ id?: string;
418
+ /** Click event handler */
419
+ onClick?: () => void;
420
+ /** HTML tag to render the text as */
421
+ as?: "span" | "p";
422
+ }
423
+ /**
424
+ * A flexible text component that supports different sizes, styles, and weights.
425
+ *
426
+ * @category Component
427
+ */
428
+ declare function Text({ size, kind, weight, children, className, id, onClick, as }: TextProps): React.JSX.Element;
429
+
430
+ interface TocCardProps {
431
+ title: string;
432
+ description: string;
433
+ href: string;
434
+ className?: string;
435
+ icon?: string;
436
+ as?: React.ElementType;
179
437
  }
438
+ declare function TocCard({ title, description, href, className, icon, as }: TocCardProps): React.JSX.Element;
180
439
 
181
440
  interface TabsProps$1 {
441
+ /** Child elements to be rendered within the navigation */
182
442
  children: React.ReactNode;
183
- items: string[];
184
- tabIndex?: number;
443
+ /** The currently selected tab value */
444
+ value?: string;
445
+ /** Callback function triggered when a tab is selected */
446
+ onChange?: (value: string) => void;
447
+ /** Whether to enable sliding animation between tabs */
448
+ slide?: boolean;
449
+ /** Additional CSS class name for the component */
450
+ className?: string;
451
+ /** The variant of the navigation */
452
+ kind?: 'default' | 'secondary';
453
+ }
454
+ /**
455
+ * A navigation component that displays tabs with an underline indicator
456
+ *
457
+ * @category Component
458
+ */
459
+ declare function UnderlineNav({ children, value: controlledValue, onChange, slide, className, kind }: TabsProps$1): React.JSX.Element;
460
+ declare namespace UnderlineNav {
461
+ var Item: ({ children, value, href, as, defaultActive }: UnderlineNavItemProps) => React.JSX.Element;
462
+ var Content: ({ children, value, defaultActive }: UnderlineNavContentProps) => React.JSX.Element;
185
463
  }
186
- declare function Tabs({ children, items, tabIndex }: TabsProps$1): React.JSX.Element;
187
- declare namespace Tabs {
188
- var Content: ({ children, value }: {
189
- children: any;
190
- value: any;
191
- }) => React.JSX.Element;
464
+ /**
465
+ * Props for the UnderlineNav.Item component
466
+ */
467
+ interface UnderlineNavItemProps {
468
+ /** Child elements to be rendered within the navigation item */
469
+ children: React.ReactNode;
470
+ /** Unique identifier for the navigation item */
471
+ value: string;
472
+ /** URL for the navigation item link */
473
+ href?: string;
474
+ /** Custom component to render as the link element */
475
+ as?: React.ElementType;
476
+ /** Whether this item should be active by default */
477
+ defaultActive?: boolean;
478
+ }
479
+ /**
480
+ * Props for the UnderlineNav.Content component
481
+ */
482
+ interface UnderlineNavContentProps {
483
+ /** Child elements to be rendered within the content area */
484
+ children: React.ReactNode;
485
+ /** Unique identifier for the content section */
486
+ value: string;
487
+ /** Whether this content should be active by default */
488
+ defaultActive?: boolean;
192
489
  }
193
490
 
194
- interface TabsProps {
491
+ /**
492
+ * Props for the TabsPrimary component
493
+ */
494
+ interface TabsPrimaryProps {
495
+ /** Child elements to be rendered within the navigation */
195
496
  children: React.ReactNode;
196
- value: string;
197
- onChange: (value: string) => void;
497
+ /** The currently selected tab value */
498
+ value?: string;
499
+ /** Callback function triggered when a tab is selected */
500
+ onChange?: (value: string) => void;
501
+ /** Whether to enable sliding animation between tabs */
502
+ slide?: boolean;
503
+ /** Additional CSS class name for the component */
504
+ className?: string;
198
505
  }
199
- declare function UnderlineNav({ children, value, onChange }: TabsProps): React.JSX.Element;
200
- declare namespace UnderlineNav {
201
- var Item: ({ children, value, href }: UnderlineNavItemProps) => React.JSX.Element;
506
+
507
+ interface TabsSecondaryProps {
508
+ /** The currently selected tab value */
509
+ value?: string;
510
+ children: React.ReactNode;
511
+ className?: string;
512
+ onChange?: (value: string) => void;
202
513
  }
203
- interface UnderlineNavItemProps {
514
+
515
+ interface TabsPropsCommon {
516
+ kind?: 'secondary' | null;
517
+ }
518
+ type TabsProps<T> = T & TabsPropsCommon;
519
+ declare function Tabs(props: TabsProps<TabsSecondaryProps | TabsPrimaryProps>): React.JSX.Element;
520
+ declare namespace Tabs {
521
+ var Item: (props: any) => React.JSX.Element;
522
+ var Content: (props: any) => React.JSX.Element;
523
+ }
524
+
525
+ interface UpdateProps {
204
526
  children: React.ReactNode;
205
- value: string;
206
- href?: string;
527
+ version: string;
528
+ date?: string;
529
+ }
530
+ declare function Update(props: UpdateProps): React.JSX.Element;
531
+
532
+ declare function VideoGuide(): null;
533
+ declare namespace VideoGuide {
534
+ var Miniature: (props: VideoGuideMiniatureProps) => React.JSX.Element;
535
+ }
536
+ interface VideoGuideMiniatureProps {
537
+ videoSrc?: string;
538
+ description?: string;
539
+ className?: string;
207
540
  }
208
541
 
209
- export { Badge, Blockquote, Breadcrumbs, Callout, Code, Details, GuideCard, Heading, Hr, IconAlert, IconAppTemplate, IconBrowser, IconCode, IconCustomEvent, IconFunnels, IconGraphQL, IconJSBrowser, IconJSNode, IconMetrics, IconNextJS, IconQuote, IconREST, IconReactRouter, IconSessionReplay, IconStorybook, IconWebhooks, NavLinks, Pre, Steps, Table, TableV2, Tabs, UnderlineNav };
210
- export type { BadgeProps, BlockquoteProps, BreadcrumbsProps, CalloutProps, CodeProps, DetailsProps, HeadingProps, HrProps, NavLinksProps, PreProps, StepsProps, TableProps, TableTdProps$1 as TableTdProps, TableThProps$1 as TableThProps, TableTrProps$1 as TableTrProps, TabsProps$1 as TabsProps };
542
+ export { Anchor, Badge, Banner, Blockquote, Breadcrumbs, Button, Callout, Card, Code, ColorSchemeButton, Details, GuideCard, Heading, Hr, Icon, IconProvider, Image, List, ListOl, NavLinks, Pre, Steps, Table, Tabs, Text, TocCard, UnderlineNav, Update, VideoGuide, useColorScheme };
543
+ export type { BadgeProps, BannerProps, BlockquoteProps, BreadcrumbsProps, ButtonProps, CalloutProps, CodeProps, DetailsProps, HeadingProps, HrProps, NavLinksProps, PreProps, StepsProps };
package/dist/writer.js CHANGED
@@ -1,2 +1,2 @@
1
- export{b as Badge,B as Blockquote,c as Callout,C as Code,D as Details,H as Heading,a as Hr,n as IconAlert,d as IconAppTemplate,m as IconBrowser,p as IconCode,o as IconCustomEvent,q as IconFunnels,k as IconGraphQL,i as IconJSBrowser,h as IconJSNode,r as IconMetrics,e as IconNextJS,I as IconQuote,l as IconREST,f as IconReactRouter,s as IconSessionReplay,g as IconStorybook,j as IconWebhooks}from"./index-BVUz77Tm.js";import{_ as t}from"./tslib.es6-DUrRPhZd.js";import u,{Fragment as v}from"react";import{ArrowRightIcon as E,ArrowLeftIcon as x}from"@radix-ui/react-icons";export{G as GuideCard,S as Steps,b as Table,T as TableV2,a as Tabs,U as UnderlineNav}from"./UnderlineNav-C2aEVraN.js";import"./_rollupPluginBabelHelpers-DsEzE6Ab.js";import"@radix-ui/react-tabs";import"lucide-react";var N="hwgsk4h",w="i1b95bxl",y="i1a3fa93",R="i1dl7ywj";function J(e){var a=e.children,r=t(e,["children"]);return u.createElement("a",Object.assign({},r),a)}function A(e){return u.createElement("div",{className:N},e.items.map((function(a,t){var r=t===e.items.length-1;return u.createElement(v,{key:a.href+a.title},t>0&&u.createElement(E,{className:w}),u.createElement("div",{className:"\n ".concat(y,"\n ").concat(r&&R,"\n "),title:a.title},a.href&&!r?u.createElement(J,{href:a.href},a.title):a.title))})))}var O="h1xhrk1",Q="l1elq7ab",_="i1mmatje";function F(e){var a=e.children,r=t(e,["children"]);return u.createElement("a",Object.assign({},r),a)}function L(e){return u.createElement("div",{className:O},e.prev?u.createElement(F,{href:e.prev.href,title:e.prev.title,className:Q},u.createElement(x,{className:_}),e.prev.title):u.createElement("div",null),e.next&&u.createElement(F,{href:e.next.href,title:e.next.title,className:Q},e.next.title,u.createElement(E,{className:_})))}var M="h1vb39qj";function P(e){var a=e.children;return u.createElement("pre",{className:M},a)}export{A as Breadcrumbs,L as NavLinks,P as Pre};
1
+ export{A as Anchor,c as Banner,B as Button,G as GuideCard,L as List,a as ListOl,S as Steps,T as Table,b as Tabs,U as UnderlineNav,V as VideoGuide}from"./VideoGuide-BUyomFVz.js";export{b as Badge,B as Blockquote,c as Callout,e as Card,C as Code,a as ColorSchemeButton,D as Details,d as Heading,H as Hr,I as Image,U as Update,u as useColorScheme}from"./Update-0XruJHjj.js";import{a as t}from"./tslib.es6-Hqk-Mdr9.js";import r,{Fragment as n}from"react";import{I as l}from"./Icon-xNucOqd2.js";export{a as IconProvider}from"./Icon-xNucOqd2.js";export{T as Text}from"./Text-DKycD2zu.js";import"./_rollupPluginBabelHelpers-DZ-ucadG.js";import"radix-ui";import"lucide-react";function i(){return r.createElement("div",null,"TODO")}function s(e){var a=e.children,n=t(e,["children"]);return r.createElement("a",Object.assign({},n),a)}function o(e){var t=e.className,a=e.items;return r.createElement("xyd-breadcrumbs",{className:"".concat("bwgsk4h"," ").concat(t||"")},a.map(function(e,t){var l=t===a.length-1;return r.createElement(n,{key:e.href+e.title},t>0&&r.createElement(i,{part:"icon"}),r.createElement("div",{part:"item","data-active":l?"true":"false"},e.href&&!l?r.createElement(s,{href:e.href},e.title):e.title))}))}function m(e){var t=e.as||p;return r.createElement("xyd-navlinks",{className:"".concat("n1xhrk1"," ").concat(e.className||"")},e.prev?r.createElement(t,{href:e.prev.href,title:e.prev.title,part:"link"},r.createElement(h,{part:"icon"}),e.prev.title):r.createElement("div",null),e.next&&r.createElement(t,{href:e.next.href,title:e.next.title,part:"link"},e.next.title,r.createElement(f,{part:"icon"})))}function p(e){var a=e.children,n=t(e,["children"]);return r.createElement("a",Object.assign({},n),a)}function f(e){return r.createElement("svg",Object.assign({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r.createElement("path",{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",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function h(e){return r.createElement("svg",Object.assign({width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r.createElement("path",{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",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function v(e){var t=e.children,a=e.className;return r.createElement("pre",{className:"".concat("p1vb39qj"," ").concat(a||"")},t)}var E="TocCard-module_TocCardHost__pT0XJ";function g(e){var t=e.title,a=e.description,n=e.href,c=e.className,i=e.icon,s=e.as||x;return r.createElement("xyd-toccard",{className:"".concat(E," ").concat(c||"")},r.createElement("div",{part:"container"},r.createElement(s,{part:"link",href:n,target:"_blank",rel:"noreferrer"},r.createElement("div",{part:"title-container"},r.createElement("div",{part:"title"},t),i&&r.createElement(l,{name:i,size:16})),r.createElement("div",{part:"description"},a))))}function x(e){var a=e.children,n=e.href,l=t(e,["children","href"]);return r.createElement("a",Object.assign({href:n},l),a)}export{o as Breadcrumbs,l as Icon,m as NavLinks,v as Pre,g as TocCard};
2
2
  //# sourceMappingURL=writer.js.map