@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,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _paletteAllium = _interopRequireDefault(require("@telus-uds/palette-allium"));
|
|
9
|
+
|
|
10
|
+
var _schema = require("@telus-uds/system-themes/schema");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
appearances: {
|
|
16
|
+
space: _schema.appearances.spacingScale.space,
|
|
17
|
+
viewport: _schema.appearances.system.viewport
|
|
18
|
+
},
|
|
19
|
+
// Largest spacings first, so they apply any time space >= highest index'
|
|
20
|
+
tokens: {
|
|
21
|
+
size: _paletteAllium.default.size.size96
|
|
22
|
+
},
|
|
23
|
+
rules: [{
|
|
24
|
+
if: {
|
|
25
|
+
viewport: ['lg', 'xl']
|
|
26
|
+
},
|
|
27
|
+
tokens: {
|
|
28
|
+
size: _paletteAllium.default.size.size120
|
|
29
|
+
}
|
|
30
|
+
}, {
|
|
31
|
+
if: {
|
|
32
|
+
space: 11
|
|
33
|
+
},
|
|
34
|
+
tokens: {
|
|
35
|
+
size: _paletteAllium.default.size.size96
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
if: {
|
|
39
|
+
space: 10
|
|
40
|
+
},
|
|
41
|
+
tokens: {
|
|
42
|
+
size: _paletteAllium.default.size.size80
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
if: {
|
|
46
|
+
space: 9
|
|
47
|
+
},
|
|
48
|
+
tokens: {
|
|
49
|
+
size: _paletteAllium.default.size.size64
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
if: {
|
|
53
|
+
space: 8
|
|
54
|
+
},
|
|
55
|
+
tokens: {
|
|
56
|
+
size: _paletteAllium.default.size.size48
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
if: {
|
|
60
|
+
space: 7
|
|
61
|
+
},
|
|
62
|
+
tokens: {
|
|
63
|
+
size: _paletteAllium.default.size.size40
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
if: {
|
|
67
|
+
space: 6
|
|
68
|
+
},
|
|
69
|
+
tokens: {
|
|
70
|
+
size: _paletteAllium.default.size.size36
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
if: {
|
|
74
|
+
space: 5
|
|
75
|
+
},
|
|
76
|
+
tokens: {
|
|
77
|
+
size: _paletteAllium.default.size.size32
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
if: {
|
|
81
|
+
space: 4
|
|
82
|
+
},
|
|
83
|
+
tokens: {
|
|
84
|
+
size: _paletteAllium.default.size.size24
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
if: {
|
|
88
|
+
space: 3
|
|
89
|
+
},
|
|
90
|
+
tokens: {
|
|
91
|
+
size: _paletteAllium.default.size.size16
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
if: {
|
|
95
|
+
space: 2
|
|
96
|
+
},
|
|
97
|
+
tokens: {
|
|
98
|
+
size: _paletteAllium.default.size.size8
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
if: {
|
|
102
|
+
space: 1
|
|
103
|
+
},
|
|
104
|
+
tokens: {
|
|
105
|
+
size: _paletteAllium.default.size.size4
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
if: {
|
|
109
|
+
space: 11,
|
|
110
|
+
viewport: ['lg', 'xl']
|
|
111
|
+
},
|
|
112
|
+
tokens: {
|
|
113
|
+
size: _paletteAllium.default.size.size120
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
if: {
|
|
117
|
+
space: 10,
|
|
118
|
+
viewport: ['lg', 'xl']
|
|
119
|
+
},
|
|
120
|
+
tokens: {
|
|
121
|
+
size: _paletteAllium.default.size.size96
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
if: {
|
|
125
|
+
space: 9,
|
|
126
|
+
viewport: ['lg', 'xl']
|
|
127
|
+
},
|
|
128
|
+
tokens: {
|
|
129
|
+
size: _paletteAllium.default.size.size72
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
if: {
|
|
133
|
+
space: 8,
|
|
134
|
+
viewport: ['lg', 'xl']
|
|
135
|
+
},
|
|
136
|
+
tokens: {
|
|
137
|
+
size: _paletteAllium.default.size.size64
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
if: {
|
|
141
|
+
space: 7
|
|
142
|
+
},
|
|
143
|
+
tokens: {
|
|
144
|
+
size: _paletteAllium.default.size.size48
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
if: {
|
|
148
|
+
space: 6
|
|
149
|
+
},
|
|
150
|
+
tokens: {
|
|
151
|
+
size: _paletteAllium.default.size.size40
|
|
152
|
+
}
|
|
153
|
+
}, // Zero spacing last; overrides all other rules when space === 0
|
|
154
|
+
{
|
|
155
|
+
if: {
|
|
156
|
+
space: 0
|
|
157
|
+
},
|
|
158
|
+
tokens: {
|
|
159
|
+
size: _paletteAllium.default.size.size0
|
|
160
|
+
}
|
|
161
|
+
}]
|
|
162
|
+
};
|
|
163
|
+
exports.default = _default;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _package = _interopRequireDefault(require("../package.json"));
|
|
9
|
+
|
|
10
|
+
var components = _interopRequireWildcard(require("./components"));
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
// TODO: replace this with theme build tooling and schema checks as part of
|
|
19
|
+
// https://github.com/telus/universal-design-system/issues/92
|
|
20
|
+
const metadata = {
|
|
21
|
+
name: 'allium',
|
|
22
|
+
package: _package.default.name,
|
|
23
|
+
version: _package.default.version
|
|
24
|
+
};
|
|
25
|
+
const alliumTheme = {
|
|
26
|
+
metadata,
|
|
27
|
+
components
|
|
28
|
+
};
|
|
29
|
+
var _default = alliumTheme;
|
|
30
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telus-uds/theme-allium",
|
|
3
|
-
"version": "0.0.2-prerelease.
|
|
3
|
+
"version": "0.0.2-prerelease.5",
|
|
4
4
|
"description": "Allium theme",
|
|
5
5
|
"author": "TELUS Digital",
|
|
6
6
|
"homepage": "https://github.com/telus/universal-design-system#readme",
|
|
7
7
|
"license": "ISC",
|
|
8
|
-
"main": "
|
|
8
|
+
"main": "lib/index.js",
|
|
9
9
|
"react-native": "src/index.js",
|
|
10
10
|
"directories": {
|
|
11
11
|
"lib": "lib",
|
|
12
12
|
"test": "__tests__"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@telus-uds/system-
|
|
16
|
-
"@telus-uds/tools-theme": "^0.0.2-prerelease.4"
|
|
15
|
+
"@telus-uds/system-themes": "^0.0.2-prerelease.0"
|
|
17
16
|
},
|
|
18
17
|
"peerDependencies": {
|
|
19
|
-
"@telus-uds/palette-allium": "^0.1.0-prerelease.
|
|
18
|
+
"@telus-uds/palette-allium": "^0.1.0-prerelease.6"
|
|
20
19
|
},
|
|
21
20
|
"files": [
|
|
22
21
|
"lib",
|
|
@@ -27,9 +26,10 @@
|
|
|
27
26
|
"url": "git+https://github.com/telus/universal-design-system.git"
|
|
28
27
|
},
|
|
29
28
|
"scripts": {
|
|
30
|
-
"test": "
|
|
29
|
+
"test": "jest",
|
|
31
30
|
"release": "standard-version",
|
|
32
|
-
"build": "
|
|
31
|
+
"build": "babel src -d lib",
|
|
32
|
+
"dev": "nodemon -w src -x 'yarn build'"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/telus/universal-design-system/issues"
|
package/src/components/Box.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
background: {
|
|
7
7
|
description: 'Background colour of box. Transparent if not specified.',
|
|
@@ -19,7 +19,7 @@ const Box = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
tokens: {
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: system.color.none
|
|
23
23
|
},
|
|
24
24
|
rules: [
|
|
25
25
|
{ if: { background: 'lightest' }, tokens: { backgroundColor: palette.color.white } },
|
|
@@ -33,9 +33,3 @@ const Box = {
|
|
|
33
33
|
{ if: { background: 'brand' }, tokens: { backgroundColor: palette.color.purpleTelus } }
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
// TODO: replace this with a build step similar to Palettes
|
|
38
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
39
|
-
validateComponentTheme(Box, getBoxSchema(palette), 'box')
|
|
40
|
-
|
|
41
|
-
export default Box
|
package/src/components/Button.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getButtonSchema, validateComponentTheme, buttonAppearances } from '@telus-uds/tools-theme'
|
|
2
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'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export default {
|
|
5
6
|
appearances: {
|
|
6
7
|
priority: {
|
|
7
8
|
description:
|
|
@@ -31,38 +32,35 @@ const Button = {
|
|
|
31
32
|
values: ['full'],
|
|
32
33
|
type: 'variant'
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
inactive: {
|
|
39
|
-
...buttonAppearances.inactive,
|
|
40
|
-
description:
|
|
41
|
-
// Based on https://tds.telus.com/components/index.html#/Forms
|
|
42
|
-
'Buttons should not be disabled or set as inactive. Use inline (on blur) error messaging to provide feedback when the form is invalid. In exceptional instances where disabled buttons are needed, it must be clear to the user why the button is disabled and what they need to do to enable it.'
|
|
43
|
-
}
|
|
35
|
+
hover: appearances.Button.hover,
|
|
36
|
+
focus: appearances.Button.focus,
|
|
37
|
+
pressed: appearances.Button.pressed,
|
|
38
|
+
inactive: appearances.Button.inactive
|
|
44
39
|
},
|
|
45
40
|
tokens: {
|
|
46
41
|
borderColor: palette.color.greenAccessible,
|
|
47
42
|
borderWidth: palette.border.border1,
|
|
48
43
|
borderRadius: palette.radius.pill32,
|
|
49
|
-
shadow:
|
|
44
|
+
shadow: system.shadow.none,
|
|
50
45
|
|
|
51
46
|
fontSize: palette.fontSize.size16,
|
|
52
47
|
color: palette.color.greenAccessible,
|
|
53
48
|
lineHeight: palette.lineHeight.ratio3to2,
|
|
49
|
+
textAlign: system.flexJustifyContent.center,
|
|
50
|
+
alignSelf: system.flexAlign.flexStart,
|
|
51
|
+
// TODO: replace these with font for theme building
|
|
54
52
|
fontName: Object.keys(palette.font)[0],
|
|
55
|
-
textAlign: 'center',
|
|
56
|
-
alignSelf: 'flex-start',
|
|
57
53
|
fontWeight: '700',
|
|
54
|
+
// font: palette.font.HelveticaNow['700'],
|
|
58
55
|
|
|
59
56
|
backgroundColor: palette.color.white,
|
|
60
|
-
opacity:
|
|
57
|
+
opacity: system.opacity.opaque,
|
|
61
58
|
paddingLeft: palette.size.size32,
|
|
62
59
|
paddingRight: palette.size.size32,
|
|
63
60
|
paddingTop: palette.size.size12,
|
|
64
61
|
paddingBottom: palette.size.size12,
|
|
65
|
-
width:
|
|
62
|
+
width: system.size.none,
|
|
63
|
+
minWidth: palette.size.size144,
|
|
66
64
|
|
|
67
65
|
outerBorderColor: palette.color.transparent,
|
|
68
66
|
outerBorderWidth: palette.border.border2,
|
|
@@ -90,7 +88,7 @@ const Button = {
|
|
|
90
88
|
{
|
|
91
89
|
if: { pressed: true },
|
|
92
90
|
tokens: {
|
|
93
|
-
borderWidth:
|
|
91
|
+
borderWidth: system.size.zero,
|
|
94
92
|
backgroundColor: palette.color.greenDarkFern,
|
|
95
93
|
color: palette.color.white
|
|
96
94
|
}
|
|
@@ -104,7 +102,7 @@ const Button = {
|
|
|
104
102
|
{
|
|
105
103
|
if: { inverse: true },
|
|
106
104
|
tokens: {
|
|
107
|
-
backgroundColor:
|
|
105
|
+
backgroundColor: system.color.none,
|
|
108
106
|
borderColor: palette.color.white,
|
|
109
107
|
color: palette.color.white
|
|
110
108
|
}
|
|
@@ -147,62 +145,25 @@ const Button = {
|
|
|
147
145
|
tokens: { outerBorderColor: palette.color.redDark }
|
|
148
146
|
},
|
|
149
147
|
|
|
150
|
-
{ if: { width: 'full' }, tokens: { width:
|
|
148
|
+
{ if: { width: 'full' }, tokens: { width: system.size.full } },
|
|
151
149
|
{
|
|
152
150
|
if: { size: 'small' },
|
|
153
|
-
tokens: { paddingTop: palette.size.size4, paddingBottom: palette.size.size4 }
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
if: { component: 'ButtonGroup' },
|
|
157
|
-
tokens: {
|
|
158
|
-
paddingLeft: palette.size.size16,
|
|
159
|
-
paddingRight: palette.size.size16,
|
|
160
|
-
paddingTop: palette.size.size8,
|
|
161
|
-
paddingBottom: palette.size.size8,
|
|
162
|
-
color: palette.color.greyShuttle,
|
|
163
|
-
fontSize: palette.fontSize.size14,
|
|
164
|
-
borderColor: palette.color.greyCloud
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
if: { component: 'ButtonGroup', pressed: true },
|
|
169
151
|
tokens: {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
if: { component: 'ButtonGroup', focus: true },
|
|
177
|
-
tokens: {
|
|
178
|
-
borderColor: palette.color.purpleTelus,
|
|
179
|
-
borderWidth: palette.border.border3,
|
|
180
|
-
color: palette.color.greyCharcoal,
|
|
181
|
-
outerBorderColor: palette.color.transparent
|
|
152
|
+
paddingTop: palette.size.size4,
|
|
153
|
+
paddingBottom: palette.size.size4,
|
|
154
|
+
minWidth: system.size.zero
|
|
182
155
|
}
|
|
183
156
|
},
|
|
184
157
|
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
if: { component: 'ButtonGroup', focus: true, pressed: true },
|
|
194
|
-
tokens: {
|
|
195
|
-
borderWidth: palette.border.none,
|
|
196
|
-
backgroundColor: palette.color.purpleTelus,
|
|
197
|
-
color: palette.color.white
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
if: { inactive: true },
|
|
158
|
+
description:
|
|
159
|
+
'Buttons should not be disabled or set as inactive. Use inline (on blur) error messaging to provide feedback when the form is invalid. In exceptional instances where disabled buttons are needed, it must be clear to the user why the button is disabled and what they need to do to enable it.',
|
|
160
|
+
if: {
|
|
161
|
+
inactive: true
|
|
162
|
+
},
|
|
202
163
|
tokens: {
|
|
203
164
|
backgroundColor: palette.color.greyCloud,
|
|
204
165
|
color: palette.color.white,
|
|
205
|
-
borderWidth:
|
|
166
|
+
borderWidth: system.size.zero
|
|
206
167
|
}
|
|
207
168
|
},
|
|
208
169
|
{
|
|
@@ -211,9 +172,3 @@ const Button = {
|
|
|
211
172
|
}
|
|
212
173
|
]
|
|
213
174
|
}
|
|
214
|
-
|
|
215
|
-
// TODO: replace this with a build step similar to Palettes
|
|
216
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
217
|
-
validateComponentTheme(Button, getButtonSchema(palette), 'button')
|
|
218
|
-
|
|
219
|
-
export default Button
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { appearances } from '@telus-uds/system-constants'
|
|
1
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
2
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
export default {
|
|
6
5
|
appearances: {
|
|
7
|
-
viewport: appearances.viewport
|
|
6
|
+
viewport: appearances.system.viewport
|
|
8
7
|
},
|
|
9
8
|
tokens: {
|
|
10
|
-
space: 1,
|
|
11
|
-
direction:
|
|
12
|
-
alignItems:
|
|
13
|
-
justifyContent:
|
|
14
|
-
flexGrow: 0
|
|
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]
|
|
15
14
|
},
|
|
16
|
-
rules: [{ if: { viewport: ['lg', 'xl'] }, tokens: { space: 3 } }]
|
|
15
|
+
rules: [{ if: { viewport: ['lg', 'xl'] }, tokens: { space: system.integer[3] } }]
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
// TODO: replace this with a build step similar to Palettes
|
|
20
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
21
|
-
validateComponentTheme(ButtonGroup, getButtonGroupSchema(palette), 'button-group')
|
|
22
|
-
|
|
23
|
-
export default ButtonGroup
|
|
@@ -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
|
+
}
|
package/src/components/Card.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import palette from '@telus-uds/palette-allium'
|
|
2
|
-
import
|
|
2
|
+
import system from '@telus-uds/system-themes/src/tokens/rn'
|
|
3
|
+
import { appearances } from '@telus-uds/system-themes/schema'
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
appearances: {
|
|
@@ -11,7 +12,7 @@ export default {
|
|
|
11
12
|
values: ['narrow', 'intermediate', 'compact', 'custom'],
|
|
12
13
|
type: 'variant'
|
|
13
14
|
},
|
|
14
|
-
viewport: appearances.viewport
|
|
15
|
+
viewport: appearances.system.viewport
|
|
15
16
|
},
|
|
16
17
|
tokens: {
|
|
17
18
|
backgroundColor: palette.color.white,
|
|
@@ -22,7 +23,7 @@ export default {
|
|
|
22
23
|
paddingLeft: palette.size.size24,
|
|
23
24
|
paddingRight: palette.size.size24,
|
|
24
25
|
paddingTop: palette.size.size32,
|
|
25
|
-
shadow:
|
|
26
|
+
shadow: system.shadow.none
|
|
26
27
|
},
|
|
27
28
|
rules: [
|
|
28
29
|
{
|
|
@@ -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
|
+
}
|
|
@@ -1,20 +1,19 @@
|
|
|
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 leftArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-left.icon.svg'
|
|
5
6
|
import rightArrowIcon from '@telus-uds/palette-allium/build/rn/icons/arrow-right.icon.svg'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
appearances: {
|
|
8
|
+
export default {
|
|
9
|
+
appearances: {
|
|
10
|
+
hover: appearances.ChevronLink.hover
|
|
11
|
+
},
|
|
9
12
|
tokens: {
|
|
10
13
|
leftIcon: leftArrowIcon,
|
|
11
14
|
rightIcon: rightArrowIcon,
|
|
12
|
-
iconDisplace: palette.size.
|
|
13
|
-
|
|
15
|
+
iconDisplace: palette.size.size0,
|
|
16
|
+
iconSpace: system.integer[0]
|
|
17
|
+
},
|
|
18
|
+
rules: [{ if: { hover: true }, tokens: { iconDisplace: palette.size.size4 } }]
|
|
14
19
|
}
|
|
15
|
-
|
|
16
|
-
// TODO: replace this with a build step similar to Palettes
|
|
17
|
-
// https://github.com/telus/universal-design-system/issues/167
|
|
18
|
-
validateComponentTheme(ChevronLink, getChevronLinkSchema(palette), 'ChevronLink')
|
|
19
|
-
|
|
20
|
-
export default ChevronLink
|