@agorapulse/ui-theme 0.0.3 → 1.0.0-SNAPSHOT
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/agorapulse-ui-theme-1.0.0-SNAPSHOT.tgz +0 -0
- package/assets/desktop_variables.css +616 -0
- package/assets/mobile_variables.css +616 -0
- package/assets/style/_colors.scss +84 -78
- package/assets/style/_font-face.scss +15 -10
- package/assets/style/_helpers.scss +5 -3
- package/assets/style/_input.scss +52 -0
- package/assets/style/_link.scss +70 -0
- package/assets/style/_mat-typography.scss +45 -48
- package/assets/style/_select.scss +631 -0
- package/assets/style/_tooltip.scss +138 -0
- package/assets/style/_variables.scss +11 -12
- package/assets/style/components-custom-style/_clickable-text.scss +1 -1
- package/assets/style/components-custom-style/_form.scss +17 -18
- package/assets/style/components-custom-style/_input.scss +38 -38
- package/assets/style/components-custom-style/_mat-button-toggle-group.scss +8 -12
- package/assets/style/components-custom-style/_mat-button.scss +243 -49
- package/assets/style/components-custom-style/_mat-dialog.scss +6 -5
- package/assets/style/components-custom-style/_mat-expansion-panel.scss +8 -9
- package/assets/style/components-custom-style/_mat-list.scss +4 -4
- package/assets/style/components-custom-style/_mat-menu.scss +44 -33
- package/assets/style/components-custom-style/_mat-table.scss +3 -0
- package/assets/style/components-custom-style/_ng-select.scss +57 -5
- package/assets/style/theme.scss +43 -18
- package/package.json +23 -18
- package/src/README.md +42 -0
- package/src/build.js +6 -0
- package/src/desktop_config.js +18 -0
- package/src/mobile_config.js +18 -0
- package/src/tokens/components/badge.json +53 -0
- package/src/tokens/components/button.json +37 -0
- package/src/tokens/components/counter.json +108 -0
- package/src/tokens/components/dot-stepper.json +52 -0
- package/src/tokens/components/icon-button.json +18 -0
- package/src/tokens/components/infobox.json +139 -0
- package/src/tokens/components/input.json +304 -0
- package/src/tokens/components/label.json +56 -0
- package/src/tokens/components/link.json +127 -0
- package/src/tokens/components/radio.json +11 -0
- package/src/tokens/components/select.json +279 -0
- package/src/tokens/components/snackbar.json +71 -0
- package/src/tokens/components/split-button.json +34 -0
- package/src/tokens/components/status-card.json +187 -0
- package/src/tokens/components/status.json +120 -0
- package/src/tokens/components/tag.json +194 -0
- package/src/tokens/components/tooltip.json +36 -0
- package/src/tokens/reference/animation.json +18 -0
- package/src/tokens/reference/border-radius.json +15 -0
- package/src/tokens/reference/color.json +151 -0
- package/src/tokens/reference/font.json +69 -0
- package/src/tokens/reference/spacing.json +33 -0
- package/src/tokens/reference/transition.json +9 -0
- package/src/tokens/system/border.json +28 -0
- package/src/tokens/system/color.json +198 -0
- package/src/tokens/system/desktop/button.json +9 -0
- package/src/tokens/system/desktop/icon-button.json +15 -0
- package/src/tokens/system/icon.json +12 -0
- package/src/tokens/system/mobile/button.json +9 -0
- package/src/tokens/system/mobile/icon-button.json +15 -0
- package/src/tokens/system/radio.json +11 -0
- package/src/tokens/system/text.json +173 -0
- package/agorapulse-ui-theme-0.0.3.tgz +0 -0
- package/assets/style/_grid.scss +0 -166
- package/assets/style/components-custom-style/_mat-checkbox.scss +0 -103
- package/assets/style/components-custom-style/_mat-radio-button.scss +0 -86
- package/assets/style/components-custom-style/_mat-slide-toggle.scss +0 -45
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
@import '../variables';
|
|
2
2
|
|
|
3
|
-
.mat-menu-panel:not(.pop-menu) {
|
|
3
|
+
.mat-mdc-menu-panel:not(.pop-menu) {
|
|
4
4
|
box-shadow: 0 7px 50px rgba(0, 0, 0, 0.08);
|
|
5
5
|
min-width: unset !important;
|
|
6
6
|
border-radius: 4px;
|
|
7
7
|
background-color: $color-white;
|
|
8
8
|
|
|
9
|
-
.mat-menu-item {
|
|
9
|
+
.mat-mdc-menu-item {
|
|
10
10
|
color: map_get($colors-grey, 100);
|
|
11
11
|
height: unset;
|
|
12
|
-
line-height: $font-line-height;
|
|
13
12
|
padding: $padding-s $padding-m;
|
|
14
13
|
display: flex;
|
|
15
|
-
font-size: $font-size;
|
|
16
14
|
background: none;
|
|
15
|
+
min-height: unset;
|
|
16
|
+
|
|
17
|
+
span {
|
|
18
|
+
line-height: $font-line-height;
|
|
19
|
+
font-size: $font-size;
|
|
20
|
+
display: flex;
|
|
21
|
+
}
|
|
17
22
|
|
|
18
23
|
&::after {
|
|
19
24
|
color: map_get($colors-grey, 100);
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
&:hover:not([disabled]),
|
|
27
|
+
&:hover:not([disabled]),
|
|
28
|
+
&.mat-mdc-menu-item-highlighted:not([disabled]) {
|
|
23
29
|
background-color: map_get($colors-electric-blue, 10);
|
|
24
30
|
color: map_get($colors-electric-blue, 100);
|
|
25
31
|
&::after {
|
|
26
32
|
color: map_get($colors-electric-blue, 100);
|
|
27
33
|
}
|
|
28
34
|
ap-symbol .svg {
|
|
29
|
-
fill:
|
|
35
|
+
fill: map_get($colors-electric-blue, 100) !important;
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
|
|
@@ -37,46 +43,46 @@
|
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
.mat-menu-panel.pop-menu {
|
|
46
|
+
.mat-mdc-menu-panel.pop-menu {
|
|
41
47
|
max-width: unset;
|
|
42
48
|
background-color: white;
|
|
43
49
|
padding: 0px;
|
|
44
|
-
border: none!important;
|
|
50
|
+
border: none !important;
|
|
45
51
|
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.05);
|
|
46
52
|
|
|
47
53
|
&.shadow {
|
|
48
|
-
filter: drop-shadow(0 0 1px rgba(0, 0, 0, .25))
|
|
54
|
+
filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.25));
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
&.shadow-no-border {
|
|
52
58
|
box-shadow: 0px 7px 50px rgba(0, 0, 0, 0.08);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
&.arrow-left{
|
|
61
|
+
&.arrow-left {
|
|
56
62
|
background: transparent;
|
|
57
|
-
.mat-menu-content {
|
|
63
|
+
.mat-mdc-menu-content {
|
|
58
64
|
margin-left: 8px;
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
|
-
&.arrow-top{
|
|
67
|
+
&.arrow-top {
|
|
62
68
|
background: transparent;
|
|
63
|
-
.mat-menu-content {
|
|
69
|
+
.mat-mdc-menu-content {
|
|
64
70
|
margin-top: 8px;
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
|
-
&.arrow-right{
|
|
73
|
+
&.arrow-right {
|
|
68
74
|
background: transparent;
|
|
69
|
-
.mat-menu-content {
|
|
75
|
+
.mat-mdc-menu-content {
|
|
70
76
|
margin-right: 8px;
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
|
-
&.arrow-bottom{
|
|
79
|
+
&.arrow-bottom {
|
|
74
80
|
background: transparent;
|
|
75
|
-
.mat-menu-content {
|
|
81
|
+
.mat-mdc-menu-content {
|
|
76
82
|
margin-bottom: 8px;
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
|
-
.mat-menu-content {
|
|
85
|
+
.mat-mdc-menu-content {
|
|
80
86
|
background-color: white;
|
|
81
87
|
padding: 0px;
|
|
82
88
|
position: relative;
|
|
@@ -93,26 +99,26 @@
|
|
|
93
99
|
height: 8px;
|
|
94
100
|
transform: rotate(135deg);
|
|
95
101
|
z-index: 99999;
|
|
96
|
-
&.arrow-left{
|
|
102
|
+
&.arrow-left {
|
|
97
103
|
bottom: 12px;
|
|
98
104
|
left: -4px;
|
|
99
105
|
-webkit-transform: rotate(45deg);
|
|
100
106
|
transform: rotate(45deg);
|
|
101
107
|
}
|
|
102
|
-
&.arrow-right{
|
|
108
|
+
&.arrow-right {
|
|
103
109
|
bottom: 12px;
|
|
104
110
|
right: -4px;
|
|
105
111
|
-webkit-transform: rotate(45deg);
|
|
106
112
|
transform: rotate(45deg);
|
|
107
113
|
}
|
|
108
|
-
&.arrow-top{
|
|
114
|
+
&.arrow-top {
|
|
109
115
|
top: -4px;
|
|
110
116
|
left: 50%;
|
|
111
117
|
-webkit-transform: rotate(45deg);
|
|
112
118
|
transform: rotate(45deg);
|
|
113
119
|
//box-shadow: -3px 0px 0px 0px rgba(0, 0, 0, 0.05);
|
|
114
120
|
}
|
|
115
|
-
&.arrow-bottom{
|
|
121
|
+
&.arrow-bottom {
|
|
116
122
|
bottom: -4px;
|
|
117
123
|
left: 50%;
|
|
118
124
|
-webkit-transform: rotate(45deg);
|
|
@@ -149,29 +155,34 @@
|
|
|
149
155
|
}
|
|
150
156
|
}
|
|
151
157
|
|
|
152
|
-
.mat-menu-item {
|
|
158
|
+
.mat-mdc-menu-item {
|
|
153
159
|
line-height: unset;
|
|
154
160
|
}
|
|
155
161
|
|
|
156
162
|
&.no-background {
|
|
157
163
|
background-color: transparent;
|
|
158
|
-
.mat-menu-content {
|
|
164
|
+
.mat-mdc-menu-content {
|
|
159
165
|
background-color: transparent;
|
|
160
166
|
}
|
|
161
167
|
}
|
|
162
168
|
}
|
|
163
169
|
|
|
164
|
-
.mat-menu-panel.button-dropdown {
|
|
170
|
+
.mat-mdc-menu-panel.button-dropdown {
|
|
165
171
|
margin-bottom: $padding-sm;
|
|
166
|
-
.mat-menu-item {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
.mat-mdc-menu-item {
|
|
173
|
+
.mat-mdc-menu-item-text {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
font-weight: $font-weight-bold;
|
|
177
|
+
width: 100%;
|
|
178
|
+
|
|
179
|
+
.caption {
|
|
180
|
+
font-weight: normal;
|
|
181
|
+
color: map_get($colors-grey, 60);
|
|
182
|
+
margin-top: 0px;
|
|
183
|
+
}
|
|
174
184
|
}
|
|
185
|
+
|
|
175
186
|
&:hover {
|
|
176
187
|
.caption {
|
|
177
188
|
color: map_get($colors-electric-blue, 85);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '@ng-select/ng-select/themes/default.theme.css';
|
|
2
2
|
@import '../variables';
|
|
3
3
|
|
|
4
4
|
@mixin select-state-style($color) {
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.ng-select {
|
|
11
|
-
div,
|
|
10
|
+
.ng-select:not(.ap-select) {
|
|
11
|
+
div,
|
|
12
|
+
span {
|
|
12
13
|
font-weight: normal !important;
|
|
13
14
|
}
|
|
14
15
|
input {
|
|
@@ -39,6 +40,11 @@
|
|
|
39
40
|
ap-symbol {
|
|
40
41
|
padding-right: $padding-s;
|
|
41
42
|
}
|
|
43
|
+
ap-avatar {
|
|
44
|
+
ap-symbol {
|
|
45
|
+
padding: 0 !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
}
|
|
@@ -53,7 +59,7 @@
|
|
|
53
59
|
&.ng-select-single {
|
|
54
60
|
.ng-select-container {
|
|
55
61
|
.ng-value-container {
|
|
56
|
-
.ng-input
|
|
62
|
+
.ng-input {
|
|
57
63
|
padding-left: $padding-m;
|
|
58
64
|
}
|
|
59
65
|
}
|
|
@@ -87,9 +93,15 @@ form.submitted {
|
|
|
87
93
|
box-shadow: 0 7px 50px rgba(0, 0, 0, 0.08);
|
|
88
94
|
margin-top: $padding-sm;
|
|
89
95
|
}
|
|
96
|
+
&.ng-select-top {
|
|
97
|
+
border-radius: $border-radius;
|
|
98
|
+
box-shadow: 0 7px 50px rgba(0, 0, 0, 0.08);
|
|
99
|
+
margin-bottom: $padding-sm;
|
|
100
|
+
}
|
|
90
101
|
.ng-dropdown-panel-items {
|
|
91
102
|
padding: $padding-s 0;
|
|
92
|
-
.ng-option,
|
|
103
|
+
.ng-option,
|
|
104
|
+
.ng-optgroup {
|
|
93
105
|
padding: $padding-s $padding-m;
|
|
94
106
|
span {
|
|
95
107
|
color: $form-control-selected-font-color;
|
|
@@ -97,6 +109,27 @@ form.submitted {
|
|
|
97
109
|
ap-symbol {
|
|
98
110
|
padding-right: $padding-s;
|
|
99
111
|
}
|
|
112
|
+
ap-avatar {
|
|
113
|
+
ap-symbol {
|
|
114
|
+
padding: 0 !important;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
.checkmark {
|
|
118
|
+
ap-symbol {
|
|
119
|
+
padding-right: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
ap-avatar {
|
|
125
|
+
ap-symbol {
|
|
126
|
+
.ap-symbol {
|
|
127
|
+
color: var(--ref-color-white);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.initials {
|
|
131
|
+
color: var(--ref-color-white);
|
|
132
|
+
}
|
|
100
133
|
}
|
|
101
134
|
&.ng-option-selected {
|
|
102
135
|
background-color: unset;
|
|
@@ -106,6 +139,13 @@ form.submitted {
|
|
|
106
139
|
fill: map_get($colors-electric-blue, 100) !important;
|
|
107
140
|
}
|
|
108
141
|
}
|
|
142
|
+
span.checkbox {
|
|
143
|
+
.checkmark {
|
|
144
|
+
ap-symbol .svg {
|
|
145
|
+
fill: white !important;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
109
149
|
}
|
|
110
150
|
&.ng-option-marked {
|
|
111
151
|
background-color: map_get($colors-electric-blue, 10);
|
|
@@ -115,11 +155,23 @@ form.submitted {
|
|
|
115
155
|
fill: map_get($colors-electric-blue, 100) !important;
|
|
116
156
|
}
|
|
117
157
|
}
|
|
158
|
+
span.checkbox {
|
|
159
|
+
.checkmark {
|
|
160
|
+
ap-symbol .svg {
|
|
161
|
+
fill: white !important;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
118
165
|
}
|
|
119
166
|
}
|
|
120
167
|
}
|
|
121
168
|
}
|
|
122
169
|
|
|
170
|
+
.ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child {
|
|
171
|
+
border-top-right-radius: 0;
|
|
172
|
+
border-top-left-radius: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
123
175
|
.ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child {
|
|
124
176
|
border-bottom-right-radius: 0;
|
|
125
177
|
border-bottom-left-radius: 0;
|
package/assets/style/theme.scss
CHANGED
|
@@ -2,31 +2,59 @@
|
|
|
2
2
|
* THEMING
|
|
3
3
|
* See https://material.angular.io/guide/theming
|
|
4
4
|
*/
|
|
5
|
-
@use '
|
|
5
|
+
@use '@angular/material' as mat;
|
|
6
6
|
@include mat.core();
|
|
7
7
|
|
|
8
|
+
@import '_tooltip.scss';
|
|
9
|
+
@import '_link.scss';
|
|
10
|
+
@import '_input.scss';
|
|
11
|
+
@import '_select.scss';
|
|
8
12
|
|
|
9
13
|
@import 'font-face';
|
|
10
14
|
@import 'colors';
|
|
11
15
|
@import 'variables';
|
|
12
16
|
|
|
13
|
-
// Custom palettes
|
|
14
|
-
@include mat.all-component-themes(mat.define-light-theme(
|
|
15
|
-
$primary: mat.define-palette($colors-primary),
|
|
16
|
-
$accent: mat.define-palette($colors-accent),
|
|
17
|
-
$warn: mat.define-palette($colors-warn)
|
|
18
|
-
));
|
|
19
|
-
|
|
20
17
|
/*
|
|
21
18
|
* TYPOGRAPHY
|
|
19
|
+
* See https://material.angular.io/guide/typography
|
|
22
20
|
*/
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
// Override typography for all Angular Material, including mat-base-typography and all components.
|
|
23
|
+
$custom-typography: mat.m2-define-typography-config(
|
|
24
|
+
$font-family: $font-family,
|
|
25
|
+
$headline-1: mat.m2-define-typography-level($font-size-h1, $font-line-height-h1, $font-weight-semibold),
|
|
26
|
+
$headline-2: mat.m2-define-typography-level($font-size-h2, $font-line-height-h2, $font-weight-semibold),
|
|
27
|
+
$body-1: mat.m2-define-typography-level($font-size, $font-line-height, $font-weight),
|
|
28
|
+
$body-2: mat.m2-define-typography-level($font-size, $font-line-height, $font-weight),
|
|
29
|
+
$caption: mat.m2-define-typography-level($font-size-s, $font-line-height-s, $font-weight),
|
|
30
|
+
);
|
|
31
|
+
@include mat.all-component-typographies($custom-typography);
|
|
32
|
+
|
|
33
|
+
// https://material.angular.io/guide/theming#defining-a-theme
|
|
34
|
+
$primary: mat.m2-define-palette($colors-primary);
|
|
35
|
+
$accent: mat.m2-define-palette($colors-accent);
|
|
36
|
+
$warn: mat.m2-define-palette($colors-warn);
|
|
37
|
+
|
|
38
|
+
// Custom palettes
|
|
39
|
+
@include mat.all-component-themes(
|
|
40
|
+
mat.m2-define-light-theme(
|
|
41
|
+
(
|
|
42
|
+
color: (
|
|
43
|
+
primary: $primary,
|
|
44
|
+
accent: $accent,
|
|
45
|
+
warn: $warn,
|
|
46
|
+
),
|
|
47
|
+
typography: $custom-typography,
|
|
48
|
+
density: 0,
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
);
|
|
25
52
|
|
|
26
53
|
/*
|
|
27
|
-
*
|
|
54
|
+
* TYPOGRAPHY
|
|
28
55
|
*/
|
|
29
|
-
|
|
56
|
+
|
|
57
|
+
@import 'mat-typography';
|
|
30
58
|
|
|
31
59
|
/*
|
|
32
60
|
* HELPERS
|
|
@@ -43,15 +71,13 @@
|
|
|
43
71
|
@import 'components-custom-style/notification';
|
|
44
72
|
@import 'components-custom-style/mat-button';
|
|
45
73
|
@import 'components-custom-style/mat-button-toggle-group';
|
|
46
|
-
@import 'components-custom-style/mat-checkbox';
|
|
47
74
|
@import 'components-custom-style/mat-dialog';
|
|
48
75
|
@import 'components-custom-style/mat-divider';
|
|
49
76
|
@import 'components-custom-style/mat-expansion-panel';
|
|
50
77
|
@import 'components-custom-style/mat-list';
|
|
51
78
|
@import 'components-custom-style/mat-menu';
|
|
52
|
-
@import 'components-custom-style/mat-radio-button';
|
|
53
|
-
@import 'components-custom-style/mat-slide-toggle';
|
|
54
79
|
@import 'components-custom-style/mat-snack-bar';
|
|
80
|
+
@import 'components-custom-style/mat-table';
|
|
55
81
|
@import 'components-custom-style/ng-select';
|
|
56
82
|
@import 'components-custom-style/select';
|
|
57
83
|
@import 'components-custom-style/sign';
|
|
@@ -59,7 +85,9 @@
|
|
|
59
85
|
@import 'components-custom-style/clickable-text';
|
|
60
86
|
@import 'components-custom-style/input-error';
|
|
61
87
|
|
|
62
|
-
.mat-ripple {
|
|
88
|
+
.mat-ripple {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
63
91
|
|
|
64
92
|
/*
|
|
65
93
|
* {
|
|
@@ -72,6 +100,3 @@ a, button {
|
|
|
72
100
|
cursor: pointer;
|
|
73
101
|
}
|
|
74
102
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
"name": "@agorapulse/ui-theme",
|
|
3
|
+
"version": "1.0.0-SNAPSHOT",
|
|
4
|
+
"description": "Agorapulse UI Theme Library",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/agorapulse/design.git"
|
|
8
|
+
},
|
|
9
|
+
"author": "Arnaud BUSO",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/agorapulse/design/issues"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"generate-tokens": "cd src && node build.js && cd ../assets && git add mobile_variables.css && git add desktop_variables.css"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/agorapulse/design#readme",
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/material": "18.2.9"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"style-dictionary": "^3.7.2"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Agorapulse Style Dictionary
|
|
2
|
+
|
|
3
|
+
To generate the style dictionary based on the config file, you'll have to run the following command:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
style-dictionary build
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
You should see something like this output:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Copying starter files...
|
|
13
|
+
|
|
14
|
+
Source style dictionary starter files created!
|
|
15
|
+
|
|
16
|
+
Running `style-dictionary build` for the first time to generate build artifacts.
|
|
17
|
+
|
|
18
|
+
css
|
|
19
|
+
✔︎ assets/variables.css
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If everything goes well, you'll should have the following architecture.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
├── README.md
|
|
26
|
+
├── config.json
|
|
27
|
+
├── tokens/
|
|
28
|
+
│ ├── reference/
|
|
29
|
+
│ ├── border-radius.json
|
|
30
|
+
│ ├── color.json
|
|
31
|
+
│ ├── font.json
|
|
32
|
+
│ ├── spacing.json
|
|
33
|
+
│ ├── system/
|
|
34
|
+
│ ├── border.json
|
|
35
|
+
│ ├── color.json
|
|
36
|
+
│ ├── icon.json
|
|
37
|
+
│ ├── text.json
|
|
38
|
+
├── build/
|
|
39
|
+
│ ├── css/
|
|
40
|
+
│ ├── variables.css
|
|
41
|
+
|
|
42
|
+
```
|
package/src/build.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const styleDictionary = require('style-dictionary');
|
|
2
|
+
const mobileStyleDictionary = styleDictionary.extend('mobile_config.js');
|
|
3
|
+
mobileStyleDictionary.buildAllPlatforms();
|
|
4
|
+
|
|
5
|
+
const desktopStyleDictionary = styleDictionary.extend('desktop_config.js');
|
|
6
|
+
desktopStyleDictionary.buildAllPlatforms();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
source: ['tokens/reference/*.json', 'tokens/system/*.json', 'tokens/system/desktop/*.json', 'tokens/components/*.json'],
|
|
3
|
+
platforms: {
|
|
4
|
+
desktop: {
|
|
5
|
+
transformGroup: 'css',
|
|
6
|
+
transforms: ['attribute/cti', 'name/cti/kebab', 'color/hex', 'size/px'],
|
|
7
|
+
files: [
|
|
8
|
+
{
|
|
9
|
+
format: 'css/variables',
|
|
10
|
+
destination: '../assets/desktop_variables.css',
|
|
11
|
+
options: {
|
|
12
|
+
showFileHeader: false,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
source: ['tokens/reference/*.json', 'tokens/system/*.json', 'tokens/system/mobile/*.json', 'tokens/components/*.json'],
|
|
3
|
+
platforms: {
|
|
4
|
+
mobile: {
|
|
5
|
+
transformGroup: 'css',
|
|
6
|
+
transforms: ['attribute/cti', 'name/cti/kebab', 'color/hex', 'size/px'],
|
|
7
|
+
files: [
|
|
8
|
+
{
|
|
9
|
+
format: 'css/variables',
|
|
10
|
+
destination: '../assets/mobile_variables.css',
|
|
11
|
+
options: {
|
|
12
|
+
showFileHeader: false,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comp": {
|
|
3
|
+
"badge": {
|
|
4
|
+
"text": {
|
|
5
|
+
"style": {
|
|
6
|
+
"font-family": {
|
|
7
|
+
"value": "{sys.text.style.captionBold.font-family}"
|
|
8
|
+
},
|
|
9
|
+
"size": {
|
|
10
|
+
"value": "{sys.text.style.captionBold.size}"
|
|
11
|
+
},
|
|
12
|
+
"font-weight": {
|
|
13
|
+
"value": "{sys.text.style.captionBold.weight}"
|
|
14
|
+
},
|
|
15
|
+
"line-height": {
|
|
16
|
+
"value": "{sys.text.style.captionBold.line-height}"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"height": {
|
|
21
|
+
"value": "{ref.font.lineHeight.xs}"
|
|
22
|
+
},
|
|
23
|
+
"padding": {
|
|
24
|
+
"left": {
|
|
25
|
+
"value": "2px"
|
|
26
|
+
},
|
|
27
|
+
"right": {
|
|
28
|
+
"value": "2px"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"orange": {
|
|
32
|
+
"color": {
|
|
33
|
+
"value": "{ref.color.white}"
|
|
34
|
+
},
|
|
35
|
+
"background": {
|
|
36
|
+
"color": {
|
|
37
|
+
"value": "{sys.color.main.default.bg.default}"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"blue": {
|
|
42
|
+
"color": {
|
|
43
|
+
"value": "{sys.color.accent.light.text}"
|
|
44
|
+
},
|
|
45
|
+
"background": {
|
|
46
|
+
"color": {
|
|
47
|
+
"value": "{ref.color.electricBlue.10}"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comp": {
|
|
3
|
+
"button": {
|
|
4
|
+
"text": {
|
|
5
|
+
"size": {
|
|
6
|
+
"value": "{sys.text.style.h4.size}"
|
|
7
|
+
},
|
|
8
|
+
"font-family": {
|
|
9
|
+
"value": "{sys.text.style.h4.font-family}"
|
|
10
|
+
},
|
|
11
|
+
"weight": {
|
|
12
|
+
"value": "{sys.text.style.h4.weight}"
|
|
13
|
+
},
|
|
14
|
+
"lineHeight": {
|
|
15
|
+
"value": "{sys.text.style.h4.line-height}"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"padding": {
|
|
19
|
+
"horizontal": {
|
|
20
|
+
"value": "{ref.spacing.xxs}"
|
|
21
|
+
},
|
|
22
|
+
"vertical": {
|
|
23
|
+
"value": "{ref.spacing.sm}"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"height": {
|
|
27
|
+
"value": "{sys.button.height}"
|
|
28
|
+
},
|
|
29
|
+
"borderRadius": {
|
|
30
|
+
"value": "{sys.border.radius.md}"
|
|
31
|
+
},
|
|
32
|
+
"spacing": {
|
|
33
|
+
"value": "{ref.spacing.xxs}"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|