@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.
- package/CHANGELOG.md +62 -0
- package/build/theme.js +2841 -0
- package/package.json +12 -9
- package/src/components/ActivityIndicator.js +6 -8
- package/src/components/Box.js +11 -22
- package/src/components/Button.js +77 -115
- package/src/components/ButtonGroup.js +8 -17
- package/src/components/ButtonGroupItem.js +98 -0
- package/src/components/Card.js +42 -43
- package/src/components/Checkbox.js +59 -0
- package/src/components/CheckboxGroup.js +8 -0
- package/src/components/ChevronLink.js +12 -0
- package/src/components/Divider.js +5 -7
- package/src/components/ExpandCollapse.js +4 -13
- package/src/components/ExpandCollapseControl.js +17 -37
- package/src/components/ExpandCollapsePanel.js +7 -20
- package/src/components/Feedback.js +66 -0
- package/src/components/Icon.js +8 -7
- package/src/components/InputLabel.js +23 -0
- package/src/components/InputSupports.js +7 -0
- package/src/components/Link.js +67 -96
- package/src/components/List.js +68 -0
- package/src/components/Modal.js +57 -0
- package/src/components/Notification.js +90 -0
- package/src/components/Pagination.js +11 -20
- package/src/components/PaginationPageButton.js +35 -51
- package/src/components/PaginationSideButton.js +46 -76
- package/src/components/Progress.js +13 -0
- package/src/components/ProgressBar.js +31 -0
- package/src/components/Radio.js +69 -0
- package/src/components/RadioCard.js +123 -0
- package/src/components/RadioCardGroup.js +24 -0
- package/src/components/RadioGroup.js +8 -0
- package/src/components/Search.js +57 -0
- package/src/components/SearchButton.js +71 -0
- package/src/components/Select.js +78 -0
- package/src/components/SideNav.js +4 -13
- package/src/components/SideNavItem.js +49 -54
- package/src/components/SideNavItemsGroup.js +18 -32
- package/src/components/Skeleton.js +14 -0
- package/src/components/StackView.js +10 -0
- package/src/components/StepTracker.js +59 -0
- package/src/components/Tabs.js +13 -0
- package/src/components/TabsItem.js +81 -0
- package/src/components/TabsScrollButton.js +34 -0
- package/src/components/Tags.js +13 -0
- package/src/components/TagsItem.js +126 -0
- package/src/components/TextArea.js +8 -0
- package/src/components/TextInput.js +73 -0
- package/src/components/ToggleSwitch.js +53 -67
- package/src/components/Tooltip.js +37 -0
- package/src/components/TooltipButton.js +61 -0
- package/src/components/Typography.js +109 -93
- package/src/components/index.js +52 -42
- package/src/components/spacingScale.js +23 -36
- package/src/index.js +3 -3
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
pressed: '{appearances.RadioCard.pressed}',
|
|
4
|
+
hover: '{appearances.RadioCard.hover}',
|
|
5
|
+
focus: '{appearances.RadioCard.focus}',
|
|
6
|
+
checked: '{appearances.RadioCard.checked}',
|
|
7
|
+
inactive: '{appearances.RadioCard.inactive}',
|
|
8
|
+
error: '{appearances.RadioCard.error}',
|
|
9
|
+
viewport: '{appearances.system.viewport}'
|
|
10
|
+
},
|
|
11
|
+
tokens: {
|
|
12
|
+
// Outer border
|
|
13
|
+
outerBorderColor: '{system.color.transparent}',
|
|
14
|
+
outerBorderWidth: '{system.border.zero}',
|
|
15
|
+
outerBorderGap: '{system.size.zero}',
|
|
16
|
+
|
|
17
|
+
// Card
|
|
18
|
+
flex: '{system.integer.1}',
|
|
19
|
+
backgroundColor: '{palette.color.white}',
|
|
20
|
+
borderColor: '{palette.color.greyCloud}',
|
|
21
|
+
borderRadius: '{palette.radius.radius6}',
|
|
22
|
+
borderWidth: '{palette.border.border1}',
|
|
23
|
+
paddingBottom: '{palette.size.size16}',
|
|
24
|
+
paddingLeft: '{palette.size.size10}',
|
|
25
|
+
paddingRight: '{palette.size.size16}',
|
|
26
|
+
paddingTop: '{palette.size.size16}',
|
|
27
|
+
minWidth: '{palette.size.size288}',
|
|
28
|
+
shadow: '{system.shadow.none}',
|
|
29
|
+
|
|
30
|
+
// RadioButton
|
|
31
|
+
radioCheckedBackgroundColor: '{palette.color.purpleDeluge}',
|
|
32
|
+
radioCheckedSize: '{palette.size.size12}',
|
|
33
|
+
radioInputBackgroundColor: '{palette.color.white}',
|
|
34
|
+
radioInputBorderColor: '{palette.color.greyShuttle}',
|
|
35
|
+
radioInputBorderWidth: '{palette.border.border1}',
|
|
36
|
+
radioInputOutlineColor: '{palette.color.transparent}',
|
|
37
|
+
radioInputOutlineWidth: '{palette.border.none}',
|
|
38
|
+
radioInputSize: '{palette.size.size20}',
|
|
39
|
+
radioOuterBorderColor: '{system.color.transparent}',
|
|
40
|
+
radioOuterBorderWidth: '{system.border.zero}',
|
|
41
|
+
radioOuterBorderGap: '{system.size.zero}',
|
|
42
|
+
|
|
43
|
+
// Title text - duplicates Typography variant { size: 'h3' }
|
|
44
|
+
fontSize: '{palette.fontSize.size20}',
|
|
45
|
+
lineHeight: '{palette.lineHeight.ratio7to5}',
|
|
46
|
+
color: '{palette.color.greyThunder}',
|
|
47
|
+
letterSpacing: '{system.letterSpacing.none}',
|
|
48
|
+
textTransform: '{system.textTransform.none}',
|
|
49
|
+
fontWeight: '{palette.fontWeight.weight500}',
|
|
50
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
51
|
+
|
|
52
|
+
// Spacing
|
|
53
|
+
radioSpace: '{system.integer.2}',
|
|
54
|
+
contentSpace: '{system.integer.2}'
|
|
55
|
+
},
|
|
56
|
+
rules: [
|
|
57
|
+
{
|
|
58
|
+
if: { viewport: ['lg', 'xl'] },
|
|
59
|
+
tokens: {
|
|
60
|
+
paddingBottom: '{palette.size.size24}',
|
|
61
|
+
paddingLeft: '{palette.size.size16}',
|
|
62
|
+
paddingRight: '{palette.size.size24}',
|
|
63
|
+
paddingTop: '{palette.size.size16}',
|
|
64
|
+
|
|
65
|
+
fontSize: '{palette.fontSize.size24}',
|
|
66
|
+
lineHeight: '{palette.lineHeight.ratio4to3}'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
if: { hover: true },
|
|
71
|
+
tokens: {
|
|
72
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
73
|
+
outerBorderColor: '{palette.color.greyMystic}',
|
|
74
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
75
|
+
|
|
76
|
+
radioOuterBorderWidth: '{palette.border.border2}',
|
|
77
|
+
radioOuterBorderColor: '{palette.color.greyMystic}'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
if: { pressed: true },
|
|
82
|
+
description: 'Pressed state matches hover state plus light grey background',
|
|
83
|
+
tokens: {
|
|
84
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
85
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
86
|
+
outerBorderColor: '{palette.color.greyMystic}',
|
|
87
|
+
outerBorderWidth: '{palette.border.border2}'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
if: { focus: true },
|
|
92
|
+
tokens: {
|
|
93
|
+
outerBorderColor: '{palette.color.greyShuttle}',
|
|
94
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
95
|
+
outerBorderGap: '{palette.size.size2}',
|
|
96
|
+
|
|
97
|
+
radioInputBorderColor: '{palette.color.purpleDeluge}',
|
|
98
|
+
radioInputBorderWidth: '{palette.border.border3}'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
if: { inactive: true },
|
|
103
|
+
tokens: {
|
|
104
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
105
|
+
borderColor: '{system.color.transparent}',
|
|
106
|
+
|
|
107
|
+
radioInputBorderColor: '{palette.color.transparent}',
|
|
108
|
+
radioInputBackgroundColor: '{palette.color.greyMystic}',
|
|
109
|
+
color: '{palette.color.greyShuttle}'
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
if: { error: true },
|
|
114
|
+
tokens: {
|
|
115
|
+
borderColor: '{palette.color.red}',
|
|
116
|
+
|
|
117
|
+
radioInputBorderColor: '{palette.color.red}',
|
|
118
|
+
|
|
119
|
+
color: '{palette.color.red}'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
viewport: '{appearances.system.viewport}',
|
|
4
|
+
fullWidth: {
|
|
5
|
+
description: 'Makes cards always occupy the full width of the parent, regardless of viewport',
|
|
6
|
+
values: [true],
|
|
7
|
+
type: 'variant'
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
tokens: {
|
|
11
|
+
direction: '{system.direction.column}',
|
|
12
|
+
space: '{system.integer.3}',
|
|
13
|
+
fieldSpace: '{system.integer.3}'
|
|
14
|
+
},
|
|
15
|
+
rules: [
|
|
16
|
+
{
|
|
17
|
+
if: { viewport: ['lg', 'xl'], fullWidth: null },
|
|
18
|
+
tokens: {
|
|
19
|
+
direction: '{system.direction.row}',
|
|
20
|
+
space: '{system.integer.4}'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
hover: '{appearances.Search.hover}',
|
|
4
|
+
focus: '{appearances.Search.focus}',
|
|
5
|
+
inactive: '{appearances.Search.inactive}'
|
|
6
|
+
},
|
|
7
|
+
tokens: {
|
|
8
|
+
backgroundColor: '{palette.color.white}',
|
|
9
|
+
color: '{palette.color.greyCharcoal}',
|
|
10
|
+
borderWidth: '{palette.border.border1}',
|
|
11
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
12
|
+
borderRadius: '{palette.radius.pill32}',
|
|
13
|
+
paddingTop: '{palette.size.size12}',
|
|
14
|
+
paddingBottom: '{palette.size.size12}',
|
|
15
|
+
paddingLeft: '{palette.size.size24}',
|
|
16
|
+
paddingRight: '{palette.size.size8}',
|
|
17
|
+
|
|
18
|
+
outerBackgroundColor: '{palette.color.transparent}',
|
|
19
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
20
|
+
outerBorderColor: '{palette.color.transparent}',
|
|
21
|
+
outerBorderRadius: '{palette.radius.pill32}',
|
|
22
|
+
|
|
23
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
24
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
25
|
+
|
|
26
|
+
fontSize: '{palette.fontSize.size16}',
|
|
27
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
28
|
+
|
|
29
|
+
placeholderColor: '{palette.color.greyCharcoal}',
|
|
30
|
+
buttonsGap: '{system.integer.1}',
|
|
31
|
+
clearButtonIcon: '{palette.icon.Times}',
|
|
32
|
+
submitButtonIcon: '{palette.icon.SearchBold}'
|
|
33
|
+
},
|
|
34
|
+
rules: [
|
|
35
|
+
{
|
|
36
|
+
if: { hover: true, inactive: null },
|
|
37
|
+
tokens: {
|
|
38
|
+
outerBorderColor: '{palette.color.greyMystic}',
|
|
39
|
+
outerBackgroundColor: '{palette.color.greyMystic}'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
if: { focus: true },
|
|
44
|
+
tokens: {
|
|
45
|
+
borderColor: '{palette.color.purpleDeluge}',
|
|
46
|
+
borderWidth: '{palette.border.border3}'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
if: { inactive: true },
|
|
51
|
+
tokens: {
|
|
52
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
53
|
+
borderColor: '{palette.color.greyAthens}'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
hover: '{appearances.SearchButton.hover}',
|
|
4
|
+
focus: '{appearances.SearchButton.focus}',
|
|
5
|
+
inactive: '{appearances.SearchButton.inactive}',
|
|
6
|
+
pressed: '{appearances.SearchButton.pressed}',
|
|
7
|
+
priority: {
|
|
8
|
+
description: '',
|
|
9
|
+
values: ['high'],
|
|
10
|
+
type: 'variant'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
tokens: {
|
|
14
|
+
borderColor: '{palette.color.transparent}',
|
|
15
|
+
borderWidth: '{system.border.zero}',
|
|
16
|
+
borderRadius: '{palette.radius.pill32}',
|
|
17
|
+
backgroundColor: '{system.color.none}',
|
|
18
|
+
opacity: '{system.opacity.opaque}',
|
|
19
|
+
paddingLeft: '{palette.size.size8}',
|
|
20
|
+
paddingRight: '{palette.size.size8}',
|
|
21
|
+
paddingBottom: '{palette.size.size8}',
|
|
22
|
+
paddingTop: '{palette.size.size8}',
|
|
23
|
+
shadow: '{system.shadow.none}',
|
|
24
|
+
|
|
25
|
+
iconSize: '{palette.size.size20}',
|
|
26
|
+
iconColor: '{palette.color.greyShuttle}'
|
|
27
|
+
},
|
|
28
|
+
rules: [
|
|
29
|
+
{
|
|
30
|
+
if: { priority: 'high' },
|
|
31
|
+
tokens: {
|
|
32
|
+
backgroundColor: '{palette.color.purpleTelus}',
|
|
33
|
+
iconColor: '{palette.color.white}'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
// only the default appearance is different for a high priority button
|
|
37
|
+
{
|
|
38
|
+
if: { hover: true },
|
|
39
|
+
tokens: {
|
|
40
|
+
backgroundColor: '{palette.color.purpleDeluge}',
|
|
41
|
+
borderWidth: '{system.border.zero}',
|
|
42
|
+
iconColor: '{palette.color.white}'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
if: { focus: true },
|
|
47
|
+
tokens: {
|
|
48
|
+
borderColor: '{palette.color.purpleTelus}',
|
|
49
|
+
borderWidth: '{palette.border.border3}',
|
|
50
|
+
iconColor: '{palette.color.purpleTelus}',
|
|
51
|
+
backgroundColor: '{system.color.transparent}'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
if: { pressed: true },
|
|
56
|
+
tokens: {
|
|
57
|
+
borderWidth: '{system.size.zero}',
|
|
58
|
+
backgroundColor: '{palette.color.purpleDark}',
|
|
59
|
+
iconColor: '{palette.color.white}'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
if: { inactive: true },
|
|
64
|
+
tokens: {
|
|
65
|
+
backgroundColor: '{palette.color.greyMystic}',
|
|
66
|
+
iconColor: '{palette.color.greyShuttle}',
|
|
67
|
+
borderWidth: '{system.size.zero}'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const Select = {
|
|
2
|
+
appearances: {
|
|
3
|
+
validation: '{appearances.Select.validation}',
|
|
4
|
+
hover: '{appearances.Select.hover}',
|
|
5
|
+
focus: '{appearances.Select.focus}',
|
|
6
|
+
inactive: '{appearances.Select.inactive}'
|
|
7
|
+
},
|
|
8
|
+
tokens: {
|
|
9
|
+
backgroundColor: '{palette.color.white}',
|
|
10
|
+
color: '{palette.color.greyCharcoal}',
|
|
11
|
+
borderWidth: '{palette.border.border1}',
|
|
12
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
13
|
+
borderRadius: '{palette.radius.radius4}',
|
|
14
|
+
paddingTop: '{palette.size.size12}',
|
|
15
|
+
paddingBottom: '{palette.size.size12}',
|
|
16
|
+
paddingLeft: '{palette.size.size16}',
|
|
17
|
+
paddingRight: '{palette.size.size16}',
|
|
18
|
+
height: '{palette.size.size48}',
|
|
19
|
+
|
|
20
|
+
outerBackgroundColor: '{palette.color.transparent}',
|
|
21
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
22
|
+
outerBorderColor: '{palette.color.transparent}',
|
|
23
|
+
|
|
24
|
+
fontSize: '{palette.fontSize.size16}',
|
|
25
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
26
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
27
|
+
|
|
28
|
+
icon: '{palette.icon.CaretDown}',
|
|
29
|
+
iconSize: '{palette.fontSize.size24}',
|
|
30
|
+
iconColor: '{palette.color.greenAccessible}',
|
|
31
|
+
|
|
32
|
+
validationIcon: '{system.icon.none}',
|
|
33
|
+
validationIconSize: '{palette.fontSize.size24}',
|
|
34
|
+
validationIconColor: '{palette.color.transparent}'
|
|
35
|
+
},
|
|
36
|
+
rules: [
|
|
37
|
+
{
|
|
38
|
+
if: { hover: true, inactive: null },
|
|
39
|
+
tokens: {
|
|
40
|
+
outerBorderColor: '{palette.color.greyMystic}',
|
|
41
|
+
outerBackgroundColor: '{palette.color.greyMystic}'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
if: { validation: 'success' },
|
|
46
|
+
tokens: {
|
|
47
|
+
borderColor: '{palette.color.greenAccessible}',
|
|
48
|
+
validationIcon: '{palette.icon.NotificationSuccess}',
|
|
49
|
+
validationIconColor: '{palette.color.greenAccessible}'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
if: { validation: 'error' },
|
|
54
|
+
tokens: {
|
|
55
|
+
borderColor: '{palette.color.red}',
|
|
56
|
+
validationIcon: '{palette.icon.NotificationError}',
|
|
57
|
+
validationIconColor: '{palette.color.red}'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
if: { focus: true },
|
|
62
|
+
tokens: {
|
|
63
|
+
borderColor: '{palette.color.purpleDeluge}',
|
|
64
|
+
borderWidth: '{palette.border.border3}',
|
|
65
|
+
validationIcon: '{system.icon.none}'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
if: { inactive: true },
|
|
70
|
+
tokens: {
|
|
71
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
72
|
+
borderColor: '{palette.color.greyAthens}'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
module.exports = Select
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { getSideNavSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const SideNav = {
|
|
1
|
+
module.exports = {
|
|
5
2
|
appearances: {},
|
|
6
3
|
tokens: {
|
|
7
|
-
borderColor: palette.color.greyCloud,
|
|
8
|
-
borderWidth: palette.border.border1,
|
|
9
|
-
borderStyle: 'solid'
|
|
4
|
+
borderColor: '{palette.color.greyCloud}',
|
|
5
|
+
borderWidth: '{palette.border.border1}',
|
|
6
|
+
borderStyle: '{system.borderStyle.solid}'
|
|
10
7
|
},
|
|
11
8
|
rules: []
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
// TODO: replace this with a build step similar to Palettes
|
|
15
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
16
|
-
validateComponentTheme(SideNav, getSideNavSchema(palette), 'side-nav')
|
|
17
|
-
|
|
18
|
-
export default SideNav
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
getSideNavItemSchema,
|
|
4
|
-
sideNavItemAppearances,
|
|
5
|
-
linkAppearances,
|
|
6
|
-
validateComponentTheme
|
|
7
|
-
} from '@telus-uds/tools-theme'
|
|
8
|
-
|
|
9
|
-
const SideNavItem = {
|
|
1
|
+
module.exports = {
|
|
10
2
|
appearances: {
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
active: '{appearances.SideNavItem.active}',
|
|
4
|
+
type: '{appearances.SideNavItem.type}',
|
|
5
|
+
expanded: '{appearances.SideNavItem.expanded}',
|
|
6
|
+
hover: '{appearances.SideNavItem.hover}'
|
|
13
7
|
},
|
|
14
8
|
tokens: {
|
|
15
|
-
borderColor: palette.color.greyCloud,
|
|
16
|
-
borderWidth: palette.border.border1,
|
|
17
|
-
borderStyle: 'solid',
|
|
18
|
-
paddingLeft: palette.size.size16,
|
|
19
|
-
paddingRight: palette.size.size16,
|
|
20
|
-
paddingTop: palette.size.size16,
|
|
21
|
-
paddingBottom: palette.size.size16,
|
|
22
|
-
justifyContent: '
|
|
23
|
-
color: palette.color.greyCharcoal,
|
|
24
|
-
accentOffset:
|
|
25
|
-
accentPadding:
|
|
26
|
-
accentWidth: palette.size.size4,
|
|
27
|
-
accentBackgroundColor: palette.color.transparent
|
|
9
|
+
borderColor: '{palette.color.greyCloud}',
|
|
10
|
+
borderWidth: '{palette.border.border1}',
|
|
11
|
+
borderStyle: '{system.borderStyle.solid}',
|
|
12
|
+
paddingLeft: '{palette.size.size16}',
|
|
13
|
+
paddingRight: '{palette.size.size16}',
|
|
14
|
+
paddingTop: '{palette.size.size16}',
|
|
15
|
+
paddingBottom: '{palette.size.size16}',
|
|
16
|
+
justifyContent: '{system.flexJustifyContent.spaceBetween}',
|
|
17
|
+
color: '{palette.color.greyCharcoal}',
|
|
18
|
+
accentOffset: '{system.size.zero}',
|
|
19
|
+
accentPadding: '{system.size.zero}',
|
|
20
|
+
accentWidth: '{palette.size.size4}',
|
|
21
|
+
accentBackgroundColor: '{palette.color.transparent}',
|
|
22
|
+
fontSize: '{palette.fontSize.size16}',
|
|
23
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
24
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
25
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
26
|
+
backgroundColor: '{palette.color.transparent}'
|
|
28
27
|
},
|
|
29
28
|
rules: [
|
|
30
29
|
{
|
|
@@ -32,10 +31,12 @@ const SideNavItem = {
|
|
|
32
31
|
active: true
|
|
33
32
|
},
|
|
34
33
|
tokens: {
|
|
35
|
-
paddingLeft: palette.size.size12,
|
|
36
|
-
accentBackgroundColor: palette.color.purpleTelus,
|
|
37
|
-
color: palette.color.purpleTelus,
|
|
38
|
-
|
|
34
|
+
paddingLeft: '{palette.size.size12}',
|
|
35
|
+
accentBackgroundColor: '{palette.color.purpleTelus}',
|
|
36
|
+
color: '{palette.color.purpleTelus}',
|
|
37
|
+
|
|
38
|
+
fontWeight: '{palette.fontWeight.weight700}',
|
|
39
|
+
fontName: '{palette.fontName.HelveticaNow}'
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
{
|
|
@@ -43,12 +44,12 @@ const SideNavItem = {
|
|
|
43
44
|
type: 'child'
|
|
44
45
|
},
|
|
45
46
|
tokens: {
|
|
46
|
-
paddingLeft: palette.size.size36,
|
|
47
|
-
borderWidth: palette.border.none,
|
|
48
|
-
accentBackgroundColor: palette.color.greyAthens,
|
|
49
|
-
accentOffset: palette.size.size16,
|
|
50
|
-
fontSize: palette.fontSize.size14,
|
|
51
|
-
lineHeight: palette.lineHeight.
|
|
47
|
+
paddingLeft: '{palette.size.size36}',
|
|
48
|
+
borderWidth: '{palette.border.none}',
|
|
49
|
+
accentBackgroundColor: '{palette.color.greyAthens}',
|
|
50
|
+
accentOffset: '{palette.size.size16}',
|
|
51
|
+
fontSize: '{palette.fontSize.size14}',
|
|
52
|
+
lineHeight: '{palette.lineHeight.ratio7to5}'
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
{
|
|
@@ -57,7 +58,7 @@ const SideNavItem = {
|
|
|
57
58
|
active: true
|
|
58
59
|
},
|
|
59
60
|
tokens: {
|
|
60
|
-
paddingLeft: palette.size.size12
|
|
61
|
+
paddingLeft: '{palette.size.size12}'
|
|
61
62
|
}
|
|
62
63
|
},
|
|
63
64
|
{
|
|
@@ -67,9 +68,9 @@ const SideNavItem = {
|
|
|
67
68
|
expanded: true
|
|
68
69
|
},
|
|
69
70
|
tokens: {
|
|
70
|
-
paddingLeft: palette.size.size16,
|
|
71
|
-
accentBackgroundColor: palette.color.transparent,
|
|
72
|
-
color: palette.color.greyCharcoal
|
|
71
|
+
paddingLeft: '{palette.size.size16}',
|
|
72
|
+
accentBackgroundColor: '{palette.color.transparent}',
|
|
73
|
+
color: '{palette.color.greyCharcoal}'
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
{
|
|
@@ -77,8 +78,8 @@ const SideNavItem = {
|
|
|
77
78
|
hover: true
|
|
78
79
|
},
|
|
79
80
|
tokens: {
|
|
80
|
-
backgroundColor: palette.color.greyAthens,
|
|
81
|
-
color: palette.color.purpleTelus
|
|
81
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
82
|
+
color: '{palette.color.purpleTelus}'
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
{
|
|
@@ -87,10 +88,10 @@ const SideNavItem = {
|
|
|
87
88
|
active: true
|
|
88
89
|
},
|
|
89
90
|
tokens: {
|
|
90
|
-
backgroundColor: palette.color.greyAthens,
|
|
91
|
-
color: palette.color.purpleTelus,
|
|
92
|
-
accentPadding: palette.size.size16,
|
|
93
|
-
accentBackgroundColor: palette.color.purpleTelus
|
|
91
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
92
|
+
color: '{palette.color.purpleTelus}',
|
|
93
|
+
accentPadding: '{palette.size.size16}',
|
|
94
|
+
accentBackgroundColor: '{palette.color.purpleTelus}'
|
|
94
95
|
}
|
|
95
96
|
},
|
|
96
97
|
{
|
|
@@ -100,17 +101,11 @@ const SideNavItem = {
|
|
|
100
101
|
hover: true
|
|
101
102
|
},
|
|
102
103
|
tokens: {
|
|
103
|
-
accentBackgroundColor: palette.color.white,
|
|
104
|
-
color: palette.color.greyCharcoal,
|
|
105
|
-
accentOffset:
|
|
106
|
-
accentWidth: palette.size.size16
|
|
104
|
+
accentBackgroundColor: '{palette.color.white}',
|
|
105
|
+
color: '{palette.color.greyCharcoal}',
|
|
106
|
+
accentOffset: '{system.size.zero}',
|
|
107
|
+
accentWidth: '{palette.size.size16}'
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
]
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
-
// TODO: replace this with a build step similar to Palettes
|
|
113
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
114
|
-
validateComponentTheme(SideNavItem, getSideNavItemSchema(palette), 'side-nav-item')
|
|
115
|
-
|
|
116
|
-
export default SideNavItem
|
|
@@ -1,41 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import CaretDown from '@telus-uds/palette-allium/build/rn/icons/caret-down.icon.svg'
|
|
6
|
-
|
|
7
|
-
const SideNavItemsGroup = {
|
|
8
|
-
appearances: {},
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
expanded: '{appearances.SideNavItemGroup.expanded}'
|
|
4
|
+
},
|
|
9
5
|
tokens: {
|
|
10
6
|
// animate slightly faster when closing
|
|
11
|
-
expandDuration:
|
|
12
|
-
collapseDuration:
|
|
13
|
-
contentPaddingLeft: palette.size.size0,
|
|
14
|
-
contentPaddingRight: palette.size.size0,
|
|
15
|
-
contentPaddingTop: palette.size.size0,
|
|
16
|
-
contentPaddingBottom: palette.size.size0,
|
|
17
|
-
icon: CaretDown,
|
|
18
|
-
iconColor: palette.color.purpleTelus,
|
|
19
|
-
iconGap: palette.size.size8,
|
|
20
|
-
iconSize: palette.size.size24,
|
|
21
|
-
iconPosition: 'right',
|
|
22
|
-
verticalAlign: 'middle',
|
|
23
|
-
justifyContent: '
|
|
7
|
+
expandDuration: '{palette.duration.duration300}',
|
|
8
|
+
collapseDuration: '{palette.duration.duration250}',
|
|
9
|
+
contentPaddingLeft: '{palette.size.size0}',
|
|
10
|
+
contentPaddingRight: '{palette.size.size0}',
|
|
11
|
+
contentPaddingTop: '{palette.size.size0}',
|
|
12
|
+
contentPaddingBottom: '{palette.size.size0}',
|
|
13
|
+
icon: '{palette.icon.CaretDown}',
|
|
14
|
+
iconColor: '{palette.color.purpleTelus}',
|
|
15
|
+
iconGap: '{palette.size.size8}',
|
|
16
|
+
iconSize: '{palette.size.size24}',
|
|
17
|
+
iconPosition: '{system.position.right}',
|
|
18
|
+
verticalAlign: '{system.verticalAlign.middle}',
|
|
19
|
+
justifyContent: '{system.flexJustifyContent.spaceBetween}'
|
|
24
20
|
},
|
|
25
21
|
rules: [
|
|
26
22
|
{
|
|
27
23
|
if: { expanded: true },
|
|
28
|
-
tokens: { icon: CaretUp }
|
|
24
|
+
tokens: { icon: '{palette.icon.CaretUp}' }
|
|
29
25
|
}
|
|
30
26
|
]
|
|
31
27
|
}
|
|
32
|
-
|
|
33
|
-
// TODO: replace this with a build step similar to Palettes
|
|
34
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
35
|
-
validateComponentTheme(
|
|
36
|
-
SideNavItemsGroup,
|
|
37
|
-
getSideNavItemsGroupSchema(palette),
|
|
38
|
-
'side-nav-items-group'
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
export default SideNavItemsGroup
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const Skeleton = {
|
|
2
|
+
appearances: {},
|
|
3
|
+
tokens: {
|
|
4
|
+
color: '{palette.color.greyCloud}',
|
|
5
|
+
size: '{palette.border.border3}',
|
|
6
|
+
radius: '{palette.size.size120}',
|
|
7
|
+
baseWidth: '{palette.size.size40}',
|
|
8
|
+
characters: '{palette.size.size10}',
|
|
9
|
+
spaceBetweenLines: '{palette.size.size2}',
|
|
10
|
+
squareRadius: '{palette.size.size4}'
|
|
11
|
+
},
|
|
12
|
+
rules: []
|
|
13
|
+
}
|
|
14
|
+
module.exports = Skeleton
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This makes the React Native defaults explicit and allows them to be overridden with tokens
|
|
2
|
+
module.exports = {
|
|
3
|
+
appearances: {},
|
|
4
|
+
tokens: {
|
|
5
|
+
alignItems: '{system.flexAlign.stretch}',
|
|
6
|
+
justifyContent: '{system.flexJustifyContent.flexStart}',
|
|
7
|
+
flexGrow: '{system.integer.0}'
|
|
8
|
+
},
|
|
9
|
+
rules: []
|
|
10
|
+
}
|