@appscode/design-system 2.2.63 → 2.2.65

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.2.63",
3
+ "version": "2.2.65",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -3,5 +3,5 @@
3
3
  border-bottom: 1px solid $color-border;
4
4
  position: sticky;
5
5
  background: $white-100;
6
- z-index: 99;
6
+ z-index: 999;
7
7
  }
@@ -71,7 +71,9 @@
71
71
  visibility: hidden;
72
72
  transition: 0.3s ease-in;
73
73
  width: 260px;
74
- box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02);
74
+ box-shadow:
75
+ 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
76
+ 0 0px 0 1px rgba(10, 10, 10, 0.02);
75
77
 
76
78
  &.quick-access {
77
79
  background-color: $white-100;
@@ -413,7 +415,7 @@
413
415
  &.navbar-dropdown-wrapper {
414
416
  position: absolute;
415
417
  border-radius: 4px;
416
- z-index: 99;
418
+ z-index: 9999;
417
419
  right: 0px;
418
420
  top: 40px;
419
421
  display: block;
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { defineAsyncComponent } from "vue";
2
+ import DialogModal from "./DialogModal.vue";
3
+ import AcButton from "./../button/Button.vue";
3
4
 
4
5
  interface Props {
5
6
  title?: string;
@@ -23,24 +24,25 @@ withDefaults(defineProps<Props>(), {
23
24
  hideActionFooter: false,
24
25
  });
25
26
 
26
- defineEmits(["onDelete"]);
27
+ const emit = defineEmits(["onDelete", "onCloseModal"]);
27
28
 
28
29
  const open = defineModel({ type: Boolean });
29
30
 
30
- const Modal = defineAsyncComponent(() => import("./DialogModal.vue"));
31
- const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
31
+ function onClose() {
32
+ open.value = false;
33
+ emit("onCloseModal");
34
+ }
32
35
  </script>
33
36
 
34
37
  <template>
35
- <!-- modal start -->
36
-
37
- <modal
38
+ <dialog-modal
38
39
  v-model="open"
39
40
  :title="title"
40
41
  :class="modifierClasses"
41
42
  :hide-action-footer="hideActionFooter"
42
43
  :disable-modal-close="disableModalClose"
43
44
  :ignore-outside-click="ignoreOutsideClick"
45
+ @onCloseModal="$emit('onCloseModal')"
44
46
  >
45
47
  <!-- freedom content start -->
46
48
  <div class="action-message pt-35 pb-35 has-text-centered">
@@ -54,20 +56,19 @@ const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
54
56
  <!-- modal footer start -->
55
57
  <template #modal-footer-controls>
56
58
  <ac-button
57
- @click.stop="open = false"
58
59
  title="Cancel"
59
60
  modifier-classes="is-outlined"
60
- :disabled="isDeleteActive || disableModalClose"
61
61
  data-testid="delete-confirmation-modal-close-button"
62
+ :disabled="isDeleteActive || disableModalClose"
63
+ @click.stop="onClose"
62
64
  />
63
65
  <ac-button
64
66
  title="Yes"
65
67
  modifier-classes="is-danger"
68
+ data-testid="delete-confirmation-modal-confirm-button"
66
69
  :is-loader-active="isDeleteActive"
67
70
  @click.stop="$emit('onDelete', itemName)"
68
- data-testid="delete-confirmation-modal-confirm-button"
69
71
  />
70
72
  </template>
71
- </modal>
72
- <!-- modal end -->
73
+ </dialog-modal>
73
74
  </template>
@@ -21,6 +21,8 @@ const dialogModal = ref<HTMLDialogElement | null>(null);
21
21
 
22
22
  const model = defineModel({ type: Boolean });
23
23
 
24
+ const emit = defineEmits(["onCloseModal"]);
25
+
24
26
  const onKeyDown = (e: KeyboardEvent) => {
25
27
  if (model.value && e.keyCode === 27) {
26
28
  destroyModal();
@@ -36,6 +38,7 @@ const destroyModal = () => {
36
38
  if (props.disableModalClose) return;
37
39
  model.value = false;
38
40
  document.removeEventListener("keydown", onKeyDown);
41
+ emit("onCloseModal");
39
42
  };
40
43
 
41
44
  watch(
@@ -1,7 +1,12 @@
1
1
  <script setup lang="ts">
2
- import { defineAsyncComponent, ref, watch } from "vue";
2
+ import { ref, watch } from "vue";
3
3
  import { onClickOutside } from "@vueuse/core";
4
4
 
5
+ import HeaderItems from "./../header/HeaderItems.vue";
6
+ import HeaderItem from "./../header/HeaderItem.vue";
7
+ import AcButton from "./../button/Button.vue";
8
+ import AcButtons from "./../button/Buttons.vue";
9
+
5
10
  interface Props {
6
11
  open?: boolean;
7
12
  title?: string;
@@ -22,11 +27,6 @@ const props = withDefaults(defineProps<Props>(), {
22
27
 
23
28
  const emit = defineEmits(["closemodal"]);
24
29
 
25
- const HeaderItems = defineAsyncComponent(() => import("./../header/HeaderItems.vue"));
26
- const HeaderItem = defineAsyncComponent(() => import("./../header/HeaderItem.vue"));
27
- const Buttons = defineAsyncComponent(() => import("./../button/Buttons.vue"));
28
- const AcButton = defineAsyncComponent(() => import("./../button/Button.vue"));
29
-
30
30
  //TODO: need to update not a currect way to import the file
31
31
  const modalCloseIcon = import.meta.glob("../../../icons/close-icon.svg", {
32
32
  eager: true,
@@ -72,14 +72,12 @@ watch(
72
72
  destroyModal();
73
73
  }
74
74
  },
75
- { immediate: true }
75
+ { immediate: true },
76
76
  );
77
77
  </script>
78
78
 
79
79
  <template>
80
80
  <teleport to="#modals">
81
- <!-- for transition https://github.com/adamwathan/vue-tailwind-examples/blob/master/src/components/Modal.vue -->
82
- <!-- modal start -->
83
81
  <div v-if="showModal" class="ac-modal is-middle-alignment" :class="modifierClasses">
84
82
  <div ref="modal" class="ac-modal-inner">
85
83
  <!-- modal header start -->
@@ -118,9 +116,9 @@ watch(
118
116
  <div>
119
117
  <slot name="modal-footer-left" />
120
118
  </div>
121
- <buttons class="has-text-right is-block">
119
+ <ac-buttons class="has-text-right is-block">
122
120
  <slot name="modal-footer-controls" />
123
- </buttons>
121
+ </ac-buttons>
124
122
  <!-- modal footer end -->
125
123
  </div>
126
124
  </div>