@buildcanada/components 0.1.0
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/package.json +67 -0
- package/src/assets/fonts/financier-text-regular.woff2 +0 -0
- package/src/assets/fonts/founders-grotesk-mono-regular.woff2 +0 -0
- package/src/assets/fonts/soehne-kraftig.woff2 +0 -0
- package/src/content/Card/Card.scss +281 -0
- package/src/content/Card/Card.tsx +170 -0
- package/src/content/Card/index.ts +22 -0
- package/src/content/Hero/Hero.scss +150 -0
- package/src/content/Hero/Hero.tsx +63 -0
- package/src/content/Hero/index.ts +13 -0
- package/src/content/StatBlock/StatBlock.scss +83 -0
- package/src/content/StatBlock/StatBlock.tsx +52 -0
- package/src/content/StatBlock/index.ts +2 -0
- package/src/index.ts +57 -0
- package/src/layout/Container/Container.scss +40 -0
- package/src/layout/Container/Container.tsx +29 -0
- package/src/layout/Container/index.ts +2 -0
- package/src/layout/Divider/Divider.scss +117 -0
- package/src/layout/Divider/Divider.tsx +32 -0
- package/src/layout/Divider/index.ts +2 -0
- package/src/layout/Grid/Grid.scss +81 -0
- package/src/layout/Grid/Grid.tsx +75 -0
- package/src/layout/Grid/index.ts +2 -0
- package/src/layout/Section/Section.scss +74 -0
- package/src/layout/Section/Section.tsx +37 -0
- package/src/layout/Section/index.ts +2 -0
- package/src/layout/Stack/Stack.scss +61 -0
- package/src/layout/Stack/Stack.tsx +48 -0
- package/src/layout/Stack/index.ts +9 -0
- package/src/navigation/Footer/Footer.scss +233 -0
- package/src/navigation/Footer/Footer.tsx +174 -0
- package/src/navigation/Footer/index.ts +2 -0
- package/src/navigation/Header/Header.scss +325 -0
- package/src/navigation/Header/Header.tsx +185 -0
- package/src/navigation/Header/index.ts +2 -0
- package/src/primitives/Button/Button.scss +218 -0
- package/src/primitives/Button/Button.tsx +120 -0
- package/src/primitives/Button/index.ts +2 -0
- package/src/primitives/Checkbox/Checkbox.scss +114 -0
- package/src/primitives/Checkbox/Checkbox.tsx +75 -0
- package/src/primitives/Checkbox/index.ts +2 -0
- package/src/primitives/TextField/TextField.scss +93 -0
- package/src/primitives/TextField/TextField.tsx +105 -0
- package/src/primitives/TextField/index.ts +2 -0
- package/src/styles/fonts.scss +27 -0
- package/src/styles/main.scss +34 -0
- package/src/styles/tokens.scss +301 -0
- package/src/styles/typography.scss +232 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import cx from "classnames"
|
|
2
|
+
import { forwardRef, useId } from "react"
|
|
3
|
+
|
|
4
|
+
export type TextFieldType = "text" | "email" | "password" | "number" | "tel" | "url"
|
|
5
|
+
|
|
6
|
+
export interface TextFieldProps {
|
|
7
|
+
label?: string
|
|
8
|
+
placeholder?: string
|
|
9
|
+
value?: string
|
|
10
|
+
defaultValue?: string
|
|
11
|
+
type?: TextFieldType
|
|
12
|
+
name?: string
|
|
13
|
+
id?: string
|
|
14
|
+
className?: string
|
|
15
|
+
error?: string
|
|
16
|
+
hint?: string
|
|
17
|
+
disabled?: boolean
|
|
18
|
+
required?: boolean
|
|
19
|
+
autoComplete?: string
|
|
20
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
21
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void
|
|
22
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
26
|
+
function TextField(
|
|
27
|
+
{
|
|
28
|
+
label,
|
|
29
|
+
placeholder,
|
|
30
|
+
value,
|
|
31
|
+
defaultValue,
|
|
32
|
+
type = "text",
|
|
33
|
+
name,
|
|
34
|
+
id: providedId,
|
|
35
|
+
className,
|
|
36
|
+
error,
|
|
37
|
+
hint,
|
|
38
|
+
disabled = false,
|
|
39
|
+
required = false,
|
|
40
|
+
autoComplete,
|
|
41
|
+
onChange,
|
|
42
|
+
onBlur,
|
|
43
|
+
onFocus,
|
|
44
|
+
},
|
|
45
|
+
ref
|
|
46
|
+
) {
|
|
47
|
+
const generatedId = useId()
|
|
48
|
+
const id = providedId || generatedId
|
|
49
|
+
const errorId = `${id}-error`
|
|
50
|
+
const hintId = `${id}-hint`
|
|
51
|
+
|
|
52
|
+
const hasError = Boolean(error)
|
|
53
|
+
|
|
54
|
+
const classes = cx(
|
|
55
|
+
"bc-textfield",
|
|
56
|
+
{ "bc-textfield--error": hasError },
|
|
57
|
+
{ "bc-textfield--disabled": disabled },
|
|
58
|
+
className
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={classes}>
|
|
63
|
+
{label && (
|
|
64
|
+
<label htmlFor={id} className="bc-textfield__label">
|
|
65
|
+
{label}
|
|
66
|
+
{required && <span className="bc-textfield__required">*</span>}
|
|
67
|
+
</label>
|
|
68
|
+
)}
|
|
69
|
+
<input
|
|
70
|
+
ref={ref}
|
|
71
|
+
type={type}
|
|
72
|
+
id={id}
|
|
73
|
+
name={name}
|
|
74
|
+
value={value}
|
|
75
|
+
defaultValue={defaultValue}
|
|
76
|
+
placeholder={placeholder}
|
|
77
|
+
disabled={disabled}
|
|
78
|
+
required={required}
|
|
79
|
+
autoComplete={autoComplete}
|
|
80
|
+
className="bc-textfield__input"
|
|
81
|
+
aria-invalid={hasError}
|
|
82
|
+
aria-describedby={
|
|
83
|
+
[error && errorId, hint && hintId].filter(Boolean).join(" ") ||
|
|
84
|
+
undefined
|
|
85
|
+
}
|
|
86
|
+
onChange={onChange}
|
|
87
|
+
onBlur={onBlur}
|
|
88
|
+
onFocus={onFocus}
|
|
89
|
+
/>
|
|
90
|
+
{hint && !error && (
|
|
91
|
+
<p id={hintId} className="bc-textfield__hint">
|
|
92
|
+
{hint}
|
|
93
|
+
</p>
|
|
94
|
+
)}
|
|
95
|
+
{error && (
|
|
96
|
+
<p id={errorId} className="bc-textfield__error" role="alert">
|
|
97
|
+
{error}
|
|
98
|
+
</p>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
export default TextField
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* Build Canada Font Definitions
|
|
3
|
+
******************************************************************************/
|
|
4
|
+
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: 'Soehne Kraftig';
|
|
7
|
+
src: url('/assets/fonts/soehne-kraftig.woff2') format('woff2');
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-display: swap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Financier Text';
|
|
15
|
+
src: url('/assets/fonts/financier-text-regular.woff2') format('woff2');
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: 'Founders Grotesk Mono';
|
|
23
|
+
src: url('/assets/fonts/founders-grotesk-mono-regular.woff2') format('woff2');
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* Build Canada Components - Main Stylesheet
|
|
3
|
+
*
|
|
4
|
+
* All @use statements must come first before any other rules
|
|
5
|
+
******************************************************************************/
|
|
6
|
+
|
|
7
|
+
@use "fonts";
|
|
8
|
+
@use "tokens";
|
|
9
|
+
@use "typography";
|
|
10
|
+
|
|
11
|
+
// Component stylesheets (using @use to include their CSS output)
|
|
12
|
+
@use "../primitives/Button/Button.scss";
|
|
13
|
+
@use "../primitives/TextField/TextField.scss";
|
|
14
|
+
@use "../primitives/Checkbox/Checkbox.scss";
|
|
15
|
+
@use "../layout/Container/Container.scss";
|
|
16
|
+
@use "../layout/Section/Section.scss";
|
|
17
|
+
@use "../layout/Grid/Grid.scss";
|
|
18
|
+
@use "../layout/Stack/Stack.scss";
|
|
19
|
+
@use "../layout/Divider/Divider.scss";
|
|
20
|
+
@use "../content/Card/Card.scss";
|
|
21
|
+
@use "../content/Hero/Hero.scss";
|
|
22
|
+
@use "../content/StatBlock/StatBlock.scss";
|
|
23
|
+
@use "../navigation/Header/Header.scss";
|
|
24
|
+
@use "../navigation/Footer/Footer.scss";
|
|
25
|
+
|
|
26
|
+
/*******************************************************************************
|
|
27
|
+
* Base Styles
|
|
28
|
+
******************************************************************************/
|
|
29
|
+
|
|
30
|
+
*,
|
|
31
|
+
*::before,
|
|
32
|
+
*::after {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* Build Canada Design Tokens
|
|
3
|
+
******************************************************************************/
|
|
4
|
+
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
|
|
7
|
+
/*******************************************************************************
|
|
8
|
+
* Brand Colors
|
|
9
|
+
******************************************************************************/
|
|
10
|
+
|
|
11
|
+
$linen: #F6ECE3;
|
|
12
|
+
$charcoal: #272727;
|
|
13
|
+
$auburn: #932F2F;
|
|
14
|
+
$white: #FFFFFF;
|
|
15
|
+
|
|
16
|
+
/*******************************************************************************
|
|
17
|
+
* Auburn Scale (Primary - Red)
|
|
18
|
+
******************************************************************************/
|
|
19
|
+
|
|
20
|
+
$auburn-50: #fef2f2;
|
|
21
|
+
$auburn-100: #fee2e2;
|
|
22
|
+
$auburn-200: #fecaca;
|
|
23
|
+
$auburn-300: #fca5a5;
|
|
24
|
+
$auburn-400: #f87171;
|
|
25
|
+
$auburn-500: #932F2F;
|
|
26
|
+
$auburn-600: #7f2828;
|
|
27
|
+
$auburn-700: #6b2121;
|
|
28
|
+
$auburn-800: #571a1a;
|
|
29
|
+
$auburn-900: #431414;
|
|
30
|
+
$auburn-950: #2f0e0e;
|
|
31
|
+
|
|
32
|
+
/*******************************************************************************
|
|
33
|
+
* Cerulean Scale (Secondary - Blue)
|
|
34
|
+
******************************************************************************/
|
|
35
|
+
|
|
36
|
+
$cerulean-50: #effafc;
|
|
37
|
+
$cerulean-100: #d5f1f8;
|
|
38
|
+
$cerulean-200: #b1e3f0;
|
|
39
|
+
$cerulean-300: #7bcde5;
|
|
40
|
+
$cerulean-400: #3daed3;
|
|
41
|
+
$cerulean-500: #2397c0;
|
|
42
|
+
$cerulean-600: #1f759b;
|
|
43
|
+
$cerulean-700: #1f5f7f;
|
|
44
|
+
$cerulean-800: #224f68;
|
|
45
|
+
$cerulean-900: #204259;
|
|
46
|
+
$cerulean-950: #102b3c;
|
|
47
|
+
|
|
48
|
+
/*******************************************************************************
|
|
49
|
+
* Sienna Scale (Tertiary - Orange)
|
|
50
|
+
******************************************************************************/
|
|
51
|
+
|
|
52
|
+
$sienna-50: #fffbeb;
|
|
53
|
+
$sienna-100: #fef3c7;
|
|
54
|
+
$sienna-200: #fde68a;
|
|
55
|
+
$sienna-300: #fcd34d;
|
|
56
|
+
$sienna-400: #f5872c;
|
|
57
|
+
$sienna-500: #AF5D16;
|
|
58
|
+
$sienna-600: #92400e;
|
|
59
|
+
$sienna-700: #7f4a1f;
|
|
60
|
+
$sienna-800: #6b3a14;
|
|
61
|
+
$sienna-900: #5a2d0e;
|
|
62
|
+
$sienna-950: #451a0a;
|
|
63
|
+
|
|
64
|
+
/*******************************************************************************
|
|
65
|
+
* Fantasia Scale (Supporting - Purple)
|
|
66
|
+
******************************************************************************/
|
|
67
|
+
|
|
68
|
+
$fantasia-50: #faf5ff;
|
|
69
|
+
$fantasia-100: #f3e8ff;
|
|
70
|
+
$fantasia-200: #e9d5ff;
|
|
71
|
+
$fantasia-300: #d8b4fe;
|
|
72
|
+
$fantasia-400: #c084fc;
|
|
73
|
+
$fantasia-500: #653399;
|
|
74
|
+
$fantasia-600: #7c3aed;
|
|
75
|
+
$fantasia-700: #6d28d9;
|
|
76
|
+
$fantasia-800: #5b21b6;
|
|
77
|
+
$fantasia-900: #4c1d95;
|
|
78
|
+
$fantasia-950: #2e1065;
|
|
79
|
+
|
|
80
|
+
/*******************************************************************************
|
|
81
|
+
* Emerald Scale (Supporting - Green)
|
|
82
|
+
******************************************************************************/
|
|
83
|
+
|
|
84
|
+
$emerald-50: #ecfdf5;
|
|
85
|
+
$emerald-100: #d1fae5;
|
|
86
|
+
$emerald-200: #a7f3d0;
|
|
87
|
+
$emerald-300: #6ee7b7;
|
|
88
|
+
$emerald-400: #34d399;
|
|
89
|
+
$emerald-500: #2AB34B;
|
|
90
|
+
$emerald-600: #059669;
|
|
91
|
+
$emerald-700: #047857;
|
|
92
|
+
$emerald-800: #065f46;
|
|
93
|
+
$emerald-900: #064e3b;
|
|
94
|
+
$emerald-950: #022c22;
|
|
95
|
+
|
|
96
|
+
/*******************************************************************************
|
|
97
|
+
* Gray Scale (Neutrals)
|
|
98
|
+
******************************************************************************/
|
|
99
|
+
|
|
100
|
+
$gray-50: #fafafa;
|
|
101
|
+
$gray-100: #f5f5f5;
|
|
102
|
+
$gray-200: #e5e5e5;
|
|
103
|
+
$gray-300: #d4d4d4;
|
|
104
|
+
$gray-400: #a3a3a3;
|
|
105
|
+
$gray-500: #737373;
|
|
106
|
+
$gray-600: #525252;
|
|
107
|
+
$gray-700: #404040;
|
|
108
|
+
$gray-800: #272727;
|
|
109
|
+
$gray-900: #171717;
|
|
110
|
+
$gray-950: #0a0a0a;
|
|
111
|
+
|
|
112
|
+
/*******************************************************************************
|
|
113
|
+
* Semantic Colors
|
|
114
|
+
******************************************************************************/
|
|
115
|
+
|
|
116
|
+
$text-primary: $charcoal;
|
|
117
|
+
$text-secondary: $gray-600;
|
|
118
|
+
$text-muted: $gray-500;
|
|
119
|
+
$text-inverse: $white;
|
|
120
|
+
|
|
121
|
+
$bg-primary: $white;
|
|
122
|
+
$bg-secondary: $linen;
|
|
123
|
+
$bg-inverse: $charcoal;
|
|
124
|
+
|
|
125
|
+
$border-default: $gray-300;
|
|
126
|
+
$border-muted: $gray-200;
|
|
127
|
+
|
|
128
|
+
$accent-primary: $auburn;
|
|
129
|
+
$accent-secondary: $cerulean-500;
|
|
130
|
+
|
|
131
|
+
/*******************************************************************************
|
|
132
|
+
* Spacing (8px grid)
|
|
133
|
+
******************************************************************************/
|
|
134
|
+
|
|
135
|
+
$space-0: 0;
|
|
136
|
+
$space-1: 8px;
|
|
137
|
+
$space-2: 16px;
|
|
138
|
+
$space-3: 24px;
|
|
139
|
+
$space-4: 32px;
|
|
140
|
+
$space-5: 40px;
|
|
141
|
+
$space-6: 48px;
|
|
142
|
+
$space-8: 64px;
|
|
143
|
+
$space-10: 80px;
|
|
144
|
+
$space-12: 96px;
|
|
145
|
+
$space-16: 128px;
|
|
146
|
+
|
|
147
|
+
/*******************************************************************************
|
|
148
|
+
* Border Radius
|
|
149
|
+
******************************************************************************/
|
|
150
|
+
|
|
151
|
+
$radius-none: 0;
|
|
152
|
+
$radius-sm: 2px;
|
|
153
|
+
$radius-md: 4px;
|
|
154
|
+
$radius-lg: 8px;
|
|
155
|
+
$radius-full: 9999px;
|
|
156
|
+
|
|
157
|
+
/*******************************************************************************
|
|
158
|
+
* Shadows
|
|
159
|
+
******************************************************************************/
|
|
160
|
+
|
|
161
|
+
$shadow-sm: 0 1px 2px rgba(39, 39, 39, 0.05);
|
|
162
|
+
$shadow-md: 0 4px 6px rgba(39, 39, 39, 0.1);
|
|
163
|
+
$shadow-lg: 0 10px 15px rgba(39, 39, 39, 0.1);
|
|
164
|
+
$shadow-xl: 0 20px 25px rgba(39, 39, 39, 0.1);
|
|
165
|
+
|
|
166
|
+
/*******************************************************************************
|
|
167
|
+
* Breakpoints
|
|
168
|
+
******************************************************************************/
|
|
169
|
+
|
|
170
|
+
$breakpoint-sm: 640px;
|
|
171
|
+
$breakpoint-md: 768px;
|
|
172
|
+
$breakpoint-lg: 1024px;
|
|
173
|
+
$breakpoint-xl: 1280px;
|
|
174
|
+
$breakpoint-2xl: 1536px;
|
|
175
|
+
|
|
176
|
+
/*******************************************************************************
|
|
177
|
+
* Breakpoint Mixins
|
|
178
|
+
******************************************************************************/
|
|
179
|
+
|
|
180
|
+
@mixin sm-up {
|
|
181
|
+
@media (min-width: #{$breakpoint-sm}) {
|
|
182
|
+
@content;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@mixin md-up {
|
|
187
|
+
@media (min-width: #{$breakpoint-md}) {
|
|
188
|
+
@content;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@mixin lg-up {
|
|
193
|
+
@media (min-width: #{$breakpoint-lg}) {
|
|
194
|
+
@content;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@mixin xl-up {
|
|
199
|
+
@media (min-width: #{$breakpoint-xl}) {
|
|
200
|
+
@content;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@mixin sm-down {
|
|
205
|
+
@media (max-width: #{$breakpoint-sm - 1}) {
|
|
206
|
+
@content;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@mixin md-down {
|
|
211
|
+
@media (max-width: #{$breakpoint-md - 1}) {
|
|
212
|
+
@content;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@mixin lg-down {
|
|
217
|
+
@media (max-width: #{$breakpoint-lg - 1}) {
|
|
218
|
+
@content;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/*******************************************************************************
|
|
223
|
+
* Z-Index Scale
|
|
224
|
+
******************************************************************************/
|
|
225
|
+
|
|
226
|
+
$z-dropdown: 1000;
|
|
227
|
+
$z-sticky: 1020;
|
|
228
|
+
$z-fixed: 1030;
|
|
229
|
+
$z-modal-backdrop: 1040;
|
|
230
|
+
$z-modal: 1050;
|
|
231
|
+
$z-popover: 1060;
|
|
232
|
+
$z-tooltip: 1070;
|
|
233
|
+
|
|
234
|
+
/*******************************************************************************
|
|
235
|
+
* Transitions
|
|
236
|
+
******************************************************************************/
|
|
237
|
+
|
|
238
|
+
$transition-fast: 150ms ease;
|
|
239
|
+
$transition-base: 200ms ease;
|
|
240
|
+
$transition-slow: 300ms ease;
|
|
241
|
+
|
|
242
|
+
/*******************************************************************************
|
|
243
|
+
* CSS Custom Properties Export
|
|
244
|
+
******************************************************************************/
|
|
245
|
+
|
|
246
|
+
:root {
|
|
247
|
+
// Brand
|
|
248
|
+
--bc-linen: #{$linen};
|
|
249
|
+
--bc-charcoal: #{$charcoal};
|
|
250
|
+
--bc-auburn: #{$auburn};
|
|
251
|
+
--bc-white: #{$white};
|
|
252
|
+
|
|
253
|
+
// Auburn scale
|
|
254
|
+
--bc-auburn-50: #{$auburn-50};
|
|
255
|
+
--bc-auburn-100: #{$auburn-100};
|
|
256
|
+
--bc-auburn-200: #{$auburn-200};
|
|
257
|
+
--bc-auburn-300: #{$auburn-300};
|
|
258
|
+
--bc-auburn-400: #{$auburn-400};
|
|
259
|
+
--bc-auburn-500: #{$auburn-500};
|
|
260
|
+
--bc-auburn-600: #{$auburn-600};
|
|
261
|
+
--bc-auburn-700: #{$auburn-700};
|
|
262
|
+
--bc-auburn-800: #{$auburn-800};
|
|
263
|
+
--bc-auburn-900: #{$auburn-900};
|
|
264
|
+
--bc-auburn-950: #{$auburn-950};
|
|
265
|
+
|
|
266
|
+
// Cerulean scale
|
|
267
|
+
--bc-cerulean-50: #{$cerulean-50};
|
|
268
|
+
--bc-cerulean-100: #{$cerulean-100};
|
|
269
|
+
--bc-cerulean-200: #{$cerulean-200};
|
|
270
|
+
--bc-cerulean-300: #{$cerulean-300};
|
|
271
|
+
--bc-cerulean-400: #{$cerulean-400};
|
|
272
|
+
--bc-cerulean-500: #{$cerulean-500};
|
|
273
|
+
--bc-cerulean-600: #{$cerulean-600};
|
|
274
|
+
--bc-cerulean-700: #{$cerulean-700};
|
|
275
|
+
--bc-cerulean-800: #{$cerulean-800};
|
|
276
|
+
--bc-cerulean-900: #{$cerulean-900};
|
|
277
|
+
--bc-cerulean-950: #{$cerulean-950};
|
|
278
|
+
|
|
279
|
+
// Gray scale
|
|
280
|
+
--bc-gray-50: #{$gray-50};
|
|
281
|
+
--bc-gray-100: #{$gray-100};
|
|
282
|
+
--bc-gray-200: #{$gray-200};
|
|
283
|
+
--bc-gray-300: #{$gray-300};
|
|
284
|
+
--bc-gray-400: #{$gray-400};
|
|
285
|
+
--bc-gray-500: #{$gray-500};
|
|
286
|
+
--bc-gray-600: #{$gray-600};
|
|
287
|
+
--bc-gray-700: #{$gray-700};
|
|
288
|
+
--bc-gray-800: #{$gray-800};
|
|
289
|
+
--bc-gray-900: #{$gray-900};
|
|
290
|
+
--bc-gray-950: #{$gray-950};
|
|
291
|
+
|
|
292
|
+
// Spacing
|
|
293
|
+
--bc-space-1: #{$space-1};
|
|
294
|
+
--bc-space-2: #{$space-2};
|
|
295
|
+
--bc-space-3: #{$space-3};
|
|
296
|
+
--bc-space-4: #{$space-4};
|
|
297
|
+
--bc-space-5: #{$space-5};
|
|
298
|
+
--bc-space-6: #{$space-6};
|
|
299
|
+
--bc-space-8: #{$space-8};
|
|
300
|
+
--bc-space-10: #{$space-10};
|
|
301
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* Build Canada Typography System
|
|
3
|
+
******************************************************************************/
|
|
4
|
+
|
|
5
|
+
@use "tokens" as *;
|
|
6
|
+
|
|
7
|
+
/*******************************************************************************
|
|
8
|
+
* Font Stacks
|
|
9
|
+
******************************************************************************/
|
|
10
|
+
|
|
11
|
+
$font-headline: 'Soehne Kraftig', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
12
|
+
$font-body: 'Financier Text', Georgia, 'Times New Roman', serif;
|
|
13
|
+
$font-mono: 'Founders Grotesk Mono', 'Courier New', Courier, monospace;
|
|
14
|
+
|
|
15
|
+
/*******************************************************************************
|
|
16
|
+
* Display Styles (Large Headlines)
|
|
17
|
+
******************************************************************************/
|
|
18
|
+
|
|
19
|
+
@mixin display-1 {
|
|
20
|
+
font-family: $font-headline;
|
|
21
|
+
font-size: 3.5rem;
|
|
22
|
+
line-height: 1.1;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
letter-spacing: -0.02em;
|
|
25
|
+
color: $text-primary;
|
|
26
|
+
|
|
27
|
+
@include md-down {
|
|
28
|
+
font-size: 2.5rem;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin display-2 {
|
|
33
|
+
font-family: $font-headline;
|
|
34
|
+
font-size: 2.5rem;
|
|
35
|
+
line-height: 1.15;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
letter-spacing: -0.01em;
|
|
38
|
+
color: $text-primary;
|
|
39
|
+
|
|
40
|
+
@include md-down {
|
|
41
|
+
font-size: 2rem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*******************************************************************************
|
|
46
|
+
* Heading Styles
|
|
47
|
+
******************************************************************************/
|
|
48
|
+
|
|
49
|
+
@mixin h1 {
|
|
50
|
+
font-family: $font-headline;
|
|
51
|
+
font-size: 2rem;
|
|
52
|
+
line-height: 1.2;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
color: $text-primary;
|
|
55
|
+
|
|
56
|
+
@include md-down {
|
|
57
|
+
font-size: 1.75rem;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin h2 {
|
|
62
|
+
font-family: $font-headline;
|
|
63
|
+
font-size: 1.5rem;
|
|
64
|
+
line-height: 1.25;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
color: $text-primary;
|
|
67
|
+
|
|
68
|
+
@include md-down {
|
|
69
|
+
font-size: 1.25rem;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin h3 {
|
|
74
|
+
font-family: $font-headline;
|
|
75
|
+
font-size: 1.25rem;
|
|
76
|
+
line-height: 1.3;
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
color: $text-primary;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin h4 {
|
|
82
|
+
font-family: $font-headline;
|
|
83
|
+
font-size: 1rem;
|
|
84
|
+
line-height: 1.4;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
color: $text-primary;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@mixin h5 {
|
|
90
|
+
font-family: $font-headline;
|
|
91
|
+
font-size: 0.875rem;
|
|
92
|
+
line-height: 1.4;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
color: $text-primary;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin h6 {
|
|
98
|
+
font-family: $font-headline;
|
|
99
|
+
font-size: 0.75rem;
|
|
100
|
+
line-height: 1.4;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
text-transform: uppercase;
|
|
103
|
+
letter-spacing: 0.05em;
|
|
104
|
+
color: $text-primary;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*******************************************************************************
|
|
108
|
+
* Body Styles
|
|
109
|
+
******************************************************************************/
|
|
110
|
+
|
|
111
|
+
@mixin body-lg {
|
|
112
|
+
font-family: $font-body;
|
|
113
|
+
font-size: 1.25rem;
|
|
114
|
+
line-height: 1.6;
|
|
115
|
+
font-weight: 400;
|
|
116
|
+
color: $text-primary;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@mixin body-1 {
|
|
120
|
+
font-family: $font-body;
|
|
121
|
+
font-size: 1.125rem;
|
|
122
|
+
line-height: 1.6;
|
|
123
|
+
font-weight: 400;
|
|
124
|
+
color: $text-primary;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@mixin body-2 {
|
|
128
|
+
font-family: $font-body;
|
|
129
|
+
font-size: 1rem;
|
|
130
|
+
line-height: 1.5;
|
|
131
|
+
font-weight: 400;
|
|
132
|
+
color: $text-primary;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@mixin body-3 {
|
|
136
|
+
font-family: $font-body;
|
|
137
|
+
font-size: 0.875rem;
|
|
138
|
+
line-height: 1.5;
|
|
139
|
+
font-weight: 400;
|
|
140
|
+
color: $text-primary;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/*******************************************************************************
|
|
144
|
+
* Mono/Code Styles
|
|
145
|
+
******************************************************************************/
|
|
146
|
+
|
|
147
|
+
@mixin mono {
|
|
148
|
+
font-family: $font-mono;
|
|
149
|
+
font-size: 0.875rem;
|
|
150
|
+
line-height: 1.4;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@mixin mono-sm {
|
|
155
|
+
font-family: $font-mono;
|
|
156
|
+
font-size: 0.75rem;
|
|
157
|
+
line-height: 1.4;
|
|
158
|
+
font-weight: 400;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/*******************************************************************************
|
|
162
|
+
* Micro/Label Styles (For data labels, axis ticks, etc.)
|
|
163
|
+
******************************************************************************/
|
|
164
|
+
|
|
165
|
+
@mixin micro {
|
|
166
|
+
font-family: $font-mono;
|
|
167
|
+
font-size: 0.75rem;
|
|
168
|
+
line-height: 1.3;
|
|
169
|
+
font-weight: 400;
|
|
170
|
+
text-transform: uppercase;
|
|
171
|
+
letter-spacing: 0.05em;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@mixin label {
|
|
175
|
+
font-family: $font-headline;
|
|
176
|
+
font-size: 0.875rem;
|
|
177
|
+
line-height: 1.2;
|
|
178
|
+
font-weight: 500;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@mixin label-sm {
|
|
182
|
+
font-family: $font-headline;
|
|
183
|
+
font-size: 0.8125rem;
|
|
184
|
+
line-height: 1.2;
|
|
185
|
+
font-weight: 500;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/*******************************************************************************
|
|
189
|
+
* Button Text Style
|
|
190
|
+
******************************************************************************/
|
|
191
|
+
|
|
192
|
+
@mixin button-text {
|
|
193
|
+
font-family: $font-headline;
|
|
194
|
+
font-weight: 500;
|
|
195
|
+
text-transform: uppercase;
|
|
196
|
+
letter-spacing: 0.05em;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@mixin button-text-sm {
|
|
200
|
+
@include button-text;
|
|
201
|
+
font-size: 0.75rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@mixin button-text-md {
|
|
205
|
+
@include button-text;
|
|
206
|
+
font-size: 0.875rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@mixin button-text-lg {
|
|
210
|
+
@include button-text;
|
|
211
|
+
font-size: 1rem;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/*******************************************************************************
|
|
215
|
+
* Utility Classes
|
|
216
|
+
******************************************************************************/
|
|
217
|
+
|
|
218
|
+
.bc-display-1 { @include display-1; }
|
|
219
|
+
.bc-display-2 { @include display-2; }
|
|
220
|
+
.bc-h1 { @include h1; }
|
|
221
|
+
.bc-h2 { @include h2; }
|
|
222
|
+
.bc-h3 { @include h3; }
|
|
223
|
+
.bc-h4 { @include h4; }
|
|
224
|
+
.bc-h5 { @include h5; }
|
|
225
|
+
.bc-h6 { @include h6; }
|
|
226
|
+
.bc-body-lg { @include body-lg; }
|
|
227
|
+
.bc-body-1 { @include body-1; }
|
|
228
|
+
.bc-body-2 { @include body-2; }
|
|
229
|
+
.bc-body-3 { @include body-3; }
|
|
230
|
+
.bc-mono { @include mono; }
|
|
231
|
+
.bc-micro { @include micro; }
|
|
232
|
+
.bc-label { @include label; }
|