@telus-uds/theme-allium 0.0.2-prerelease.4 → 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.
- package/CHANGELOG.md +19 -0
- package/lib/components/ActivityIndicator.js +35 -0
- package/lib/components/Box.js +89 -0
- package/lib/components/Button.js +252 -0
- package/lib/components/ButtonGroup.js +34 -0
- package/lib/components/ButtonGroupItem.js +108 -0
- package/lib/components/Card.js +120 -0
- package/lib/components/Checkbox.js +80 -0
- package/lib/components/ChevronLink.js +39 -0
- package/lib/components/Divider.js +44 -0
- package/lib/components/ExpandCollapse.js +23 -0
- package/lib/components/ExpandCollapseControl.js +49 -0
- package/lib/components/ExpandCollapsePanel.js +25 -0
- package/lib/components/Feedback.js +89 -0
- package/lib/components/Icon.js +47 -0
- package/lib/components/InputLabel.js +33 -0
- package/lib/components/InputSupports.js +19 -0
- package/lib/components/Link.js +241 -0
- package/lib/components/List.js +86 -0
- package/lib/components/Pagination.js +40 -0
- package/lib/components/PaginationPageButton.js +82 -0
- package/lib/components/PaginationSideButton.js +113 -0
- package/lib/components/Radio.js +78 -0
- package/lib/components/Select.js +102 -0
- package/lib/components/SideNav.js +23 -0
- package/lib/components/SideNavItem.js +118 -0
- package/lib/components/SideNavItemsGroup.js +49 -0
- package/lib/components/Skeleton.js +26 -0
- package/lib/components/StackView.js +22 -0
- package/lib/components/Tags.js +34 -0
- package/lib/components/TagsItem.js +133 -0
- package/lib/components/TextArea.js +20 -0
- package/lib/components/TextInput.js +97 -0
- package/lib/components/ToggleSwitch.js +144 -0
- package/lib/components/Tooltip.js +48 -0
- package/lib/components/TooltipButton.js +86 -0
- package/lib/components/Typography.js +370 -0
- package/lib/components/index.js +303 -0
- package/lib/components/spacingScale.js +163 -0
- package/lib/index.js +30 -0
- package/package.json +7 -7
- package/src/components/Box.js +3 -9
- package/src/components/Button.js +27 -72
- package/src/components/ButtonGroup.js +10 -17
- package/src/components/ButtonGroupItem.js +88 -0
- package/src/components/Card.js +4 -3
- package/src/components/Checkbox.js +65 -0
- package/src/components/ChevronLink.js +10 -11
- package/src/components/ExpandCollapse.js +3 -9
- package/src/components/ExpandCollapseControl.js +8 -21
- package/src/components/ExpandCollapsePanel.js +3 -14
- package/src/components/Feedback.js +20 -19
- package/src/components/Icon.js +6 -3
- package/src/components/InputLabel.js +9 -8
- package/src/components/InputSupports.js +9 -0
- package/src/components/Link.js +39 -23
- package/src/components/List.js +70 -0
- package/src/components/Pagination.js +10 -13
- package/src/components/PaginationPageButton.js +15 -25
- package/src/components/PaginationSideButton.js +22 -32
- package/src/components/Radio.js +64 -0
- package/src/components/Select.js +88 -0
- package/src/components/SideNav.js +3 -9
- package/src/components/SideNavItem.js +21 -22
- package/src/components/SideNavItemsGroup.js +11 -18
- package/src/components/Skeleton.js +16 -0
- package/src/components/StackView.js +5 -12
- package/src/components/Tags.js +16 -0
- package/src/components/TagsItem.js +118 -0
- package/src/components/TextArea.js +10 -0
- package/src/components/TextInput.js +14 -17
- package/src/components/ToggleSwitch.js +16 -23
- package/src/components/Tooltip.js +4 -8
- package/src/components/TooltipButton.js +8 -14
- package/src/components/Typography.js +58 -13
- package/src/components/index.js +37 -57
- package/src/components/spacingScale.js +4 -14
- package/src/index.js +1 -1
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
export default {
|
|
5
5
|
appearances: {},
|
|
6
6
|
tokens: {
|
|
7
7
|
borderColor: palette.color.greyCloud,
|
|
8
8
|
borderWidth: palette.border.border1,
|
|
9
|
-
borderStyle:
|
|
9
|
+
borderStyle: system.borderStyle.solid
|
|
10
10
|
},
|
|
11
11
|
rules: []
|
|
12
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 +1,29 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import {
|
|
3
|
-
getExpandCollapseControlSchema,
|
|
4
|
-
validateComponentTheme,
|
|
5
|
-
expandCollapseControlAppearances
|
|
6
|
-
} from '@telus-uds/tools-theme'
|
|
2
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
7
3
|
|
|
8
4
|
import CaretUp from '@telus-uds/palette-allium/build/rn/icons/caret-up.icon.svg'
|
|
9
5
|
import CaretDown from '@telus-uds/palette-allium/build/rn/icons/caret-down.icon.svg'
|
|
6
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
export default {
|
|
12
9
|
appearances: {
|
|
13
|
-
expanded:
|
|
10
|
+
expanded: appearances.ExpandCollapseControl.expanded
|
|
14
11
|
},
|
|
15
12
|
tokens: {
|
|
16
13
|
icon: CaretDown,
|
|
17
14
|
iconColor: palette.color.greenAccessible,
|
|
18
15
|
iconSize: palette.size.size24,
|
|
19
16
|
iconGap: palette.size.size8,
|
|
20
|
-
iconPosition:
|
|
21
|
-
verticalAlign:
|
|
22
|
-
justifyContent:
|
|
17
|
+
iconPosition: system.position.left,
|
|
18
|
+
verticalAlign: system.verticalAlign.top,
|
|
19
|
+
justifyContent: system.flexJustifyContent.flexStart,
|
|
23
20
|
paddingLeft: palette.size.size8,
|
|
24
21
|
paddingRight: palette.size.size16,
|
|
25
22
|
paddingTop: palette.size.size16,
|
|
26
23
|
paddingBottom: palette.size.size16,
|
|
27
|
-
borderWidth:
|
|
24
|
+
borderWidth: system.border.zero,
|
|
28
25
|
borderColor: palette.color.transparent,
|
|
29
26
|
backgroundColor: palette.color.transparent
|
|
30
27
|
},
|
|
31
28
|
rules: [{ if: { expanded: true }, tokens: { icon: CaretUp } }]
|
|
32
29
|
}
|
|
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,12 +1,11 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import { getExpandCollapsePanelSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
export default {
|
|
5
4
|
appearances: {},
|
|
6
5
|
tokens: {
|
|
7
6
|
// animate slightly faster when closing
|
|
8
|
-
expandDuration:
|
|
9
|
-
collapseDuration:
|
|
7
|
+
expandDuration: palette.duration.duration300,
|
|
8
|
+
collapseDuration: palette.duration.duration250,
|
|
10
9
|
contentPaddingLeft: palette.size.size40,
|
|
11
10
|
contentPaddingRight: palette.size.size16,
|
|
12
11
|
contentPaddingTop: palette.size.size0,
|
|
@@ -14,13 +13,3 @@ const ExpandCollapsePanel = {
|
|
|
14
13
|
},
|
|
15
14
|
rules: []
|
|
16
15
|
}
|
|
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,15 +1,18 @@
|
|
|
1
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'
|
|
2
4
|
|
|
3
5
|
import errorIcon from '@telus-uds/palette-allium/build/rn/icons/notification-error.icon.svg'
|
|
4
6
|
import successIcon from '@telus-uds/palette-allium/build/rn/icons/notification-success.icon.svg'
|
|
5
|
-
import {
|
|
6
|
-
feedbackAppearances,
|
|
7
|
-
getFeedbackSchema,
|
|
8
|
-
validateComponentTheme
|
|
9
|
-
} from '@telus-uds/tools-theme'
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
appearances:
|
|
8
|
+
export default {
|
|
9
|
+
appearances: {
|
|
10
|
+
validation: appearances.Feedback.validation,
|
|
11
|
+
icon: {
|
|
12
|
+
values: [true],
|
|
13
|
+
type: 'variant'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
13
16
|
tokens: {
|
|
14
17
|
backgroundColor: palette.color.greyAthens,
|
|
15
18
|
borderColor: palette.color.greyMystic,
|
|
@@ -19,23 +22,27 @@ const Feedback = {
|
|
|
19
22
|
paddingBottom: palette.size.size12,
|
|
20
23
|
paddingLeft: palette.size.size16,
|
|
21
24
|
paddingRight: palette.size.size16,
|
|
22
|
-
space: 2,
|
|
25
|
+
space: system.integer[2],
|
|
23
26
|
|
|
24
27
|
color: palette.color.greyThunder,
|
|
28
|
+
|
|
29
|
+
// TODO: replace with font token
|
|
25
30
|
fontName: Object.keys(palette.font)[0],
|
|
26
31
|
fontWeight: '400',
|
|
32
|
+
// font: palette.font.HelveticaNow[400]
|
|
33
|
+
|
|
27
34
|
lineHeight: palette.lineHeight.ratio3to2,
|
|
28
35
|
titleFontSize: palette.fontSize.size16,
|
|
29
36
|
contentFontSize: palette.fontSize.size14,
|
|
30
37
|
|
|
31
|
-
icon:
|
|
38
|
+
icon: system.icon.none,
|
|
32
39
|
iconSize: palette.fontSize.size24,
|
|
33
40
|
iconColor: palette.color.transparent,
|
|
34
41
|
iconGap: palette.size.size8
|
|
35
42
|
},
|
|
36
43
|
rules: [
|
|
37
44
|
{
|
|
38
|
-
if: {
|
|
45
|
+
if: { validation: 'success' },
|
|
39
46
|
tokens: {
|
|
40
47
|
backgroundColor: palette.color.greenPanache,
|
|
41
48
|
borderColor: palette.color.greenPanache,
|
|
@@ -43,7 +50,7 @@ const Feedback = {
|
|
|
43
50
|
}
|
|
44
51
|
},
|
|
45
52
|
{
|
|
46
|
-
if: {
|
|
53
|
+
if: { validation: 'error' },
|
|
47
54
|
tokens: {
|
|
48
55
|
backgroundColor: palette.color.redLight,
|
|
49
56
|
borderColor: palette.color.redLight,
|
|
@@ -51,14 +58,14 @@ const Feedback = {
|
|
|
51
58
|
}
|
|
52
59
|
},
|
|
53
60
|
{
|
|
54
|
-
if: {
|
|
61
|
+
if: { validation: 'success', icon: true },
|
|
55
62
|
tokens: {
|
|
56
63
|
icon: successIcon,
|
|
57
64
|
iconColor: palette.color.greenAccessible
|
|
58
65
|
}
|
|
59
66
|
},
|
|
60
67
|
{
|
|
61
|
-
if: {
|
|
68
|
+
if: { validation: 'error', icon: true },
|
|
62
69
|
tokens: {
|
|
63
70
|
icon: errorIcon,
|
|
64
71
|
iconColor: palette.color.red
|
|
@@ -66,9 +73,3 @@ const Feedback = {
|
|
|
66
73
|
}
|
|
67
74
|
]
|
|
68
75
|
}
|
|
69
|
-
|
|
70
|
-
// TODO: replace this with a build step similar to Palettes
|
|
71
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
72
|
-
validateComponentTheme(Feedback, getFeedbackSchema(palette))
|
|
73
|
-
|
|
74
|
-
export default Feedback
|
package/src/components/Icon.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
appearances: {
|
|
@@ -12,14 +13,16 @@ export default {
|
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
15
|
tokens: {
|
|
15
|
-
size:
|
|
16
|
-
color: palette.color.greyCharcoal
|
|
16
|
+
size: palette.size.size24,
|
|
17
|
+
color: palette.color.greyCharcoal,
|
|
18
|
+
translateX: system.size.zero,
|
|
19
|
+
translateY: system.size.zero
|
|
17
20
|
},
|
|
18
21
|
rules: [
|
|
19
22
|
{
|
|
20
23
|
if: { size: 'small' },
|
|
21
24
|
tokens: {
|
|
22
|
-
size:
|
|
25
|
+
size: palette.size.size20
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
{
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import { getInputLabelSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
export default {
|
|
5
4
|
appearances: {},
|
|
6
5
|
tokens: {
|
|
7
6
|
gap: palette.size.size8,
|
|
8
7
|
|
|
9
8
|
color: palette.color.greyCharcoal,
|
|
9
|
+
|
|
10
|
+
// TODO: replace with font token
|
|
10
11
|
fontName: Object.keys(palette.font)[0],
|
|
11
12
|
fontWeight: '700',
|
|
13
|
+
// font: palette.font.HelveticaNow[700]
|
|
14
|
+
|
|
12
15
|
fontSize: palette.fontSize.size16,
|
|
13
16
|
lineHeight: palette.lineHeight.ratio3to2,
|
|
14
17
|
|
|
15
18
|
hintColor: palette.color.greyCharcoal,
|
|
19
|
+
|
|
20
|
+
// TODO: replace with font token
|
|
16
21
|
hintFontName: Object.keys(palette.font)[0],
|
|
17
22
|
hintFontWeight: '400',
|
|
23
|
+
// hintFont: palette.font.HelveticaNow[700],
|
|
24
|
+
|
|
18
25
|
hintFontSize: palette.fontSize.size14,
|
|
19
26
|
hintLineHeight: palette.lineHeight.ratio7to5
|
|
20
27
|
},
|
|
21
28
|
rules: []
|
|
22
29
|
}
|
|
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
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export default {
|
|
5
6
|
appearances: {
|
|
6
7
|
size: {
|
|
7
8
|
description:
|
|
@@ -25,47 +26,65 @@ const Link = {
|
|
|
25
26
|
values: [true],
|
|
26
27
|
type: 'variant'
|
|
27
28
|
},
|
|
28
|
-
iconPosition:
|
|
29
|
-
focus:
|
|
30
|
-
hover:
|
|
29
|
+
iconPosition: appearances.Link.iconPosition,
|
|
30
|
+
focus: appearances.Link.focus,
|
|
31
|
+
hover: appearances.Link.hover,
|
|
32
|
+
pressed: appearances.Link.pressed
|
|
31
33
|
},
|
|
32
34
|
tokens: {
|
|
33
35
|
color: palette.color.greenAccessible,
|
|
34
36
|
|
|
35
|
-
textLine:
|
|
36
|
-
textLineStyle:
|
|
37
|
+
textLine: system.textLine.underline,
|
|
38
|
+
textLineStyle: system.textLineStyle.solid,
|
|
37
39
|
|
|
38
40
|
outerBorderColor: palette.color.transparent,
|
|
39
41
|
outerBorderWidth: palette.border.border2,
|
|
40
42
|
outerBorderGap: palette.border.border2,
|
|
41
43
|
outerBorderRadius: palette.radius.radius4,
|
|
44
|
+
outerBorderOutline: system.borderStyle.none,
|
|
42
45
|
|
|
43
46
|
// Same as default size Typography
|
|
47
|
+
// TODO replace with single font token
|
|
44
48
|
blockFontWeight: '400',
|
|
49
|
+
blockFontName: Object.keys(palette.font)[0],
|
|
50
|
+
// bockFont: palette.font.HelveticaNow[400]
|
|
51
|
+
|
|
45
52
|
blockFontSize: palette.fontSize.size16,
|
|
46
53
|
blockLineHeight: palette.lineHeight.ratio3to2,
|
|
47
|
-
|
|
48
|
-
alignSelf: 'flex-start',
|
|
54
|
+
alignSelf: system.flexAlign.flexStart,
|
|
49
55
|
|
|
50
|
-
icon:
|
|
56
|
+
icon: system.icon.none,
|
|
51
57
|
iconSize: palette.fontSize.size24,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
iconTranslateY: 0
|
|
58
|
+
iconSpace: system.integer[1],
|
|
59
|
+
iconTranslateX: system.size.zero,
|
|
60
|
+
iconTranslateY: system.size.zero
|
|
56
61
|
},
|
|
57
62
|
rules: [
|
|
63
|
+
{
|
|
64
|
+
if: { iconPosition: 'left' },
|
|
65
|
+
tokens: {
|
|
66
|
+
iconSpace: system.integer[2]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
58
69
|
// Initial interaction states
|
|
59
70
|
{
|
|
60
71
|
if: { focus: true },
|
|
61
72
|
tokens: {
|
|
62
73
|
outerBorderColor: palette.color.greenAccessible,
|
|
63
|
-
outerBorderOutline:
|
|
74
|
+
outerBorderOutline: system.borderStyle.none
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
if: { hover: true },
|
|
79
|
+
tokens: {
|
|
80
|
+
textLine: system.textLine.none,
|
|
81
|
+
color: palette.color.greenSanFelix
|
|
64
82
|
}
|
|
65
83
|
},
|
|
66
84
|
{
|
|
67
85
|
if: { pressed: true },
|
|
68
86
|
tokens: {
|
|
87
|
+
textLine: system.textLine.none,
|
|
69
88
|
color: palette.color.greenDarkFern
|
|
70
89
|
}
|
|
71
90
|
},
|
|
@@ -97,7 +116,10 @@ const Link = {
|
|
|
97
116
|
if: { size: 'micro' },
|
|
98
117
|
tokens: {
|
|
99
118
|
blockFontSize: palette.fontSize.size12,
|
|
119
|
+
// TODO replace this with font token
|
|
100
120
|
blockFontWeight: '500',
|
|
121
|
+
// blockFont: palette.font.HelveticaNow[500]
|
|
122
|
+
|
|
101
123
|
iconSize: palette.fontSize.size16,
|
|
102
124
|
blockLineHeight: palette.lineHeight.ratio4to3
|
|
103
125
|
}
|
|
@@ -147,7 +169,7 @@ const Link = {
|
|
|
147
169
|
if: { inverse: true, focus: true },
|
|
148
170
|
tokens: {
|
|
149
171
|
outerBorderColor: palette.color.white,
|
|
150
|
-
outerBorderOutline:
|
|
172
|
+
outerBorderOutline: system.borderStyle.none
|
|
151
173
|
}
|
|
152
174
|
},
|
|
153
175
|
{
|
|
@@ -182,14 +204,8 @@ const Link = {
|
|
|
182
204
|
if: { light: true, hover: true },
|
|
183
205
|
tokens: {
|
|
184
206
|
color: palette.color.greyCharcoal,
|
|
185
|
-
textLine:
|
|
207
|
+
textLine: system.textLine.none
|
|
186
208
|
}
|
|
187
209
|
}
|
|
188
210
|
]
|
|
189
211
|
}
|
|
190
|
-
|
|
191
|
-
// TODO: replace this with a build step similar to Palettes
|
|
192
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
193
|
-
validateComponentTheme(Link, getLinkSchema(palette), 'Link')
|
|
194
|
-
|
|
195
|
-
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
|
|
3
|
-
import { appearances } from '@telus-uds/system-
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
const PaginationSideButton = {
|
|
8
|
+
export default {
|
|
17
9
|
appearances: {
|
|
18
|
-
viewport: appearances.viewport,
|
|
19
|
-
focus,
|
|
20
|
-
hover,
|
|
21
|
-
pressed,
|
|
22
|
-
|
|
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:
|
|
37
|
+
textLine: system.textLine.underline,
|
|
41
38
|
|
|
42
|
-
icon:
|
|
39
|
+
icon: system.icon.none,
|
|
43
40
|
iconSize: palette.fontSize.size24,
|
|
44
|
-
iconDisplace: 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,14 @@ const PaginationSideButton = {
|
|
|
50
50
|
borderRadius: palette.radius.pill32,
|
|
51
51
|
paddingTop: palette.size.size4,
|
|
52
52
|
paddingBottom: palette.size.size4,
|
|
53
|
-
width:
|
|
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:
|
|
60
|
+
textLine: system.textLine.none,
|
|
61
61
|
iconDisplace: palette.size.size4
|
|
62
62
|
}
|
|
63
63
|
},
|
|
@@ -73,7 +73,7 @@ const PaginationSideButton = {
|
|
|
73
73
|
tokens: {
|
|
74
74
|
backgroundColor: palette.color.greyShuttle,
|
|
75
75
|
color: palette.color.white,
|
|
76
|
-
textLine:
|
|
76
|
+
textLine: system.textLine.none
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
{
|
|
@@ -97,13 +97,3 @@ const PaginationSideButton = {
|
|
|
97
97
|
}
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
// TODO: replace this with a build step similar to Palettes
|
|
102
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
103
|
-
validateComponentTheme(
|
|
104
|
-
PaginationSideButton,
|
|
105
|
-
getPaginationSideButtonSchema(palette),
|
|
106
|
-
'pagination-side-button'
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
export default PaginationSideButton
|