@appscode/design-system 2.0.41-alpha.9 → 2.0.41

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 (63) hide show
  1. package/main.scss +2 -0
  2. package/package.json +1 -1
  3. package/plugins/theme.js +10 -32
  4. package/vue-components/styles/base/utilities/_all.scss +3 -1
  5. package/vue-components/styles/base/utilities/_colors.scss +10 -257
  6. package/vue-components/styles/base/utilities/_customize-bulma.scss +1 -1
  7. package/vue-components/styles/base/utilities/_extended.scss +2 -2
  8. package/vue-components/styles/base/utilities/_generate-color-classes.scss +253 -0
  9. package/vue-components/styles/base/utilities/_global.scss +6 -4
  10. package/vue-components/styles/base/utilities/_root-variables.scss +5 -0
  11. package/vue-components/styles/base/utilities/_typography.scss +20 -3
  12. package/vue-components/styles/components/_ac-calendar.scss +1 -1
  13. package/vue-components/styles/components/_ac-tags.scss +2 -2
  14. package/vue-components/styles/components/_accordion.scss +1 -1
  15. package/vue-components/styles/components/_button.scss +29 -4
  16. package/vue-components/styles/components/_direct-deploy.scss +1 -1
  17. package/vue-components/styles/components/_dropdown.scss +1 -1
  18. package/vue-components/styles/components/_getkeeper.scss +1 -1
  19. package/vue-components/styles/components/_options.scss +3 -3
  20. package/vue-components/styles/components/_overview-page.scss +1 -1
  21. package/vue-components/styles/components/_pagination.scss +5 -5
  22. package/vue-components/styles/components/_preloader.scss +1 -1
  23. package/vue-components/styles/components/_preview-modal.scss +2 -2
  24. package/vue-components/styles/components/_progress-bar.scss +7 -7
  25. package/vue-components/styles/components/_table.scss +13 -13
  26. package/vue-components/styles/components/_tabs.scss +13 -13
  27. package/vue-components/styles/components/_terminal.scss +2 -2
  28. package/vue-components/styles/components/_widget-menu.scss +2 -2
  29. package/vue-components/styles/components/_wizard.scss +3 -3
  30. package/vue-components/styles/components/alert/_alert-message.scss +7 -0
  31. package/vue-components/styles/components/alert/_alert.scss +8 -8
  32. package/vue-components/styles/components/bbum/_card-team.scss +1 -1
  33. package/vue-components/styles/components/bbum/_left-sidebar.scss +2 -2
  34. package/vue-components/styles/components/bbum/_single-post-preview.scss +2 -2
  35. package/vue-components/styles/components/bbum/_user-profile.scss +2 -2
  36. package/vue-components/styles/components/cards/_cluster.scss +5 -4
  37. package/vue-components/styles/components/cards/_info.scss +7 -1
  38. package/vue-components/styles/components/cards/_monitoring.scss +1 -0
  39. package/vue-components/styles/components/cards/_org.scss +2 -2
  40. package/vue-components/styles/components/cards/_payment-card.scss +3 -3
  41. package/vue-components/styles/components/cards/_vendor.scss +5 -5
  42. package/vue-components/styles/components/editor/_filtered-file-editor.scss +2 -2
  43. package/vue-components/styles/components/form-fields/_input-card.scss +4 -4
  44. package/vue-components/styles/components/form-fields/_input.scss +15 -10
  45. package/vue-components/styles/components/header/_header.scss +1 -1
  46. package/vue-components/styles/components/navbar/_menu-content.scss +4 -4
  47. package/vue-components/styles/components/navbar/_notification.scss +3 -3
  48. package/vue-components/styles/components/select-box/_ac-select-box.scss +1 -1
  49. package/vue-components/styles/components/select-box/_multi-select.scss +3 -3
  50. package/vue-components/styles/components/sidebar/_left-sidebar.scss +2 -2
  51. package/vue-components/styles/components/sidebar-tabs/_sidebar-tabs.scss +3 -3
  52. package/vue-components/styles/components/ui-builder/_ui-builder.scss +9 -9
  53. package/vue-components/styles/components/ui-builder/_vue-open-api.scss +4 -4
  54. package/vue-components/styles/theme/_appscode.scss +9 -24
  55. package/vue-components/styles/theme/_dark.scss +48 -0
  56. package/vue-components/v2/pagination/Pagination.vue +4 -4
  57. package/vue-components/v3/alert/AlertMessage.vue +1 -1
  58. package/vue-components/v3/header/Header.vue +1 -1
  59. package/vue-components/v3/navbar/ThemeMode.vue +1 -1
  60. package/vue-components/v3/notification/AlertBox.vue +9 -9
  61. package/vue-components/v3/pagination/Pagination.vue +4 -4
  62. package/vue-components/v3/sidebar/Steps.vue +3 -3
  63. package/vue-components/v3/table/InfoTable.vue +1 -1
package/main.scss CHANGED
@@ -18,6 +18,8 @@
18
18
 
19
19
  // COMPONENTS
20
20
  // @import "@/components/vue-components/styles/components/all";
21
+ @import "@/components/vue-components/styles/components/button";
21
22
  @import "@/components/vue-components/styles/components/form-fields/input";
22
23
  @import "@/components/vue-components/styles/components/ui-builder/vue-open-api";
23
24
  @import "@/components/vue-components/styles/components/ui-builder/ui-builder";
25
+ // @import "@/components/vue-components/styles/theme/appscode.scss";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.0.41-alpha.9",
3
+ "version": "2.0.41",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
package/plugins/theme.js CHANGED
@@ -93,15 +93,13 @@ export function HexToHSL(H) {
93
93
  };
94
94
  }
95
95
  export function getThemeHSL() {
96
- const hue = getComputedStyle(document.documentElement).getPropertyValue(
97
- "--hsl-hue"
98
- );
99
- const saturation = getComputedStyle(
100
- document.documentElement
101
- ).getPropertyValue("--hsl-saturation");
102
- const lightness = getComputedStyle(document.documentElement).getPropertyValue(
103
- "--hsl-lightness"
96
+ const themeElement = document.querySelector(":root");
97
+ const hue = getComputedStyle(themeElement).getPropertyValue("--primary-hue");
98
+ const saturation = getComputedStyle(themeElement).getPropertyValue(
99
+ "--primary-saturation"
104
100
  );
101
+ const lightness =
102
+ getComputedStyle(themeElement).getPropertyValue("--primary-light");
105
103
 
106
104
  return {
107
105
  hue,
@@ -110,32 +108,12 @@ export function getThemeHSL() {
110
108
  };
111
109
  }
112
110
  export function setThemeHSL(h, s, l) {
113
- document.documentElement.style.setProperty("--hsl-hue", h);
114
- document.documentElement.style.setProperty("--hsl-saturation", s);
115
- document.documentElement.style.setProperty("--hsl-lightness", l);
116
- }
117
- export function setFontHSL(h, s, l) {
118
- document.documentElement.style.setProperty("--font-hsl-hue", h);
119
- document.documentElement.style.setProperty("--font-hsl-saturation", s);
120
- document.documentElement.style.setProperty("--font-hsl-lightness", l);
111
+ const themeElement = document.querySelector(":root");
112
+ themeElement.style.setProperty("--primary-hue", h);
113
+ themeElement.style.setProperty("--primary-saturation", s);
114
+ themeElement.style.setProperty("--primary-light", l);
121
115
  }
122
- export function getFontHSL() {
123
- const hue = getComputedStyle(document.documentElement).getPropertyValue(
124
- "--font-hsl-hue"
125
- );
126
- const saturation = getComputedStyle(
127
- document.documentElement
128
- ).getPropertyValue("--font-hsl-saturation");
129
- const lightness = getComputedStyle(document.documentElement).getPropertyValue(
130
- "--font-hsl-lightness"
131
- );
132
116
 
133
- return {
134
- hue,
135
- saturation,
136
- lightness,
137
- };
138
- }
139
117
  export const loaderLightThemePrimaryColor = "#f5f7f9";
140
118
  export const loaderDarkThemePrimaryColor = "#2e323c";
141
119
  export const loaderLightThemeSecondaryColor = "#ecebeb";
@@ -1,4 +1,6 @@
1
1
  // @import "colors";
2
+ @import "root-variables";
3
+ @import "generate-color-classes";
2
4
  @import "typography";
3
5
  @import "mixin";
4
6
  @import "extended";
@@ -6,4 +8,4 @@
6
8
  @import "grid";
7
9
  @import "spacing";
8
10
  @import "layouts";
9
- // @import "dark-theme";
11
+ // @import "dark-theme";
@@ -1,16 +1,23 @@
1
+ // :root {
2
+ // --theme-mode: light;
3
+ // }
4
+
1
5
  // white and black
2
6
  $white-100: hsl(0, 0%, 100%);
3
7
  $black-100: hsl(0, 0%, 0%);
4
8
 
5
9
  // primary color guides
6
- $primary-hue: 208;
7
- $primary-saturation: 77%;
10
+ $primary-hue: var(--primary-hue);
11
+ $primary-saturation: var(--primary-saturation);
12
+ $primary-light: var(--primary-light);
13
+ // $theme-mode: var(--theme-mode);
14
+
8
15
  $primary-5: hsl($primary-hue, $primary-saturation, 5%);
9
16
  $primary-10: hsl($primary-hue, $primary-saturation, 10%);
10
17
  $primary-20: hsl($primary-hue, $primary-saturation, 20%);
11
18
  $primary-30: hsl($primary-hue, $primary-saturation, 30%);
12
19
  $primary-40: hsl($primary-hue, $primary-saturation, 40%);
13
- $primary: hsl($primary-hue, $primary-saturation, 40%);
20
+ $ac-primary: hsl($primary-hue, $primary-saturation, $primary-light);
14
21
  $primary-50: hsl($primary-hue, $primary-saturation, 50%);
15
22
  $primary-60: hsl($primary-hue, $primary-saturation, 60%);
16
23
  $primary-70: hsl($primary-hue, $primary-saturation, 70%);
@@ -140,260 +147,6 @@ $black-93: hsl($black-hue, $black-saturation, 93%);
140
147
  $black-95: hsl($black-hue, $black-saturation, 95%);
141
148
  $black-97: hsl($black-hue, $black-saturation, 97%);
142
149
 
143
- // classes
144
- @mixin generate-color-classes($type, $color, $h, $s, $from, $to, $step) {
145
- $i: $from;
146
-
147
- @while $i <=$to {
148
- .#{$type}-#{$color}-#{$i} {
149
- #{if($type == "text", "color", "background-color")}: hsl($h, $s, $i * 1%);
150
- }
151
-
152
- $i: $i + $step;
153
- }
154
- }
155
-
156
- // for primary classes
157
- @include generate-color-classes(
158
- "text",
159
- "primary",
160
- $primary-hue,
161
- $primary-saturation,
162
- 10,
163
- 90,
164
- 10
165
- );
166
-
167
- @include generate-color-classes(
168
- "bg",
169
- "primary",
170
- $primary-hue,
171
- $primary-saturation,
172
- 10,
173
- 90,
174
- 10
175
- );
176
-
177
- @include generate-color-classes(
178
- "text",
179
- "primary",
180
- $primary-hue,
181
- $primary-saturation,
182
- 5,
183
- 5,
184
- 1
185
- );
186
-
187
- @include generate-color-classes(
188
- "bg",
189
- "primary",
190
- $primary-hue,
191
- $primary-saturation,
192
- 5,
193
- 5,
194
- 1
195
- );
196
-
197
- @include generate-color-classes(
198
- "text",
199
- "primary",
200
- $primary-hue,
201
- $primary-saturation,
202
- 93,
203
- 97,
204
- 2
205
- );
206
-
207
- @include generate-color-classes(
208
- "bg",
209
- "primary",
210
- $primary-hue,
211
- $primary-saturation,
212
- 93,
213
- 97,
214
- 2
215
- );
216
-
217
- // for green classes
218
- @include generate-color-classes(
219
- "text",
220
- "green",
221
- $green-hue,
222
- $green-saturation,
223
- 10,
224
- 90,
225
- 10
226
- );
227
- @include generate-color-classes(
228
- "bg",
229
- "green",
230
- $green-hue,
231
- $green-saturation,
232
- 10,
233
- 90,
234
- 10
235
- );
236
-
237
- @include generate-color-classes(
238
- "text",
239
- "green",
240
- $green-hue,
241
- $green-saturation,
242
- 5,
243
- 5,
244
- 1
245
- );
246
-
247
- @include generate-color-classes(
248
- "bg",
249
- "green",
250
- $green-hue,
251
- $green-saturation,
252
- 5,
253
- 5,
254
- 1
255
- );
256
-
257
- @include generate-color-classes(
258
- "text",
259
- "green",
260
- $green-hue,
261
- $green-saturation,
262
- 93,
263
- 97,
264
- 2
265
- );
266
-
267
- @include generate-color-classes(
268
- "bg",
269
- "green",
270
- $green-hue,
271
- $green-saturation,
272
- 93,
273
- 97,
274
- 2
275
- );
276
-
277
- // for yellow classes
278
- @include generate-color-classes(
279
- "text",
280
- "yellow",
281
- $yellow-hue,
282
- $yellow-saturation,
283
- 10,
284
- 90,
285
- 10
286
- );
287
- @include generate-color-classes(
288
- "bg",
289
- "yellow",
290
- $yellow-hue,
291
- $yellow-saturation,
292
- 10,
293
- 90,
294
- 10
295
- );
296
-
297
- @include generate-color-classes(
298
- "text",
299
- "yellow",
300
- $yellow-hue,
301
- $yellow-saturation,
302
- 5,
303
- 5,
304
- 1
305
- );
306
-
307
- @include generate-color-classes(
308
- "bg",
309
- "yellow",
310
- $yellow-hue,
311
- $yellow-saturation,
312
- 5,
313
- 5,
314
- 1
315
- );
316
-
317
- @include generate-color-classes(
318
- "text",
319
- "yellow",
320
- $yellow-hue,
321
- $yellow-saturation,
322
- 93,
323
- 97,
324
- 2
325
- );
326
-
327
- @include generate-color-classes(
328
- "bg",
329
- "yellow",
330
- $yellow-hue,
331
- $yellow-saturation,
332
- 93,
333
- 97,
334
- 2
335
- );
336
-
337
- // for purple classes
338
- @include generate-color-classes(
339
- "text",
340
- "purple",
341
- $purple-hue,
342
- $purple-saturation,
343
- 10,
344
- 90,
345
- 10
346
- );
347
- @include generate-color-classes(
348
- "bg",
349
- "purple",
350
- $purple-hue,
351
- $purple-saturation,
352
- 10,
353
- 90,
354
- 10
355
- );
356
-
357
- @include generate-color-classes(
358
- "text",
359
- "purple",
360
- $purple-hue,
361
- $purple-saturation,
362
- 5,
363
- 5,
364
- 1
365
- );
366
-
367
- @include generate-color-classes(
368
- "bg",
369
- "purple",
370
- $purple-hue,
371
- $purple-saturation,
372
- 5,
373
- 5,
374
- 1
375
- );
376
-
377
- @include generate-color-classes(
378
- "text",
379
- "purple",
380
- $purple-hue,
381
- $purple-saturation,
382
- 93,
383
- 97,
384
- 2
385
- );
386
-
387
- @include generate-color-classes(
388
- "bg",
389
- "purple",
390
- $purple-hue,
391
- $purple-saturation,
392
- 93,
393
- 97,
394
- 2
395
- );
396
-
397
150
  // Box Shadow
398
151
  $ac-shadow-1: 0 1px 4px rgba(26, 80, 151, 0.16);
399
152
  $ac-shadow-2: 0px 8px 57px rgba(0, 0, 0, 0.16);
@@ -75,7 +75,7 @@ $weight-bold: 700 !default;
75
75
  // // Derived-Variables
76
76
 
77
77
  // $primary: $turquoise !default;
78
- $primary: $primary !default;
78
+ // $primary: hsl(208, 77%, 40) !default;
79
79
  $info: $blue !default;
80
80
  $success: $success !default;
81
81
  $warning: $warning !default;
@@ -12,7 +12,7 @@
12
12
  border-bottom: solid 1px;
13
13
  transition: 0.3s;
14
14
  transform: scaleX(0);
15
- border-color: $primary;
15
+ border-color: $ac-primary;
16
16
  }
17
17
 
18
18
  &::after {
@@ -26,7 +26,7 @@
26
26
  border-right: solid 1px;
27
27
  transition: 0.3s;
28
28
  transform: scaleY(0);
29
- border-color: $primary;
29
+ border-color: $ac-primary;
30
30
  }
31
31
 
32
32
  &:hover {
@@ -0,0 +1,253 @@
1
+ // classes
2
+ @mixin generate-color-classes($type, $color, $h, $s, $from, $to, $step) {
3
+ $i: $from;
4
+
5
+ @while $i <=$to {
6
+ .#{$type}-#{$color}-#{$i} {
7
+ #{if($type == "text", "color", "background-color")}: hsl($h, $s, $i * 1%);
8
+ }
9
+
10
+ $i: $i + $step;
11
+ }
12
+ }
13
+
14
+ // for primary classes
15
+ @include generate-color-classes(
16
+ "text",
17
+ "primary",
18
+ $primary-hue,
19
+ $primary-saturation,
20
+ 10,
21
+ 90,
22
+ 10
23
+ );
24
+
25
+ @include generate-color-classes(
26
+ "bg",
27
+ "primary",
28
+ $primary-hue,
29
+ $primary-saturation,
30
+ 10,
31
+ 90,
32
+ 10
33
+ );
34
+
35
+ @include generate-color-classes(
36
+ "text",
37
+ "primary",
38
+ $primary-hue,
39
+ $primary-saturation,
40
+ 5,
41
+ 5,
42
+ 1
43
+ );
44
+
45
+ @include generate-color-classes(
46
+ "bg",
47
+ "primary",
48
+ $primary-hue,
49
+ $primary-saturation,
50
+ 5,
51
+ 5,
52
+ 1
53
+ );
54
+
55
+ @include generate-color-classes(
56
+ "text",
57
+ "primary",
58
+ $primary-hue,
59
+ $primary-saturation,
60
+ 93,
61
+ 97,
62
+ 2
63
+ );
64
+
65
+ @include generate-color-classes(
66
+ "bg",
67
+ "primary",
68
+ $primary-hue,
69
+ $primary-saturation,
70
+ 93,
71
+ 97,
72
+ 2
73
+ );
74
+
75
+ // for green classes
76
+ @include generate-color-classes(
77
+ "text",
78
+ "green",
79
+ $green-hue,
80
+ $green-saturation,
81
+ 10,
82
+ 90,
83
+ 10
84
+ );
85
+ @include generate-color-classes(
86
+ "bg",
87
+ "green",
88
+ $green-hue,
89
+ $green-saturation,
90
+ 10,
91
+ 90,
92
+ 10
93
+ );
94
+
95
+ @include generate-color-classes(
96
+ "text",
97
+ "green",
98
+ $green-hue,
99
+ $green-saturation,
100
+ 5,
101
+ 5,
102
+ 1
103
+ );
104
+
105
+ @include generate-color-classes(
106
+ "bg",
107
+ "green",
108
+ $green-hue,
109
+ $green-saturation,
110
+ 5,
111
+ 5,
112
+ 1
113
+ );
114
+
115
+ @include generate-color-classes(
116
+ "text",
117
+ "green",
118
+ $green-hue,
119
+ $green-saturation,
120
+ 93,
121
+ 97,
122
+ 2
123
+ );
124
+
125
+ @include generate-color-classes(
126
+ "bg",
127
+ "green",
128
+ $green-hue,
129
+ $green-saturation,
130
+ 93,
131
+ 97,
132
+ 2
133
+ );
134
+
135
+ // for yellow classes
136
+ @include generate-color-classes(
137
+ "text",
138
+ "yellow",
139
+ $yellow-hue,
140
+ $yellow-saturation,
141
+ 10,
142
+ 90,
143
+ 10
144
+ );
145
+ @include generate-color-classes(
146
+ "bg",
147
+ "yellow",
148
+ $yellow-hue,
149
+ $yellow-saturation,
150
+ 10,
151
+ 90,
152
+ 10
153
+ );
154
+
155
+ @include generate-color-classes(
156
+ "text",
157
+ "yellow",
158
+ $yellow-hue,
159
+ $yellow-saturation,
160
+ 5,
161
+ 5,
162
+ 1
163
+ );
164
+
165
+ @include generate-color-classes(
166
+ "bg",
167
+ "yellow",
168
+ $yellow-hue,
169
+ $yellow-saturation,
170
+ 5,
171
+ 5,
172
+ 1
173
+ );
174
+
175
+ @include generate-color-classes(
176
+ "text",
177
+ "yellow",
178
+ $yellow-hue,
179
+ $yellow-saturation,
180
+ 93,
181
+ 97,
182
+ 2
183
+ );
184
+
185
+ @include generate-color-classes(
186
+ "bg",
187
+ "yellow",
188
+ $yellow-hue,
189
+ $yellow-saturation,
190
+ 93,
191
+ 97,
192
+ 2
193
+ );
194
+
195
+ // for purple classes
196
+ @include generate-color-classes(
197
+ "text",
198
+ "purple",
199
+ $purple-hue,
200
+ $purple-saturation,
201
+ 10,
202
+ 90,
203
+ 10
204
+ );
205
+ @include generate-color-classes(
206
+ "bg",
207
+ "purple",
208
+ $purple-hue,
209
+ $purple-saturation,
210
+ 10,
211
+ 90,
212
+ 10
213
+ );
214
+
215
+ @include generate-color-classes(
216
+ "text",
217
+ "purple",
218
+ $purple-hue,
219
+ $purple-saturation,
220
+ 5,
221
+ 5,
222
+ 1
223
+ );
224
+
225
+ @include generate-color-classes(
226
+ "bg",
227
+ "purple",
228
+ $purple-hue,
229
+ $purple-saturation,
230
+ 5,
231
+ 5,
232
+ 1
233
+ );
234
+
235
+ @include generate-color-classes(
236
+ "text",
237
+ "purple",
238
+ $purple-hue,
239
+ $purple-saturation,
240
+ 93,
241
+ 97,
242
+ 2
243
+ );
244
+
245
+ @include generate-color-classes(
246
+ "bg",
247
+ "purple",
248
+ $purple-hue,
249
+ $purple-saturation,
250
+ 93,
251
+ 97,
252
+ 2
253
+ );
@@ -154,7 +154,7 @@ hr {
154
154
  .is-dark-theme {
155
155
  .toasted-container {
156
156
  i.fa {
157
- color: #ffffff !important;
157
+ color: $white-100 !important;
158
158
  }
159
159
  }
160
160
  }
@@ -486,7 +486,7 @@ $border_color_4: transparent transparent #585d6e transparent;
486
486
  &.is-button-info {
487
487
  .tooltip-inner {
488
488
  background: $white-100;
489
- color: $primary;
489
+ color: $ac-primary;
490
490
  border-radius: 4px;
491
491
  padding: 5px 20px 4px;
492
492
  box-shadow: $ac-shadow-1;
@@ -663,7 +663,7 @@ body:has(.has-info-content) {
663
663
  margin-left: auto;
664
664
  position: fixed;
665
665
  right: 0;
666
- background: #fff;
666
+ background: $white-100;
667
667
  top: 0;
668
668
  z-index: 99999;
669
669
  box-shadow: -3px 2px 10px 3px rgba(0, 0, 0, 0.1);
@@ -675,8 +675,10 @@ body:has(.has-info-content) {
675
675
 
676
676
  .tag:not(body) {
677
677
  &.is-primary {
678
+ background-color: $ac-primary;
679
+ color: $white-100;
678
680
  &.is-light {
679
- color: $primary;
681
+ color: $ac-primary;
680
682
  background-color: $primary-95;
681
683
  }
682
684
  }
@@ -0,0 +1,5 @@
1
+ :root {
2
+ --primary-hue: 208;
3
+ --primary-saturation: 77%;
4
+ --primary-light: 40%;
5
+ }