@appscode/design-system 1.1.0 → 2.0.0

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 (215) hide show
  1. package/base/_video-player.scss +65 -0
  2. package/base/utilities/_all.scss +7 -5
  3. package/base/utilities/_colors.scss +377 -0
  4. package/base/utilities/_customize-bulma.scss +23 -27
  5. package/base/utilities/_extended.scss +39 -0
  6. package/base/utilities/{_default.scss → _global.scss} +192 -333
  7. package/base/utilities/_layouts.scss +19 -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/components/_ac-alert-box.scss +205 -263
  12. package/components/_ac-calendar.scss +4 -4
  13. package/components/_ac-code-highlight.scss +13 -16
  14. package/components/_ac-content-layout.scss +165 -165
  15. package/components/_ac-drag.scss +13 -13
  16. package/components/_ac-modal.scss +212 -212
  17. package/components/_ac-options.scss +122 -123
  18. package/components/_ac-select-box.scss +10 -10
  19. package/components/_ac-table.scss +503 -502
  20. package/components/_ac-tabs.scss +65 -61
  21. package/components/_ac-tags.scss +116 -116
  22. package/components/_accordion.scss +117 -0
  23. package/components/_add-card.scss +3 -3
  24. package/components/_all.scss +35 -28
  25. package/components/_app-drawer.scss +0 -134
  26. package/components/_breadcumb.scss +0 -71
  27. package/components/_buttons.scss +779 -779
  28. package/components/_card-body-wrapper.scss +5 -5
  29. package/components/_dashboard-header.scss +0 -115
  30. package/components/_direct-deploy.scss +8 -8
  31. package/components/_getkeeper.scss +110 -0
  32. package/components/_go-to-top.scss +1 -1
  33. package/components/_graph.scss +10 -10
  34. package/components/_image-upload.scss +9 -9
  35. package/components/_input-card.scss +232 -0
  36. package/components/_input.scss +573 -0
  37. package/components/_left-sidebar-menu.scss +452 -587
  38. package/components/_monaco-editor.scss +2 -2
  39. package/components/{_ac-multi-select.scss → _multi-select.scss} +89 -251
  40. package/components/_navbar.scss +786 -752
  41. package/components/_nested-list.scss +3 -3
  42. package/components/_overview-info.scss +10 -10
  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 +14 -14
  49. package/components/_progress-bar.scss +73 -86
  50. package/components/_subscription-card.scss +22 -24
  51. package/components/_table-of-content.scss +8 -8
  52. package/components/{_ac-terminal.scss → _terminal.scss} +114 -81
  53. package/components/_tfa.scss +9 -9
  54. package/components/_transitions.scss +35 -0
  55. package/components/_widget-menu.scss +252 -257
  56. package/components/_wizard.scss +518 -793
  57. package/components/ac-toaster/_ac-toasted.scss +11 -16
  58. package/components/bbum/_activities-header.scss +1 -1
  59. package/components/bbum/_card-team.scss +12 -12
  60. package/components/bbum/_information-center.scss +21 -23
  61. package/components/bbum/_left-sidebar.scss +8 -8
  62. package/components/bbum/_mobile-desktop.scss +16 -21
  63. package/components/bbum/_post.scss +5 -5
  64. package/components/bbum/_sign-up-notification.scss +10 -10
  65. package/components/bbum/_single-post-preview.scss +29 -29
  66. package/components/bbum/_user-profile.scss +10 -10
  67. package/components/ui-builder/_ui-builder.scss +221 -31
  68. package/components/ui-builder/_vue-open-api.scss +565 -7
  69. package/icons/close-icon.svg +3 -0
  70. package/layouts/_code-preview.scss +17 -18
  71. package/main.scss +26 -10
  72. package/package.json +1 -1
  73. package/plugins/theme.js +11 -9
  74. package/plugins/vue-toaster.js +1 -1
  75. package/vue-components/images/icons/cluster-icon.svg +10 -0
  76. package/vue-components/images/icons/org-icon.svg +10 -0
  77. package/vue-components/plugins/time-convert.js +49 -0
  78. package/vue-components/types/cluster.ts +6 -0
  79. package/vue-components/types/importFlow.ts +16 -0
  80. package/vue-components/types/notification.ts +6 -0
  81. package/vue-components/types/previewYaml.ts +8 -0
  82. package/vue-components/types/table.ts +55 -0
  83. package/vue-components/types/theme.ts +10 -0
  84. package/vue-components/types/user.ts +22 -0
  85. package/vue-components/v2/banner/Banner.vue +1 -1
  86. package/vue-components/v2/button/Buttons.vue +1 -1
  87. package/vue-components/v2/card/Card.vue +1 -1
  88. package/vue-components/v2/card/OverviewCards.vue +17 -2
  89. package/vue-components/v2/content/ContentTable.vue +14 -9
  90. package/vue-components/v2/editor/FilteredFileEditor.vue +2 -2
  91. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
  92. package/vue-components/v2/icons/Ellipsis.vue +2 -1
  93. package/vue-components/v2/modal/Modal.vue +2 -6
  94. package/vue-components/v2/navbar/Appdrawer.vue +37 -12
  95. package/vue-components/v2/navbar/Navbar.vue +3 -3
  96. package/vue-components/v2/navbar/NavbarItem.vue +3 -1
  97. package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
  98. package/vue-components/v2/navbar/User.vue +5 -22
  99. package/vue-components/v2/pagination/Pagination.vue +66 -0
  100. package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
  101. package/{components/_ac-accordion.scss → vue-components/v3/accordion/Accordion.vue} +40 -6
  102. package/vue-components/v3/alert/Alert.vue +238 -0
  103. package/vue-components/v3/alert/Toast.vue +79 -0
  104. package/vue-components/v3/banner/Banner.vue +10 -0
  105. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +166 -0
  106. package/vue-components/v3/button/Button.vue +110 -57
  107. package/vue-components/v3/button/Buttons.vue +22 -0
  108. package/vue-components/v3/button/DownloadBtn.vue +31 -0
  109. package/vue-components/v3/cards/Card.vue +32 -0
  110. package/vue-components/v3/cards/CardContent.vue +7 -0
  111. package/vue-components/v3/cards/CardHeader.vue +14 -0
  112. package/vue-components/v3/cards/Cards.vue +7 -0
  113. package/vue-components/v3/cards/Cluster.vue +159 -0
  114. package/vue-components/v3/cards/Counter.vue +39 -0
  115. package/vue-components/v3/cards/FeatureCard.vue +67 -0
  116. package/vue-components/v3/cards/FeatureCards.vue +6 -0
  117. package/vue-components/v3/cards/InfoCard.vue +242 -0
  118. package/vue-components/v3/cards/Monitoring.vue +90 -0
  119. package/vue-components/v3/cards/OrgClusterCard.vue +86 -0
  120. package/vue-components/v3/cards/OverviewCard.vue +28 -0
  121. package/vue-components/v3/cards/OverviewCards.vue +39 -0
  122. package/vue-components/v3/cards/Payment.vue +62 -0
  123. package/vue-components/v3/cards/Vendor.vue +89 -0
  124. package/vue-components/v3/content/ContentHeader.vue +39 -30
  125. package/vue-components/v3/content/ContentLayout.vue +20 -0
  126. package/vue-components/v3/content/ContentTable.vue +44 -58
  127. package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
  128. package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
  129. package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
  130. package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
  131. package/vue-components/v3/editor/Editor.vue +117 -115
  132. package/vue-components/v3/editor/FilteredFileEditor.vue +325 -128
  133. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +73 -94
  134. package/vue-components/v3/footer/FooterArea.vue +40 -0
  135. package/vue-components/v3/footer/FooterItem.vue +32 -0
  136. package/vue-components/v3/footer/FooterItems.vue +15 -0
  137. package/vue-components/v3/footer/Info.vue +25 -0
  138. package/vue-components/v3/footer/Status.vue +43 -0
  139. package/vue-components/v3/footer/Usage.vue +34 -0
  140. package/vue-components/v3/form/Form.vue +24 -36
  141. package/vue-components/v3/form/FormFooter.vue +24 -0
  142. package/vue-components/v3/form/FormFooterControl.vue +7 -0
  143. package/vue-components/v3/form/FormFooterControls.vue +7 -0
  144. package/vue-components/v3/form-fields/AcSingleInput.vue +21 -0
  145. package/vue-components/v3/form-fields/FileUpload.vue +89 -0
  146. package/vue-components/v3/form-fields/Input.vue +19 -15
  147. package/vue-components/v3/header/Header.vue +120 -26
  148. package/vue-components/v3/header/HeaderItem.vue +18 -0
  149. package/vue-components/v3/header/HeaderItems.vue +4 -0
  150. package/vue-components/v3/icons/Ellipsis.vue +2 -0
  151. package/vue-components/v3/loaders/ClusterSwitcherLoader.vue +13 -0
  152. package/vue-components/v3/loaders/InfoCardLoader.vue +19 -0
  153. package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
  154. package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
  155. package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
  156. package/vue-components/v3/modal/Modal.vue +294 -95
  157. package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
  158. package/vue-components/v3/modals/JsonShowModal.vue +63 -68
  159. package/vue-components/v3/navbar/Appdrawer.vue +198 -51
  160. package/vue-components/v3/navbar/Navbar.vue +139 -0
  161. package/vue-components/v3/navbar/NavbarItem.vue +103 -0
  162. package/vue-components/v3/navbar/NavbarItemContent.vue +282 -0
  163. package/vue-components/v3/navbar/Notification.vue +207 -0
  164. package/vue-components/v3/navbar/ThemeMode.vue +128 -112
  165. package/vue-components/v3/navbar/User.vue +394 -267
  166. package/vue-components/v3/notification/AlertBox.vue +266 -39
  167. package/vue-components/v3/notification/Notification.vue +50 -44
  168. package/vue-components/v3/notification/NotificationItem.vue +51 -19
  169. package/vue-components/v3/option-dots/Options.vue +197 -0
  170. package/vue-components/v3/pagination/Pagination.vue +216 -102
  171. package/vue-components/v3/preloader/Preloader.vue +23 -0
  172. package/vue-components/v3/searchbars/SearchBar.vue +50 -34
  173. package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
  174. package/vue-components/v3/sidebar/ClusterSwitcher.vue +71 -86
  175. package/vue-components/v3/sidebar/Sidebar.vue +239 -0
  176. package/vue-components/v3/sidebar/SidebarBody.vue +14 -0
  177. package/vue-components/v3/sidebar/SidebarFooter.vue +89 -0
  178. package/vue-components/v3/sidebar/SidebarHeader.vue +131 -0
  179. package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
  180. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
  181. package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
  182. package/vue-components/v3/sidebar/Steps.vue +152 -0
  183. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +204 -0
  184. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +44 -0
  185. package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
  186. package/vue-components/v3/tab/TabItem.vue +10 -12
  187. package/vue-components/v3/tab/Tabs.vue +36 -0
  188. package/vue-components/v3/tab/TabsBody.vue +7 -0
  189. package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
  190. package/vue-components/v3/table/FakeTableCell.vue +22 -31
  191. package/vue-components/v3/table/InfoTable.vue +89 -61
  192. package/vue-components/v3/table/MultiInfoTable.vue +72 -95
  193. package/vue-components/v3/table/Table.vue +596 -157
  194. package/vue-components/v3/table/TableCell.vue +13 -24
  195. package/vue-components/v3/table/TableContainer.vue +50 -28
  196. package/vue-components/v3/table/TableRow.vue +65 -87
  197. package/vue-components/v3/table/table-cell/ArrayCell.vue +94 -103
  198. package/vue-components/v3/table/table-cell/CellValue.vue +74 -106
  199. package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
  200. package/vue-components/v3/table/table-cell/ObjectCell.vue +91 -101
  201. package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
  202. package/vue-components/v3/tabs/EditorTabs.vue +18 -24
  203. package/vue-components/v3/tag/Tag.vue +16 -12
  204. package/vue-components/v3/tag/Tags.vue +7 -0
  205. package/base/utilities/_derived-variables.scss +0 -25
  206. package/base/utilities/_initial-variables.scss +0 -215
  207. package/base/utilities/dark-theme.scss +0 -26
  208. package/components/_ac-card.scss +0 -597
  209. package/components/_ac-input.scss +0 -876
  210. package/mixins/stickyContent.js +0 -141
  211. package/plugins/caching.ts +0 -243
  212. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -92
  213. package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -400
  214. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -148
  215. /package/components/{_ac-report.scss → _report.scss} +0 -0
@@ -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>
@@ -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,3 +1,88 @@
1
+ <script setup lang="ts">
2
+ import { defineAsyncComponent, ref, watch } from "vue";
3
+ import { onClickOutside } from "@vueuse/core";
4
+
5
+ interface Props {
6
+ open?: boolean;
7
+ title?: string;
8
+ modifierClasses?: string;
9
+ isCloseOptionDisabled?: boolean;
10
+ ignoreOutsideClick?: boolean;
11
+ hideActionFooter?: boolean;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<Props>(), {
15
+ open: false,
16
+ title: "Modal",
17
+ modifierClasses: "",
18
+ isCloseOptionDisabled: false,
19
+ ignoreOutsideClick: false,
20
+ hideActionFooter: false,
21
+ });
22
+
23
+ const emit = defineEmits(["closemodal"]);
24
+
25
+ const HeaderItems = defineAsyncComponent(
26
+ () => import("./../header/HeaderItems.vue")
27
+ );
28
+ const HeaderItem = defineAsyncComponent(
29
+ () => import("./../header/HeaderItem.vue")
30
+ );
31
+ const Buttons = defineAsyncComponent(() => import("./../button/Buttons.vue"));
32
+ const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
33
+
34
+ //TODO: need to update not a currect way to import the file
35
+ const modalCloseIcon = import.meta.glob("../../../icons/close-icon.svg", {
36
+ eager: true,
37
+ });
38
+
39
+ const modal = ref();
40
+ const showModal = ref(false);
41
+ const crossIcon = ref(
42
+ (modalCloseIcon["../../../icons/close-icon.svg"] as Record<string, unknown>)
43
+ ?.default as string
44
+ );
45
+
46
+ const onKeyDown = (e: KeyboardEvent) => {
47
+ if (props.open && e.keyCode === 27) {
48
+ // escape key
49
+ destroyModal();
50
+ }
51
+ };
52
+
53
+ const initializeModal = () => {
54
+ showModal.value = true;
55
+ document.addEventListener("keydown", onKeyDown);
56
+ };
57
+
58
+ const onModalOutsideClick = () => {
59
+ if (props.ignoreOutsideClick) return;
60
+ destroyModal();
61
+ };
62
+
63
+ onClickOutside(modal, onModalOutsideClick);
64
+
65
+ const destroyModal = () => {
66
+ if (props.isCloseOptionDisabled) return;
67
+ showModal.value = false;
68
+ document.removeEventListener("keydown", onKeyDown);
69
+
70
+ emit("closemodal", true);
71
+ };
72
+
73
+ watch(
74
+ () => props.open,
75
+ (n) => {
76
+ if (n) {
77
+ initializeModal();
78
+ } else {
79
+ destroyModal();
80
+ }
81
+ },
82
+ { immediate: true }
83
+ );
84
+ </script>
85
+
1
86
  <template>
2
87
  <teleport to="#modals">
3
88
  <!-- for transition https://github.com/adamwathan/vue-tailwind-examples/blob/master/src/components/Modal.vue -->
@@ -6,18 +91,17 @@
6
91
  v-if="showModal"
7
92
  class="ac-modal is-middle-alignment"
8
93
  :class="modifierClasses"
9
- @click.self="onModalOutsideClick"
10
94
  >
11
- <div class="ac-modal-inner">
95
+ <div ref="modal" class="ac-modal-inner">
12
96
  <!-- modal header start -->
13
97
  <div class="ac-modal-header">
14
- <h6>{{ title }}</h6>
98
+ <h5>{{ title }}</h5>
15
99
  <header-items>
16
100
  <slot name="modal-header-controls" />
17
101
  <header-item>
18
102
  <ac-button
103
+ v-if="!isCloseOptionDisabled"
19
104
  modifier-classes="is-square is-transparent"
20
- :disabled="isCloseOptionDisabled"
21
105
  :icon-image="crossIcon"
22
106
  @click.stop="destroyModal"
23
107
  data-testid="modal-generic-close-icon"
@@ -58,101 +142,216 @@
58
142
  </teleport>
59
143
  </template>
60
144
 
61
- <script>
62
- import { defineComponent, defineAsyncComponent } from "vue";
145
+ <style lang="scss" scoped>
146
+ // modal start
147
+ .ac-modal {
148
+ // position: relative;
149
+ min-height: 100vh;
150
+ position: fixed;
151
+ width: 100%;
152
+ left: 0;
153
+ top: 0;
154
+ z-index: 9999;
63
155
 
64
- const modalCloseIcon = import.meta.glob(
65
- "/src/assets/icons/modal/close-icon.svg",
66
- { eager: true }
67
- );
156
+ &:after {
157
+ position: absolute;
158
+ content: "";
159
+ left: 0;
160
+ top: 0;
161
+ width: 100%;
162
+ height: 100%;
163
+ background-color: $primary-5;
164
+ z-index: -1;
165
+ opacity: 0.5;
166
+ }
68
167
 
69
- export default defineComponent({
70
- props: {
71
- open: {
72
- type: Boolean,
73
- default: false,
74
- },
75
- title: {
76
- type: String,
77
- default: "Modal",
78
- },
79
- modifierClasses: {
80
- type: String,
81
- default: "",
82
- },
83
- isCloseOptionDisabled: {
84
- type: Boolean,
85
- default: false,
86
- },
87
- ignoreOutsideClick: {
88
- type: Boolean,
89
- default: false,
90
- },
91
- hideActionFooter: {
92
- type: Boolean,
93
- default: false,
94
- },
95
- },
96
- emits: ["closemodal"],
97
-
98
- components: {
99
- HeaderItems: defineAsyncComponent(() =>
100
- import("../../v2/header/HeaderItems.vue").then((module) => module.default)
101
- ),
102
- HeaderItem: defineAsyncComponent(() =>
103
- import("../../v2/header/HeaderItem.vue").then((module) => module.default)
104
- ),
105
- Buttons: defineAsyncComponent(() =>
106
- import("../../v2/button/Buttons.vue").then((module) => module.default)
107
- ),
108
- AcButton: defineAsyncComponent(() =>
109
- import("../button/Button.vue").then((module) => module.default)
110
- ),
111
- },
168
+ &.is-small {
169
+ .ac-modal-inner {
170
+ border-radius: 4px;
171
+ width: 446px;
172
+ }
173
+ }
112
174
 
113
- data() {
114
- return {
115
- showModal: false,
116
- crossIcon:
117
- modalCloseIcon["/src/assets/icons/modal/close-icon.svg"].default,
118
- };
119
- },
175
+ &.is-normal {
176
+ .ac-modal-inner {
177
+ width: 518px;
178
+ }
179
+ }
180
+
181
+ &.is-medium {
182
+ .ac-modal-inner {
183
+ width: 800px;
184
+ }
185
+ }
120
186
 
121
- watch: {
122
- open: {
123
- immediate: true,
124
- handler(n) {
125
- if (n) {
126
- this.initializeModal();
127
- } else {
128
- this.destroyModal();
187
+ &.is-large {
188
+ .ac-modal-inner {
189
+ width: 1000px !important;
190
+ }
191
+ }
192
+
193
+ .ac-modal-inner {
194
+ margin: 0 auto;
195
+ background-color: $white-100;
196
+ border-radius: 4px;
197
+ overflow: hidden;
198
+ box-shadow: 12px 26px 118px rgba(0, 0, 0, 0.16);
199
+
200
+ .ac-modal-header {
201
+ background-color: $white-100;
202
+ padding: 10px 20px;
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: space-between;
206
+ border: 1px solid $primary-90;
207
+
208
+ h6 {
209
+ color: $primary-10;
210
+ }
211
+
212
+ .ms-close-button {
213
+ button {
214
+ cursor: pointer;
215
+ padding: 3px 5px;
216
+ color: $primary-10;
129
217
  }
130
- },
131
- },
132
- },
218
+ }
219
+ }
220
+
221
+ .ac-modal-body {
222
+ padding: 20px;
223
+ max-height: calc(100vh - 230px);
224
+ overflow-y: auto;
133
225
 
134
- methods: {
135
- onKeyDown(e) {
136
- if (this.open && e.keyCode === 27) {
137
- // escape key
138
- this.destroyModal();
226
+ .ac-modal-content {
227
+ img {
228
+ // width: 100%;
229
+ height: auto;
230
+ }
231
+
232
+ .action-message {
233
+ p {
234
+ font-size: 16px;
235
+ margin-bottom: 10px;
236
+
237
+ &:last-child {
238
+ margin-bottom: 0;
239
+ }
240
+
241
+ &.is-description {
242
+ font-weight: 400;
243
+ color: $primary-10;
244
+
245
+ strong {
246
+ font-weight: 500;
247
+ }
248
+ }
249
+ }
250
+ }
139
251
  }
140
- },
141
- initializeModal() {
142
- this.showModal = true;
143
- document.addEventListener("keydown", this.onKeyDown);
144
- },
145
- onModalOutsideClick() {
146
- if (this.ignoreOutsideClick) return;
147
- this.destroyModal();
148
- },
149
- destroyModal() {
150
- if (this.isCloseOptionDisabled) return;
151
- this.showModal = false;
152
- document.removeEventListener("keydown", this.onKeyDown);
153
-
154
- this.$emit("closemodal", true);
155
- },
156
- },
157
- });
158
- </script>
252
+ }
253
+
254
+ .ac-modal-footer {
255
+ border-top: 1px solid $primary-90;
256
+ padding: 10px 20px;
257
+ }
258
+ }
259
+ }
260
+
261
+ /****************************************
262
+ Responsive Classes
263
+ *****************************************/
264
+ // Extra small devices (portrait phones, less than 576px)
265
+ @media (max-width: 575.98px) {
266
+ .ac-modal {
267
+ &.is-small {
268
+ .ac-modal-inner {
269
+ width: 266px;
270
+ }
271
+ }
272
+
273
+ &.is-normal {
274
+ .ac-modal-inner {
275
+ width: calc(100% - 15px);
276
+ }
277
+ }
278
+
279
+ &.is-medium {
280
+ .ac-modal-inner {
281
+ width: calc(100% - 15px);
282
+ }
283
+ }
284
+
285
+ &.is-large {
286
+ .ac-modal-inner {
287
+ width: calc(100% - 15px);
288
+ }
289
+ }
290
+
291
+ .action-message.pt-35.pb-35 {
292
+ padding-top: 20px !important;
293
+ padding-bottom: 20px !important;
294
+ }
295
+ }
296
+ }
297
+
298
+ // Small devices (landscape phones, 576px and up)
299
+ @media (min-width: 576px) and (max-width: 767.98px) {
300
+ .ac-modal {
301
+ &.is-small {
302
+ .ac-modal-inner {
303
+ width: 266px;
304
+ }
305
+ }
306
+
307
+ &.is-normal {
308
+ .ac-modal-inner {
309
+ width: calc(100% - 15px);
310
+ }
311
+ }
312
+
313
+ &.is-medium {
314
+ .ac-modal-inner {
315
+ width: calc(100% - 15px);
316
+ }
317
+ }
318
+
319
+ &.is-large {
320
+ .ac-modal-inner {
321
+ width: calc(100% - 15px);
322
+ }
323
+ }
324
+ }
325
+ }
326
+
327
+ // Medium devices (tablets, 768px and up)
328
+ @media (min-width: 768px) and (max-width: 991.98px) {
329
+ .ac-modal {
330
+ &.is-normal {
331
+ .ac-modal-inner {
332
+ width: calc(100% - 50px);
333
+ }
334
+ }
335
+
336
+ &.is-medium {
337
+ .ac-modal-inner {
338
+ width: calc(100% - 50px);
339
+ }
340
+ }
341
+
342
+ &.is-large {
343
+ .ac-modal-inner {
344
+ width: calc(100% - 50px);
345
+ }
346
+ }
347
+ }
348
+ }
349
+
350
+ // Large devices (desktops, 992px and up)
351
+ @media (min-width: 992px) and (max-width: 1199.98px) {
352
+ }
353
+
354
+ // Extra large devices (large desktops, 1200px and up)
355
+ @media (min-width: 1200px) {
356
+ }
357
+ </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>
@@ -1,3 +1,65 @@
1
+ <script setup lang="ts">
2
+ import { computed, defineAsyncComponent } from "vue";
3
+ import { useToast } from "vue-toastification";
4
+
5
+ interface Props {
6
+ open?: boolean;
7
+ editorTitle?: string;
8
+ editorContent?: Record<string, unknown> | string | Array<any>;
9
+ }
10
+
11
+ const props = withDefaults(defineProps<Props>(), {
12
+ open: false,
13
+ editorTitle: "",
14
+ editorContent: () => ({}),
15
+ });
16
+
17
+ const emit = defineEmits(["closemodal"]);
18
+
19
+ const Modal = defineAsyncComponent(() => import("./../modal/Modal.vue"));
20
+ const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
21
+ const HeaderItem = defineAsyncComponent(
22
+ () => import("./../header/HeaderItem.vue")
23
+ );
24
+
25
+ const Preloader = defineAsyncComponent(
26
+ () => import("./../preloader/Preloader.vue")
27
+ );
28
+
29
+ const Banner = defineAsyncComponent(() => import("./../banner/Banner.vue"));
30
+
31
+ const Editor = defineAsyncComponent({
32
+ loader: () =>
33
+ import("./../editor/Editor.vue").then((module) => module.default),
34
+ loadingComponent: Preloader,
35
+ delay: 200,
36
+ errorComponent: Banner,
37
+ timeout: 100000,
38
+ });
39
+
40
+ const toast = useToast();
41
+
42
+ const parsedContent = computed(() => {
43
+ try {
44
+ return JSON.parse(props.editorContent as string);
45
+ } catch (e) {
46
+ return props.editorContent;
47
+ }
48
+ });
49
+
50
+ const onCopy = () => {
51
+ toast.success("Value copied successfully", { timeout: 1000 });
52
+ };
53
+
54
+ const onError = () => {
55
+ toast.error("Copying failed", { timeout: 1000 });
56
+ };
57
+
58
+ const closeModal = () => {
59
+ emit("closemodal", true);
60
+ };
61
+ </script>
62
+
1
63
  <template>
2
64
  <modal
3
65
  :title="editorTitle"
@@ -23,74 +85,7 @@
23
85
  :read-only="true"
24
86
  language="json"
25
87
  :show-minimap="false"
88
+ word-wrap="on"
26
89
  />
27
90
  </modal>
28
91
  </template>
29
-
30
- <script>
31
- import { defineComponent, defineAsyncComponent } from "vue";
32
- import { useToast } from "vue-toastification";
33
- import Preloader from "../../v2/preloader/Preloader.vue";
34
- import Banner from "../../v2/banner/Banner.vue";
35
-
36
- export default defineComponent({
37
- props: {
38
- open: {
39
- type: Boolean,
40
- default: false
41
- },
42
- editorTitle: {
43
- type: String,
44
- default: ""
45
- },
46
- editorContent: {
47
- type: null,
48
- default: () => ({})
49
- }
50
- },
51
- emits: ["closemodal"],
52
- components: {
53
- Modal: defineAsyncComponent(() =>
54
- import("../modal/Modal.vue").then(module => module.default)
55
- ),
56
- Editor: defineAsyncComponent({
57
- loader: () =>
58
- import("../editor/Editor.vue").then(module => module.default),
59
- loadingComponent: Preloader,
60
- delay: 200,
61
- errorComponent: Banner,
62
- timeout: 100000,
63
- }),
64
- AcButton: defineAsyncComponent(() =>
65
- import("../button/Button.vue").then(module => module.default)
66
- ),
67
- HeaderItem: defineAsyncComponent(() =>
68
- import("../../v2/header/HeaderItem.vue").then(module => module.default)
69
- )
70
- },
71
- computed: {
72
- parsedContent() {
73
- try {
74
- return JSON.parse(this.editorContent);
75
- } catch (e) {
76
- return this.editorContent;
77
- }
78
- }
79
- },
80
- setup() {
81
- const toast = useToast();
82
- return { toast };
83
- },
84
- methods: {
85
- onCopy() {
86
- this.toast.success("Value copied successfully", { timeout: 1000 });
87
- },
88
- onError() {
89
- this.toast.error("Copying failed", { timeout: 1000 });
90
- },
91
- closeModal() {
92
- this.$emit("closemodal", true);
93
- }
94
- }
95
- });
96
- </script>