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

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 (194) hide show
  1. package/base/_video-player.scss +65 -0
  2. package/base/utilities/_all.scss +6 -5
  3. package/base/utilities/_colors.scss +446 -0
  4. package/base/utilities/_customize-bulma.scss +23 -27
  5. package/base/utilities/_extended.scss +3 -2
  6. package/base/utilities/{_default.scss → _global.scss} +171 -323
  7. package/base/utilities/_layouts.scss +157 -0
  8. package/base/utilities/_mixin.scss +11 -11
  9. package/base/utilities/_spacing.scss +96 -0
  10. package/base/utilities/_typography.scss +56 -24
  11. package/base/utilities/dark-theme.scss +1 -1
  12. package/components/_ac-accordion.scss +117 -117
  13. package/components/_ac-alert-box.scss +205 -263
  14. package/components/_ac-calendar.scss +4 -4
  15. package/components/_ac-card.scss +122 -130
  16. package/components/_ac-code-highlight.scss +6 -6
  17. package/components/_ac-content-layout.scss +165 -165
  18. package/components/_ac-drag.scss +11 -11
  19. package/components/_ac-input.scss +38 -520
  20. package/components/_ac-modal.scss +212 -212
  21. package/components/_ac-multi-select.scss +780 -751
  22. package/components/_ac-options.scss +122 -123
  23. package/components/_ac-select-box.scss +5 -5
  24. package/components/_ac-table.scss +503 -502
  25. package/components/_ac-tabs.scss +39 -38
  26. package/components/_ac-tags.scss +116 -116
  27. package/components/_ac-terminal.scss +95 -51
  28. package/components/_add-card.scss +3 -3
  29. package/components/_all.scss +31 -28
  30. package/components/_app-drawer.scss +0 -134
  31. package/components/_breadcumb.scss +0 -71
  32. package/components/_buttons.scss +779 -779
  33. package/components/_card-body-wrapper.scss +5 -5
  34. package/components/_dashboard-header.scss +0 -115
  35. package/components/_direct-deploy.scss +8 -8
  36. package/components/_go-to-top.scss +1 -1
  37. package/components/_image-upload.scss +3 -3
  38. package/components/_left-sidebar-menu.scss +448 -579
  39. package/components/_monaco-editor.scss +1 -1
  40. package/components/_navbar.scss +786 -752
  41. package/components/_nested-list.scss +1 -1
  42. package/components/_overview-info.scss +7 -7
  43. package/components/_overview-page.scss +4 -4
  44. package/components/_pagination.scss +106 -124
  45. package/components/_payment-card.scss +21 -21
  46. package/components/_preloader.scss +1 -1
  47. package/components/_preview-modal.scss +18 -18
  48. package/components/_pricing-table.scss +10 -10
  49. package/components/_progress-bar.scss +12 -12
  50. package/components/_subscription-card.scss +14 -14
  51. package/components/_table-of-content.scss +4 -4
  52. package/components/_tfa.scss +9 -9
  53. package/components/_widget-menu.scss +247 -247
  54. package/components/_wizard.scss +82 -82
  55. package/components/ac-toaster/_ac-toasted.scss +1 -1
  56. package/components/bbum/_activities-header.scss +1 -1
  57. package/components/bbum/_card-team.scss +12 -12
  58. package/components/bbum/_information-center.scss +13 -13
  59. package/components/bbum/_left-sidebar.scss +8 -8
  60. package/components/bbum/_mobile-desktop.scss +7 -7
  61. package/components/bbum/_post.scss +5 -5
  62. package/components/bbum/_sign-up-notification.scss +10 -10
  63. package/components/bbum/_single-post-preview.scss +21 -21
  64. package/components/bbum/_user-profile.scss +10 -10
  65. package/components/ui-builder/_ui-builder.scss +15 -15
  66. package/components/ui-builder/_vue-open-api.scss +514 -2
  67. package/layouts/_code-preview.scss +11 -11
  68. package/main.scss +26 -10
  69. package/package.json +1 -1
  70. package/vue-components/plugins/time-convert.js +49 -0
  71. package/vue-components/text.vue +1 -0
  72. package/vue-components/types/cluster.ts +6 -0
  73. package/vue-components/types/longRunningTasks.ts +20 -0
  74. package/vue-components/types/notification.ts +6 -0
  75. package/vue-components/types/previewYaml.ts +8 -0
  76. package/vue-components/types/table.ts +54 -0
  77. package/vue-components/types/theme.ts +10 -0
  78. package/vue-components/types/user.ts +22 -0
  79. package/vue-components/v2/card/Card.vue +1 -1
  80. package/vue-components/v2/card/OverviewCards.vue +17 -2
  81. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
  82. package/vue-components/v2/icons/Ellipsis.vue +2 -1
  83. package/vue-components/v2/modal/Modal.vue +0 -5
  84. package/vue-components/v2/navbar/Appdrawer.vue +37 -12
  85. package/vue-components/v2/navbar/Navbar.vue +3 -3
  86. package/vue-components/v2/navbar/NavbarItem.vue +3 -1
  87. package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
  88. package/vue-components/v2/navbar/User.vue +5 -22
  89. package/vue-components/v2/pagination/Pagination.vue +65 -0
  90. package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
  91. package/vue-components/v3/accordion/Accordion.vue +151 -0
  92. package/vue-components/v3/alert/Alert.vue +238 -0
  93. package/vue-components/v3/alert/Toast.vue +79 -0
  94. package/vue-components/v3/banner/Banner.vue +10 -0
  95. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +104 -0
  96. package/vue-components/v3/button/Button.vue +831 -58
  97. package/vue-components/v3/button/Buttons.vue +6 -0
  98. package/vue-components/v3/button/DownloadBtn.vue +31 -0
  99. package/vue-components/v3/cards/Card.vue +32 -0
  100. package/vue-components/v3/cards/CardContent.vue +7 -0
  101. package/vue-components/v3/cards/CardHeader.vue +14 -0
  102. package/vue-components/v3/cards/Cards.vue +7 -0
  103. package/vue-components/v3/cards/Cluster.vue +150 -0
  104. package/vue-components/v3/cards/Counter.vue +27 -0
  105. package/vue-components/v3/cards/FeatureCard.vue +40 -0
  106. package/vue-components/v3/cards/FeatureCards.vue +6 -0
  107. package/vue-components/v3/cards/InfoCard.vue +248 -0
  108. package/vue-components/v3/cards/Monitoring.vue +94 -0
  109. package/vue-components/v3/cards/OverviewCard.vue +24 -0
  110. package/vue-components/v3/cards/OverviewCards.vue +31 -0
  111. package/vue-components/v3/cards/Payment.vue +62 -0
  112. package/vue-components/v3/cards/Vendor.vue +23 -0
  113. package/vue-components/v3/content/ContentHeader.vue +39 -30
  114. package/vue-components/v3/content/ContentLayout.vue +20 -0
  115. package/vue-components/v3/content/ContentTable.vue +37 -61
  116. package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
  117. package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
  118. package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
  119. package/vue-components/v3/editor/Editor.vue +100 -113
  120. package/vue-components/v3/editor/FilteredFileEditor.vue +124 -127
  121. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +70 -94
  122. package/vue-components/v3/footer/FooterArea.vue +34 -0
  123. package/vue-components/v3/footer/FooterItem.vue +32 -0
  124. package/vue-components/v3/footer/FooterItems.vue +15 -0
  125. package/vue-components/v3/footer/Info.vue +23 -0
  126. package/vue-components/v3/footer/Status.vue +42 -0
  127. package/vue-components/v3/footer/Usage.vue +44 -0
  128. package/vue-components/v3/form/Form.vue +24 -33
  129. package/vue-components/v3/form/FormFooterControl.vue +7 -0
  130. package/vue-components/v3/form/FormFooterControls.vue +7 -0
  131. package/vue-components/v3/form-fields/AcSingleInput.vue +520 -0
  132. package/vue-components/v3/form-fields/Input.vue +19 -14
  133. package/vue-components/v3/header/Header.vue +117 -24
  134. package/vue-components/v3/header/HeaderItem.vue +18 -0
  135. package/vue-components/v3/header/HeaderItems.vue +4 -0
  136. package/vue-components/v3/icons/Ellipsis.vue +2 -0
  137. package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
  138. package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
  139. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +17 -15
  140. package/vue-components/v3/modal/Modal.vue +292 -96
  141. package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
  142. package/vue-components/v3/modals/JsonShowModal.vue +62 -68
  143. package/vue-components/v3/modals/LongRunningTasksModal.vue +145 -143
  144. package/vue-components/v3/navbar/Appdrawer.vue +196 -51
  145. package/vue-components/v3/navbar/Navbar.vue +296 -0
  146. package/vue-components/v3/navbar/NavbarItem.vue +81 -0
  147. package/vue-components/v3/navbar/NavbarItemContent.vue +284 -0
  148. package/vue-components/v3/navbar/Notification.vue +179 -0
  149. package/vue-components/v3/navbar/ThemeMode.vue +128 -112
  150. package/vue-components/v3/navbar/User.vue +383 -268
  151. package/vue-components/v3/notification/AlertBox.vue +39 -42
  152. package/vue-components/v3/notification/Notification.vue +49 -43
  153. package/vue-components/v3/notification/NotificationItem.vue +51 -19
  154. package/vue-components/v3/option-dots/Options.vue +188 -0
  155. package/vue-components/v3/pagination/Pagination.vue +203 -99
  156. package/vue-components/v3/preloader/Preloader.vue +23 -0
  157. package/vue-components/v3/searchbars/SearchBar.vue +51 -34
  158. package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
  159. package/vue-components/v3/sidebar/ClusterSwitcher.vue +834 -81
  160. package/vue-components/v3/sidebar/Sidebar.vue +271 -0
  161. package/vue-components/v3/sidebar/SidebarBody.vue +7 -0
  162. package/vue-components/v3/sidebar/SidebarFooter.vue +80 -0
  163. package/vue-components/v3/sidebar/SidebarHeader.vue +124 -0
  164. package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
  165. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
  166. package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
  167. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +128 -0
  168. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +29 -0
  169. package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
  170. package/vue-components/v3/tab/TabItem.vue +10 -12
  171. package/vue-components/v3/tab/Tabs.vue +9 -0
  172. package/vue-components/v3/tab/TabsBody.vue +7 -0
  173. package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
  174. package/vue-components/v3/table/FakeTableCell.vue +22 -31
  175. package/vue-components/v3/table/InfoTable.vue +85 -59
  176. package/vue-components/v3/table/MultiInfoTable.vue +72 -95
  177. package/vue-components/v3/table/Table.vue +582 -151
  178. package/vue-components/v3/table/TableCell.vue +20 -23
  179. package/vue-components/v3/table/TableContainer.vue +50 -28
  180. package/vue-components/v3/table/TableRow.vue +63 -85
  181. package/vue-components/v3/table/table-cell/ArrayCell.vue +67 -79
  182. package/vue-components/v3/table/table-cell/CellValue.vue +97 -103
  183. package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
  184. package/vue-components/v3/table/table-cell/ObjectCell.vue +67 -79
  185. package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
  186. package/vue-components/v3/tabs/EditorTabs.vue +18 -24
  187. package/vue-components/v3/tag/Tag.vue +15 -12
  188. package/vue-components/v3/tag/Tags.vue +7 -0
  189. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +26 -23
  190. package/base/utilities/_derived-variables.scss +0 -25
  191. package/base/utilities/_initial-variables.scss +0 -215
  192. package/components/_basic-card.scss +0 -128
  193. package/mixins/stickyContent.js +0 -141
  194. package/plugins/caching.ts +0 -243
@@ -0,0 +1,151 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ modifierClasses?: string;
4
+ }
5
+
6
+ withDefaults(defineProps<Props>(), {
7
+ modifierClasses: "",
8
+ });
9
+ </script>
10
+
11
+ <template>
12
+ <!--use "is-marginless" class for remove margin -->
13
+ <div class="ac-accordion-wrapper" :class="modifierClasses">
14
+ <!-- single accordion item start -->
15
+ <div class="single-accordion-item closed">
16
+ <!-- accordion heading start -->
17
+ <div class="accordion-heading">
18
+ <h6 class="is-small">Hello Accordion title</h6>
19
+ <button class="icon">
20
+ <i class="fa fa-plus" aria-hidden="true"></i>
21
+ </button>
22
+ </div>
23
+ <!-- accordion heading end -->
24
+ <!-- accordion body start -->
25
+ <div class="accordion-body">
26
+ <slot />
27
+ </div>
28
+ <!-- accordion body end -->
29
+ </div>
30
+ <!-- single accordion item end -->
31
+ </div>
32
+ </template>
33
+ <style lang="scss" scoped>
34
+ .ac-accordion-wrapper {
35
+ &.is-marginless {
36
+ .single-accordion-item {
37
+ margin: 0;
38
+ padding: 0;
39
+
40
+ .accordion-heading {
41
+ padding: 10px 20px;
42
+ position: relative;
43
+ z-index: 1;
44
+
45
+ &::after {
46
+ position: absolute;
47
+ content: "";
48
+ left: 0;
49
+ top: 0;
50
+ width: 4px;
51
+ height: 100%;
52
+ background-color: $primary;
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ .single-accordion-item {
59
+ background-color: $white-100;
60
+ padding: 15px 20px;
61
+ margin-bottom: 15px;
62
+ border-radius: 4px;
63
+ border: 1px solid $primary-90;
64
+
65
+ &.open {
66
+ .accordion-heading {
67
+ margin-bottom: 10px;
68
+ }
69
+ }
70
+
71
+ &:last-child {
72
+ margin-bottom: 0;
73
+ }
74
+
75
+ .accordion-heading {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: space-between;
79
+
80
+ h3 {
81
+ cursor: pointer;
82
+ }
83
+
84
+ button {
85
+ font-size: 12px;
86
+ letter-spacing: 0.1px;
87
+ }
88
+
89
+ .icon {
90
+ width: 20px;
91
+ height: 20px;
92
+ border: 1px solid $primary-90;
93
+ line-height: 20px;
94
+ display: flex;
95
+ justify-content: center;
96
+ align-items: center;
97
+ font-size: 10px;
98
+ border-radius: 50%;
99
+ cursor: pointer;
100
+ }
101
+ }
102
+
103
+ .accordion-body {
104
+ max-height: 0;
105
+ transition: max-height 0.2s ease-out;
106
+ overflow: hidden;
107
+
108
+ p {
109
+ font-size: 13px;
110
+ color: $primary-20;
111
+ line-height: 1.6;
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ .overview-body {
118
+ .ac-accordion-wrapper {
119
+ &.is-marginless {
120
+ .single-accordion-item {
121
+ .accordion-heading {
122
+ padding-bottom: 0;
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ /****************************************
130
+ Responsive Classes
131
+ *****************************************/
132
+ // Extra small devices (portrait phones, less than 576px)
133
+ @media (max-width: 575.98px) {
134
+ }
135
+
136
+ // Small devices (landscape phones, 576px and up)
137
+ @media (min-width: 576px) and (max-width: 767.98px) {
138
+ }
139
+
140
+ // Medium devices (tablets, 768px and up)
141
+ @media (min-width: 768px) and (max-width: 991.98px) {
142
+ }
143
+
144
+ // Large devices (desktops, 992px and up)
145
+ @media (min-width: 992px) and (max-width: 1199.98px) {
146
+ }
147
+
148
+ // Extra large devices (large desktops, 1200px and up)
149
+ @media (min-width: 1200px) {
150
+ }
151
+ </style>
@@ -0,0 +1,238 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ modifierClasses?: string;
4
+ }
5
+
6
+ withDefaults(defineProps<Props>(), {
7
+ modifierClasses: "",
8
+ });
9
+ </script>
10
+
11
+ <template>
12
+ <div :class="modifierClasses" class="ac-notification">
13
+ <p>
14
+ <slot />
15
+ </p>
16
+ </div>
17
+ </template>
18
+
19
+ <style lang="scss" scoped>
20
+ // for alert message
21
+ .ac-notification {
22
+ background-color: #dee7f5;
23
+ font-size: 13;
24
+ color: $primary;
25
+ min-height: 36px;
26
+ display: flex;
27
+ align-items: center;
28
+ padding: 8px 16px;
29
+ overflow: hidden;
30
+ border: 1px solid $primary;
31
+ border-radius: 4px;
32
+ justify-content: flex-start;
33
+ position: relative;
34
+ z-index: 1;
35
+ min-width: 280px;
36
+
37
+ p {
38
+ color: $primary;
39
+
40
+ .close-icon {
41
+ padding-right: 10px;
42
+ font-size: 15px;
43
+ }
44
+
45
+ a {
46
+ text-decoration: underline;
47
+ color: $primary;
48
+
49
+ &:hover {
50
+ color: hsla(
51
+ var(--hsl-hue),
52
+ var(--hsl-saturation),
53
+ calc(var(--hsl-lightness) - 10%),
54
+ 1
55
+ );
56
+ }
57
+ }
58
+ }
59
+
60
+ button.close {
61
+ background-color: transparent;
62
+ cursor: pointer;
63
+ right: 0px;
64
+ position: absolute;
65
+ box-shadow: none;
66
+ border: none;
67
+ font-size: 14px;
68
+ color: $danger;
69
+ width: 40px;
70
+ height: 100%;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ }
75
+ }
76
+
77
+ // mixin for .ac-notification
78
+ @mixin acNotification($colorName) {
79
+ background-color: scale-color($color: $colorName, $lightness: 80%);
80
+ color: $white-100;
81
+ border-color: $colorName;
82
+
83
+ p {
84
+ color: $colorName;
85
+
86
+ a {
87
+ color: $colorName;
88
+
89
+ &:hover {
90
+ color: $colorName;
91
+ opacity: 0.8;
92
+ }
93
+ }
94
+ }
95
+ }
96
+ @mixin acPrimaryNotification() {
97
+ background-color: hsla(
98
+ var(--hsl-hue),
99
+ var(--hsl-saturation),
100
+ var(--hsl-lightness),
101
+ 0.2
102
+ );
103
+ color: $white-100;
104
+ border-color: $primary;
105
+
106
+ p {
107
+ color: $primary;
108
+
109
+ a {
110
+ color: $primary;
111
+
112
+ &:hover {
113
+ color: $primary;
114
+ opacity: 0.8;
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ // is-primary
121
+ .ac-notification.is-primary {
122
+ @include acPrimaryNotification();
123
+ }
124
+
125
+ // is.info
126
+ .ac-notification.is-info {
127
+ @include acNotification($info);
128
+ }
129
+
130
+ // is.success
131
+ .ac-notification.is-success {
132
+ @include acNotification($success);
133
+ }
134
+
135
+ // is-error
136
+ .ac-notification.is-error {
137
+ @include acNotification($danger);
138
+ }
139
+
140
+ // is-warning
141
+ .ac-notification.is-warning {
142
+ @include acNotification($warning);
143
+ }
144
+
145
+ /*====================================
146
+ AC Toast
147
+ =====================================*/
148
+
149
+ .ac-toast {
150
+ width: 350px;
151
+ display: flex;
152
+ align-items: center;
153
+ justify-content: space-between;
154
+ font-size: 13px;
155
+ border-radius: 4px;
156
+ position: relative;
157
+ padding-right: 30px;
158
+ margin-bottom: 10px;
159
+
160
+ * {
161
+ color: $white-100;
162
+ }
163
+
164
+ p {
165
+ padding-left: 16px;
166
+
167
+ i.fa {
168
+ padding-right: 0 !important;
169
+ margin-right: 4px;
170
+ }
171
+ }
172
+
173
+ a {
174
+ font-weight: 500;
175
+ text-decoration: underline;
176
+ padding: 0 15px;
177
+
178
+ &:hover {
179
+ color: $black-70;
180
+ }
181
+ }
182
+
183
+ button.close-button {
184
+ border-radius: 0px;
185
+ background-color: transparent;
186
+ border: none;
187
+ color: $white-100;
188
+ position: absolute;
189
+ right: 0;
190
+ top: 0;
191
+ padding: 5px;
192
+ height: 100%;
193
+ width: 30px;
194
+ z-index: 1;
195
+ cursor: pointer;
196
+ border-left: 1px solid #dddddd;
197
+ }
198
+ }
199
+
200
+ // mixin for .ac-toast
201
+ @mixin acToast($colorName) {
202
+ background-color: $colorName;
203
+ color: $white-100;
204
+ border-color: $colorName;
205
+ }
206
+
207
+ // is-primary
208
+ .ac-toast.is-primary {
209
+ @include acToast($primary);
210
+ }
211
+
212
+ // is-info
213
+ .ac-toast.is-info {
214
+ @include acToast($info);
215
+ }
216
+
217
+ // is.success
218
+ .ac-toast.is-success {
219
+ @include acToast($success);
220
+ }
221
+
222
+ // is-error
223
+ .ac-toast.is-error {
224
+ @include acToast($danger);
225
+ }
226
+
227
+ // is-warning
228
+ .ac-toast.is-warning {
229
+ @include acToast($warning);
230
+ }
231
+
232
+ // dark theme start
233
+ // .is-dark-theme {
234
+ // .ac-notification.is-error {
235
+ // background-color: $dark-bg-light;
236
+ // }
237
+ // }
238
+ </style>
@@ -0,0 +1,79 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ modifierClasses?: string;
4
+ }
5
+
6
+ withDefaults(defineProps<Props>(), {
7
+ modifierClasses: "",
8
+ });
9
+ </script>
10
+
11
+ <template>
12
+ <div class="toast" :class="modifierClasses">
13
+ <div class="toast-header is-flex is-align-items-center">
14
+ <h6 class="mr-auto">Toast Header</h6>
15
+ <small>2 hours ago</small>
16
+ <button
17
+ type="button"
18
+ class="button ac-button is-transparent w-18 h-18 flex ml-8"
19
+ >
20
+ <span class="material-icons close-icon is-size-5">close</span>
21
+ </button>
22
+ </div>
23
+ <div class="toast-body">
24
+ <slot />
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <style lang="scss" scoped>
29
+ .ac-toast {
30
+ width: 350px;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: space-between;
34
+ font-size: 13px;
35
+ border-radius: 4px;
36
+ position: relative;
37
+ padding-right: 30px;
38
+ margin-bottom: 10px;
39
+
40
+ * {
41
+ color: $white-100;
42
+ }
43
+
44
+ p {
45
+ padding-left: 16px;
46
+
47
+ i.fa {
48
+ padding-right: 0 !important;
49
+ margin-right: 4px;
50
+ }
51
+ }
52
+
53
+ a {
54
+ font-weight: 500;
55
+ text-decoration: underline;
56
+ padding: 0 15px;
57
+
58
+ &:hover {
59
+ color: $black-90;
60
+ }
61
+ }
62
+
63
+ button.close-button {
64
+ border-radius: 0px;
65
+ background-color: transparent;
66
+ border: none;
67
+ color: $white-100;
68
+ position: absolute;
69
+ right: 0;
70
+ top: 0;
71
+ padding: 5px;
72
+ height: 100%;
73
+ width: 30px;
74
+ z-index: 1;
75
+ cursor: pointer;
76
+ border-left: 1px solid #dddddd;
77
+ }
78
+ }
79
+ </style>
@@ -0,0 +1,10 @@
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <div class="sign-up-notification mb-20">
5
+ <div class="notification-inner has-text-centered">
6
+ <h3><slot name="banner-title">Error!</slot></h3>
7
+ <slot><p>Oops!! There was an error while loading!</p></slot>
8
+ </div>
9
+ </div>
10
+ </template>
@@ -0,0 +1,104 @@
1
+ <script setup lang="ts">
2
+ import { watch, ref } from "vue";
3
+ import { useRoute } from "vue-router";
4
+
5
+ interface BreadCrumbType {
6
+ name: string;
7
+ path: string;
8
+ }
9
+
10
+ const list = ref<Array<BreadCrumbType>>([]);
11
+
12
+ const route = useRoute();
13
+
14
+ const pathReplaceWithParam = (path: string) => {
15
+ //Split the path and remove the first and last empty block
16
+ let splitPath = path.split("/").filter((element) => element !== "");
17
+
18
+ //Replace all element with query params where the element start with ":"
19
+ // Then again add them wthi "/" and return the path value
20
+ return splitPath.reduce((pval, cval) => {
21
+ if (cval[0] === ":") {
22
+ const cutIndex =
23
+ cval.indexOf("?") !== -1 ? cval.indexOf("?") : cval.length;
24
+ return (pval += route.params[cval.slice(1, cutIndex)] + "/");
25
+ } else return (pval += cval + "/");
26
+ }, "/");
27
+ };
28
+
29
+ const createVal = (startIdx: number, paths: Array<string>) => {
30
+ return paths.reduce((prev, curr, idx) => {
31
+ if (idx >= startIdx) {
32
+ if (idx + 1 === paths.length) return (prev += curr);
33
+ else return (prev += curr + " / ");
34
+ } else return prev + "";
35
+ }, "");
36
+ };
37
+
38
+ const createList = (paths: Array<string>) => {
39
+ //Split all the path and remove all empty block
40
+ let spath = paths.map((element) => {
41
+ return element.split("/").filter((word) => word !== "");
42
+ });
43
+
44
+ // Convert all the path arry in one arry where each element is the different fo previous element
45
+ return spath.reduce((prev, curr, currentIdx) => {
46
+ if (currentIdx === 0) return prev.concat([createVal(0, curr)]);
47
+ else return prev.concat([createVal(spath[currentIdx - 1].length, curr)]);
48
+ }, []);
49
+ };
50
+
51
+ const createBreadcrumbs = () => {
52
+ //Adding dynamic path to the route
53
+ const listPaths = route.matched.map((element) =>
54
+ pathReplaceWithParam(element.path)
55
+ );
56
+
57
+ //Removing the last duplicate value from the listpaths array
58
+ listPaths.pop();
59
+
60
+ //Createing the breadcrumb name
61
+ const listName = createList(listPaths);
62
+
63
+ //Set the new breadcrumb name and path value to list
64
+ list.value = listName.map((element, index) => {
65
+ return {
66
+ name: element,
67
+ path: listPaths[index],
68
+ };
69
+ });
70
+ };
71
+
72
+ watch(
73
+ () => route.path,
74
+ () => {
75
+ createBreadcrumbs();
76
+ },
77
+ {
78
+ immediate: true,
79
+ deep: true,
80
+ }
81
+ );
82
+ </script>
83
+
84
+ <template>
85
+ <div class="ac-breadcrumb">
86
+ <nav aria-label="breadcrumbs" class="breadcrumb">
87
+ <ul>
88
+ <li
89
+ v-for="(item, idx) in list"
90
+ :key="idx"
91
+ :class="{ 'is-active': idx === list.length - 1 }"
92
+ >
93
+ <router-link
94
+ class="router-link-active"
95
+ :class="{ 'is-active': idx === list.length - 1 }"
96
+ :to="item.path"
97
+ >{{ item.name }}
98
+ </router-link>
99
+ </li>
100
+ </ul>
101
+ </nav>
102
+ </div>
103
+ </template>
104
+ <style lang="scss"></style>