@appscode/design-system 2.6.22-alpha-0.0.17 → 2.6.22-alpha-0.0.19

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.6.22-alpha-0.0.17",
3
+ "version": "2.6.22-alpha-0.0.19",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -67,6 +67,12 @@
67
67
  }
68
68
  }
69
69
 
70
+ &.is-extra-large {
71
+ .ac-modal-inner {
72
+ width: calc(100vw - 200px);
73
+ }
74
+ }
75
+
70
76
  .ac-modal-inner {
71
77
  margin: 0 auto;
72
78
  background-color: $white-100;
@@ -40,13 +40,19 @@
40
40
  margin-left: -20px;
41
41
  border-bottom: 1px solid $color-border;
42
42
 
43
- &.is-unread {
44
- background-color: $secondary-light-gray;
43
+ &.is-read {
44
+ h6 {
45
+ font-weight: 400 !important;
46
+ }
47
+ h6,
48
+ p,
49
+ button,
50
+ span {
51
+ color: $slate-40;
52
+ }
45
53
  }
46
54
  &.is-active {
47
55
  background-color: $primary-light-gray;
48
- border-top: 1px solid $ac-primary;
49
- border-bottom: 1px solid $ac-primary;
50
56
 
51
57
  h6 {
52
58
  color: $ac-primary;
@@ -61,6 +67,7 @@
61
67
  }
62
68
  .time {
63
69
  font-size: 11px;
70
+ text-transform: capitalize;
64
71
  }
65
72
  .ac-checkbox {
66
73
  margin-top: 4px;
@@ -70,6 +77,9 @@
70
77
  .message-details {
71
78
  max-width: 768px;
72
79
  margin: 0;
80
+ .table.ac-table {
81
+ background-color: #fff;
82
+ }
73
83
  @include until-widescreen {
74
84
  margin: 0;
75
85
  }
@@ -135,7 +145,7 @@ body:has(.message-details) {
135
145
  &.is-open {
136
146
  // background-color: $primary-light-gray;
137
147
  padding: 16px;
138
- border: 2px solid $ac-primary;
148
+ background-color: #f1f1f1;
139
149
  border-radius: 8px;
140
150
  margin: 8px;
141
151
  }
@@ -143,6 +153,8 @@ body:has(.message-details) {
143
153
  max-width: 100%;
144
154
  font-size: 1rem;
145
155
  max-height: 300px;
156
+ padding: 4px;
157
+ border-radius: 4px;
146
158
  }
147
159
  }
148
160
 
@@ -16,11 +16,5 @@ const handleInput = (e: Event) => {
16
16
  </script>
17
17
 
18
18
  <template>
19
- <input
20
- class="ac-input"
21
- data-testid="ac-input"
22
- :class="{ 'width-200': modelValue }"
23
- :value="modelValue"
24
- @input="handleInput"
25
- />
19
+ <input class="ac-input" data-testid="ac-input" :value="modelValue" @input="handleInput" />
26
20
  </template>
@@ -0,0 +1,47 @@
1
+ <script setup lang="ts">
2
+ import { ref, watch } from "vue";
3
+ import HeroiconsChevronDown20Solid from "~icons/heroicons/chevron-down-20-solid";
4
+
5
+ interface Props {
6
+ title: string;
7
+ isOpen?: boolean;
8
+ hasIcon?: boolean
9
+ }
10
+
11
+ const props = withDefaults(defineProps<Props>(), {
12
+ isOpen: false,
13
+ hasIcon: false
14
+ });
15
+
16
+ const dropDownStatus = ref<"close" | "open">("close");
17
+
18
+ const toggleDropDownStatus = () => {
19
+ if (dropDownStatus.value === "open") dropDownStatus.value = "close";
20
+ else dropDownStatus.value = "open";
21
+ };
22
+
23
+ watch(
24
+ () => props.isOpen,
25
+ (n) => {
26
+ if (n) {
27
+ dropDownStatus.value = "open";
28
+ }
29
+ },
30
+ { immediate: true },
31
+ );
32
+ </script>
33
+
34
+ <template>
35
+ <div
36
+ class="label pt-10 pb-10 pl-16 pr-16 b-b-1 is-flex is-align-items-center is-justify-content-space-between is-fullwidth is-clickable"
37
+ @click="toggleDropDownStatus">
38
+ <div class="is-flex gap-8">
39
+ <span v-if="hasIcon" class="icon">
40
+ <slot name="drop-down-icon" />
41
+ </span>{{ title }}
42
+ </div>
43
+ <HeroiconsChevronDown20Solid
44
+ :style="{ transform: dropDownStatus === 'open' ? 'rotate(180deg)' : 'none', transition: '0.2s' }" />
45
+ </div>
46
+ <slot v-if="dropDownStatus === 'open'" name="drop-down-items" />
47
+ </template>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ title: string;
4
+ id: string;
5
+ url?: string;
6
+ isActive?: boolean;
7
+ }
8
+
9
+ withDefaults(defineProps<Props>(), {
10
+ isActive: false,
11
+ url: "",
12
+ });
13
+ </script>
14
+
15
+ <template>
16
+ <router-link :to="url" class="sidebar-item" :class="{ 'is-active': isActive }">
17
+ <span class="icon">
18
+ <slot name="item-icon" />
19
+ </span>
20
+ <span>{{ title }}</span>
21
+ </router-link>
22
+ </template>
@@ -1,93 +1,10 @@
1
- <script setup lang="ts">
2
- import { nextTick, watch, ref, computed } from "vue";
3
- import { useRoute } from "vue-router";
4
- import CogIcon from "../../icons/CogIcon.vue";
5
-
6
- interface SidebarEntry {
7
- id: string;
8
- name: string;
9
- icon?: any;
10
- url: string;
11
- }
12
-
13
- interface SidebarSection {
14
- id: string;
15
- name: string;
16
- icon?: any;
17
- entries: SidebarEntry[];
18
- }
19
-
20
- interface Props {
21
- items: SidebarSection[];
22
- isActive: boolean;
23
- }
24
-
25
- // Props
26
- const props = withDefaults(defineProps<Props>(), {
27
- items: () => [],
28
- isActive: false
29
- });
30
-
31
- const sidebarItem = ref<HTMLElement | null>(null);
32
-
33
- const route = useRoute();
34
-
35
- const updatedItems = computed(() => {
36
- return props.items.map((section) => {
37
- const updatedEntries = section.entries.map((entry) => ({
38
- ...entry,
39
- isActive: route.path === entry.url,
40
- }));
41
- return { ...section, entries: updatedEntries };
42
- });
43
- });
44
-
45
- // Scroll active item into view
46
- watch(
47
- () => props.isActive,
48
- (n) => {
49
- if (n) {
50
- nextTick(() => {
51
- setTimeout(() => {
52
- const top = (sidebarItem.value && sidebarItem.value.getBoundingClientRect().top) || 0;
53
- if (top > window.innerHeight - 200) {
54
- sidebarItem.value?.scrollIntoView({
55
- behavior: "smooth",
56
- block: "center",
57
- });
58
- }
59
- }, 300);
60
- });
61
- }
62
- },
63
- { immediate: true },
64
- );
65
- </script>
1
+ <script setup lang="ts"></script>
66
2
 
67
3
  <template>
68
4
  <div class="sidebar-style-2">
69
5
  <div class="left-sidebar">
70
- <div class="sidebar-items" v-for="(section, sIdx) in updatedItems" :key="section.id">
71
- <label class="label">{{ section.name }}</label>
72
-
73
- <slot
74
- name="sidebar-item"
75
- v-for="(entry, iIdx) in section.entries"
76
- :key="entry.id"
77
- :item="entry"
78
- >
79
- <router-link
80
- :to="entry.url"
81
- class="sidebar-item"
82
- :class="{ 'is-active': entry.isActive }"
83
- :ref="entry.isActive ? sidebarItem : null"
84
- >
85
- <span class="icon">
86
- <img :src="entry.icon || CogIcon" alt="icon" />
87
- </span>
88
- <span>{{ entry.name }}</span>
89
- </router-link>
90
- </slot>
6
+ <div class="sidebar-items">
7
+ <slot name="items-with-drop-down" />
91
8
  </div>
92
9
  </div>
93
10
  </div>