@telus-uds/theme-allium 0.0.2-prerelease.1 → 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 +47 -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 +10 -7
- package/src/components/Box.js +12 -94
- package/src/components/Button.js +80 -111
- package/src/components/ButtonGroup.js +10 -16
- package/src/components/ButtonGroupItem.js +88 -0
- package/src/components/Card.js +99 -0
- package/src/components/Checkbox.js +65 -0
- package/src/components/ChevronLink.js +19 -0
- 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 +75 -0
- package/src/components/Icon.js +6 -3
- package/src/components/InputLabel.js +29 -0
- package/src/components/InputSupports.js +9 -0
- package/src/components/Link.js +71 -92
- 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 +23 -44
- 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 +12 -0
- 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 +83 -0
- package/src/components/ToggleSwitch.js +16 -23
- package/src/components/Tooltip.js +41 -0
- package/src/components/TooltipButton.js +68 -0
- package/src/components/Typography.js +112 -78
- package/src/components/index.js +37 -39
- package/src/components/spacingScale.js +36 -0
- package/src/index.js +1 -1
|
@@ -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
|
+
export default {
|
|
6
|
+
appearances: {
|
|
7
|
+
hover: appearances.ButtonGroupItem.hover,
|
|
8
|
+
focus: appearances.ButtonGroupItem.focus,
|
|
9
|
+
pressed: appearances.ButtonGroupItem.pressed,
|
|
10
|
+
selected: appearances.ButtonGroupItem.selected,
|
|
11
|
+
inactive: appearances.ButtonGroupItem.inactive
|
|
12
|
+
},
|
|
13
|
+
tokens: {
|
|
14
|
+
borderColor: palette.color.greyCloud,
|
|
15
|
+
borderWidth: palette.border.border1,
|
|
16
|
+
borderRadius: palette.radius.pill32,
|
|
17
|
+
shadow: system.shadow.none,
|
|
18
|
+
|
|
19
|
+
fontSize: palette.fontSize.size14,
|
|
20
|
+
color: palette.color.greyShuttle,
|
|
21
|
+
lineHeight: palette.lineHeight.ratio3to2,
|
|
22
|
+
textAlign: system.flexJustifyContent.center,
|
|
23
|
+
alignSelf: system.flexAlign.flexStart,
|
|
24
|
+
// TODO: replace with font token
|
|
25
|
+
fontName: Object.keys(palette.font)[0],
|
|
26
|
+
fontWeight: '700',
|
|
27
|
+
// font: palette.font.HelveticaNow['700'],
|
|
28
|
+
|
|
29
|
+
backgroundColor: palette.color.white,
|
|
30
|
+
opacity: system.opacity.opaque,
|
|
31
|
+
paddingLeft: palette.size.size16,
|
|
32
|
+
paddingRight: palette.size.size16,
|
|
33
|
+
paddingTop: palette.size.size8,
|
|
34
|
+
paddingBottom: palette.size.size8,
|
|
35
|
+
width: system.size.none,
|
|
36
|
+
minWidth: system.size.zero,
|
|
37
|
+
|
|
38
|
+
outerBorderColor: palette.color.transparent,
|
|
39
|
+
outerBorderWidth: palette.border.border2,
|
|
40
|
+
outerBorderGap: palette.border.border2,
|
|
41
|
+
outerBorderRadius: palette.radius.pill32,
|
|
42
|
+
outerBackgroundColor: palette.color.transparent
|
|
43
|
+
},
|
|
44
|
+
rules: [
|
|
45
|
+
{
|
|
46
|
+
if: { pressed: true },
|
|
47
|
+
tokens: {
|
|
48
|
+
borderWidth: palette.border.none,
|
|
49
|
+
backgroundColor: palette.color.greyShuttle,
|
|
50
|
+
color: palette.color.white
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
if: { focus: true },
|
|
55
|
+
tokens: {
|
|
56
|
+
borderColor: palette.color.purpleTelus,
|
|
57
|
+
borderWidth: palette.border.border3,
|
|
58
|
+
color: palette.color.greyCharcoal,
|
|
59
|
+
outerBorderColor: palette.color.transparent
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{ if: { hover: true }, tokens: { borderWidth: palette.border.border3 } },
|
|
63
|
+
{
|
|
64
|
+
if: { selected: true },
|
|
65
|
+
tokens: {
|
|
66
|
+
borderWidth: palette.border.none,
|
|
67
|
+
backgroundColor: palette.color.purpleTelus,
|
|
68
|
+
color: palette.color.white
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
if: { focus: true, pressed: true },
|
|
73
|
+
tokens: {
|
|
74
|
+
borderWidth: palette.border.none,
|
|
75
|
+
backgroundColor: palette.color.purpleTelus,
|
|
76
|
+
color: palette.color.white
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
if: { inactive: true },
|
|
81
|
+
tokens: {
|
|
82
|
+
backgroundColor: palette.color.greyCloud,
|
|
83
|
+
color: palette.color.white,
|
|
84
|
+
borderWidth: system.border.zero
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
background: {
|
|
8
|
+
values: ['alternative'],
|
|
9
|
+
type: 'variant'
|
|
10
|
+
},
|
|
11
|
+
padding: {
|
|
12
|
+
values: ['narrow', 'intermediate', 'compact', 'custom'],
|
|
13
|
+
type: 'variant'
|
|
14
|
+
},
|
|
15
|
+
viewport: appearances.system.viewport
|
|
16
|
+
},
|
|
17
|
+
tokens: {
|
|
18
|
+
backgroundColor: palette.color.white,
|
|
19
|
+
borderColor: palette.color.greyMystic,
|
|
20
|
+
borderRadius: palette.radius.radius6,
|
|
21
|
+
borderWidth: palette.border.border1,
|
|
22
|
+
paddingBottom: palette.size.size32,
|
|
23
|
+
paddingLeft: palette.size.size24,
|
|
24
|
+
paddingRight: palette.size.size24,
|
|
25
|
+
paddingTop: palette.size.size32,
|
|
26
|
+
shadow: system.shadow.none
|
|
27
|
+
},
|
|
28
|
+
rules: [
|
|
29
|
+
{
|
|
30
|
+
if: { background: 'alternative' },
|
|
31
|
+
tokens: {
|
|
32
|
+
backgroundColor: palette.color.greyAthens
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
if: { viewport: ['md', 'lg', 'xl'] },
|
|
37
|
+
tokens: {
|
|
38
|
+
paddingBottom: palette.size.size48,
|
|
39
|
+
paddingLeft: palette.size.size32,
|
|
40
|
+
paddingRight: palette.size.size32,
|
|
41
|
+
paddingTop: palette.size.size48
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
if: { padding: 'narrow' },
|
|
46
|
+
tokens: {
|
|
47
|
+
paddingBottom: palette.size.size24,
|
|
48
|
+
paddingLeft: palette.size.size16,
|
|
49
|
+
paddingRight: palette.size.size16,
|
|
50
|
+
paddingTop: palette.size.size24
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
if: { padding: 'narrow', viewport: ['md', 'lg', 'xl'] },
|
|
55
|
+
tokens: {
|
|
56
|
+
paddingBottom: palette.size.size32,
|
|
57
|
+
paddingLeft: palette.size.size16,
|
|
58
|
+
paddingRight: palette.size.size16,
|
|
59
|
+
paddingTop: palette.size.size32
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
if: { padding: 'intermediate' },
|
|
64
|
+
tokens: {
|
|
65
|
+
paddingBottom: palette.size.size24,
|
|
66
|
+
paddingLeft: palette.size.size24,
|
|
67
|
+
paddingRight: palette.size.size24,
|
|
68
|
+
paddingTop: palette.size.size24
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
if: { padding: 'intermediate', viewport: ['md', 'lg', 'xl'] },
|
|
73
|
+
tokens: {
|
|
74
|
+
paddingBottom: palette.size.size32,
|
|
75
|
+
paddingLeft: palette.size.size32,
|
|
76
|
+
paddingRight: palette.size.size32,
|
|
77
|
+
paddingTop: palette.size.size32
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
if: { padding: 'compact' },
|
|
82
|
+
tokens: {
|
|
83
|
+
paddingBottom: palette.size.size16,
|
|
84
|
+
paddingLeft: palette.size.size16,
|
|
85
|
+
paddingRight: palette.size.size16,
|
|
86
|
+
paddingTop: palette.size.size16
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
if: { padding: 'custom' },
|
|
91
|
+
tokens: {
|
|
92
|
+
paddingBottom: palette.size.size0,
|
|
93
|
+
paddingLeft: palette.size.size0,
|
|
94
|
+
paddingRight: palette.size.size0,
|
|
95
|
+
paddingTop: palette.size.size0
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
import checkmarkIcon from '@telus-uds/palette-allium/build/rn/icons/checkmark.icon.svg'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
appearances: {
|
|
8
|
+
checked: appearances.Checkbox.checked,
|
|
9
|
+
error: appearances.Checkbox.error,
|
|
10
|
+
focus: appearances.Checkbox.focus,
|
|
11
|
+
hover: appearances.Checkbox.hover,
|
|
12
|
+
inactive: appearances.Checkbox.inactive
|
|
13
|
+
},
|
|
14
|
+
tokens: {
|
|
15
|
+
containerBackgroundColor: palette.color.transparent,
|
|
16
|
+
containerMarginBottom: palette.size.size8,
|
|
17
|
+
feedbackMarginBottom: system.size.zero,
|
|
18
|
+
feedbackMarginTop: palette.size.size2,
|
|
19
|
+
feedbackPosition: system.position.bottom,
|
|
20
|
+
icon: checkmarkIcon,
|
|
21
|
+
iconBackgroundColor: palette.color.purpleDeluge,
|
|
22
|
+
iconColor: palette.color.white,
|
|
23
|
+
iconSize: palette.size.size16,
|
|
24
|
+
inputBackgroundColor: palette.color.white,
|
|
25
|
+
inputBorderColor: palette.color.greyShuttle,
|
|
26
|
+
inputBorderRadius: palette.radius.radius4,
|
|
27
|
+
inputBorderWidth: palette.border.border1,
|
|
28
|
+
inputHeight: palette.size.size20,
|
|
29
|
+
inputOutlineColor: system.color.none,
|
|
30
|
+
inputOutlineWidth: palette.border.none,
|
|
31
|
+
inputShadow: system.shadow.none,
|
|
32
|
+
inputWidth: palette.size.size20,
|
|
33
|
+
labelColor: palette.color.greyCharcoal,
|
|
34
|
+
labelFontName: Object.keys(palette.font)[0],
|
|
35
|
+
labelFontSize: palette.fontSize.size16,
|
|
36
|
+
labelFontWeight: '400',
|
|
37
|
+
labelLineHeight: palette.lineHeight.ratio3to2,
|
|
38
|
+
labelMarginLeft: palette.size.size10
|
|
39
|
+
},
|
|
40
|
+
rules: [
|
|
41
|
+
{
|
|
42
|
+
if: { error: true },
|
|
43
|
+
tokens: {
|
|
44
|
+
inputBorderColor: palette.color.red
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
if: { focus: true },
|
|
49
|
+
tokens: {
|
|
50
|
+
inputBorderColor: palette.color.purpleDeluge,
|
|
51
|
+
inputBorderWidth: palette.border.border3
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
if: { inactive: true },
|
|
56
|
+
tokens: {
|
|
57
|
+
inputBorderColor: palette.color.transparent,
|
|
58
|
+
inputBackgroundColor: palette.color.greyMystic,
|
|
59
|
+
iconBackgroundColor: palette.color.greyMystic,
|
|
60
|
+
iconColor: palette.color.greyShuttle,
|
|
61
|
+
labelColor: palette.color.greyShuttle
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
|
|
6
|
+
import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
appearances: {
|
|
10
|
+
hover: appearances.ChevronLink.hover
|
|
11
|
+
},
|
|
12
|
+
tokens: {
|
|
13
|
+
leftIcon: leftArrowIcon,
|
|
14
|
+
rightIcon: rightArrowIcon,
|
|
15
|
+
iconDisplace: palette.size.size0,
|
|
16
|
+
iconSpace: system.integer[0]
|
|
17
|
+
},
|
|
18
|
+
rules: [{ if: { hover: true }, tokens: { iconDisplace: palette.size.size4 } }]
|
|
19
|
+
}
|
|
@@ -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
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
|
|
8
|
+
export default {
|
|
9
|
+
appearances: {
|
|
10
|
+
validation: appearances.Feedback.validation,
|
|
11
|
+
icon: {
|
|
12
|
+
values: [true],
|
|
13
|
+
type: 'variant'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
tokens: {
|
|
17
|
+
backgroundColor: palette.color.greyAthens,
|
|
18
|
+
borderColor: palette.color.greyMystic,
|
|
19
|
+
borderWidth: palette.border.border1,
|
|
20
|
+
borderRadius: palette.radius.radius4,
|
|
21
|
+
paddingTop: palette.size.size12,
|
|
22
|
+
paddingBottom: palette.size.size12,
|
|
23
|
+
paddingLeft: palette.size.size16,
|
|
24
|
+
paddingRight: palette.size.size16,
|
|
25
|
+
space: system.integer[2],
|
|
26
|
+
|
|
27
|
+
color: palette.color.greyThunder,
|
|
28
|
+
|
|
29
|
+
// TODO: replace with font token
|
|
30
|
+
fontName: Object.keys(palette.font)[0],
|
|
31
|
+
fontWeight: '400',
|
|
32
|
+
// font: palette.font.HelveticaNow[400]
|
|
33
|
+
|
|
34
|
+
lineHeight: palette.lineHeight.ratio3to2,
|
|
35
|
+
titleFontSize: palette.fontSize.size16,
|
|
36
|
+
contentFontSize: palette.fontSize.size14,
|
|
37
|
+
|
|
38
|
+
icon: system.icon.none,
|
|
39
|
+
iconSize: palette.fontSize.size24,
|
|
40
|
+
iconColor: palette.color.transparent,
|
|
41
|
+
iconGap: palette.size.size8
|
|
42
|
+
},
|
|
43
|
+
rules: [
|
|
44
|
+
{
|
|
45
|
+
if: { validation: 'success' },
|
|
46
|
+
tokens: {
|
|
47
|
+
backgroundColor: palette.color.greenPanache,
|
|
48
|
+
borderColor: palette.color.greenPanache,
|
|
49
|
+
color: palette.color.greenDarkFern
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
if: { validation: 'error' },
|
|
54
|
+
tokens: {
|
|
55
|
+
backgroundColor: palette.color.redLight,
|
|
56
|
+
borderColor: palette.color.redLight,
|
|
57
|
+
color: palette.color.red
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
if: { validation: 'success', icon: true },
|
|
62
|
+
tokens: {
|
|
63
|
+
icon: successIcon,
|
|
64
|
+
iconColor: palette.color.greenAccessible
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
if: { validation: 'error', icon: true },
|
|
69
|
+
tokens: {
|
|
70
|
+
icon: errorIcon,
|
|
71
|
+
iconColor: palette.color.red
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
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
|
{
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import palette from '@telus-uds/palette-allium'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
appearances: {},
|
|
5
|
+
tokens: {
|
|
6
|
+
gap: palette.size.size8,
|
|
7
|
+
|
|
8
|
+
color: palette.color.greyCharcoal,
|
|
9
|
+
|
|
10
|
+
// TODO: replace with font token
|
|
11
|
+
fontName: Object.keys(palette.font)[0],
|
|
12
|
+
fontWeight: '700',
|
|
13
|
+
// font: palette.font.HelveticaNow[700]
|
|
14
|
+
|
|
15
|
+
fontSize: palette.fontSize.size16,
|
|
16
|
+
lineHeight: palette.lineHeight.ratio3to2,
|
|
17
|
+
|
|
18
|
+
hintColor: palette.color.greyCharcoal,
|
|
19
|
+
|
|
20
|
+
// TODO: replace with font token
|
|
21
|
+
hintFontName: Object.keys(palette.font)[0],
|
|
22
|
+
hintFontWeight: '400',
|
|
23
|
+
// hintFont: palette.font.HelveticaNow[700],
|
|
24
|
+
|
|
25
|
+
hintFontSize: palette.fontSize.size14,
|
|
26
|
+
hintLineHeight: palette.lineHeight.ratio7to5
|
|
27
|
+
},
|
|
28
|
+
rules: []
|
|
29
|
+
}
|