@appscode/design-system 2.2.49 → 2.2.50

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.49",
3
+ "version": "2.2.50",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,16 +1,7 @@
1
1
  .single-accordion-item {
2
2
  background-color: $white-100;
3
- padding: 15px 20px;
4
3
  margin-bottom: 15px;
5
4
  border-radius: 4px;
6
- border: 1px solid $color-border;
7
- box-shadow: $ac-shadow-1;
8
-
9
- &.open {
10
- .accordion-heading {
11
- margin-bottom: 10px;
12
- }
13
- }
14
5
 
15
6
  &:last-child {
16
7
  margin-bottom: 0;
@@ -20,7 +11,10 @@
20
11
  display: flex;
21
12
  align-items: center;
22
13
  justify-content: space-between;
23
- min-height: 34px;
14
+ min-height: 50px;
15
+ background-color: $secondary-light-gray;
16
+ padding: 8px 16px;
17
+ border-radius: 4px;
24
18
 
25
19
  h3 {
26
20
  cursor: pointer;
@@ -54,6 +48,7 @@
54
48
  }
55
49
 
56
50
  .accordion-body {
51
+ padding-top: 8px;
57
52
  max-height: 0;
58
53
  overflow: hidden;
59
54
  // transition: max-height 0.3s ease-in-out;
@@ -1,41 +1,35 @@
1
1
  <script setup lang="ts">
2
- import { ref } from "vue";
3
2
 
4
- const isActive = ref(true);
3
+ withDefaults(defineProps<{ isActive: boolean, bodyInside: boolean }>(), {
4
+ isActive: false,
5
+ bodyInside: false
6
+ })
7
+
5
8
  </script>
6
9
 
7
10
  <template>
8
- <div class="single-accordion-item closed">
9
- <div class="accordion-heading is-clickable" @click="isActive = !isActive">
11
+ <div class="single-accordion-item">
12
+ <div class="accordion-heading is-clickable">
10
13
  <slot name="title" />
11
14
  <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
- >
15
+ <div v-show="!isActive"
16
+ class="accordion-description is-justify-content-flex-end has-text-right is-flex-direction-column">
16
17
  <slot name="description" />
17
18
  </div>
18
19
  <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
- >
20
+ <svg :style="{ transform: isActive ? 'rotate(-180deg)' : 'rotate(0deg)' }" xmlns="http://www.w3.org/2000/svg"
21
+ fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
28
22
  <path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" />
29
23
  </svg>
30
24
  </button>
31
25
  </div>
32
26
  </div>
33
27
 
34
- <div class="accordion-body" :style="{ 'max-height': isActive ? '100%' : 0 }">
35
- <slot />
28
+ <div v-if="bodyInside" class="accordion-body" :style="{ 'max-height': isActive ? '100%' : 0 }">
29
+ <slot name="body" />
36
30
  </div>
37
31
  </div>
38
32
  </template>
39
33
  <style lang="scss" scoped>
40
34
  @import "../../../vue-components/styles/components/accordion";
41
- </style>
35
+ </style>