@telus-uds/theme-allium 0.0.2-prerelease.4 → 1.0.0-prerelease.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 +1922 -0
- package/README.md +3 -9
- package/build/schema.json +9959 -0
- package/build/theme.js +2994 -0
- package/package.json +13 -16
- package/theme.json +3731 -0
- package/src/components/ActivityIndicator.js +0 -25
- package/src/components/Box.js +0 -41
- package/src/components/Button.js +0 -219
- package/src/components/ButtonGroup.js +0 -23
- package/src/components/Card.js +0 -98
- package/src/components/ChevronLink.js +0 -20
- package/src/components/Divider.js +0 -34
- package/src/components/ExpandCollapse.js +0 -18
- package/src/components/ExpandCollapseControl.js +0 -42
- package/src/components/ExpandCollapsePanel.js +0 -26
- package/src/components/Feedback.js +0 -74
- package/src/components/Icon.js +0 -32
- package/src/components/InputLabel.js +0 -28
- package/src/components/Link.js +0 -195
- package/src/components/Pagination.js +0 -33
- package/src/components/PaginationPageButton.js +0 -81
- package/src/components/PaginationSideButton.js +0 -109
- package/src/components/SideNav.js +0 -18
- package/src/components/SideNavItem.js +0 -116
- package/src/components/SideNavItemsGroup.js +0 -41
- package/src/components/StackView.js +0 -19
- package/src/components/TextInput.js +0 -86
- package/src/components/ToggleSwitch.js +0 -125
- package/src/components/Tooltip.js +0 -45
- package/src/components/TooltipButton.js +0 -74
- package/src/components/Typography.js +0 -310
- package/src/components/index.js +0 -57
- package/src/components/spacingScale.js +0 -46
- package/src/index.js +0 -17
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import {
|
|
3
|
-
toggleSwitchAppearances,
|
|
4
|
-
getToggleSwitchSchema,
|
|
5
|
-
validateComponentTheme
|
|
6
|
-
} from '@telus-uds/tools-theme'
|
|
7
|
-
import checkmarkIcon from '@telus-uds/palette-allium/build/rn/icons/checkmark.icon.svg'
|
|
8
|
-
|
|
9
|
-
const ToggleSwitch = {
|
|
10
|
-
appearances: {
|
|
11
|
-
focus: toggleSwitchAppearances.focus,
|
|
12
|
-
hover: toggleSwitchAppearances.hover,
|
|
13
|
-
pressed: toggleSwitchAppearances.pressed,
|
|
14
|
-
inactive: toggleSwitchAppearances.inactive,
|
|
15
|
-
selected: toggleSwitchAppearances.selected
|
|
16
|
-
},
|
|
17
|
-
tokens: {
|
|
18
|
-
borderColor: palette.color.transparent,
|
|
19
|
-
borderWidth: palette.border.none,
|
|
20
|
-
borderRadius: palette.radius.pill32,
|
|
21
|
-
outerBorderColor: palette.color.transparent,
|
|
22
|
-
outerBorderWidth: palette.border.none,
|
|
23
|
-
outerBorderGap: palette.size.size0,
|
|
24
|
-
outerBorderRadius: palette.radius.pill32,
|
|
25
|
-
outerBackgroundColor: palette.color.transparent,
|
|
26
|
-
backgroundColor: palette.color.greyShuttle,
|
|
27
|
-
opacity: 1,
|
|
28
|
-
paddingLeft: 0,
|
|
29
|
-
paddingRight: 0,
|
|
30
|
-
paddingTop: 0,
|
|
31
|
-
paddingBottom: 0,
|
|
32
|
-
shadow: palette.shadow.surfaceInset,
|
|
33
|
-
|
|
34
|
-
icon: null,
|
|
35
|
-
width: palette.size.size40,
|
|
36
|
-
trackBorderWidth: palette.border.border3,
|
|
37
|
-
trackBorderColor: palette.color.transparent,
|
|
38
|
-
trackBorderRadius: palette.radius.pill32,
|
|
39
|
-
iconSize: palette.size.size12,
|
|
40
|
-
iconColor: palette.color.greyShuttle,
|
|
41
|
-
switchSize: palette.size.size16,
|
|
42
|
-
switchColor: palette.color.white,
|
|
43
|
-
switchBorderColor: palette.color.transparent,
|
|
44
|
-
switchBorderWidth: palette.border.none,
|
|
45
|
-
switchBorderRadius: palette.radius.pill32,
|
|
46
|
-
switchShadow: palette.shadow.surfaceRaised
|
|
47
|
-
},
|
|
48
|
-
rules: [
|
|
49
|
-
{
|
|
50
|
-
if: { hover: true },
|
|
51
|
-
tokens: {
|
|
52
|
-
backgroundColor: palette.color.greyCharcoal
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
if: { pressed: true },
|
|
57
|
-
tokens: {
|
|
58
|
-
backgroundColor: palette.color.greyThunder
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
if: { focus: true },
|
|
63
|
-
tokens: {
|
|
64
|
-
outerBackgroundColor: palette.color.white,
|
|
65
|
-
outerBorderGap: palette.border.border3,
|
|
66
|
-
outerBorderWidth: palette.border.border2,
|
|
67
|
-
outerBorderColor: palette.color.greyShuttle
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
if: { focus: true, pressed: true },
|
|
72
|
-
tokens: {
|
|
73
|
-
outerBorderColor: palette.color.greyThunder
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
if: { selected: true },
|
|
78
|
-
tokens: {
|
|
79
|
-
icon: checkmarkIcon,
|
|
80
|
-
backgroundColor: palette.color.greenAccessible,
|
|
81
|
-
iconColor: palette.color.greenAccessible
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
if: { selected: true, hover: true },
|
|
86
|
-
tokens: {
|
|
87
|
-
backgroundColor: palette.color.greenSanFelix,
|
|
88
|
-
iconColor: palette.color.greenSanFelix
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
if: { selected: true, pressed: true },
|
|
93
|
-
tokens: {
|
|
94
|
-
backgroundColor: palette.color.greenDarkFern,
|
|
95
|
-
iconColor: palette.color.greenDarkFern
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
if: { selected: true, focus: true },
|
|
100
|
-
tokens: {
|
|
101
|
-
outerBorderColor: palette.color.greenAccessible
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
if: { selected: true, focus: true, pressed: true },
|
|
106
|
-
tokens: {
|
|
107
|
-
outerBorderColor: palette.color.greenDarkFern
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
if: { inactive: true },
|
|
112
|
-
tokens: {
|
|
113
|
-
backgroundColor: palette.color.greyCloud,
|
|
114
|
-
outerBorderColor: palette.color.greyCloud,
|
|
115
|
-
iconColor: palette.color.greyShuttle
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// TODO: replace this with a build step similar to Palettes
|
|
122
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
123
|
-
validateComponentTheme(ToggleSwitch, getToggleSwitchSchema(palette), 'ToggleSwitch')
|
|
124
|
-
|
|
125
|
-
export default ToggleSwitch
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import { getTooltipSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const Tooltip = {
|
|
5
|
-
appearances: {
|
|
6
|
-
inverse: {
|
|
7
|
-
values: [true],
|
|
8
|
-
type: 'variant'
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
tokens: {
|
|
12
|
-
backgroundColor: palette.color.greyThunder,
|
|
13
|
-
paddingTop: palette.size.size8,
|
|
14
|
-
paddingBottom: palette.size.size8,
|
|
15
|
-
paddingLeft: palette.size.size16,
|
|
16
|
-
paddingRight: palette.size.size16,
|
|
17
|
-
borderRadius: palette.radius.radius8,
|
|
18
|
-
shadow: palette.shadow.elevation1,
|
|
19
|
-
|
|
20
|
-
color: palette.color.white,
|
|
21
|
-
fontSize: palette.fontSize.size14,
|
|
22
|
-
lineHeight: palette.lineHeight.ratio3to2,
|
|
23
|
-
fontName: Object.keys(palette.font)[0],
|
|
24
|
-
fontWeight: '400',
|
|
25
|
-
|
|
26
|
-
arrowWidth: palette.size.size16,
|
|
27
|
-
arrowBorderRadius: palette.radius.radius1,
|
|
28
|
-
arrowOffset: palette.size.size4
|
|
29
|
-
},
|
|
30
|
-
rules: [
|
|
31
|
-
{
|
|
32
|
-
if: { inverse: true },
|
|
33
|
-
tokens: {
|
|
34
|
-
backgroundColor: palette.color.white,
|
|
35
|
-
color: palette.color.greyCharcoal
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// TODO: replace this with a build step similar to Palettes
|
|
42
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
43
|
-
validateComponentTheme(Tooltip, getTooltipSchema(palette), 'tooltip')
|
|
44
|
-
|
|
45
|
-
export default Tooltip
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import {
|
|
3
|
-
buttonAppearances,
|
|
4
|
-
getTooltipButtonSchema,
|
|
5
|
-
validateComponentTheme
|
|
6
|
-
} from '@telus-uds/tools-theme'
|
|
7
|
-
|
|
8
|
-
import questionIcon from '@telus-uds/palette-allium/build/rn/icons/question.icon.svg'
|
|
9
|
-
|
|
10
|
-
const TooltipButton = {
|
|
11
|
-
appearances: {
|
|
12
|
-
...buttonAppearances,
|
|
13
|
-
inverse: {
|
|
14
|
-
values: [true],
|
|
15
|
-
type: 'variant'
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
tokens: {
|
|
19
|
-
outerBorderColor: palette.color.transparent,
|
|
20
|
-
outerBorderWidth: palette.border.border1,
|
|
21
|
-
outerBorderGap: palette.size.size4,
|
|
22
|
-
outerBorderRadius: palette.radius.pill32,
|
|
23
|
-
borderRadius: palette.radius.pill32,
|
|
24
|
-
width: palette.size.size16,
|
|
25
|
-
|
|
26
|
-
icon: questionIcon,
|
|
27
|
-
iconSize: palette.size.size16,
|
|
28
|
-
iconColor: palette.color.greyThunder
|
|
29
|
-
},
|
|
30
|
-
rules: [
|
|
31
|
-
{
|
|
32
|
-
if: { inverse: true },
|
|
33
|
-
tokens: {
|
|
34
|
-
iconColor: palette.color.white
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
if: { hover: true },
|
|
39
|
-
tokens: {
|
|
40
|
-
iconScale: 1.25
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
if: { pressed: true },
|
|
45
|
-
tokens: {
|
|
46
|
-
iconColor: palette.color.greyShuttle
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
if: { inverse: true, pressed: true },
|
|
51
|
-
tokens: {
|
|
52
|
-
iconColor: palette.color.greyCloud
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
if: { focus: true },
|
|
57
|
-
tokens: {
|
|
58
|
-
outerBorderColor: palette.color.greyShuttle
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
if: { inverse: true, focus: true },
|
|
63
|
-
tokens: {
|
|
64
|
-
outerBorderColor: palette.color.greyCloud
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// TODO: replace this with a build step similar to Palettes
|
|
71
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
72
|
-
validateComponentTheme(TooltipButton, getTooltipButtonSchema(palette), 'tooltip-button')
|
|
73
|
-
|
|
74
|
-
export default TooltipButton
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import { getTypographySchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
import { appearances } from '@telus-uds/system-constants'
|
|
4
|
-
|
|
5
|
-
const Typography = {
|
|
6
|
-
appearances: {
|
|
7
|
-
size: {
|
|
8
|
-
description: `Styles text as body or heading text with a given size. Smaller numbers indicate larger sizes,
|
|
9
|
-
"display" headings are larger than "h" headings. Default is medium size body text. Does not change
|
|
10
|
-
accessibility or SEO-related properties; use the heading prop if text should be treated semantically as a heading.`,
|
|
11
|
-
values: [
|
|
12
|
-
'micro',
|
|
13
|
-
'small',
|
|
14
|
-
'large',
|
|
15
|
-
'h1',
|
|
16
|
-
'h2',
|
|
17
|
-
'h3',
|
|
18
|
-
'h4',
|
|
19
|
-
'h5',
|
|
20
|
-
'h6',
|
|
21
|
-
'display1',
|
|
22
|
-
'display2'
|
|
23
|
-
],
|
|
24
|
-
type: 'variant'
|
|
25
|
-
},
|
|
26
|
-
colour: {
|
|
27
|
-
description: `Each typography variant has a default color, and at least a secondary color variant. In exceptional cases where a different colour is needed,
|
|
28
|
-
use the tokens prop.`,
|
|
29
|
-
values: ['secondary', 'tertiary'],
|
|
30
|
-
type: 'variant'
|
|
31
|
-
},
|
|
32
|
-
bold: {
|
|
33
|
-
description:
|
|
34
|
-
'Sets the font weight, to bold on some body text styles. Does not change accessibility properties.',
|
|
35
|
-
values: [true],
|
|
36
|
-
type: 'variant'
|
|
37
|
-
},
|
|
38
|
-
inverse: {
|
|
39
|
-
description: 'Styles the link white for use on dark backgrounds.',
|
|
40
|
-
values: [true],
|
|
41
|
-
type: 'variant'
|
|
42
|
-
},
|
|
43
|
-
compact: {
|
|
44
|
-
description:
|
|
45
|
-
'Reduces line height on some body text styles. For data-rich content, not for flow content',
|
|
46
|
-
values: [true],
|
|
47
|
-
type: 'variant'
|
|
48
|
-
},
|
|
49
|
-
viewport: appearances.viewport
|
|
50
|
-
},
|
|
51
|
-
tokens: {
|
|
52
|
-
fontWeight: '400',
|
|
53
|
-
fontSize: palette.fontSize.size16,
|
|
54
|
-
color: palette.color.greyThunder,
|
|
55
|
-
lineHeight: palette.lineHeight.ratio3to2,
|
|
56
|
-
textTransform: 'none',
|
|
57
|
-
fontName: Object.keys(palette.font)[0],
|
|
58
|
-
fontScaleCap: palette.fontSize.size64
|
|
59
|
-
},
|
|
60
|
-
rules: [
|
|
61
|
-
/**
|
|
62
|
-
* Colour rules: most variants are thunder / charcoal, but some heading sizes are purple / thunder, inverse is white for all
|
|
63
|
-
*/
|
|
64
|
-
{
|
|
65
|
-
if: { colour: 'secondary' },
|
|
66
|
-
tokens: {
|
|
67
|
-
color: palette.color.greyCharcoal
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
if: { size: ['display1', 'display2', 'h1', 'h2', 'h3'] },
|
|
73
|
-
tokens: {
|
|
74
|
-
color: palette.color.purpleTelus
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
if: { size: ['display1', 'display2', 'h1', 'h2', 'h3'], colour: 'secondary' },
|
|
79
|
-
tokens: {
|
|
80
|
-
color: palette.color.greyThunder
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
if: { size: 'h6', colour: 'tertiary' }, // TODO pending confirmation that this is necessary
|
|
85
|
-
tokens: {
|
|
86
|
-
color: palette.color.greyShuttle
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
if: { size: 'eyebrow' },
|
|
91
|
-
tokens: {
|
|
92
|
-
color: palette.color.greyCharcoal
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
if: { size: 'eyebrow', colour: 'secondary' },
|
|
97
|
-
tokens: {
|
|
98
|
-
color: palette.color.purpleTelus
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
if: { inverse: true },
|
|
103
|
-
tokens: {
|
|
104
|
-
color: palette.color.white
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Size/weight/line height/letter spacing rules
|
|
110
|
-
*/
|
|
111
|
-
/* Display 1 */
|
|
112
|
-
{
|
|
113
|
-
if: { size: 'display1' },
|
|
114
|
-
tokens: {
|
|
115
|
-
fontSize: palette.fontSize.size40,
|
|
116
|
-
fontWeight: '300',
|
|
117
|
-
lineHeight: palette.lineHeight.ratio6to5,
|
|
118
|
-
letterSpacing: palette.letterSpacing.medium
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
if: { size: 'display1', viewport: ['lg', 'xl'] },
|
|
123
|
-
tokens: {
|
|
124
|
-
fontSize: palette.fontSize.size64,
|
|
125
|
-
lineHeight: palette.lineHeight.ratio9to8
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
/* Display 2 */
|
|
130
|
-
{
|
|
131
|
-
if: { size: 'display2' },
|
|
132
|
-
tokens: {
|
|
133
|
-
fontSize: palette.fontSize.size36,
|
|
134
|
-
fontWeight: '400',
|
|
135
|
-
letterSpacing: palette.letterSpacing.medium,
|
|
136
|
-
lineHeight: palette.lineHeight.ratio11to9
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
if: { size: 'display2', viewport: ['lg', 'xl'] },
|
|
141
|
-
tokens: {
|
|
142
|
-
fontSize: palette.fontSize.size56,
|
|
143
|
-
fontWeight: '300',
|
|
144
|
-
lineHeight: palette.lineHeight.ratio8to7,
|
|
145
|
-
letterSpacing: palette.letterSpacing.condensed
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
/* h1 */
|
|
150
|
-
{
|
|
151
|
-
if: { size: 'h1' },
|
|
152
|
-
tokens: {
|
|
153
|
-
fontSize: palette.fontSize.size28,
|
|
154
|
-
lineHeight: palette.lineHeight.ratio9to7,
|
|
155
|
-
letterSpacing: palette.letterSpacing.loose
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
if: { size: 'h1', viewport: ['lg', 'xl'] },
|
|
160
|
-
tokens: {
|
|
161
|
-
fontSize: palette.fontSize.size40,
|
|
162
|
-
fontWeight: '300',
|
|
163
|
-
lineHeight: palette.lineHeight.ratio6to5,
|
|
164
|
-
letterSpacing: palette.letterSpacing.medium
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
/* h2 */
|
|
169
|
-
{
|
|
170
|
-
if: { size: 'h2' },
|
|
171
|
-
tokens: {
|
|
172
|
-
fontSize: palette.fontSize.size24,
|
|
173
|
-
fontWeight: '500',
|
|
174
|
-
lineHeight: palette.lineHeight.ratio4to3
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
if: { size: 'h2', viewport: ['lg', 'xl'] },
|
|
179
|
-
tokens: {
|
|
180
|
-
fontSize: palette.fontSize.size28,
|
|
181
|
-
lineHeight: palette.lineHeight.ratio9to7,
|
|
182
|
-
letterSpacing: palette.letterSpacing.loose
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
/* h3 */
|
|
187
|
-
{
|
|
188
|
-
if: { size: 'h3' },
|
|
189
|
-
tokens: {
|
|
190
|
-
fontSize: palette.fontSize.size20,
|
|
191
|
-
fontWeight: '500',
|
|
192
|
-
lineHeight: palette.lineHeight.ratio7to5
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
if: { size: 'h3', viewport: ['lg', 'xl'] },
|
|
197
|
-
tokens: {
|
|
198
|
-
fontSize: palette.fontSize.size24,
|
|
199
|
-
lineHeight: palette.lineHeight.ratio4to3
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
/* h4 */
|
|
204
|
-
{
|
|
205
|
-
if: { size: 'h4' },
|
|
206
|
-
tokens: {
|
|
207
|
-
fontSize: palette.fontSize.size16,
|
|
208
|
-
fontWeight: '500',
|
|
209
|
-
lineHeight: palette.lineHeight.ratio3to2
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
/* h5 */
|
|
214
|
-
{
|
|
215
|
-
if: { size: 'h5' },
|
|
216
|
-
tokens: {
|
|
217
|
-
fontSize: palette.fontSize.size14,
|
|
218
|
-
fontWeight: '500',
|
|
219
|
-
lineHeight: palette.lineHeight.ratio9to7
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
/* h6 */
|
|
224
|
-
{
|
|
225
|
-
if: { size: 'h6' },
|
|
226
|
-
tokens: {
|
|
227
|
-
fontSize: palette.fontSize.size12,
|
|
228
|
-
fontWeight: '700',
|
|
229
|
-
lineHeight: palette.lineHeight.ratio4to3
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
/* large */
|
|
234
|
-
{
|
|
235
|
-
if: { size: 'large' },
|
|
236
|
-
tokens: {
|
|
237
|
-
fontSize: palette.fontSize.size20,
|
|
238
|
-
lineHeight: palette.lineHeight.ratio8to5
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
if: { size: 'large', compact: true },
|
|
243
|
-
tokens: {
|
|
244
|
-
lineHeight: palette.lineHeight.ratio6to5
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
/* default (medium) */
|
|
249
|
-
{
|
|
250
|
-
if: { size: null, compact: true },
|
|
251
|
-
description:
|
|
252
|
-
"The compact line height for the 'default' font size, but doesn't apply for any other styles",
|
|
253
|
-
tokens: {
|
|
254
|
-
lineHeight: palette.lineHeight.ratio5to4
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
/* small */
|
|
258
|
-
{
|
|
259
|
-
if: { size: 'small' },
|
|
260
|
-
tokens: {
|
|
261
|
-
fontSize: palette.fontSize.size14,
|
|
262
|
-
lineHeight: palette.lineHeight.ratio10to7
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
if: { size: 'small', compact: true },
|
|
267
|
-
tokens: {
|
|
268
|
-
lineHeight: palette.lineHeight.ratio8to7
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
/* micro */
|
|
273
|
-
{
|
|
274
|
-
if: { size: 'micro' },
|
|
275
|
-
tokens: {
|
|
276
|
-
fontSize: palette.fontSize.size12,
|
|
277
|
-
fontWeight: '500',
|
|
278
|
-
lineHeight: palette.lineHeight.ratio4to3
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
/* eyebrow */
|
|
283
|
-
{
|
|
284
|
-
if: { size: 'eyebrow' },
|
|
285
|
-
tokens: {
|
|
286
|
-
fontSize: palette.fontSize.size14,
|
|
287
|
-
fontWeight: '700',
|
|
288
|
-
textTransform: 'uppercase',
|
|
289
|
-
lineHeight: palette.lineHeight.ratio9to7
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* bold styles
|
|
295
|
-
*/
|
|
296
|
-
{
|
|
297
|
-
if: { size: ['large', null, 'small', 'micro'], bold: true },
|
|
298
|
-
description: 'Bold is only available on body text styles, not headings',
|
|
299
|
-
tokens: {
|
|
300
|
-
fontWeight: '700'
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// TODO: replace this with a build step similar to Palettes
|
|
307
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
308
|
-
validateComponentTheme(Typography, getTypographySchema(palette))
|
|
309
|
-
|
|
310
|
-
export default Typography
|
package/src/components/index.js
DELETED
|
@@ -1,57 +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 ChevronLink from './ChevronLink'
|
|
7
|
-
import Divider from './Divider'
|
|
8
|
-
import ExpandCollapse from './ExpandCollapse'
|
|
9
|
-
import ExpandCollapseControl from './ExpandCollapseControl'
|
|
10
|
-
import ExpandCollapsePanel from './ExpandCollapsePanel'
|
|
11
|
-
import Feedback from './Feedback'
|
|
12
|
-
import Icon from './Icon'
|
|
13
|
-
import InputLabel from './InputLabel'
|
|
14
|
-
import Link from './Link'
|
|
15
|
-
import TextInput from './TextInput'
|
|
16
|
-
import ToggleSwitch from './ToggleSwitch'
|
|
17
|
-
import Tooltip from './Tooltip'
|
|
18
|
-
import TooltipButton from './TooltipButton'
|
|
19
|
-
import Typography from './Typography'
|
|
20
|
-
import SideNav from './SideNav'
|
|
21
|
-
import SideNavItem from './SideNavItem'
|
|
22
|
-
import SideNavItemsGroup from './SideNavItemsGroup'
|
|
23
|
-
import Pagination from './Pagination'
|
|
24
|
-
import PaginationPageButton from './PaginationPageButton'
|
|
25
|
-
import PaginationSideButton from './PaginationSideButton'
|
|
26
|
-
import StackView from './StackView'
|
|
27
|
-
import spacingScale from './spacingScale'
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
ActivityIndicator,
|
|
31
|
-
Box,
|
|
32
|
-
Button,
|
|
33
|
-
ButtonGroup,
|
|
34
|
-
Card,
|
|
35
|
-
ChevronLink,
|
|
36
|
-
Divider,
|
|
37
|
-
ExpandCollapse,
|
|
38
|
-
ExpandCollapseControl,
|
|
39
|
-
ExpandCollapsePanel,
|
|
40
|
-
Feedback,
|
|
41
|
-
Icon,
|
|
42
|
-
InputLabel,
|
|
43
|
-
Link,
|
|
44
|
-
Pagination,
|
|
45
|
-
PaginationPageButton,
|
|
46
|
-
PaginationSideButton,
|
|
47
|
-
SideNav,
|
|
48
|
-
SideNavItem,
|
|
49
|
-
SideNavItemsGroup,
|
|
50
|
-
StackView,
|
|
51
|
-
TextInput,
|
|
52
|
-
ToggleSwitch,
|
|
53
|
-
Tooltip,
|
|
54
|
-
TooltipButton,
|
|
55
|
-
Typography,
|
|
56
|
-
spacingScale
|
|
57
|
-
}
|
|
@@ -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-allium'
|
|
7
|
-
|
|
8
|
-
const spacingScale = {
|
|
9
|
-
appearances: {
|
|
10
|
-
space: spacingScaleAppearances.space,
|
|
11
|
-
viewport: spacingScaleAppearances.viewport
|
|
12
|
-
},
|
|
13
|
-
// Largest spacings first, so they apply any time space >= highest index'
|
|
14
|
-
tokens: { size: palette.size.size96 },
|
|
15
|
-
rules: [
|
|
16
|
-
{ if: { viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size120 } },
|
|
17
|
-
|
|
18
|
-
{ if: { space: 11 }, tokens: { size: palette.size.size96 } },
|
|
19
|
-
{ if: { space: 10 }, tokens: { size: palette.size.size80 } },
|
|
20
|
-
{ if: { space: 9 }, tokens: { size: palette.size.size64 } },
|
|
21
|
-
{ if: { space: 8 }, tokens: { size: palette.size.size48 } },
|
|
22
|
-
{ if: { space: 7 }, tokens: { size: palette.size.size40 } },
|
|
23
|
-
{ if: { space: 6 }, tokens: { size: palette.size.size36 } },
|
|
24
|
-
{ if: { space: 5 }, tokens: { size: palette.size.size32 } },
|
|
25
|
-
{ if: { space: 4 }, tokens: { size: palette.size.size24 } },
|
|
26
|
-
{ if: { space: 3 }, tokens: { size: palette.size.size16 } },
|
|
27
|
-
{ if: { space: 2 }, tokens: { size: palette.size.size8 } },
|
|
28
|
-
{ if: { space: 1 }, tokens: { size: palette.size.size4 } },
|
|
29
|
-
|
|
30
|
-
{ if: { space: 11, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size120 } },
|
|
31
|
-
{ if: { space: 10, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size96 } },
|
|
32
|
-
{ if: { space: 9, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size72 } },
|
|
33
|
-
{ if: { space: 8, viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size64 } },
|
|
34
|
-
{ if: { space: 7 }, tokens: { size: palette.size.size48 } },
|
|
35
|
-
{ if: { space: 6 }, tokens: { size: palette.size.size40 } },
|
|
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: 'allium',
|
|
8
|
-
package: packageJson.name,
|
|
9
|
-
version: packageJson.version
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const alliumTheme = {
|
|
13
|
-
metadata,
|
|
14
|
-
components
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default alliumTheme
|