@telus-uds/theme-koodo 0.0.2-prerelease.0 → 0.1.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 +1462 -0
- package/README.md +3 -9
- package/build/schema.json +9746 -0
- package/build/theme.js +2365 -0
- package/package.json +15 -17
- package/theme.json +2737 -0
- package/src/components/ActivityIndicator.js +0 -10
- package/src/components/Box.js +0 -24
- package/src/components/Button.js +0 -178
- package/src/components/ButtonGroup.js +0 -15
- package/src/components/Card.js +0 -16
- package/src/components/Divider.js +0 -8
- 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 -73
- package/src/components/Icon.js +0 -67
- package/src/components/InputLabel.js +0 -28
- package/src/components/Link.js +0 -92
- package/src/components/Pagination.js +0 -33
- package/src/components/PaginationPageButton.js +0 -81
- package/src/components/PaginationSideButton.js +0 -119
- package/src/components/SideNav.js +0 -18
- package/src/components/SideNavItem.js +0 -115
- package/src/components/SideNavItemsGroup.js +0 -31
- package/src/components/TextInput.js +0 -85
- package/src/components/ToggleSwitch.js +0 -111
- package/src/components/Typography.js +0 -163
- package/src/components/index.js +0 -49
- package/src/components/spacingScale.js +0 -46
- package/src/index.js +0 -17
package/src/components/Box.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getBoxSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const Box = {
|
|
5
|
-
appearances: {
|
|
6
|
-
background: {
|
|
7
|
-
description: 'Background colour of box. Transparent if not specified.',
|
|
8
|
-
values: ['light', 'lightest']
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
tokens: {
|
|
12
|
-
backgroundColor: undefined
|
|
13
|
-
},
|
|
14
|
-
rules: [
|
|
15
|
-
{ if: { background: 'lightest' }, tokens: { backgroundColor: palette.color.white } },
|
|
16
|
-
{ if: { background: 'light' }, tokens: { backgroundColor: palette.color.gallery } }
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// TODO: replace this with a build step similar to Palettes
|
|
21
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
22
|
-
validateComponentTheme(Box, getBoxSchema(palette))
|
|
23
|
-
|
|
24
|
-
export default Box
|
package/src/components/Button.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getButtonSchema, validateComponentTheme, buttonAppearances } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const Button = {
|
|
5
|
-
appearances: {
|
|
6
|
-
rank: {
|
|
7
|
-
description:
|
|
8
|
-
'Prominence of the button. Use the default ("primary") button style for the main action on a page or in a form, and "secondary" style for secondary actions.',
|
|
9
|
-
values: ['secondary'],
|
|
10
|
-
type: 'variant'
|
|
11
|
-
},
|
|
12
|
-
rounded: {
|
|
13
|
-
// TODO: add some usage guidance, there's none on https://telus.github.io/kds/#button
|
|
14
|
-
description: 'Gives a button "pill-style" rounded sides',
|
|
15
|
-
values: [true],
|
|
16
|
-
type: 'variant'
|
|
17
|
-
},
|
|
18
|
-
clear: {
|
|
19
|
-
// TODO: add some usage guidance, there's none on https://telus.github.io/kds/#button
|
|
20
|
-
description: 'Gives a button borders and a transparent background',
|
|
21
|
-
values: [true],
|
|
22
|
-
type: 'variant'
|
|
23
|
-
},
|
|
24
|
-
hover: buttonAppearances.hover,
|
|
25
|
-
focus: buttonAppearances.focus,
|
|
26
|
-
pressed: buttonAppearances.pressed,
|
|
27
|
-
inactive: buttonAppearances.inactive
|
|
28
|
-
},
|
|
29
|
-
tokens: {
|
|
30
|
-
borderColor: palette.color.white,
|
|
31
|
-
borderWidth: palette.border.none,
|
|
32
|
-
borderRadius: palette.radius.radius4,
|
|
33
|
-
shadow: null,
|
|
34
|
-
|
|
35
|
-
fontSize: palette.fontSize.size16,
|
|
36
|
-
fontWeight: '600',
|
|
37
|
-
color: palette.color.white,
|
|
38
|
-
lineHeight: palette.lineHeight.multiply150,
|
|
39
|
-
fontName: Object.keys(palette.font)[0],
|
|
40
|
-
textAlign: 'center',
|
|
41
|
-
alignSelf: 'flex-start',
|
|
42
|
-
|
|
43
|
-
backgroundColor: palette.color.mosque,
|
|
44
|
-
opacity: 1,
|
|
45
|
-
paddingLeft: palette.size.size24,
|
|
46
|
-
paddingRight: palette.size.size24,
|
|
47
|
-
paddingTop: palette.size.size8,
|
|
48
|
-
paddingBottom: palette.size.size8,
|
|
49
|
-
width: undefined,
|
|
50
|
-
|
|
51
|
-
outerBorderColor: palette.color.white,
|
|
52
|
-
outerBorderWidth: palette.border.border2,
|
|
53
|
-
outerBorderGap: palette.border.border2,
|
|
54
|
-
outerBorderRadius: palette.radius.radius4,
|
|
55
|
-
outerBackgroundColor: palette.color.transparent
|
|
56
|
-
},
|
|
57
|
-
rules: [
|
|
58
|
-
// "Primary" (default rank) styles
|
|
59
|
-
{
|
|
60
|
-
if: { rounded: true },
|
|
61
|
-
tokens: { borderRadius: palette.radius.pill32 }
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
if: { clear: true },
|
|
65
|
-
tokens: {
|
|
66
|
-
borderWidth: palette.border.border2,
|
|
67
|
-
borderColor: palette.color.mosque,
|
|
68
|
-
color: palette.color.mosque,
|
|
69
|
-
backgroundColor: null
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
if: { hover: true },
|
|
75
|
-
tokens: {
|
|
76
|
-
color: palette.color.white,
|
|
77
|
-
borderColor: palette.color.darkMosque,
|
|
78
|
-
backgroundColor: palette.color.darkMosque
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
if: { clear: true, hover: true },
|
|
83
|
-
tokens: {
|
|
84
|
-
borderWidth: palette.border.none,
|
|
85
|
-
backgroundColor: palette.color.mosque
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
if: { pressed: true },
|
|
91
|
-
tokens: {
|
|
92
|
-
color: palette.color.white,
|
|
93
|
-
borderColor: palette.color.mosque,
|
|
94
|
-
backgroundColor: palette.color.mosque
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
if: { focus: true },
|
|
99
|
-
tokens: {
|
|
100
|
-
outerBorderColor: palette.color.mosque
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
// "Secondary" rank styles
|
|
105
|
-
{
|
|
106
|
-
if: { rank: 'secondary' },
|
|
107
|
-
tokens: {
|
|
108
|
-
backgroundColor: palette.color.blue,
|
|
109
|
-
borderColor: palette.color.blue,
|
|
110
|
-
color: palette.color.white
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
if: { rank: 'secondary', clear: true },
|
|
115
|
-
tokens: {
|
|
116
|
-
backgroundColor: palette.color.white,
|
|
117
|
-
borderColor: palette.color.blue,
|
|
118
|
-
color: palette.color.blue
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
if: { rank: 'secondary', hover: true },
|
|
123
|
-
tokens: {
|
|
124
|
-
backgroundColor: palette.color.darkBlue,
|
|
125
|
-
borderColor: palette.color.darkBlue,
|
|
126
|
-
color: palette.color.white
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
if: { rank: 'secondary', pressed: true },
|
|
131
|
-
tokens: {
|
|
132
|
-
backgroundColor: palette.color.onahau,
|
|
133
|
-
borderColor: palette.color.onahau,
|
|
134
|
-
color: palette.color.white
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
if: { rank: 'secondary', focus: true },
|
|
139
|
-
tokens: {
|
|
140
|
-
outerBorderColor: palette.color.blue
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
if: { rank: 'secondary', pressed: true, focus: true },
|
|
145
|
-
tokens: {
|
|
146
|
-
outerBorderColor: palette.color.onahau
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
if: { inactive: true },
|
|
151
|
-
tokens: {
|
|
152
|
-
opacity: 0.3
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
// There's no designs for this so just do something simple and visible for now
|
|
156
|
-
{
|
|
157
|
-
if: { selected: true },
|
|
158
|
-
tokens: {
|
|
159
|
-
opacity: 0.8,
|
|
160
|
-
outerBorderColor: palette.color.mosque,
|
|
161
|
-
outerBorderGap: palette.border.border1,
|
|
162
|
-
outerBorderWidth: palette.border.border4
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
if: { selected: true, focus: true },
|
|
167
|
-
tokens: {
|
|
168
|
-
outerBorderGap: palette.border.border2
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// TODO: replace this with a build step similar to Palettes
|
|
175
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
176
|
-
validateComponentTheme(Button, getButtonSchema(palette), 'Button')
|
|
177
|
-
|
|
178
|
-
export default Button
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getButtonGroupSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
2
|
-
import palette from '@telus-uds/palette-koodo'
|
|
3
|
-
|
|
4
|
-
const ButtonGroup = {
|
|
5
|
-
tokens: {
|
|
6
|
-
space: 3,
|
|
7
|
-
direction: 'row'
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// TODO: replace this with a build step similar to Palettes
|
|
12
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
13
|
-
validateComponentTheme(ButtonGroup, getButtonGroupSchema(palette))
|
|
14
|
-
|
|
15
|
-
export default ButtonGroup
|
package/src/components/Card.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
appearances: {},
|
|
5
|
-
tokens: {
|
|
6
|
-
backgroundColor: palette.color.texas,
|
|
7
|
-
borderColor: null,
|
|
8
|
-
borderRadius: palette.radius.none,
|
|
9
|
-
borderWidth: palette.border.none,
|
|
10
|
-
paddingBottom: palette.size.size16,
|
|
11
|
-
paddingLeft: palette.size.size16,
|
|
12
|
-
paddingRight: palette.size.size16,
|
|
13
|
-
paddingTop: palette.size.size16,
|
|
14
|
-
shadow: null
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getExpandCollapseSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const ExpandCollapse = {
|
|
5
|
-
appearances: {},
|
|
6
|
-
tokens: {
|
|
7
|
-
borderColor: palette.color.transparent,
|
|
8
|
-
borderWidth: palette.border.none,
|
|
9
|
-
borderStyle: 'solid'
|
|
10
|
-
},
|
|
11
|
-
rules: []
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// TODO: replace this with a build step similar to Palettes
|
|
15
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
16
|
-
validateComponentTheme(ExpandCollapse, getExpandCollapseSchema(palette), 'expand-collapse')
|
|
17
|
-
|
|
18
|
-
export default ExpandCollapse
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import {
|
|
3
|
-
getExpandCollapseControlSchema,
|
|
4
|
-
validateComponentTheme,
|
|
5
|
-
expandCollapseControlAppearances
|
|
6
|
-
} from '@telus-uds/tools-theme'
|
|
7
|
-
|
|
8
|
-
import ChevronUp from '@telus-uds/palette-koodo/build/rn/icons/chevron-up.icon.svg'
|
|
9
|
-
import ChevronDown from '@telus-uds/palette-koodo/build/rn/icons/chevron-down.icon.svg'
|
|
10
|
-
|
|
11
|
-
const ExpandCollapseControl = {
|
|
12
|
-
appearances: {
|
|
13
|
-
expanded: expandCollapseControlAppearances.expanded
|
|
14
|
-
},
|
|
15
|
-
tokens: {
|
|
16
|
-
icon: ChevronUp,
|
|
17
|
-
iconColor: palette.color.mosque,
|
|
18
|
-
iconSize: palette.size.size16,
|
|
19
|
-
iconGap: palette.size.size16,
|
|
20
|
-
iconPosition: 'left',
|
|
21
|
-
verticalAlign: 'middle',
|
|
22
|
-
justifyContent: 'flex-start',
|
|
23
|
-
paddingLeft: palette.size.size16,
|
|
24
|
-
paddingRight: palette.size.size16,
|
|
25
|
-
paddingTop: palette.size.size16,
|
|
26
|
-
paddingBottom: palette.size.size16,
|
|
27
|
-
borderWidth: palette.border.border0,
|
|
28
|
-
borderColor: palette.color.transparent,
|
|
29
|
-
backgroundColor: palette.color.transparent
|
|
30
|
-
},
|
|
31
|
-
rules: [{ if: { expanded: true }, tokens: { icon: ChevronDown } }]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// TODO: replace this with a build step similar to Palettes
|
|
35
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
36
|
-
validateComponentTheme(
|
|
37
|
-
ExpandCollapseControl,
|
|
38
|
-
getExpandCollapseControlSchema(palette),
|
|
39
|
-
'expand-collapse-control'
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
export default ExpandCollapseControl
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getExpandCollapsePanelSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const ExpandCollapsePanel = {
|
|
5
|
-
appearances: {},
|
|
6
|
-
tokens: {
|
|
7
|
-
// animate slightly faster when closing
|
|
8
|
-
expandDuration: 300,
|
|
9
|
-
collapseDuration: 250,
|
|
10
|
-
contentPaddingLeft: palette.size.size48,
|
|
11
|
-
contentPaddingRight: palette.size.size16,
|
|
12
|
-
contentPaddingTop: palette.size.size0,
|
|
13
|
-
contentPaddingBottom: palette.size.size16
|
|
14
|
-
},
|
|
15
|
-
rules: []
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// TODO: replace this with a build step similar to Palettes
|
|
19
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
20
|
-
validateComponentTheme(
|
|
21
|
-
ExpandCollapsePanel,
|
|
22
|
-
getExpandCollapsePanelSchema(palette),
|
|
23
|
-
'expand-collapse-panel'
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
export default ExpandCollapsePanel
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
|
|
3
|
-
import errorIcon from '@telus-uds/palette-koodo/build/rn/icons/exclamation-triangle.icon.svg'
|
|
4
|
-
import successIcon from '@telus-uds/palette-koodo/build/rn/icons/check-circled-filled.icon.svg'
|
|
5
|
-
import {
|
|
6
|
-
feedbackAppearances,
|
|
7
|
-
getFeedbackSchema,
|
|
8
|
-
validateComponentTheme
|
|
9
|
-
} from '@telus-uds/tools-theme'
|
|
10
|
-
|
|
11
|
-
const Feedback = {
|
|
12
|
-
appearances: feedbackAppearances,
|
|
13
|
-
tokens: {
|
|
14
|
-
backgroundColor: palette.color.gallery,
|
|
15
|
-
borderColor: palette.color.silver,
|
|
16
|
-
borderWidth: palette.border.border1,
|
|
17
|
-
borderRadius: palette.radius.radius4,
|
|
18
|
-
paddingTop: palette.size.size10,
|
|
19
|
-
paddingBottom: palette.size.size10,
|
|
20
|
-
paddingLeft: palette.size.size16,
|
|
21
|
-
paddingRight: palette.size.size16,
|
|
22
|
-
|
|
23
|
-
color: palette.color.mortar,
|
|
24
|
-
fontName: Object.keys(palette.font)[0],
|
|
25
|
-
fontWeight: '400',
|
|
26
|
-
lineHeight: palette.lineHeight.multiply150,
|
|
27
|
-
titleFontSize: palette.fontSize.size16,
|
|
28
|
-
contentFontSize: palette.fontSize.size14,
|
|
29
|
-
|
|
30
|
-
icon: null,
|
|
31
|
-
iconSize: palette.fontSize.size24,
|
|
32
|
-
iconColor: palette.color.transparent,
|
|
33
|
-
iconGap: palette.size.size8
|
|
34
|
-
},
|
|
35
|
-
rules: [
|
|
36
|
-
{
|
|
37
|
-
if: { state: 'success' },
|
|
38
|
-
tokens: {
|
|
39
|
-
backgroundColor: palette.color.mintTulip,
|
|
40
|
-
borderColor: palette.color.mintTulip,
|
|
41
|
-
color: palette.color.bilbao
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
if: { state: 'error' },
|
|
46
|
-
tokens: {
|
|
47
|
-
backgroundColor: palette.color.carouselPink,
|
|
48
|
-
borderColor: palette.color.carouselPink,
|
|
49
|
-
color: palette.color.trinidad
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
if: { state: 'success', icon: true },
|
|
54
|
-
tokens: {
|
|
55
|
-
icon: successIcon,
|
|
56
|
-
iconColor: palette.color.bilbao
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
if: { state: 'error', icon: true },
|
|
61
|
-
tokens: {
|
|
62
|
-
icon: errorIcon,
|
|
63
|
-
iconColor: palette.color.trinidad
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// TODO: replace this with a build step similar to Palettes
|
|
70
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
71
|
-
validateComponentTheme(Feedback, getFeedbackSchema(palette))
|
|
72
|
-
|
|
73
|
-
export default Feedback
|
package/src/components/Icon.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
appearances: {
|
|
5
|
-
size: {
|
|
6
|
-
values: ['small'],
|
|
7
|
-
type: 'variant'
|
|
8
|
-
},
|
|
9
|
-
colour: {
|
|
10
|
-
values: ['primary', 'secondary', 'black', 'white'],
|
|
11
|
-
type: 'variant'
|
|
12
|
-
},
|
|
13
|
-
status: {
|
|
14
|
-
description: 'Uses icon colour to communicate meaning to the user',
|
|
15
|
-
values: ['success', 'error'],
|
|
16
|
-
type: 'variant'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
tokens: {
|
|
20
|
-
size: 24,
|
|
21
|
-
color: palette.color.dove
|
|
22
|
-
},
|
|
23
|
-
rules: [
|
|
24
|
-
{
|
|
25
|
-
if: { size: 'small' },
|
|
26
|
-
tokens: {
|
|
27
|
-
size: 20
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
if: { colour: 'primary' },
|
|
32
|
-
tokens: {
|
|
33
|
-
color: palette.color.black
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
if: { colour: 'secondary' },
|
|
38
|
-
tokens: {
|
|
39
|
-
color: palette.color.blue
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
if: { colour: 'black' },
|
|
44
|
-
tokens: {
|
|
45
|
-
color: palette.color.black
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
if: { colour: 'white' },
|
|
50
|
-
tokens: {
|
|
51
|
-
color: palette.color.white
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
if: { status: 'success' },
|
|
56
|
-
tokens: {
|
|
57
|
-
color: palette.color.mosque
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
if: { status: 'error' },
|
|
62
|
-
tokens: {
|
|
63
|
-
color: palette.color.amaranth
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getInputLabelSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const InputLabel = {
|
|
5
|
-
appearances: {},
|
|
6
|
-
tokens: {
|
|
7
|
-
gap: palette.size.size8,
|
|
8
|
-
|
|
9
|
-
color: palette.color.dove,
|
|
10
|
-
fontName: Object.keys(palette.font)[0],
|
|
11
|
-
fontWeight: '500',
|
|
12
|
-
fontSize: palette.fontSize.size16,
|
|
13
|
-
lineHeight: palette.lineHeight.multiply140,
|
|
14
|
-
|
|
15
|
-
hintColor: palette.color.dove,
|
|
16
|
-
hintFontName: Object.keys(palette.font)[0],
|
|
17
|
-
hintFontWeight: '400',
|
|
18
|
-
hintFontSize: palette.fontSize.size14,
|
|
19
|
-
hintLineHeight: palette.lineHeight.multiply140
|
|
20
|
-
},
|
|
21
|
-
rules: []
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// TODO: replace this with a build step similar to Palettes
|
|
25
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
26
|
-
validateComponentTheme(InputLabel, getInputLabelSchema(palette), 'input-label')
|
|
27
|
-
|
|
28
|
-
export default InputLabel
|
package/src/components/Link.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getLinkSchema, validateComponentTheme, linkAppearances } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
import leftChevronIcon from '@telus-uds/palette-koodo/build/rn/icons/chevron-left.icon.svg'
|
|
5
|
-
import rightChevronIcon from '@telus-uds/palette-koodo/build/rn/icons/chevron-right.icon.svg'
|
|
6
|
-
|
|
7
|
-
const Link = {
|
|
8
|
-
appearances: {
|
|
9
|
-
rank: {
|
|
10
|
-
// TODO: needs some guidance on when to use secondary links, none on https://telus.github.io/kds/#link
|
|
11
|
-
description: 'Prominence of the link.',
|
|
12
|
-
values: ['secondary'],
|
|
13
|
-
type: 'variant'
|
|
14
|
-
},
|
|
15
|
-
component: linkAppearances.component,
|
|
16
|
-
iconPosition: linkAppearances.iconPosition,
|
|
17
|
-
hover: linkAppearances.hover
|
|
18
|
-
},
|
|
19
|
-
tokens: {
|
|
20
|
-
color: palette.color.mosque,
|
|
21
|
-
|
|
22
|
-
textLine: 'underline',
|
|
23
|
-
textLineStyle: 'solid',
|
|
24
|
-
|
|
25
|
-
outerBorderColor: palette.color.transparent,
|
|
26
|
-
outerBorderWidth: palette.border.none,
|
|
27
|
-
outerBorderGap: palette.border.none,
|
|
28
|
-
outerBorderRadius: palette.radius.radius0,
|
|
29
|
-
|
|
30
|
-
blockFontWeight: '600',
|
|
31
|
-
blockFontSize: palette.fontSize.size16,
|
|
32
|
-
blockLineHeight: palette.lineHeight.multiply150,
|
|
33
|
-
blockFontName: Object.keys(palette.font)[0],
|
|
34
|
-
alignSelf: 'flex-start',
|
|
35
|
-
|
|
36
|
-
iconSize: palette.fontSize.size24,
|
|
37
|
-
iconGapBefore: palette.size.size4,
|
|
38
|
-
iconGapAfter: palette.size.size8,
|
|
39
|
-
iconScale: 1,
|
|
40
|
-
iconTranslateX: 0
|
|
41
|
-
},
|
|
42
|
-
rules: [
|
|
43
|
-
// Default link style interaction states
|
|
44
|
-
{
|
|
45
|
-
if: { hover: true },
|
|
46
|
-
tokens: {
|
|
47
|
-
color: palette.color.darkMosque,
|
|
48
|
-
textLine: 'none'
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
// Secondary link style
|
|
53
|
-
{
|
|
54
|
-
if: { rank: 'secondary' },
|
|
55
|
-
tokens: {
|
|
56
|
-
color: palette.color.blue
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
if: { rank: 'secondary', hover: true },
|
|
61
|
-
tokens: {
|
|
62
|
-
color: palette.color.darkBlue
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
if: { component: 'ChevronLink' },
|
|
67
|
-
tokens: { iconGapAfter: 0, iconGapBefore: 0 }
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
if: { component: 'ChevronLink', iconPosition: 'left' },
|
|
71
|
-
tokens: { icon: leftChevronIcon }
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
if: { component: 'ChevronLink', iconPosition: 'right' },
|
|
75
|
-
tokens: { icon: rightChevronIcon }
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
if: { component: 'ChevronLink', iconPosition: 'left', hover: true },
|
|
79
|
-
tokens: { iconTranslateX: -1 * palette.size.size4 }
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
if: { component: 'ChevronLink', iconPosition: 'right', hover: true },
|
|
83
|
-
tokens: { iconTranslateX: palette.size.size4 }
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// TODO: replace this with a build step similar to Palettes
|
|
89
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
90
|
-
validateComponentTheme(Link, getLinkSchema(palette), 'Link')
|
|
91
|
-
|
|
92
|
-
export default Link
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import palette from '@telus-uds/palette-koodo'
|
|
2
|
-
import { getPaginationSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
import { appearances } from '@telus-uds/system-constants'
|
|
4
|
-
|
|
5
|
-
const Pagination = {
|
|
6
|
-
appearances: {
|
|
7
|
-
viewport: appearances.viewport
|
|
8
|
-
},
|
|
9
|
-
tokens: {
|
|
10
|
-
gap: 2,
|
|
11
|
-
truncateAbove: 4,
|
|
12
|
-
|
|
13
|
-
color: palette.color.dove,
|
|
14
|
-
fontName: Object.keys(palette.font)[0],
|
|
15
|
-
fontWeight: '400',
|
|
16
|
-
fontSize: palette.fontSize.size16,
|
|
17
|
-
lineHeight: palette.lineHeight.multiply150
|
|
18
|
-
},
|
|
19
|
-
rules: [
|
|
20
|
-
{
|
|
21
|
-
if: { viewport: ['md', 'lg', 'xl'] },
|
|
22
|
-
tokens: {
|
|
23
|
-
truncateAbove: 6
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// TODO: replace this with a build step similar to Palettes
|
|
30
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
31
|
-
validateComponentTheme(Pagination, getPaginationSchema(palette), 'pagination')
|
|
32
|
-
|
|
33
|
-
export default Pagination
|