@telus-uds/theme-allium 0.0.2-prerelease.2 → 0.0.2-prerelease.6

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 (56) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/build/theme.js +2841 -0
  3. package/package.json +12 -9
  4. package/src/components/ActivityIndicator.js +6 -8
  5. package/src/components/Box.js +11 -22
  6. package/src/components/Button.js +77 -115
  7. package/src/components/ButtonGroup.js +8 -17
  8. package/src/components/ButtonGroupItem.js +98 -0
  9. package/src/components/Card.js +42 -43
  10. package/src/components/Checkbox.js +59 -0
  11. package/src/components/CheckboxGroup.js +8 -0
  12. package/src/components/ChevronLink.js +12 -0
  13. package/src/components/Divider.js +5 -7
  14. package/src/components/ExpandCollapse.js +4 -13
  15. package/src/components/ExpandCollapseControl.js +17 -37
  16. package/src/components/ExpandCollapsePanel.js +7 -20
  17. package/src/components/Feedback.js +66 -0
  18. package/src/components/Icon.js +8 -7
  19. package/src/components/InputLabel.js +23 -0
  20. package/src/components/InputSupports.js +7 -0
  21. package/src/components/Link.js +67 -96
  22. package/src/components/List.js +68 -0
  23. package/src/components/Modal.js +57 -0
  24. package/src/components/Notification.js +90 -0
  25. package/src/components/Pagination.js +11 -20
  26. package/src/components/PaginationPageButton.js +35 -51
  27. package/src/components/PaginationSideButton.js +46 -76
  28. package/src/components/Progress.js +13 -0
  29. package/src/components/ProgressBar.js +31 -0
  30. package/src/components/Radio.js +69 -0
  31. package/src/components/RadioCard.js +123 -0
  32. package/src/components/RadioCardGroup.js +24 -0
  33. package/src/components/RadioGroup.js +8 -0
  34. package/src/components/Search.js +57 -0
  35. package/src/components/SearchButton.js +71 -0
  36. package/src/components/Select.js +78 -0
  37. package/src/components/SideNav.js +4 -13
  38. package/src/components/SideNavItem.js +49 -54
  39. package/src/components/SideNavItemsGroup.js +18 -32
  40. package/src/components/Skeleton.js +14 -0
  41. package/src/components/StackView.js +10 -0
  42. package/src/components/StepTracker.js +59 -0
  43. package/src/components/Tabs.js +13 -0
  44. package/src/components/TabsItem.js +81 -0
  45. package/src/components/TabsScrollButton.js +34 -0
  46. package/src/components/Tags.js +13 -0
  47. package/src/components/TagsItem.js +126 -0
  48. package/src/components/TextArea.js +8 -0
  49. package/src/components/TextInput.js +73 -0
  50. package/src/components/ToggleSwitch.js +53 -67
  51. package/src/components/Tooltip.js +37 -0
  52. package/src/components/TooltipButton.js +61 -0
  53. package/src/components/Typography.js +109 -93
  54. package/src/components/index.js +52 -42
  55. package/src/components/spacingScale.js +23 -36
  56. package/src/index.js +3 -3
@@ -0,0 +1,61 @@
1
+ module.exports = {
2
+ appearances: {
3
+ focus: '{appearances.TooltipButton.focus}',
4
+ hover: '{appearances.TooltipButton.hover}',
5
+ pressed: '{appearances.TooltipButton.pressed}',
6
+ inverse: {
7
+ values: [true],
8
+ type: 'variant'
9
+ }
10
+ },
11
+ tokens: {
12
+ outerBorderColor: '{palette.color.transparent}',
13
+ outerBorderWidth: '{palette.border.border1}',
14
+ outerBorderGap: '{palette.size.size4}',
15
+ borderRadius: '{palette.radius.pill32}',
16
+ width: '{palette.size.size16}',
17
+
18
+ icon: '{palette.icon.Question}',
19
+ iconScale: '{system.iconScale.scale1}',
20
+ iconSize: '{palette.size.size16}',
21
+ iconColor: '{palette.color.greyThunder}'
22
+ },
23
+ rules: [
24
+ {
25
+ if: { inverse: true },
26
+ tokens: {
27
+ iconColor: '{palette.color.white}'
28
+ }
29
+ },
30
+ {
31
+ if: { hover: true },
32
+ tokens: {
33
+ iconScale: '{system.iconScale.scale1_25}'
34
+ }
35
+ },
36
+ {
37
+ if: { pressed: true },
38
+ tokens: {
39
+ iconColor: '{palette.color.greyShuttle}'
40
+ }
41
+ },
42
+ {
43
+ if: { inverse: true, pressed: true },
44
+ tokens: {
45
+ iconColor: '{palette.color.greyCloud}'
46
+ }
47
+ },
48
+ {
49
+ if: { focus: true },
50
+ tokens: {
51
+ outerBorderColor: '{palette.color.greyShuttle}'
52
+ }
53
+ },
54
+ {
55
+ if: { inverse: true, focus: true },
56
+ tokens: {
57
+ outerBorderColor: '{palette.color.greyCloud}'
58
+ }
59
+ }
60
+ ]
61
+ }
@@ -1,10 +1,4 @@
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 { color, fontSize, lineHeight, letterSpacing, font } = palette
6
-
7
- const Typography = {
1
+ module.exports = {
8
2
  appearances: {
9
3
  size: {
10
4
  description: `Styles text as body or heading text with a given size. Smaller numbers indicate larger sizes,
@@ -14,6 +8,7 @@ accessibility or SEO-related properties; use the heading prop if text should be
14
8
  'micro',
15
9
  'small',
16
10
  'large',
11
+ 'eyebrow',
17
12
  'h1',
18
13
  'h2',
19
14
  'h3',
@@ -48,16 +43,18 @@ accessibility or SEO-related properties; use the heading prop if text should be
48
43
  values: [true],
49
44
  type: 'variant'
50
45
  },
51
- viewport: appearances.viewport
46
+ viewport: '{appearances.system.viewport}'
52
47
  },
53
48
  tokens: {
54
- fontWeight: '400',
55
- fontSize: fontSize.size16,
56
- color: color.greyThunder,
57
- lineHeight: lineHeight.ratio3to2,
58
- textTransform: 'none',
59
- fontName: Object.keys(font)[0],
60
- fontScaleCap: fontSize.size64
49
+ fontName: '{palette.fontName.HelveticaNow}',
50
+ fontWeight: '{palette.fontWeight.weight400}',
51
+
52
+ fontSize: '{palette.fontSize.size16}',
53
+ color: '{palette.color.greyThunder}',
54
+ lineHeight: '{palette.lineHeight.ratio3to2}',
55
+ letterSpacing: '{system.letterSpacing.none}',
56
+ textTransform: '{system.textTransform.none}',
57
+ fontScaleCap: '{palette.fontSize.size64}'
61
58
  },
62
59
  rules: [
63
60
  /**
@@ -66,44 +63,44 @@ accessibility or SEO-related properties; use the heading prop if text should be
66
63
  {
67
64
  if: { colour: 'secondary' },
68
65
  tokens: {
69
- color: color.greyCharcoal
66
+ color: '{palette.color.greyCharcoal}'
70
67
  }
71
68
  },
72
69
 
73
70
  {
74
71
  if: { size: ['display1', 'display2', 'h1', 'h2', 'h3'] },
75
72
  tokens: {
76
- color: color.purpleTelus
73
+ color: '{palette.color.purpleTelus}'
77
74
  }
78
75
  },
79
76
  {
80
77
  if: { size: ['display1', 'display2', 'h1', 'h2', 'h3'], colour: 'secondary' },
81
78
  tokens: {
82
- color: color.greyThunder
79
+ color: '{palette.color.greyThunder}'
83
80
  }
84
81
  },
85
82
  {
86
83
  if: { size: 'h6', colour: 'tertiary' }, // TODO pending confirmation that this is necessary
87
84
  tokens: {
88
- color: color.greyShuttle
85
+ color: '{palette.color.greyShuttle}'
89
86
  }
90
87
  },
91
88
  {
92
89
  if: { size: 'eyebrow' },
93
90
  tokens: {
94
- color: color.greyCharcoal
91
+ color: '{palette.color.greyCharcoal}'
95
92
  }
96
93
  },
97
94
  {
98
95
  if: { size: 'eyebrow', colour: 'secondary' },
99
96
  tokens: {
100
- color: color.purpleTelus
97
+ color: '{palette.color.purpleTelus}'
101
98
  }
102
99
  },
103
100
  {
104
101
  if: { inverse: true },
105
102
  tokens: {
106
- color: color.white
103
+ color: '{palette.color.white}'
107
104
  }
108
105
  },
109
106
 
@@ -114,17 +111,20 @@ accessibility or SEO-related properties; use the heading prop if text should be
114
111
  {
115
112
  if: { size: 'display1' },
116
113
  tokens: {
117
- fontSize: fontSize.size40,
118
- fontWeight: '300',
119
- lineHeight: lineHeight.ratio6to5,
120
- letterSpacing: letterSpacing.medium
114
+ fontSize: '{palette.fontSize.size40}',
115
+
116
+ fontWeight: '{palette.fontWeight.weight300}',
117
+ fontName: '{palette.fontName.HelveticaNow}',
118
+
119
+ lineHeight: '{palette.lineHeight.ratio6to5}',
120
+ letterSpacing: '{palette.letterSpacing.medium}'
121
121
  }
122
122
  },
123
123
  {
124
124
  if: { size: 'display1', viewport: ['lg', 'xl'] },
125
125
  tokens: {
126
- fontSize: fontSize.size64,
127
- lineHeight: lineHeight.ratio9to8
126
+ fontSize: '{palette.fontSize.size64}',
127
+ lineHeight: '{palette.lineHeight.ratio9to8}'
128
128
  }
129
129
  },
130
130
 
@@ -132,19 +132,25 @@ accessibility or SEO-related properties; use the heading prop if text should be
132
132
  {
133
133
  if: { size: 'display2' },
134
134
  tokens: {
135
- fontSize: fontSize.size36,
136
- fontWeight: '400',
137
- letterSpacing: letterSpacing.medium,
138
- lineHeight: lineHeight.ratio11to9
135
+ fontSize: '{palette.fontSize.size36}',
136
+
137
+ fontWeight: '{palette.fontWeight.weight400}',
138
+ fontName: '{palette.fontName.HelveticaNow}',
139
+
140
+ letterSpacing: '{palette.letterSpacing.medium}',
141
+ lineHeight: '{palette.lineHeight.ratio11to9}'
139
142
  }
140
143
  },
141
144
  {
142
145
  if: { size: 'display2', viewport: ['lg', 'xl'] },
143
146
  tokens: {
144
- fontSize: fontSize.size56,
145
- fontWeight: '300',
146
- lineHeight: lineHeight.ratio8to7,
147
- letterSpacing: letterSpacing.condensed
147
+ fontSize: '{palette.fontSize.size56}',
148
+
149
+ fontWeight: '{palette.fontWeight.weight300}',
150
+ fontName: '{palette.fontName.HelveticaNow}',
151
+
152
+ lineHeight: '{palette.lineHeight.ratio8to7}',
153
+ letterSpacing: '{palette.letterSpacing.condensed}'
148
154
  }
149
155
  },
150
156
 
@@ -152,18 +158,21 @@ accessibility or SEO-related properties; use the heading prop if text should be
152
158
  {
153
159
  if: { size: 'h1' },
154
160
  tokens: {
155
- fontSize: fontSize.size28,
156
- lineHeight: lineHeight.ratio9to7,
157
- letterSpacing: letterSpacing.loose
161
+ fontSize: '{palette.fontSize.size28}',
162
+ lineHeight: '{palette.lineHeight.ratio9to7}',
163
+ letterSpacing: '{palette.letterSpacing.loose}'
158
164
  }
159
165
  },
160
166
  {
161
167
  if: { size: 'h1', viewport: ['lg', 'xl'] },
162
168
  tokens: {
163
- fontSize: fontSize.size40,
164
- fontWeight: '300',
165
- lineHeight: lineHeight.ratio6to5,
166
- letterSpacing: letterSpacing.medium
169
+ fontSize: '{palette.fontSize.size40}',
170
+
171
+ fontWeight: '{palette.fontWeight.weight300}',
172
+ fontName: '{palette.fontName.HelveticaNow}',
173
+
174
+ lineHeight: '{palette.lineHeight.ratio6to5}',
175
+ letterSpacing: '{palette.letterSpacing.medium}'
167
176
  }
168
177
  },
169
178
 
@@ -171,17 +180,20 @@ accessibility or SEO-related properties; use the heading prop if text should be
171
180
  {
172
181
  if: { size: 'h2' },
173
182
  tokens: {
174
- fontSize: fontSize.size24,
175
- fontWeight: '500',
176
- lineHeight: lineHeight.ratio4to3
183
+ fontSize: '{palette.fontSize.size24}',
184
+
185
+ fontWeight: '{palette.fontWeight.weight500}',
186
+ fontName: '{palette.fontName.HelveticaNow}',
187
+
188
+ lineHeight: '{palette.lineHeight.ratio4to3}'
177
189
  }
178
190
  },
179
191
  {
180
192
  if: { size: 'h2', viewport: ['lg', 'xl'] },
181
193
  tokens: {
182
- fontSize: fontSize.size28,
183
- lineHeight: lineHeight.ratio9to7,
184
- letterSpacing: letterSpacing.loose
194
+ fontSize: '{palette.fontSize.size28}',
195
+ lineHeight: '{palette.lineHeight.ratio9to7}',
196
+ letterSpacing: '{palette.letterSpacing.loose}'
185
197
  }
186
198
  },
187
199
 
@@ -189,16 +201,19 @@ accessibility or SEO-related properties; use the heading prop if text should be
189
201
  {
190
202
  if: { size: 'h3' },
191
203
  tokens: {
192
- fontSize: fontSize.size20,
193
- fontWeight: '500',
194
- lineHeight: lineHeight.ratio7to5
204
+ fontSize: '{palette.fontSize.size20}',
205
+
206
+ fontWeight: '{palette.fontWeight.weight500}',
207
+ fontName: '{palette.fontName.HelveticaNow}',
208
+
209
+ lineHeight: '{palette.lineHeight.ratio7to5}'
195
210
  }
196
211
  },
197
212
  {
198
213
  if: { size: 'h3', viewport: ['lg', 'xl'] },
199
214
  tokens: {
200
- fontSize: fontSize.size24,
201
- lineHeight: lineHeight.ratio4to3
215
+ fontSize: '{palette.fontSize.size24}',
216
+ lineHeight: '{palette.lineHeight.ratio4to3}'
202
217
  }
203
218
  },
204
219
 
@@ -206,9 +221,12 @@ accessibility or SEO-related properties; use the heading prop if text should be
206
221
  {
207
222
  if: { size: 'h4' },
208
223
  tokens: {
209
- fontSize: fontSize.size16,
210
- fontWeight: '500',
211
- lineHeight: lineHeight.ratio3to2
224
+ fontSize: '{palette.fontSize.size16}',
225
+
226
+ fontWeight: '{palette.fontWeight.weight500}',
227
+ fontName: '{palette.fontName.HelveticaNow}',
228
+
229
+ lineHeight: '{palette.lineHeight.ratio3to2}'
212
230
  }
213
231
  },
214
232
 
@@ -216,9 +234,12 @@ accessibility or SEO-related properties; use the heading prop if text should be
216
234
  {
217
235
  if: { size: 'h5' },
218
236
  tokens: {
219
- fontSize: fontSize.size14,
220
- fontWeight: '500',
221
- lineHeight: lineHeight.ratio9to7
237
+ fontSize: '{palette.fontSize.size14}',
238
+
239
+ fontWeight: '{palette.fontWeight.weight500}',
240
+ fontName: '{palette.fontName.HelveticaNow}',
241
+
242
+ lineHeight: '{palette.lineHeight.ratio9to7}'
222
243
  }
223
244
  },
224
245
 
@@ -226,9 +247,12 @@ accessibility or SEO-related properties; use the heading prop if text should be
226
247
  {
227
248
  if: { size: 'h6' },
228
249
  tokens: {
229
- fontSize: fontSize.size12,
230
- fontWeight: '700',
231
- lineHeight: lineHeight.ratio4to3
250
+ fontSize: '{palette.fontSize.size12}',
251
+
252
+ fontWeight: '{palette.fontWeight.weight700}',
253
+ fontName: '{palette.fontName.HelveticaNow}',
254
+
255
+ lineHeight: '{palette.lineHeight.ratio4to3}'
232
256
  }
233
257
  },
234
258
 
@@ -236,14 +260,14 @@ accessibility or SEO-related properties; use the heading prop if text should be
236
260
  {
237
261
  if: { size: 'large' },
238
262
  tokens: {
239
- fontSize: fontSize.size20,
240
- lineHeight: lineHeight.ratio8to5
263
+ fontSize: '{palette.fontSize.size20}',
264
+ lineHeight: '{palette.lineHeight.ratio8to5}'
241
265
  }
242
266
  },
243
267
  {
244
268
  if: { size: 'large', compact: true },
245
269
  tokens: {
246
- lineHeight: lineHeight.ratio6to5
270
+ lineHeight: '{palette.lineHeight.ratio6to5}'
247
271
  }
248
272
  },
249
273
 
@@ -253,21 +277,21 @@ accessibility or SEO-related properties; use the heading prop if text should be
253
277
  description:
254
278
  "The compact line height for the 'default' font size, but doesn't apply for any other styles",
255
279
  tokens: {
256
- lineHeight: lineHeight.ratio5to4
280
+ lineHeight: '{palette.lineHeight.ratio5to4}'
257
281
  }
258
282
  },
259
283
  /* small */
260
284
  {
261
285
  if: { size: 'small' },
262
286
  tokens: {
263
- fontSize: fontSize.size14,
264
- lineHeight: lineHeight.ratio10to7
287
+ fontSize: '{palette.fontSize.size14}',
288
+ lineHeight: '{palette.lineHeight.ratio10to7}'
265
289
  }
266
290
  },
267
291
  {
268
292
  if: { size: 'small', compact: true },
269
293
  tokens: {
270
- lineHeight: lineHeight.ratio8to7
294
+ lineHeight: '{palette.lineHeight.ratio8to7}'
271
295
  }
272
296
  },
273
297
 
@@ -275,9 +299,12 @@ accessibility or SEO-related properties; use the heading prop if text should be
275
299
  {
276
300
  if: { size: 'micro' },
277
301
  tokens: {
278
- fontSize: fontSize.size12,
279
- fontWeight: '500',
280
- lineHeight: lineHeight.ratio4to3
302
+ fontSize: '{palette.fontSize.size12}',
303
+
304
+ fontWeight: '{palette.fontWeight.weight500}',
305
+ fontName: '{palette.fontName.HelveticaNow}',
306
+
307
+ lineHeight: '{palette.lineHeight.ratio4to3}'
281
308
  }
282
309
  },
283
310
 
@@ -285,10 +312,13 @@ accessibility or SEO-related properties; use the heading prop if text should be
285
312
  {
286
313
  if: { size: 'eyebrow' },
287
314
  tokens: {
288
- fontSize: fontSize.size14,
289
- fontWeight: '700',
290
- textTransform: 'uppercase',
291
- lineHeight: lineHeight.ratio9to7
315
+ fontSize: '{palette.fontSize.size14}',
316
+
317
+ fontWeight: '{palette.fontWeight.weight700}',
318
+ fontName: '{palette.fontName.HelveticaNow}',
319
+
320
+ textTransform: '{system.textTransform.uppercase}',
321
+ lineHeight: '{palette.lineHeight.ratio9to7}'
292
322
  }
293
323
  },
294
324
 
@@ -299,23 +329,9 @@ accessibility or SEO-related properties; use the heading prop if text should be
299
329
  if: { size: ['large', null, 'small', 'micro'], bold: true },
300
330
  description: 'Bold is only available on body text styles, not headings',
301
331
  tokens: {
302
- fontWeight: '700'
332
+ fontWeight: '{palette.fontWeight.weight700}',
333
+ fontName: '{palette.fontName.HelveticaNow}'
303
334
  }
304
335
  }
305
336
  ]
306
337
  }
307
-
308
- // Subset of allowed colours
309
- const { greyCharcoal, greyShuttle, purpleTelus, greyThunder, white } = palette.color
310
-
311
- // TODO: replace this with a build step similar to Palettes
312
- // https://github.com/telus/universal-design-system/issues/167
313
- validateComponentTheme(
314
- Typography,
315
- getTypographySchema({
316
- ...palette,
317
- color: { greyCharcoal, greyShuttle, purpleTelus, greyThunder, white }
318
- })
319
- )
320
-
321
- export default Typography
@@ -1,43 +1,53 @@
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 Icon from './Icon'
11
- import Link from './Link'
12
- import ToggleSwitch from './ToggleSwitch'
13
- import Typography from './Typography'
14
- import SideNav from './SideNav'
15
- import SideNavItem from './SideNavItem'
16
- import SideNavItemsGroup from './SideNavItemsGroup'
17
- import Pagination from './Pagination'
18
- import PaginationPageButton from './PaginationPageButton'
19
- import PaginationSideButton from './PaginationSideButton'
20
- import spacingScale from './spacingScale'
21
-
22
- export default {
23
- ActivityIndicator,
24
- Box,
25
- Button,
26
- ButtonGroup,
27
- Card,
28
- Divider,
29
- ExpandCollapse,
30
- ExpandCollapseControl,
31
- ExpandCollapsePanel,
32
- Icon,
33
- Link,
34
- Pagination,
35
- PaginationPageButton,
36
- PaginationSideButton,
37
- SideNav,
38
- SideNavItem,
39
- SideNavItemsGroup,
40
- ToggleSwitch,
41
- Typography,
42
- spacingScale
1
+ module.exports = {
2
+ ActivityIndicator: require('./ActivityIndicator'),
3
+ Box: require('./Box'),
4
+ Button: require('./Button'),
5
+ ButtonGroup: require('./ButtonGroup'),
6
+ ButtonGroupItem: require('./ButtonGroupItem'),
7
+ Card: require('./Card'),
8
+ Checkbox: require('./Checkbox'),
9
+ CheckboxGroup: require('./CheckboxGroup'),
10
+ ChevronLink: require('./ChevronLink'),
11
+ Divider: require('./Divider'),
12
+ ExpandCollapse: require('./ExpandCollapse'),
13
+ ExpandCollapseControl: require('./ExpandCollapseControl'),
14
+ ExpandCollapsePanel: require('./ExpandCollapsePanel'),
15
+ Feedback: require('./Feedback'),
16
+ Icon: require('./Icon'),
17
+ InputLabel: require('./InputLabel'),
18
+ InputSupports: require('./InputSupports'),
19
+ Link: require('./Link'),
20
+ List: require('./List'),
21
+ Modal: require('./Modal'),
22
+ Notification: require('./Notification'),
23
+ Pagination: require('./Pagination'),
24
+ PaginationPageButton: require('./PaginationPageButton'),
25
+ PaginationSideButton: require('./PaginationSideButton'),
26
+ Progress: require('./Progress'),
27
+ ProgressBar: require('./ProgressBar'),
28
+ Radio: require('./Radio'),
29
+ RadioCard: require('./RadioCard'),
30
+ RadioCardGroup: require('./RadioCardGroup'),
31
+ RadioGroup: require('./RadioGroup'),
32
+ Search: require('./Search'),
33
+ SearchButton: require('./SearchButton'),
34
+ StepTracker: require('./StepTracker'),
35
+ Tabs: require('./Tabs'),
36
+ TabsItem: require('./TabsItem'),
37
+ TabsScrollButton: require('./TabsScrollButton'),
38
+ TextArea: require('./TextArea'),
39
+ TextInput: require('./TextInput'),
40
+ ToggleSwitch: require('./ToggleSwitch'),
41
+ Tooltip: require('./Tooltip'),
42
+ TooltipButton: require('./TooltipButton'),
43
+ Typography: require('./Typography'),
44
+ Select: require('./Select'),
45
+ SideNav: require('./SideNav'),
46
+ SideNavItem: require('./SideNavItem'),
47
+ SideNavItemsGroup: require('./SideNavItemsGroup'),
48
+ Skeleton: require('./Skeleton'),
49
+ StackView: require('./StackView'),
50
+ Tags: require('./Tags'),
51
+ TagsItem: require('./TagsItem'),
52
+ spacingScale: require('./spacingScale')
43
53
  }
@@ -1,46 +1,33 @@
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 = {
1
+ module.exports = {
9
2
  appearances: {
10
- space: spacingScaleAppearances.space,
11
- viewport: spacingScaleAppearances.viewport
3
+ space: '{appearances.spacingScale.space}',
4
+ viewport: '{appearances.system.viewport}'
12
5
  },
13
6
  // Largest spacings first, so they apply any time space >= highest index'
14
- tokens: { size: palette.size.size96 },
7
+ tokens: { size: '{palette.size.size96}' },
15
8
  rules: [
16
- { if: { viewport: ['lg', 'xl'] }, tokens: { size: palette.size.size120 } },
9
+ { if: { viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size120}' } },
17
10
 
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 } },
11
+ { if: { space: 11 }, tokens: { size: '{palette.size.size96}' } },
12
+ { if: { space: 10 }, tokens: { size: '{palette.size.size80}' } },
13
+ { if: { space: 9 }, tokens: { size: '{palette.size.size64}' } },
14
+ { if: { space: 8 }, tokens: { size: '{palette.size.size48}' } },
15
+ { if: { space: 7 }, tokens: { size: '{palette.size.size40}' } },
16
+ { if: { space: 6 }, tokens: { size: '{palette.size.size36}' } },
17
+ { if: { space: 5 }, tokens: { size: '{palette.size.size32}' } },
18
+ { if: { space: 4 }, tokens: { size: '{palette.size.size24}' } },
19
+ { if: { space: 3 }, tokens: { size: '{palette.size.size16}' } },
20
+ { if: { space: 2 }, tokens: { size: '{palette.size.size8}' } },
21
+ { if: { space: 1 }, tokens: { size: '{palette.size.size4}' } },
29
22
 
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 } },
23
+ { if: { space: 11, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size120}' } },
24
+ { if: { space: 10, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size96}' } },
25
+ { if: { space: 9, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size72}' } },
26
+ { if: { space: 8, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size64}' } },
27
+ { if: { space: 7, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size48}' } },
28
+ { if: { space: 6, viewport: ['lg', 'xl'] }, tokens: { size: '{palette.size.size40}' } },
36
29
 
37
30
  // Zero spacing last; overrides all other rules when space === 0
38
- { if: { space: 0 }, tokens: { size: palette.size.size0 } }
31
+ { if: { space: 0 }, tokens: { size: '{palette.size.size0}' } }
39
32
  ]
40
33
  }
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 CHANGED
@@ -1,5 +1,5 @@
1
- import packageJson from '../package.json'
2
- import components from './components'
1
+ const packageJson = require('../package.json')
2
+ const components = require('./components')
3
3
 
4
4
  // TODO: replace this with theme build tooling and schema checks as part of
5
5
  // https://github.com/telus/universal-design-system/issues/92
@@ -14,4 +14,4 @@ const alliumTheme = {
14
14
  components
15
15
  }
16
16
 
17
- export default alliumTheme
17
+ module.exports = alliumTheme