@telus-uds/theme-allium 0.0.2-prerelease.5 → 1.0.0

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +1946 -0
  2. package/README.md +3 -9
  3. package/build/schema.json +8279 -0
  4. package/build/theme.js +2994 -0
  5. package/package.json +12 -15
  6. package/theme.json +3731 -0
  7. package/lib/components/ActivityIndicator.js +0 -35
  8. package/lib/components/Box.js +0 -89
  9. package/lib/components/Button.js +0 -252
  10. package/lib/components/ButtonGroup.js +0 -34
  11. package/lib/components/ButtonGroupItem.js +0 -108
  12. package/lib/components/Card.js +0 -120
  13. package/lib/components/Checkbox.js +0 -80
  14. package/lib/components/ChevronLink.js +0 -39
  15. package/lib/components/Divider.js +0 -44
  16. package/lib/components/ExpandCollapse.js +0 -23
  17. package/lib/components/ExpandCollapseControl.js +0 -49
  18. package/lib/components/ExpandCollapsePanel.js +0 -25
  19. package/lib/components/Feedback.js +0 -89
  20. package/lib/components/Icon.js +0 -47
  21. package/lib/components/InputLabel.js +0 -33
  22. package/lib/components/InputSupports.js +0 -19
  23. package/lib/components/Link.js +0 -241
  24. package/lib/components/List.js +0 -86
  25. package/lib/components/Pagination.js +0 -40
  26. package/lib/components/PaginationPageButton.js +0 -82
  27. package/lib/components/PaginationSideButton.js +0 -113
  28. package/lib/components/Radio.js +0 -78
  29. package/lib/components/Select.js +0 -102
  30. package/lib/components/SideNav.js +0 -23
  31. package/lib/components/SideNavItem.js +0 -118
  32. package/lib/components/SideNavItemsGroup.js +0 -49
  33. package/lib/components/Skeleton.js +0 -26
  34. package/lib/components/StackView.js +0 -22
  35. package/lib/components/Tags.js +0 -34
  36. package/lib/components/TagsItem.js +0 -133
  37. package/lib/components/TextArea.js +0 -20
  38. package/lib/components/TextInput.js +0 -97
  39. package/lib/components/ToggleSwitch.js +0 -144
  40. package/lib/components/Tooltip.js +0 -48
  41. package/lib/components/TooltipButton.js +0 -86
  42. package/lib/components/Typography.js +0 -370
  43. package/lib/components/index.js +0 -303
  44. package/lib/components/spacingScale.js +0 -163
  45. package/lib/index.js +0 -30
  46. package/src/components/ActivityIndicator.js +0 -25
  47. package/src/components/Box.js +0 -35
  48. package/src/components/Button.js +0 -174
  49. package/src/components/ButtonGroup.js +0 -16
  50. package/src/components/ButtonGroupItem.js +0 -88
  51. package/src/components/Card.js +0 -99
  52. package/src/components/Checkbox.js +0 -65
  53. package/src/components/ChevronLink.js +0 -19
  54. package/src/components/Divider.js +0 -34
  55. package/src/components/ExpandCollapse.js +0 -12
  56. package/src/components/ExpandCollapseControl.js +0 -29
  57. package/src/components/ExpandCollapsePanel.js +0 -15
  58. package/src/components/Feedback.js +0 -75
  59. package/src/components/Icon.js +0 -35
  60. package/src/components/InputLabel.js +0 -29
  61. package/src/components/InputSupports.js +0 -9
  62. package/src/components/Link.js +0 -211
  63. package/src/components/List.js +0 -70
  64. package/src/components/Pagination.js +0 -30
  65. package/src/components/PaginationPageButton.js +0 -71
  66. package/src/components/PaginationSideButton.js +0 -99
  67. package/src/components/Radio.js +0 -64
  68. package/src/components/Select.js +0 -88
  69. package/src/components/SideNav.js +0 -12
  70. package/src/components/SideNavItem.js +0 -115
  71. package/src/components/SideNavItemsGroup.js +0 -34
  72. package/src/components/Skeleton.js +0 -16
  73. package/src/components/StackView.js +0 -12
  74. package/src/components/Tags.js +0 -16
  75. package/src/components/TagsItem.js +0 -118
  76. package/src/components/TextArea.js +0 -10
  77. package/src/components/TextInput.js +0 -83
  78. package/src/components/ToggleSwitch.js +0 -118
  79. package/src/components/Tooltip.js +0 -41
  80. package/src/components/TooltipButton.js +0 -68
  81. package/src/components/Typography.js +0 -355
  82. package/src/components/index.js +0 -37
  83. package/src/components/spacingScale.js +0 -36
  84. package/src/index.js +0 -17
@@ -1,163 +0,0 @@
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 DELETED
@@ -1,30 +0,0 @@
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;
@@ -1,25 +0,0 @@
1
- import palette from '@telus-uds/palette-allium'
2
-
3
- export default {
4
- appearances: {
5
- size: {
6
- values: ['large'],
7
- description: 'used for full-screen spinners',
8
- type: 'variant'
9
- }
10
- },
11
- tokens: {
12
- size: palette.size.size20,
13
- thickness: palette.border.border2,
14
- color: palette.color.greenAccessible
15
- },
16
- rules: [
17
- {
18
- if: { size: 'large' },
19
- tokens: {
20
- thickness: palette.border.border4,
21
- size: palette.size.size40
22
- }
23
- }
24
- ]
25
- }
@@ -1,35 +0,0 @@
1
- import palette from '@telus-uds/palette-allium'
2
- import system from '@telus-uds/system-themes/src/tokens/rn'
3
-
4
- export default {
5
- appearances: {
6
- background: {
7
- description: 'Background colour of box. Transparent if not specified.',
8
- values: [
9
- 'light',
10
- 'lightest',
11
- 'dark',
12
- 'darkest',
13
- 'critical',
14
- 'danger',
15
- 'warning',
16
- 'positive',
17
- 'brand'
18
- ]
19
- }
20
- },
21
- tokens: {
22
- backgroundColor: system.color.none
23
- },
24
- rules: [
25
- { if: { background: 'lightest' }, tokens: { backgroundColor: palette.color.white } },
26
- { if: { background: 'light' }, tokens: { backgroundColor: palette.color.greyAthens } },
27
- { if: { background: 'dark' }, tokens: { backgroundColor: palette.color.greyCharcoal } },
28
- { if: { background: 'darkest' }, tokens: { backgroundColor: palette.color.greyThunder } },
29
- { if: { background: 'critical' }, tokens: { backgroundColor: palette.color.redDark } },
30
- { if: { background: 'danger' }, tokens: { backgroundColor: palette.color.redLight } },
31
- { if: { background: 'warning' }, tokens: { backgroundColor: palette.color.amberLight } },
32
- { if: { background: 'positive' }, tokens: { backgroundColor: palette.color.greenPanache } },
33
- { if: { background: 'brand' }, tokens: { backgroundColor: palette.color.purpleTelus } }
34
- ]
35
- }
@@ -1,174 +0,0 @@
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
- priority: {
8
- description:
9
- 'Indicates the importance of the call-to-action. Limit the amount of high priority buttons on a page to proritize meaningful user flows. Low priority styles are applied by default.',
10
- values: ['high'],
11
- type: 'variant'
12
- },
13
- danger: {
14
- description:
15
- 'Indicates a user action that is destructive and will result in loss of information or cause significant monetary charges. Limit the use of the danger button whenever possible.',
16
- values: [true],
17
- type: 'variant'
18
- },
19
- inverse: {
20
- description:
21
- 'Use inverse buttons on darker backgrounds. High and low priority buttons, and danger buttons, are available in inverse.',
22
- values: [true],
23
- type: 'variant'
24
- },
25
- size: {
26
- values: ['small'],
27
- type: 'variant'
28
- },
29
- width: {
30
- description:
31
- 'Available in default or full-width. Default-width expands based on content Full-width expands to width of the container.',
32
- values: ['full'],
33
- type: 'variant'
34
- },
35
- hover: appearances.Button.hover,
36
- focus: appearances.Button.focus,
37
- pressed: appearances.Button.pressed,
38
- inactive: appearances.Button.inactive
39
- },
40
- tokens: {
41
- borderColor: palette.color.greenAccessible,
42
- borderWidth: palette.border.border1,
43
- borderRadius: palette.radius.pill32,
44
- shadow: system.shadow.none,
45
-
46
- fontSize: palette.fontSize.size16,
47
- color: palette.color.greenAccessible,
48
- lineHeight: palette.lineHeight.ratio3to2,
49
- textAlign: system.flexJustifyContent.center,
50
- alignSelf: system.flexAlign.flexStart,
51
- // TODO: replace these with font for theme building
52
- fontName: Object.keys(palette.font)[0],
53
- fontWeight: '700',
54
- // font: palette.font.HelveticaNow['700'],
55
-
56
- backgroundColor: palette.color.white,
57
- opacity: system.opacity.opaque,
58
- paddingLeft: palette.size.size32,
59
- paddingRight: palette.size.size32,
60
- paddingTop: palette.size.size12,
61
- paddingBottom: palette.size.size12,
62
- width: system.size.none,
63
- minWidth: palette.size.size144,
64
-
65
- outerBorderColor: palette.color.transparent,
66
- outerBorderWidth: palette.border.border2,
67
- outerBorderGap: palette.border.border2,
68
- outerBorderRadius: palette.radius.pill32,
69
- outerBackgroundColor: palette.color.transparent
70
- },
71
- rules: [
72
- { if: { hover: true }, tokens: { borderWidth: palette.border.border3 } },
73
-
74
- {
75
- if: { priority: 'high' },
76
- tokens: {
77
- backgroundColor: palette.color.greenAccessible,
78
- color: palette.color.white,
79
- borderWidth: palette.border.none
80
- }
81
- },
82
- {
83
- if: { priority: 'high', hover: true },
84
- tokens: { backgroundColor: palette.color.greenSanFelix }
85
- },
86
-
87
- // pressed and focus apply the same tokens to both high and low priority
88
- {
89
- if: { pressed: true },
90
- tokens: {
91
- borderWidth: system.size.zero,
92
- backgroundColor: palette.color.greenDarkFern,
93
- color: palette.color.white
94
- }
95
- },
96
- { if: { focus: true }, tokens: { outerBorderColor: palette.color.greenAccessible } },
97
- {
98
- if: { focus: true, pressed: true },
99
- tokens: { outerBorderColor: palette.color.greenDarkFern }
100
- },
101
-
102
- {
103
- if: { inverse: true },
104
- tokens: {
105
- backgroundColor: system.color.none,
106
- borderColor: palette.color.white,
107
- color: palette.color.white
108
- }
109
- },
110
- {
111
- if: { inverse: true, priority: 'high' },
112
- tokens: { backgroundColor: palette.color.white, color: palette.color.greyCharcoal }
113
- },
114
- {
115
- if: { inverse: true, priority: 'high', hover: true },
116
- tokens: { backgroundColor: palette.color.light80 }
117
- },
118
- {
119
- if: { inverse: true, pressed: true },
120
- tokens: {
121
- color: palette.color.greyCharcoal,
122
- backgroundColor: palette.color.light60
123
- }
124
- },
125
- { if: { inverse: true, focus: true }, tokens: { outerBorderColor: palette.color.white } },
126
-
127
- {
128
- if: { danger: true, priority: null },
129
- tokens: { color: palette.color.red, borderColor: palette.color.red }
130
- },
131
- {
132
- if: { danger: true, priority: null, inverse: true },
133
- tokens: { backgroundColor: palette.color.white }
134
- },
135
- {
136
- if: { danger: true, priority: null, focus: true },
137
- tokens: { outerBorderColor: palette.color.red }
138
- },
139
- {
140
- if: { danger: true, priority: null, pressed: true },
141
- tokens: { backgroundColor: palette.color.redDark, color: palette.color.white }
142
- },
143
- {
144
- if: { danger: true, priority: null, pressed: true, focus: true },
145
- tokens: { outerBorderColor: palette.color.redDark }
146
- },
147
-
148
- { if: { width: 'full' }, tokens: { width: system.size.full } },
149
- {
150
- if: { size: 'small' },
151
- tokens: {
152
- paddingTop: palette.size.size4,
153
- paddingBottom: palette.size.size4,
154
- minWidth: system.size.zero
155
- }
156
- },
157
- {
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
- },
163
- tokens: {
164
- backgroundColor: palette.color.greyCloud,
165
- color: palette.color.white,
166
- borderWidth: system.size.zero
167
- }
168
- },
169
- {
170
- if: { inactive: true, inverse: true },
171
- tokens: { backgroundColor: palette.color.light60, color: palette.color.greyCharcoal }
172
- }
173
- ]
174
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,88 +0,0 @@
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
- }
@@ -1,99 +0,0 @@
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
- }
@@ -1,65 +0,0 @@
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
- }