@telus-uds/theme-koodo 0.0.2-prerelease.0 → 1.0.0-prerelease.1

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.
@@ -1,163 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import { getTypographySchema, validateComponentTheme } from '@telus-uds/tools-theme'
3
- import { appearances } from '@telus-uds/system-constants'
4
-
5
- const Typography = {
6
- appearances: {
7
- weight: {
8
- description:
9
- 'Sets the font weight, default is regular 400 weight. Does not change accessibility properties.',
10
- values: ['semibold', 'bold'],
11
- type: 'variant'
12
- },
13
- size: {
14
- values: ['small', 'large', 'h1', 'h2', 'h3', 'h4', 'display'],
15
- type: 'variant'
16
- },
17
- colour: {
18
- // No docs on this in KDS but some non-interactive textual KDS components have colours e.g. red in PageTitle
19
- values: ['red'],
20
- type: 'variant'
21
- },
22
- inverse: {
23
- description: 'Styles the link white for use on dark backgrounds.',
24
- values: [true],
25
- type: 'variant'
26
- },
27
- viewport: appearances.viewport
28
- },
29
- tokens: {
30
- fontWeight: '400',
31
- fontSize: palette.fontSize.size16,
32
- color: palette.color.black,
33
- lineHeight: palette.lineHeight.multiply150,
34
- textTransform: 'none',
35
- fontName: Object.keys(palette.font)[0],
36
- fontScaleCap: palette.fontSize.size64
37
- },
38
- rules: [
39
- /**
40
- * Font weight variants
41
- */
42
- {
43
- if: { weight: 'semibold' },
44
- tokens: {
45
- fontWeight: '600'
46
- }
47
- },
48
- {
49
- if: { weight: 'bold' },
50
- tokens: {
51
- fontWeight: '700'
52
- }
53
- },
54
-
55
- /**
56
- * Body text size variants
57
- */
58
- {
59
- if: { size: 'large' },
60
- tokens: {
61
- fontSize: palette.fontSize.size20,
62
- lineHeight: palette.lineHeight.multiply160
63
- }
64
- },
65
- {
66
- if: { size: 'small' },
67
- tokens: {
68
- fontSize: palette.fontSize.size14,
69
- lineHeight: palette.lineHeight.multiply140
70
- }
71
- },
72
-
73
- /**
74
- * Heading size variants
75
- */
76
- {
77
- if: { size: 'display' },
78
- tokens: {
79
- fontSize: palette.fontSize.size48,
80
- fontWeight: '700',
81
- lineHeight: palette.lineHeight.multiply120
82
- }
83
- },
84
- {
85
- if: { size: 'display', viewport: ['lg', 'xl'] },
86
- tokens: {
87
- fontSize: palette.fontSize.size64,
88
- lineHeight: palette.lineHeight.multiply110
89
- }
90
- },
91
- {
92
- if: { size: 'h1' },
93
- tokens: {
94
- fontSize: palette.fontSize.size44,
95
- fontWeight: '700',
96
- lineHeight: palette.lineHeight.multiply120
97
- }
98
- },
99
- {
100
- if: { size: 'h1', viewport: ['lg', 'xl'] },
101
- tokens: {
102
- fontSize: palette.fontSize.size40,
103
- lineHeight: palette.lineHeight.multiply110
104
- }
105
- },
106
- {
107
- if: { size: 'h2' },
108
- tokens: {
109
- fontSize: palette.fontSize.size28,
110
- color: palette.color.black,
111
- fontWeight: '700',
112
- lineHeight: palette.lineHeight.multiply130
113
- }
114
- },
115
- {
116
- if: { size: 'h2', viewport: ['lg', 'xl'] },
117
- tokens: {
118
- fontSize: palette.fontSize.size28
119
- }
120
- },
121
- {
122
- if: { size: 'h3' },
123
- tokens: {
124
- fontSize: palette.fontSize.size20,
125
- fontWeight: '700',
126
- lineHeight: palette.lineHeight.multiply140
127
- }
128
- },
129
- {
130
- if: { size: 'h3', viewport: ['lg', 'xl'] },
131
- tokens: {
132
- fontSize: palette.fontSize.size24,
133
- lineHeight: palette.lineHeight.multiply130
134
- }
135
- },
136
- {
137
- if: { size: 'h4' },
138
- tokens: {
139
- fontSize: palette.fontSize.size16,
140
- fontWeight: '700',
141
- lineHeight: palette.lineHeight.multiply150
142
- }
143
- },
144
- {
145
- if: { inverse: true },
146
- tokens: {
147
- color: palette.color.white
148
- }
149
- },
150
- {
151
- if: { colour: 'red' },
152
- tokens: {
153
- color: palette.color.trinidad
154
- }
155
- }
156
- ]
157
- }
158
-
159
- // TODO: replace this with a build step similar to Palettes
160
- // https://github.com/telus/universal-design-system/issues/167
161
- validateComponentTheme(Typography, getTypographySchema(palette))
162
-
163
- export default Typography
@@ -1,49 +0,0 @@
1
- import ActivityIndicator from './ActivityIndicator'
2
- import Box from './Box'
3
- import Button from './Button'
4
- import ButtonGroup from './ButtonGroup'
5
- import Card from './Card'
6
- import Divider from './Divider'
7
- import ExpandCollapse from './ExpandCollapse'
8
- import ExpandCollapseControl from './ExpandCollapseControl'
9
- import ExpandCollapsePanel from './ExpandCollapsePanel'
10
- import Feedback from './Feedback'
11
- import Icon from './Icon'
12
- import InputLabel from './InputLabel'
13
- import Link from './Link'
14
- import TextInput from './TextInput'
15
- import ToggleSwitch from './ToggleSwitch'
16
- import Typography from './Typography'
17
- import SideNav from './SideNav'
18
- import SideNavItem from './SideNavItem'
19
- import SideNavItemsGroup from './SideNavItemsGroup'
20
- import Pagination from './Pagination'
21
- import PaginationPageButton from './PaginationPageButton'
22
- import PaginationSideButton from './PaginationSideButton'
23
- import spacingScale from './spacingScale'
24
-
25
- export default {
26
- ActivityIndicator,
27
- Box,
28
- Button,
29
- ButtonGroup,
30
- Card,
31
- Divider,
32
- ExpandCollapse,
33
- ExpandCollapseControl,
34
- ExpandCollapsePanel,
35
- Feedback,
36
- Icon,
37
- InputLabel,
38
- Link,
39
- Pagination,
40
- PaginationPageButton,
41
- PaginationSideButton,
42
- SideNav,
43
- SideNavItem,
44
- SideNavItemsGroup,
45
- TextInput,
46
- ToggleSwitch,
47
- Typography,
48
- spacingScale
49
- }
@@ -1,46 +0,0 @@
1
- import {
2
- getSpacingScaleSchema,
3
- validateComponentTheme,
4
- spacingScaleAppearances
5
- } from '@telus-uds/tools-theme'
6
- import palette from '@telus-uds/palette-koodo'
7
-
8
- // TODO: confirm that these values are right for Koodo going forward
9
- // They're taken from original Box implementation which appears to be based on Allium values.
10
-
11
- const spacingScale = {
12
- appearances: {
13
- space: spacingScaleAppearances.space,
14
- viewport: spacingScaleAppearances.viewport
15
- },
16
- // Largest spacings first, so they apply any time space >= highest index'
17
- tokens: { size: palette.size.size96 },
18
- rules: [
19
- { if: { viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size120 } },
20
-
21
- { if: { space: 10 }, tokens: { size: palette.size.size80 } },
22
- { if: { space: 9 }, tokens: { size: palette.size.size64 } },
23
- { if: { space: 8 }, tokens: { size: palette.size.size48 } },
24
- { if: { space: 7 }, tokens: { size: palette.size.size40 } },
25
- { if: { space: 6 }, tokens: { size: palette.size.size36 } },
26
- { if: { space: 5 }, tokens: { size: palette.size.size32 } },
27
- { if: { space: 4 }, tokens: { size: palette.size.size24 } },
28
- { if: { space: 3 }, tokens: { size: palette.size.size16 } },
29
- { if: { space: 2 }, tokens: { size: palette.size.size8 } },
30
- { if: { space: 1 }, tokens: { size: palette.size.size4 } },
31
-
32
- { if: { space: 10, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size120 } },
33
- { if: { space: 9, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size96 } },
34
- { if: { space: 8, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size72 } },
35
- { if: { space: 7, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size64 } },
36
-
37
- // Zero spacing last; overrides all other rules when space === 0
38
- { if: { space: 0 }, tokens: { size: palette.size.size0 } }
39
- ]
40
- }
41
-
42
- // TODO: replace this with a build step similar to Palettes
43
- // https://github.com/telus/universal-design-system/issues/167
44
- validateComponentTheme(spacingScale, getSpacingScaleSchema(palette), 'spacingScale')
45
-
46
- export default spacingScale
package/src/index.js DELETED
@@ -1,17 +0,0 @@
1
- import packageJson from '../package.json'
2
- import components from './components'
3
-
4
- // TODO: replace this with theme build tooling and schema checks as part of
5
- // https://github.com/telus/universal-design-system/issues/92
6
- const metadata = {
7
- name: 'koodo',
8
- package: packageJson.name,
9
- version: packageJson.version
10
- }
11
-
12
- const koodoTheme = {
13
- metadata,
14
- components
15
- }
16
-
17
- export default koodoTheme