@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.
- package/.idea/git_toolbox_blame.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/xyd-components.iml +12 -0
- package/CHANGELOG.md +718 -0
- package/LICENSE +21 -0
- package/TODO.md +1 -0
- package/content.ts +0 -2
- package/dist/CTABanner-Bc77pnms.js +2 -0
- package/dist/CTABanner-Bc77pnms.js.map +1 -0
- package/dist/CTABanner-DzO62aGj.js +2 -0
- package/dist/CTABanner-DzO62aGj.js.map +1 -0
- package/dist/CodeSample-BWPDgd2G.js +2 -0
- package/dist/CodeSample-BWPDgd2G.js.map +1 -0
- package/dist/CodeSample-DLnR-knP.js +2 -0
- package/dist/CodeSample-DLnR-knP.js.map +1 -0
- package/dist/HomeView-C8QlNdKh.js +2 -0
- package/dist/HomeView-C8QlNdKh.js.map +1 -0
- package/dist/HomeView-ZAP5saNy.js +2 -0
- package/dist/HomeView-ZAP5saNy.js.map +1 -0
- package/dist/Icon-BESh23UN.js +2 -0
- package/dist/Icon-BESh23UN.js.map +1 -0
- package/dist/Icon-xNucOqd2.js +2 -0
- package/dist/Icon-xNucOqd2.js.map +1 -0
- package/dist/Text-CfN9RkYA.js +2 -0
- package/dist/Text-CfN9RkYA.js.map +1 -0
- package/dist/Text-DKycD2zu.js +2 -0
- package/dist/Text-DKycD2zu.js.map +1 -0
- package/dist/Update-0XruJHjj.js +2 -0
- package/dist/Update-0XruJHjj.js.map +1 -0
- package/dist/Update-DKOAw8p9.js +2 -0
- package/dist/Update-DKOAw8p9.js.map +1 -0
- package/dist/VideoGuide-BUyomFVz.js +2 -0
- package/dist/VideoGuide-BUyomFVz.js.map +1 -0
- package/dist/VideoGuide-B_iUKKv7.js +2 -0
- package/dist/VideoGuide-B_iUKKv7.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-CxSUtGup.js +4 -0
- package/dist/_rollupPluginBabelHelpers-CxSUtGup.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js +4 -0
- package/dist/_rollupPluginBabelHelpers-DZ-ucadG.js.map +1 -0
- package/dist/brand.d.ts +9 -9
- package/dist/brand.js +1 -1
- package/dist/brand.js.map +1 -1
- package/dist/coder/themes/cosmo-light.js.map +1 -1
- package/dist/coder.d.ts +29 -9
- package/dist/coder.js +1 -1
- package/dist/coder.js.map +1 -1
- package/dist/content.d.ts +268 -204
- package/dist/content.js +1 -1
- package/dist/content.js.map +1 -1
- package/dist/index.css +267 -216
- package/dist/layouts.d.ts +20 -21
- package/dist/layouts.js +1 -1
- package/dist/layouts.js.map +1 -1
- package/dist/pages.js +1 -1
- package/dist/pages.js.map +1 -1
- package/dist/system.d.ts +10 -0
- package/dist/system.js +2 -0
- package/dist/system.js.map +1 -0
- package/dist/tslib.es6-DyL9kPq9.js +2 -0
- package/dist/{tslib.es6-DDIOdJiV.js.map → tslib.es6-DyL9kPq9.js.map} +1 -1
- package/dist/tslib.es6-Hqk-Mdr9.js +2 -0
- package/dist/{tslib.es6-DUrRPhZd.js.map → tslib.es6-Hqk-Mdr9.js.map} +1 -1
- package/dist/views.js +1 -1
- package/dist/writer.d.ts +411 -78
- package/dist/writer.js +1 -1
- package/dist/writer.js.map +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1640 -0
- package/docs/functions/GuideCard.html +6 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +2 -0
- package/docs/interfaces/GuideCardProps.html +18 -0
- package/docs/modules.html +1 -0
- package/index.ts +0 -1
- package/package.json +13 -18
- package/project.json +677 -0
- package/rollup.config.js +32 -3
- package/src/brand/Button/Button.styles.tsx +28 -0
- package/src/brand/Button/Button.tsx +3 -35
- package/src/brand/CTABanner/CTABanner.styles.tsx +80 -0
- package/src/brand/CTABanner/CTABanner.tsx +34 -112
- package/src/brand/Footer/Footer.styles.tsx +18 -0
- package/src/brand/Footer/Footer.tsx +4 -24
- package/src/brand/TODO.md +1 -0
- package/src/coder/Code/Code.styles.tsx +134 -35
- package/src/coder/Code/Code.tsx +131 -40
- package/src/coder/Code/CodeLoader.tsx +4 -4
- package/src/coder/Code/annotations.tsx +28 -8
- package/src/coder/Code/highlight.ts +38 -0
- package/src/coder/Code/index.ts +2 -1
- package/src/coder/CodeCopy/{CodeCopy.style.tsx → CodeCopy.styles.tsx} +6 -6
- package/src/coder/CodeCopy/CodeCopy.tsx +6 -6
- package/src/coder/CodeSample/CodeSample.tsx +83 -27
- package/src/coder/CodeTabs/CodeTabs.styles.tsx +99 -78
- package/src/coder/CodeTabs/CodeTabs.tsx +71 -56
- package/src/coder/CodeTheme/CodeTheme.tsx +89 -49
- package/src/coder/CodeTheme/index.ts +0 -1
- package/src/coder/CoderProvider.tsx +26 -0
- package/src/coder/index.ts +8 -4
- package/src/content/ContentDecoator.styles.tsx +113 -0
- package/src/content/ContentDecorator.tsx +17 -0
- package/src/content/GridDecorator.styles.tsx +67 -0
- package/src/content/GridDecorator.tsx +21 -0
- package/src/content/ReactContent.tsx +575 -0
- package/src/content/index.ts +10 -2
- package/src/icons/index.ts +0 -0
- package/src/kit/Loader/Loader.styles.tsx +53 -0
- package/src/kit/Loader/Loader.tsx +22 -0
- package/src/kit/TODO.md +2 -0
- package/src/kit/index.ts +1 -0
- package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +263 -278
- package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +173 -96
- package/src/layouts/LayoutPrimary/index.ts +0 -2
- package/src/layouts/index.ts +0 -7
- package/src/pages/HomePage/HomePage.styles.tsx +16 -0
- package/src/pages/HomePage/HomePage.tsx +7 -21
- package/src/pages/TODO.md +1 -0
- package/src/system/SearchButton/SearchButton.styles.tsx +86 -0
- package/src/system/SearchButton/SearchButton.tsx +116 -0
- package/src/system/SearchButton/index.ts +1 -0
- package/src/system/index.ts +1 -0
- package/src/utils/useStyle.ts +19 -0
- package/src/views/HomeView/HomeView.styles.tsx +37 -0
- package/src/views/HomeView/HomeView.tsx +5 -45
- package/src/views/TODO.md +1 -0
- package/src/writer/Anchor/Anchor.styles.tsx +11 -0
- package/src/writer/Anchor/Anchor.tsx +51 -0
- package/src/writer/Anchor/index.tsx +1 -0
- package/src/writer/Badge/Badge.styles.tsx +39 -28
- package/src/writer/Badge/Badge.tsx +37 -20
- package/src/writer/Banner/Banner.styles.tsx +91 -0
- package/src/writer/Banner/Banner.tsx +70 -0
- package/src/writer/Banner/index.ts +1 -0
- package/src/writer/Blockquote/Blockquote.styles.tsx +4 -4
- package/src/writer/Blockquote/Blockquote.tsx +6 -3
- package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +22 -21
- package/src/writer/Breadcrumbs/Breadcrumbs.tsx +19 -13
- package/src/writer/Button/Button.styles.tsx +137 -0
- package/src/writer/Button/Button.tsx +75 -0
- package/src/writer/Button/index.ts +2 -0
- package/src/writer/Callout/Callout.styles.tsx +29 -40
- package/src/writer/Callout/Callout.tsx +31 -16
- package/src/writer/Card/Card.styles.tsx +47 -0
- package/src/writer/Card/Card.tsx +69 -0
- package/src/writer/Card/index.ts +1 -0
- package/src/writer/Code/Code.styles.tsx +10 -11
- package/src/writer/Code/Code.tsx +7 -4
- package/src/writer/ColorSchemeButton/ColorSchemeButton.tsx +172 -0
- package/src/writer/ColorSchemeButton/index.ts +1 -0
- package/src/writer/Details/Details.styles.tsx +84 -84
- package/src/writer/Details/Details.tsx +71 -51
- package/src/writer/Example/index.tsx +5 -0
- package/src/writer/GuideCard/GuideCard.styles.tsx +108 -107
- package/src/writer/GuideCard/GuideCard.tsx +72 -37
- package/src/writer/Heading/Heading.styles.tsx +69 -49
- package/src/writer/Heading/Heading.tsx +92 -22
- package/src/writer/Hr/Hr.styles.tsx +5 -5
- package/src/writer/Hr/Hr.tsx +3 -6
- package/src/writer/Icon/Icon.tsx +48 -0
- package/src/writer/Icon/index.ts +1 -0
- package/src/writer/Image/Image.styles.tsx +9 -0
- package/src/writer/Image/Image.tsx +19 -0
- package/src/writer/Image/index.ts +1 -0
- package/src/writer/List/List.styles.tsx +47 -0
- package/src/writer/List/List.tsx +29 -0
- package/src/writer/List/index.ts +4 -0
- package/src/writer/NavLinks/NavLinks.styles.ts +23 -24
- package/src/writer/NavLinks/NavLinks.tsx +66 -19
- package/src/writer/Pre/Pre.styles.tsx +5 -5
- package/src/writer/Pre/Pre.tsx +4 -3
- package/src/writer/Steps/Steps.styles.tsx +14 -12
- package/src/writer/Steps/Steps.tsx +39 -10
- package/src/writer/Table/Table.styles.tsx +62 -30
- package/src/writer/Table/Table.tsx +121 -11
- package/src/writer/Table/index.ts +0 -11
- package/src/writer/Tabs/Tabs.styles.tsx +63 -70
- package/src/writer/Tabs/Tabs.tsx +31 -29
- package/src/writer/Text/Text.styles.tsx +66 -0
- package/src/writer/Text/Text.tsx +79 -0
- package/src/writer/Text/index.ts +3 -0
- package/src/writer/TocCard/TocCard.module.css +44 -0
- package/src/writer/TocCard/TocCard.tsx +42 -0
- package/src/writer/TocCard/index.ts +3 -0
- package/src/writer/UnderlineNav/Tabs.tsx +51 -0
- package/src/writer/UnderlineNav/TabsPrimary.styles.tsx +184 -0
- package/src/writer/UnderlineNav/TabsPrimary.tsx +209 -0
- package/src/writer/UnderlineNav/TabsSecondary.styles.tsx +77 -0
- package/src/writer/UnderlineNav/TabsSecondary.tsx +171 -0
- package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +181 -45
- package/src/writer/UnderlineNav/UnderlineNav.tsx +258 -23
- package/src/writer/UnderlineNav/index.ts +2 -1
- package/src/writer/UnderlineNav/useValueChange.ts +60 -0
- package/src/writer/Update/Update.styles.tsx +33 -0
- package/src/writer/Update/Update.tsx +37 -0
- package/src/writer/Update/index.ts +1 -0
- package/src/writer/VideoGuide/VideoGuide.module.css +105 -0
- package/src/writer/VideoGuide/VideoGuide.tsx +75 -0
- package/src/writer/VideoGuide/index.ts +1 -0
- package/src/writer/index.ts +23 -1
- package/tsconfig.json +11 -6
- package/types.d.ts +50 -0
- package/writer.ts +1 -1
- package/dist/CTABanner-BrdYlhnD.js +0 -2
- package/dist/CTABanner-BrdYlhnD.js.map +0 -1
- package/dist/CTABanner-XQNnnpUx.js +0 -2
- package/dist/CTABanner-XQNnnpUx.js.map +0 -1
- package/dist/CodeSample-Cp42Adjc.js +0 -2
- package/dist/CodeSample-Cp42Adjc.js.map +0 -1
- package/dist/CodeSample-DxPp80ID.js +0 -2
- package/dist/CodeSample-DxPp80ID.js.map +0 -1
- package/dist/HomeView-BN9mZXh9.js +0 -2
- package/dist/HomeView-BN9mZXh9.js.map +0 -1
- package/dist/HomeView-BVaaV0uE.js +0 -2
- package/dist/HomeView-BVaaV0uE.js.map +0 -1
- package/dist/UnderlineNav-Bs7Ot9Ch.js +0 -2
- package/dist/UnderlineNav-Bs7Ot9Ch.js.map +0 -1
- package/dist/UnderlineNav-C2aEVraN.js +0 -2
- package/dist/UnderlineNav-C2aEVraN.js.map +0 -1
- package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js +0 -2
- package/dist/_rollupPluginBabelHelpers-BMmCG_qQ.js.map +0 -1
- package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js +0 -2
- package/dist/_rollupPluginBabelHelpers-DsEzE6Ab.js.map +0 -1
- package/dist/index-BVUz77Tm.js +0 -2
- package/dist/index-BVUz77Tm.js.map +0 -1
- package/dist/index-jxd3nv2J.js +0 -2
- package/dist/index-jxd3nv2J.js.map +0 -1
- package/dist/tslib.es6-DDIOdJiV.js +0 -2
- package/dist/tslib.es6-DUrRPhZd.js +0 -2
- package/src/content/Anchor/Anchor.tsx +0 -63
- package/src/content/Anchor/index.tsx +0 -3
- package/src/content/Content/Content.tsx +0 -21
- package/src/content/Content/index.tsx +0 -3
- package/src/content/Content.tsx +0 -180
- package/src/content/Subtitle/Subtitle.tsx +0 -21
- package/src/content/Subtitle/index.tsx +0 -3
- package/src/layouts/Layout.styles.tsx +0 -151
- package/src/layouts/Layout.tsx +0 -121
- package/src/ui/Loader/Loader.styles.tsx +0 -52
- package/src/ui/Loader/Loader.tsx +0 -26
- package/src/ui/index.ts +0 -1
- package/src/writer/Icon/index.tsx +0 -355
- package/src/writer/Table/TableV2.styles.tsx +0 -117
- package/src/writer/Table/TableV2.tsx +0 -83
package/rollup.config.js
CHANGED
|
@@ -6,19 +6,19 @@ import resolve from '@rollup/plugin-node-resolve';
|
|
|
6
6
|
import commonjs from '@rollup/plugin-commonjs';
|
|
7
7
|
import typescript from '@rollup/plugin-typescript';
|
|
8
8
|
import dts from 'rollup-plugin-dts';
|
|
9
|
-
import {terser} from 'rollup-plugin-terser';
|
|
9
|
+
import { terser } from 'rollup-plugin-terser';
|
|
10
10
|
import babel from '@rollup/plugin-babel';
|
|
11
11
|
import postcss from 'rollup-plugin-postcss';
|
|
12
12
|
import wyw from '@wyw-in-js/rollup';
|
|
13
13
|
|
|
14
|
-
import {createRequire} from 'module';
|
|
14
|
+
import { createRequire } from 'module';
|
|
15
15
|
|
|
16
16
|
const require = createRequire(import.meta.url);
|
|
17
17
|
const {
|
|
18
18
|
dependencies,
|
|
19
19
|
peerDependencies,
|
|
20
20
|
devDependencies
|
|
21
|
-
} = require('./package.json', {assert: {type: 'json'}});
|
|
21
|
+
} = require('./package.json', { assert: { type: 'json' } });
|
|
22
22
|
|
|
23
23
|
const external = [
|
|
24
24
|
...Object.keys(dependencies),
|
|
@@ -47,6 +47,7 @@ export default [
|
|
|
47
47
|
pages: 'src/pages/index.ts',
|
|
48
48
|
views: 'src/views/index.ts',
|
|
49
49
|
writer: 'writer.ts',
|
|
50
|
+
system: 'src/system/index.ts',
|
|
50
51
|
...themes
|
|
51
52
|
},
|
|
52
53
|
output: [
|
|
@@ -66,6 +67,25 @@ export default [
|
|
|
66
67
|
'@babel/preset-react'
|
|
67
68
|
],
|
|
68
69
|
},
|
|
70
|
+
// classNameSlug: (hash, title, {file}) => {
|
|
71
|
+
// // Get the full path after 'src/components/'
|
|
72
|
+
// const pathParts = file.split('/');
|
|
73
|
+
// const componentsIndex = pathParts.indexOf('src');
|
|
74
|
+
// if (componentsIndex === -1) return `XydComponents-Component-${title}`;
|
|
75
|
+
|
|
76
|
+
// // Get everything after 'components' directory
|
|
77
|
+
// const componentPath = pathParts
|
|
78
|
+
// .slice(componentsIndex + 1)
|
|
79
|
+
// .filter(part => !part.endsWith('.styles.tsx')) // Remove styles.tsx
|
|
80
|
+
// .join('-');
|
|
81
|
+
|
|
82
|
+
// // Use the title as the style name (it's already the variable name)
|
|
83
|
+
// const styleName = title.replace(/^\$/, ''); // Remove $ prefix if present
|
|
84
|
+
|
|
85
|
+
// // TODO: in the future hash + system to override styles for specific components if hash
|
|
86
|
+
// return `XydComponents-Component-${componentPath}__${styleName}`;
|
|
87
|
+
// // return `XydComponents-Component-${componentPath}__${styleName}_${hash}`;
|
|
88
|
+
// }
|
|
69
89
|
}),
|
|
70
90
|
postcss({
|
|
71
91
|
extract: true,
|
|
@@ -163,6 +183,15 @@ export default [
|
|
|
163
183
|
plugins: [dts()],
|
|
164
184
|
external
|
|
165
185
|
},
|
|
186
|
+
{
|
|
187
|
+
input: 'src/system/index.ts',
|
|
188
|
+
output: {
|
|
189
|
+
file: 'dist/system.d.ts',
|
|
190
|
+
format: 'es',
|
|
191
|
+
},
|
|
192
|
+
plugins: [dts()],
|
|
193
|
+
external
|
|
194
|
+
},
|
|
166
195
|
...Object.keys(themes).map(theme => ({
|
|
167
196
|
input: themes[theme],
|
|
168
197
|
output: {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const ButtonHost = css`
|
|
4
|
+
display: inline-block;
|
|
5
|
+
border: 1px solid transparent;
|
|
6
|
+
text-align: center;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
border-radius: 20px;
|
|
9
|
+
padding: 0 20px;
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
color: #3c3c43;
|
|
12
|
+
background-color: #f7f7f8;
|
|
13
|
+
|
|
14
|
+
transition: color .25s, border-color .25s, background-color .25s;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
background: #e3e3e6;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const ButtonHostSecondary = css`
|
|
22
|
+
color: #fff;
|
|
23
|
+
background-color: rgb(112, 81, 212);
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: rgb(95, 59, 211)
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
@@ -1,37 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const $button = {
|
|
5
|
-
host: css`
|
|
6
|
-
display: inline-block;
|
|
7
|
-
border: 1px solid transparent;
|
|
8
|
-
text-align: center;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
border-radius: 20px;
|
|
12
|
-
padding: 0 20px;
|
|
13
|
-
line-height: 38px;
|
|
14
|
-
font-size: 14px;
|
|
15
|
-
border-color: transparent;
|
|
16
|
-
color: #3c3c43;
|
|
17
|
-
background-color: #f7f7f8;
|
|
18
|
-
|
|
19
|
-
transition: color .25s, border-color .25s, background-color .25s;
|
|
20
|
-
|
|
21
|
-
&:hover {
|
|
22
|
-
background: #e3e3e6;
|
|
23
|
-
}
|
|
24
|
-
`,
|
|
25
|
-
|
|
26
|
-
host$$secondary: css`
|
|
27
|
-
color: #fff;
|
|
28
|
-
background-color: rgb(112, 81, 212);
|
|
29
|
-
|
|
30
|
-
&:hover {
|
|
31
|
-
background-color: rgb(95, 59, 211)
|
|
32
|
-
}
|
|
33
|
-
`
|
|
34
|
-
}
|
|
2
|
+
import * as cn from "./Button.styles";
|
|
35
3
|
|
|
36
4
|
export interface ButtonProps {
|
|
37
5
|
children: React.ReactNode
|
|
@@ -40,8 +8,8 @@ export interface ButtonProps {
|
|
|
40
8
|
|
|
41
9
|
export function Button({children, kind}: ButtonProps) {
|
|
42
10
|
return <button className={`
|
|
43
|
-
${
|
|
44
|
-
${kind === "secondary" &&
|
|
11
|
+
${cn.ButtonHost}
|
|
12
|
+
${kind === "secondary" && cn.ButtonHostSecondary}
|
|
45
13
|
`}>
|
|
46
14
|
{children}
|
|
47
15
|
</button>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const CTABannerHost = css`
|
|
4
|
+
padding: 20px;
|
|
5
|
+
`;
|
|
6
|
+
|
|
7
|
+
export const CTABannerContainer = css`
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
gap: 80px;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
export const CTABannerHero = css`
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 40px;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const CTABannerHeadingEffect = css`
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
|
|
28
|
+
background: -webkit-linear-gradient(
|
|
29
|
+
120deg,
|
|
30
|
+
var(--headingEffect-color-tertiary) 20%,
|
|
31
|
+
var(--headingEffect-color-tertiary) 30%,
|
|
32
|
+
var(--headingEffect-color-secondary) 60%,
|
|
33
|
+
var(--headingEffect-color-primary) 75%,
|
|
34
|
+
var(--headingEffect-color-primary) 85%
|
|
35
|
+
);
|
|
36
|
+
background-clip: text;
|
|
37
|
+
-webkit-text-fill-color: transparent;
|
|
38
|
+
animation: wave 5s infinite;
|
|
39
|
+
background-size: 200% 200%;
|
|
40
|
+
background-position: 50% 50%; // Start with all colors visible
|
|
41
|
+
|
|
42
|
+
@keyframes wave {
|
|
43
|
+
0% {
|
|
44
|
+
background-position: 50% 50%;
|
|
45
|
+
}
|
|
46
|
+
50% {
|
|
47
|
+
background-position: 0% 50%;
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
background-position: 50% 50%;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
export const CTABannerHeadingHost = css`
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
export const CTABannerHeadingTitle = css`
|
|
63
|
+
font-weight: var(--xyd-font-weight-black);
|
|
64
|
+
text-align: center;
|
|
65
|
+
letter-spacing: 3px;
|
|
66
|
+
margin: 0;
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
export const CTABannerHeadingSubtitle = css`
|
|
70
|
+
color: #3c3c43;
|
|
71
|
+
font-weight: var(--xyd-font-weight-semibold);
|
|
72
|
+
text-align: center;
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
export const CTABannerButtonGroupHost = css`
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
gap: 10px;
|
|
80
|
+
`;
|
|
@@ -1,127 +1,49 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as cn from "./CTABanner.styles";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`,
|
|
8
|
-
container: css`
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
gap: 80px;
|
|
13
|
-
`,
|
|
14
|
-
hero: css`
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
gap: 40px;
|
|
20
|
-
`,
|
|
21
|
-
headingEffect: css`
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
|
|
27
|
-
background: -webkit-linear-gradient(
|
|
28
|
-
120deg,
|
|
29
|
-
var(--headingEffect-color-tertiary) 20%,
|
|
30
|
-
var(--headingEffect-color-tertiary) 30%,
|
|
31
|
-
var(--headingEffect-color-secondary) 60%,
|
|
32
|
-
var(--headingEffect-color-primary) 75%,
|
|
33
|
-
var(--headingEffect-color-primary) 85%
|
|
34
|
-
);
|
|
35
|
-
background-clip: text;
|
|
36
|
-
-webkit-text-fill-color: transparent;
|
|
37
|
-
animation: wave 5s infinite;
|
|
38
|
-
background-size: 200% 200%;
|
|
39
|
-
background-position: 50% 50%; // Start with all colors visible
|
|
4
|
+
export interface CTABannerProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
40
7
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
50% {
|
|
46
|
-
background-position: 0% 50%;
|
|
47
|
-
}
|
|
48
|
-
100% {
|
|
49
|
-
background-position: 50% 50%;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`
|
|
8
|
+
export interface CTABannerHeadingProps {
|
|
9
|
+
title: string;
|
|
10
|
+
subtitle: string;
|
|
53
11
|
}
|
|
54
12
|
|
|
55
|
-
export interface
|
|
56
|
-
children: React.ReactNode
|
|
13
|
+
export interface CTABannerButtonGroupProps {
|
|
14
|
+
children: React.ReactNode;
|
|
57
15
|
}
|
|
58
16
|
|
|
59
17
|
export function CTABanner({children}: CTABannerProps) {
|
|
60
|
-
return
|
|
61
|
-
<div className={
|
|
62
|
-
<div className={
|
|
63
|
-
{
|
|
18
|
+
return (
|
|
19
|
+
<div className={cn.CTABannerHost}>
|
|
20
|
+
<div className={cn.CTABannerContainer}>
|
|
21
|
+
<div className={cn.CTABannerHero}>
|
|
22
|
+
{children}
|
|
23
|
+
</div>
|
|
64
24
|
</div>
|
|
65
25
|
</div>
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const $heading = {
|
|
70
|
-
host: css`
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
flex-direction: column;
|
|
75
|
-
`,
|
|
76
|
-
title: css`
|
|
77
|
-
font-size: 76px;
|
|
78
|
-
font-weight: 900;
|
|
79
|
-
text-align: center;
|
|
80
|
-
letter-spacing: 3px;
|
|
81
|
-
margin: 0;
|
|
82
|
-
`,
|
|
83
|
-
subtitle: css`
|
|
84
|
-
color: #3c3c43;
|
|
85
|
-
font-size: 46px;
|
|
86
|
-
font-weight: 600;
|
|
87
|
-
text-align: center;
|
|
88
|
-
`
|
|
26
|
+
);
|
|
89
27
|
}
|
|
90
28
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
headingEffect
|
|
102
|
-
? <span className={$banner.headingEffect}>
|
|
103
|
-
{title}
|
|
104
|
-
</span>
|
|
105
|
-
: title
|
|
106
|
-
}
|
|
107
|
-
</h1>
|
|
108
|
-
<p className={$heading.subtitle}>
|
|
109
|
-
{subtitle}
|
|
110
|
-
</p>
|
|
111
|
-
</div>
|
|
29
|
+
function Heading({title, subtitle}: CTABannerHeadingProps) {
|
|
30
|
+
return (
|
|
31
|
+
<div className={cn.CTABannerHeadingHost}>
|
|
32
|
+
<div className={cn.CTABannerHeadingEffect}>
|
|
33
|
+
<h1 className={cn.CTABannerHeadingTitle}>{title}</h1>
|
|
34
|
+
</div>
|
|
35
|
+
<h2 className={cn.CTABannerHeadingSubtitle}>{subtitle}</h2>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
112
38
|
}
|
|
113
39
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
`
|
|
40
|
+
function ButtonGroup({children}: CTABannerButtonGroupProps) {
|
|
41
|
+
return (
|
|
42
|
+
<div className={cn.CTABannerButtonGroupHost}>
|
|
43
|
+
{children}
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
121
46
|
}
|
|
122
47
|
|
|
123
|
-
CTABanner.
|
|
124
|
-
|
|
125
|
-
{children}
|
|
126
|
-
</div>
|
|
127
|
-
}
|
|
48
|
+
CTABanner.Heading = Heading;
|
|
49
|
+
CTABanner.ButtonGroup = ButtonGroup;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const FooterHost = css`
|
|
4
|
+
position: relative;
|
|
5
|
+
border-top: 1px solid #f0f0f0;
|
|
6
|
+
padding: 32px;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export const FooterContainer = css`
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
max-width: 1200px;
|
|
13
|
+
text-align: center;
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const FooterTextContainer = css`
|
|
17
|
+
color: rgba(60, 60, 67, .78);
|
|
18
|
+
`;
|
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const $footer = {
|
|
5
|
-
host: css`
|
|
6
|
-
position: relative;
|
|
7
|
-
border-top: 1px solid #f0f0f0;
|
|
8
|
-
padding: 32px;
|
|
9
|
-
background-color: #fff;
|
|
10
|
-
`,
|
|
11
|
-
container: css`
|
|
12
|
-
margin: 0 auto;
|
|
13
|
-
max-width: 1200px;
|
|
14
|
-
text-align: center;
|
|
15
|
-
`,
|
|
16
|
-
textContainer: css`
|
|
17
|
-
line-height: 24px;
|
|
18
|
-
font-size: 14px;
|
|
19
|
-
font-weight: 500;
|
|
20
|
-
color: rgba(60, 60, 67, .78);
|
|
21
|
-
`
|
|
22
|
-
}
|
|
2
|
+
import * as cn from "./Footer.styles";
|
|
23
3
|
|
|
24
4
|
export interface FooterProps {
|
|
25
5
|
children?: React.ReactNode
|
|
26
6
|
}
|
|
27
7
|
|
|
28
8
|
export function Footer({children}: FooterProps) {
|
|
29
|
-
return <footer className={
|
|
30
|
-
<div className={
|
|
31
|
-
<div className={
|
|
9
|
+
return <footer className={cn.FooterHost}>
|
|
10
|
+
<div className={cn.FooterContainer}>
|
|
11
|
+
<div className={cn.FooterTextContainer}>
|
|
32
12
|
{children}
|
|
33
13
|
</div>
|
|
34
14
|
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DELETE `brand`
|
|
@@ -1,50 +1,149 @@
|
|
|
1
|
-
import {css} from "@linaria/core";
|
|
1
|
+
import { css } from "@linaria/core";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
3
|
+
export const LineNumberHost = css`
|
|
4
|
+
@layer defaults {
|
|
5
|
+
display: flex;
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
[part="line-number"] {
|
|
9
|
+
/* margin: 0 12px 0px 4px; */
|
|
10
|
+
width: 25px;
|
|
11
|
+
left: -15px;
|
|
12
|
+
position: absolute;
|
|
13
|
+
margin: 0;
|
|
14
|
+
text-align: right;
|
|
15
|
+
user-select: none;
|
|
16
|
+
opacity: 0.5;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const MarkHost = css`
|
|
22
|
+
@layer defaults {
|
|
5
23
|
display: flex;
|
|
6
24
|
border-left-width: 4px;
|
|
7
25
|
border-color: transparent;
|
|
8
26
|
margin: 4px 0;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
|
|
28
|
+
&[data-annotated="true"] {
|
|
29
|
+
border-color: var(--xyd-coder-code-mark-border-color);
|
|
30
|
+
background-color: var(--xyd-coder-code-mark-bgcolor);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&[data-diff="true"] {
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
&[data-query="-"] {
|
|
37
|
+
border-color: var(--xyd-text-color--error--active);
|
|
38
|
+
background-color: var(--xyd-text-color--error--muted);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-query="+"] {
|
|
42
|
+
border-color: var(--xyd-text-color--success--active);
|
|
43
|
+
background-color: var(--xyd-text-color--success--muted);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > :first-child {
|
|
47
|
+
position: absolute;
|
|
48
|
+
left: 5px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[part="line"] {
|
|
53
|
+
flex: 1 1 0%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
xyd-code-linenumber [part="line"]{
|
|
57
|
+
position: relative;
|
|
58
|
+
left: 25px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
export const MarkInlineHost = css`
|
|
64
|
+
@layer defaults {
|
|
65
|
+
display: inline-block;
|
|
66
|
+
|
|
67
|
+
outline: solid 1px var(--xyd-coder-code-mark-border-color);
|
|
68
|
+
background: var(--xyd-coder-code-mark-bgcolor);
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
&[data-diff="true"] {
|
|
72
|
+
&[data-query="-"] {
|
|
73
|
+
border-color: var(--xyd-text-color--error--active);
|
|
74
|
+
background-color: var(--xyd-text-color--error--muted);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[data-query="+"] {
|
|
78
|
+
border-color: var(--xyd-text-color--success--active);
|
|
79
|
+
background-color: var(--xyd-text-color--success--muted);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`
|
|
84
|
+
|
|
85
|
+
export const BgHost = css`
|
|
86
|
+
@layer defaults {
|
|
87
|
+
&[data-annotated="true"] {
|
|
88
|
+
border-color: var(--xyd-coder-code-mark-border-color);
|
|
89
|
+
background-color: var(--xyd-coder-code-mark-bgcolor);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`
|
|
93
|
+
|
|
94
|
+
export const CodeHost = css`
|
|
95
|
+
@layer defaults {
|
|
30
96
|
max-height: 400px;
|
|
31
|
-
background:
|
|
97
|
+
background: var(--xyd-coder-code-background); // cuz can be overwritten by style - better solution in the future?
|
|
32
98
|
|
|
33
99
|
margin: 0;
|
|
34
100
|
padding: 8px 16px;
|
|
35
101
|
|
|
36
|
-
border-top: 1px solid
|
|
37
|
-
|
|
38
|
-
|
|
102
|
+
border-top: 1px solid var(--xyd-coder-code-border-color);
|
|
103
|
+
|
|
104
|
+
&:not(:has(+ [part="code-description"])) {
|
|
105
|
+
border-bottom-left-radius: 10px;
|
|
106
|
+
border-bottom-right-radius: 10px;
|
|
107
|
+
}
|
|
39
108
|
|
|
40
|
-
font-size: 12px;
|
|
41
|
-
line-height: 20px;
|
|
42
109
|
white-space: pre-wrap;
|
|
43
110
|
word-break: break-all;
|
|
44
111
|
|
|
45
112
|
overflow-y: scroll;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
113
|
+
|
|
114
|
+
&[data-size="full"] {
|
|
115
|
+
max-height: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
& > div {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
export const CodeDescription = css`
|
|
125
|
+
padding: 17px 20px 10px;
|
|
126
|
+
background-color: var(--white);
|
|
127
|
+
border-radius: 0 0 8px 7px;
|
|
128
|
+
display: flex;
|
|
129
|
+
gap: 12px;
|
|
130
|
+
align-items: flex-start;
|
|
131
|
+
color: var(--text-primary);
|
|
132
|
+
|
|
133
|
+
& > div:first-child {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
padding-top: 5px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
& > div:last-child {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
gap: 4px;
|
|
143
|
+
|
|
144
|
+
> span {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`
|