@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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
appearances: {
|
|
7
|
+
checked: appearances.Radio.checked,
|
|
8
|
+
error: appearances.Radio.error,
|
|
9
|
+
focus: appearances.Radio.focus,
|
|
10
|
+
hover: appearances.Radio.hover,
|
|
11
|
+
inactive: appearances.Radio.inactive
|
|
12
|
+
},
|
|
13
|
+
tokens: {
|
|
14
|
+
checkedBackgroundColor: palette.color.purpleDeluge,
|
|
15
|
+
checkedSize: palette.size.size12,
|
|
16
|
+
containerBackgroundColor: palette.color.transparent,
|
|
17
|
+
containerBorderRadius: palette.radius.none,
|
|
18
|
+
containerMarginBottom: palette.size.size8,
|
|
19
|
+
containerOpacity: system.opacity.opaque,
|
|
20
|
+
containerPaddingBottom: palette.size.size0,
|
|
21
|
+
containerPaddingLeft: palette.size.size0,
|
|
22
|
+
containerPaddingRight: palette.size.size0,
|
|
23
|
+
containerPaddingTop: palette.size.size0,
|
|
24
|
+
containerShadow: system.shadow.none,
|
|
25
|
+
descriptionFontSize: palette.fontSize.size14,
|
|
26
|
+
descriptionLineHeight: palette.lineHeight.ratio10to7,
|
|
27
|
+
descriptionMarginLeft: system.size.none,
|
|
28
|
+
inputBackgroundColor: palette.color.white,
|
|
29
|
+
inputBorderColor: palette.color.greyShuttle,
|
|
30
|
+
inputBorderWidth: palette.border.border1,
|
|
31
|
+
inputOutlineColor: palette.color.transparent,
|
|
32
|
+
inputOutlineWidth: palette.border.none,
|
|
33
|
+
inputSize: palette.size.size20,
|
|
34
|
+
labelColor: palette.color.greyCharcoal,
|
|
35
|
+
labelFontName: Object.keys(palette.font)[0],
|
|
36
|
+
labelFontSize: palette.fontSize.size16,
|
|
37
|
+
labelFontWeight: '400',
|
|
38
|
+
labelLineHeight: palette.lineHeight.ratio3to2,
|
|
39
|
+
labelMarginLeft: palette.size.size10
|
|
40
|
+
},
|
|
41
|
+
rules: [
|
|
42
|
+
{
|
|
43
|
+
if: { error: true },
|
|
44
|
+
tokens: {
|
|
45
|
+
inputBorderColor: palette.color.red
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
if: { focus: true },
|
|
50
|
+
tokens: {
|
|
51
|
+
inputBorderColor: palette.color.purpleDeluge,
|
|
52
|
+
inputBorderWidth: palette.border.border3
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
if: { inactive: true },
|
|
57
|
+
tokens: {
|
|
58
|
+
inputBorderColor: palette.color.transparent,
|
|
59
|
+
inputBackgroundColor: palette.color.greyMystic,
|
|
60
|
+
labelColor: palette.color.greyShuttle
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
4
|
+
|
|
5
|
+
import errorIcon from '@telus-uds/palette-allium/build/rn/icons/notification-error.icon.svg'
|
|
6
|
+
import successIcon from '@telus-uds/palette-allium/build/rn/icons/notification-success.icon.svg'
|
|
7
|
+
import caretDownIcon from '@telus-uds/palette-allium/build/rn/icons/caret-down.icon.svg'
|
|
8
|
+
|
|
9
|
+
const Select = {
|
|
10
|
+
appearances: {
|
|
11
|
+
validation: appearances.Select.validation,
|
|
12
|
+
hover: appearances.Select.hover,
|
|
13
|
+
focus: appearances.Select.focus,
|
|
14
|
+
inactive: appearances.Select.inactive
|
|
15
|
+
},
|
|
16
|
+
tokens: {
|
|
17
|
+
backgroundColor: palette.color.white,
|
|
18
|
+
color: palette.color.greyCharcoal,
|
|
19
|
+
borderWidth: palette.border.border1,
|
|
20
|
+
borderColor: palette.color.greyShuttle,
|
|
21
|
+
borderRadius: palette.radius.radius4,
|
|
22
|
+
paddingTop: palette.size.size12,
|
|
23
|
+
paddingBottom: palette.size.size12,
|
|
24
|
+
paddingLeft: palette.size.size16,
|
|
25
|
+
paddingRight: palette.size.size16,
|
|
26
|
+
height: palette.size.size48,
|
|
27
|
+
|
|
28
|
+
outerBackgroundColor: palette.color.transparent,
|
|
29
|
+
outerBorderWidth: palette.border.border2,
|
|
30
|
+
outerBorderColor: palette.color.transparent,
|
|
31
|
+
outerBorderRadius: palette.radius.radius4,
|
|
32
|
+
|
|
33
|
+
fontSize: palette.fontSize.size16,
|
|
34
|
+
// TODO replace with font token
|
|
35
|
+
fontName: Object.keys(palette.font)[0],
|
|
36
|
+
fontWeight: '400',
|
|
37
|
+
|
|
38
|
+
icon: caretDownIcon,
|
|
39
|
+
iconSize: palette.fontSize.size24,
|
|
40
|
+
iconColor: palette.color.greenAccessible,
|
|
41
|
+
|
|
42
|
+
validationIcon: system.icon.none,
|
|
43
|
+
validationIconSize: palette.fontSize.size24,
|
|
44
|
+
validationIconColor: palette.color.transparent
|
|
45
|
+
},
|
|
46
|
+
rules: [
|
|
47
|
+
{
|
|
48
|
+
if: { hover: true, inactive: null },
|
|
49
|
+
tokens: {
|
|
50
|
+
outerBorderColor: palette.color.greyMystic,
|
|
51
|
+
outerBackgroundColor: palette.color.greyMystic
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
if: { validation: 'success' },
|
|
56
|
+
tokens: {
|
|
57
|
+
borderColor: palette.color.greenAccessible,
|
|
58
|
+
validationIcon: successIcon,
|
|
59
|
+
validationIconColor: palette.color.greenAccessible
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
if: { validation: 'error' },
|
|
64
|
+
tokens: {
|
|
65
|
+
borderColor: palette.color.red,
|
|
66
|
+
validationIcon: errorIcon,
|
|
67
|
+
validationIconColor: palette.color.red
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
if: { focus: true },
|
|
72
|
+
tokens: {
|
|
73
|
+
borderColor: palette.color.purpleDeluge,
|
|
74
|
+
borderWidth: palette.border.border3,
|
|
75
|
+
validationIcon: system.icon.none
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
if: { inactive: true },
|
|
80
|
+
tokens: {
|
|
81
|
+
backgroundColor: palette.color.greyAthens,
|
|
82
|
+
borderColor: palette.color.greyAthens
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default Select
|
|
@@ -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(SideNav, getSideNavSchema(palette), 'side-nav')
|
|
17
|
-
|
|
18
|
-
export default SideNav
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
sideNavItemAppearances,
|
|
5
|
-
linkAppearances,
|
|
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
|
-
|
|
5
|
+
export default {
|
|
10
6
|
appearances: {
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
active: appearances.SideNavItem.active,
|
|
8
|
+
type: appearances.SideNavItem.type,
|
|
9
|
+
expanded: appearances.SideNavItem.expanded,
|
|
10
|
+
hover: appearances.SideNavItem.hover
|
|
13
11
|
},
|
|
14
12
|
tokens: {
|
|
15
13
|
borderColor: palette.color.greyCloud,
|
|
16
14
|
borderWidth: palette.border.border1,
|
|
17
|
-
borderStyle:
|
|
15
|
+
borderStyle: system.borderStyle.solid,
|
|
18
16
|
paddingLeft: palette.size.size16,
|
|
19
17
|
paddingRight: palette.size.size16,
|
|
20
18
|
paddingTop: palette.size.size16,
|
|
21
19
|
paddingBottom: palette.size.size16,
|
|
22
|
-
justifyContent:
|
|
20
|
+
justifyContent: system.flexJustifyContent.spaceBetween,
|
|
23
21
|
color: palette.color.greyCharcoal,
|
|
24
|
-
accentOffset:
|
|
25
|
-
accentPadding:
|
|
22
|
+
accentOffset: system.size.zero,
|
|
23
|
+
accentPadding: system.size.zero,
|
|
26
24
|
accentWidth: palette.size.size4,
|
|
27
|
-
accentBackgroundColor: palette.color.transparent
|
|
25
|
+
accentBackgroundColor: palette.color.transparent,
|
|
26
|
+
fontSize: palette.fontSize.size16,
|
|
27
|
+
fontWeight: '400',
|
|
28
|
+
lineHeight: palette.lineHeight.ratio3to2,
|
|
29
|
+
backgroundColor: palette.color.transparent
|
|
28
30
|
},
|
|
29
31
|
rules: [
|
|
30
32
|
{
|
|
@@ -35,7 +37,10 @@ const SideNavItem = {
|
|
|
35
37
|
paddingLeft: palette.size.size12,
|
|
36
38
|
accentBackgroundColor: palette.color.purpleTelus,
|
|
37
39
|
color: palette.color.purpleTelus,
|
|
40
|
+
|
|
41
|
+
// TODO: replace with font token
|
|
38
42
|
fontWeight: '700'
|
|
43
|
+
// font: palette.font.HelveticaNow[700]
|
|
39
44
|
}
|
|
40
45
|
},
|
|
41
46
|
{
|
|
@@ -48,7 +53,7 @@ const SideNavItem = {
|
|
|
48
53
|
accentBackgroundColor: palette.color.greyAthens,
|
|
49
54
|
accentOffset: palette.size.size16,
|
|
50
55
|
fontSize: palette.fontSize.size14,
|
|
51
|
-
lineHeight: palette.lineHeight.
|
|
56
|
+
lineHeight: palette.lineHeight.ratio7to5
|
|
52
57
|
}
|
|
53
58
|
},
|
|
54
59
|
{
|
|
@@ -102,15 +107,9 @@ const SideNavItem = {
|
|
|
102
107
|
tokens: {
|
|
103
108
|
accentBackgroundColor: palette.color.white,
|
|
104
109
|
color: palette.color.greyCharcoal,
|
|
105
|
-
accentOffset:
|
|
110
|
+
accentOffset: system.size.zero,
|
|
106
111
|
accentWidth: palette.size.size16
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
114
|
]
|
|
110
115
|
}
|
|
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,15 +1,18 @@
|
|
|
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
|
import CaretUp from '@telus-uds/palette-allium/build/rn/icons/caret-up.icon.svg'
|
|
5
6
|
import CaretDown from '@telus-uds/palette-allium/build/rn/icons/caret-down.icon.svg'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
appearances: {
|
|
8
|
+
export default {
|
|
9
|
+
appearances: {
|
|
10
|
+
expanded: appearances.SideNavItemGroup.expanded
|
|
11
|
+
},
|
|
9
12
|
tokens: {
|
|
10
13
|
// animate slightly faster when closing
|
|
11
|
-
expandDuration:
|
|
12
|
-
collapseDuration:
|
|
14
|
+
expandDuration: palette.duration.duration300,
|
|
15
|
+
collapseDuration: palette.duration.duration250,
|
|
13
16
|
contentPaddingLeft: palette.size.size0,
|
|
14
17
|
contentPaddingRight: palette.size.size0,
|
|
15
18
|
contentPaddingTop: palette.size.size0,
|
|
@@ -18,9 +21,9 @@ const SideNavItemsGroup = {
|
|
|
18
21
|
iconColor: palette.color.purpleTelus,
|
|
19
22
|
iconGap: palette.size.size8,
|
|
20
23
|
iconSize: palette.size.size24,
|
|
21
|
-
iconPosition:
|
|
22
|
-
verticalAlign:
|
|
23
|
-
justifyContent:
|
|
24
|
+
iconPosition: system.position.right,
|
|
25
|
+
verticalAlign: system.verticalAlign.middle,
|
|
26
|
+
justifyContent: system.flexJustifyContent.spaceBetween
|
|
24
27
|
},
|
|
25
28
|
rules: [
|
|
26
29
|
{
|
|
@@ -29,13 +32,3 @@ const SideNavItemsGroup = {
|
|
|
29
32
|
}
|
|
30
33
|
]
|
|
31
34
|
}
|
|
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,16 @@
|
|
|
1
|
+
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
|
|
3
|
+
const Skeleton = {
|
|
4
|
+
appearances: {},
|
|
5
|
+
tokens: {
|
|
6
|
+
color: palette.color.greyCloud,
|
|
7
|
+
size: palette.border.border3,
|
|
8
|
+
radius: palette.size.size120,
|
|
9
|
+
baseWidth: palette.size.size40,
|
|
10
|
+
characters: palette.size.size10,
|
|
11
|
+
spaceBetweenLines: palette.size.size2,
|
|
12
|
+
squareRadius: palette.size.size4
|
|
13
|
+
},
|
|
14
|
+
rules: []
|
|
15
|
+
}
|
|
16
|
+
export default Skeleton
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getStackViewSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
1
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
2
|
|
|
4
3
|
// This makes the React Native defaults explicit and allows them to be overridden with tokens
|
|
5
|
-
|
|
4
|
+
export default {
|
|
6
5
|
appearances: {},
|
|
7
6
|
tokens: {
|
|
8
|
-
alignItems:
|
|
9
|
-
justifyContent:
|
|
10
|
-
flexGrow: 0
|
|
7
|
+
alignItems: system.flexAlign.stretch,
|
|
8
|
+
justifyContent: system.flexJustifyContent.flexStart,
|
|
9
|
+
flexGrow: system.integer[0]
|
|
11
10
|
},
|
|
12
11
|
rules: []
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
// TODO: replace this with a build step similar to Palettes
|
|
16
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
17
|
-
validateComponentTheme(StackView, getStackViewSchema(palette), 'stack-view')
|
|
18
|
-
|
|
19
|
-
export default StackView
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
2
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
appearances: {
|
|
6
|
+
viewport: appearances.system.viewport
|
|
7
|
+
},
|
|
8
|
+
tokens: {
|
|
9
|
+
space: system.integer[1],
|
|
10
|
+
direction: system.direction.row,
|
|
11
|
+
alignItems: system.flexAlign.center,
|
|
12
|
+
justifyContent: system.flexJustifyContent.flexStart,
|
|
13
|
+
flexGrow: system.integer[0]
|
|
14
|
+
},
|
|
15
|
+
rules: [{ if: { viewport: ['lg', 'xl'] }, tokens: { space: system.integer[3] } }]
|
|
16
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
4
|
+
|
|
5
|
+
import addIcon from '@telus-uds/palette-allium/build/rn/icons/add.icon.svg'
|
|
6
|
+
import closeIcon from '@telus-uds/palette-allium/build/rn/icons/close.icon.svg'
|
|
7
|
+
|
|
8
|
+
// console.log({ addIcon, closeIcon, size16: palette.size.size16 })
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
appearances: {
|
|
12
|
+
hover: appearances.TagsItem.hover,
|
|
13
|
+
focus: appearances.TagsItem.focus,
|
|
14
|
+
pressed: appearances.TagsItem.pressed,
|
|
15
|
+
selected: appearances.TagsItem.selected,
|
|
16
|
+
inactive: appearances.TagsItem.inactive
|
|
17
|
+
},
|
|
18
|
+
tokens: {
|
|
19
|
+
// Icon tokens
|
|
20
|
+
iconSize: palette.size.size16,
|
|
21
|
+
iconColor: palette.color.greyThunder,
|
|
22
|
+
iconTranslateX: system.integer[0],
|
|
23
|
+
iconTranslateY: system.integer[0],
|
|
24
|
+
|
|
25
|
+
icon: addIcon,
|
|
26
|
+
iconPosition: system.position.right,
|
|
27
|
+
iconSpace: system.integer[2],
|
|
28
|
+
iconBackground: palette.color.greyAthens,
|
|
29
|
+
iconBorderRadius: palette.radius.pill32,
|
|
30
|
+
iconAlignSelf: system.flexAlign.center,
|
|
31
|
+
iconPadding: palette.size.size2,
|
|
32
|
+
|
|
33
|
+
// Button tokens, very similar to ButtonGroup
|
|
34
|
+
borderColor: palette.color.greyCloud,
|
|
35
|
+
borderWidth: palette.border.border1,
|
|
36
|
+
borderRadius: palette.radius.pill32,
|
|
37
|
+
shadow: system.shadow.none,
|
|
38
|
+
|
|
39
|
+
fontSize: palette.fontSize.size14,
|
|
40
|
+
color: palette.color.greyShuttle,
|
|
41
|
+
lineHeight: palette.lineHeight.ratio10to7,
|
|
42
|
+
textAlign: system.flexJustifyContent.center,
|
|
43
|
+
alignSelf: system.flexAlign.center,
|
|
44
|
+
// TODO: replace with font token
|
|
45
|
+
fontName: Object.keys(palette.font)[0],
|
|
46
|
+
fontWeight: '700',
|
|
47
|
+
// font: palette.font.HelveticaNow['700'],
|
|
48
|
+
|
|
49
|
+
backgroundColor: palette.color.white,
|
|
50
|
+
opacity: system.opacity.opaque,
|
|
51
|
+
paddingLeft: palette.size.size16,
|
|
52
|
+
paddingRight: palette.size.size8,
|
|
53
|
+
paddingTop: palette.size.size8,
|
|
54
|
+
paddingBottom: palette.size.size8,
|
|
55
|
+
width: system.size.none,
|
|
56
|
+
minWidth: system.size.zero,
|
|
57
|
+
|
|
58
|
+
outerBorderColor: palette.color.transparent,
|
|
59
|
+
outerBorderWidth: palette.border.border2,
|
|
60
|
+
outerBorderGap: palette.border.border2,
|
|
61
|
+
outerBorderRadius: palette.radius.pill32,
|
|
62
|
+
outerBackgroundColor: palette.color.transparent
|
|
63
|
+
},
|
|
64
|
+
rules: [
|
|
65
|
+
{
|
|
66
|
+
if: { focus: true },
|
|
67
|
+
tokens: {
|
|
68
|
+
borderColor: palette.color.purpleTelus,
|
|
69
|
+
borderWidth: palette.border.border3,
|
|
70
|
+
color: palette.color.greyCharcoal,
|
|
71
|
+
outerBorderColor: palette.color.transparent
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{ if: { hover: true }, tokens: { borderWidth: palette.border.border3 } },
|
|
75
|
+
{
|
|
76
|
+
if: { selected: true },
|
|
77
|
+
tokens: {
|
|
78
|
+
borderWidth: palette.border.none,
|
|
79
|
+
backgroundColor: palette.color.purpleTelus,
|
|
80
|
+
color: palette.color.white,
|
|
81
|
+
|
|
82
|
+
icon: closeIcon,
|
|
83
|
+
iconColor: palette.color.white,
|
|
84
|
+
iconBackground: palette.color.purpleDeluge
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
if: { pressed: true },
|
|
89
|
+
tokens: {
|
|
90
|
+
borderWidth: palette.border.none,
|
|
91
|
+
backgroundColor: palette.color.greyShuttle,
|
|
92
|
+
color: palette.color.white,
|
|
93
|
+
|
|
94
|
+
iconColor: palette.color.white,
|
|
95
|
+
iconBackground: palette.color.greyCharcoal
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
if: { focus: true, pressed: true },
|
|
100
|
+
tokens: {
|
|
101
|
+
borderWidth: palette.border.none,
|
|
102
|
+
backgroundColor: palette.color.purpleTelus,
|
|
103
|
+
color: palette.color.white,
|
|
104
|
+
|
|
105
|
+
iconColor: palette.color.white,
|
|
106
|
+
iconBackground: palette.color.purpleDark
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
if: { inactive: true },
|
|
111
|
+
tokens: {
|
|
112
|
+
backgroundColor: palette.color.greyCloud,
|
|
113
|
+
color: palette.color.white,
|
|
114
|
+
borderWidth: system.border.zero
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
validateComponentTheme
|
|
6
|
-
} 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'
|
|
4
|
+
|
|
7
5
|
import errorIcon from '@telus-uds/palette-allium/build/rn/icons/notification-error.icon.svg'
|
|
8
6
|
import successIcon from '@telus-uds/palette-allium/build/rn/icons/notification-success.icon.svg'
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
export default {
|
|
11
9
|
appearances: {
|
|
12
|
-
|
|
10
|
+
validation: appearances.TextInput.validation,
|
|
11
|
+
hover: appearances.TextInput.hover,
|
|
12
|
+
focus: appearances.TextInput.focus,
|
|
13
|
+
inactive: appearances.TextInput.inactive
|
|
13
14
|
},
|
|
14
15
|
tokens: {
|
|
15
16
|
backgroundColor: palette.color.white,
|
|
@@ -21,19 +22,21 @@ const TextInput = {
|
|
|
21
22
|
paddingBottom: palette.size.size12,
|
|
22
23
|
paddingLeft: palette.size.size16,
|
|
23
24
|
paddingRight: palette.size.size16,
|
|
24
|
-
space: 1,
|
|
25
25
|
|
|
26
26
|
outerBackgroundColor: palette.color.transparent,
|
|
27
27
|
outerBorderWidth: palette.border.border2,
|
|
28
28
|
outerBorderColor: palette.color.transparent,
|
|
29
29
|
outerBorderRadius: palette.radius.radius4,
|
|
30
30
|
|
|
31
|
+
// TODO: replace this with font token
|
|
31
32
|
fontName: Object.keys(palette.font)[0],
|
|
32
|
-
fontSize: palette.fontSize.size16,
|
|
33
33
|
fontWeight: '400',
|
|
34
|
+
// font: palette.font.HelveticaNow[400]
|
|
35
|
+
|
|
36
|
+
fontSize: palette.fontSize.size16,
|
|
34
37
|
lineHeight: palette.lineHeight.ratio3to2,
|
|
35
38
|
|
|
36
|
-
icon:
|
|
39
|
+
icon: system.icon.none,
|
|
37
40
|
iconSize: palette.fontSize.size24,
|
|
38
41
|
iconColor: palette.color.transparent
|
|
39
42
|
},
|
|
@@ -66,7 +69,7 @@ const TextInput = {
|
|
|
66
69
|
tokens: {
|
|
67
70
|
borderColor: palette.color.purpleDeluge,
|
|
68
71
|
borderWidth: palette.border.border3,
|
|
69
|
-
icon:
|
|
72
|
+
icon: system.icon.none
|
|
70
73
|
}
|
|
71
74
|
},
|
|
72
75
|
{
|
|
@@ -78,9 +81,3 @@ const TextInput = {
|
|
|
78
81
|
}
|
|
79
82
|
]
|
|
80
83
|
}
|
|
81
|
-
|
|
82
|
-
// TODO: replace this with a build step similar to Palettes
|
|
83
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
84
|
-
validateComponentTheme(TextInput, getTextInputSchema(palette), 'text-input')
|
|
85
|
-
|
|
86
|
-
export default TextInput
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
validateComponentTheme
|
|
6
|
-
} 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'
|
|
4
|
+
|
|
7
5
|
import checkmarkIcon from '@telus-uds/palette-allium/build/rn/icons/checkmark.icon.svg'
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
export default {
|
|
10
8
|
appearances: {
|
|
11
|
-
focus:
|
|
12
|
-
hover:
|
|
13
|
-
pressed:
|
|
14
|
-
inactive:
|
|
15
|
-
selected:
|
|
9
|
+
focus: appearances.ToggleSwitch.focus,
|
|
10
|
+
hover: appearances.ToggleSwitch.hover,
|
|
11
|
+
pressed: appearances.ToggleSwitch.pressed,
|
|
12
|
+
inactive: appearances.ToggleSwitch.inactive,
|
|
13
|
+
selected: appearances.ToggleSwitch.selected
|
|
16
14
|
},
|
|
17
15
|
tokens: {
|
|
18
16
|
borderColor: palette.color.transparent,
|
|
@@ -24,14 +22,15 @@ const ToggleSwitch = {
|
|
|
24
22
|
outerBorderRadius: palette.radius.pill32,
|
|
25
23
|
outerBackgroundColor: palette.color.transparent,
|
|
26
24
|
backgroundColor: palette.color.greyShuttle,
|
|
27
|
-
opacity:
|
|
28
|
-
paddingLeft:
|
|
29
|
-
paddingRight:
|
|
30
|
-
paddingTop:
|
|
31
|
-
paddingBottom:
|
|
25
|
+
opacity: system.opacity.opaque,
|
|
26
|
+
paddingLeft: system.size.zero,
|
|
27
|
+
paddingRight: system.size.zero,
|
|
28
|
+
paddingTop: system.size.zero,
|
|
29
|
+
paddingBottom: system.size.zero,
|
|
32
30
|
shadow: palette.shadow.surfaceInset,
|
|
31
|
+
alignSelf: 'flex-start',
|
|
33
32
|
|
|
34
|
-
icon:
|
|
33
|
+
icon: system.icon.none,
|
|
35
34
|
width: palette.size.size40,
|
|
36
35
|
trackBorderWidth: palette.border.border3,
|
|
37
36
|
trackBorderColor: palette.color.transparent,
|
|
@@ -117,9 +116,3 @@ const ToggleSwitch = {
|
|
|
117
116
|
}
|
|
118
117
|
]
|
|
119
118
|
}
|
|
120
|
-
|
|
121
|
-
// TODO: replace this with a build step similar to Palettes
|
|
122
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
123
|
-
validateComponentTheme(ToggleSwitch, getToggleSwitchSchema(palette), 'ToggleSwitch')
|
|
124
|
-
|
|
125
|
-
export default ToggleSwitch
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import { getTooltipSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
export default {
|
|
5
4
|
appearances: {
|
|
6
5
|
inverse: {
|
|
7
6
|
values: [true],
|
|
@@ -20,8 +19,11 @@ const Tooltip = {
|
|
|
20
19
|
color: palette.color.white,
|
|
21
20
|
fontSize: palette.fontSize.size14,
|
|
22
21
|
lineHeight: palette.lineHeight.ratio3to2,
|
|
22
|
+
|
|
23
|
+
// TODO: replace with font token
|
|
23
24
|
fontName: Object.keys(palette.font)[0],
|
|
24
25
|
fontWeight: '400',
|
|
26
|
+
// font: palette.font.HelveticaNow[400]
|
|
25
27
|
|
|
26
28
|
arrowWidth: palette.size.size16,
|
|
27
29
|
arrowBorderRadius: palette.radius.radius1,
|
|
@@ -37,9 +39,3 @@ const Tooltip = {
|
|
|
37
39
|
}
|
|
38
40
|
]
|
|
39
41
|
}
|
|
40
|
-
|
|
41
|
-
// TODO: replace this with a build step similar to Palettes
|
|
42
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
43
|
-
validateComponentTheme(Tooltip, getTooltipSchema(palette), 'tooltip')
|
|
44
|
-
|
|
45
|
-
export default Tooltip
|