@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,59 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
checked: '{appearances.Checkbox.checked}',
|
|
4
|
+
error: '{appearances.Checkbox.error}',
|
|
5
|
+
focus: '{appearances.Checkbox.focus}',
|
|
6
|
+
hover: '{appearances.Checkbox.hover}',
|
|
7
|
+
inactive: '{appearances.Checkbox.inactive}'
|
|
8
|
+
},
|
|
9
|
+
tokens: {
|
|
10
|
+
containerBackgroundColor: '{palette.color.transparent}',
|
|
11
|
+
feedbackMarginBottom: '{system.size.zero}',
|
|
12
|
+
feedbackMarginTop: '{palette.size.size2}',
|
|
13
|
+
feedbackPosition: '{system.position.bottom}',
|
|
14
|
+
icon: '{palette.icon.Checkmark}',
|
|
15
|
+
iconBackgroundColor: '{palette.color.purpleDeluge}',
|
|
16
|
+
iconColor: '{palette.color.white}',
|
|
17
|
+
iconSize: '{palette.size.size16}',
|
|
18
|
+
inputBackgroundColor: '{palette.color.white}',
|
|
19
|
+
inputBorderColor: '{palette.color.greyShuttle}',
|
|
20
|
+
inputBorderRadius: '{palette.radius.radius4}',
|
|
21
|
+
inputBorderWidth: '{palette.border.border1}',
|
|
22
|
+
inputHeight: '{palette.size.size20}',
|
|
23
|
+
inputOutlineColor: '{system.color.none}',
|
|
24
|
+
inputOutlineWidth: '{palette.border.none}',
|
|
25
|
+
inputShadow: '{system.shadow.none}',
|
|
26
|
+
inputWidth: '{palette.size.size20}',
|
|
27
|
+
labelColor: '{palette.color.greyCharcoal}',
|
|
28
|
+
labelFontName: '{palette.fontName.HelveticaNow}',
|
|
29
|
+
labelFontSize: '{palette.fontSize.size16}',
|
|
30
|
+
labelFontWeight: '{palette.fontWeight.weight400}',
|
|
31
|
+
labelLineHeight: '{palette.lineHeight.ratio3to2}',
|
|
32
|
+
labelMarginLeft: '{palette.size.size10}'
|
|
33
|
+
},
|
|
34
|
+
rules: [
|
|
35
|
+
{
|
|
36
|
+
if: { error: true },
|
|
37
|
+
tokens: {
|
|
38
|
+
inputBorderColor: '{palette.color.red}'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
if: { focus: true },
|
|
43
|
+
tokens: {
|
|
44
|
+
inputBorderColor: '{palette.color.purpleDeluge}',
|
|
45
|
+
inputBorderWidth: '{palette.border.border3}'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
if: { inactive: true },
|
|
50
|
+
tokens: {
|
|
51
|
+
inputBorderColor: '{palette.color.transparent}',
|
|
52
|
+
inputBackgroundColor: '{palette.color.greyMystic}',
|
|
53
|
+
iconBackgroundColor: '{palette.color.greyMystic}',
|
|
54
|
+
iconColor: '{palette.color.greyShuttle}',
|
|
55
|
+
labelColor: '{palette.color.greyShuttle}'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
hover: '{appearances.ChevronLink.hover}'
|
|
4
|
+
},
|
|
5
|
+
tokens: {
|
|
6
|
+
leftIcon: '{palette.icon.ArrowLeft}',
|
|
7
|
+
rightIcon: '{palette.icon.ArrowRight}',
|
|
8
|
+
iconDisplace: '{palette.size.size0}',
|
|
9
|
+
iconSpace: '{system.integer.0}'
|
|
10
|
+
},
|
|
11
|
+
rules: [{ if: { hover: true }, tokens: { iconDisplace: '{palette.size.size4}' } }]
|
|
12
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default {
|
|
1
|
+
module.exports = {
|
|
4
2
|
appearances: {
|
|
5
3
|
weight: {
|
|
6
4
|
values: ['thick'],
|
|
@@ -14,20 +12,20 @@ export default {
|
|
|
14
12
|
}
|
|
15
13
|
},
|
|
16
14
|
tokens: {
|
|
17
|
-
width: palette.border.border1,
|
|
18
|
-
color: palette.color.greyShuttle
|
|
15
|
+
width: '{palette.border.border1}',
|
|
16
|
+
color: '{palette.color.greyShuttle}'
|
|
19
17
|
},
|
|
20
18
|
rules: [
|
|
21
19
|
{
|
|
22
20
|
if: { weight: 'thick' },
|
|
23
21
|
tokens: {
|
|
24
|
-
width: palette.border.border2
|
|
22
|
+
width: '{palette.border.border2}'
|
|
25
23
|
}
|
|
26
24
|
},
|
|
27
25
|
{
|
|
28
26
|
if: { decorative: true },
|
|
29
27
|
tokens: {
|
|
30
|
-
color: palette.color.greyCloud
|
|
28
|
+
color: '{palette.color.greyCloud}'
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
]
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { getExpandCollapseSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const ExpandCollapse = {
|
|
1
|
+
module.exports = {
|
|
5
2
|
appearances: {},
|
|
6
3
|
tokens: {
|
|
7
|
-
borderColor: palette.color.greyCloud,
|
|
8
|
-
borderWidth: palette.border.border1,
|
|
9
|
-
borderStyle: 'solid'
|
|
4
|
+
borderColor: '{palette.color.greyCloud}',
|
|
5
|
+
borderWidth: '{palette.border.border1}',
|
|
6
|
+
borderStyle: '{system.borderStyle.solid}'
|
|
10
7
|
},
|
|
11
8
|
rules: []
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
// TODO: replace this with a build step similar to Palettes
|
|
15
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
16
|
-
validateComponentTheme(ExpandCollapse, getExpandCollapseSchema(palette), 'expand-collapse')
|
|
17
|
-
|
|
18
|
-
export default ExpandCollapse
|
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
getExpandCollapseControlSchema,
|
|
4
|
-
validateComponentTheme,
|
|
5
|
-
expandCollapseControlAppearances
|
|
6
|
-
} from '@telus-uds/tools-theme'
|
|
7
|
-
|
|
8
|
-
import CaretUp from '@telus-uds/palette-allium/build/rn/icons/caret-up.icon.svg'
|
|
9
|
-
import CaretDown from '@telus-uds/palette-allium/build/rn/icons/caret-down.icon.svg'
|
|
10
|
-
|
|
11
|
-
const ExpandCollapseControl = {
|
|
1
|
+
module.exports = {
|
|
12
2
|
appearances: {
|
|
13
|
-
expanded:
|
|
3
|
+
expanded: '{appearances.ExpandCollapseControl.expanded}'
|
|
14
4
|
},
|
|
15
5
|
tokens: {
|
|
16
|
-
icon: CaretDown,
|
|
17
|
-
iconColor: palette.color.greenAccessible,
|
|
18
|
-
iconSize: palette.size.size24,
|
|
19
|
-
iconGap: palette.size.size8,
|
|
20
|
-
iconPosition: 'left',
|
|
21
|
-
verticalAlign: 'top',
|
|
22
|
-
justifyContent: '
|
|
23
|
-
paddingLeft: palette.size.size8,
|
|
24
|
-
paddingRight: palette.size.size16,
|
|
25
|
-
paddingTop: palette.size.size16,
|
|
26
|
-
paddingBottom: palette.size.size16,
|
|
27
|
-
borderWidth:
|
|
28
|
-
borderColor: palette.color.transparent,
|
|
29
|
-
backgroundColor: palette.color.transparent
|
|
6
|
+
icon: '{palette.icon.CaretDown}',
|
|
7
|
+
iconColor: '{palette.color.greenAccessible}',
|
|
8
|
+
iconSize: '{palette.size.size24}',
|
|
9
|
+
iconGap: '{palette.size.size8}',
|
|
10
|
+
iconPosition: '{system.position.left}',
|
|
11
|
+
verticalAlign: '{system.verticalAlign.top}',
|
|
12
|
+
justifyContent: '{system.flexJustifyContent.flexStart}',
|
|
13
|
+
paddingLeft: '{palette.size.size8}',
|
|
14
|
+
paddingRight: '{palette.size.size16}',
|
|
15
|
+
paddingTop: '{palette.size.size16}',
|
|
16
|
+
paddingBottom: '{palette.size.size16}',
|
|
17
|
+
borderWidth: '{system.border.zero}',
|
|
18
|
+
borderColor: '{palette.color.transparent}',
|
|
19
|
+
backgroundColor: '{palette.color.transparent}'
|
|
30
20
|
},
|
|
31
|
-
rules: [{ if: { expanded: true }, tokens: { icon: CaretUp } }]
|
|
21
|
+
rules: [{ if: { expanded: true }, tokens: { icon: '{palette.icon.CaretUp}' } }]
|
|
32
22
|
}
|
|
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,26 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
import { getExpandCollapsePanelSchema, validateComponentTheme } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
const ExpandCollapsePanel = {
|
|
1
|
+
module.exports = {
|
|
5
2
|
appearances: {},
|
|
6
3
|
tokens: {
|
|
7
4
|
// animate slightly faster when closing
|
|
8
|
-
expandDuration:
|
|
9
|
-
collapseDuration:
|
|
10
|
-
contentPaddingLeft: palette.size.size40,
|
|
11
|
-
contentPaddingRight: palette.size.size16,
|
|
12
|
-
contentPaddingTop: palette.size.size0,
|
|
13
|
-
contentPaddingBottom: palette.size.size16
|
|
5
|
+
expandDuration: '{palette.duration.duration300}',
|
|
6
|
+
collapseDuration: '{palette.duration.duration250}',
|
|
7
|
+
contentPaddingLeft: '{palette.size.size40}',
|
|
8
|
+
contentPaddingRight: '{palette.size.size16}',
|
|
9
|
+
contentPaddingTop: '{palette.size.size0}',
|
|
10
|
+
contentPaddingBottom: '{palette.size.size16}'
|
|
14
11
|
},
|
|
15
12
|
rules: []
|
|
16
13
|
}
|
|
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,66 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {
|
|
3
|
+
validation: '{appearances.Feedback.validation}',
|
|
4
|
+
icon: {
|
|
5
|
+
values: [true],
|
|
6
|
+
type: 'variant'
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
tokens: {
|
|
10
|
+
backgroundColor: '{palette.color.greyAthens}',
|
|
11
|
+
borderColor: '{palette.color.greyMystic}',
|
|
12
|
+
borderWidth: '{palette.border.border1}',
|
|
13
|
+
borderRadius: '{palette.radius.radius4}',
|
|
14
|
+
paddingTop: '{palette.size.size12}',
|
|
15
|
+
paddingBottom: '{palette.size.size12}',
|
|
16
|
+
paddingLeft: '{palette.size.size16}',
|
|
17
|
+
paddingRight: '{palette.size.size16}',
|
|
18
|
+
space: '{system.integer.2}',
|
|
19
|
+
|
|
20
|
+
color: '{palette.color.greyThunder}',
|
|
21
|
+
|
|
22
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
23
|
+
fontWeight: '{palette.fontWeight.weight400}',
|
|
24
|
+
|
|
25
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
26
|
+
titleFontSize: '{palette.fontSize.size16}',
|
|
27
|
+
contentFontSize: '{palette.fontSize.size14}',
|
|
28
|
+
|
|
29
|
+
icon: '{system.icon.none}',
|
|
30
|
+
iconSize: '{palette.fontSize.size24}',
|
|
31
|
+
iconColor: '{palette.color.transparent}',
|
|
32
|
+
iconGap: '{palette.size.size8}'
|
|
33
|
+
},
|
|
34
|
+
rules: [
|
|
35
|
+
{
|
|
36
|
+
if: { validation: 'success' },
|
|
37
|
+
tokens: {
|
|
38
|
+
backgroundColor: '{palette.color.greenPanache}',
|
|
39
|
+
borderColor: '{palette.color.greenPanache}',
|
|
40
|
+
color: '{palette.color.greenDarkFern}'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
if: { validation: 'error' },
|
|
45
|
+
tokens: {
|
|
46
|
+
backgroundColor: '{palette.color.redLight}',
|
|
47
|
+
borderColor: '{palette.color.redLight}',
|
|
48
|
+
color: '{palette.color.red}'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
if: { validation: 'success', icon: true },
|
|
53
|
+
tokens: {
|
|
54
|
+
icon: '{palette.icon.NotificationSuccess}',
|
|
55
|
+
iconColor: '{palette.color.greenAccessible}'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
if: { validation: 'error', icon: true },
|
|
60
|
+
tokens: {
|
|
61
|
+
icon: '{palette.icon.NotificationError}',
|
|
62
|
+
iconColor: '{palette.color.red}'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
package/src/components/Icon.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export default {
|
|
1
|
+
module.exports = {
|
|
4
2
|
appearances: {
|
|
5
3
|
size: {
|
|
6
4
|
values: ['small'],
|
|
@@ -12,20 +10,23 @@ export default {
|
|
|
12
10
|
}
|
|
13
11
|
},
|
|
14
12
|
tokens: {
|
|
15
|
-
size:
|
|
16
|
-
color: palette.color.greyCharcoal
|
|
13
|
+
size: '{palette.size.size24}',
|
|
14
|
+
color: '{palette.color.greyCharcoal}',
|
|
15
|
+
translateX: '{system.size.zero}',
|
|
16
|
+
translateY: '{system.size.zero}',
|
|
17
|
+
scale: '{system.integer.1}'
|
|
17
18
|
},
|
|
18
19
|
rules: [
|
|
19
20
|
{
|
|
20
21
|
if: { size: 'small' },
|
|
21
22
|
tokens: {
|
|
22
|
-
size:
|
|
23
|
+
size: '{palette.size.size20}'
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
if: { rank: 'primary' },
|
|
27
28
|
tokens: {
|
|
28
|
-
color: palette.color.purpleTelus
|
|
29
|
+
color: '{palette.color.purpleTelus}'
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
appearances: {},
|
|
3
|
+
tokens: {
|
|
4
|
+
gap: '{palette.size.size8}',
|
|
5
|
+
|
|
6
|
+
color: '{palette.color.greyCharcoal}',
|
|
7
|
+
|
|
8
|
+
fontName: '{palette.fontName.HelveticaNow}',
|
|
9
|
+
fontWeight: '{palette.fontWeight.weight700}',
|
|
10
|
+
|
|
11
|
+
fontSize: '{palette.fontSize.size16}',
|
|
12
|
+
lineHeight: '{palette.lineHeight.ratio3to2}',
|
|
13
|
+
|
|
14
|
+
hintColor: '{palette.color.greyCharcoal}',
|
|
15
|
+
|
|
16
|
+
hintFontName: '{palette.fontName.HelveticaNow}',
|
|
17
|
+
hintFontWeight: '{palette.fontWeight.weight400}',
|
|
18
|
+
|
|
19
|
+
hintFontSize: '{palette.fontSize.size14}',
|
|
20
|
+
hintLineHeight: '{palette.lineHeight.ratio7to5}'
|
|
21
|
+
},
|
|
22
|
+
rules: []
|
|
23
|
+
}
|
package/src/components/Link.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { getLinkSchema, validateComponentTheme, linkAppearances } from '@telus-uds/tools-theme'
|
|
3
|
-
|
|
4
|
-
import leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
|
|
5
|
-
import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
|
|
6
|
-
|
|
7
|
-
const { color, fontSize, lineHeight, font, border, radius, size } = palette
|
|
8
|
-
|
|
9
|
-
const Link = {
|
|
1
|
+
module.exports = {
|
|
10
2
|
appearances: {
|
|
11
3
|
size: {
|
|
12
4
|
description:
|
|
@@ -27,63 +19,73 @@ const Link = {
|
|
|
27
19
|
light: {
|
|
28
20
|
description:
|
|
29
21
|
'A lighter grey variant, used to lower the emphasis on a given Link (e.g. in Breadcrumbs)',
|
|
30
|
-
values: [true]
|
|
22
|
+
values: [true],
|
|
23
|
+
type: 'variant'
|
|
31
24
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
iconPosition: '{appearances.Link.iconPosition}',
|
|
26
|
+
focus: '{appearances.Link.focus}',
|
|
27
|
+
hover: '{appearances.Link.hover}',
|
|
28
|
+
pressed: '{appearances.Link.pressed}'
|
|
36
29
|
},
|
|
37
30
|
tokens: {
|
|
38
|
-
color: color.greenAccessible,
|
|
31
|
+
color: '{palette.color.greenAccessible}',
|
|
39
32
|
|
|
40
|
-
textLine: 'underline',
|
|
41
|
-
textLineStyle: 'solid',
|
|
33
|
+
textLine: '{system.textLine.underline}',
|
|
34
|
+
textLineStyle: '{system.textLineStyle.solid}',
|
|
42
35
|
|
|
43
|
-
outerBorderColor: color.transparent,
|
|
44
|
-
outerBorderWidth: border.border2,
|
|
45
|
-
outerBorderGap: border.border2,
|
|
46
|
-
|
|
36
|
+
outerBorderColor: '{palette.color.transparent}',
|
|
37
|
+
outerBorderWidth: '{palette.border.border2}',
|
|
38
|
+
outerBorderGap: '{palette.border.border2}',
|
|
39
|
+
borderRadius: '{palette.radius.radius4}',
|
|
40
|
+
outerBorderOutline: '{system.borderStyle.none}',
|
|
47
41
|
|
|
48
42
|
// Same as default size Typography
|
|
49
|
-
blockFontWeight: '
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
blockFontWeight: '{palette.fontWeight.weight400}',
|
|
44
|
+
blockFontName: '{palette.fontName.HelveticaNow}',
|
|
45
|
+
|
|
46
|
+
blockFontSize: '{palette.fontSize.size16}',
|
|
47
|
+
blockLineHeight: '{palette.lineHeight.ratio3to2}',
|
|
48
|
+
alignSelf: '{system.flexAlign.flexStart}',
|
|
53
49
|
|
|
54
|
-
icon:
|
|
55
|
-
iconSize: fontSize.size24,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
iconTranslateX: 0
|
|
50
|
+
icon: '{system.icon.none}',
|
|
51
|
+
iconSize: '{palette.fontSize.size24}',
|
|
52
|
+
iconSpace: '{system.integer.1}',
|
|
53
|
+
iconTranslateX: '{system.size.zero}',
|
|
54
|
+
iconTranslateY: '{system.size.zero}'
|
|
60
55
|
},
|
|
61
56
|
rules: [
|
|
57
|
+
{
|
|
58
|
+
if: { iconPosition: 'left' },
|
|
59
|
+
tokens: {
|
|
60
|
+
iconSpace: '{system.integer.2}'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
62
63
|
// Initial interaction states
|
|
63
64
|
{
|
|
64
65
|
if: { focus: true },
|
|
65
66
|
tokens: {
|
|
66
|
-
outerBorderColor: color.greenAccessible,
|
|
67
|
-
outerBorderOutline: 'none'
|
|
67
|
+
outerBorderColor: '{palette.color.greenAccessible}',
|
|
68
|
+
outerBorderOutline: '{system.borderStyle.none}'
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
71
|
{
|
|
71
72
|
if: { hover: true },
|
|
72
73
|
tokens: {
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
textLine: '{system.textLine.none}',
|
|
75
|
+
color: '{palette.color.greenSanFelix}'
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
if: { pressed: true },
|
|
79
80
|
tokens: {
|
|
80
|
-
|
|
81
|
+
textLine: '{system.textLine.none}',
|
|
82
|
+
color: '{palette.color.greenDarkFern}'
|
|
81
83
|
}
|
|
82
84
|
},
|
|
83
85
|
{
|
|
84
86
|
if: { pressed: true, focus: true },
|
|
85
87
|
tokens: {
|
|
86
|
-
outerBorderColor: color.greenDarkFern
|
|
88
|
+
outerBorderColor: '{palette.color.greenDarkFern}'
|
|
87
89
|
}
|
|
88
90
|
},
|
|
89
91
|
|
|
@@ -91,26 +93,27 @@ const Link = {
|
|
|
91
93
|
{
|
|
92
94
|
if: { size: 'large' },
|
|
93
95
|
tokens: {
|
|
94
|
-
blockFontSize: fontSize.size20,
|
|
95
|
-
iconSize: fontSize.size24,
|
|
96
|
-
blockLineHeight: lineHeight.ratio8to5
|
|
96
|
+
blockFontSize: '{palette.fontSize.size20}',
|
|
97
|
+
iconSize: '{palette.fontSize.size24}',
|
|
98
|
+
blockLineHeight: '{palette.lineHeight.ratio8to5}'
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
{
|
|
100
102
|
if: { size: 'small' },
|
|
101
103
|
tokens: {
|
|
102
|
-
blockFontSize: fontSize.size14,
|
|
103
|
-
iconSize: fontSize.size20,
|
|
104
|
-
blockLineHeight: lineHeight.ratio10to7
|
|
104
|
+
blockFontSize: '{palette.fontSize.size14}',
|
|
105
|
+
iconSize: '{palette.fontSize.size20}',
|
|
106
|
+
blockLineHeight: '{palette.lineHeight.ratio10to7}'
|
|
105
107
|
}
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
110
|
if: { size: 'micro' },
|
|
109
111
|
tokens: {
|
|
110
|
-
blockFontSize: fontSize.size12,
|
|
111
|
-
blockFontWeight: '
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
blockFontSize: '{palette.fontSize.size12}',
|
|
113
|
+
blockFontWeight: '{palette.fontWeight.weight500}',
|
|
114
|
+
blockFontName: '{palette.fontName.HelveticaNow}',
|
|
115
|
+
iconSize: '{palette.fontSize.size16}',
|
|
116
|
+
blockLineHeight: '{palette.lineHeight.ratio4to3}'
|
|
114
117
|
}
|
|
115
118
|
},
|
|
116
119
|
|
|
@@ -118,26 +121,26 @@ const Link = {
|
|
|
118
121
|
{
|
|
119
122
|
if: { alternative: true },
|
|
120
123
|
tokens: {
|
|
121
|
-
color: color.greyThunder
|
|
124
|
+
color: '{palette.color.greyThunder}'
|
|
122
125
|
}
|
|
123
126
|
},
|
|
124
127
|
{
|
|
125
128
|
if: { alternative: true, focus: true },
|
|
126
129
|
tokens: {
|
|
127
|
-
color: color.greyCharcoal,
|
|
128
|
-
outerBorderColor: color.greyCharcoal
|
|
130
|
+
color: '{palette.color.greyCharcoal}',
|
|
131
|
+
outerBorderColor: '{palette.color.greyCharcoal}'
|
|
129
132
|
}
|
|
130
133
|
},
|
|
131
134
|
{
|
|
132
135
|
if: { alternative: true, hover: true },
|
|
133
136
|
tokens: {
|
|
134
|
-
color: color.greyThunder
|
|
137
|
+
color: '{palette.color.greyThunder}'
|
|
135
138
|
}
|
|
136
139
|
},
|
|
137
140
|
{
|
|
138
141
|
if: { alternative: true, pressed: true },
|
|
139
142
|
tokens: {
|
|
140
|
-
color: color.greyThunder
|
|
143
|
+
color: '{palette.color.greyThunder}'
|
|
141
144
|
}
|
|
142
145
|
},
|
|
143
146
|
|
|
@@ -145,33 +148,33 @@ const Link = {
|
|
|
145
148
|
{
|
|
146
149
|
if: { inverse: true },
|
|
147
150
|
tokens: {
|
|
148
|
-
color: color.white
|
|
151
|
+
color: '{palette.color.white}'
|
|
149
152
|
}
|
|
150
153
|
},
|
|
151
154
|
{
|
|
152
155
|
if: { inverse: true, hover: true },
|
|
153
156
|
tokens: {
|
|
154
|
-
color: color.greyAthens
|
|
157
|
+
color: '{palette.color.greyAthens}'
|
|
155
158
|
}
|
|
156
159
|
},
|
|
157
160
|
{
|
|
158
161
|
if: { inverse: true, focus: true },
|
|
159
162
|
tokens: {
|
|
160
|
-
outerBorderColor: color.white,
|
|
161
|
-
outerBorderOutline: 'none'
|
|
163
|
+
outerBorderColor: '{palette.color.white}',
|
|
164
|
+
outerBorderOutline: '{system.borderStyle.none}'
|
|
162
165
|
}
|
|
163
166
|
},
|
|
164
167
|
{
|
|
165
168
|
if: { inverse: true, pressed: true },
|
|
166
169
|
tokens: {
|
|
167
|
-
color: color.greyMystic
|
|
170
|
+
color: '{palette.color.greyMystic}'
|
|
168
171
|
}
|
|
169
172
|
},
|
|
170
173
|
{
|
|
171
174
|
if: { inverse: true, pressed: true, focus: true },
|
|
172
175
|
tokens: {
|
|
173
|
-
color: color.greyMystic,
|
|
174
|
-
outerBorderColor: color.greyMystic
|
|
176
|
+
color: '{palette.color.greyMystic}',
|
|
177
|
+
outerBorderColor: '{palette.color.greyMystic}'
|
|
175
178
|
}
|
|
176
179
|
},
|
|
177
180
|
|
|
@@ -179,54 +182,22 @@ const Link = {
|
|
|
179
182
|
{
|
|
180
183
|
if: { light: true },
|
|
181
184
|
tokens: {
|
|
182
|
-
color: color.greyShuttle
|
|
185
|
+
color: '{palette.color.greyShuttle}'
|
|
183
186
|
}
|
|
184
187
|
},
|
|
185
188
|
{
|
|
186
189
|
if: { light: true, focus: true },
|
|
187
190
|
tokens: {
|
|
188
|
-
color: color.greyShuttle,
|
|
189
|
-
outerBorderColor: color.greyShuttle
|
|
191
|
+
color: '{palette.color.greyShuttle}',
|
|
192
|
+
outerBorderColor: '{palette.color.greyShuttle}'
|
|
190
193
|
}
|
|
191
194
|
},
|
|
192
195
|
{
|
|
193
196
|
if: { light: true, hover: true },
|
|
194
197
|
tokens: {
|
|
195
|
-
color: color.greyCharcoal,
|
|
196
|
-
textLine: 'none'
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
if: { component: 'ChevronLink' },
|
|
201
|
-
tokens: { iconGapAfter: 0, iconGapBefore: 0 }
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
if: { component: 'ChevronLink', iconPosition: 'left' },
|
|
205
|
-
tokens: { icon: leftArrowIcon }
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
if: { component: 'ChevronLink', iconPosition: 'right' },
|
|
209
|
-
tokens: { icon: rightArrowIcon }
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
if: { component: 'ChevronLink', iconPosition: 'left', hover: true },
|
|
213
|
-
tokens: {
|
|
214
|
-
iconTranslateX: -1 * size.size4,
|
|
215
|
-
iconScale: 1
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
if: { component: 'ChevronLink', iconPosition: 'right', hover: true },
|
|
220
|
-
tokens: {
|
|
221
|
-
iconTranslateX: size.size4,
|
|
222
|
-
iconScale: 1
|
|
198
|
+
color: '{palette.color.greyCharcoal}',
|
|
199
|
+
textLine: '{system.textLine.none}'
|
|
223
200
|
}
|
|
224
201
|
}
|
|
225
202
|
]
|
|
226
203
|
}
|
|
227
|
-
|
|
228
|
-
// TODO: replace this with a build step similar to Palettes
|
|
229
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
230
|
-
validateComponentTheme(Link, getLinkSchema(palette), 'Link')
|
|
231
|
-
|
|
232
|
-
export default Link
|