@appscode/design-system 2.4.4 → 2.4.6

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/main.scss CHANGED
@@ -4,9 +4,6 @@
4
4
 
5
5
  // Third party CSS
6
6
  @import "../node_modules/bulma/bulma.sass";
7
- @import "bulma-checkradio";
8
- @import "bulma-switch";
9
- @import "bulma-tooltip";
10
7
  @import "font-awesome/css/font-awesome.min.css";
11
8
  @import "vue-multiselect/dist/vue-multiselect.css";
12
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,3 +1,4 @@
1
+ // for spin
1
2
  .is-spin {
2
3
  animation: spin 1000ms linear infinite;
3
4
  }
@@ -9,3 +10,19 @@
9
10
  transform: rotate(360deg);
10
11
  }
11
12
  }
13
+
14
+ // for shake
15
+ .shake {
16
+ animation: shake 150ms 4 linear;
17
+ }
18
+ @keyframes shake {
19
+ 0% {
20
+ transform: translate(3px, 0);
21
+ }
22
+ 50% {
23
+ transform: translate(-3px, 0);
24
+ }
25
+ 100% {
26
+ transform: translate(0, 0);
27
+ }
28
+ }
@@ -418,93 +418,6 @@ button {
418
418
  animation-iteration-count: 20;
419
419
  }
420
420
 
421
- // Customize tooltip start
422
- $background_color_1: #585d6e;
423
- $border_color_1: #585d6e transparent transparent transparent;
424
- $border_color_2: transparent #585d6e transparent transparent;
425
- $border_color_3: transparent transparent transparent #585d6e;
426
- $border_color_4: transparent transparent #585d6e transparent;
427
-
428
- [data-tooltip] {
429
- &:not(.is-loading) {
430
- &::after {
431
- border-color: $border_color_1;
432
- }
433
-
434
- &::before {
435
- background-color: $background_color_1;
436
- font-size: 12px;
437
- font-weight: 500;
438
- }
439
- }
440
-
441
- &:not(.is-disabled) {
442
- &::after {
443
- border-color: $border_color_1;
444
- }
445
- }
446
-
447
- &:not([disabled]) {
448
- &::after {
449
- border-color: $border_color_1;
450
- }
451
- }
452
-
453
- &:not(.is-loading).has-tooltip-right {
454
- &::after {
455
- border-color: $border_color_2;
456
- }
457
- }
458
-
459
- &:not(.is-disabled).has-tooltip-right {
460
- &::after {
461
- border-color: $border_color_2;
462
- }
463
- }
464
-
465
- &:not([disabled]).has-tooltip-right {
466
- &::after {
467
- border-color: $border_color_2;
468
- }
469
- }
470
-
471
- &:not(.is-loading).has-tooltip-left {
472
- &::after {
473
- border-color: $border_color_3;
474
- }
475
- }
476
-
477
- &:not(.is-disabled).has-tooltip-left {
478
- &::after {
479
- border-color: $border_color_3;
480
- }
481
- }
482
-
483
- &:not([disabled]).has-tooltip-left {
484
- &::after {
485
- border-color: $border_color_3;
486
- }
487
- }
488
-
489
- &:not(.is-loading).has-tooltip-bottom {
490
- &::after {
491
- border-color: $border_color_4;
492
- }
493
- }
494
-
495
- &:not(.is-disabled).has-tooltip-bottom {
496
- &::after {
497
- border-color: $border_color_4;
498
- }
499
- }
500
-
501
- &:not([disabled]).has-tooltip-bottom {
502
- &::after {
503
- border-color: $border_color_4;
504
- }
505
- }
506
- }
507
-
508
421
  // tooltip in vue-open-api
509
422
  .tooltip {
510
423
  display: block !important;
@@ -1,3 +1,4 @@
1
+ // Old Third party dependency modification | Remove it, when 2024 AppsCode Custom Checkbox, Radio, Switch used everywhere
1
2
  .is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label::before,
2
3
  .is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label:before,
3
4
  .is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label::after,
@@ -98,6 +99,11 @@
98
99
  transition: all 0.2s ease;
99
100
  }
100
101
  }
102
+ &:hover {
103
+ .checkmark {
104
+ border: 1px solid $ac-primary;
105
+ }
106
+ }
101
107
  }
102
108
 
103
109
  // radio button
@@ -131,6 +137,7 @@
131
137
  border: 1px solid $color-border-dark;
132
138
  border-radius: 50%; // Full circle
133
139
  background: #fff;
140
+ transition: 0.2s ease-in-out;
134
141
  }
135
142
 
136
143
  // Inner dot for selected radio button
@@ -156,6 +163,16 @@
156
163
  opacity: 1;
157
164
  transform: scale(1);
158
165
  }
166
+ [type="radio"]:checked + label::before {
167
+ border: 1px solid $ac-primary;
168
+ }
169
+ &:hover {
170
+ [type="radio"] + label {
171
+ &::before {
172
+ border: 1px solid $ac-primary;
173
+ }
174
+ }
175
+ }
159
176
  }
160
177
 
161
178
  .ac-switch {
@@ -208,7 +225,7 @@
208
225
  }
209
226
 
210
227
  input:checked + .slider {
211
- background-color: hsl(var(--primary-hue), var(--primary-saturation), var(--primary-light));
228
+ background-color: $ac-primary;
212
229
  }
213
230
 
214
231
  input:checked + .slider:before {
@@ -216,7 +233,7 @@
216
233
  }
217
234
 
218
235
  input:focus-visible + .slider {
219
- box-shadow: 0 0 3px hsl(var(--primary-hue), var(--primary-saturation), var(--primary-light));
236
+ box-shadow: 0 0 3px $ac-primary;
220
237
  }
221
238
  }
222
239
  }
@@ -19,18 +19,14 @@ const model = defineModel({ type: Array });
19
19
  </script>
20
20
 
21
21
  <template>
22
- <div v-for="option in options" :key="name + option.label" class="field">
23
- <input
24
- class="is-checkradio has-background-color"
25
- :class="modifierClasses"
26
- :id="name + option.label"
27
- :value="option.value"
28
- type="checkbox"
29
- v-model="model"
30
- />
31
- <label :for="name + option.label">{{ option.label }}</label>
22
+ <div v-for="option in options" :key="name + option.label" class="mb-8">
23
+ <label class="ac-checkbox" :for="name + option.label">
24
+ <input :class="modifierClasses" :id="name + option.label" :value="option.value" type="checkbox" v-model="model" />
25
+ <span class="checkmark"></span>
26
+ <span>{{ option.label }}</span>
27
+ </label>
32
28
  </div>
33
- <p v-show="errorMsg" class="is-danger">
29
+ <p v-show="errorMsg" class="is-danger mb-16">
34
30
  {{ errorMsg }}
35
31
  </p>
36
32
  </template>
@@ -18,10 +18,9 @@ const model = defineModel();
18
18
  </script>
19
19
 
20
20
  <template>
21
- <div v-for="option in options" :key="name + option.label" class="field">
21
+ <div class="ac-radio" v-for="option in options" :key="name + option.label">
22
22
  <input
23
23
  v-model="model"
24
- class="is-checkradio"
25
24
  :class="modifierClasses"
26
25
  :id="name + option.label"
27
26
  type="radio"
@@ -34,7 +33,7 @@ const model = defineModel();
34
33
  <slot name="message" />
35
34
  </p>
36
35
  </div>
37
- <p v-show="errorMsg" class="is-danger">
36
+ <p v-show="errorMsg" class="is-danger mb-16">
38
37
  {{ errorMsg }}
39
38
  </p>
40
39
  </template>
@@ -18,17 +18,21 @@ const model = defineModel({ type: Boolean });
18
18
  </script>
19
19
 
20
20
  <template>
21
- <div class="field">
22
- <input
23
- v-model="model"
24
- :id="name"
25
- type="checkbox"
26
- :name="name"
27
- class="switch is-rounded is-primary"
28
- :class="modifierClasses"
29
- :data-testid="dataTestId"
30
- />
21
+ <div class="ac-switch is-flex is-align-items-center gap-8">
31
22
  <label :for="name">{{ label }}</label>
23
+ <label class="switch">
24
+ <input
25
+ v-model="model"
26
+ :id="name"
27
+ type="checkbox"
28
+ :name="name"
29
+ class="switch is-rounded is-primary"
30
+ :class="modifierClasses"
31
+ :data-testid="dataTestId"
32
+ />
33
+ <span class="slider round"></span>
34
+ </label>
35
+
32
36
  <p v-show="errorMsg" class="is-danger">
33
37
  {{ errorMsg }}
34
38
  </p>