@xyd-js/components 0.1.0-xyd.7 → 0.1.0-xyd.8
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/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/dist/CTABanner-4FVIoaTR.js +2 -0
- package/dist/CTABanner-4FVIoaTR.js.map +1 -0
- package/dist/CTABanner-C6afsXoE.js +2 -0
- package/dist/CTABanner-C6afsXoE.js.map +1 -0
- package/dist/CTABanner-CEKs-Hb-.js +2 -0
- package/dist/CTABanner-CEKs-Hb-.js.map +1 -0
- package/dist/CTABanner-CUNcTr6s.js +2 -0
- package/dist/CTABanner-CUNcTr6s.js.map +1 -0
- package/dist/CTABanner-D02aIAsD.js +2 -0
- package/dist/CTABanner-D02aIAsD.js.map +1 -0
- package/dist/CTABanner-Dm3tUG3I.js +2 -0
- package/dist/CTABanner-Dm3tUG3I.js.map +1 -0
- package/dist/CTABanner-MCOcVowa.js +2 -0
- package/dist/CTABanner-MCOcVowa.js.map +1 -0
- package/dist/CTABanner-X6K49gSr.js +2 -0
- package/dist/CTABanner-X6K49gSr.js.map +1 -0
- package/dist/CodeSample-B9VUhTKF.js +2 -0
- package/dist/CodeSample-B9VUhTKF.js.map +1 -0
- package/dist/CodeSample-BSXeFy0x.js +2 -0
- package/dist/CodeSample-BSXeFy0x.js.map +1 -0
- package/dist/CodeSample-BwP208sQ.js +2 -0
- package/dist/CodeSample-BwP208sQ.js.map +1 -0
- package/dist/CodeSample-CUemtj_W.js +2 -0
- package/dist/CodeSample-CUemtj_W.js.map +1 -0
- package/dist/CodeSample-D0iKih-A.js +2 -0
- package/dist/CodeSample-D0iKih-A.js.map +1 -0
- package/dist/CodeSample-D33vTa6M.js +2 -0
- package/dist/CodeSample-D33vTa6M.js.map +1 -0
- package/dist/CodeSample-DUSx2KBt.js +2 -0
- package/dist/CodeSample-DUSx2KBt.js.map +1 -0
- package/dist/CodeSample-P4yxkHPW.js +2 -0
- package/dist/CodeSample-P4yxkHPW.js.map +1 -0
- package/dist/HomeView-ACBdUgyz.js +2 -0
- package/dist/HomeView-ACBdUgyz.js.map +1 -0
- package/dist/HomeView-B0ATNUF1.js +2 -0
- package/dist/HomeView-B0ATNUF1.js.map +1 -0
- package/dist/HomeView-COJrg8Ju.js +2 -0
- package/dist/HomeView-COJrg8Ju.js.map +1 -0
- package/dist/HomeView-Cun4apuy.js +2 -0
- package/dist/HomeView-Cun4apuy.js.map +1 -0
- package/dist/HomeView-D4DXEOOn.js +2 -0
- package/dist/HomeView-D4DXEOOn.js.map +1 -0
- package/dist/HomeView-DaH1PSBB.js +2 -0
- package/dist/HomeView-DaH1PSBB.js.map +1 -0
- package/dist/HomeView-O_lj2c2t.js +2 -0
- package/dist/HomeView-O_lj2c2t.js.map +1 -0
- package/dist/HomeView-_Nu2RcOM.js +2 -0
- package/dist/HomeView-_Nu2RcOM.js.map +1 -0
- package/dist/UnderlineNav-BCyB0G5d.js +2 -0
- package/dist/UnderlineNav-BCyB0G5d.js.map +1 -0
- package/dist/UnderlineNav-BEhDJk0H.js +2 -0
- package/dist/UnderlineNav-BEhDJk0H.js.map +1 -0
- package/dist/UnderlineNav-BqZ2xAp7.js +2 -0
- package/dist/UnderlineNav-BqZ2xAp7.js.map +1 -0
- package/dist/UnderlineNav-C2-4Vyj8.js +2 -0
- package/dist/UnderlineNav-C2-4Vyj8.js.map +1 -0
- package/dist/UnderlineNav-Co08Gykm.js +2 -0
- package/dist/UnderlineNav-Co08Gykm.js.map +1 -0
- package/dist/UnderlineNav-DC3UVmnZ.js +2 -0
- package/dist/UnderlineNav-DC3UVmnZ.js.map +1 -0
- package/dist/UnderlineNav-DsRYwuGB.js +2 -0
- package/dist/UnderlineNav-DsRYwuGB.js.map +1 -0
- package/dist/UnderlineNav-FbclXKUW.js +2 -0
- package/dist/UnderlineNav-FbclXKUW.js.map +1 -0
- package/dist/{_rollupPluginBabelHelpers-BMmCG_qQ.js → _rollupPluginBabelHelpers-BEouSrrZ.js} +2 -2
- package/dist/_rollupPluginBabelHelpers-BEouSrrZ.js.map +1 -0
- package/dist/{_rollupPluginBabelHelpers-DsEzE6Ab.js → _rollupPluginBabelHelpers-BHehKRBq.js} +2 -2
- package/dist/_rollupPluginBabelHelpers-BHehKRBq.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-Bunpz22T.js +2 -0
- package/dist/_rollupPluginBabelHelpers-Bunpz22T.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-CVblpRvU.js +2 -0
- package/dist/_rollupPluginBabelHelpers-CVblpRvU.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-CxmswfqM.js +2 -0
- package/dist/_rollupPluginBabelHelpers-CxmswfqM.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-DQJTK9EO.js +2 -0
- package/dist/_rollupPluginBabelHelpers-DQJTK9EO.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-DuRQdJ01.js +2 -0
- package/dist/_rollupPluginBabelHelpers-DuRQdJ01.js.map +1 -0
- package/dist/_rollupPluginBabelHelpers-tRAa4O0f.js +2 -0
- package/dist/_rollupPluginBabelHelpers-tRAa4O0f.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.js +1 -1
- package/dist/content.d.ts +4 -3
- package/dist/content.js +1 -1
- package/dist/content.js.map +1 -1
- package/dist/index-B0FncPxO.js +2 -0
- package/dist/index-B0FncPxO.js.map +1 -0
- package/dist/index-BEm-xkm-.js +2 -0
- package/dist/index-BEm-xkm-.js.map +1 -0
- package/dist/index-BHwtxG27.js +2 -0
- package/dist/index-BHwtxG27.js.map +1 -0
- package/dist/index-BTcmIG47.js +2 -0
- package/dist/index-BTcmIG47.js.map +1 -0
- package/dist/index-CNkHt1r7.js +2 -0
- package/dist/index-CNkHt1r7.js.map +1 -0
- package/dist/index-D0XuyFm7.js +2 -0
- package/dist/index-D0XuyFm7.js.map +1 -0
- package/dist/index-DBspcqWq.js +2 -0
- package/dist/index-DBspcqWq.js.map +1 -0
- package/dist/index-DVBO4gYE.js +2 -0
- package/dist/index-DVBO4gYE.js.map +1 -0
- package/dist/index.css +217 -216
- package/dist/layouts.d.ts +1 -1
- 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/{tslib.es6-DDIOdJiV.js → tslib.es6-BBkx4Se1.js} +1 -1
- package/dist/{tslib.es6-DDIOdJiV.js.map → tslib.es6-BBkx4Se1.js.map} +1 -1
- package/dist/{tslib.es6-DUrRPhZd.js → tslib.es6-BF6ZLEXa.js} +1 -1
- package/dist/{tslib.es6-DUrRPhZd.js.map → tslib.es6-BF6ZLEXa.js.map} +1 -1
- package/dist/tslib.es6-BOZCDgb8.js +2 -0
- package/dist/tslib.es6-BOZCDgb8.js.map +1 -0
- package/dist/tslib.es6-Cjl5tesf.js +2 -0
- package/dist/tslib.es6-Cjl5tesf.js.map +1 -0
- package/dist/tslib.es6-DEH7Dkgy.js +2 -0
- package/dist/tslib.es6-DEH7Dkgy.js.map +1 -0
- package/dist/tslib.es6-DTeJ7dWi.js +2 -0
- package/dist/tslib.es6-DTeJ7dWi.js.map +1 -0
- package/dist/tslib.es6-U9-f6pA7.js +2 -0
- package/dist/tslib.es6-U9-f6pA7.js.map +1 -0
- package/dist/tslib.es6-cb69JjeS.js +2 -0
- package/dist/tslib.es6-cb69JjeS.js.map +1 -0
- package/dist/views.js +1 -1
- package/dist/writer.d.ts +4 -3
- package/dist/writer.js +1 -1
- package/dist/writer.js.map +1 -1
- package/package.json +12 -11
- package/rollup.config.js +20 -1
- package/src/brand/Button/Button.styles.tsx +31 -0
- package/src/brand/Button/Button.tsx +3 -35
- package/src/brand/CTABanner/CTABanner.styles.tsx +82 -0
- package/src/brand/CTABanner/CTABanner.tsx +34 -112
- package/src/brand/Footer/Footer.styles.tsx +21 -0
- package/src/brand/Footer/Footer.tsx +4 -24
- package/src/brand/TODO.md +1 -0
- package/src/coder/Code/Code.styles.tsx +45 -48
- package/src/coder/Code/Code.tsx +8 -8
- package/src/coder/Code/CodeLoader.tsx +2 -2
- package/src/coder/Code/annotations.tsx +1 -1
- package/src/coder/CodeCopy/CodeCopy.styles.tsx +19 -0
- package/src/coder/CodeCopy/CodeCopy.tsx +2 -4
- package/src/coder/CodeTabs/CodeTabs.styles.tsx +101 -97
- package/src/coder/CodeTabs/CodeTabs.tsx +11 -14
- package/src/content/Anchor/Anchor.styles.tsx +5 -0
- package/src/content/Anchor/Anchor.tsx +4 -14
- package/src/content/Content/Content.styles.tsx +9 -0
- package/src/content/Content/Content.tsx +4 -12
- package/src/content/Content.tsx +1 -2
- package/src/content/Subtitle/Subtitle.styles.ts +8 -0
- package/src/content/Subtitle/Subtitle.tsx +1 -10
- package/src/layouts/Layout.styles.tsx +135 -131
- package/src/layouts/Layout.tsx +21 -23
- package/src/layouts/LayoutPrimary/LayoutPrimary.styles.tsx +298 -277
- package/src/layouts/LayoutPrimary/LayoutPrimary.tsx +39 -42
- 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/ui/Loader/Loader.styles.tsx +48 -46
- package/src/ui/Loader/Loader.tsx +8 -8
- package/src/ui/TODO.md +2 -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/Badge/Badge.styles.tsx +31 -30
- package/src/writer/Badge/Badge.tsx +40 -9
- package/src/writer/Blockquote/Blockquote.styles.tsx +6 -8
- package/src/writer/Blockquote/Blockquote.tsx +2 -2
- package/src/writer/Breadcrumbs/Breadcrumbs.styles.ts +27 -26
- package/src/writer/Breadcrumbs/Breadcrumbs.tsx +5 -5
- package/src/writer/Callout/Callout.styles.tsx +44 -48
- package/src/writer/Callout/Callout.tsx +5 -5
- package/src/writer/Code/Code.styles.tsx +11 -13
- package/src/writer/Code/Code.tsx +2 -2
- package/src/writer/Details/Details.styles.tsx +101 -90
- package/src/writer/Details/Details.tsx +32 -33
- package/src/writer/GuideCard/GuideCard.styles.tsx +116 -112
- package/src/writer/GuideCard/GuideCard.tsx +19 -19
- package/src/writer/Heading/Heading.styles.tsx +65 -61
- package/src/writer/Heading/Heading.tsx +11 -11
- package/src/writer/Hr/Hr.styles.tsx +3 -5
- package/src/writer/Hr/Hr.tsx +2 -2
- package/src/writer/NavLinks/NavLinks.styles.ts +30 -31
- package/src/writer/NavLinks/NavLinks.tsx +6 -6
- package/src/writer/Pre/Pre.styles.tsx +8 -10
- package/src/writer/Pre/Pre.tsx +2 -2
- package/src/writer/Steps/Steps.styles.tsx +30 -31
- package/src/writer/Steps/Steps.tsx +3 -4
- package/src/writer/Table/Table.styles.tsx +32 -31
- package/src/writer/Table/Table.tsx +5 -5
- package/src/writer/Tabs/Tabs.styles.tsx +60 -63
- package/src/writer/Tabs/Tabs.tsx +11 -16
- package/src/writer/UnderlineNav/UnderlineNav.styles.tsx +44 -42
- package/src/writer/UnderlineNav/UnderlineNav.tsx +5 -5
- package/tsconfig.json +2 -3
- 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.map +0 -1
- 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/src/coder/CodeCopy/CodeCopy.style.tsx +0 -21
|
@@ -1,115 +1,119 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
|
+
import colors from "@livesession/design-system-colors"
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
4
|
+
export const GuideHost = css``;
|
|
5
|
+
|
|
6
|
+
export const GuideHostSecondary = css`
|
|
7
|
+
//flex-grow: 1;
|
|
8
|
+
//width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
position: relative;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
border: 1px solid ${colors.dark16};
|
|
13
|
+
background: ${colors.dark8};
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
padding: 24px;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
transition: box-shadow .2s ease-in-out, background-image .2s ease;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
background: ${colors.white};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const GuideHostSecondaryMd = css`
|
|
25
|
+
padding: 21px 25px 25px;
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const GuideLink = css`
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export const GuideItem = css`
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
display: flex;
|
|
36
|
+
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
transition: opacity .15s;
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
[data-pointer="true"] {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transform: translate(0);
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
export const GuideItemSecondary = css`
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const GuideIcon = css`
|
|
55
|
+
line-height: 0px;
|
|
56
|
+
font-size: 24px;
|
|
57
|
+
height: 32px;
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
align-items: center;
|
|
61
|
+
color: #000;
|
|
62
|
+
transition: background .2s ease;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
export const GuideRight = css`
|
|
68
|
+
padding-left: 16px;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 4px;
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
export const GuideTitle = css`
|
|
75
|
+
display: flex;
|
|
76
|
+
color: #000;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
align-items: center;
|
|
79
|
+
transition: color .15s;
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export const GuideTitleBody = css`
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
line-height: 20px;
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
export const GuideTitleBodyMd = css`
|
|
88
|
+
font-size: 18px;
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
export const GuideBody = css`
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 20px;
|
|
95
|
+
|
|
96
|
+
color: ${colors.dark80};
|
|
97
|
+
white-space: normal;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
export const GuideBodyMd = css`
|
|
103
|
+
font-size: 16px;
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
export const GuidePointer = css`
|
|
107
|
+
opacity: 0;
|
|
108
|
+
transform: translate(-4px);
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
transition: opacity .15s ease-in-out, transform .15s ease-in-out;
|
|
112
|
+
`;
|
|
113
|
+
|
|
114
|
+
export const GuideListHost = css`
|
|
115
|
+
display: grid;
|
|
116
|
+
grid-template-columns: 1fr 1fr;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
gap: 24px;
|
|
119
|
+
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as cn from "./GuideCard.styles";
|
|
4
4
|
|
|
5
5
|
export interface GuideCardProps {
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -21,32 +21,32 @@ export function GuideCard({
|
|
|
21
21
|
|
|
22
22
|
}: GuideCardProps) {
|
|
23
23
|
return <div className={`
|
|
24
|
-
${
|
|
25
|
-
${kind === "secondary" &&
|
|
26
|
-
${kind === "secondary" && size == "md" &&
|
|
24
|
+
${cn.GuideHost}
|
|
25
|
+
${kind === "secondary" && cn.GuideHostSecondary}
|
|
26
|
+
${kind === "secondary" && size == "md" && cn.GuideHostSecondaryMd}
|
|
27
27
|
`}>
|
|
28
|
-
<a className={
|
|
28
|
+
<a className={cn.GuideLink} href={href}>
|
|
29
29
|
<div className={`
|
|
30
|
-
${
|
|
31
|
-
${kind === "secondary" &&
|
|
30
|
+
${cn.GuideItem}
|
|
31
|
+
${kind === "secondary" && cn.GuideItemSecondary}
|
|
32
32
|
`}>
|
|
33
|
-
{icon && <div className={
|
|
33
|
+
{icon && <div className={cn.GuideIcon}>
|
|
34
34
|
{icon}
|
|
35
35
|
</div>}
|
|
36
|
-
<div className={
|
|
37
|
-
<div className={
|
|
36
|
+
<div className={cn.GuideRight}>
|
|
37
|
+
<div className={cn.GuideTitle}>
|
|
38
38
|
<div className={`
|
|
39
|
-
${
|
|
40
|
-
${
|
|
41
|
-
${size == "md" &&
|
|
39
|
+
${cn.GuideTitle}
|
|
40
|
+
${cn.GuideTitleBody}
|
|
41
|
+
${size == "md" && cn.GuideTitleBodyMd}
|
|
42
42
|
`}>
|
|
43
43
|
{title}
|
|
44
44
|
</div>
|
|
45
|
-
|
|
45
|
+
<Pointer/>
|
|
46
46
|
</div>
|
|
47
47
|
<div className={`
|
|
48
|
-
${
|
|
49
|
-
${size == "md" &&
|
|
48
|
+
${cn.GuideBody}
|
|
49
|
+
${size == "md" && cn.GuideBodyMd}
|
|
50
50
|
`}>
|
|
51
51
|
{children}
|
|
52
52
|
</div>
|
|
@@ -57,13 +57,13 @@ export function GuideCard({
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
GuideCard.List = function GuideCardList({children}: { children: React.ReactNode }) {
|
|
60
|
-
return <div className={
|
|
60
|
+
return <div className={cn.GuideListHost}>
|
|
61
61
|
{children}
|
|
62
62
|
</div>
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function
|
|
66
|
-
return <div data-pointer="true" className={
|
|
65
|
+
function Pointer() {
|
|
66
|
+
return <div data-pointer="true" className={cn.GuidePointer}>
|
|
67
67
|
<svg
|
|
68
68
|
xmlns="http://www.w3.org/2000/svg"
|
|
69
69
|
width={24}
|
|
@@ -1,73 +1,77 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
scroll-margin-top: 30px;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
svg {
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`,
|
|
22
|
-
h1: css`
|
|
23
|
-
font-size: 36px;
|
|
3
|
+
export const HeadingHost = css`
|
|
4
|
+
line-height: 40px;
|
|
5
|
+
font-weight: 600;
|
|
6
|
+
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0 24px 0 0;
|
|
11
|
+
scroll-margin-top: 30px;
|
|
12
|
+
cursor: pointer;
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
&:hover {
|
|
15
|
+
svg {
|
|
16
|
+
opacity: 1;
|
|
27
17
|
}
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const HeadingH1 = css`
|
|
22
|
+
font-size: 36px;
|
|
23
|
+
|
|
24
|
+
code {
|
|
30
25
|
font-size: 30px;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
`,
|
|
36
|
-
h3: css`
|
|
37
|
-
font-size: 26px;
|
|
29
|
+
export const HeadingH2 = css`
|
|
30
|
+
font-size: 30px;
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
code {
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export const HeadingH3 = css`
|
|
38
|
+
font-size: 26px;
|
|
39
|
+
|
|
40
|
+
code {
|
|
44
41
|
font-size: 22px;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
h5: css`
|
|
45
|
+
export const HeadingH4 = css`
|
|
46
|
+
font-size: 22px;
|
|
47
|
+
|
|
48
|
+
code {
|
|
51
49
|
font-size: 18px;
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
`,
|
|
57
|
-
h6: css`
|
|
58
|
-
font-size: 16px;
|
|
53
|
+
export const HeadingH5 = css`
|
|
54
|
+
font-size: 18px;
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
code {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
export const HeadingH6 = css`
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
|
|
64
|
+
code {
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
export const HeadingLink = css`
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 50%;
|
|
72
|
+
right: 0;
|
|
73
|
+
margin-top: -6px;
|
|
74
|
+
opacity: 0;
|
|
75
|
+
color: #7051d4;
|
|
76
|
+
transition: opacity .15s ease;
|
|
77
|
+
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {useRef} from "react"
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as cn from "./Heading.styles";
|
|
4
4
|
|
|
5
5
|
export interface HeadingProps {
|
|
6
6
|
children: React.ReactNode
|
|
@@ -17,31 +17,31 @@ export function Heading({children, size = 1, as, id, onClick}: HeadingProps) {
|
|
|
17
17
|
|
|
18
18
|
return <HeadingComponent
|
|
19
19
|
className={`
|
|
20
|
-
${
|
|
21
|
-
${size === 1 &&
|
|
22
|
-
${size === 2 &&
|
|
23
|
-
${size === 3 &&
|
|
24
|
-
${size === 4 &&
|
|
25
|
-
${size === 5 &&
|
|
26
|
-
${size === 6 &&
|
|
20
|
+
${cn.HeadingHost}
|
|
21
|
+
${size === 1 && cn.HeadingH1}
|
|
22
|
+
${size === 2 && cn.HeadingH2}
|
|
23
|
+
${size === 3 && cn.HeadingH3}
|
|
24
|
+
${size === 4 && cn.HeadingH4}
|
|
25
|
+
${size === 5 && cn.HeadingH5}
|
|
26
|
+
${size === 6 && cn.HeadingH6}
|
|
27
27
|
xyd_comp-comp-heading
|
|
28
28
|
`}
|
|
29
29
|
onClick={onClick}
|
|
30
30
|
>
|
|
31
31
|
{children}
|
|
32
32
|
|
|
33
|
-
{id &&
|
|
33
|
+
{id && <Anchor/>}
|
|
34
34
|
</HeadingComponent>
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
function
|
|
37
|
+
function Anchor() {
|
|
38
38
|
return <svg
|
|
39
39
|
xmlns="http://www.w3.org/2000/svg"
|
|
40
40
|
width={15}
|
|
41
41
|
height={15}
|
|
42
42
|
fill="currentColor"
|
|
43
43
|
viewBox="0 0 24 24"
|
|
44
|
-
className={
|
|
44
|
+
className={cn.HeadingLink}
|
|
45
45
|
role="presentation"
|
|
46
46
|
>
|
|
47
47
|
<path
|
package/src/writer/Hr/Hr.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as cn from "./Hr.styles";
|
|
4
4
|
|
|
5
5
|
export interface HrProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function Hr({children}: HrProps) {
|
|
10
|
-
return <hr className={
|
|
10
|
+
return <hr className={cn.HrHost}>
|
|
11
11
|
{children}
|
|
12
12
|
</hr>
|
|
13
13
|
}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
|
+
import colors from "@livesession/design-system-colors";
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
`,
|
|
33
|
-
};
|
|
4
|
+
export const NavLinksHost = css`
|
|
5
|
+
display: flex;
|
|
6
|
+
padding-top: 2rem;
|
|
7
|
+
margin-top: 2rem;
|
|
8
|
+
margin-bottom: 2rem;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
border-top-width: 1px;
|
|
12
|
+
border-color: ${colors.dark32};
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const NavLinksLink = css`
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
line-height: 1.5;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
23
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
24
|
+
transition-duration: 300ms;
|
|
25
|
+
max-width: 50%;
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export const NavLinksIcon = css`
|
|
29
|
+
display: inline;
|
|
30
|
+
height: 1.25rem;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import {ArrowLeftIcon, ArrowRightIcon} from '@radix-ui/react-icons'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import * as cn from "./NavLinks.styles";
|
|
5
5
|
|
|
6
6
|
function Anchor({children, ...rest}) {
|
|
7
7
|
return <a {...rest}>
|
|
@@ -22,14 +22,14 @@ export interface NavLinksProps {
|
|
|
22
22
|
|
|
23
23
|
export function NavLinks(props: NavLinksProps) {
|
|
24
24
|
return (
|
|
25
|
-
<div className={
|
|
25
|
+
<div className={cn.NavLinksHost}>
|
|
26
26
|
{props.prev ? (
|
|
27
27
|
<Anchor
|
|
28
28
|
href={props.prev.href}
|
|
29
29
|
title={props.prev.title}
|
|
30
|
-
className={
|
|
30
|
+
className={cn.NavLinksLink}
|
|
31
31
|
>
|
|
32
|
-
<ArrowLeftIcon className={
|
|
32
|
+
<ArrowLeftIcon className={cn.NavLinksIcon}/>
|
|
33
33
|
{props.prev.title}
|
|
34
34
|
</Anchor>
|
|
35
35
|
) : <div/>}
|
|
@@ -37,10 +37,10 @@ export function NavLinks(props: NavLinksProps) {
|
|
|
37
37
|
<Anchor
|
|
38
38
|
href={props.next.href}
|
|
39
39
|
title={props.next.title}
|
|
40
|
-
className={
|
|
40
|
+
className={cn.NavLinksLink}
|
|
41
41
|
>
|
|
42
42
|
{props.next.title}
|
|
43
|
-
<ArrowRightIcon className={
|
|
43
|
+
<ArrowRightIcon className={cn.NavLinksIcon}/>
|
|
44
44
|
</Anchor>
|
|
45
45
|
)}
|
|
46
46
|
</div>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border: 0;
|
|
3
|
+
export const PreHost = css`
|
|
4
|
+
margin-top: 0;
|
|
5
|
+
border-radius: 6px;
|
|
6
|
+
padding: 16px;
|
|
7
|
+
border: 0;
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
background-color: rgb(246, 248, 250);
|
|
10
|
+
overflow: auto;
|
|
11
|
+
`;
|
package/src/writer/Pre/Pre.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as cn from "./Pre.styles"
|
|
4
4
|
|
|
5
5
|
export interface PreProps {
|
|
6
6
|
children: React.ReactNode
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function Pre({children}: PreProps) {
|
|
10
|
-
return <pre className={
|
|
10
|
+
return <pre className={cn.PreHost}>
|
|
11
11
|
{children}
|
|
12
12
|
</pre>
|
|
13
13
|
}
|