@appscode/design-system 1.1.0-beta.9 → 1.1.0-beta.91

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 (117) hide show
  1. package/base/utilities/_all.scss +2 -2
  2. package/base/utilities/_colors.scss +105 -136
  3. package/base/utilities/_global.scss +25 -20
  4. package/base/utilities/_layouts.scss +0 -138
  5. package/base/utilities/_typography.scss +2 -2
  6. package/components/_ac-alert-box.scss +2 -2
  7. package/components/_ac-code-highlight.scss +9 -12
  8. package/components/_ac-drag.scss +4 -4
  9. package/components/_ac-modal.scss +2 -2
  10. package/components/_ac-select-box.scss +5 -5
  11. package/components/_ac-table.scss +7 -7
  12. package/components/_ac-tabs.scss +29 -26
  13. package/components/_all.scss +8 -5
  14. package/components/_buttons.scss +10 -10
  15. package/components/_getkeeper.scss +110 -0
  16. package/components/_graph.scss +10 -10
  17. package/components/_image-upload.scss +4 -4
  18. package/components/_input-card.scss +232 -0
  19. package/components/_input.scss +573 -0
  20. package/components/_left-sidebar-menu.scss +9 -13
  21. package/components/_monaco-editor.scss +2 -2
  22. package/components/_multi-select.scss +589 -0
  23. package/components/_navbar.scss +7 -7
  24. package/components/_nested-list.scss +2 -2
  25. package/components/_overview-info.scss +3 -3
  26. package/components/_pricing-table.scss +5 -5
  27. package/components/_progress-bar.scss +61 -74
  28. package/components/_subscription-card.scss +8 -10
  29. package/components/_table-of-content.scss +4 -4
  30. package/components/{_ac-terminal.scss → _terminal.scss} +63 -74
  31. package/components/_widget-menu.scss +7 -12
  32. package/components/_wizard.scss +13 -286
  33. package/components/ac-toaster/_ac-toasted.scss +4 -4
  34. package/components/bbum/_information-center.scss +8 -10
  35. package/components/bbum/_mobile-desktop.scss +9 -14
  36. package/components/bbum/_single-post-preview.scss +9 -9
  37. package/components/ui-builder/_ui-builder.scss +202 -18
  38. package/components/ui-builder/_vue-open-api.scss +63 -18
  39. package/icons/close-icon.svg +3 -0
  40. package/layouts/_code-preview.scss +6 -7
  41. package/package.json +1 -1
  42. package/vue-components/types/notification.ts +3 -3
  43. package/vue-components/types/table.ts +1 -0
  44. package/vue-components/v2/banner/Banner.vue +1 -1
  45. package/vue-components/v2/button/Buttons.vue +1 -1
  46. package/vue-components/v2/modal/Modal.vue +1 -1
  47. package/vue-components/v3/alert/Alert.vue +2 -2
  48. package/vue-components/v3/banner/Banner.vue +2 -2
  49. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +66 -4
  50. package/vue-components/v3/button/Button.vue +49 -786
  51. package/vue-components/v3/button/Buttons.vue +18 -2
  52. package/vue-components/v3/cards/Cluster.vue +37 -26
  53. package/vue-components/v3/cards/FeatureCard.vue +7 -11
  54. package/vue-components/v3/cards/FeatureCards.vue +1 -1
  55. package/vue-components/v3/cards/InfoCard.vue +1 -2
  56. package/vue-components/v3/cards/Monitoring.vue +6 -10
  57. package/vue-components/v3/cards/OverviewCard.vue +4 -0
  58. package/vue-components/v3/cards/OverviewCards.vue +10 -2
  59. package/vue-components/v3/cards/Vendor.vue +10 -6
  60. package/vue-components/v3/content/ContentHeader.vue +1 -1
  61. package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
  62. package/vue-components/v3/editor/Editor.vue +20 -5
  63. package/vue-components/v3/editor/FilteredFileEditor.vue +9 -2
  64. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +4 -1
  65. package/vue-components/v3/footer/FooterArea.vue +8 -2
  66. package/vue-components/v3/footer/Info.vue +10 -8
  67. package/vue-components/v3/footer/Status.vue +24 -23
  68. package/vue-components/v3/footer/Usage.vue +20 -30
  69. package/vue-components/v3/form/Form.vue +0 -3
  70. package/vue-components/v3/form/FormFooter.vue +24 -0
  71. package/vue-components/v3/form-fields/AcSingleInput.vue +1 -508
  72. package/vue-components/v3/form-fields/FileUpload.vue +89 -0
  73. package/vue-components/v3/form-fields/Input.vue +2 -3
  74. package/vue-components/v3/header/Header.vue +1 -1
  75. package/vue-components/v3/loaders/InfoCardLoader.vue +18 -60
  76. package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
  77. package/vue-components/v3/modal/Modal.vue +12 -14
  78. package/vue-components/v3/modals/JsonShowModal.vue +1 -0
  79. package/vue-components/v3/navbar/Appdrawer.vue +3 -1
  80. package/vue-components/v3/navbar/Navbar.vue +0 -159
  81. package/vue-components/v3/navbar/NavbarItem.vue +37 -15
  82. package/vue-components/v3/navbar/NavbarItemContent.vue +6 -8
  83. package/vue-components/v3/navbar/Notification.vue +38 -10
  84. package/vue-components/v3/navbar/User.vue +43 -31
  85. package/vue-components/v3/notification/AlertBox.vue +233 -3
  86. package/vue-components/v3/notification/Notification.vue +2 -2
  87. package/vue-components/v3/option-dots/Options.vue +17 -8
  88. package/vue-components/v3/pagination/Pagination.vue +27 -17
  89. package/vue-components/v3/preloader/Preloader.vue +1 -1
  90. package/vue-components/v3/searchbars/SearchBar.vue +1 -10
  91. package/vue-components/v3/sidebar/ClusterSwitcher.vue +1 -765
  92. package/vue-components/v3/sidebar/Sidebar.vue +2 -30
  93. package/vue-components/v3/sidebar/SidebarBody.vue +9 -2
  94. package/vue-components/v3/sidebar/SidebarFooter.vue +6 -3
  95. package/vue-components/v3/sidebar/SidebarHeader.vue +6 -2
  96. package/vue-components/v3/sidebar/Steps.vue +2 -2
  97. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +78 -2
  98. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +15 -3
  99. package/vue-components/v3/tab/Tabs.vue +27 -0
  100. package/vue-components/v3/table/Table.vue +14 -16
  101. package/vue-components/v3/table/TableCell.vue +1 -9
  102. package/vue-components/v3/table/TableRow.vue +2 -2
  103. package/vue-components/v3/table/table-cell/ArrayCell.vue +35 -32
  104. package/vue-components/v3/table/table-cell/CellValue.vue +14 -40
  105. package/vue-components/v3/table/table-cell/ObjectCell.vue +40 -38
  106. package/vue-components/v3/tag/Tag.vue +1 -0
  107. package/base/utilities/dark-theme.scss +0 -26
  108. package/components/_ac-card.scss +0 -0
  109. package/components/_ac-input.scss +0 -901
  110. package/components/_ac-multi-select.scss +0 -780
  111. package/vue-components/text.vue +0 -1
  112. package/vue-components/types/longRunningTasks.ts +0 -20
  113. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -94
  114. package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -402
  115. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -151
  116. /package/components/{_ac-accordion.scss → _accordion.scss} +0 -0
  117. /package/components/{_ac-report.scss → _report.scss} +0 -0
@@ -1,65 +1,23 @@
1
- <script setup lang="ts">
1
+ <script>
2
2
  import { ContentLoader } from "vue-content-loader";
3
+
4
+ export default {
5
+ components: { ContentLoader },
6
+ };
3
7
  </script>
4
8
 
5
9
  <template>
6
- <div>
7
- <svg
8
- role="img"
9
- width="230"
10
- height="115"
11
- aria-labelledby="loading-aria"
12
- viewBox="0 0 230 115"
13
- preserveAspectRatio="none"
14
- >
15
- <title id="loading-aria">Loading...</title>
16
- <rect
17
- x="0"
18
- y="0"
19
- width="100%"
20
- height="100%"
21
- clip-path="url(#clip-path)"
22
- style="fill: url('#fill')"
23
- ></rect>
24
- <defs>
25
- <clipPath id="clip-path">
26
- <rect x="150" y="40" rx="3" ry="3" width="60" height="50" />
27
- <rect x="10" y="70" rx="3" ry="3" width="120" height="11" />
28
- <rect x="10" y="100" rx="3" ry="3" width="120" height="11" />
29
- <rect x="150" y="100" rx="3" ry="3" width="60" height="11" />
30
- <rect x="10" y="1" rx="3" ry="3" width="200" height="22" />
31
- <rect x="10" y="40" rx="3" ry="3" width="120" height="11" />
32
- </clipPath>
33
- <linearGradient id="fill">
34
- <stop offset="0.599964" stop-color="#cfcfcf" stop-opacity="1">
35
- <animate
36
- attributeName="offset"
37
- values="-2; -2; 1"
38
- keyTimes="0; 0.25; 1"
39
- dur="2s"
40
- repeatCount="indefinite"
41
- ></animate>
42
- </stop>
43
- <stop offset="1.59996" stop-color="#ecebeb" stop-opacity="1">
44
- <animate
45
- attributeName="offset"
46
- values="-1; -1; 2"
47
- keyTimes="0; 0.25; 1"
48
- dur="2s"
49
- repeatCount="indefinite"
50
- ></animate>
51
- </stop>
52
- <stop offset="2.59996" stop-color="#cfcfcf" stop-opacity="1">
53
- <animate
54
- attributeName="offset"
55
- values="0; 0; 3"
56
- keyTimes="0; 0.25; 1"
57
- dur="2s"
58
- repeatCount="indefinite"
59
- ></animate>
60
- </stop>
61
- </linearGradient>
62
- </defs>
63
- </svg>
64
- </div>
10
+ <content-loader
11
+ viewBox="0 0 230 115"
12
+ :speed="2"
13
+ primaryColor="#f5f5f5"
14
+ secondaryColor="#ecebeb"
15
+ >
16
+ <rect x="0" y="0" rx="0" ry="0" />
17
+ <rect x="10" y="70" rx="3" ry="3" width="120" height="11" />
18
+ <rect x="10" y="100" rx="3" ry="3" width="120" height="11" />
19
+ <rect x="150" y="100" rx="3" ry="3" width="60" height="11" />
20
+ <rect x="10" y="1" rx="3" ry="3" width="216" height="22" />
21
+ <rect x="10" y="40" rx="3" ry="3" width="120" height="11" />
22
+ </content-loader>
65
23
  </template>
@@ -0,0 +1,24 @@
1
+ <script>
2
+ import { ContentLoader } from "vue-content-loader";
3
+
4
+ export default {
5
+ components: { ContentLoader },
6
+ };
7
+ </script>
8
+
9
+ <template>
10
+ <content-loader
11
+ viewBox="0 0 1540 90"
12
+ :speed="2"
13
+ primaryColor="#f5f5f5"
14
+ secondaryColor="#ecebeb"
15
+ >
16
+ <rect x="0" y="0" rx="0" ry="0" />
17
+ <circle cx="47" cy="52" r="21" />
18
+ <rect x="86" y="64" rx="0" ry="0" width="95" height="11" />
19
+ <rect x="86" y="29" rx="0" ry="0" width="146" height="22" />
20
+ <rect x="1240" y="57" rx="0" ry="0" width="64" height="12" />
21
+ <rect x="1340" y="57" rx="0" ry="0" width="64" height="12" />
22
+ <rect x="1440" y="56" rx="0" ry="0" width="64" height="12" />
23
+ </content-loader>
24
+ </template>
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { defineAsyncComponent, ref, watch } from "vue";
3
+ import { onClickOutside } from "@vueuse/core";
3
4
 
4
5
  interface Props {
5
6
  open?: boolean;
@@ -31,19 +32,15 @@ const Buttons = defineAsyncComponent(() => import("./../button/Buttons.vue"));
31
32
  const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
32
33
 
33
34
  //TODO: need to update not a currect way to import the file
34
- const modalCloseIcon = import.meta.glob(
35
- "/src/assets/icons/modal/close-icon.svg",
36
- { eager: true }
37
- );
35
+ const modalCloseIcon = import.meta.glob("../../../icons/close-icon.svg", {
36
+ eager: true,
37
+ });
38
38
 
39
+ const modal = ref();
39
40
  const showModal = ref(false);
40
41
  const crossIcon = ref(
41
- (
42
- modalCloseIcon["/src/assets/icons/modal/close-icon.svg"] as Record<
43
- string,
44
- unknown
45
- >
46
- ).default as string
42
+ (modalCloseIcon["../../../icons/close-icon.svg"] as Record<string, unknown>)
43
+ ?.default as string
47
44
  );
48
45
 
49
46
  const onKeyDown = (e: KeyboardEvent) => {
@@ -63,6 +60,8 @@ const onModalOutsideClick = () => {
63
60
  destroyModal();
64
61
  };
65
62
 
63
+ onClickOutside(modal, onModalOutsideClick);
64
+
66
65
  const destroyModal = () => {
67
66
  if (props.isCloseOptionDisabled) return;
68
67
  showModal.value = false;
@@ -92,18 +91,17 @@ watch(
92
91
  v-if="showModal"
93
92
  class="ac-modal is-middle-alignment"
94
93
  :class="modifierClasses"
95
- @click.self="onModalOutsideClick"
96
94
  >
97
- <div class="ac-modal-inner">
95
+ <div ref="modal" class="ac-modal-inner">
98
96
  <!-- modal header start -->
99
97
  <div class="ac-modal-header">
100
- <h6>{{ title }}</h6>
98
+ <h5>{{ title }}</h5>
101
99
  <header-items>
102
100
  <slot name="modal-header-controls" />
103
101
  <header-item>
104
102
  <ac-button
103
+ v-if="!isCloseOptionDisabled"
105
104
  modifier-classes="is-square is-transparent"
106
- :disabled="isCloseOptionDisabled"
107
105
  :icon-image="crossIcon"
108
106
  @click.stop="destroyModal"
109
107
  data-testid="modal-generic-close-icon"
@@ -85,6 +85,7 @@ const closeModal = () => {
85
85
  :read-only="true"
86
86
  language="json"
87
87
  :show-minimap="false"
88
+ word-wrap="on"
88
89
  />
89
90
  </modal>
90
91
  </template>
@@ -63,7 +63,7 @@ const NavbarItemContent = defineAsyncComponent(
63
63
  </template>
64
64
  <template #navbar-content>
65
65
  <navbar-item-content class="navbar-dropdown-wrapper" style="right: -30px">
66
- <ul>
66
+ <ul class="ac-scrollbar p-0">
67
67
  <li v-for="app in apps" :key="app.url">
68
68
  <a :href="app.url">
69
69
  <article class="media">
@@ -103,6 +103,8 @@ const NavbarItemContent = defineAsyncComponent(
103
103
  background-color: $white-100;
104
104
  border: 1px solid $primary-90;
105
105
  // box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.16);
106
+ max-height: calc(100vh - 100px);
107
+ overflow-y: auto;
106
108
 
107
109
  li {
108
110
  display: block;
@@ -98,75 +98,9 @@ withDefaults(defineProps<Props>(), {
98
98
  align-items: center;
99
99
  justify-content: flex-end;
100
100
 
101
- // .ac-organizations {
102
- // margin: 0;
103
-
104
- // .ac-nav-button {
105
- // border: none;
106
- // margin: 0;
107
- // padding: 0;
108
- // margin-right: 15px;
109
- // width: 26px;
110
- // height: 26px;
111
- // border-radius: 50%;
112
- // overflow: hidden;
113
- // border: 2px solid $white-100;
114
-
115
- // &:last-child {
116
- // margin-right: 0;
117
- // position: relative;
118
- // z-index: 1;
119
-
120
- // .more-items {
121
- // text-align: center;
122
- // color: $white-100;
123
- // z-index: 99;
124
- // position: absolute;
125
- // font-size: 11px;
126
- // font-weight: 500;
127
- // }
128
-
129
- // &::after {
130
- // position: absolute;
131
- // content: "";
132
- // left: 0;
133
- // top: 0;
134
- // width: 100%;
135
- // height: 100%;
136
- // background-color: $primary-5;
137
- // opacity: 0.2;
138
- // z-index: 1;
139
- // }
140
- // }
141
- // }
142
- // }
143
-
144
101
  .ac-menu-item {
145
102
  position: relative;
146
103
  z-index: 1;
147
-
148
- // width: 30px;
149
- // height: 30px;
150
- // border-radius: 50%;
151
- // .ac-nav-button:not(.ac-profile-button) {
152
- // &:after {
153
- // content: "";
154
- // border-radius: 50%;
155
- // width: 30px;
156
- // height: 30px;
157
- // position: absolute;
158
- // z-index: -1;
159
- // left: 50%;
160
- // transition: 0.3s ease-in-out;
161
- // margin-left: -15px;
162
- // }
163
-
164
- // &:hover {
165
- // &:after {
166
- // background-color: rgba(255, 255, 255, 0.2) !important;
167
- // }
168
- // }
169
- // }
170
104
  }
171
105
  }
172
106
  }
@@ -179,95 +113,12 @@ withDefaults(defineProps<Props>(), {
179
113
  }
180
114
  }
181
115
  }
182
- // start dark theme
183
- .is-dark-theme {
184
- body {
185
- .ac-navbar-area {
186
- background-color: var(--dark-bg-light);
187
- --ac-white: #ffffff;
188
- --ac-white-lighter: #f1f1f1;
189
-
190
- .ac-navbar {
191
- .search-item {
192
- background-color: rgba(0, 0, 0, 0.2);
193
- }
194
-
195
- .ac-navbar-menu {
196
- .ac-menu-item {
197
- .quick-access {
198
- --ac-white: var(--dark-bg-light);
199
- }
200
-
201
- .ac-menu-content {
202
- // &.theme-choice {
203
- // background-color: var(--dark-bg-light);
204
- // }
205
-
206
- background-color: var(--dark-bg-light);
207
-
208
- ul {
209
- background-color: var(--dark-bg-light);
210
- }
211
-
212
- &::after {
213
- --ac-white: var(--dark-bg-light);
214
- }
215
-
216
- .user-profile-wrapper {
217
- --ac-white: var(--dark-bg-light);
218
- }
219
- }
220
- }
221
- }
222
- }
223
- }
224
- }
225
- }
226
-
227
- // end dark theme code
228
116
 
229
117
  /****************************************
230
118
  Responsive Classes
231
119
  *****************************************/
232
120
  // Extra small devices (portrait phones, less than 576px)
233
121
  @media (max-width: 575.98px) {
234
- // .ac-navbar-area {
235
- // .ac-navbar {
236
- // grid-template-columns: 60px 30px auto;
237
-
238
- // .ac-navbar-brand {
239
- // max-width: 40px;
240
-
241
- // a {
242
- // display: block;
243
- // }
244
- // }
245
-
246
- // .search-item {
247
- // display: inline-block;
248
-
249
- // input {
250
- // display: none;
251
- // }
252
- // }
253
-
254
- // .ac-navbar-menu {
255
- // .ac-menu-item {
256
- // .ac-nav-button {
257
- // margin-left: 0px;
258
-
259
- // &.ac-profile-button {
260
- // margin-left: 0px;
261
-
262
- // strong {
263
- // display: none;
264
- // }
265
- // }
266
- // }
267
- // }
268
- // }
269
- // }
270
- // }
271
122
  }
272
123
 
273
124
  // Small devices (landscape phones, 576px and up)
@@ -276,20 +127,10 @@ Responsive Classes
276
127
 
277
128
  // Medium devices (tablets, 768px and up)
278
129
  @media (min-width: 768px) and (max-width: 991.98px) {
279
- // .ac-navbar-area {
280
- // .ac-navbar {
281
- // grid-template-columns: 250px auto auto;
282
- // }
283
- // }
284
130
  }
285
131
 
286
132
  // Large devices (desktops, 992px and up)
287
133
  @media (min-width: 992px) and (max-width: 1199.98px) {
288
- // .ac-navbar-area {
289
- // .ac-navbar {
290
- // grid-template-columns: 270px auto auto;
291
- // }
292
- // }
293
134
  }
294
135
 
295
136
  // Extra large devices (large desktops, 1200px and up)
@@ -1,4 +1,7 @@
1
1
  <script setup lang="ts">
2
+ import { ref } from "vue";
3
+ import { onClickOutside } from "@vueuse/core";
4
+
2
5
  interface Props {
3
6
  modifierClasses?: string;
4
7
  }
@@ -6,11 +9,28 @@ interface Props {
6
9
  withDefaults(defineProps<Props>(), {
7
10
  modifierClasses: "",
8
11
  });
12
+
13
+ const emit = defineEmits(["isActive"]);
14
+
15
+ const navbarItem = ref(null);
16
+
17
+ const isActive = ref("");
18
+ function clickEvent() {
19
+ if (isActive.value) isActive.value = "";
20
+ else isActive.value = " is-active";
21
+ emit("isActive", isActive.value);
22
+ }
23
+
24
+ onClickOutside(navbarItem, () => (isActive.value = ""));
9
25
  </script>
10
26
 
11
27
  <template>
12
- <div class="ac-menu-item" :class="modifierClasses">
13
- <button class="button ac-nav-button">
28
+ <div
29
+ ref="navbarItem"
30
+ class="ac-menu-item"
31
+ :class="modifierClasses + isActive"
32
+ >
33
+ <button class="button ac-nav-button" @click="clickEvent()">
14
34
  <slot name="navbar-item" />
15
35
  </button>
16
36
  <slot name="navbar-content" />
@@ -22,6 +42,14 @@ withDefaults(defineProps<Props>(), {
22
42
  margin-left: 12px;
23
43
  position: relative;
24
44
 
45
+ &.is-active {
46
+ .ac-nav-button {
47
+ &::after {
48
+ background-color: $primary-90;
49
+ }
50
+ }
51
+ }
52
+
25
53
  &:first-child {
26
54
  margin-left: 0;
27
55
  }
@@ -32,13 +60,6 @@ withDefaults(defineProps<Props>(), {
32
60
  border-radius: 0;
33
61
  font-weight: 500;
34
62
  border: none;
35
- // .ac-user-profile {
36
- // img {
37
- // border-radius: 50%;
38
- // width: 32px;
39
- // height: 32px;
40
- // }
41
- // }
42
63
  &::after {
43
64
  border-radius: 0;
44
65
  border: none;
@@ -55,25 +76,26 @@ withDefaults(defineProps<Props>(), {
55
76
  position: relative;
56
77
  z-index: 99;
57
78
  user-select: none;
79
+ border: 1px solid $primary-80;
58
80
  cursor: pointer;
59
81
  &:after {
60
82
  position: absolute;
61
83
  content: "";
62
84
  left: 0;
63
85
  top: 0;
64
-
65
- background-color: $primary-80;
66
- opacity: 0.2;
86
+ opacity: 1;
87
+ z-index: -1;
67
88
  width: 100%;
68
89
  height: 100%;
69
90
  border-radius: 50%;
70
91
  transition: 0.3s ease-in-out;
71
92
  }
72
-
93
+ &:focus {
94
+ box-shadow: none;
95
+ }
73
96
  &:hover {
74
97
  &:after {
75
- background-color: $primary-70;
76
- opacity: 0.4;
98
+ background-color: $primary-90;
77
99
  }
78
100
  }
79
101
  }
@@ -11,16 +11,13 @@
11
11
  position: absolute;
12
12
  right: 0;
13
13
  top: 80px;
14
- // box-shadow: $ac-shadow-1;
15
14
  min-width: 180px;
16
15
  opacity: 0;
17
16
  visibility: hidden;
18
17
  transition: 0.3s ease-in;
19
18
  width: 260px;
20
-
21
- // &.theme-choice {
22
- // left: 0;
23
- // }
19
+ box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
20
+ 0 0px 0 1px rgba(10, 10, 10, 0.02);
24
21
 
25
22
  &.quick-access {
26
23
  background-color: $white-100;
@@ -80,7 +77,7 @@
80
77
  border: none;
81
78
  padding: 0;
82
79
  font-size: 11px;
83
- color: #eb5757;
80
+ color: $danger;
84
81
  background-color: transparent;
85
82
  }
86
83
  }
@@ -260,11 +257,12 @@
260
257
  }
261
258
 
262
259
  .ac-menu-item {
263
- &:hover {
260
+ &.is-active {
264
261
  .ac-menu-content {
265
262
  opacity: 1;
266
263
  visibility: visible;
267
- top: 40px;
264
+ top: 35px;
265
+ z-index: 99;
268
266
 
269
267
  &::after {
270
268
  position: absolute;
@@ -6,16 +6,23 @@ const NavbarItem = defineAsyncComponent(() => import("./NavbarItem.vue"));
6
6
  const NavbarItemContent = defineAsyncComponent(
7
7
  () => import("./NavbarItemContent.vue")
8
8
  );
9
- defineProps<{
10
- notifications: Notification[];
11
- }>();
12
-
9
+ withDefaults(
10
+ defineProps<{
11
+ notifications?: Array<Notification>;
12
+ unreadNotification?: number;
13
+ }>(),
14
+ {
15
+ notifications: () => [],
16
+ unreadNotification: 0,
17
+ }
18
+ );
19
+ defineEmits(["isActive"]);
13
20
  function notificationTime(time: number) {
14
21
  return TimeConvert.getDayDifferences({ past: time });
15
22
  }
16
23
  </script>
17
24
  <template>
18
- <navbar-item v-if="true">
25
+ <navbar-item ref="notificationItem" @is-active="$emit('isActive', $event)">
19
26
  <template #navbar-item>
20
27
  <svg
21
28
  width="16"
@@ -39,6 +46,13 @@ function notificationTime(time: number) {
39
46
  </clipPath>
40
47
  </defs>
41
48
  </svg>
49
+
50
+ <span v-if="unreadNotification > 999" class="notification-count"
51
+ >999+</span
52
+ >
53
+ <span v-else-if="unreadNotification !== 0" class="notification-count">{{
54
+ unreadNotification
55
+ }}</span>
42
56
  </template>
43
57
 
44
58
  <template #navbar-content>
@@ -52,7 +66,7 @@ function notificationTime(time: number) {
52
66
  <span>{{ notifications.length }}</span>
53
67
  </div>
54
68
 
55
- <div class="notification-body">
69
+ <div class="notification-body ac-scrollbar p-0">
56
70
  <a
57
71
  v-for="data in notifications"
58
72
  href="#"
@@ -80,10 +94,6 @@ function notificationTime(time: number) {
80
94
  <span> </span>
81
95
  </a>
82
96
  </div>
83
-
84
- <div class="notification-footer">
85
- <button class="">See More</button>
86
- </div>
87
97
  </div>
88
98
  </navbar-item-content>
89
99
  </template>
@@ -91,6 +101,22 @@ function notificationTime(time: number) {
91
101
  </template>
92
102
 
93
103
  <style lang="scss" scoped>
104
+ .notification-count {
105
+ position: absolute;
106
+ background-color: $primary;
107
+ color: $white-100;
108
+ padding: 4px;
109
+ font-size: 11px;
110
+ line-height: 1;
111
+ border-radius: 50px;
112
+ min-width: 20px;
113
+ height: 20px;
114
+ right: -10px;
115
+ top: -8px;
116
+ border: 1px solid $primary-97;
117
+ opacity: 1;
118
+ z-index: 9;
119
+ }
94
120
  .dropdown-inner {
95
121
  border-radius: 4px;
96
122
  overflow: hidden;
@@ -115,6 +141,8 @@ function notificationTime(time: number) {
115
141
  }
116
142
  }
117
143
  .notification-body {
144
+ max-height: calc(100vh - 100px);
145
+ overflow-y: auto;
118
146
  a {
119
147
  display: flex;
120
148
  color: $primary-20;