@instructure/ui-themes 10.0.1-snapshot-14 → 10.2.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/CHANGELOG.md +16 -2
- package/README.md +4 -4
- package/es/index.js +5 -3
- package/es/sharedThemeTokens/borders.js +45 -0
- package/es/sharedThemeTokens/breakpoints.js +57 -0
- package/es/sharedThemeTokens/colors/dataVisualization.js +138 -0
- package/es/sharedThemeTokens/colors/primitives.js +172 -0
- package/es/sharedThemeTokens/forms.js +31 -0
- package/es/sharedThemeTokens/index.js +46 -0
- package/es/sharedThemeTokens/media.js +32 -0
- package/es/sharedThemeTokens/shadows.js +36 -0
- package/es/sharedThemeTokens/spacing.js +45 -0
- package/es/sharedThemeTokens/stacking.js +32 -0
- package/es/sharedThemeTokens/transitions.js +30 -0
- package/es/sharedThemeTokens/typography.js +54 -0
- package/es/themes/canvas/colors.js +67 -0
- package/es/themes/canvas/index.js +54 -0
- package/es/themes/canvasHighContrast/colors.js +67 -0
- package/es/themes/canvasHighContrast/index.js +36 -0
- package/es/utils/getUIColors.js +59 -0
- package/lib/index.js +26 -5
- package/lib/sharedThemeTokens/borders.js +50 -0
- package/lib/sharedThemeTokens/breakpoints.js +62 -0
- package/lib/sharedThemeTokens/colors/dataVisualization.js +144 -0
- package/lib/sharedThemeTokens/colors/primitives.js +178 -0
- package/lib/sharedThemeTokens/forms.js +36 -0
- package/lib/sharedThemeTokens/index.js +51 -0
- package/lib/sharedThemeTokens/media.js +37 -0
- package/lib/sharedThemeTokens/shadows.js +41 -0
- package/lib/sharedThemeTokens/spacing.js +50 -0
- package/lib/sharedThemeTokens/stacking.js +37 -0
- package/lib/sharedThemeTokens/transitions.js +35 -0
- package/lib/sharedThemeTokens/typography.js +59 -0
- package/lib/themes/canvas/colors.js +73 -0
- package/lib/themes/canvas/index.js +60 -0
- package/lib/themes/canvasHighContrast/colors.js +73 -0
- package/lib/themes/canvasHighContrast/index.js +43 -0
- package/lib/utils/getUIColors.js +66 -0
- package/package.json +4 -6
- package/src/index.ts +28 -9
- package/src/sharedThemeTokens/borders.ts +42 -0
- package/src/sharedThemeTokens/breakpoints.ts +54 -0
- package/src/sharedThemeTokens/colors/dataVisualization.ts +151 -0
- package/src/sharedThemeTokens/colors/primitives.ts +190 -0
- package/src/sharedThemeTokens/forms.ts +34 -0
- package/src/sharedThemeTokens/index.ts +48 -0
- package/src/sharedThemeTokens/media.ts +35 -0
- package/src/sharedThemeTokens/shadows.ts +45 -0
- package/src/sharedThemeTokens/spacing.ts +40 -0
- package/src/sharedThemeTokens/stacking.ts +34 -0
- package/src/sharedThemeTokens/transitions.ts +33 -0
- package/src/sharedThemeTokens/typography.ts +53 -0
- package/src/themes/canvas/colors.ts +76 -0
- package/src/themes/canvas/index.ts +69 -0
- package/src/themes/canvasHighContrast/colors.ts +76 -0
- package/src/themes/canvasHighContrast/index.ts +44 -0
- package/src/utils/getUIColors.ts +68 -0
- package/tokens/canvas/scss/_variables.scss +151 -0
- package/tokens/canvas/source.json +1 -0
- package/tsconfig.build.json +1 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/index.d.ts +9 -7
- package/types/index.d.ts.map +1 -1
- package/types/sharedThemeTokens/borders.d.ts +5 -0
- package/types/sharedThemeTokens/borders.d.ts.map +1 -0
- package/types/sharedThemeTokens/breakpoints.d.ts +5 -0
- package/types/sharedThemeTokens/breakpoints.d.ts.map +1 -0
- package/types/sharedThemeTokens/colors/dataVisualization.d.ts +4 -0
- package/types/sharedThemeTokens/colors/dataVisualization.d.ts.map +1 -0
- package/types/sharedThemeTokens/colors/primitives.d.ts +4 -0
- package/types/sharedThemeTokens/colors/primitives.d.ts.map +1 -0
- package/types/sharedThemeTokens/forms.d.ts +5 -0
- package/types/sharedThemeTokens/forms.d.ts.map +1 -0
- package/types/sharedThemeTokens/index.d.ts +14 -0
- package/types/sharedThemeTokens/index.d.ts.map +1 -0
- package/types/sharedThemeTokens/media.d.ts +5 -0
- package/types/sharedThemeTokens/media.d.ts.map +1 -0
- package/types/sharedThemeTokens/shadows.d.ts +5 -0
- package/types/sharedThemeTokens/shadows.d.ts.map +1 -0
- package/types/sharedThemeTokens/spacing.d.ts +5 -0
- package/types/sharedThemeTokens/spacing.d.ts.map +1 -0
- package/types/sharedThemeTokens/stacking.d.ts +5 -0
- package/types/sharedThemeTokens/stacking.d.ts.map +1 -0
- package/types/sharedThemeTokens/transitions.d.ts +5 -0
- package/types/sharedThemeTokens/transitions.d.ts.map +1 -0
- package/types/sharedThemeTokens/typography.d.ts +5 -0
- package/types/sharedThemeTokens/typography.d.ts.map +1 -0
- package/types/themes/canvas/colors.d.ts +16 -0
- package/types/themes/canvas/colors.d.ts.map +1 -0
- package/types/themes/canvas/index.d.ts +27 -0
- package/types/themes/canvas/index.d.ts.map +1 -0
- package/types/themes/canvasHighContrast/colors.d.ts +16 -0
- package/types/themes/canvasHighContrast/colors.d.ts.map +1 -0
- package/types/themes/canvasHighContrast/index.d.ts +10 -0
- package/types/themes/canvasHighContrast/index.d.ts.map +1 -0
- package/types/utils/getUIColors.d.ts +4 -0
- package/types/utils/getUIColors.d.ts.map +1 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Primitives, AdditionalPrimitives } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
export const primitives: Primitives = {
|
|
28
|
+
white: '#FFFFFF',
|
|
29
|
+
white10op75: '#FFFFFFBF',
|
|
30
|
+
|
|
31
|
+
grey11: '#F2F4F4',
|
|
32
|
+
grey12: '#E8EAEC',
|
|
33
|
+
grey14: '#D7DADE',
|
|
34
|
+
grey24: '#9EA6AD',
|
|
35
|
+
grey45: '#6A7883',
|
|
36
|
+
grey57: '#586874',
|
|
37
|
+
grey70: '#4A5B68',
|
|
38
|
+
grey82: '#3F515E',
|
|
39
|
+
grey100: '#334451',
|
|
40
|
+
grey100op75: '#334451BF',
|
|
41
|
+
grey125: '#273540',
|
|
42
|
+
|
|
43
|
+
blue12: '#E0EBF5',
|
|
44
|
+
blue45: '#2B7ABC',
|
|
45
|
+
blue57: '#0E68B3',
|
|
46
|
+
blue70: '#0A5A9E',
|
|
47
|
+
blue82: '#09508C',
|
|
48
|
+
|
|
49
|
+
green12: '#DCEEE4',
|
|
50
|
+
green45: '#03893D',
|
|
51
|
+
green57: '#027634',
|
|
52
|
+
green70: '#02672D',
|
|
53
|
+
green82: '#015B28',
|
|
54
|
+
|
|
55
|
+
orange12: '#FCE5D9',
|
|
56
|
+
orange30: '#F06E26',
|
|
57
|
+
orange45: '#CF4A00',
|
|
58
|
+
orange57: '#B34000',
|
|
59
|
+
orange70: '#9C3800',
|
|
60
|
+
orange82: '#8B3200',
|
|
61
|
+
|
|
62
|
+
red12: '#FCE4E5',
|
|
63
|
+
red45: '#E62429',
|
|
64
|
+
red57: '#C71F23',
|
|
65
|
+
red70: '#AE1B1F',
|
|
66
|
+
red82: '#9B181C'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const additionalPrimitives: AdditionalPrimitives = {
|
|
70
|
+
rose12: '#FEE4E4',
|
|
71
|
+
rose30: '#FB5D5D',
|
|
72
|
+
rose35: '#FA3F3F',
|
|
73
|
+
rose40: '#FA1A1A',
|
|
74
|
+
rose45: '#ED0000',
|
|
75
|
+
rose50: '#E00000',
|
|
76
|
+
rose57: '#CE0000',
|
|
77
|
+
rose70: '#B50000',
|
|
78
|
+
rose90: '#970000',
|
|
79
|
+
rose110: '#7F0000',
|
|
80
|
+
|
|
81
|
+
copper12: '#FFE5D3',
|
|
82
|
+
copper30: '#EE6D15',
|
|
83
|
+
copper35: '#DB6414',
|
|
84
|
+
copper40: '#CD5E12',
|
|
85
|
+
copper45: '#BF5811',
|
|
86
|
+
copper50: '#B45310',
|
|
87
|
+
copper57: '#A54C0F',
|
|
88
|
+
copper70: '#90420D',
|
|
89
|
+
copper90: '#77360B',
|
|
90
|
+
copper110: '#622D09',
|
|
91
|
+
|
|
92
|
+
honey12: '#F5E9CA',
|
|
93
|
+
honey30: '#C08A00',
|
|
94
|
+
honey35: '#A57600',
|
|
95
|
+
honey40: '#B07E00',
|
|
96
|
+
honey45: '#996E00',
|
|
97
|
+
honey50: '#916800',
|
|
98
|
+
honey57: '#856000',
|
|
99
|
+
honey70: '#745300',
|
|
100
|
+
honey90: '#5F4400',
|
|
101
|
+
honey110: '#4E3800',
|
|
102
|
+
|
|
103
|
+
forest12: '#DFEEE0',
|
|
104
|
+
forest30: '#55A459',
|
|
105
|
+
forest35: '#409945',
|
|
106
|
+
forest40: '#319135',
|
|
107
|
+
forest45: '#27872B',
|
|
108
|
+
forest50: '#248029',
|
|
109
|
+
forest57: '#217526',
|
|
110
|
+
forest70: '#1D6621',
|
|
111
|
+
forest90: '#18541B',
|
|
112
|
+
forest110: '#144516',
|
|
113
|
+
|
|
114
|
+
aurora12: '#DAEEE8',
|
|
115
|
+
aurora30: '#38A585',
|
|
116
|
+
aurora35: '#1E9975',
|
|
117
|
+
aurora40: '#0B9069',
|
|
118
|
+
aurora45: '#048660',
|
|
119
|
+
aurora50: '#047F5B',
|
|
120
|
+
aurora57: '#037453',
|
|
121
|
+
aurora70: '#036549',
|
|
122
|
+
aurora90: '#02533C',
|
|
123
|
+
aurora110: '#024531',
|
|
124
|
+
|
|
125
|
+
sea12: '#DAEEEF',
|
|
126
|
+
sea30: '#37A1AA',
|
|
127
|
+
sea35: '#1E95A0',
|
|
128
|
+
sea40: '#0A8C97',
|
|
129
|
+
sea45: '#00828E',
|
|
130
|
+
sea50: '#007B86',
|
|
131
|
+
sea57: '#00717B',
|
|
132
|
+
sea70: '#00626B',
|
|
133
|
+
sea90: '#005158',
|
|
134
|
+
sea110: '#004349',
|
|
135
|
+
|
|
136
|
+
sky12: '#DDECF3',
|
|
137
|
+
sky30: '#4E9CC0',
|
|
138
|
+
sky35: '#3890B8',
|
|
139
|
+
sky40: '#2887B2',
|
|
140
|
+
sky45: '#197EAB',
|
|
141
|
+
sky50: '#1777A2',
|
|
142
|
+
sky57: '#156D94',
|
|
143
|
+
sky70: '#135F81',
|
|
144
|
+
sky90: '#0F4E6A',
|
|
145
|
+
sky110: '#0D4058',
|
|
146
|
+
|
|
147
|
+
ocean12: '#DFEBFB',
|
|
148
|
+
ocean30: '#5694EB',
|
|
149
|
+
ocean35: '#4187E8',
|
|
150
|
+
ocean40: '#317DE6',
|
|
151
|
+
ocean45: '#2573DF',
|
|
152
|
+
ocean50: '#236DD3',
|
|
153
|
+
ocean57: '#2063C1',
|
|
154
|
+
ocean70: '#1C57A8',
|
|
155
|
+
ocean90: '#17478B',
|
|
156
|
+
ocean110: '#133B72',
|
|
157
|
+
|
|
158
|
+
violet12: '#F1E6F5',
|
|
159
|
+
violet30: '#B57FCC',
|
|
160
|
+
violet35: '#AC6FC6',
|
|
161
|
+
violet40: '#A564C2',
|
|
162
|
+
violet45: '#9E58BD',
|
|
163
|
+
violet50: '#994FB9',
|
|
164
|
+
violet57: '#9242B4',
|
|
165
|
+
violet70: '#7F399E',
|
|
166
|
+
violet90: '#682F82',
|
|
167
|
+
violet110: '#56276B',
|
|
168
|
+
|
|
169
|
+
plum12: '#F7E5F0',
|
|
170
|
+
plum30: '#D473B1',
|
|
171
|
+
plum35: '#CE60A7',
|
|
172
|
+
plum40: '#CA529F',
|
|
173
|
+
plum45: '#C54396',
|
|
174
|
+
plum50: '#C1368F',
|
|
175
|
+
plum57: '#BA2083',
|
|
176
|
+
plum70: '#A31C73',
|
|
177
|
+
plum90: '#87175F',
|
|
178
|
+
plum110: '#70134F',
|
|
179
|
+
|
|
180
|
+
stone12: '#EAEAEA',
|
|
181
|
+
stone30: '#939393',
|
|
182
|
+
stone35: '#878787',
|
|
183
|
+
stone40: '#7F7F7F',
|
|
184
|
+
stone45: '#767676',
|
|
185
|
+
stone50: '#6F6F6F',
|
|
186
|
+
stone57: '#666666',
|
|
187
|
+
stone70: '#585858',
|
|
188
|
+
stone90: '#494949',
|
|
189
|
+
stone110: '#3C3C3C'
|
|
190
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Forms } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
const forms: Forms = Object.freeze({
|
|
28
|
+
inputHeightSmall: '1.75rem',
|
|
29
|
+
inputHeightMedium: '2.375rem',
|
|
30
|
+
inputHeightLarge: '3rem'
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export default forms
|
|
34
|
+
export { forms }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { borders } from './borders'
|
|
26
|
+
import { transitions } from './transitions'
|
|
27
|
+
import { typography } from './typography'
|
|
28
|
+
import { spacing } from './spacing'
|
|
29
|
+
import { forms } from './forms'
|
|
30
|
+
import { media } from './media'
|
|
31
|
+
import { breakpoints } from './breakpoints'
|
|
32
|
+
import { shadows } from './shadows'
|
|
33
|
+
import { stacking } from './stacking'
|
|
34
|
+
|
|
35
|
+
const canvas = {
|
|
36
|
+
borders,
|
|
37
|
+
transitions,
|
|
38
|
+
typography,
|
|
39
|
+
spacing,
|
|
40
|
+
forms,
|
|
41
|
+
media,
|
|
42
|
+
breakpoints,
|
|
43
|
+
shadows,
|
|
44
|
+
stacking
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default canvas
|
|
48
|
+
export { canvas }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { breakpoints } from './breakpoints'
|
|
26
|
+
import { Media } from '@instructure/shared-types'
|
|
27
|
+
|
|
28
|
+
const media: Media = Object.freeze({
|
|
29
|
+
mediumMin: `min-width: ${breakpoints.medium}`,
|
|
30
|
+
largeMin: `min-width: ${breakpoints.large}`,
|
|
31
|
+
xLargeMin: `min-width: ${breakpoints.xLarge}`
|
|
32
|
+
} as const)
|
|
33
|
+
|
|
34
|
+
export default media
|
|
35
|
+
export { media }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Shadows } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
// use for consistent box shadows
|
|
28
|
+
const values = [
|
|
29
|
+
'0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1)',
|
|
30
|
+
'0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1), 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.16)',
|
|
31
|
+
'0 0.375rem 0.4375rem rgba(0, 0, 0, 0.1), 0 0.625rem 1.75rem rgba(0, 0, 0, 0.25)'
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
const shadows: Shadows = Object.freeze({
|
|
35
|
+
depth1: values[0],
|
|
36
|
+
depth2: values[1],
|
|
37
|
+
depth3: values[2],
|
|
38
|
+
|
|
39
|
+
resting: values[0],
|
|
40
|
+
above: values[1],
|
|
41
|
+
topmost: values[2]
|
|
42
|
+
} as const)
|
|
43
|
+
|
|
44
|
+
export default shadows
|
|
45
|
+
export { shadows }
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Spacing } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
const spacing: Spacing = Object.freeze({
|
|
28
|
+
xxxSmall: '0.125rem', // 2px
|
|
29
|
+
xxSmall: '0.375rem', // 6px
|
|
30
|
+
xSmall: '0.5rem', // 8px
|
|
31
|
+
small: '0.75rem', // 12px
|
|
32
|
+
mediumSmall: '1rem', // 16px
|
|
33
|
+
medium: '1.5rem', // 24px
|
|
34
|
+
large: '2.25rem', // 36px
|
|
35
|
+
xLarge: '3rem', // 48px
|
|
36
|
+
xxLarge: '3.75rem' // 60px
|
|
37
|
+
} as const)
|
|
38
|
+
|
|
39
|
+
export default spacing
|
|
40
|
+
export { spacing }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Stacking } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
const stacking: Stacking = Object.freeze({
|
|
28
|
+
topmost: 9999,
|
|
29
|
+
above: 1,
|
|
30
|
+
below: -1,
|
|
31
|
+
deepest: -9999
|
|
32
|
+
} as const)
|
|
33
|
+
export default stacking
|
|
34
|
+
export { stacking }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Transitions } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
const transitions: Transitions = Object.freeze({
|
|
28
|
+
duration: '300ms',
|
|
29
|
+
timing: 'ease-in-out'
|
|
30
|
+
} as const)
|
|
31
|
+
|
|
32
|
+
export default transitions
|
|
33
|
+
export { transitions }
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { Typography } from '@instructure/shared-types'
|
|
26
|
+
|
|
27
|
+
const typography: Typography = Object.freeze({
|
|
28
|
+
fontFamily: 'LatoWeb, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
29
|
+
fontFamilyMonospace: 'Menlo, Consolas, Monaco, "Andale Mono", monospace',
|
|
30
|
+
|
|
31
|
+
fontSizeXSmall: '0.75rem', // 12px
|
|
32
|
+
fontSizeSmall: '0.875rem', // 14px
|
|
33
|
+
fontSizeMedium: '1rem', // 16px
|
|
34
|
+
fontSizeLarge: '1.375rem', // 22px
|
|
35
|
+
fontSizeXLarge: '1.75rem', // 28px
|
|
36
|
+
fontSizeXXLarge: '2.375rem', // 38px
|
|
37
|
+
|
|
38
|
+
fontWeightLight: 300,
|
|
39
|
+
fontWeightNormal: 400,
|
|
40
|
+
fontWeightBold: 700,
|
|
41
|
+
|
|
42
|
+
lineHeight: 1.5, // 24px
|
|
43
|
+
lineHeightFit: 1.125,
|
|
44
|
+
lineHeightCondensed: 1.25,
|
|
45
|
+
lineHeightDouble: 2,
|
|
46
|
+
|
|
47
|
+
letterSpacingNormal: 0,
|
|
48
|
+
letterSpacingCondensed: '-0.0625rem',
|
|
49
|
+
letterSpacingExpanded: '0.0625rem'
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
export default typography
|
|
53
|
+
export { typography }
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import {
|
|
26
|
+
primitives,
|
|
27
|
+
additionalPrimitives
|
|
28
|
+
} from '../../sharedThemeTokens/colors/primitives'
|
|
29
|
+
import dataVisualization from '../../sharedThemeTokens/colors/dataVisualization'
|
|
30
|
+
import getUIColors from '../../utils/getUIColors'
|
|
31
|
+
|
|
32
|
+
import type { Contrasts, UI } from '@instructure/shared-types'
|
|
33
|
+
|
|
34
|
+
const contrasts: Contrasts = {
|
|
35
|
+
white1010: primitives.white,
|
|
36
|
+
white1010op75: primitives.white10op75,
|
|
37
|
+
|
|
38
|
+
grey1111: primitives.grey11,
|
|
39
|
+
grey1214: primitives.grey12,
|
|
40
|
+
grey1424: primitives.grey14,
|
|
41
|
+
grey2424: primitives.grey24,
|
|
42
|
+
grey4570: primitives.grey45,
|
|
43
|
+
grey5782: primitives.grey57,
|
|
44
|
+
grey100100: primitives.grey100,
|
|
45
|
+
grey100100op75: primitives.grey100op75,
|
|
46
|
+
grey125125: primitives.grey125,
|
|
47
|
+
|
|
48
|
+
blue1212: primitives.blue12,
|
|
49
|
+
blue4570: primitives.blue45,
|
|
50
|
+
blue5782: primitives.blue57,
|
|
51
|
+
|
|
52
|
+
green1212: primitives.green12,
|
|
53
|
+
green4570: primitives.green45,
|
|
54
|
+
green5782: primitives.green57,
|
|
55
|
+
|
|
56
|
+
orange1212: primitives.orange12,
|
|
57
|
+
orange3045: primitives.orange30,
|
|
58
|
+
orange4570: primitives.orange45,
|
|
59
|
+
orange5782: primitives.orange57,
|
|
60
|
+
|
|
61
|
+
red1212: primitives.red12,
|
|
62
|
+
red4570: primitives.red45,
|
|
63
|
+
red5782: primitives.red57
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const ui: UI = getUIColors(contrasts)
|
|
67
|
+
|
|
68
|
+
const colors = {
|
|
69
|
+
primitives,
|
|
70
|
+
additionalPrimitives,
|
|
71
|
+
contrasts,
|
|
72
|
+
ui,
|
|
73
|
+
dataVisualization
|
|
74
|
+
}
|
|
75
|
+
export default { primitives, contrasts, ui }
|
|
76
|
+
export { colors }
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import sharedThemeTokens from '../../sharedThemeTokens'
|
|
26
|
+
import { ThemeRegistry } from '@instructure/theme-registry'
|
|
27
|
+
import { BaseTheme, Colors } from '@instructure/shared-types'
|
|
28
|
+
import colors from './colors'
|
|
29
|
+
|
|
30
|
+
const key = 'canvas'
|
|
31
|
+
|
|
32
|
+
const brandVariables = {
|
|
33
|
+
/* Defaults for Canvas account branding variables: */
|
|
34
|
+
'ic-brand-primary': colors?.contrasts?.blue4570,
|
|
35
|
+
'ic-brand-font-color-dark': colors?.contrasts?.grey125125,
|
|
36
|
+
|
|
37
|
+
'ic-link-color': colors?.contrasts?.blue4570,
|
|
38
|
+
'ic-link-decoration': 'none',
|
|
39
|
+
|
|
40
|
+
'ic-brand-button--primary-bgd': colors?.contrasts?.blue4570,
|
|
41
|
+
'ic-brand-button--primary-text': colors?.contrasts?.white1010,
|
|
42
|
+
'ic-brand-button--secondary-bgd': colors?.contrasts?.grey125125,
|
|
43
|
+
'ic-brand-button--secondary-text': colors?.contrasts?.white1010,
|
|
44
|
+
|
|
45
|
+
'ic-brand-global-nav-bgd': colors?.contrasts?.grey100100,
|
|
46
|
+
'ic-global-nav-link-hover': colors?.contrasts?.grey125125,
|
|
47
|
+
'ic-brand-global-nav-ic-icon-svg-fill': colors?.contrasts?.white1010,
|
|
48
|
+
'ic-brand-global-nav-ic-icon-svg-fill--active': colors?.contrasts?.blue4570,
|
|
49
|
+
'ic-brand-global-nav-menu-item__text-color': colors?.contrasts?.white1010,
|
|
50
|
+
'ic-brand-global-nav-menu-item__text-color--active':
|
|
51
|
+
colors?.contrasts?.blue4570
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type CanvasBrandVariables = typeof brandVariables
|
|
55
|
+
|
|
56
|
+
export type CanvasTheme = BaseTheme & {
|
|
57
|
+
key: 'canvas'
|
|
58
|
+
} & typeof sharedThemeTokens & { colors: Colors } & CanvasBrandVariables
|
|
59
|
+
|
|
60
|
+
const __theme: CanvasTheme = {
|
|
61
|
+
key,
|
|
62
|
+
...sharedThemeTokens,
|
|
63
|
+
colors,
|
|
64
|
+
...brandVariables
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const theme = ThemeRegistry.registerTheme(__theme)
|
|
68
|
+
|
|
69
|
+
export default theme
|