@appscode/design-system 2.2.45 → 2.2.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.2.45",
3
+ "version": "2.2.47",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,70 +1,79 @@
1
- .ac-accordion-wrapper {
2
- .single-accordion-item {
3
- background-color: $white-100;
4
- padding: 15px 20px;
5
- margin-bottom: 15px;
6
- border-radius: 4px;
7
- border: 1px solid $color-border;
1
+ .single-accordion-item {
2
+ background-color: $white-100;
3
+ padding: 15px 20px;
4
+ margin-bottom: 15px;
5
+ border-radius: 4px;
6
+ border: 1px solid $color-border;
7
+ box-shadow: $ac-shadow-1;
8
8
 
9
- &.open {
10
- .accordion-heading {
11
- margin-bottom: 10px;
12
- }
9
+ &.open {
10
+ .accordion-heading {
11
+ margin-bottom: 10px;
12
+ }
13
+ }
14
+
15
+ &:last-child {
16
+ margin-bottom: 0;
17
+ }
18
+
19
+ .accordion-heading {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ min-height: 34px;
24
+
25
+ h3 {
26
+ cursor: pointer;
13
27
  }
14
28
 
15
- &:last-child {
16
- margin-bottom: 0;
29
+ button {
30
+ font-size: 12px;
31
+ letter-spacing: 0.1px;
17
32
  }
18
33
 
19
- .accordion-heading {
34
+ .icon {
35
+ width: 24px;
36
+ height: 24px;
37
+ border: 1px solid $color-border;
20
38
  display: flex;
39
+ justify-content: center;
21
40
  align-items: center;
22
- justify-content: space-between;
23
-
24
- h3 {
25
- cursor: pointer;
41
+ border-radius: 50%;
42
+ cursor: pointer;
43
+ svg {
44
+ transition: 0.3s ease;
26
45
  }
27
-
28
- button {
29
- font-size: 12px;
30
- letter-spacing: 0.1px;
31
- }
32
-
33
- .icon {
34
- width: 20px;
35
- height: 20px;
36
- border: 1px solid $color-border;
37
- line-height: 20px;
46
+ }
47
+ .accordion-right {
48
+ max-width: 50%;
49
+ .accordion-description {
38
50
  display: flex;
39
- justify-content: center;
40
- align-items: center;
41
- font-size: 10px;
42
- border-radius: 50%;
43
- cursor: pointer;
51
+ max-width: calc(100% - 32px);
44
52
  }
45
53
  }
54
+ }
46
55
 
47
- .accordion-body {
48
- max-height: 0;
49
- overflow: hidden;
56
+ .accordion-body {
57
+ max-height: 0;
58
+ overflow: hidden;
59
+ // transition: max-height 0.3s ease-in-out;
50
60
 
51
- p {
52
- font-size: 13px;
53
- color: $color-text;
54
- line-height: 1.6;
55
- }
61
+ p {
62
+ font-size: 13px;
63
+ color: $color-text;
64
+ line-height: 1.6;
56
65
  }
57
66
  }
58
67
  }
59
68
 
60
- .overview-body {
61
- .ac-accordion-wrapper {
62
- &.is-marginless {
63
- .single-accordion-item {
64
- .accordion-heading {
65
- padding-bottom: 0;
66
- }
67
- }
68
- }
69
- }
70
- }
69
+ // .overview-body {
70
+ // .ac-accordion-wrapper {
71
+ // &.is-marginless {
72
+ // .single-accordion-item {
73
+ // .accordion-heading {
74
+ // padding-bottom: 0;
75
+ // }
76
+ // }
77
+ // }
78
+ // }
79
+ // }
@@ -1,37 +1,39 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from "vue";
3
3
 
4
- interface Props {
5
- modifierClasses?: string;
6
- }
7
-
8
- withDefaults(defineProps<Props>(), {
9
- modifierClasses: "",
10
- });
11
-
12
4
  const isActive = ref(true);
13
5
  </script>
14
6
 
15
7
  <template>
16
- <!--use "is-marginless" class for remove margin -->
17
- <div class="ac-accordion-wrapper" :class="modifierClasses">
18
- <!-- single accordion item start -->
19
- <div class="single-accordion-item closed">
20
- <!-- accordion heading start -->
21
- <div class="accordion-heading">
22
- <h6 class="is-small">Hello Accordion title</h6>
23
- <button class="icon" @click="isActive = !isActive">
24
- <i class="fa fa-plus" aria-hidden="true"></i>
8
+ <div class="single-accordion-item closed">
9
+ <div class="accordion-heading is-clickable" @click="isActive = !isActive">
10
+ <slot name="title" />
11
+ <div class="accordion-right is-flex is-align-items-center gap-8">
12
+ <div
13
+ v-show="!isActive"
14
+ class="accordion-description is-justify-content-flex-end has-text-right is-flex-direction-column"
15
+ >
16
+ <slot name="description" />
17
+ </div>
18
+ <button class="icon">
19
+ <svg
20
+ :style="{ transform: isActive ? 'rotate(-180deg)' : 'rotate(0deg)' }"
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ fill="none"
23
+ viewBox="0 0 24 24"
24
+ stroke-width="1.5"
25
+ stroke="currentColor"
26
+ class="size-6"
27
+ >
28
+ <path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
29
+ </svg>
25
30
  </button>
26
31
  </div>
27
- <!-- accordion heading end -->
28
- <!-- accordion body start -->
29
- <div class="accordion-body" :style="{ 'max-height': isActive ? '100%' : 0 }">
30
- <slot />
31
- </div>
32
- <!-- accordion body end -->
33
32
  </div>
34
- <!-- single accordion item end -->
33
+
34
+ <div class="accordion-body" :style="{ 'max-height': isActive ? '100%' : 0 }">
35
+ <slot />
36
+ </div>
35
37
  </div>
36
38
  </template>
37
39
  <style lang="scss" scoped>
@@ -23,7 +23,7 @@ withDefaults(defineProps<Props>(), {
23
23
  <header-items>
24
24
  <header-item>
25
25
  <transition name="fade" mode="out-in" appear>
26
- <h4 :key="title">{{ title }}</h4>
26
+ <h4 :key="title">{{ title }} <slot name="controls-metadata" /></h4>
27
27
  </transition>
28
28
  </header-item>
29
29
  <slot name="header-left-controls" />