@guardian/stand 0.0.16 → 0.0.18
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/README.md +1 -0
- package/dist/TopBar.cjs +9 -3
- package/dist/TopBar.js +4 -1
- package/dist/avatarButton.cjs +7 -0
- package/dist/avatarButton.js +1 -0
- package/dist/avatarLink.cjs +7 -0
- package/dist/avatarLink.js +1 -0
- package/dist/components/avatar/styles.cjs +24 -0
- package/dist/components/avatar/styles.js +24 -0
- package/dist/components/avatar-button/AvatarButton.cjs +14 -0
- package/dist/components/avatar-button/AvatarButton.js +12 -0
- package/dist/components/avatar-button/styles.cjs +29 -0
- package/dist/components/avatar-button/styles.js +26 -0
- package/dist/components/avatar-link/AvatarLink.cjs +14 -0
- package/dist/components/avatar-link/AvatarLink.js +12 -0
- package/dist/components/avatar-link/styles.cjs +24 -0
- package/dist/components/avatar-link/styles.js +21 -0
- package/dist/components/button/Button.cjs +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/icon-button/IconButton.cjs +1 -1
- package/dist/components/icon-button/IconButton.js +1 -1
- package/dist/components/icon-link-button/IconLinkButton.cjs +1 -1
- package/dist/components/icon-link-button/IconLinkButton.js +1 -1
- package/dist/components/inline-message/InlineMessage.cjs +56 -0
- package/dist/components/inline-message/InlineMessage.js +27 -0
- package/dist/components/inline-message/styles.cjs +17 -0
- package/dist/components/inline-message/styles.js +14 -0
- package/dist/components/link-button/LinkButton.cjs +1 -1
- package/dist/components/link-button/LinkButton.js +1 -1
- package/dist/components/menu/styles.cjs +1 -0
- package/dist/components/menu/styles.js +1 -0
- package/dist/components/topbar/TopBar.cjs +101 -0
- package/dist/components/topbar/TopBar.js +63 -0
- package/dist/components/topbar/styles.cjs +30 -0
- package/dist/components/topbar/styles.js +25 -0
- package/dist/components/topbar/topBarItem/TopBarItem.cjs +28 -0
- package/dist/components/topbar/topBarItem/TopBarItem.js +10 -0
- package/dist/components/topbar/topBarItem/styles.cjs +20 -0
- package/dist/components/topbar/topBarItem/styles.js +17 -0
- package/dist/components/topbar/topBarNavigation/TopBarNavigation.cjs +70 -0
- package/dist/components/topbar/topBarNavigation/TopBarNavigation.js +23 -0
- package/dist/components/topbar/topBarNavigation/styles.cjs +68 -0
- package/dist/components/topbar/topBarNavigation/styles.js +61 -0
- package/dist/components/topbar/{toolName → topBarToolName}/TopBarToolName.cjs +3 -2
- package/dist/components/topbar/topBarToolName/TopBarToolName.js +13 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/inline-message.cjs +9 -0
- package/dist/inline-message.js +2 -0
- package/dist/styleD/build/css/base/typography.css +3 -3
- package/dist/styleD/build/css/component/TopBar.css +55 -1
- package/dist/styleD/build/css/component/avatar.css +32 -1
- package/dist/styleD/build/css/component/button.css +177 -255
- package/dist/styleD/build/css/component/favicon.css +1 -1
- package/dist/styleD/build/css/component/inlineMessage.css +17 -0
- package/dist/styleD/build/css/component/menu.css +5 -4
- package/dist/styleD/build/css/component/tagAutocomplete.css +1 -1
- package/dist/styleD/build/css/component/tagTable.css +1 -1
- package/dist/styleD/build/css/component/topBarItem.css +7 -0
- package/dist/styleD/build/css/component/userMenu.css +6 -6
- package/dist/styleD/build/css/semantic/colors.css +45 -46
- package/dist/styleD/build/css/semantic/sizing.css +1 -0
- package/dist/styleD/build/css/semantic/typography.css +68 -30
- package/dist/styleD/build/typescript/base/typography.cjs +3 -3
- package/dist/styleD/build/typescript/base/typography.js +3 -3
- package/dist/styleD/build/typescript/component/TopBar.cjs +94 -0
- package/dist/styleD/build/typescript/component/TopBar.js +94 -0
- package/dist/styleD/build/typescript/component/avatar.cjs +95 -12
- package/dist/styleD/build/typescript/component/avatar.js +95 -12
- package/dist/styleD/build/typescript/component/button.cjs +5 -130
- package/dist/styleD/build/typescript/component/button.js +5 -130
- package/dist/styleD/build/typescript/component/inlineMessage.cjs +28 -0
- package/dist/styleD/build/typescript/component/inlineMessage.js +26 -0
- package/dist/styleD/build/typescript/component/menu.cjs +2 -1
- package/dist/styleD/build/typescript/component/menu.js +2 -1
- package/dist/styleD/build/typescript/semantic/colors.cjs +47 -52
- package/dist/styleD/build/typescript/semantic/colors.js +47 -52
- package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
- package/dist/styleD/build/typescript/semantic/typography.cjs +50 -0
- package/dist/styleD/build/typescript/semantic/typography.js +50 -0
- package/dist/types/TopBar.d.ts +12 -3
- package/dist/types/avatar-button.d.ts +18 -0
- package/dist/types/avatar-link.d.ts +18 -0
- package/dist/types/components/avatar-button/AvatarButton.d.ts +2 -0
- package/dist/types/components/avatar-button/sandbox.d.ts +5 -0
- package/dist/types/components/avatar-button/styles.d.ts +6 -0
- package/dist/types/components/avatar-button/types.d.ts +3 -0
- package/dist/types/components/avatar-link/AvatarLink.d.ts +2 -0
- package/dist/types/components/avatar-link/sandbox.d.ts +5 -0
- package/dist/types/components/avatar-link/styles.d.ts +6 -0
- package/dist/types/components/avatar-link/types.d.ts +3 -0
- package/dist/types/components/button/sandbox.d.ts +4 -4
- package/dist/types/components/button/types.d.ts +1 -1
- package/dist/types/components/icon-button/sandbox.d.ts +4 -4
- package/dist/types/components/icon-button/styles.d.ts +3 -128
- package/dist/types/components/icon-button/types.d.ts +1 -1
- package/dist/types/components/icon-link-button/sandbox.d.ts +4 -4
- package/dist/types/components/icon-link-button/styles.d.ts +3 -128
- package/dist/types/components/icon-link-button/types.d.ts +1 -1
- package/dist/types/components/inline-message/InlineMessage.d.ts +2 -0
- package/dist/types/components/inline-message/sandbox.d.ts +5 -0
- package/dist/types/components/inline-message/styles.d.ts +8 -0
- package/dist/types/components/inline-message/types.d.ts +21 -0
- package/dist/types/components/link-button/sandbox.d.ts +4 -4
- package/dist/types/components/link-button/styles.d.ts +3 -128
- package/dist/types/components/link-button/types.d.ts +1 -1
- package/dist/types/components/topbar/TopBar.d.ts +8 -0
- package/dist/types/components/topbar/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/styles.d.ts +9 -0
- package/dist/types/components/topbar/topBarItem/TopBarItem.d.ts +2 -0
- package/dist/types/components/topbar/topBarItem/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/topBarItem/styles.d.ts +8 -0
- package/dist/types/components/topbar/topBarItem/types.d.ts +14 -0
- package/dist/types/components/topbar/topBarNavigation/TopBarNavigation.d.ts +2 -0
- package/dist/types/components/topbar/topBarNavigation/sandbox.d.ts +5 -0
- package/dist/types/components/topbar/topBarNavigation/styles.d.ts +12 -0
- package/dist/types/components/topbar/topBarNavigation/types.d.ts +44 -0
- package/dist/types/components/topbar/types.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/inline-message.d.ts +19 -0
- package/dist/types/styleD/build/typescript/base/typography.d.ts +3 -3
- package/dist/types/styleD/build/typescript/component/TopBar.d.ts +94 -0
- package/dist/types/styleD/build/typescript/component/avatar.d.ts +83 -0
- package/dist/types/styleD/build/typescript/component/button.d.ts +3 -128
- package/dist/types/styleD/build/typescript/component/inlineMessage.d.ts +28 -0
- package/dist/types/styleD/build/typescript/component/menu.d.ts +1 -0
- package/dist/types/styleD/build/typescript/semantic/colors.d.ts +44 -49
- package/dist/types/styleD/build/typescript/semantic/sizing.d.ts +1 -0
- package/dist/types/styleD/build/typescript/semantic/typography.d.ts +50 -0
- package/dist/util/css/reset.css +10 -0
- package/dist/util/reset.css.cjs +1 -1
- package/dist/util/reset.css.js +1 -1
- package/package.json +35 -18
- package/dist/components/topbar/toolName/TopBarToolName.js +0 -12
- /package/dist/components/topbar/{toolName → topBarToolName}/styles.cjs +0 -0
- /package/dist/components/topbar/{toolName → topBarToolName}/styles.js +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/TopBarToolName.d.ts +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/sandbox.d.ts +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/styles.d.ts +0 -0
- /package/dist/types/components/topbar/{toolName → topBarToolName}/types.d.ts +0 -0
|
@@ -56,6 +56,7 @@ const componentMenu = {
|
|
|
56
56
|
left: "1rem"
|
|
57
57
|
},
|
|
58
58
|
"border-bottom": "0.0625rem solid #cccccc",
|
|
59
|
+
"background-color": "#ffffff",
|
|
59
60
|
icon: {
|
|
60
61
|
"grid-area": "icon",
|
|
61
62
|
"align-self": "start",
|
|
@@ -94,7 +95,7 @@ const componentMenu = {
|
|
|
94
95
|
"border-bottom": "none"
|
|
95
96
|
},
|
|
96
97
|
":hover": {
|
|
97
|
-
"background-color": "#
|
|
98
|
+
"background-color": "#f6f6f6"
|
|
98
99
|
},
|
|
99
100
|
":focus-visible": {
|
|
100
101
|
outline: "0.125rem solid #0072a9",
|
|
@@ -54,6 +54,7 @@ const componentMenu = {
|
|
|
54
54
|
left: "1rem"
|
|
55
55
|
},
|
|
56
56
|
"border-bottom": "0.0625rem solid #cccccc",
|
|
57
|
+
"background-color": "#ffffff",
|
|
57
58
|
icon: {
|
|
58
59
|
"grid-area": "icon",
|
|
59
60
|
"align-self": "start",
|
|
@@ -92,7 +93,7 @@ const componentMenu = {
|
|
|
92
93
|
"border-bottom": "none"
|
|
93
94
|
},
|
|
94
95
|
":hover": {
|
|
95
|
-
"background-color": "#
|
|
96
|
+
"background-color": "#f6f6f6"
|
|
96
97
|
},
|
|
97
98
|
":focus-visible": {
|
|
98
99
|
outline: "0.125rem solid #0072a9",
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const semanticColors = {
|
|
4
4
|
text: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"inverse
|
|
8
|
-
"inverse
|
|
9
|
-
"inverse
|
|
5
|
+
strong: "#000000",
|
|
6
|
+
weak: "#545454",
|
|
7
|
+
"strong-inverse": "#dcdcdc",
|
|
8
|
+
"weak-inverse": "#cccccc",
|
|
9
|
+
"stronger-inverse": "#ffffff",
|
|
10
10
|
error: "#8c2113",
|
|
11
11
|
warning: "#433608",
|
|
12
12
|
success: "#326528",
|
|
@@ -21,60 +21,55 @@ const semanticColors = {
|
|
|
21
21
|
"warm-purple": "#381350",
|
|
22
22
|
magenta: "#581734",
|
|
23
23
|
orange: "#693c16",
|
|
24
|
-
yellow: "#5b4a0b"
|
|
25
|
-
"interactive-disabled": "#999999"
|
|
24
|
+
yellow: "#5b4a0b"
|
|
26
25
|
},
|
|
27
26
|
bg: {
|
|
28
27
|
base: "#ffffff",
|
|
29
|
-
"raised-1": "#f6f6f6",
|
|
30
|
-
"raised-2": "#ededed"
|
|
31
|
-
},
|
|
32
|
-
surface: {
|
|
33
|
-
"light-1": "#f6f6f6",
|
|
34
|
-
"light-2": "#ededed",
|
|
35
|
-
"dark-1": "#333333"
|
|
28
|
+
"raised-level-1": "#f6f6f6",
|
|
29
|
+
"raised-level-2": "#ededed"
|
|
36
30
|
},
|
|
37
31
|
border: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"inverse
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
status: {
|
|
50
|
-
"status-draft": "#f1c21b",
|
|
51
|
-
"status-live": "#4e9e3e",
|
|
52
|
-
"status-selected": "#0072a9",
|
|
53
|
-
"status-focused": "#0072a9"
|
|
32
|
+
stronger: "#545454",
|
|
33
|
+
strong: "#8d8d8d",
|
|
34
|
+
weak: "#cccccc",
|
|
35
|
+
weaker: "#ededed",
|
|
36
|
+
"strong-inverse": "#ffffff",
|
|
37
|
+
disabled: "#dcdcdc",
|
|
38
|
+
accent: "#0d4289",
|
|
39
|
+
error: "#b42a19",
|
|
40
|
+
focused: "#0072a9",
|
|
41
|
+
selected: "#0072a9",
|
|
42
|
+
"selected-inverse": "#8abed7"
|
|
54
43
|
},
|
|
55
44
|
fill: {
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
45
|
+
"accent-strong": "#0d4289",
|
|
46
|
+
"accent-strong-hover": "#092f62",
|
|
47
|
+
"accent-strong-pressed": "#061d3c",
|
|
48
|
+
strong: "#545454",
|
|
49
|
+
"strong-hover": "#333333",
|
|
50
|
+
"strong-pressed": "#121212",
|
|
51
|
+
weak: "#ffffff",
|
|
52
|
+
"weak-hover": "#f6f6f6",
|
|
53
|
+
"weak-pressed": "#ededed",
|
|
54
|
+
disabled: "#dcdcdc",
|
|
55
|
+
"green-weak": "#cde4c9",
|
|
56
|
+
"blue-weak": "#c5d9f4",
|
|
57
|
+
"red-weak": "#f5c6c0",
|
|
58
|
+
"cyan-weak": "#b8d8e7",
|
|
59
|
+
"teal-weak": "#c5dfe1",
|
|
60
|
+
"cool-purple-weak": "#dbdff7",
|
|
61
|
+
"warm-purple-weak": "#dac3e8",
|
|
62
|
+
"magenta-weak": "#edc6d7",
|
|
63
|
+
"orange-weak": "#fcddc6",
|
|
64
|
+
"yellow-weak": "#fbeebf",
|
|
65
|
+
selected: "#005d8b",
|
|
66
|
+
"draft-strong": "#f1c21b",
|
|
67
|
+
"live-weak": "#aed2a6",
|
|
68
|
+
"warning-weak": "#fbeebf",
|
|
69
|
+
"information-weak": "#e8f0fb",
|
|
70
|
+
"error-weak": "#f5c6c0",
|
|
71
|
+
"error-strong": "#b42a19",
|
|
72
|
+
"success-weak": "#edf5ec"
|
|
78
73
|
}
|
|
79
74
|
};
|
|
80
75
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const semanticColors = {
|
|
2
2
|
text: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"inverse
|
|
6
|
-
"inverse
|
|
7
|
-
"inverse
|
|
3
|
+
strong: "#000000",
|
|
4
|
+
weak: "#545454",
|
|
5
|
+
"strong-inverse": "#dcdcdc",
|
|
6
|
+
"weak-inverse": "#cccccc",
|
|
7
|
+
"stronger-inverse": "#ffffff",
|
|
8
8
|
error: "#8c2113",
|
|
9
9
|
warning: "#433608",
|
|
10
10
|
success: "#326528",
|
|
@@ -19,60 +19,55 @@ const semanticColors = {
|
|
|
19
19
|
"warm-purple": "#381350",
|
|
20
20
|
magenta: "#581734",
|
|
21
21
|
orange: "#693c16",
|
|
22
|
-
yellow: "#5b4a0b"
|
|
23
|
-
"interactive-disabled": "#999999"
|
|
22
|
+
yellow: "#5b4a0b"
|
|
24
23
|
},
|
|
25
24
|
bg: {
|
|
26
25
|
base: "#ffffff",
|
|
27
|
-
"raised-1": "#f6f6f6",
|
|
28
|
-
"raised-2": "#ededed"
|
|
29
|
-
},
|
|
30
|
-
surface: {
|
|
31
|
-
"light-1": "#f6f6f6",
|
|
32
|
-
"light-2": "#ededed",
|
|
33
|
-
"dark-1": "#333333"
|
|
26
|
+
"raised-level-1": "#f6f6f6",
|
|
27
|
+
"raised-level-2": "#ededed"
|
|
34
28
|
},
|
|
35
29
|
border: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"inverse
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
status: {
|
|
48
|
-
"status-draft": "#f1c21b",
|
|
49
|
-
"status-live": "#4e9e3e",
|
|
50
|
-
"status-selected": "#0072a9",
|
|
51
|
-
"status-focused": "#0072a9"
|
|
30
|
+
stronger: "#545454",
|
|
31
|
+
strong: "#8d8d8d",
|
|
32
|
+
weak: "#cccccc",
|
|
33
|
+
weaker: "#ededed",
|
|
34
|
+
"strong-inverse": "#ffffff",
|
|
35
|
+
disabled: "#dcdcdc",
|
|
36
|
+
accent: "#0d4289",
|
|
37
|
+
error: "#b42a19",
|
|
38
|
+
focused: "#0072a9",
|
|
39
|
+
selected: "#0072a9",
|
|
40
|
+
"selected-inverse": "#8abed7"
|
|
52
41
|
},
|
|
53
42
|
fill: {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
43
|
+
"accent-strong": "#0d4289",
|
|
44
|
+
"accent-strong-hover": "#092f62",
|
|
45
|
+
"accent-strong-pressed": "#061d3c",
|
|
46
|
+
strong: "#545454",
|
|
47
|
+
"strong-hover": "#333333",
|
|
48
|
+
"strong-pressed": "#121212",
|
|
49
|
+
weak: "#ffffff",
|
|
50
|
+
"weak-hover": "#f6f6f6",
|
|
51
|
+
"weak-pressed": "#ededed",
|
|
52
|
+
disabled: "#dcdcdc",
|
|
53
|
+
"green-weak": "#cde4c9",
|
|
54
|
+
"blue-weak": "#c5d9f4",
|
|
55
|
+
"red-weak": "#f5c6c0",
|
|
56
|
+
"cyan-weak": "#b8d8e7",
|
|
57
|
+
"teal-weak": "#c5dfe1",
|
|
58
|
+
"cool-purple-weak": "#dbdff7",
|
|
59
|
+
"warm-purple-weak": "#dac3e8",
|
|
60
|
+
"magenta-weak": "#edc6d7",
|
|
61
|
+
"orange-weak": "#fcddc6",
|
|
62
|
+
"yellow-weak": "#fbeebf",
|
|
63
|
+
selected: "#005d8b",
|
|
64
|
+
"draft-strong": "#f1c21b",
|
|
65
|
+
"live-weak": "#aed2a6",
|
|
66
|
+
"warning-weak": "#fbeebf",
|
|
67
|
+
"information-weak": "#e8f0fb",
|
|
68
|
+
"error-weak": "#f5c6c0",
|
|
69
|
+
"error-strong": "#b42a19",
|
|
70
|
+
"success-weak": "#edf5ec"
|
|
76
71
|
}
|
|
77
72
|
};
|
|
78
73
|
|
|
@@ -205,6 +205,56 @@ const semanticTypography = {
|
|
|
205
205
|
font: "normal 700 1rem/1 Open Sans",
|
|
206
206
|
letterSpacing: "-0.0125rem",
|
|
207
207
|
fontWidth: 95
|
|
208
|
+
},
|
|
209
|
+
"label-form-sm": {
|
|
210
|
+
font: "normal 700 0.875rem/1.15 Open Sans",
|
|
211
|
+
letterSpacing: "-0.0125rem",
|
|
212
|
+
fontWidth: 95
|
|
213
|
+
},
|
|
214
|
+
"label-form-md": {
|
|
215
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
216
|
+
letterSpacing: "-0.03125rem",
|
|
217
|
+
fontWidth: 95
|
|
218
|
+
},
|
|
219
|
+
"label-form-inline-sm": {
|
|
220
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
221
|
+
letterSpacing: "0rem",
|
|
222
|
+
fontWidth: 95
|
|
223
|
+
},
|
|
224
|
+
"label-form-inline-md": {
|
|
225
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
226
|
+
letterSpacing: "0rem",
|
|
227
|
+
fontWidth: 95
|
|
228
|
+
},
|
|
229
|
+
"label-form-compact-sm": {
|
|
230
|
+
font: "normal 700 0.875rem/1.15 Open Sans",
|
|
231
|
+
letterSpacing: "0rem",
|
|
232
|
+
fontWidth: 88
|
|
233
|
+
},
|
|
234
|
+
"label-form-compact-md": {
|
|
235
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
236
|
+
letterSpacing: "-0.0125rem",
|
|
237
|
+
fontWidth: 88
|
|
238
|
+
},
|
|
239
|
+
"label-form-inline-compact-sm": {
|
|
240
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
241
|
+
letterSpacing: "0rem",
|
|
242
|
+
fontWidth: 88
|
|
243
|
+
},
|
|
244
|
+
"label-form-inline-compact-md": {
|
|
245
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
246
|
+
letterSpacing: "0rem",
|
|
247
|
+
fontWidth: 88
|
|
248
|
+
},
|
|
249
|
+
"help-text-form-md": {
|
|
250
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
251
|
+
letterSpacing: "0rem",
|
|
252
|
+
fontWidth: 95
|
|
253
|
+
},
|
|
254
|
+
"help-text-form-compact-md": {
|
|
255
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
256
|
+
letterSpacing: "0rem",
|
|
257
|
+
fontWidth: 88
|
|
208
258
|
}
|
|
209
259
|
};
|
|
210
260
|
|
|
@@ -203,6 +203,56 @@ const semanticTypography = {
|
|
|
203
203
|
font: "normal 700 1rem/1 Open Sans",
|
|
204
204
|
letterSpacing: "-0.0125rem",
|
|
205
205
|
fontWidth: 95
|
|
206
|
+
},
|
|
207
|
+
"label-form-sm": {
|
|
208
|
+
font: "normal 700 0.875rem/1.15 Open Sans",
|
|
209
|
+
letterSpacing: "-0.0125rem",
|
|
210
|
+
fontWidth: 95
|
|
211
|
+
},
|
|
212
|
+
"label-form-md": {
|
|
213
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
214
|
+
letterSpacing: "-0.03125rem",
|
|
215
|
+
fontWidth: 95
|
|
216
|
+
},
|
|
217
|
+
"label-form-inline-sm": {
|
|
218
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
219
|
+
letterSpacing: "0rem",
|
|
220
|
+
fontWidth: 95
|
|
221
|
+
},
|
|
222
|
+
"label-form-inline-md": {
|
|
223
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
224
|
+
letterSpacing: "0rem",
|
|
225
|
+
fontWidth: 95
|
|
226
|
+
},
|
|
227
|
+
"label-form-compact-sm": {
|
|
228
|
+
font: "normal 700 0.875rem/1.15 Open Sans",
|
|
229
|
+
letterSpacing: "0rem",
|
|
230
|
+
fontWidth: 88
|
|
231
|
+
},
|
|
232
|
+
"label-form-compact-md": {
|
|
233
|
+
font: "normal 700 1rem/1.15 Open Sans",
|
|
234
|
+
letterSpacing: "-0.0125rem",
|
|
235
|
+
fontWidth: 88
|
|
236
|
+
},
|
|
237
|
+
"label-form-inline-compact-sm": {
|
|
238
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
239
|
+
letterSpacing: "0rem",
|
|
240
|
+
fontWidth: 88
|
|
241
|
+
},
|
|
242
|
+
"label-form-inline-compact-md": {
|
|
243
|
+
font: "normal 460 1rem/1.3 Open Sans",
|
|
244
|
+
letterSpacing: "0rem",
|
|
245
|
+
fontWidth: 88
|
|
246
|
+
},
|
|
247
|
+
"help-text-form-md": {
|
|
248
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
249
|
+
letterSpacing: "0rem",
|
|
250
|
+
fontWidth: 95
|
|
251
|
+
},
|
|
252
|
+
"help-text-form-compact-md": {
|
|
253
|
+
font: "normal 460 0.875rem/1.3 Open Sans",
|
|
254
|
+
letterSpacing: "0rem",
|
|
255
|
+
fontWidth: 88
|
|
206
256
|
}
|
|
207
257
|
};
|
|
208
258
|
|
package/dist/types/TopBar.d.ts
CHANGED
|
@@ -12,8 +12,17 @@
|
|
|
12
12
|
* If you only need the built CSS (./component/TopBar.css),
|
|
13
13
|
* you don't need to install these.
|
|
14
14
|
*/
|
|
15
|
-
export { TopBarToolName } from './components/topbar/toolName/TopBarToolName';
|
|
16
|
-
export type { TopBarToolNameProps } from './components/topbar/toolName/types';
|
|
17
|
-
export type { PartialTopBarToolNameTheme as TopBarToolNameTheme } from './components/topbar/toolName/styles';
|
|
18
15
|
export { componentTopBar } from './styleD/build/typescript/component/TopBar';
|
|
19
16
|
export type { ComponentTopBar } from './styleD/build/typescript/component/TopBar';
|
|
17
|
+
export { TopBarToolName } from './components/topbar/topBarToolName/TopBarToolName';
|
|
18
|
+
export type { TopBarToolNameProps } from './components/topbar/topBarToolName/types';
|
|
19
|
+
export type { PartialTopBarToolNameTheme as TopBarToolNameTheme } from './components/topbar/topBarToolName/styles';
|
|
20
|
+
export { TopBarNavigation } from './components/topbar/topBarNavigation/TopBarNavigation';
|
|
21
|
+
export type { TopBarNavigationProps } from './components/topbar/topBarNavigation/types';
|
|
22
|
+
export type { PartialTopBarNavigationTheme as TopBarNavigationTheme } from './components/topbar/topBarNavigation/styles';
|
|
23
|
+
export { TopBarItem } from './components/topbar/topBarItem/TopBarItem';
|
|
24
|
+
export type { TopBarItemProps } from './components/topbar/topBarItem/types';
|
|
25
|
+
export type { PartialTopBarItemTheme as TopBarItemTheme } from './components/topbar/topBarItem/styles';
|
|
26
|
+
export { TopBar } from './components/topbar/TopBar';
|
|
27
|
+
export type { TopBarProps } from './components/topbar/types';
|
|
28
|
+
export type { PartialTopBarTheme as TopBarTheme } from './components/topbar/styles';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar button component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `react-aria-components`
|
|
9
|
+
* - `typescript`
|
|
10
|
+
*
|
|
11
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
12
|
+
*
|
|
13
|
+
* If you only need the built CSS (./component/avatar.css),
|
|
14
|
+
* you don't need to install these.
|
|
15
|
+
*/
|
|
16
|
+
export { AvatarButton } from './components/avatar-button/AvatarButton';
|
|
17
|
+
export type { AvatarButtonProps } from './components/avatar-button/types';
|
|
18
|
+
export type { PartialAvatarButtonTheme as AvatarButtonTheme } from './components/avatar-button/styles';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar link component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `react-aria-components`
|
|
9
|
+
* - `typescript`
|
|
10
|
+
*
|
|
11
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
12
|
+
*
|
|
13
|
+
* If you only need the built CSS (./component/avatar.css),
|
|
14
|
+
* you don't need to install these.
|
|
15
|
+
*/
|
|
16
|
+
export { AvatarLink } from './components/avatar-link/AvatarLink';
|
|
17
|
+
export type { AvatarLinkProps } from './components/avatar-link/types';
|
|
18
|
+
export type { PartialAvatarLinkTheme as AvatarLinkTheme } from './components/avatar-link/styles';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const componentName = "AvatarButton";
|
|
2
|
+
export declare const componentTsx = "import { AvatarButton } from '@guardian/stand/AvatarButton';\n\nexport const Component = () => {\n\treturn (\n\t\t<>\n\t\t\t<AvatarButton initials=\"AB\" color=\"blue\" />\n\t\t\t<AvatarButton\n\t\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\t\talt=\"Mahesh Makani\"\n\t\t\t\tinitials=\"MM\"\n\t\t\t\tcolor=\"blue\"\n\t\t\t\tsize=\"md\"\n\t\t\t/>\n\t\t</>\n\t);\n};\n";
|
|
3
|
+
export declare const componentCss = "@import \"@guardian/stand/component/avatar.css\";\n\n /* example setup of AvatarButton style using md size and blue color */\n .stand-AvatarButton {\n \tdisplay: var(--component-avatar-shared-display);\n \talign-items: var(--component-avatar-shared-align-items);\n \tjustify-content: var(--component-avatar-shared-justify-content);\n \toverflow: var(--component-avatar-shared-overflow);\n \tflex-shrink: var(--component-avatar-shared-flex-shrink);\n \tborder-radius: var(--component-avatar-shared-border-radius);\n \tbackground-color: var(--component-avatar-shared-color-blue-background);\n \twidth: var(--component-avatar-md-size);\n \theight: var(--component-avatar-md-size);\n \tborder: var(--component-avatar-shared-color-blue-border);\n \tcolor: var(--component-avatar-shared-color-blue-text);\n \tfont: var(--component-avatar-md-typography-font);\n \tletter-spacing: var(--component-avatar-md-typography-letter-spacing);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-avatar-md-typography-font-width);\n\n\t\tborder:\t var(--component-avatar-shared-button-border);\n\t\tpadding: var(--component-avatar-shared-button-padding);\n\t\tcursor: var(--component-avatar-shared-button-cursor);\n }\n\n /* example setup for AvatarButton image */\n .stand-AvatarButton > img {\n \twidth: 100%;\n \theight: 100%;\n \tobject-fit: cover;\n }";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container\">\n\t<button href=\"#\" class=\"stand-AvatarButton\">AB</button>\n\t<button href=\"#\" class=\"stand-AvatarButton\">\n\t\t<img\n\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\talt=\"Mahesh Makani\"\n\t\t/>\n\t</button>\n</div>";
|
|
5
|
+
export declare const componentJs = "\n\t// for ts/js\n\timport { componentAvatar } from \"@guardian/stand\";\n\n\tconst style = `\n\tdisplay: ${componentAvatar.shared.display};\n\talign-items: ${componentAvatar.shared[\"align-items\"]};\n\tjustify-content: ${componentAvatar.shared[\"justify-content\"]};\n\toverflow: ${componentAvatar.shared.overflow};\n\tflex-shrink: ${componentAvatar.shared[\"flex-shrink\"]};\n\tborder-radius: ${componentAvatar.shared[\"border-radius\"]};\n\tbackground-color: ${componentAvatar.shared.color.blue.background};\n\twidth: ${componentAvatar.md.size};\n\theight: ${componentAvatar.md.size};\n\tborder: ${componentAvatar.shared.color.blue.border};\n\tcolor: ${componentAvatar.shared.color.blue.text};\n\tfont: ${componentAvatar.md.typography.font};\n\tletter-spacing: ${componentAvatar.md.typography.letterSpacing};\n\tfont-variation-settings: 'wdth' ${componentAvatar.md.typography.fontWidth};\n\n\tbackground: ${componentAvatar.shared.button.background};\n\tborder: ${componentAvatar.shared.button.border};\n\tpadding: ${componentAvatar.shared.button.padding};\n\tcursor: ${componentAvatar.shared.button.cursor};\n\t`;\n\n\tconst imgStyle = `\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n\t`;\n\n\t// e.g. adding to DOM using vanilla JS styles\n\tdocument.getElementById(\"app\").innerHTML = `\n\n\t<div class=\"container\">\n\t\t<button style=\"${style}\">AB</button>\n\t\t<button style=\"${style}\">\n\t\t\t<img\n\t\t\t\tstyle=\"${imgStyle}\"\n\t\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\t\talt=\"Mahesh Makani\"\n\t\t\t/>\n\t\t</button>\n\t</div>\n`;\n";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { AvatarTheme, PartialAvatarTheme } from '../avatar/styles';
|
|
3
|
+
export type AvatarButtonTheme = AvatarTheme;
|
|
4
|
+
export type PartialAvatarButtonTheme = PartialAvatarTheme;
|
|
5
|
+
export declare const defaultAvatarButtonTheme: AvatarButtonTheme;
|
|
6
|
+
export declare const avatarButtonStyles: (theme: AvatarButtonTheme) => SerializedStyles;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const componentName = "AvatarLink";
|
|
2
|
+
export declare const componentTsx = "import { AvatarLink } from '@guardian/stand/AvatarLink';\n\nexport const Component = () => {\n\treturn (\n\t\t<>\n\t\t\t<AvatarLink initials=\"AB\" color=\"blue\" />\n\t\t\t<AvatarLink\n\t\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\t\talt=\"Mahesh Makani\"\n\t\t\t\tinitials=\"MM\"\n\t\t\t\tcolor=\"blue\"\n\t\t\t\tsize=\"md\"\n\t\t\t/>\n\t\t</>\n\t);\n};\n";
|
|
3
|
+
export declare const componentCss = "@import \"@guardian/stand/component/avatar.css\";\n\n /* example setup of AvatarLink style using md size and blue color */\n .stand-AvatarLink {\n \tdisplay: var(--component-avatar-shared-display);\n \talign-items: var(--component-avatar-shared-align-items);\n \tjustify-content: var(--component-avatar-shared-justify-content);\n \toverflow: var(--component-avatar-shared-overflow);\n \tflex-shrink: var(--component-avatar-shared-flex-shrink);\n \tborder-radius: var(--component-avatar-shared-border-radius);\n \tbackground-color: var(--component-avatar-shared-color-blue-background);\n \twidth: var(--component-avatar-md-size);\n \theight: var(--component-avatar-md-size);\n \tborder: var(--component-avatar-shared-color-blue-border);\n \tcolor: var(--component-avatar-shared-color-blue-text);\n \tfont: var(--component-avatar-md-typography-font);\n \tletter-spacing: var(--component-avatar-md-typography-letter-spacing);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-avatar-md-typography-font-width);\n\n\t\ttext-decoration: var(--component-avatar-shared-link-text-decoration);\n }\n\n /* example setup for AvatarLink image */\n .stand-AvatarLink > img {\n \twidth: 100%;\n \theight: 100%;\n \tobject-fit: cover;\n }";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container\">\n\t<a href=\"#\" class=\"stand-AvatarLink\">AB</a>\n\t<a href=\"#\" class=\"stand-AvatarLink\">\n\t\t<img\n\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\talt=\"Mahesh Makani\"\n\t\t/>\n\t</a>\n</div>";
|
|
5
|
+
export declare const componentJs = "\n\t// for ts/js\n\timport { componentAvatar } from \"@guardian/stand\";\n\n\tconst style = `\n\tdisplay: ${componentAvatar.shared.display};\n\talign-items: ${componentAvatar.shared[\"align-items\"]};\n\tjustify-content: ${componentAvatar.shared[\"justify-content\"]};\n\toverflow: ${componentAvatar.shared.overflow};\n\tflex-shrink: ${componentAvatar.shared[\"flex-shrink\"]};\n\tborder-radius: ${componentAvatar.shared[\"border-radius\"]};\n\tbackground-color: ${componentAvatar.shared.color.blue.background};\n\twidth: ${componentAvatar.md.size};\n\theight: ${componentAvatar.md.size};\n\tborder: ${componentAvatar.shared.color.blue.border};\n\tcolor: ${componentAvatar.shared.color.blue.text};\n\tfont: ${componentAvatar.md.typography.font};\n\tletter-spacing: ${componentAvatar.md.typography.letterSpacing};\n\tfont-variation-settings: 'wdth' ${componentAvatar.md.typography.fontWidth};\n\n\ttext-decoration: ${componentAvatar.shared.link.textDecoration};\n\t`;\n\n\tconst imgStyle = `\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n\t`;\n\n\t// e.g. adding to DOM using vanilla JS styles\n\tdocument.getElementById(\"app\").innerHTML = `\n\n\t<div class=\"container\">\n\t\t<a href=\"#\" style=\"${style}\">AB</a>\n\t\t<a href=\"#\" style=\"${style}\">\n\t\t\t<img\n\t\t\t\tstyle=\"${imgStyle}\"\n\t\t\t\tsrc=\"https://uploads.guimcode.co.uk/2026/01/27/f85e2e477ce54f4c3b671faa5cd21673aa9f8072fddb5d70a73e6038dc812eec.jpg\"\n\t\t\t\talt=\"Mahesh Makani\"\n\t\t\t/>\n\t\t</a>\n\t</div>\n`;\n";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { AvatarTheme, PartialAvatarTheme } from '../avatar/styles';
|
|
3
|
+
export type AvatarLinkTheme = AvatarTheme;
|
|
4
|
+
export type PartialAvatarLinkTheme = PartialAvatarTheme;
|
|
5
|
+
export declare const defaultAvatarLinkTheme: AvatarTheme;
|
|
6
|
+
export declare const avatarLinkStyles: (theme: AvatarLinkTheme) => SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const componentName = "Button";
|
|
2
|
-
export declare const componentTsx = "import { Button } from '@guardian/stand/button';\n\nexport const Component = () => (\n\t<>\n\t\t<div className=\"container\">\n\t\t\t<Button onPress={() => alert('Button Clicked from React')}>Button</Button>\n\t\t\t<Button isDisabled onPress={() => alert('Button Clicked from React')}>\n\t\t\t\tDisabled Button\n\t\t\t</Button>\n\t\t</div>\n\t\t<div className=\"container\">\n\t\t\t<Button\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"
|
|
3
|
-
export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n .stand-button {\n \tdisplay: var(--component-button-shared-display);\n \t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n \ttext-align: var(--component-button-shared-text-align);\n \tbox-shadow: var(--component-button-shared-box-shadow);\n \ttext-decoration: var(--component-button-shared-text-decoration);\n \tcursor: var(--component-button-shared-cursor);\n \tjustify-content: var(--component-button-shared-justify-content);\n \talign-items: var(--component-button-shared-align-items);\n }\n .stand-button:focus-visible {\n \toutline: var(--component-button-shared-focus-visible-outline);\n \toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n }\n .stand-button:disabled {\n \tcursor: var(--component-button-shared-disabled-cursor);\n }\n\n /* example setup of button/link button style using md size and emphasised primary variant */\n .stand-button-
|
|
4
|
-
export declare const componentHtml = "<div class=\"container flow-column\">\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-
|
|
5
|
-
export declare const componentJs = "\t// for ts/js\n\t\timport { componentButton } from \"@guardian/stand\";\n\n \t// example of creating a stylesheet in js\n \tconst sheet = new CSSStyleSheet();\n\n \t// apply the rules to the sheet\n \tsheet.replaceSync(`\n \t/* shared button styles for all variants */\n \t.js-stand-button {\n \t\tdisplay: ${componentButton.shared.display};\n \t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n \t\ttext-align: ${componentButton.shared[\"text-align\"]};\n \t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n \t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n \t\tcursor: ${componentButton.shared.cursor};\n \t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n \t\talign-items: ${componentButton.shared[\"align-items\"]};\n \t}\n \t.js-stand-button:focus-visible {\n \t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n \t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n \t}\n \t.js-stand-button:disabled {\n \t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n \t}\n\n \t/* example setup of button/link button style using md size and emphasised primary variant */\n \t.js-stand-button-
|
|
2
|
+
export declare const componentTsx = "import { Button } from '@guardian/stand/button';\n\nexport const Component = () => (\n\t<>\n\t\t<div className=\"container\">\n\t\t\t<Button onPress={() => alert('Button Clicked from React')}>Button</Button>\n\t\t\t<Button isDisabled onPress={() => alert('Button Clicked from React')}>\n\t\t\t\tDisabled Button\n\t\t\t</Button>\n\t\t</div>\n\t\t<div className=\"container\">\n\t\t\t<Button\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\ticon=\"raven\"\n\t\t\t>\n\t\t\t\tButton with Icon\n\t\t\t</Button>\n\t\t\t<Button\n\t\t\t\tisDisabled\n\t\t\t\tonPress={() => alert('Button Clicked from React')}\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\ticon=\"owl\"\n\t\t\t>\n\t\t\t\tDisabled Button with Icon\n\t\t\t</Button>\n\t\t</div>\n\t</>\n);\n\n";
|
|
3
|
+
export declare const componentCss = "@import '@guardian/stand/component/button.css';\n\n /* shared button styles for all variants */\n .stand-button {\n \tdisplay: var(--component-button-shared-display);\n \t-webkit-appearance: var(--component-button-shared-webkit-appearance);\n \ttext-align: var(--component-button-shared-text-align);\n \tbox-shadow: var(--component-button-shared-box-shadow);\n \ttext-decoration: var(--component-button-shared-text-decoration);\n \tcursor: var(--component-button-shared-cursor);\n \tjustify-content: var(--component-button-shared-justify-content);\n \talign-items: var(--component-button-shared-align-items);\n }\n .stand-button:focus-visible {\n \toutline: var(--component-button-shared-focus-visible-outline);\n \toutline-offset: var(--component-button-shared-focus-visible-outline-offset);\n }\n .stand-button:disabled {\n \tcursor: var(--component-button-shared-disabled-cursor);\n }\n\n /* example setup of button/link button style using md size and emphasised primary variant */\n .stand-button-primary {\n \tcolor: var(--component-button-primary-shared-color);\n \tbackground: var(\n \t\t--component-button-primary-shared-background-color\n \t);\n \theight: var(--component-button-primary-md-height);\n \tpadding: var(--component-button-primary-md-padding-top)\n \tvar(--component-button-primary-md-padding-right)\n \tvar(--component-button-primary-md-padding-bottom)\n \tvar(--component-button-primary-md-padding-left);\n \tfont: var(--component-button-primary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-primary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-primary-md-typography-font-width);\n \tborder: var(--component-button-primary-shared-border);\n \tborder-radius: var(\n \t\t--component-button-primary-shared-border-radius\n \t);\n }\n .stand-button-primary:hover {\n \tbackground: var(\n \t\t--component-button-primary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-primary-shared-hover-border);\n }\n .stand-button-primary:active {\n \tbackground: var(\n \t\t--component-button-primary-shared-active-background-color\n \t);\n \tborder: var(--component-button-primary-shared-active-border);\n }\n .stand-button-primary:disabled {\n \tcolor: var(--component-button-primary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-primary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-primary-shared-disabled-border);\n \t}\n \t.stand-button-primary > .material-symbols {\n \tfont-size: var(--component-button-primary-md-icon-size);\n \t}\n \t.stand-button-primary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-primary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-primary-md-icon-gap);\n }\n\n /* example setup of button/link button style using md size and neutral secondary variant */\n .stand-button-tertiary {\n \tcolor: var(--component-button-tertiary-shared-color);\n \tbackground: var(--component-button-tertiary-shared-background-color);\n \theight: var(--component-button-tertiary-md-height);\n \tpadding: var(--component-button-tertiary-md-padding-top)\n \tvar(--component-button-tertiary-md-padding-right)\n \tvar(--component-button-tertiary-md-padding-bottom)\n \tvar(--component-button-tertiary-md-padding-left);\n \tfont: var(--component-button-tertiary-md-typography-font);\n \tletter-spacing: var(\n \t\t--component-button-tertiary-md-typography-letter-spacing\n \t);\n \tfont-variation-settings: \"wdth\"\n \tvar(--component-button-tertiary-md-typography-font-width);\n \tborder: var(--component-button-tertiary-shared-border);\n \tborder-radius: var(--component-button-tertiary-shared-border-radius);\n }\n .stand-button-tertiary:hover {\n \tbackground: var(\n \t\t--component-button-tertiary-shared-hover-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-hover-border);\n }\n .stand-button-tertiary:active {\n \tbackground: var(\n \t\t--component-button-tertiary-shared-active-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-active-border);\n }\n .stand-button-tertiary:disabled {\n \tcolor: var(--component-button-tertiary-shared-disabled-color);\n \tbackground: var(\n \t\t--component-button-tertiary-shared-disabled-background-color\n \t);\n \tborder: var(--component-button-tertiary-shared-disabled-border);\n }\n .stand-button-tertiary > .material-symbols {\n \tfont-size: var(--component-button-tertiary-md-icon-size);\n }\n .stand-button-tertiary:has(> .material-symbols) {\n \tpadding-left: var(\n \t\t--component-button-tertiary-md-padding-with-icon-icon-left-left\n \t);\n \tgap: var(--component-button-tertiary-md-icon-gap);\n }\n\n";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container flow-column\">\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-primary\">Button</button>\n \t<button class=\"stand-button stand-button-primary\" disabled>Disabled Button</button>\n </div>\n\n <div class=\"container\">\n \t<button class=\"stand-button stand-button-tertiary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t<button class=\"stand-button stand-button-tertiary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n </div>\n\n</div>\n";
|
|
5
|
+
export declare const componentJs = "\t// for ts/js\n\t\timport { componentButton } from \"@guardian/stand\";\n\n \t// example of creating a stylesheet in js\n \tconst sheet = new CSSStyleSheet();\n\n \t// apply the rules to the sheet\n \tsheet.replaceSync(`\n \t/* shared button styles for all variants */\n \t.js-stand-button {\n \t\tdisplay: ${componentButton.shared.display};\n \t\t-webkit-appearance: ${componentButton.shared[\"-webkit-appearance\"]};\n \t\ttext-align: ${componentButton.shared[\"text-align\"]};\n \t\tbox-shadow: ${componentButton.shared[\"box-shadow\"]};\n \t\ttext-decoration: ${componentButton.shared[\"text-decoration\"]};\n \t\tcursor: ${componentButton.shared.cursor};\n \t\tjustify-content: ${componentButton.shared[\"justify-content\"]};\n \t\talign-items: ${componentButton.shared[\"align-items\"]};\n \t}\n \t.js-stand-button:focus-visible {\n \t\toutline: ${componentButton.shared[\":focus-visible\"].outline};\n \t\toutline-offset: ${componentButton.shared[\":focus-visible\"][\"outline-offset\"]};\n \t}\n \t.js-stand-button:disabled {\n \t\tcursor: ${componentButton.shared[\":disabled\"].cursor};\n \t}\n\n \t/* example setup of button/link button style using md size and emphasised primary variant */\n \t.js-stand-button-primary {\n \t\tcolor: ${componentButton[\"primary\"].shared.color};\n \t\tbackground: ${componentButton[\"primary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"primary\"].md.height};\n \t\tpadding: ${componentButton[\"primary\"].md.padding.top}\n \t\t${componentButton[\"primary\"].md.padding.right}\n \t\t${componentButton[\"primary\"].md.padding.bottom}\n \t\t${componentButton[\"primary\"].md.padding.left};\n \t\tfont: ${componentButton[\"primary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"primary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"primary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"primary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"primary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-primary:hover {\n \t\tbackground: ${componentButton[\"primary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":hover\"].border}\n \t}\n \t.js-stand-button-primary:active {\n \t\tbackground: ${componentButton[\"primary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-primary:disabled {\n \t\tcolor: ${componentButton[\"primary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"primary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"primary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-primary > .material-symbols {\n \t\tfont-size: ${componentButton[\"primary\"].md.icon.size}\n \t}\n \t.js-stand-button-primary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"primary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"primary\"].md.icon.gap};\n \t}\n\n \t/* example setup of button/link button style using md size and neutral secondary variant */\n \t.js-stand-button-tertiary {\n \t\tcolor: ${componentButton[\"tertiary\"].shared.color};\n \t\tbackground: ${componentButton[\"tertiary\"].shared.backgroundColor};\n \t\theight: ${componentButton[\"tertiary\"].md.height};\n \t\tpadding: ${componentButton[\"tertiary\"].md.padding.top}\n \t\t${componentButton[\"tertiary\"].md.padding.right}\n \t\t${componentButton[\"tertiary\"].md.padding.bottom}\n \t\t${componentButton[\"tertiary\"].md.padding.left};\n \t\tfont: ${componentButton[\"tertiary\"].md.typography.font};\n \t\tletter-spacing: ${componentButton[\"tertiary\"].md.typography.letterSpacing};\n \t\tfont-variation-settings: 'wdth'\n \t\t${componentButton[\"tertiary\"].md.typography.fontWidth};\n \t\tborder: ${componentButton[\"tertiary\"].shared.border};\n \t\tborder-radius: ${componentButton[\"tertiary\"].shared.borderRadius};\n \t}\n \t.js-stand-button-tertiary:hover {\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":hover\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":hover\"].border};\n \t}\n \t.js-stand-button-tertiary:active {\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":active\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":active\"].border};\n \t}\n \t.js-stand-button-tertiary:disabled {\n \t\tcolor: ${componentButton[\"tertiary\"].shared[\":disabled\"].color};\n \t\tbackground: ${componentButton[\"tertiary\"].shared[\":disabled\"].backgroundColor};\n \t\tborder: ${componentButton[\"tertiary\"].shared[\":disabled\"].border};\n \t}\n \t.js-stand-button-tertiary > .material-symbols {\n \t\tfont-size: ${componentButton[\"tertiary\"].md.icon.size}\n \t}\n \t.js-stand-button-tertiary:has(> .material-symbols) {\n \t\tpadding-left: ${componentButton[\"tertiary\"].md.padding.withIcon.iconLeft.left};\n \t\tgap: ${componentButton[\"tertiary\"].md.icon.gap};\n \t}\n\n `);\n\n // update the document with the sheet\n document.adoptedStyleSheets.push(sheet);\n\n // modify the dom with the button components using the generated stylesheet\n document.getElementById(\"app\").innerHTML = `<div class=\"container flow-column\">\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-primary\">Button</button>\n \t\t<button class=\"js-stand-button js-stand-button-primary\" disabled>Disabled Button</button>\n \t</div>\n \t<div class=\"container\">\n \t\t<button class=\"js-stand-button js-stand-button-tertiary\"><span class=\"material-symbols\">raven</span>Button with Icon</button>\n \t\t<button class=\"js-stand-button js-stand-button-tertiary\" disabled><span class=\"material-symbols\">owl</span>Disabled Button with Icon</button>\n \t</div>\n </div>`;\n\n";
|
|
@@ -6,7 +6,7 @@ export interface ButtonProps extends DefaultProps<ButtonTheme, RACButtonProps['c
|
|
|
6
6
|
/**
|
|
7
7
|
* Size variant of the button
|
|
8
8
|
*/
|
|
9
|
-
size?: keyof Omit<ButtonTheme['
|
|
9
|
+
size?: keyof Omit<ButtonTheme['primary'], 'shared'>;
|
|
10
10
|
/**
|
|
11
11
|
* Variant of the button
|
|
12
12
|
*/
|