@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,68 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
size: {
|
|
4
|
+
description: 'Indicates list item text size.',
|
|
5
|
+
values: ['large', 'small'],
|
|
6
|
+
type: 'variant'
|
|
7
|
+
},
|
|
8
|
+
compact: {
|
|
9
|
+
description: 'When true it will reduce the line height of the list item.',
|
|
10
|
+
values: [true],
|
|
11
|
+
type: 'variant'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
tokens: {
|
|
15
|
+
itemFontWeight: '{palette.fontWeight.weight400}',
|
|
16
|
+
itemFontSize: '{palette.fontSize.size16}',
|
|
17
|
+
itemLineHeight: '{palette.lineHeight.ratio3to2}',
|
|
18
|
+
itemFontName: '{palette.fontName.HelveticaNow}',
|
|
19
|
+
interItemMargin: '{palette.size.size8}',
|
|
20
|
+
interItemMarginWithDivider: '{palette.size.size16}',
|
|
21
|
+
dividerColor: '{palette.color.greyCloud}',
|
|
22
|
+
dividerSize: '{palette.border.border1}',
|
|
23
|
+
itemBulletContainerWidth: '{palette.size.size16}',
|
|
24
|
+
itemBulletContainerAlign: '{system.textAlign.center}',
|
|
25
|
+
itemBulletWidth: '{palette.size.size4}',
|
|
26
|
+
itemBulletHeight: '{palette.size.size4}',
|
|
27
|
+
itemBulletColor: '{palette.color.purpleTelus}',
|
|
28
|
+
itemIconSize: '{palette.size.size16}',
|
|
29
|
+
itemIconColor: '{palette.color.purpleTelus}',
|
|
30
|
+
listGutter: '{palette.size.size12}'
|
|
31
|
+
},
|
|
32
|
+
rules: [
|
|
33
|
+
{
|
|
34
|
+
if: { size: 'large' },
|
|
35
|
+
tokens: {
|
|
36
|
+
itemFontSize: '{palette.fontSize.size20}',
|
|
37
|
+
itemLineHeight: '{palette.lineHeight.ratio8to5}',
|
|
38
|
+
listGutter: '{palette.size.size12}'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
if: { size: 'small' },
|
|
43
|
+
tokens: {
|
|
44
|
+
itemFontSize: '{palette.fontSize.size14}',
|
|
45
|
+
itemLineHeight: '{palette.lineHeight.ratio10to7}',
|
|
46
|
+
listGutter: '{palette.size.size12}'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
if: { compact: true },
|
|
51
|
+
tokens: {
|
|
52
|
+
itemLineHeight: '{palette.lineHeight.ratio5to4}'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
if: { compact: true, size: 'small' },
|
|
57
|
+
tokens: {
|
|
58
|
+
itemLineHeight: '{palette.lineHeight.ratio8to7}'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
if: { compact: true, size: 'large' },
|
|
63
|
+
tokens: {
|
|
64
|
+
itemLineHeight: '{palette.lineHeight.ratio6to5}'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
maxWidth: '{appearances.Modal.maxWidth}',
|
|
4
|
+
viewport: '{appearances.system.viewport}'
|
|
5
|
+
},
|
|
6
|
+
tokens: {
|
|
7
|
+
backdropColor: '{palette.color.bgModal}',
|
|
8
|
+
backdropOpacity: '{system.opacity.opaque}',
|
|
9
|
+
|
|
10
|
+
height: '{system.size.none}',
|
|
11
|
+
maxWidth: '{system.size.full}',
|
|
12
|
+
|
|
13
|
+
containerPaddingLeft: '{system.size.zero}',
|
|
14
|
+
containerPaddingRight: '{system.size.zero}',
|
|
15
|
+
containerPaddingTop: '{system.size.zero}',
|
|
16
|
+
containerPaddingBottom: '{system.size.zero}',
|
|
17
|
+
|
|
18
|
+
backgroundColor: '{palette.color.white}',
|
|
19
|
+
borderRadius: '{palette.radius.radius4}',
|
|
20
|
+
shadow: '{palette.shadow.elevation1}',
|
|
21
|
+
paddingLeft: '{palette.size.size24}',
|
|
22
|
+
paddingRight: '{palette.size.size24}',
|
|
23
|
+
paddingTop: '{palette.size.size24}',
|
|
24
|
+
paddingBottom: '{palette.size.size24}',
|
|
25
|
+
|
|
26
|
+
closeIcon: '{palette.icon.Close}',
|
|
27
|
+
closeIconSize: '{palette.size.size24}',
|
|
28
|
+
closeIconColor: '{palette.color.greyCharcoal}'
|
|
29
|
+
},
|
|
30
|
+
rules: [
|
|
31
|
+
{
|
|
32
|
+
if: { viewport: ['xs', 'sm'] },
|
|
33
|
+
// covers the entire viewport on mobile devices
|
|
34
|
+
tokens: {
|
|
35
|
+
height: '{system.size.full}'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
if: { viewport: ['md', 'lg', 'xl'] },
|
|
40
|
+
tokens: {
|
|
41
|
+
maxWidth: '{system.integer.576}', // default when maxWidth is not enabled
|
|
42
|
+
// ensures that there's a gap near the top and bottom edge of the viewport
|
|
43
|
+
containerPaddingTop: '{palette.size.size32}',
|
|
44
|
+
containerPaddingBottom: '{palette.size.size32}'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
if: { viewport: ['md', 'lg', 'xl'], maxWidth: true },
|
|
49
|
+
tokens: {
|
|
50
|
+
maxWidth: '{system.size.twoThirds}', // 100% * 8/12
|
|
51
|
+
// compensate for the outside gutter of the layout columns (modal edges should be aligned with the columns edges)
|
|
52
|
+
containerPaddingLeft: '{palette.size.size16}',
|
|
53
|
+
containerPaddingRight: '{palette.size.size16}'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// TODO: replace Close with circled close
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
appearances: {
|
|
5
|
+
system: '{appearances.Notification.system}',
|
|
6
|
+
style: '{appearances.Notification.style}'
|
|
7
|
+
},
|
|
8
|
+
tokens: {
|
|
9
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
10
|
+
borderBottomWidth: '{palette.border.border1}',
|
|
11
|
+
borderTopWidth: '{palette.border.border1}',
|
|
12
|
+
borderLeftWidth: '{palette.border.border1}',
|
|
13
|
+
borderRightWidth: '{palette.border.border1}',
|
|
14
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
15
|
+
borderRadius: '{palette.radius.radius6}',
|
|
16
|
+
paddingTop: '{palette.size.size12}',
|
|
17
|
+
paddingBottom: '{palette.size.size12}',
|
|
18
|
+
paddingLeft: '{palette.size.size12}',
|
|
19
|
+
paddingRight: '{palette.size.size12}',
|
|
20
|
+
|
|
21
|
+
color: '{palette.color.greyCharcoal}',
|
|
22
|
+
fontSize: '{palette.fontSize.size16}',
|
|
23
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
24
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
25
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
26
|
+
|
|
27
|
+
icon: '{system.icon.none}',
|
|
28
|
+
iconColor: '{system.color.none}',
|
|
29
|
+
iconSize: '{palette.size.size24}',
|
|
30
|
+
iconGap: '{palette.size.size16}',
|
|
31
|
+
|
|
32
|
+
dismissIcon: '{palette.icon.Close}',
|
|
33
|
+
dismissIconColor: '{palette.color.greyCharcoal}',
|
|
34
|
+
dismissIconSize: '{palette.size.size24}',
|
|
35
|
+
dismissButtonGap: '{palette.size.size16}'
|
|
36
|
+
},
|
|
37
|
+
rules: [
|
|
38
|
+
{
|
|
39
|
+
if: {
|
|
40
|
+
system: true
|
|
41
|
+
},
|
|
42
|
+
tokens: {
|
|
43
|
+
borderTopWidth: '{system.border.zero}',
|
|
44
|
+
borderLeftWidth: '{system.border.zero}',
|
|
45
|
+
borderRightWidth: '{system.border.zero}',
|
|
46
|
+
borderRadius: '{system.radius.zero}',
|
|
47
|
+
paddingTop: '{palette.size.size16}',
|
|
48
|
+
paddingBottom: '{palette.size.size16}',
|
|
49
|
+
paddingLeft: '{palette.size.size16}',
|
|
50
|
+
paddingRight: '{palette.size.size16}',
|
|
51
|
+
iconGap: '{palette.size.size12}'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
if: {
|
|
56
|
+
style: 'success'
|
|
57
|
+
},
|
|
58
|
+
tokens: {
|
|
59
|
+
backgroundColor: '{palette.color.greenPanache}',
|
|
60
|
+
borderColor: '{palette.color.greenAccessible}',
|
|
61
|
+
icon: '{palette.icon.NotificationSuccess}',
|
|
62
|
+
iconColor: '{palette.color.greenAccessible}'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
if: {
|
|
67
|
+
style: 'warning'
|
|
68
|
+
},
|
|
69
|
+
tokens: {
|
|
70
|
+
backgroundColor: '{palette.color.amberLight}',
|
|
71
|
+
borderColor: '{palette.color.amberDark}',
|
|
72
|
+
icon: '{palette.icon.NotificationWarning}',
|
|
73
|
+
iconColor: '{palette.color.amberDark}',
|
|
74
|
+
dismissIcon: '{system.icon.none}'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
if: {
|
|
79
|
+
style: 'error'
|
|
80
|
+
},
|
|
81
|
+
tokens: {
|
|
82
|
+
backgroundColor: '{palette.color.redLight}',
|
|
83
|
+
borderColor: '{palette.color.red}',
|
|
84
|
+
icon: '{palette.icon.NotificationError}',
|
|
85
|
+
iconColor: '{palette.color.red}',
|
|
86
|
+
dismissIcon: '{system.icon.none}'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
@@ -1,33 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import { getPaginationSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
import { appearances } from '@telus-uds/system-constants'
|
|
4
|
-
|
|
5
|
-
const Pagination = {
|
|
1
|
+
module.exports = {
|
|
6
2
|
appearances: {
|
|
7
|
-
viewport: appearances.viewport
|
|
3
|
+
viewport: '{appearances.system.viewport}'
|
|
8
4
|
},
|
|
9
5
|
tokens: {
|
|
10
|
-
gap: 2,
|
|
11
|
-
truncateAbove: 4,
|
|
6
|
+
gap: '{system.integer.2}',
|
|
7
|
+
truncateAbove: '{system.integer.4}',
|
|
8
|
+
|
|
9
|
+
color: '{palette.color.greyShuttle}',
|
|
10
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
11
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
fontWeight: '400',
|
|
16
|
-
fontSize: palette.fontSize.size16,
|
|
17
|
-
lineHeight: palette.lineHeight.ratio3to2
|
|
13
|
+
fontSize: '{palette.fontSize.size16}',
|
|
14
|
+
lineHeight: '{palette.lineHeight.ratio3to2}'
|
|
18
15
|
},
|
|
19
16
|
rules: [
|
|
20
17
|
{
|
|
21
18
|
if: { viewport: ['md', 'lg', 'xl'] },
|
|
22
19
|
tokens: {
|
|
23
|
-
truncateAbove: 6
|
|
20
|
+
truncateAbove: '{system.integer.6}'
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
]
|
|
27
24
|
}
|
|
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,81 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
buttonAppearances,
|
|
4
|
-
getPaginationPageButtonSchema,
|
|
5
|
-
lineOptions,
|
|
6
|
-
validateComponentTheme
|
|
7
|
-
} from '@telus-uds/tools-theme'
|
|
8
|
-
|
|
9
|
-
const { focus, hover, pressed } = buttonAppearances
|
|
10
|
-
|
|
11
|
-
const PaginationPageButton = {
|
|
1
|
+
module.exports = {
|
|
12
2
|
appearances: {
|
|
13
|
-
focus,
|
|
14
|
-
hover,
|
|
15
|
-
pressed
|
|
3
|
+
focus: '{appearances.PaginationPageButton.focus}',
|
|
4
|
+
hover: '{appearances.PaginationPageButton.hover}',
|
|
5
|
+
pressed: '{appearances.PaginationPageButton.pressed}',
|
|
6
|
+
selected: '{appearances.PaginationPageButton.selected}'
|
|
16
7
|
},
|
|
17
8
|
tokens: {
|
|
18
|
-
borderColor: palette.color.transparent,
|
|
19
|
-
borderWidth: palette.border.border1,
|
|
20
|
-
borderRadius: palette.radius.pill32,
|
|
21
|
-
backgroundColor: palette.color.transparent,
|
|
22
|
-
paddingLeft: palette.size.size8,
|
|
23
|
-
paddingRight: palette.size.size8,
|
|
24
|
-
paddingTop: palette.size.size4,
|
|
25
|
-
paddingBottom: palette.size.size4,
|
|
26
|
-
width: palette.size.size32,
|
|
9
|
+
borderColor: '{palette.color.transparent}',
|
|
10
|
+
borderWidth: '{palette.border.border1}',
|
|
11
|
+
borderRadius: '{palette.radius.pill32}',
|
|
12
|
+
backgroundColor: '{palette.color.transparent}',
|
|
13
|
+
paddingLeft: '{palette.size.size8}',
|
|
14
|
+
paddingRight: '{palette.size.size8}',
|
|
15
|
+
paddingTop: '{palette.size.size4}',
|
|
16
|
+
paddingBottom: '{palette.size.size4}',
|
|
17
|
+
width: '{palette.size.size32}',
|
|
27
18
|
|
|
28
19
|
// never visible - used only to increase the click area size
|
|
29
|
-
outerBorderColor: palette.color.transparent,
|
|
30
|
-
outerBorderWidth: palette.border.border4,
|
|
31
|
-
outerBorderGap: palette.border.border4,
|
|
20
|
+
outerBorderColor: '{palette.color.transparent}',
|
|
21
|
+
outerBorderWidth: '{palette.border.border4}',
|
|
22
|
+
outerBorderGap: '{palette.border.border4}',
|
|
23
|
+
|
|
24
|
+
color: '{palette.color.greyShuttle}',
|
|
32
25
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fontSize: palette.fontSize.size16,
|
|
37
|
-
lineHeight: palette.lineHeight.ratio3to2,
|
|
38
|
-
textLine:
|
|
26
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
27
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
28
|
+
|
|
29
|
+
fontSize: '{palette.fontSize.size16}',
|
|
30
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
31
|
+
textLine: '{system.textLine.underline}',
|
|
32
|
+
textAlign: '{system.flexJustifyContent.center}'
|
|
39
33
|
},
|
|
40
34
|
rules: [
|
|
41
35
|
{
|
|
42
36
|
if: { hover: true },
|
|
43
37
|
tokens: {
|
|
44
|
-
borderColor: palette.color.greyShuttle,
|
|
45
|
-
textLine:
|
|
38
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
39
|
+
textLine: '{system.textLine.none}'
|
|
46
40
|
}
|
|
47
41
|
},
|
|
48
42
|
{
|
|
49
43
|
if: { focus: true },
|
|
50
44
|
tokens: {
|
|
51
|
-
borderColor: palette.color.greyShuttle,
|
|
52
|
-
borderWidth: palette.border.border3
|
|
45
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
46
|
+
borderWidth: '{palette.border.border3}'
|
|
53
47
|
}
|
|
54
48
|
},
|
|
55
49
|
{
|
|
56
50
|
if: { selected: true },
|
|
57
51
|
tokens: {
|
|
58
|
-
backgroundColor: palette.color.greyShuttle,
|
|
59
|
-
color: palette.color.white,
|
|
60
|
-
textLine:
|
|
52
|
+
backgroundColor: '{palette.color.greyShuttle}',
|
|
53
|
+
color: '{palette.color.white}',
|
|
54
|
+
textLine: '{system.textLine.none}'
|
|
61
55
|
}
|
|
62
56
|
},
|
|
63
57
|
{
|
|
64
58
|
if: { pressed: true },
|
|
65
59
|
tokens: {
|
|
66
|
-
backgroundColor: palette.color.greyShuttle,
|
|
67
|
-
color: palette.color.white
|
|
60
|
+
backgroundColor: '{palette.color.greyShuttle}',
|
|
61
|
+
color: '{palette.color.white}'
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
64
|
]
|
|
71
65
|
}
|
|
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,120 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
buttonAppearances,
|
|
4
|
-
getPaginationSideButtonSchema,
|
|
5
|
-
lineOptions,
|
|
6
|
-
paginationSideButtonAppearances,
|
|
7
|
-
validateComponentTheme
|
|
8
|
-
} from '@telus-uds/tools-theme'
|
|
9
|
-
|
|
10
|
-
import leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
|
|
11
|
-
import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
|
|
12
|
-
import { appearances } from '@telus-uds/system-constants'
|
|
13
|
-
|
|
14
|
-
const { focus, hover, pressed } = buttonAppearances
|
|
15
|
-
|
|
16
|
-
const PaginationSideButton = {
|
|
1
|
+
module.exports = {
|
|
17
2
|
appearances: {
|
|
18
|
-
viewport: appearances.viewport,
|
|
19
|
-
focus,
|
|
20
|
-
hover,
|
|
21
|
-
pressed,
|
|
22
|
-
|
|
3
|
+
viewport: '{appearances.system.viewport}',
|
|
4
|
+
focus: '{appearances.PaginationSideButton.focus}',
|
|
5
|
+
hover: '{appearances.PaginationSideButton.hover}',
|
|
6
|
+
pressed: '{appearances.PaginationSideButton.pressed}',
|
|
7
|
+
selected: '{appearances.PaginationSideButton.selected}',
|
|
8
|
+
direction: '{appearances.PaginationSideButton.direction}'
|
|
23
9
|
},
|
|
24
10
|
tokens: {
|
|
25
|
-
borderColor: palette.color.transparent,
|
|
26
|
-
borderWidth: palette.border.border1,
|
|
27
|
-
borderRadius: palette.radius.radius4,
|
|
28
|
-
backgroundColor: palette.color.transparent,
|
|
29
|
-
paddingLeft: palette.size.size8,
|
|
30
|
-
paddingRight: palette.size.size8,
|
|
31
|
-
paddingTop: palette.size.size12,
|
|
32
|
-
paddingBottom: palette.size.size12,
|
|
33
|
-
outerBorderColor: palette.color.transparent,
|
|
11
|
+
borderColor: '{palette.color.transparent}',
|
|
12
|
+
borderWidth: '{palette.border.border1}',
|
|
13
|
+
borderRadius: '{palette.radius.radius4}',
|
|
14
|
+
backgroundColor: '{palette.color.transparent}',
|
|
15
|
+
paddingLeft: '{palette.size.size8}',
|
|
16
|
+
paddingRight: '{palette.size.size8}',
|
|
17
|
+
paddingTop: '{palette.size.size12}',
|
|
18
|
+
paddingBottom: '{palette.size.size12}',
|
|
19
|
+
outerBorderColor: '{palette.color.transparent}',
|
|
20
|
+
|
|
21
|
+
color: '{palette.color.greyShuttle}',
|
|
34
22
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fontWeight: '400',
|
|
38
|
-
fontSize: palette.fontSize.size16,
|
|
39
|
-
lineHeight: palette.lineHeight.ratio3to2,
|
|
40
|
-
textLine: lineOptions.underline,
|
|
23
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
24
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
fontSize: '{palette.fontSize.size16}',
|
|
27
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
28
|
+
textLine: '{system.textLine.underline}',
|
|
29
|
+
|
|
30
|
+
icon: '{system.icon.none}',
|
|
31
|
+
iconSize: '{palette.fontSize.size24}',
|
|
32
|
+
iconDisplace: '{palette.size.size0}',
|
|
33
|
+
|
|
34
|
+
width: '{system.size.none}',
|
|
35
|
+
textAlign: '{system.flexJustifyContent.center}'
|
|
45
36
|
},
|
|
46
37
|
rules: [
|
|
47
38
|
{
|
|
48
39
|
if: { viewport: ['xs', 'sm'] },
|
|
49
40
|
tokens: {
|
|
50
|
-
borderRadius: palette.radius.pill32,
|
|
51
|
-
paddingTop: palette.size.size4,
|
|
52
|
-
paddingBottom: palette.size.size4,
|
|
53
|
-
width:
|
|
41
|
+
borderRadius: '{palette.radius.pill32}',
|
|
42
|
+
paddingTop: '{palette.size.size4}',
|
|
43
|
+
paddingBottom: '{palette.size.size4}',
|
|
44
|
+
width: '{palette.size.size32}'
|
|
54
45
|
}
|
|
55
46
|
},
|
|
56
47
|
{
|
|
57
48
|
if: { hover: true },
|
|
58
49
|
tokens: {
|
|
59
|
-
borderColor: palette.color.greyShuttle,
|
|
60
|
-
textLine:
|
|
50
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
51
|
+
textLine: '{system.textLine.none}',
|
|
52
|
+
iconDisplace: '{palette.size.size4}'
|
|
61
53
|
}
|
|
62
54
|
},
|
|
63
55
|
{
|
|
64
56
|
if: { focus: true },
|
|
65
57
|
tokens: {
|
|
66
|
-
borderColor: palette.color.greyShuttle,
|
|
67
|
-
borderWidth: palette.border.border3
|
|
58
|
+
borderColor: '{palette.color.greyShuttle}',
|
|
59
|
+
borderWidth: '{palette.border.border3}'
|
|
68
60
|
}
|
|
69
61
|
},
|
|
70
62
|
{
|
|
71
63
|
if: { selected: true },
|
|
72
64
|
tokens: {
|
|
73
|
-
backgroundColor: palette.color.greyShuttle,
|
|
74
|
-
color: palette.color.white,
|
|
75
|
-
textLine:
|
|
65
|
+
backgroundColor: '{palette.color.greyShuttle}',
|
|
66
|
+
color: '{palette.color.white}',
|
|
67
|
+
textLine: '{system.textLine.none}'
|
|
76
68
|
}
|
|
77
69
|
},
|
|
78
70
|
{
|
|
79
71
|
if: { pressed: true },
|
|
80
72
|
tokens: {
|
|
81
|
-
backgroundColor: palette.color.greyShuttle,
|
|
82
|
-
color: palette.color.white
|
|
73
|
+
backgroundColor: '{palette.color.greyShuttle}',
|
|
74
|
+
color: '{palette.color.white}'
|
|
83
75
|
}
|
|
84
76
|
},
|
|
85
77
|
{
|
|
86
78
|
if: { direction: 'previous' },
|
|
87
79
|
tokens: {
|
|
88
|
-
icon:
|
|
80
|
+
icon: '{palette.icon.ArrowLeft}'
|
|
89
81
|
}
|
|
90
82
|
},
|
|
91
83
|
{
|
|
92
84
|
if: { direction: 'next' },
|
|
93
85
|
tokens: {
|
|
94
|
-
icon:
|
|
95
|
-
}
|
|
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
|
|
86
|
+
icon: '{palette.icon.ArrowRight}'
|
|
107
87
|
}
|
|
108
88
|
}
|
|
109
89
|
]
|
|
110
90
|
}
|
|
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,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
size: { values: ['mini'], type: 'variant' }
|
|
4
|
+
},
|
|
5
|
+
tokens: {
|
|
6
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
7
|
+
borderWidth: '{palette.border.border1}',
|
|
8
|
+
borderColor: '{palette.color.greyCloud}',
|
|
9
|
+
borderRadius: '{palette.radius.radius12}',
|
|
10
|
+
height: '{palette.size.size16}'
|
|
11
|
+
},
|
|
12
|
+
rules: [{ if: { size: 'mini' }, tokens: { height: '{palette.size.size8}' } }]
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
inactive: '{appearances.ProgressBar.inactive}',
|
|
4
|
+
negative: { values: [true], type: 'variant' }
|
|
5
|
+
},
|
|
6
|
+
tokens: {
|
|
7
|
+
backgroundColor: '{palette.color.greenAccessible}',
|
|
8
|
+
borderRadius: '{palette.radius.radius12}',
|
|
9
|
+
gradient: '{palette.gradient.green}',
|
|
10
|
+
outlineWidth: '{palette.border.border1}',
|
|
11
|
+
outlineColor: '{palette.color.greenAccessible}'
|
|
12
|
+
},
|
|
13
|
+
rules: [
|
|
14
|
+
{
|
|
15
|
+
if: { inactive: true },
|
|
16
|
+
tokens: {
|
|
17
|
+
backgroundColor: '{palette.color.greyCloud}',
|
|
18
|
+
gradient: '{system.gradient.none}',
|
|
19
|
+
outlineColor: '{palette.color.greyThunder}'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
if: { negative: true },
|
|
24
|
+
tokens: {
|
|
25
|
+
backgroundColor: '{palette.color.redDark}',
|
|
26
|
+
gradient: '{system.gradient.none}',
|
|
27
|
+
outlineColor: '{palette.color.redDark}'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
checked: '{appearances.Radio.checked}',
|
|
4
|
+
error: '{appearances.Radio.error}',
|
|
5
|
+
focus: '{appearances.Radio.focus}',
|
|
6
|
+
hover: '{appearances.Radio.hover}',
|
|
7
|
+
inactive: '{appearances.Radio.inactive}'
|
|
8
|
+
},
|
|
9
|
+
tokens: {
|
|
10
|
+
checkedBackgroundColor: '{palette.color.purpleDeluge}',
|
|
11
|
+
checkedSize: '{palette.size.size12}',
|
|
12
|
+
containerBackgroundColor: '{palette.color.transparent}',
|
|
13
|
+
containerBorderRadius: '{palette.radius.none}',
|
|
14
|
+
containerOpacity: '{system.opacity.opaque}',
|
|
15
|
+
containerPaddingBottom: '{palette.size.size0}',
|
|
16
|
+
containerPaddingLeft: '{palette.size.size0}',
|
|
17
|
+
containerPaddingRight: '{palette.size.size0}',
|
|
18
|
+
containerPaddingTop: '{palette.size.size0}',
|
|
19
|
+
containerShadow: '{system.shadow.none}',
|
|
20
|
+
descriptionFontSize: '{palette.fontSize.size14}',
|
|
21
|
+
descriptionLineHeight: '{palette.lineHeight.ratio10to7}',
|
|
22
|
+
descriptionMarginLeft: '{system.size.none}',
|
|
23
|
+
inputBackgroundColor: '{palette.color.white}',
|
|
24
|
+
inputBorderColor: '{palette.color.greyShuttle}',
|
|
25
|
+
inputBorderWidth: '{palette.border.border1}',
|
|
26
|
+
inputOutlineColor: '{palette.color.transparent}',
|
|
27
|
+
inputOutlineWidth: '{palette.border.none}',
|
|
28
|
+
inputSize: '{palette.size.size20}',
|
|
29
|
+
outerBorderWidth: '{system.border.zero}',
|
|
30
|
+
outerBorderColor: '{system.color.transparent}',
|
|
31
|
+
outerBorderGap: '{system.size.zero}',
|
|
32
|
+
labelColor: '{palette.color.greyCharcoal}',
|
|
33
|
+
labelFontName: '{palette.fontName.HelveticaNow}',
|
|
34
|
+
labelFontSize: '{palette.fontSize.size16}',
|
|
35
|
+
labelFontWeight: '{palette.fontWeight.weight400}',
|
|
36
|
+
labelLineHeight: '{palette.lineHeight.ratio3to2}',
|
|
37
|
+
labelMarginLeft: '{palette.size.size10}'
|
|
38
|
+
},
|
|
39
|
+
rules: [
|
|
40
|
+
{
|
|
41
|
+
if: { error: true },
|
|
42
|
+
tokens: {
|
|
43
|
+
inputBorderColor: '{palette.color.red}'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
if: { hover: true },
|
|
48
|
+
tokens: {
|
|
49
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
50
|
+
outerBorderColor: '{palette.color.greyMystic}'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
if: { focus: true },
|
|
55
|
+
tokens: {
|
|
56
|
+
inputBorderColor: '{palette.color.purpleDeluge}',
|
|
57
|
+
inputBorderWidth: '{palette.border.border3}'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
if: { inactive: true },
|
|
62
|
+
tokens: {
|
|
63
|
+
inputBorderColor: '{palette.color.transparent}',
|
|
64
|
+
inputBackgroundColor: '{palette.color.greyMystic}',
|
|
65
|
+
labelColor: '{palette.color.greyShuttle}'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|