@appscode/design-system 1.1.0-alpha.9 → 1.1.0-beta.2

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 (186) hide show
  1. package/base/utilities/_all.scss +1 -1
  2. package/base/utilities/_default.scss +41 -41
  3. package/base/utilities/_derived-variables.scss +8 -9
  4. package/base/utilities/_extended.scss +1 -1
  5. package/base/utilities/_initial-variables.scss +52 -50
  6. package/base/utilities/_mixin.scss +11 -11
  7. package/base/utilities/_typography.scss +22 -22
  8. package/base/utilities/dark-theme.scss +1 -1
  9. package/components/_ac-accordion.scss +6 -6
  10. package/components/_ac-alert-box.scss +27 -28
  11. package/components/_ac-calendar.scss +4 -4
  12. package/components/_ac-card.scss +55 -55
  13. package/components/_ac-code-highlight.scss +6 -6
  14. package/components/_ac-content-layout.scss +165 -165
  15. package/components/_ac-drag.scss +11 -11
  16. package/components/_ac-input.scss +85 -85
  17. package/components/_ac-modal.scss +8 -8
  18. package/components/_ac-multi-select.scss +751 -751
  19. package/components/_ac-options.scss +12 -13
  20. package/components/_ac-select-box.scss +5 -5
  21. package/components/_ac-table.scss +55 -55
  22. package/components/_ac-tabs.scss +36 -36
  23. package/components/_ac-tags.scss +22 -22
  24. package/components/_ac-terminal.scss +253 -253
  25. package/components/_add-card.scss +3 -3
  26. package/components/_app-drawer.scss +4 -4
  27. package/components/_basic-card.scss +108 -118
  28. package/components/_breadcumb.scss +5 -5
  29. package/components/_buttons.scss +64 -64
  30. package/components/_card-body-wrapper.scss +5 -5
  31. package/components/_dashboard-header.scss +29 -29
  32. package/components/_direct-deploy.scss +8 -8
  33. package/components/_go-to-top.scss +1 -1
  34. package/components/_image-upload.scss +3 -3
  35. package/components/_left-sidebar-menu.scss +374 -376
  36. package/components/_monaco-editor.scss +1 -1
  37. package/components/_navbar.scss +65 -65
  38. package/components/_nested-list.scss +1 -1
  39. package/components/_overview-info.scss +7 -7
  40. package/components/_overview-page.scss +4 -4
  41. package/components/_pagination.scss +110 -110
  42. package/components/_payment-card.scss +20 -20
  43. package/components/_preloader.scss +1 -1
  44. package/components/_preview-modal.scss +18 -18
  45. package/components/_pricing-table.scss +10 -10
  46. package/components/_progress-bar.scss +12 -12
  47. package/components/_subscription-card.scss +14 -14
  48. package/components/_table-of-content.scss +4 -4
  49. package/components/_tfa.scss +9 -9
  50. package/components/_widget-menu.scss +17 -17
  51. package/components/_wizard.scss +82 -82
  52. package/components/ac-toaster/_ac-toasted.scss +1 -1
  53. package/components/bbum/_activities-header.scss +1 -1
  54. package/components/bbum/_card-team.scss +12 -12
  55. package/components/bbum/_information-center.scss +13 -13
  56. package/components/bbum/_left-sidebar.scss +8 -8
  57. package/components/bbum/_mobile-desktop.scss +7 -7
  58. package/components/bbum/_post.scss +5 -5
  59. package/components/bbum/_sign-up-notification.scss +10 -10
  60. package/components/bbum/_single-post-preview.scss +21 -21
  61. package/components/bbum/_user-profile.scss +10 -10
  62. package/components/ui-builder/_ui-builder.scss +15 -15
  63. package/components/ui-builder/_vue-open-api.scss +2 -2
  64. package/layouts/_code-preview.scss +11 -11
  65. package/package.json +1 -1
  66. package/vue-components/plugins/time-convert.js +49 -0
  67. package/vue-components/text.vue +1 -0
  68. package/vue-components/types/cluster.ts +6 -0
  69. package/vue-components/types/longRunningTasks.ts +20 -0
  70. package/vue-components/types/notification.ts +6 -0
  71. package/vue-components/types/previewYaml.ts +8 -0
  72. package/vue-components/types/table.ts +54 -0
  73. package/vue-components/types/theme.ts +10 -0
  74. package/vue-components/types/user.ts +22 -0
  75. package/vue-components/v2/card/OverviewCards.vue +17 -2
  76. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
  77. package/vue-components/v2/icons/Ellipsis.vue +2 -1
  78. package/vue-components/v2/modal/Modal.vue +0 -5
  79. package/vue-components/v2/navbar/Appdrawer.vue +37 -12
  80. package/vue-components/v2/navbar/Navbar.vue +3 -3
  81. package/vue-components/v2/navbar/NavbarItem.vue +3 -1
  82. package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
  83. package/vue-components/v2/navbar/User.vue +5 -22
  84. package/vue-components/v2/pagination/Pagination.vue +65 -0
  85. package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
  86. package/vue-components/v3/accordion/Accordion.vue +151 -0
  87. package/vue-components/v3/alert/Alert.vue +238 -0
  88. package/vue-components/v3/alert/Toast.vue +79 -0
  89. package/vue-components/v3/banner/Banner.vue +10 -0
  90. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +104 -0
  91. package/vue-components/v3/button/Button.vue +831 -58
  92. package/vue-components/v3/button/Buttons.vue +6 -0
  93. package/vue-components/v3/button/DownloadBtn.vue +31 -0
  94. package/vue-components/v3/cards/Card.vue +32 -0
  95. package/vue-components/v3/cards/CardContent.vue +7 -0
  96. package/vue-components/v3/cards/CardHeader.vue +14 -0
  97. package/vue-components/v3/cards/Cards.vue +7 -0
  98. package/vue-components/v3/cards/Cluster.vue +150 -0
  99. package/vue-components/v3/cards/Counter.vue +27 -0
  100. package/vue-components/v3/cards/FeatureCard.vue +40 -0
  101. package/vue-components/v3/cards/FeatureCards.vue +6 -0
  102. package/vue-components/v3/cards/InfoCard.vue +248 -0
  103. package/vue-components/v3/cards/Monitoring.vue +94 -0
  104. package/vue-components/v3/cards/OverviewCard.vue +24 -0
  105. package/vue-components/v3/cards/OverviewCards.vue +31 -0
  106. package/vue-components/v3/cards/Payment.vue +62 -0
  107. package/vue-components/v3/cards/Vendor.vue +23 -0
  108. package/vue-components/v3/content/ContentHeader.vue +39 -30
  109. package/vue-components/v3/content/ContentLayout.vue +20 -0
  110. package/vue-components/v3/content/ContentTable.vue +37 -61
  111. package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
  112. package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
  113. package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
  114. package/vue-components/v3/editor/Editor.vue +100 -113
  115. package/vue-components/v3/editor/FilteredFileEditor.vue +124 -127
  116. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +70 -94
  117. package/vue-components/v3/footer/FooterArea.vue +34 -0
  118. package/vue-components/v3/footer/FooterItem.vue +29 -0
  119. package/vue-components/v3/footer/FooterItems.vue +15 -0
  120. package/vue-components/v3/footer/Info.vue +23 -0
  121. package/vue-components/v3/footer/Status.vue +42 -0
  122. package/vue-components/v3/footer/Usage.vue +44 -0
  123. package/vue-components/v3/form/Form.vue +24 -33
  124. package/vue-components/v3/form/FormFooterControl.vue +7 -0
  125. package/vue-components/v3/form/FormFooterControls.vue +7 -0
  126. package/vue-components/v3/form-fields/AcSingleInput.vue +520 -0
  127. package/vue-components/v3/form-fields/Input.vue +19 -14
  128. package/vue-components/v3/header/Header.vue +117 -24
  129. package/vue-components/v3/header/HeaderItem.vue +18 -0
  130. package/vue-components/v3/header/HeaderItems.vue +4 -0
  131. package/vue-components/v3/icons/Ellipsis.vue +2 -0
  132. package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
  133. package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
  134. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +17 -15
  135. package/vue-components/v3/modal/Modal.vue +292 -96
  136. package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
  137. package/vue-components/v3/modals/JsonShowModal.vue +62 -68
  138. package/vue-components/v3/modals/LongRunningTasksModal.vue +145 -143
  139. package/vue-components/v3/navbar/Appdrawer.vue +196 -51
  140. package/vue-components/v3/navbar/Navbar.vue +296 -0
  141. package/vue-components/v3/navbar/NavbarItem.vue +81 -0
  142. package/vue-components/v3/navbar/NavbarItemContent.vue +284 -0
  143. package/vue-components/v3/navbar/Notification.vue +179 -0
  144. package/vue-components/v3/navbar/ThemeMode.vue +128 -112
  145. package/vue-components/v3/navbar/User.vue +383 -268
  146. package/vue-components/v3/notification/AlertBox.vue +39 -42
  147. package/vue-components/v3/notification/Notification.vue +49 -43
  148. package/vue-components/v3/notification/NotificationItem.vue +51 -19
  149. package/vue-components/v3/option-dots/Options.vue +188 -0
  150. package/vue-components/v3/pagination/Pagination.vue +203 -99
  151. package/vue-components/v3/preloader/Preloader.vue +23 -0
  152. package/vue-components/v3/searchbars/SearchBar.vue +51 -34
  153. package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
  154. package/vue-components/v3/sidebar/ClusterSwitcher.vue +834 -81
  155. package/vue-components/v3/sidebar/Sidebar.vue +271 -0
  156. package/vue-components/v3/sidebar/SidebarBody.vue +7 -0
  157. package/vue-components/v3/sidebar/SidebarFooter.vue +80 -0
  158. package/vue-components/v3/sidebar/SidebarHeader.vue +124 -0
  159. package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
  160. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
  161. package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
  162. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +128 -0
  163. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +29 -0
  164. package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
  165. package/vue-components/v3/tab/TabItem.vue +10 -12
  166. package/vue-components/v3/tab/Tabs.vue +9 -0
  167. package/vue-components/v3/tab/TabsBody.vue +7 -0
  168. package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
  169. package/vue-components/v3/table/FakeTableCell.vue +22 -31
  170. package/vue-components/v3/table/InfoTable.vue +85 -59
  171. package/vue-components/v3/table/MultiInfoTable.vue +72 -95
  172. package/vue-components/v3/table/Table.vue +582 -151
  173. package/vue-components/v3/table/TableCell.vue +20 -23
  174. package/vue-components/v3/table/TableContainer.vue +50 -28
  175. package/vue-components/v3/table/TableRow.vue +63 -85
  176. package/vue-components/v3/table/table-cell/ArrayCell.vue +67 -79
  177. package/vue-components/v3/table/table-cell/CellValue.vue +97 -103
  178. package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
  179. package/vue-components/v3/table/table-cell/ObjectCell.vue +67 -79
  180. package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
  181. package/vue-components/v3/tabs/EditorTabs.vue +18 -24
  182. package/vue-components/v3/tag/Tag.vue +15 -12
  183. package/vue-components/v3/tag/Tags.vue +7 -0
  184. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +26 -23
  185. package/mixins/stickyContent.js +0 -141
  186. package/plugins/caching.ts +0 -243
@@ -0,0 +1,271 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ type: string;
4
+ isCollapsible: boolean;
5
+ }
6
+
7
+ withDefaults(defineProps<Props>(), {
8
+ type: "cluster-main",
9
+ isCollapsible: false,
10
+ });
11
+ </script>
12
+
13
+ <template>
14
+ <div class="ac-system-left-sidebar">
15
+ <!-- is-collapsed -->
16
+ <div
17
+ class="ac-left-sidebar-wrapper is-collapsed"
18
+ :class="{ 'style-2': isCollapsible }"
19
+ >
20
+ <div class="ac-left-sidebar-inner">
21
+ <aside class="ac-left-sidebar">
22
+ <!-- sidebar header start -->
23
+ <slot name="sidebar-header" />
24
+ <!-- sidebar header end -->
25
+
26
+ <!-- sidebar components start -->
27
+ <slot name="sidebar-body" />
28
+ <!-- sidebar components end -->
29
+
30
+ <!-- sidebar footer -->
31
+ <slot name="sidebar-footer" />
32
+ <!-- sidebar footer -->
33
+ </aside>
34
+ <!-- sidebar top end -->
35
+ </div>
36
+ <!-- left-sidebar menu end -->
37
+ </div>
38
+ </div>
39
+ </template>
40
+
41
+ <style lang="scss">
42
+ .ac-left-sidebar-wrapper {
43
+ position: fixed;
44
+ top: 0px;
45
+ z-index: 9999;
46
+ background-color: $primary-20;
47
+ width: 250px;
48
+ transition: 0.3s ease-in-out;
49
+ }
50
+
51
+ .ac-left-sidebar {
52
+ .menu-list {
53
+ &.ac-menu-list {
54
+ height: calc(100vh - 80px);
55
+ overflow-y: auto;
56
+ padding-top: 4px;
57
+ scrollbar-color: $white-100-light transparent;
58
+
59
+ /* width */
60
+ &::-webkit-scrollbar {
61
+ display: none;
62
+ }
63
+
64
+ &::-webkit-scrollbar {
65
+ display: none;
66
+ }
67
+
68
+ li {
69
+ &.is-open {
70
+ a {
71
+ &.ac-dropdown-button {
72
+ .ac-arrow-down {
73
+ transform: rotate(-180deg);
74
+ transform-origin: 5px;
75
+ }
76
+ }
77
+ }
78
+
79
+ ul {
80
+ li {
81
+ a {
82
+ strong {
83
+ font-weight: 500;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ a {
91
+ font-style: normal;
92
+ font-weight: 500;
93
+ font-size: 13px;
94
+ line-height: 16px;
95
+ color: $primary-97;
96
+ position: relative;
97
+ z-index: 1;
98
+ padding: 10px 15px 10px 24px;
99
+ transition: 0.3s ease-in-out;
100
+ display: flex;
101
+ align-items: center;
102
+
103
+ &:after {
104
+ position: absolute;
105
+ content: "";
106
+ left: 10px;
107
+ top: 0;
108
+ width: calc(100% - 20px);
109
+ height: 100%;
110
+ background: rgba(255, 255, 255, 0.1);
111
+ border-radius: 4px;
112
+ z-index: -1;
113
+ transition: 0.3s ease-in-out;
114
+ opacity: 0;
115
+ visibility: hidden;
116
+ }
117
+
118
+ strong {
119
+ max-width: calc(100% - 65px);
120
+ // line-break: anywhere;
121
+ white-space: break-spaces;
122
+ display: flex;
123
+ align-items: center;
124
+ overflow: hidden;
125
+ font-weight: 500;
126
+ transition: 0.3s ease-in-out;
127
+ }
128
+
129
+ &.ac-dropdown-button {
130
+ user-select: none;
131
+
132
+ .ac-arrow-down {
133
+ position: absolute;
134
+ margin-right: 0;
135
+ right: 20px;
136
+ transition: transform 0.3s;
137
+ transform-origin: 4px;
138
+ color: $black-70;
139
+ }
140
+ }
141
+
142
+ &:hover {
143
+ background-color: transparent;
144
+
145
+ &:after {
146
+ color: $primary;
147
+ opacity: 0.5;
148
+ visibility: visible;
149
+ }
150
+
151
+ span {
152
+ color: $primary-97;
153
+
154
+ img {
155
+ filter: brightness(10);
156
+ }
157
+ }
158
+ }
159
+
160
+ span {
161
+ margin-right: 12px;
162
+ width: 16px;
163
+ height: 16px;
164
+ color: $black-30;
165
+ font-size: 16px;
166
+
167
+ img {
168
+ width: 100%;
169
+ filter: brightness(10);
170
+ transition: 0.3s ease-in-out;
171
+ }
172
+ }
173
+ }
174
+
175
+ ul {
176
+ max-height: 0;
177
+ transition: max-height 0.2s ease-out;
178
+ margin: 0;
179
+ padding: 0;
180
+ border-left: none;
181
+ overflow: hidden;
182
+
183
+ li {
184
+ a {
185
+ padding-left: 52px;
186
+ font-size: 12px;
187
+ padding-top: 10px;
188
+ padding-bottom: 10px;
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ a {
195
+ &.is-active {
196
+ background-color: transparent;
197
+ &::after {
198
+ opacity: 1 !important;
199
+ visibility: visible !important;
200
+ }
201
+ }
202
+ }
203
+ }
204
+
205
+ // .ac-options.is-right {
206
+ // .option-dots {
207
+ // transition: 0.3s;
208
+
209
+ // i.fa {
210
+ // &.fa-angle-left {
211
+ // font-size: 18px;
212
+ // }
213
+ // }
214
+
215
+ // &:active {
216
+ // i.fa {
217
+ // background-color: $white-100-lighter;
218
+ // width: 25px;
219
+ // height: 25px;
220
+ // text-align: center;
221
+ // line-height: 25px;
222
+ // border-radius: 50%;
223
+ // }
224
+ // }
225
+
226
+ // &:hover {
227
+ // color: $primary !important;
228
+ // transform: scale(1.2);
229
+ // }
230
+ // }
231
+ // }
232
+ }
233
+
234
+ .sidebar-collapsed {
235
+ .ac-left-sidebar-wrapper {
236
+ width: 60px;
237
+ .ac-left-sidebar {
238
+ .menu-list {
239
+ &.ac-menu-list {
240
+ li {
241
+ a {
242
+ padding: 10px 15px;
243
+ display: flex;
244
+ align-items: center;
245
+ justify-content: center;
246
+
247
+ span {
248
+ margin: 0;
249
+ }
250
+ strong {
251
+ opacity: 0;
252
+ visibility: hidden;
253
+ }
254
+ }
255
+ ul {
256
+ li {
257
+ a {
258
+ padding-left: 15px;
259
+ display: flex;
260
+ justify-content: center;
261
+ align-items: center;
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ }
271
+ </style>
@@ -0,0 +1,7 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <ul class="menu-list ac-menu-list">
5
+ <slot />
6
+ </ul>
7
+ </template>
@@ -0,0 +1,80 @@
1
+ <script setup lang="ts">
2
+ import { defineAsyncComponent } from "vue";
3
+ interface Props {
4
+ isColorpickerEnabled: boolean;
5
+ }
6
+
7
+ withDefaults(defineProps<Props>(), {
8
+ isColorpickerEnabled: false,
9
+ });
10
+
11
+ const AccentColorPicker = defineAsyncComponent(
12
+ () => import("./AccentColorPicker.vue")
13
+ );
14
+ </script>
15
+
16
+ <template>
17
+ <div class="sidebar-footer">
18
+ <!-- back button -->
19
+ <button class="back-button is-transparent">
20
+ <svg
21
+ width="18"
22
+ height="18"
23
+ viewBox="0 0 18 18"
24
+ fill="none"
25
+ xmlns="http://www.w3.org/2000/svg"
26
+ >
27
+ <path
28
+ d="M11.25 13.5L6.75 9L11.25 4.5"
29
+ stroke="white"
30
+ stroke-width="2"
31
+ stroke-linecap="round"
32
+ stroke-linejoin="round"
33
+ />
34
+ <path
35
+ d="M16 14V4"
36
+ stroke="white"
37
+ stroke-width="2"
38
+ stroke-linecap="round"
39
+ stroke-linejoin="round"
40
+ />
41
+ </svg>
42
+ </button>
43
+ <!-- back button -->
44
+
45
+ <!-- color control -->
46
+ <div v-if="isColorpickerEnabled" class="accent-color-picker">
47
+ <accent-color-picker />
48
+ </div>
49
+ <!-- color control -->
50
+ </div>
51
+ </template>
52
+
53
+ <style lang="scss" scoped>
54
+ .sidebar-footer {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: space-between;
58
+ height: 30px;
59
+ border-top: 1px solid #3d5e7c;
60
+
61
+ .back-button {
62
+ display: flex;
63
+ padding: 5px 16px;
64
+ cursor: pointer;
65
+ justify-content: flex-start;
66
+ width: 50%;
67
+ &:hover {
68
+ background-color: rgba(255, 255, 255, 0.1);
69
+ }
70
+ }
71
+ }
72
+ .sidebar-collapsed .ac-left-sidebar-wrapper {
73
+ .accent-color-picker {
74
+ display: none;
75
+ }
76
+ .sidebar-footer .back-button {
77
+ width: 100%;
78
+ }
79
+ }
80
+ </style>
@@ -0,0 +1,124 @@
1
+ <script setup lang="ts">
2
+ defineEmits(["toggleSidebar"]);
3
+
4
+ interface Props {
5
+ brandLogo: string;
6
+ brandLogoAlt?: string;
7
+ url?: string;
8
+ modifierClasses?: string;
9
+ }
10
+
11
+ withDefaults(defineProps<Props>(), {
12
+ brandLogo: "https://via.placeholder.com/150x35/dddddd/808080",
13
+ brandLogoAlt: "",
14
+ url: "/",
15
+ modifierClasses: "",
16
+ });
17
+ </script>
18
+ <template>
19
+ <div class="sidebar-header" @click="$emit('toggleSidebar')">
20
+ <!-- hamburger icon -->
21
+ <div class="icon hamburger-icon mr-16">
22
+ <svg
23
+ width="18"
24
+ height="18"
25
+ viewBox="0 0 18 18"
26
+ fill="none"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ >
29
+ <path
30
+ d="M3 13.5L10.5 13.5"
31
+ stroke="white"
32
+ stroke-width="2"
33
+ stroke-linecap="round"
34
+ stroke-linejoin="round"
35
+ />
36
+ <path
37
+ d="M3 9L15 9"
38
+ stroke="white"
39
+ stroke-width="2"
40
+ stroke-linecap="round"
41
+ stroke-linejoin="round"
42
+ />
43
+ <path
44
+ d="M3 4.5L7.5 4.5"
45
+ stroke="white"
46
+ stroke-width="2"
47
+ stroke-linecap="round"
48
+ stroke-linejoin="round"
49
+ />
50
+ </svg>
51
+ </div>
52
+ <!-- hamburger icon -->
53
+
54
+ <!-- brand logo -->
55
+ <router-link class="is-flex brand-logo" :to="url">
56
+ <img :src="brandLogo" alt="brand-logo" :class="modifierClasses" />
57
+ </router-link>
58
+ <!-- brand logo -->
59
+ </div>
60
+ </template>
61
+
62
+ <style lang="scss" scoped>
63
+ .sidebar-collapsed .ac-left-sidebar-wrapper {
64
+ .brand-logo {
65
+ display: none !important;
66
+ }
67
+ .sidebar-header {
68
+ justify-content: center;
69
+ padding: 10px;
70
+ .hamburger-icon {
71
+ margin-right: 0 !important;
72
+ }
73
+ }
74
+ }
75
+
76
+ .sidebar-header {
77
+ background-color: transparent;
78
+ border-bottom: 1px solid #2f5473;
79
+ height: 50px;
80
+ display: flex;
81
+ // justify-content: space-between;
82
+ padding: 8px 20px;
83
+ align-items: center;
84
+
85
+ .hamburger-icon {
86
+ cursor: pointer;
87
+ position: relative;
88
+ z-index: 1;
89
+ width: 32px;
90
+ height: 32px;
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ border-radius: 50%;
95
+ &::after {
96
+ position: absolute;
97
+ content: "";
98
+ left: 0;
99
+ top: 0;
100
+ width: 100%;
101
+ height: 100%;
102
+ border-radius: 50%;
103
+ background-color: rgba(255, 255, 255, 0.1);
104
+ opacity: 0;
105
+ visibility: hidden;
106
+ transition: 0.3s ease-in-out;
107
+ }
108
+
109
+ &:hover {
110
+ &::after {
111
+ opacity: 1;
112
+ visibility: visible;
113
+ }
114
+ }
115
+ }
116
+ .brand-logo {
117
+ display: flex;
118
+ align-items: center;
119
+ img {
120
+ height: 30px;
121
+ }
122
+ }
123
+ }
124
+ </style>
@@ -0,0 +1,62 @@
1
+ <script setup lang="ts">
2
+ import { nextTick, watch, ref } from "vue";
3
+
4
+ interface Props {
5
+ id?: string;
6
+ title?: string;
7
+ url?: string;
8
+ isActive?: boolean;
9
+ icon?: string;
10
+ }
11
+
12
+ const props = withDefaults(defineProps<Props>(), {
13
+ id: "sidebar-id",
14
+ title: "sidebar-title",
15
+ url: "/",
16
+ isActive: false,
17
+ icon: "@/assets/images/icons/basic.svg",
18
+ });
19
+
20
+ const sidebarItem = ref<HTMLElement | null>(null);
21
+
22
+ watch(
23
+ () => props.isActive,
24
+ (n) => {
25
+ if (n) {
26
+ nextTick(() => {
27
+ setTimeout(() => {
28
+ const top =
29
+ (sidebarItem.value &&
30
+ sidebarItem.value.getBoundingClientRect().top) ||
31
+ 0;
32
+ // preventing scroll to options that are already visible
33
+ if (top > window.innerHeight - 200) {
34
+ // scroll to selected option item
35
+ sidebarItem.value?.scrollIntoView({
36
+ behavior: "smooth",
37
+ block: "center",
38
+ });
39
+ }
40
+ }, 500);
41
+ });
42
+ }
43
+ },
44
+ { immediate: true }
45
+ );
46
+ </script>
47
+
48
+ <template>
49
+ <li ref="sidebarItem">
50
+ <router-link
51
+ :id="id"
52
+ :title="title"
53
+ :to="url"
54
+ :class="{ 'is-active': isActive }"
55
+ >
56
+ <span>
57
+ <img :src="icon" alt="icon" />
58
+ </span>
59
+ <strong>{{ title }}</strong>
60
+ </router-link>
61
+ </li>
62
+ </template>