@telus-uds/theme-koodo 0.0.2-prerelease.0 → 0.1.0-prerelease.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.
@@ -1,81 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import {
3
- buttonAppearances,
4
- getPaginationPageButtonSchema,
5
- lineOptions,
6
- validateComponentTheme
7
- } from '@telus-uds/tools-theme'
8
-
9
- const { focus, hover, pressed } = buttonAppearances
10
-
11
- const PaginationPageButton = {
12
- appearances: {
13
- focus,
14
- hover,
15
- pressed
16
- },
17
- tokens: {
18
- borderColor: palette.color.transparent,
19
- borderWidth: palette.border.border1,
20
- borderRadius: palette.radius.pill32,
21
- backgroundColor: palette.color.transparent,
22
- paddingLeft: palette.size.size8,
23
- paddingRight: palette.size.size8,
24
- paddingTop: palette.size.size4,
25
- paddingBottom: palette.size.size4,
26
- width: palette.size.size32,
27
-
28
- // never visible - used only to increase the click area size
29
- outerBorderColor: palette.color.transparent,
30
- outerBorderWidth: palette.border.border4,
31
- outerBorderGap: palette.border.border4,
32
-
33
- color: palette.color.dove,
34
- fontName: Object.keys(palette.font)[0],
35
- fontWeight: '400',
36
- fontSize: palette.fontSize.size16,
37
- lineHeight: palette.lineHeight.multiply150,
38
- textLine: lineOptions.underline
39
- },
40
- rules: [
41
- {
42
- if: { hover: true },
43
- tokens: {
44
- borderColor: palette.color.dove,
45
- textLine: lineOptions.none
46
- }
47
- },
48
- {
49
- if: { focus: true },
50
- tokens: {
51
- borderColor: palette.color.dove,
52
- borderWidth: palette.border.border2
53
- }
54
- },
55
- {
56
- if: { selected: true },
57
- tokens: {
58
- backgroundColor: palette.color.dove,
59
- color: palette.color.white,
60
- textLine: lineOptions.none
61
- }
62
- },
63
- {
64
- if: { pressed: true },
65
- tokens: {
66
- backgroundColor: palette.color.dove,
67
- color: palette.color.white
68
- }
69
- }
70
- ]
71
- }
72
-
73
- // TODO: replace this with a build step similar to Palettes
74
- // https://github.com/telus/universal-design-system/issues/167
75
- validateComponentTheme(
76
- PaginationPageButton,
77
- getPaginationPageButtonSchema(palette),
78
- 'pagination-page-button'
79
- )
80
-
81
- export default PaginationPageButton
@@ -1,119 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import {
3
- buttonAppearances,
4
- getPaginationSideButtonSchema,
5
- lineOptions,
6
- paginationSideButtonAppearances,
7
- validateComponentTheme
8
- } from '@telus-uds/tools-theme'
9
-
10
- import leftArrowIcon from '@telus-uds/palette-koodo/build/rn/icons/chevron-left.icon.svg'
11
- import rightArrowIcon from '@telus-uds/palette-koodo/build/rn/icons/chevron-right.icon.svg'
12
- import { appearances } from '@telus-uds/system-constants'
13
-
14
- const { focus, hover, pressed } = buttonAppearances
15
-
16
- const PaginationSideButton = {
17
- appearances: {
18
- viewport: appearances.viewport,
19
- focus,
20
- hover,
21
- pressed,
22
- ...paginationSideButtonAppearances
23
- },
24
- tokens: {
25
- borderColor: palette.color.transparent,
26
- borderWidth: palette.border.border1,
27
- borderRadius: palette.radius.radius4,
28
- backgroundColor: palette.color.transparent,
29
- paddingLeft: palette.size.size8,
30
- paddingRight: palette.size.size8,
31
- paddingTop: palette.size.size10,
32
- paddingBottom: palette.size.size10,
33
-
34
- color: palette.color.dove,
35
- fontName: Object.keys(palette.font)[0],
36
- fontWeight: '400',
37
- fontSize: palette.fontSize.size16,
38
- lineHeight: palette.lineHeight.multiply150,
39
- textLine: lineOptions.underline,
40
-
41
- icon: null,
42
- iconSize: palette.fontSize.size14,
43
- iconTranslateX: 0
44
- },
45
- rules: [
46
- {
47
- if: { viewport: ['xs', 'sm'] },
48
- tokens: {
49
- borderRadius: palette.radius.pill32,
50
- paddingTop: palette.size.size4,
51
- paddingBottom: palette.size.size4,
52
- width: 32
53
- }
54
- },
55
- {
56
- if: { hover: true },
57
- tokens: {
58
- borderColor: palette.color.dove,
59
- textLine: lineOptions.none
60
- }
61
- },
62
- {
63
- if: { focus: true },
64
- tokens: {
65
- borderColor: palette.color.dove,
66
- borderWidth: palette.border.border3
67
- }
68
- },
69
- {
70
- if: { selected: true },
71
- tokens: {
72
- backgroundColor: palette.color.dove,
73
- color: palette.color.white,
74
- textLine: lineOptions.none
75
- }
76
- },
77
- {
78
- if: { pressed: true },
79
- tokens: {
80
- backgroundColor: palette.color.dove,
81
- color: palette.color.white
82
- }
83
- },
84
- {
85
- if: { direction: 'previous' },
86
- tokens: {
87
- icon: leftArrowIcon
88
- }
89
- },
90
- {
91
- if: { direction: 'next' },
92
- tokens: {
93
- icon: rightArrowIcon
94
- }
95
- },
96
- {
97
- if: { direction: 'previous', hover: true },
98
- tokens: {
99
- iconTranslateX: -1 * palette.size.size4
100
- }
101
- },
102
- {
103
- if: { direction: 'next', hover: true },
104
- tokens: {
105
- iconTranslateX: palette.size.size4
106
- }
107
- }
108
- ]
109
- }
110
-
111
- // TODO: replace this with a build step similar to Palettes
112
- // https://github.com/telus/universal-design-system/issues/167
113
- validateComponentTheme(
114
- PaginationSideButton,
115
- getPaginationSideButtonSchema(palette),
116
- 'pagination-side-button'
117
- )
118
-
119
- export default PaginationSideButton
@@ -1,18 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import { getSideNavSchema, validateComponentTheme } from '@telus-uds/tools-theme'
3
-
4
- const SideNav = {
5
- appearances: {},
6
- tokens: {
7
- borderColor: palette.color.silver,
8
- borderWidth: palette.border.border1,
9
- borderStyle: 'solid'
10
- },
11
- rules: []
12
- }
13
-
14
- // TODO: replace this with a build step similar to Palettes
15
- // https://github.com/telus/universal-design-system/issues/167
16
- validateComponentTheme(SideNav, getSideNavSchema(palette), 'side-nav')
17
-
18
- export default SideNav
@@ -1,115 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import {
3
- getSideNavItemSchema,
4
- sideNavItemAppearances,
5
- linkAppearances,
6
- validateComponentTheme
7
- } from '@telus-uds/tools-theme'
8
-
9
- const SideNavItem = {
10
- appearances: {
11
- ...sideNavItemAppearances,
12
- hover: linkAppearances.hover
13
- },
14
- tokens: {
15
- borderColor: palette.color.silver,
16
- borderWidth: palette.border.border1,
17
- borderStyle: 'solid',
18
- paddingLeft: palette.size.size16,
19
- paddingRight: palette.size.size16,
20
- paddingTop: palette.size.size16,
21
- paddingBottom: palette.size.size16,
22
- justifyContent: 'space-between',
23
- color: palette.color.dove,
24
- accentOffset: 0,
25
- accentPadding: 0,
26
- accentWidth: palette.size.size4,
27
- accentBackgroundColor: palette.color.transparent
28
- },
29
- rules: [
30
- {
31
- if: {
32
- active: true
33
- },
34
- tokens: {
35
- paddingLeft: palette.size.size10,
36
- backgroundColor: palette.color.mintTulip,
37
- accentBackgroundColor: palette.color.mosque,
38
- color: palette.color.mosque
39
- }
40
- },
41
- {
42
- if: {
43
- type: 'child'
44
- },
45
- tokens: {
46
- paddingLeft: palette.size.size36,
47
- borderWidth: 0,
48
- accentBackgroundColor: palette.color.mintTulip,
49
- accentOffset: palette.size.size16
50
- }
51
- },
52
- {
53
- if: {
54
- type: 'parent',
55
- active: true
56
- },
57
- tokens: {
58
- paddingLeft: palette.size.size10
59
- }
60
- },
61
- {
62
- if: {
63
- type: 'parent',
64
- active: true,
65
- expanded: true
66
- },
67
- tokens: {
68
- paddingLeft: palette.size.size16,
69
- backgroundColor: palette.color.transparent,
70
- accentBackgroundColor: palette.color.transparent,
71
- color: palette.color.dove
72
- }
73
- },
74
- {
75
- if: {
76
- hover: true
77
- },
78
- tokens: {
79
- backgroundColor: palette.color.mintTulip,
80
- color: palette.color.mosque
81
- }
82
- },
83
- {
84
- if: {
85
- type: 'child',
86
- active: true
87
- },
88
- tokens: {
89
- backgroundColor: palette.color.mintTulip,
90
- color: palette.color.mosque,
91
- accentPadding: palette.size.size16,
92
- accentBackgroundColor: palette.color.mosque
93
- }
94
- },
95
- {
96
- if: {
97
- type: 'child',
98
- active: false,
99
- hover: true
100
- },
101
- tokens: {
102
- accentBackgroundColor: palette.color.white,
103
- color: palette.color.dove,
104
- accentOffset: 0,
105
- accentWidth: palette.size.size16
106
- }
107
- }
108
- ]
109
- }
110
-
111
- // TODO: replace this with a build step similar to Palettes
112
- // https://github.com/telus/universal-design-system/issues/167
113
- validateComponentTheme(SideNavItem, getSideNavItemSchema(palette), 'side-nav-item')
114
-
115
- export default SideNavItem
@@ -1,31 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import { getSideNavItemsGroupSchema, validateComponentTheme } from '@telus-uds/tools-theme'
3
-
4
- const SideNavItemsGroup = {
5
- appearances: {},
6
- tokens: {
7
- // animate slightly faster when closing
8
- expandDuration: 300,
9
- collapseDuration: 250,
10
- iconGap: palette.size.size8,
11
- iconSize: palette.size.size10,
12
- contentPaddingLeft: palette.size.size0,
13
- contentPaddingRight: palette.size.size0,
14
- contentPaddingTop: palette.size.size0,
15
- contentPaddingBottom: palette.size.size0,
16
- iconPosition: 'right',
17
- verticalAlign: 'middle',
18
- justifyContent: 'space-between'
19
- },
20
- rules: []
21
- }
22
-
23
- // TODO: replace this with a build step similar to Palettes
24
- // https://github.com/telus/universal-design-system/issues/167
25
- validateComponentTheme(
26
- SideNavItemsGroup,
27
- getSideNavItemsGroupSchema(palette),
28
- 'side-nav-items-group'
29
- )
30
-
31
- export default SideNavItemsGroup
@@ -1,85 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import {
3
- getTextInputSchema,
4
- textInputAppearances,
5
- validateComponentTheme
6
- } from '@telus-uds/tools-theme'
7
- import errorIcon from '@telus-uds/palette-koodo/build/rn/icons/times.icon.svg'
8
- import successIcon from '@telus-uds/palette-koodo/build/rn/icons/check-circled-filled.icon.svg'
9
-
10
- const TextInput = {
11
- appearances: {
12
- ...textInputAppearances
13
- },
14
- tokens: {
15
- backgroundColor: palette.color.white,
16
- color: palette.color.dove,
17
- borderWidth: palette.border.border1,
18
- borderColor: palette.color.silver,
19
- borderRadius: palette.radius.radius4,
20
- paddingTop: palette.size.size10,
21
- paddingBottom: palette.size.size10,
22
- paddingLeft: palette.size.size16,
23
- paddingRight: palette.size.size16,
24
-
25
- outerBackgroundColor: palette.color.transparent,
26
- outerBorderWidth: palette.border.border2,
27
- outerBorderColor: palette.color.transparent,
28
- outerBorderRadius: palette.radius.radius4,
29
-
30
- fontName: Object.keys(palette.font)[0],
31
- fontSize: palette.fontSize.size16,
32
- fontWeight: '400',
33
- lineHeight: palette.lineHeight.ratio3to2,
34
-
35
- icon: null,
36
- iconSize: palette.fontSize.size24,
37
- iconColor: palette.color.transparent
38
- },
39
- rules: [
40
- {
41
- if: { hover: true, inactive: null },
42
- tokens: {
43
- outerBorderColor: palette.color.gallery,
44
- outerBackgroundColor: palette.color.gallery
45
- }
46
- },
47
- {
48
- if: { validation: 'success' },
49
- tokens: {
50
- borderColor: palette.color.bilbao,
51
- icon: successIcon,
52
- iconColor: palette.color.bilbao
53
- }
54
- },
55
- {
56
- if: { validation: 'error' },
57
- tokens: {
58
- borderColor: palette.color.trinidad,
59
- icon: errorIcon,
60
- iconColor: palette.color.trinidad
61
- }
62
- },
63
- {
64
- if: { focus: true, inactive: null },
65
- tokens: {
66
- borderColor: palette.color.mosque,
67
- borderWidth: palette.border.border2,
68
- icon: null
69
- }
70
- },
71
- {
72
- if: { inactive: true },
73
- tokens: {
74
- backgroundColor: palette.color.gallery,
75
- borderColor: palette.color.gallery
76
- }
77
- }
78
- ]
79
- }
80
-
81
- // TODO: replace this with a build step similar to Palettes
82
- // https://github.com/telus/universal-design-system/issues/167
83
- validateComponentTheme(TextInput, getTextInputSchema(palette), 'text-input')
84
-
85
- export default TextInput
@@ -1,111 +0,0 @@
1
- import palette from '@telus-uds/palette-koodo'
2
- import {
3
- toggleSwitchAppearances,
4
- getToggleSwitchSchema,
5
- validateComponentTheme
6
- } from '@telus-uds/tools-theme'
7
-
8
- // There are no designs for this AFAIK, these are just some Koodo-ish placeholder styles
9
-
10
- const ToggleSwitch = {
11
- appearances: {
12
- focus: toggleSwitchAppearances.focus,
13
- hover: toggleSwitchAppearances.hover,
14
- pressed: toggleSwitchAppearances.pressed,
15
- inactive: toggleSwitchAppearances.inactive,
16
- selected: toggleSwitchAppearances.selected
17
- },
18
- tokens: {
19
- borderColor: palette.color.transparent,
20
- borderWidth: palette.border.none,
21
- borderRadius: palette.radius.radius4,
22
- outerBorderColor: palette.color.transparent,
23
- outerBorderWidth: palette.border.none,
24
- outerBorderGap: palette.size.size0,
25
- outerBorderRadius: palette.radius.pill32,
26
- outerBackgroundColor: palette.color.transparent,
27
- backgroundColor: palette.color.mosque,
28
- opacity: 1,
29
- paddingLeft: palette.size.size8,
30
- paddingRight: palette.size.size8,
31
- paddingTop: palette.size.size4,
32
- paddingBottom: palette.size.size4,
33
- shadow: null,
34
-
35
- icon: null,
36
- width: palette.size.size64,
37
- trackBorderWidth: palette.border.none,
38
- trackBorderColor: palette.color.transparent,
39
- trackBorderRadius: palette.radius.none,
40
- iconSize: palette.size.size16,
41
- iconColor: palette.color.transparent,
42
- switchSize: palette.size.size24,
43
- switchColor: palette.color.white,
44
- switchBorderColor: palette.color.transparent,
45
- switchBorderWidth: palette.border.none,
46
- switchBorderRadius: palette.radius.pill32,
47
- switchShadow: null
48
- },
49
- rules: [
50
- {
51
- if: { hover: true },
52
- tokens: {
53
- backgroundColor: palette.color.darkMosque
54
- }
55
- },
56
- {
57
- if: { pressed: true },
58
- tokens: {
59
- backgroundColor: palette.color.onahau
60
- }
61
- },
62
- {
63
- if: { focus: true },
64
- tokens: {
65
- outerBorderColor: palette.color.mosque
66
- }
67
- },
68
- {
69
- if: { selected: true },
70
- tokens: {
71
- backgroundColor: palette.color.blue
72
- }
73
- },
74
- {
75
- if: { selected: true, hover: true },
76
- tokens: {
77
- backgroundColor: palette.color.darkBlue
78
- }
79
- },
80
- {
81
- if: { selected: true, pressed: true },
82
- tokens: {
83
- backgroundColor: palette.color.onahau
84
- }
85
- },
86
- {
87
- if: { selected: true, focus: true },
88
- tokens: {
89
- outerBorderColor: palette.color.blue
90
- }
91
- },
92
- {
93
- if: { selected: true, focus: true, pressed: true },
94
- tokens: {
95
- outerBorderColor: palette.color.onahau
96
- }
97
- },
98
- {
99
- if: { inactive: true },
100
- tokens: {
101
- opacity: 0.5
102
- }
103
- }
104
- ]
105
- }
106
-
107
- // TODO: replace this with a build step similar to Palettes
108
- // https://github.com/telus/universal-design-system/issues/167
109
- validateComponentTheme(ToggleSwitch, getToggleSwitchSchema(palette), 'ToggleSwitch')
110
-
111
- export default ToggleSwitch