@apolitical/component-library 0.0.4-beta.1 → 0.0.4-beta.11
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/fonts/Moderat-Black-Italic.woff2 +0 -0
- package/fonts/Moderat-Black.woff2 +0 -0
- package/fonts/Moderat-Bold-Italic.woff2 +0 -0
- package/fonts/Moderat-Bold.woff2 +0 -0
- package/fonts/Moderat-Medium-Italic.woff2 +0 -0
- package/fonts/Moderat-Medium.woff2 +0 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +33 -5
- package/layout/index.d.ts +1 -0
- package/layout/layout.d.ts +6 -0
- package/package.json +3 -2
- package/style.css +1 -1
- package/styles/README.md +35 -0
- package/styles/base-styles/_accessibility.scss +26 -0
- package/styles/base-styles/_blockquotes.scss +29 -0
- package/styles/base-styles/_fonts.scss +42 -0
- package/styles/base-styles/_hr.scss +15 -0
- package/styles/base-styles/_index.scss +10 -0
- package/styles/base-styles/_links.scss +16 -0
- package/styles/base-styles/_lists.scss +27 -0
- package/styles/base-styles/_text.scss +80 -0
- package/styles/base-styles/_titles.scss +130 -0
- package/styles/base-styles/buttons/_buttons.scss +234 -0
- package/styles/base-styles/buttons/_icons.scss +24 -0
- package/styles/base-styles/buttons/_index.scss +1 -0
- package/styles/base-styles/buttons/_mixins.scss +30 -0
- package/styles/functions/_index.scss +1 -0
- package/styles/functions/_size-conversions.scss +8 -0
- package/styles/index.scss +9 -0
- package/styles/mixins/_animations.scss +7 -0
- package/styles/mixins/_backgrounds.scss +41 -0
- package/styles/mixins/_breakpoints.scss +18 -0
- package/styles/mixins/_index.scss +4 -0
- package/styles/mixins/_transitions.scss +32 -0
- package/styles/reset/_index.scss +1 -0
- package/styles/reset/_reset.scss +62 -0
- package/styles/variables/_index.scss +3 -0
- package/styles/variables/assets/_assets.scss +4 -0
- package/styles/variables/assets/_index.scss +1 -0
- package/styles/variables/colors/_colors.scss +64 -0
- package/styles/variables/colors/_index.scss +1 -0
- package/styles/variables/colors/_theme.scss +62 -0
- package/styles/variables/sizes/_common.scss +3 -0
- package/styles/variables/sizes/_index.scss +1 -0
- package/index.css +0 -1060
- package/index.css.map +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The default colours are defined here and referenced in `theme.scss`, which is what is used across the app.
|
|
2
|
+
// This lets us use a meaningful name across the platform, such as `background` or `title`, rather than use a colour name,
|
|
3
|
+
// like b900, which is likely to change in the future, but still have a clear consistency with Figma, which uses colour
|
|
4
|
+
// names.
|
|
5
|
+
|
|
6
|
+
$default-colors: (
|
|
7
|
+
'white': rgb(255 255 255 / 100%),
|
|
8
|
+
'black': rgb(0 0 0 / 100%),
|
|
9
|
+
'sand': rgb(252 250 243 / 100%),
|
|
10
|
+
|
|
11
|
+
'b50': rgb(248 247 255 / 100%),
|
|
12
|
+
'b100': rgb(222 220 250 / 100%),
|
|
13
|
+
'b200': rgb(197 194 245 / 100%),
|
|
14
|
+
'b300': rgb(175 171 239 / 100%),
|
|
15
|
+
'b500': rgb(124 114 225 / 100%),
|
|
16
|
+
'b600': rgb(101 89 212 / 100%),
|
|
17
|
+
'b700': rgb(79 67 186 / 100%),
|
|
18
|
+
'b800': rgb(57 45 135 / 100%),
|
|
19
|
+
'b900': rgb(33 24 77 / 100%),
|
|
20
|
+
|
|
21
|
+
'g50': rgb(235 250 246 / 100%),
|
|
22
|
+
'g100': rgb(195 240 228 / 100%),
|
|
23
|
+
'g300': rgb(124 220 197 / 100%),
|
|
24
|
+
'g600': rgb(43 137 117 / 100%),
|
|
25
|
+
'g700': rgb(28 104 88 / 100%),
|
|
26
|
+
'g900': rgb(10 38 33 / 100%),
|
|
27
|
+
|
|
28
|
+
'n50': rgb(240 245 255 / 100%),
|
|
29
|
+
'n100': rgb(215 224 239 / 100%),
|
|
30
|
+
'n200': rgb(192 203 223 / 100%),
|
|
31
|
+
'n500': rgb(117 131 160 / 100%),
|
|
32
|
+
'n600': rgb(89 101 128 / 100%),
|
|
33
|
+
'n700': rgb(64 74 97 / 100%),
|
|
34
|
+
'n800': rgb(42 49 65 / 100%),
|
|
35
|
+
'n900': rgb(21 25 33 / 100%),
|
|
36
|
+
|
|
37
|
+
'p50': rgb(255 242 255 / 100%),
|
|
38
|
+
'p100': rgb(238 200 237 / 100%),
|
|
39
|
+
'p300': rgb(203 130 197 / 100%),
|
|
40
|
+
'p500': rgb(166 55 152 / 100%),
|
|
41
|
+
'p900': rgb(66 1 55 / 100%),
|
|
42
|
+
|
|
43
|
+
'y50': rgb(255 248 232 / 100%),
|
|
44
|
+
'y100': rgb(255 238 193 / 100%),
|
|
45
|
+
'y300': rgb(255 230 139 / 100%),
|
|
46
|
+
'y700': rgb(122 81 5 / 100%),
|
|
47
|
+
'y900': rgb(48 29 0 / 100%),
|
|
48
|
+
|
|
49
|
+
'error50': rgb(255 242 242 / 100%),
|
|
50
|
+
'error600': rgb(195 65 65 / 100%),
|
|
51
|
+
'error700': rgb(155 36 36 / 100%),
|
|
52
|
+
|
|
53
|
+
'info50': rgb(240 245 247 / 100%),
|
|
54
|
+
'info500': rgb(30 117 166 / 100%),
|
|
55
|
+
'info600': rgb(20 95 139 / 100%),
|
|
56
|
+
|
|
57
|
+
'success50': rgb(235 247 239 / 100%),
|
|
58
|
+
'success500': rgb(60 124 82 / 100%),
|
|
59
|
+
'success600': rgb(38 103 60 / 100%),
|
|
60
|
+
|
|
61
|
+
'warning50': rgb(255 242 230 / 100%),
|
|
62
|
+
'warning500': rgb(220 121 29 / 100%),
|
|
63
|
+
'warning700': rgb(137 71 11 / 100%),
|
|
64
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'theme';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import 'colors';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
$c: $default-colors;
|
|
6
|
+
$theme: (
|
|
7
|
+
default_focus: map.get($c, 'b100'),
|
|
8
|
+
|
|
9
|
+
background: map.get($c, 'white'),
|
|
10
|
+
|
|
11
|
+
title: map.get($c, 'n900'),
|
|
12
|
+
subtitle: map.get($c, 'n800'),
|
|
13
|
+
text: map.get($c, 'n900'),
|
|
14
|
+
|
|
15
|
+
link: map.get($c, 'b700'),
|
|
16
|
+
link_hover: map.get($c, 'b800'),
|
|
17
|
+
|
|
18
|
+
button_primary: map.get($c, 'white'),
|
|
19
|
+
button_primary_bg: map.get($c, 'b700'),
|
|
20
|
+
button_primary_bg_hover: map.get($c, 'b500'),
|
|
21
|
+
button_primary_bg_active: map.get($c, 'b800'),
|
|
22
|
+
button_primary_bg_focus: map.get($c, 'b600'),
|
|
23
|
+
button_primary_bg_disabled: map.get($c, 'b700'),
|
|
24
|
+
button_primary_destructive: map.get($c, 'white'),
|
|
25
|
+
button_primary_destructive_bg: map.get($c, 'error600'),
|
|
26
|
+
button_primary_destructive_bg_hover: map.get($c, 'error700'),
|
|
27
|
+
button_primary_destructive_box-shadow: map.get($c, 'error50'),
|
|
28
|
+
|
|
29
|
+
button_secondary: map.get($c, 'b700'),
|
|
30
|
+
button_secondary_focus: map.get($c, 'white'),
|
|
31
|
+
button_secondary_muted: map.get($c, 'n600'),
|
|
32
|
+
button_secondary_muted_hover: map.get($c, 'b700'),
|
|
33
|
+
button_secondary_disabled: map.get($c, 'b700'),
|
|
34
|
+
button_secondary_bg: map.get($c, 'white'),
|
|
35
|
+
button_secondary_bg_hover: map.get($c, 'b200'),
|
|
36
|
+
button_secondary_bg_focus: map.get($c, 'b600'),
|
|
37
|
+
button_secondary_bg_active: map.get($c, 'b800'),
|
|
38
|
+
button_secondary_bg_muted: map.get($c, 'white'),
|
|
39
|
+
button_secondary_bg_disabled: map.get($c, 'white'),
|
|
40
|
+
button_secondary_border: map.get($c, 'b700'),
|
|
41
|
+
button_secondary_border_focus: transparent,
|
|
42
|
+
button_secondary_border_muted: map.get($c, 'n200'),
|
|
43
|
+
button_secondary_border_disabled: map.get($c, 'b700'),
|
|
44
|
+
|
|
45
|
+
button_tertiary: map.get($c, 'b700'),
|
|
46
|
+
button_tertiary_hover: map.get($c, 'b500'),
|
|
47
|
+
button_tertiary_active: map.get($c, 'b800'),
|
|
48
|
+
button_tertiary_muted: map.get($c, 'n600'),
|
|
49
|
+
button_tertiary_muted_hover: map.get($c, 'b500'),
|
|
50
|
+
button_tertiary_disabled: map.get($c, 'b700'),
|
|
51
|
+
button_tertiary_bg: none,
|
|
52
|
+
button_tertiary_disabled_bg: none,
|
|
53
|
+
button_tertiary_text-decoration: transparent,
|
|
54
|
+
button_tertiary_disabled_text-decoration: transparent,
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
blockquote: map.get($c, 'n900'),
|
|
58
|
+
'blockquote_border': map.get($c, 'g300'),
|
|
59
|
+
|
|
60
|
+
divider: map.get($c, 'n100'),
|
|
61
|
+
);
|
|
62
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'common';
|