@telus-uds/theme-allium 0.0.2-prerelease.1 → 0.0.2-prerelease.5

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/lib/components/ActivityIndicator.js +35 -0
  3. package/lib/components/Box.js +89 -0
  4. package/lib/components/Button.js +252 -0
  5. package/lib/components/ButtonGroup.js +34 -0
  6. package/lib/components/ButtonGroupItem.js +108 -0
  7. package/lib/components/Card.js +120 -0
  8. package/lib/components/Checkbox.js +80 -0
  9. package/lib/components/ChevronLink.js +39 -0
  10. package/lib/components/Divider.js +44 -0
  11. package/lib/components/ExpandCollapse.js +23 -0
  12. package/lib/components/ExpandCollapseControl.js +49 -0
  13. package/lib/components/ExpandCollapsePanel.js +25 -0
  14. package/lib/components/Feedback.js +89 -0
  15. package/lib/components/Icon.js +47 -0
  16. package/lib/components/InputLabel.js +33 -0
  17. package/lib/components/InputSupports.js +19 -0
  18. package/lib/components/Link.js +241 -0
  19. package/lib/components/List.js +86 -0
  20. package/lib/components/Pagination.js +40 -0
  21. package/lib/components/PaginationPageButton.js +82 -0
  22. package/lib/components/PaginationSideButton.js +113 -0
  23. package/lib/components/Radio.js +78 -0
  24. package/lib/components/Select.js +102 -0
  25. package/lib/components/SideNav.js +23 -0
  26. package/lib/components/SideNavItem.js +118 -0
  27. package/lib/components/SideNavItemsGroup.js +49 -0
  28. package/lib/components/Skeleton.js +26 -0
  29. package/lib/components/StackView.js +22 -0
  30. package/lib/components/Tags.js +34 -0
  31. package/lib/components/TagsItem.js +133 -0
  32. package/lib/components/TextArea.js +20 -0
  33. package/lib/components/TextInput.js +97 -0
  34. package/lib/components/ToggleSwitch.js +144 -0
  35. package/lib/components/Tooltip.js +48 -0
  36. package/lib/components/TooltipButton.js +86 -0
  37. package/lib/components/Typography.js +370 -0
  38. package/lib/components/index.js +303 -0
  39. package/lib/components/spacingScale.js +163 -0
  40. package/lib/index.js +30 -0
  41. package/package.json +10 -7
  42. package/src/components/Box.js +12 -94
  43. package/src/components/Button.js +80 -111
  44. package/src/components/ButtonGroup.js +10 -16
  45. package/src/components/ButtonGroupItem.js +88 -0
  46. package/src/components/Card.js +99 -0
  47. package/src/components/Checkbox.js +65 -0
  48. package/src/components/ChevronLink.js +19 -0
  49. package/src/components/ExpandCollapse.js +3 -9
  50. package/src/components/ExpandCollapseControl.js +8 -21
  51. package/src/components/ExpandCollapsePanel.js +3 -14
  52. package/src/components/Feedback.js +75 -0
  53. package/src/components/Icon.js +6 -3
  54. package/src/components/InputLabel.js +29 -0
  55. package/src/components/InputSupports.js +9 -0
  56. package/src/components/Link.js +71 -92
  57. package/src/components/List.js +70 -0
  58. package/src/components/Pagination.js +10 -13
  59. package/src/components/PaginationPageButton.js +15 -25
  60. package/src/components/PaginationSideButton.js +23 -44
  61. package/src/components/Radio.js +64 -0
  62. package/src/components/Select.js +88 -0
  63. package/src/components/SideNav.js +3 -9
  64. package/src/components/SideNavItem.js +21 -22
  65. package/src/components/SideNavItemsGroup.js +11 -18
  66. package/src/components/Skeleton.js +16 -0
  67. package/src/components/StackView.js +12 -0
  68. package/src/components/Tags.js +16 -0
  69. package/src/components/TagsItem.js +118 -0
  70. package/src/components/TextArea.js +10 -0
  71. package/src/components/TextInput.js +83 -0
  72. package/src/components/ToggleSwitch.js +16 -23
  73. package/src/components/Tooltip.js +41 -0
  74. package/src/components/TooltipButton.js +68 -0
  75. package/src/components/Typography.js +112 -78
  76. package/src/components/index.js +37 -39
  77. package/src/components/spacingScale.js +36 -0
  78. package/src/index.js +1 -1
@@ -1,12 +1,8 @@
1
1
  import palette from '@telus-uds/palette-allium'
2
- import { getLinkSchema, validateComponentTheme, linkAppearances } from '@telus-uds/tools-theme'
2
+ import system from '@telus-uds/system-themes/src/tokens/rn'
3
+ import { appearances } from '@telus-uds/system-themes/schema'
3
4
 
4
- import leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
5
- import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
6
-
7
- const { color, fontSize, lineHeight, font, border, radius, size } = palette
8
-
9
- const Link = {
5
+ export default {
10
6
  appearances: {
11
7
  size: {
12
8
  description:
@@ -27,63 +23,75 @@ const Link = {
27
23
  light: {
28
24
  description:
29
25
  'A lighter grey variant, used to lower the emphasis on a given Link (e.g. in Breadcrumbs)',
30
- values: [true]
26
+ values: [true],
27
+ type: 'variant'
31
28
  },
32
- component: linkAppearances.component,
33
- iconPosition: linkAppearances.iconPosition,
34
- focus: linkAppearances.focus,
35
- hover: linkAppearances.hover
29
+ iconPosition: appearances.Link.iconPosition,
30
+ focus: appearances.Link.focus,
31
+ hover: appearances.Link.hover,
32
+ pressed: appearances.Link.pressed
36
33
  },
37
34
  tokens: {
38
- color: color.greenAccessible,
35
+ color: palette.color.greenAccessible,
39
36
 
40
- textLine: 'underline',
41
- textLineStyle: 'solid',
37
+ textLine: system.textLine.underline,
38
+ textLineStyle: system.textLineStyle.solid,
42
39
 
43
- outerBorderColor: color.transparent,
44
- outerBorderWidth: border.border2,
45
- outerBorderGap: border.border2,
46
- outerBorderRadius: radius.radius4,
40
+ outerBorderColor: palette.color.transparent,
41
+ outerBorderWidth: palette.border.border2,
42
+ outerBorderGap: palette.border.border2,
43
+ outerBorderRadius: palette.radius.radius4,
44
+ outerBorderOutline: system.borderStyle.none,
47
45
 
48
46
  // Same as default size Typography
47
+ // TODO replace with single font token
49
48
  blockFontWeight: '400',
50
- blockFontSize: fontSize.size16,
51
- blockLineHeight: lineHeight.ratio3to2,
52
- blockFontName: Object.keys(font)[0],
49
+ blockFontName: Object.keys(palette.font)[0],
50
+ // bockFont: palette.font.HelveticaNow[400]
53
51
 
54
- icon: null,
55
- iconSize: fontSize.size24,
56
- iconGapBefore: size.size4,
57
- iconGapAfter: size.size8,
58
- iconScale: 1,
59
- iconTranslateX: 0
52
+ blockFontSize: palette.fontSize.size16,
53
+ blockLineHeight: palette.lineHeight.ratio3to2,
54
+ alignSelf: system.flexAlign.flexStart,
55
+
56
+ icon: system.icon.none,
57
+ iconSize: palette.fontSize.size24,
58
+ iconSpace: system.integer[1],
59
+ iconTranslateX: system.size.zero,
60
+ iconTranslateY: system.size.zero
60
61
  },
61
62
  rules: [
63
+ {
64
+ if: { iconPosition: 'left' },
65
+ tokens: {
66
+ iconSpace: system.integer[2]
67
+ }
68
+ },
62
69
  // Initial interaction states
63
70
  {
64
71
  if: { focus: true },
65
72
  tokens: {
66
- outerBorderColor: color.greenAccessible,
67
- outerBorderOutline: 'none'
73
+ outerBorderColor: palette.color.greenAccessible,
74
+ outerBorderOutline: system.borderStyle.none
68
75
  }
69
76
  },
70
77
  {
71
78
  if: { hover: true },
72
79
  tokens: {
73
- color: color.greenSanFelix,
74
- iconScale: 1.1
80
+ textLine: system.textLine.none,
81
+ color: palette.color.greenSanFelix
75
82
  }
76
83
  },
77
84
  {
78
85
  if: { pressed: true },
79
86
  tokens: {
80
- color: color.greenDarkFern
87
+ textLine: system.textLine.none,
88
+ color: palette.color.greenDarkFern
81
89
  }
82
90
  },
83
91
  {
84
92
  if: { pressed: true, focus: true },
85
93
  tokens: {
86
- outerBorderColor: color.greenDarkFern
94
+ outerBorderColor: palette.color.greenDarkFern
87
95
  }
88
96
  },
89
97
 
@@ -91,26 +99,29 @@ const Link = {
91
99
  {
92
100
  if: { size: 'large' },
93
101
  tokens: {
94
- blockFontSize: fontSize.size20,
95
- iconSize: fontSize.size24,
96
- blockLineHeight: lineHeight.ratio8to5
102
+ blockFontSize: palette.fontSize.size20,
103
+ iconSize: palette.fontSize.size24,
104
+ blockLineHeight: palette.lineHeight.ratio8to5
97
105
  }
98
106
  },
99
107
  {
100
108
  if: { size: 'small' },
101
109
  tokens: {
102
- blockFontSize: fontSize.size14,
103
- iconSize: fontSize.size20,
104
- blockLineHeight: lineHeight.ratio10to7
110
+ blockFontSize: palette.fontSize.size14,
111
+ iconSize: palette.fontSize.size20,
112
+ blockLineHeight: palette.lineHeight.ratio10to7
105
113
  }
106
114
  },
107
115
  {
108
116
  if: { size: 'micro' },
109
117
  tokens: {
110
- blockFontSize: fontSize.size12,
118
+ blockFontSize: palette.fontSize.size12,
119
+ // TODO replace this with font token
111
120
  blockFontWeight: '500',
112
- iconSize: fontSize.size16,
113
- blockLineHeight: lineHeight.ratio4to3
121
+ // blockFont: palette.font.HelveticaNow[500]
122
+
123
+ iconSize: palette.fontSize.size16,
124
+ blockLineHeight: palette.lineHeight.ratio4to3
114
125
  }
115
126
  },
116
127
 
@@ -118,26 +129,26 @@ const Link = {
118
129
  {
119
130
  if: { alternative: true },
120
131
  tokens: {
121
- color: color.greyThunder
132
+ color: palette.color.greyThunder
122
133
  }
123
134
  },
124
135
  {
125
136
  if: { alternative: true, focus: true },
126
137
  tokens: {
127
- color: color.greyCharcoal,
128
- outerBorderColor: color.greyCharcoal
138
+ color: palette.color.greyCharcoal,
139
+ outerBorderColor: palette.color.greyCharcoal
129
140
  }
130
141
  },
131
142
  {
132
143
  if: { alternative: true, hover: true },
133
144
  tokens: {
134
- color: color.greyThunder
145
+ color: palette.color.greyThunder
135
146
  }
136
147
  },
137
148
  {
138
149
  if: { alternative: true, pressed: true },
139
150
  tokens: {
140
- color: color.greyThunder
151
+ color: palette.color.greyThunder
141
152
  }
142
153
  },
143
154
 
@@ -145,33 +156,33 @@ const Link = {
145
156
  {
146
157
  if: { inverse: true },
147
158
  tokens: {
148
- color: color.white
159
+ color: palette.color.white
149
160
  }
150
161
  },
151
162
  {
152
163
  if: { inverse: true, hover: true },
153
164
  tokens: {
154
- color: color.greyAthens
165
+ color: palette.color.greyAthens
155
166
  }
156
167
  },
157
168
  {
158
169
  if: { inverse: true, focus: true },
159
170
  tokens: {
160
- outerBorderColor: color.white,
161
- outerBorderOutline: 'none'
171
+ outerBorderColor: palette.color.white,
172
+ outerBorderOutline: system.borderStyle.none
162
173
  }
163
174
  },
164
175
  {
165
176
  if: { inverse: true, pressed: true },
166
177
  tokens: {
167
- color: color.greyMystic
178
+ color: palette.color.greyMystic
168
179
  }
169
180
  },
170
181
  {
171
182
  if: { inverse: true, pressed: true, focus: true },
172
183
  tokens: {
173
- color: color.greyMystic,
174
- outerBorderColor: color.greyMystic
184
+ color: palette.color.greyMystic,
185
+ outerBorderColor: palette.color.greyMystic
175
186
  }
176
187
  },
177
188
 
@@ -179,54 +190,22 @@ const Link = {
179
190
  {
180
191
  if: { light: true },
181
192
  tokens: {
182
- color: color.greyShuttle
193
+ color: palette.color.greyShuttle
183
194
  }
184
195
  },
185
196
  {
186
197
  if: { light: true, focus: true },
187
198
  tokens: {
188
- color: color.greyShuttle,
189
- outerBorderColor: color.greyShuttle
199
+ color: palette.color.greyShuttle,
200
+ outerBorderColor: palette.color.greyShuttle
190
201
  }
191
202
  },
192
203
  {
193
204
  if: { light: true, hover: true },
194
205
  tokens: {
195
- color: color.greyCharcoal,
196
- textLine: 'none'
197
- }
198
- },
199
- {
200
- if: { component: 'ChevronLink' },
201
- tokens: { iconGapAfter: 0, iconGapBefore: 0 }
202
- },
203
- {
204
- if: { component: 'ChevronLink', iconPosition: 'left' },
205
- tokens: { icon: leftArrowIcon }
206
- },
207
- {
208
- if: { component: 'ChevronLink', iconPosition: 'right' },
209
- tokens: { icon: rightArrowIcon }
210
- },
211
- {
212
- if: { component: 'ChevronLink', iconPosition: 'left', hover: true },
213
- tokens: {
214
- iconTranslateX: -1 * size.size4,
215
- iconScale: 1
216
- }
217
- },
218
- {
219
- if: { component: 'ChevronLink', iconPosition: 'right', hover: true },
220
- tokens: {
221
- iconTranslateX: size.size4,
222
- iconScale: 1
206
+ color: palette.color.greyCharcoal,
207
+ textLine: system.textLine.none
223
208
  }
224
209
  }
225
210
  ]
226
211
  }
227
-
228
- // TODO: replace this with a build step similar to Palettes
229
- // https://github.com/telus/universal-design-system/issues/167
230
- validateComponentTheme(Link, getLinkSchema(palette), 'Link')
231
-
232
- export default Link
@@ -0,0 +1,70 @@
1
+ import palette from '@telus-uds/palette-allium'
2
+
3
+ export default {
4
+ appearances: {
5
+ size: {
6
+ description: 'Indicates list item text size.',
7
+ values: ['large', 'small'],
8
+ type: 'variant'
9
+ },
10
+ compact: {
11
+ description: 'When true it will reduce the line height of the list item.',
12
+ values: [true],
13
+ type: 'variant'
14
+ }
15
+ },
16
+ tokens: {
17
+ itemFontWeight: '400',
18
+ itemFontSize: palette.fontSize.size16,
19
+ itemLineHeight: palette.lineHeight.ratio3to2,
20
+ itemFontName: Object.keys(palette.font)[0],
21
+ interItemMargin: palette.size.size8,
22
+ interItemMarginWithDivider: palette.size.size16,
23
+ dividerColor: palette.color.greyCloud,
24
+ dividerSize: palette.border.border1,
25
+ itemBulletContainerWidth: palette.size.size16,
26
+ itemBulletContainerAlign: 'center',
27
+ itemBulletWidth: palette.size.size4,
28
+ itemBulletHeight: palette.size.size4,
29
+ itemBulletColor: palette.color.purpleTelus,
30
+ itemIconSize: palette.size.size16,
31
+ itemIconColor: palette.color.purpleTelus,
32
+ listGutter: palette.size.size12
33
+ },
34
+ rules: [
35
+ {
36
+ if: { size: 'large' },
37
+ tokens: {
38
+ itemFontSize: palette.fontSize.size20,
39
+ itemLineHeight: palette.lineHeight.ratio8to5,
40
+ listGutter: palette.size.size12
41
+ }
42
+ },
43
+ {
44
+ if: { size: 'small' },
45
+ tokens: {
46
+ itemFontSize: palette.fontSize.size14,
47
+ itemLineHeight: palette.lineHeight.ratio10to7,
48
+ listGutter: palette.size.size12
49
+ }
50
+ },
51
+ {
52
+ if: { compact: true },
53
+ tokens: {
54
+ itemLineHeight: palette.lineHeight.ratio5to4
55
+ }
56
+ },
57
+ {
58
+ if: { compact: true, size: 'small' },
59
+ tokens: {
60
+ itemLineHeight: palette.lineHeight.ratio8to7
61
+ }
62
+ },
63
+ {
64
+ if: { compact: true, size: 'large' },
65
+ tokens: {
66
+ itemLineHeight: palette.lineHeight.ratio6to5
67
+ }
68
+ }
69
+ ]
70
+ }
@@ -1,18 +1,21 @@
1
1
  import palette from '@telus-uds/palette-allium'
2
- import { getPaginationSchema, validateComponentTheme } from '@telus-uds/tools-theme'
3
- import { appearances } from '@telus-uds/system-constants'
2
+ import system from '@telus-uds/system-themes/src/tokens/rn'
3
+ import { appearances } from '@telus-uds/system-themes/schema'
4
4
 
5
- const Pagination = {
5
+ export default {
6
6
  appearances: {
7
- viewport: appearances.viewport
7
+ viewport: appearances.system.viewport
8
8
  },
9
9
  tokens: {
10
- gap: 2,
11
- truncateAbove: 4,
10
+ gap: system.integer[2],
11
+ truncateAbove: system.integer[4],
12
12
 
13
13
  color: palette.color.greyShuttle,
14
+ // TODO: replace with font token
14
15
  fontName: Object.keys(palette.font)[0],
15
16
  fontWeight: '400',
17
+ // font: palette.font.HelveticaNow[400]
18
+
16
19
  fontSize: palette.fontSize.size16,
17
20
  lineHeight: palette.lineHeight.ratio3to2
18
21
  },
@@ -20,14 +23,8 @@ const Pagination = {
20
23
  {
21
24
  if: { viewport: ['md', 'lg', 'xl'] },
22
25
  tokens: {
23
- truncateAbove: 6
26
+ truncateAbove: system.integer[6]
24
27
  }
25
28
  }
26
29
  ]
27
30
  }
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
@@ -1,18 +1,13 @@
1
1
  import palette from '@telus-uds/palette-allium'
2
- import {
3
- buttonAppearances,
4
- getPaginationPageButtonSchema,
5
- lineOptions,
6
- validateComponentTheme
7
- } from '@telus-uds/tools-theme'
2
+ import system from '@telus-uds/system-themes/src/tokens/rn'
3
+ import { appearances } from '@telus-uds/system-themes/schema'
8
4
 
9
- const { focus, hover, pressed } = buttonAppearances
10
-
11
- const PaginationPageButton = {
5
+ export default {
12
6
  appearances: {
13
- focus,
14
- hover,
15
- pressed
7
+ focus: appearances.PaginationPageButton.focus,
8
+ hover: appearances.PaginationPageButton.hover,
9
+ pressed: appearances.PaginationPageButton.pressed,
10
+ selected: appearances.PaginationPageButton.selected
16
11
  },
17
12
  tokens: {
18
13
  borderColor: palette.color.transparent,
@@ -31,18 +26,23 @@ const PaginationPageButton = {
31
26
  outerBorderGap: palette.border.border4,
32
27
 
33
28
  color: palette.color.greyShuttle,
29
+
30
+ // TODO: replace this with font token
34
31
  fontName: Object.keys(palette.font)[0],
35
32
  fontWeight: '400',
33
+ // font: palette.font.HelveticaNow[400]
34
+
36
35
  fontSize: palette.fontSize.size16,
37
36
  lineHeight: palette.lineHeight.ratio3to2,
38
- textLine: lineOptions.underline
37
+ textLine: system.textLine.underline,
38
+ textAlign: system.flexJustifyContent.center
39
39
  },
40
40
  rules: [
41
41
  {
42
42
  if: { hover: true },
43
43
  tokens: {
44
44
  borderColor: palette.color.greyShuttle,
45
- textLine: lineOptions.none
45
+ textLine: system.textLine.none
46
46
  }
47
47
  },
48
48
  {
@@ -57,7 +57,7 @@ const PaginationPageButton = {
57
57
  tokens: {
58
58
  backgroundColor: palette.color.greyShuttle,
59
59
  color: palette.color.white,
60
- textLine: lineOptions.none
60
+ textLine: system.textLine.none
61
61
  }
62
62
  },
63
63
  {
@@ -69,13 +69,3 @@ const PaginationPageButton = {
69
69
  }
70
70
  ]
71
71
  }
72
-
73
- // TODO: replace this with a build step similar to Palettes
74
- // https://github.com/telus/universal-design-system/issues/167
75
- validateComponentTheme(
76
- PaginationPageButton,
77
- getPaginationPageButtonSchema(palette),
78
- 'pagination-page-button'
79
- )
80
-
81
- export default PaginationPageButton
@@ -1,25 +1,18 @@
1
1
  import palette from '@telus-uds/palette-allium'
2
- import {
3
- buttonAppearances,
4
- getPaginationSideButtonSchema,
5
- lineOptions,
6
- paginationSideButtonAppearances,
7
- validateComponentTheme
8
- } from '@telus-uds/tools-theme'
2
+ import system from '@telus-uds/system-themes/src/tokens/rn'
3
+ import { appearances } from '@telus-uds/system-themes/schema'
9
4
 
10
5
  import leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
11
6
  import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
12
- import { appearances } from '@telus-uds/system-constants'
13
7
 
14
- const { focus, hover, pressed } = buttonAppearances
15
-
16
- const PaginationSideButton = {
8
+ export default {
17
9
  appearances: {
18
- viewport: appearances.viewport,
19
- focus,
20
- hover,
21
- pressed,
22
- ...paginationSideButtonAppearances
10
+ viewport: appearances.system.viewport,
11
+ focus: appearances.PaginationSideButton.focus,
12
+ hover: appearances.PaginationSideButton.hover,
13
+ pressed: appearances.PaginationSideButton.pressed,
14
+ selected: appearances.PaginationSideButton.selected,
15
+ direction: appearances.PaginationSideButton.direction
23
16
  },
24
17
  tokens: {
25
18
  borderColor: palette.color.transparent,
@@ -33,15 +26,22 @@ const PaginationSideButton = {
33
26
  outerBorderColor: palette.color.transparent,
34
27
 
35
28
  color: palette.color.greyShuttle,
29
+
30
+ // TODO replace with font token
36
31
  fontName: Object.keys(palette.font)[0],
37
32
  fontWeight: '400',
33
+ // font: palette.font.HelveticaNow[400]
34
+
38
35
  fontSize: palette.fontSize.size16,
39
36
  lineHeight: palette.lineHeight.ratio3to2,
40
- textLine: lineOptions.underline,
37
+ textLine: system.textLine.underline,
41
38
 
42
- icon: null,
39
+ icon: system.icon.none,
43
40
  iconSize: palette.fontSize.size24,
44
- iconTranslateX: palette.size.size0
41
+ iconDisplace: palette.size.size0,
42
+
43
+ width: system.size.none,
44
+ textAlign: system.flexJustifyContent.center
45
45
  },
46
46
  rules: [
47
47
  {
@@ -50,14 +50,15 @@ const PaginationSideButton = {
50
50
  borderRadius: palette.radius.pill32,
51
51
  paddingTop: palette.size.size4,
52
52
  paddingBottom: palette.size.size4,
53
- width: 32
53
+ width: palette.size.size32
54
54
  }
55
55
  },
56
56
  {
57
57
  if: { hover: true },
58
58
  tokens: {
59
59
  borderColor: palette.color.greyShuttle,
60
- textLine: lineOptions.none
60
+ textLine: system.textLine.none,
61
+ iconDisplace: palette.size.size4
61
62
  }
62
63
  },
63
64
  {
@@ -72,7 +73,7 @@ const PaginationSideButton = {
72
73
  tokens: {
73
74
  backgroundColor: palette.color.greyShuttle,
74
75
  color: palette.color.white,
75
- textLine: lineOptions.none
76
+ textLine: system.textLine.none
76
77
  }
77
78
  },
78
79
  {
@@ -93,28 +94,6 @@ const PaginationSideButton = {
93
94
  tokens: {
94
95
  icon: rightArrowIcon
95
96
  }
96
- },
97
- {
98
- if: { direction: 'previous', hover: true },
99
- tokens: {
100
- iconTranslateX: -1 * palette.size.size4
101
- }
102
- },
103
- {
104
- if: { direction: 'next', hover: true },
105
- tokens: {
106
- iconTranslateX: palette.size.size4
107
- }
108
97
  }
109
98
  ]
110
99
  }
111
-
112
- // TODO: replace this with a build step similar to Palettes
113
- // https://github.com/telus/universal-design-system/issues/167
114
- validateComponentTheme(
115
- PaginationSideButton,
116
- getPaginationSideButtonSchema(palette),
117
- 'pagination-side-button'
118
- )
119
-
120
- export default PaginationSideButton
@@ -0,0 +1,64 @@
1
+ import palette from '@telus-uds/palette-allium'
2
+ import system from '@telus-uds/system-themes/src/tokens/rn'
3
+ import { appearances } from '@telus-uds/system-themes/schema'
4
+
5
+ export default {
6
+ appearances: {
7
+ checked: appearances.Radio.checked,
8
+ error: appearances.Radio.error,
9
+ focus: appearances.Radio.focus,
10
+ hover: appearances.Radio.hover,
11
+ inactive: appearances.Radio.inactive
12
+ },
13
+ tokens: {
14
+ checkedBackgroundColor: palette.color.purpleDeluge,
15
+ checkedSize: palette.size.size12,
16
+ containerBackgroundColor: palette.color.transparent,
17
+ containerBorderRadius: palette.radius.none,
18
+ containerMarginBottom: palette.size.size8,
19
+ containerOpacity: system.opacity.opaque,
20
+ containerPaddingBottom: palette.size.size0,
21
+ containerPaddingLeft: palette.size.size0,
22
+ containerPaddingRight: palette.size.size0,
23
+ containerPaddingTop: palette.size.size0,
24
+ containerShadow: system.shadow.none,
25
+ descriptionFontSize: palette.fontSize.size14,
26
+ descriptionLineHeight: palette.lineHeight.ratio10to7,
27
+ descriptionMarginLeft: system.size.none,
28
+ inputBackgroundColor: palette.color.white,
29
+ inputBorderColor: palette.color.greyShuttle,
30
+ inputBorderWidth: palette.border.border1,
31
+ inputOutlineColor: palette.color.transparent,
32
+ inputOutlineWidth: palette.border.none,
33
+ inputSize: palette.size.size20,
34
+ labelColor: palette.color.greyCharcoal,
35
+ labelFontName: Object.keys(palette.font)[0],
36
+ labelFontSize: palette.fontSize.size16,
37
+ labelFontWeight: '400',
38
+ labelLineHeight: palette.lineHeight.ratio3to2,
39
+ labelMarginLeft: palette.size.size10
40
+ },
41
+ rules: [
42
+ {
43
+ if: { error: true },
44
+ tokens: {
45
+ inputBorderColor: palette.color.red
46
+ }
47
+ },
48
+ {
49
+ if: { focus: true },
50
+ tokens: {
51
+ inputBorderColor: palette.color.purpleDeluge,
52
+ inputBorderWidth: palette.border.border3
53
+ }
54
+ },
55
+ {
56
+ if: { inactive: true },
57
+ tokens: {
58
+ inputBorderColor: palette.color.transparent,
59
+ inputBackgroundColor: palette.color.greyMystic,
60
+ labelColor: palette.color.greyShuttle
61
+ }
62
+ }
63
+ ]
64
+ }