@appscode/design-system 1.1.0-alpha.8 → 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 +9 -5
  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 -114
  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
@@ -1,5 +1,9 @@
1
+ <script setup lang="ts"></script>
2
+
1
3
  <template>
2
4
  <div class="header-items is-flex is-align-items-center">
3
5
  <slot />
4
6
  </div>
5
7
  </template>
8
+
9
+ <style lang="scss" scoped></style>
@@ -0,0 +1,2 @@
1
+ <script setup lang="ts"></script>
2
+ <template><span>More...</span></template>
@@ -1,3 +1,7 @@
1
+ <script setup lang="ts">
2
+ import { ContentLoader } from "vue-content-loader";
3
+ </script>
4
+
1
5
  <template>
2
6
  <div>
3
7
  <content-loader>
@@ -69,15 +73,3 @@
69
73
  </content-loader>
70
74
  </div>
71
75
  </template>
72
-
73
- <script>
74
- import { defineAsyncComponent, defineComponent } from 'vue'
75
- export default defineComponent({
76
- name: 'LoaderElement',
77
- components: {
78
- ContentLoader: defineAsyncComponent(() =>
79
- import('vue-content-loader').then((module) => module.ContentLoader)
80
- ),
81
- },
82
- })
83
- </script>
@@ -1,3 +1,7 @@
1
+ <script setup lang="ts">
2
+ import { ContentLoader } from "vue-content-loader";
3
+ </script>
4
+
1
5
  <template>
2
6
  <div>
3
7
  <content-loader :width="200" :height="350" :speed="2">
@@ -20,15 +24,3 @@
20
24
  </content-loader>
21
25
  </div>
22
26
  </template>
23
-
24
- <script>
25
- import { defineAsyncComponent, defineComponent } from 'vue'
26
- export default defineComponent({
27
- name: 'LoaderElement',
28
- components: {
29
- ContentLoader: defineAsyncComponent(() =>
30
- import('vue-content-loader').then((module) => module.ContentLoader)
31
- ),
32
- },
33
- })
34
- </script>
@@ -1,21 +1,16 @@
1
- <template>
2
- <span href="" class="task-item" :class="[statusClass]">
3
- <i class="fa" :class="`fa-${statusIcon}`" />
4
- {{ title }}
5
- </span>
6
- </template>
7
-
8
1
  <script setup lang="ts">
9
2
  import { computed, toRefs } from "vue";
10
- import { TaskStatus } from "../../../typings/long-running-tasks.ts";
3
+ import type { TaskStatus } from "./../../types/longRunningTasks";
11
4
 
12
- const props = withDefaults(
13
- defineProps<{ title: string; status: TaskStatus }>(),
14
- {
15
- title: "",
16
- status: "Pending",
17
- }
18
- );
5
+ interface Props {
6
+ title?: string;
7
+ status?: TaskStatus;
8
+ }
9
+
10
+ const props = withDefaults(defineProps<Props>(), {
11
+ title: "no title",
12
+ status: "Pending",
13
+ });
19
14
 
20
15
  const { status } = toRefs(props);
21
16
  const statusClass = computed(() => `is-${status.value.toLowerCase()}`);
@@ -28,6 +23,13 @@ const statusIcon = computed(() => {
28
23
  });
29
24
  </script>
30
25
 
26
+ <template>
27
+ <span href="" class="task-item" :class="[statusClass]">
28
+ <i class="fa" :class="`fa-${statusIcon}`" />
29
+ {{ title }}
30
+ </span>
31
+ </template>
32
+
31
33
  <style scoped lang="scss">
32
34
  .task-item {
33
35
  font-size: 14px;
@@ -1,3 +1,89 @@
1
+ <script setup lang="ts">
2
+ import { defineAsyncComponent, ref, watch } from "vue";
3
+
4
+ interface Props {
5
+ open?: boolean;
6
+ title?: string;
7
+ modifierClasses?: string;
8
+ isCloseOptionDisabled?: boolean;
9
+ ignoreOutsideClick?: boolean;
10
+ hideActionFooter?: boolean;
11
+ }
12
+
13
+ const props = withDefaults(defineProps<Props>(), {
14
+ open: false,
15
+ title: "Modal",
16
+ modifierClasses: "",
17
+ isCloseOptionDisabled: false,
18
+ ignoreOutsideClick: false,
19
+ hideActionFooter: false,
20
+ });
21
+
22
+ const emit = defineEmits(["closemodal"]);
23
+
24
+ const HeaderItems = defineAsyncComponent(
25
+ () => import("./../header/HeaderItems.vue")
26
+ );
27
+ const HeaderItem = defineAsyncComponent(
28
+ () => import("./../header/HeaderItem.vue")
29
+ );
30
+ const Buttons = defineAsyncComponent(() => import("./../button/Buttons.vue"));
31
+ const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
32
+
33
+ //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
+ );
38
+
39
+ const showModal = ref(false);
40
+ const crossIcon = ref(
41
+ (
42
+ modalCloseIcon["/src/assets/icons/modal/close-icon.svg"] as Record<
43
+ string,
44
+ unknown
45
+ >
46
+ ).default as string
47
+ );
48
+
49
+ const onKeyDown = (e: KeyboardEvent) => {
50
+ if (props.open && e.keyCode === 27) {
51
+ // escape key
52
+ destroyModal();
53
+ }
54
+ };
55
+
56
+ const initializeModal = () => {
57
+ showModal.value = true;
58
+ document.addEventListener("keydown", onKeyDown);
59
+ };
60
+
61
+ const onModalOutsideClick = () => {
62
+ if (props.ignoreOutsideClick) return;
63
+ destroyModal();
64
+ };
65
+
66
+ const destroyModal = () => {
67
+ if (props.isCloseOptionDisabled) return;
68
+ showModal.value = false;
69
+ document.removeEventListener("keydown", onKeyDown);
70
+
71
+ emit("closemodal", true);
72
+ };
73
+
74
+ watch(
75
+ () => props.open,
76
+ (n) => {
77
+ if (n) {
78
+ initializeModal();
79
+ } else {
80
+ destroyModal();
81
+ }
82
+ },
83
+ { immediate: true }
84
+ );
85
+ </script>
86
+
1
87
  <template>
2
88
  <teleport to="#modals">
3
89
  <!-- for transition https://github.com/adamwathan/vue-tailwind-examples/blob/master/src/components/Modal.vue -->
@@ -30,7 +116,6 @@
30
116
  <!-- modal body start -->
31
117
  <div
32
118
  class="ac-modal-body ac-vscrollbar"
33
- :class="modifierBodyClasses"
34
119
  data-testid="ac-modal-content-with-scroll"
35
120
  >
36
121
  <div class="ac-modal-content">
@@ -59,105 +144,216 @@
59
144
  </teleport>
60
145
  </template>
61
146
 
62
- <script>
63
- import { defineComponent, defineAsyncComponent } from "vue";
147
+ <style lang="scss" scoped>
148
+ // modal start
149
+ .ac-modal {
150
+ // position: relative;
151
+ min-height: 100vh;
152
+ position: fixed;
153
+ width: 100%;
154
+ left: 0;
155
+ top: 0;
156
+ z-index: 9999;
64
157
 
65
- const modalCloseIcon = import.meta.glob(
66
- "/src/assets/icons/modal/close-icon.svg",
67
- { eager: true }
68
- );
158
+ &:after {
159
+ position: absolute;
160
+ content: "";
161
+ left: 0;
162
+ top: 0;
163
+ width: 100%;
164
+ height: 100%;
165
+ background-color: $primary-5;
166
+ z-index: -1;
167
+ opacity: 0.5;
168
+ }
69
169
 
70
- export default defineComponent({
71
- props: {
72
- open: {
73
- type: Boolean,
74
- default: false,
75
- },
76
- title: {
77
- type: String,
78
- default: "Modal",
79
- },
80
- modifierClasses: {
81
- type: String,
82
- default: "",
83
- },
84
- isCloseOptionDisabled: {
85
- type: Boolean,
86
- default: false,
87
- },
88
- ignoreOutsideClick: {
89
- type: Boolean,
90
- default: false,
91
- },
92
- hideActionFooter: {
93
- type: Boolean,
94
- default: false,
95
- },
96
- modifierBodyClasses: {
97
- type: String,
98
- default: "",
99
- },
100
- },
101
- emits: ["closemodal"],
102
-
103
- components: {
104
- HeaderItems: defineAsyncComponent(() =>
105
- import("../../v2/header/HeaderItems.vue").then((module) => module.default)
106
- ),
107
- HeaderItem: defineAsyncComponent(() =>
108
- import("../../v2/header/HeaderItem.vue").then((module) => module.default)
109
- ),
110
- Buttons: defineAsyncComponent(() =>
111
- import("../../v2/button/Buttons.vue").then((module) => module.default)
112
- ),
113
- AcButton: defineAsyncComponent(() =>
114
- import("../button/Button.vue").then((module) => module.default)
115
- ),
116
- },
170
+ &.is-small {
171
+ .ac-modal-inner {
172
+ border-radius: 4px;
173
+ width: 446px;
174
+ }
175
+ }
117
176
 
118
- data() {
119
- return {
120
- showModal: false,
121
- crossIcon:
122
- modalCloseIcon["/src/assets/icons/modal/close-icon.svg"].default,
123
- };
124
- },
177
+ &.is-normal {
178
+ .ac-modal-inner {
179
+ width: 518px;
180
+ }
181
+ }
182
+
183
+ &.is-medium {
184
+ .ac-modal-inner {
185
+ width: 800px;
186
+ }
187
+ }
188
+
189
+ &.is-large {
190
+ .ac-modal-inner {
191
+ width: 1000px !important;
192
+ }
193
+ }
194
+
195
+ .ac-modal-inner {
196
+ margin: 0 auto;
197
+ background-color: $white-100;
198
+ border-radius: 4px;
199
+ overflow: hidden;
200
+ box-shadow: 12px 26px 118px rgba(0, 0, 0, 0.16);
201
+
202
+ .ac-modal-header {
203
+ background-color: $white-100;
204
+ padding: 10px 20px;
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: space-between;
208
+ border: 1px solid $primary-90;
209
+
210
+ h6 {
211
+ color: $primary-10;
212
+ }
125
213
 
126
- watch: {
127
- open: {
128
- immediate: true,
129
- handler(n) {
130
- if (n) {
131
- this.initializeModal();
132
- } else {
133
- this.destroyModal();
214
+ .ms-close-button {
215
+ button {
216
+ cursor: pointer;
217
+ padding: 3px 5px;
218
+ color: $primary-10;
219
+ }
220
+ }
221
+ }
222
+
223
+ .ac-modal-body {
224
+ padding: 20px;
225
+ max-height: calc(100vh - 230px);
226
+ overflow-y: auto;
227
+
228
+ .ac-modal-content {
229
+ img {
230
+ // width: 100%;
231
+ height: auto;
134
232
  }
135
- },
136
- },
137
- },
138
233
 
139
- methods: {
140
- onKeyDown(e) {
141
- if (this.open && e.keyCode === 27) {
142
- // escape key
143
- this.destroyModal();
234
+ .action-message {
235
+ p {
236
+ font-size: 16px;
237
+ margin-bottom: 10px;
238
+
239
+ &:last-child {
240
+ margin-bottom: 0;
241
+ }
242
+
243
+ &.is-description {
244
+ font-weight: 400;
245
+ color: $primary-10;
246
+
247
+ strong {
248
+ font-weight: 500;
249
+ }
250
+ }
251
+ }
252
+ }
144
253
  }
145
- },
146
- initializeModal() {
147
- this.showModal = true;
148
- document.addEventListener("keydown", this.onKeyDown);
149
- },
150
- onModalOutsideClick() {
151
- if (this.ignoreOutsideClick) return;
152
- this.destroyModal();
153
- },
154
- destroyModal() {
155
- if (this.isCloseOptionDisabled) return;
156
- this.showModal = false;
157
- document.removeEventListener("keydown", this.onKeyDown);
158
-
159
- this.$emit("closemodal", true);
160
- },
161
- },
162
- });
163
- </script>
254
+ }
255
+
256
+ .ac-modal-footer {
257
+ border-top: 1px solid $primary-90;
258
+ padding: 10px 20px;
259
+ }
260
+ }
261
+ }
262
+
263
+ /****************************************
264
+ Responsive Classes
265
+ *****************************************/
266
+ // Extra small devices (portrait phones, less than 576px)
267
+ @media (max-width: 575.98px) {
268
+ .ac-modal {
269
+ &.is-small {
270
+ .ac-modal-inner {
271
+ width: 266px;
272
+ }
273
+ }
274
+
275
+ &.is-normal {
276
+ .ac-modal-inner {
277
+ width: calc(100% - 15px);
278
+ }
279
+ }
280
+
281
+ &.is-medium {
282
+ .ac-modal-inner {
283
+ width: calc(100% - 15px);
284
+ }
285
+ }
286
+
287
+ &.is-large {
288
+ .ac-modal-inner {
289
+ width: calc(100% - 15px);
290
+ }
291
+ }
292
+
293
+ .action-message.pt-35.pb-35 {
294
+ padding-top: 20px !important;
295
+ padding-bottom: 20px !important;
296
+ }
297
+ }
298
+ }
299
+
300
+ // Small devices (landscape phones, 576px and up)
301
+ @media (min-width: 576px) and (max-width: 767.98px) {
302
+ .ac-modal {
303
+ &.is-small {
304
+ .ac-modal-inner {
305
+ width: 266px;
306
+ }
307
+ }
308
+
309
+ &.is-normal {
310
+ .ac-modal-inner {
311
+ width: calc(100% - 15px);
312
+ }
313
+ }
314
+
315
+ &.is-medium {
316
+ .ac-modal-inner {
317
+ width: calc(100% - 15px);
318
+ }
319
+ }
320
+
321
+ &.is-large {
322
+ .ac-modal-inner {
323
+ width: calc(100% - 15px);
324
+ }
325
+ }
326
+ }
327
+ }
328
+
329
+ // Medium devices (tablets, 768px and up)
330
+ @media (min-width: 768px) and (max-width: 991.98px) {
331
+ .ac-modal {
332
+ &.is-normal {
333
+ .ac-modal-inner {
334
+ width: calc(100% - 50px);
335
+ }
336
+ }
337
+
338
+ &.is-medium {
339
+ .ac-modal-inner {
340
+ width: calc(100% - 50px);
341
+ }
342
+ }
343
+
344
+ &.is-large {
345
+ .ac-modal-inner {
346
+ width: calc(100% - 50px);
347
+ }
348
+ }
349
+ }
350
+ }
351
+
352
+ // Large devices (desktops, 992px and up)
353
+ @media (min-width: 992px) and (max-width: 1199.98px) {
354
+ }
355
+
356
+ // Extra large devices (large desktops, 1200px and up)
357
+ @media (min-width: 1200px) {
358
+ }
359
+ </style>
@@ -1,5 +1,42 @@
1
+ <script setup lang="ts">
2
+ import { defineAsyncComponent } from "vue";
3
+
4
+ interface Props {
5
+ open?: boolean;
6
+ title?: string;
7
+ message?: string;
8
+ itemName?: string;
9
+ isLoading?: boolean;
10
+ isDeleteActive?: boolean;
11
+ }
12
+
13
+ withDefaults(defineProps<Props>(), {
14
+ open: false,
15
+ title: "",
16
+ message: "",
17
+ itemName: "",
18
+ isLoading: false,
19
+ isDeleteActive: false,
20
+ });
21
+
22
+ const emit = defineEmits(["closemodal", "delete-confirmation-modal$confirm"]);
23
+
24
+ const confirm = (response: boolean) => {
25
+ emit("delete-confirmation-modal$confirm", response);
26
+ };
27
+
28
+ const closeModal = () => {
29
+ confirm(false);
30
+ emit("closemodal", true);
31
+ };
32
+
33
+ const Modal = defineAsyncComponent(() => import("./../modal/Modal.vue"));
34
+ const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
35
+ </script>
36
+
1
37
  <template>
2
38
  <!-- modal start -->
39
+
3
40
  <modal
4
41
  :title="title"
5
42
  modifier-classes="is-normal"
@@ -33,53 +70,3 @@
33
70
  </modal>
34
71
  <!-- modal end -->
35
72
  </template>
36
-
37
- <script>
38
- import { defineComponent, defineAsyncComponent } from "vue";
39
- export default defineComponent({
40
- components: {
41
- Modal: defineAsyncComponent(() =>
42
- import("../modal/Modal.vue").then((module) => module.default)
43
- ),
44
- AcButton: defineAsyncComponent(() =>
45
- import("../button/Button.vue").then((module) => module.default)
46
- ),
47
- },
48
- props: {
49
- open: {
50
- type: Boolean,
51
- default: false,
52
- },
53
- title: {
54
- type: String,
55
- default: "",
56
- },
57
- message: {
58
- type: String,
59
- default: "",
60
- },
61
- itemName: {
62
- type: String,
63
- default: "",
64
- },
65
- isLoading: {
66
- type: Boolean,
67
- default: false,
68
- },
69
- isDeleteActive: {
70
- type: Boolean,
71
- default: false,
72
- },
73
- },
74
- emits: ["closemodal", "delete-confirmation-modal$confirm"],
75
- methods: {
76
- confirm(response) {
77
- this.$emit("delete-confirmation-modal$confirm", response);
78
- },
79
- closeModal() {
80
- this.confirm(false);
81
- this.$emit("closemodal", true);
82
- },
83
- },
84
- });
85
- </script>