adata-ui 3.1.61 → 3.1.63

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 (40) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/DigitBadge.vue.d.ts +2 -2
  3. package/dist/runtime/components/Drawer.vue +77 -0
  4. package/dist/runtime/components/{ASidePanel.vue.d.ts → Drawer.vue.d.ts} +10 -6
  5. package/dist/runtime/components/Header.vue.d.ts +9 -1
  6. package/dist/runtime/components/Modal.vue.d.ts +9 -3
  7. package/dist/runtime/components/SidePanel.vue +115 -345
  8. package/dist/runtime/components/SidePanel.vue.d.ts +21 -49
  9. package/dist/runtime/components/accordion/Accordion.vue.d.ts +2 -2
  10. package/dist/runtime/components/button/Button.vue.d.ts +3 -3
  11. package/dist/runtime/components/checkbox/Checkbox.vue.d.ts +6 -2
  12. package/dist/runtime/components/error-template/index.vue.d.ts +1 -1
  13. package/dist/runtime/components/forms/input/password/InputPassword.vue.d.ts +1 -1
  14. package/dist/runtime/components/forms/input/textarea/ATextarea.vue.d.ts +1 -1
  15. package/dist/runtime/components/forms/need-more-data/NeedMoreData.vue.d.ts +7 -1
  16. package/dist/runtime/components/forms/request-demo/RequestDemo.vue.d.ts +5 -1
  17. package/dist/runtime/components/header/ContactMenu.vue.d.ts +8 -2
  18. package/dist/runtime/components/header/HeaderLink.vue +6 -0
  19. package/dist/runtime/components/header/ProductMenu.vue.d.ts +8 -2
  20. package/dist/runtime/components/header/ProfileMenu.vue.d.ts +5 -1
  21. package/dist/runtime/components/header/ProfileMenuContent.vue.d.ts +5 -1
  22. package/dist/runtime/components/header-mobile/HeaderMobile.vue.d.ts +7 -1
  23. package/dist/runtime/components/mobile-navigation/BottomNavigation.vue.d.ts +1 -1
  24. package/dist/runtime/components/mobile-navigation/MainButton.vue.d.ts +5 -1
  25. package/dist/runtime/components/modals/NoAccessContent.vue.d.ts +5 -1
  26. package/dist/runtime/components/modals/NoAccessSimple.vue.d.ts +5 -1
  27. package/dist/runtime/components/payment/process/PaymentKaspiQrSidePanel.vue +2 -1
  28. package/dist/runtime/components/payment/process/PaymentKaspiRedirectSidePanel.vue +2 -1
  29. package/dist/runtime/components/payment/process/PaymentMethodSidePanel.vue +2 -1
  30. package/dist/runtime/components/payment/process/PaymentTopUpSidePanel.vue +2 -1
  31. package/dist/runtime/components/pill-tabs/PillTabs.vue.d.ts +10 -2
  32. package/dist/runtime/components/radio-button/RadioButton.vue.d.ts +1 -1
  33. package/dist/runtime/components/select-row/index.vue.d.ts +1 -1
  34. package/dist/runtime/i18n/i18n.config.d.ts +3 -0
  35. package/dist/runtime/lang/en.js +2 -1
  36. package/dist/runtime/lang/kk.js +2 -1
  37. package/dist/runtime/lang/ru.d.ts +1 -0
  38. package/dist/runtime/lang/ru.js +2 -1
  39. package/package.json +3 -1
  40. package/dist/runtime/components/ASidePanel.vue +0 -121
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "3.1.61",
8
+ "version": "3.1.63",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -13,9 +13,9 @@ export type StateType = {
13
13
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
14
  size: "sm" | "md" | "lg";
15
15
  type: "primary" | "success" | "danger" | "gray" | "orange" | "warning";
16
- disabled: boolean;
17
16
  view: "default" | "inverted";
18
- customClasses: string;
17
+ disabled: boolean;
19
18
  prefix: string;
19
+ customClasses: string;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
21
  export default _default;
@@ -0,0 +1,77 @@
1
+ <script setup>
2
+ import { DrawerRoot, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHandle } from "vaul-vue";
3
+ import { DialogContent } from "reka-ui";
4
+ import { computed } from "#imports";
5
+ const props = defineProps({
6
+ side: { type: String, required: false, default: "bottom" },
7
+ width: { type: Number, required: false, default: 300 },
8
+ height: { type: Number, required: false, default: 300 }
9
+ });
10
+ const open = defineModel({ type: Boolean, ...{ default: false } });
11
+ const sizeStyle = computed(() => {
12
+ if (["left", "right"].includes(props.side)) {
13
+ return { width: `${props.width}px`, height: "100%" };
14
+ }
15
+ return { width: "100%", height: `${props.height}px` };
16
+ });
17
+ const POSITION_CLASSES = {
18
+ right: "top-0 bottom-0 right-0",
19
+ left: "top-0 bottom-0 left-0",
20
+ top: "top-0 left-0 right-0",
21
+ bottom: "bottom-0 left-0 right-0"
22
+ };
23
+ const CORNER_CLASSES = {
24
+ left: "rounded-r-2xl",
25
+ right: "rounded-l-2xl",
26
+ top: "rounded-b-2xl",
27
+ bottom: "rounded-t-2xl"
28
+ };
29
+ const HANDLE_POSITION_CLASSES = {
30
+ top: "absolute -bottom-[calc(100%-12px)]",
31
+ bottom: "absolute top-2",
32
+ left: "absolute top-1/2 -translate-y-1/2 rotate-90 !mr-0",
33
+ right: "absolute top-1/2 -translate-y-1/2 rotate-90 !ml-0"
34
+ };
35
+ </script>
36
+
37
+ <template>
38
+ <drawer-root
39
+ v-model:open="open"
40
+ :direction="side"
41
+ >
42
+ <drawer-portal>
43
+ <drawer-overlay class="fixed inset-0 bg-black/50" />
44
+
45
+ <drawer-content
46
+ :style="sizeStyle"
47
+ :class="[
48
+ 'fixed bg-white dark:bg-gray-900 shadow-2xl',
49
+ POSITION_CLASSES[props.side],
50
+ CORNER_CLASSES[props.side]
51
+ ]"
52
+ >
53
+ <drawer-handle
54
+ :class="[
55
+ HANDLE_POSITION_CLASSES[props.side]
56
+ ]"
57
+ />
58
+
59
+ <div
60
+ v-if="$slots.header"
61
+ class="border-b border-deepblue-900/5 dark:border-gray-200/5 p-4"
62
+ >
63
+ <slot name="header" />
64
+ </div>
65
+ <div class="p-4">
66
+ <slot name="default" />
67
+ </div>
68
+ <div
69
+ v-if="$slots.footer"
70
+ class="border-b border-deepblue-900/5 dark:border-gray-200/5 p-4"
71
+ >
72
+ <slot name="footer" />
73
+ </div>
74
+ </drawer-content>
75
+ </drawer-portal>
76
+ </drawer-root>
77
+ </template>
@@ -1,23 +1,27 @@
1
1
  type __VLS_Props = {
2
2
  side?: 'right' | 'left' | 'top' | 'bottom';
3
- width?: string;
4
- height?: string;
3
+ width?: number;
4
+ height?: number;
5
5
  };
6
6
  type __VLS_PublicProps = __VLS_Props & {
7
7
  modelValue?: boolean;
8
8
  };
9
- declare var __VLS_30: {};
9
+ declare var __VLS_22: {}, __VLS_24: {}, __VLS_26: {};
10
10
  type __VLS_Slots = {} & {
11
- default?: (props: typeof __VLS_30) => any;
11
+ header?: (props: typeof __VLS_22) => any;
12
+ } & {
13
+ default?: (props: typeof __VLS_24) => any;
14
+ } & {
15
+ footer?: (props: typeof __VLS_26) => any;
12
16
  };
13
17
  declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
18
  "update:modelValue": (value: boolean) => any;
15
19
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
20
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
21
  }>, {
22
+ width: number;
23
+ height: number;
18
24
  side: "right" | "left" | "top" | "bottom";
19
- width: string;
20
- height: string;
21
25
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
26
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
23
27
  export default _default;
@@ -23,7 +23,15 @@ type __VLS_Slots = {} & {
23
23
  } & {
24
24
  notifications?: (props: typeof __VLS_54) => any;
25
25
  };
26
- declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
26
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ search: (...args: any[]) => void;
28
+ logout: (...args: any[]) => void;
29
+ login: (...args: any[]) => void;
30
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
+ onSearch?: ((...args: any[]) => any) | undefined;
32
+ onLogout?: ((...args: any[]) => any) | undefined;
33
+ onLogin?: ((...args: any[]) => any) | undefined;
34
+ }>, {
27
35
  daysRemaining: number;
28
36
  limitRemaining: number;
29
37
  isAuthenticated: boolean;
@@ -21,11 +21,17 @@ type __VLS_Slots = {} & {
21
21
  } & {
22
22
  footer?: (props: typeof __VLS_22) => any;
23
23
  };
24
- declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {
24
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ close: (...args: any[]) => void;
26
+ "update:modelValue": (value: boolean | undefined) => void;
27
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ onClose?: ((...args: any[]) => any) | undefined;
29
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
30
+ }>, {
25
31
  name: string;
26
- width: string | number;
27
- transition: boolean;
28
32
  title: string;
33
+ transition: boolean;
34
+ width: string | number;
29
35
  overlay: boolean;
30
36
  preventClose: boolean;
31
37
  fullscreen: boolean;
@@ -1,370 +1,140 @@
1
1
  <script setup>
2
- import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
3
- import { useAdaptive } from "#adata-ui/composables/useAdaptive";
4
- import { ref, useAttrs, onMounted, onBeforeUnmount, watch, computed } from "#imports";
2
+ import { computed } from "#imports";
3
+ import { DialogContent, DialogOverlay, DialogPortal, DialogRoot } from "reka-ui";
4
+ import { AnimatePresence, Motion } from "motion-v";
5
+ import { useMediaQuery } from "@vueuse/core";
5
6
  const props = defineProps({
6
- idName: { type: String, required: false, default: "vsp-container" },
7
- hideCloseBtn: { type: Boolean, required: false },
8
- noClose: { type: Boolean, required: false },
9
7
  side: { type: String, required: false, default: "right" },
10
- rerender: { type: Boolean, required: false },
11
- zIndex: { type: [Number, String], required: false, default: "auto" },
12
- width: { type: String, required: false, default: "auto" },
13
- height: { type: String, required: false, default: "auto" },
14
- lockScroll: { type: Boolean, required: false, default: true },
15
- lockScrollHtml: { type: Boolean, required: false },
16
- hideScrollbar: { type: Boolean, required: false, default: false },
17
- overlayColor: { type: String, required: false, default: "black" },
18
- overlayOpacity: { type: Number, required: false, default: 0.5 },
19
- overlayDuration: { type: Number, required: false, default: 500 },
20
- panelColor: { type: String, required: false, default: "bg-white dark:bg-gray-900" },
21
- panelDuration: { type: Number, required: false, default: 300 },
22
- transitionName: { type: String, required: false },
23
- headerClass: { type: String, required: false },
24
- bodyClass: { type: String, required: false },
25
- footerClass: { type: String, required: false }
8
+ width: { type: Number, required: false, default: 300 },
9
+ height: { type: Number, required: false, default: 300 },
10
+ heightDrawer: { type: Number, required: false },
11
+ widthDrawer: { type: Number, required: false }
26
12
  });
27
- defineEmits(["opened", "closed"]);
28
- const modelValue = defineModel();
29
- let teleportContainer = void 0;
30
- const panel = ref(null);
31
- const overlay = ref(null);
32
- const footer = ref(null);
33
- const header = ref(null);
34
- const body = ref(null);
35
- const panelSide = ref(props.side);
36
- const device = useAdaptive();
37
- const zIndex = ref();
38
- const isBodyAlreadyLocked = ref(false);
39
- const attrs = useAttrs();
40
- const closePanel = () => modelValue.value = false;
41
- const lockUnlockBodyScroll = (elem, lock) => {
42
- if (lock) {
43
- setTimeout(() => {
44
- disableBodyScroll(elem, {
45
- reserveScrollBarGap: true,
46
- allowTouchMove: elem && elem !== document.body
47
- });
48
- disableBodyScroll(elem, { reserveScrollBarGap: true });
49
- if (props.lockScrollHtml) document.documentElement.style.overflow = "hidden";
50
- }, 0);
51
- return;
52
- }
53
- enableBodyScroll(elem);
54
- if (props.lockScrollHtml) document.documentElement.style.removeProperty("overflow");
13
+ const open = defineModel({ type: Boolean, ...{ default: false } });
14
+ const isDesktop = useMediaQuery("(min-width: 1024px)");
15
+ const showSidePanel = computed(() => isDesktop.value);
16
+ const POSITION_CLASSES = {
17
+ right: "top-0 bottom-0 right-0",
18
+ left: "top-0 bottom-0 left-0",
19
+ top: "top-0 left-0 right-0",
20
+ bottom: "bottom-0 left-0 right-0"
55
21
  };
56
- const getMaxZIndex = () => Math.max(
57
- ...Array.from(
58
- document.querySelectorAll("body *"),
59
- (el) => Number.parseFloat(window.getComputedStyle(el).zIndex)
60
- ).filter((zIndex2) => !Number.isNaN(zIndex2)),
61
- 0
62
- );
63
- onMounted(() => {
64
- zIndex.value = props.zIndex === "auto" ? getMaxZIndex() : props.zIndex;
65
- const alreadyCreatedTarget = document.getElementById(props.idName);
66
- if (alreadyCreatedTarget) return;
67
- teleportContainer = document.createElement("div");
68
- teleportContainer.setAttribute("id", props.idName);
69
- document.body.appendChild(teleportContainer);
70
- });
71
- onBeforeUnmount(() => {
72
- if (props.lockScroll && panel.value && modelValue.value) lockUnlockBodyScroll(panel.value, false);
73
- if (teleportContainer) document.body.removeChild(teleportContainer);
74
- });
75
- watch(() => device.value, () => {
76
- panelSide.value = device.value.isTablet || device.value.isSmallTablet ? "bottom" : props.side;
77
- }, { immediate: true });
78
- watch(() => [modelValue.value, panel.value], (newP, oldP) => {
79
- const wasShown = oldP ? oldP[0] : false;
80
- const [isShown, panelEl] = newP;
81
- const isOpening = isShown;
82
- const isClosing = wasShown && !isShown;
83
- if (!panelEl) return;
84
- if (isShown) {
85
- if (props.lockScroll) lockUnlockBodyScroll(panelEl, true);
86
- return;
87
- }
88
- if (!props.lockScroll || !isClosing || isBodyAlreadyLocked.value) return;
89
- setTimeout(() => {
90
- if (panelEl) lockUnlockBodyScroll(panelEl, false);
91
- }, props.panelDuration);
92
- }, { immediate: true });
93
- const roundedClass = computed(() => {
94
- const classes = {
95
- left: "rounded-r-xl",
96
- right: "rounded-l-xl",
97
- top: "rounded-b-xl",
98
- bottom: "rounded-t-xl"
99
- };
100
- return classes[panelSide.value];
101
- });
102
- const overlayStyles = computed(() => ({
103
- "zIndex": zIndex.value,
104
- "animationDuration": `${props.overlayDuration}ms`,
105
- "--overlay-opacity": props.overlayOpacity,
106
- "opacity": modelValue.value ? props.overlayOpacity : 0,
107
- "backgroundColor": props.overlayColor,
108
- "pointerEvents": !modelValue.value ? "none" : "all"
109
- }));
110
- const panelStyles = computed(() => ({
111
- width: ["left", "right"].includes(panelSide.value) ? props.width : void 0,
112
- maxWidth: "100%",
113
- ...["top", "bottom"].includes(panelSide.value) ? {
114
- height: device.value.isSmallTablet || device.value.isTablet ? "100%" : props.height,
115
- maxHeight: device.value.isMobile ? "90%" : "100%"
116
- } : {},
117
- zIndex: zIndex.value,
118
- animationDuration: `${props.panelDuration}ms`,
119
- ...Object.assign({}, attrs.style)
120
- }));
121
- const positionStart = ref(0);
122
- const isClose = ref(false);
123
- const modalHeight = ref(0);
124
- const touchstart = (event) => {
125
- isClose.value = false;
126
- positionStart.value = event.touches[0].clientY;
127
- modalHeight.value = panel.value?.offsetHeight || 0;
22
+ const CORNER_CLASSES = {
23
+ left: "rounded-r-2xl",
24
+ right: "rounded-l-2xl",
25
+ top: "rounded-b-2xl",
26
+ bottom: "rounded-t-2xl"
27
+ };
28
+ const BUTTON_POSITIONS = {
29
+ left: "-right-8 top-8",
30
+ right: "-left-8 top-8",
31
+ top: "hidden",
32
+ bottom: "hidden"
128
33
  };
129
- const touchmove = (event) => {
130
- if (!device.value.isSmallTablet && !device.value.isTablet) return;
131
- event.preventDefault();
132
- const touchPosition = event.touches[0].clientY;
133
- const step = touchPosition - positionStart.value;
134
- if (step < 0) return;
135
- const newHeight = modalHeight.value - step;
136
- panel.value.style.height = `${newHeight}px`;
137
- isClose.value = step > 65;
34
+ const BUTTON_CORNERS = {
35
+ left: "rounded-r-lg",
36
+ right: "rounded-l-lg",
37
+ top: "rounded-b-lg",
38
+ bottom: "rounded-t-lg"
138
39
  };
139
- const touchend = () => {
140
- if (isClose.value) {
141
- closePanel();
142
- } else {
143
- panel.value.style.height = `${modalHeight.value}px`;
40
+ const sizeStyle = computed(() => {
41
+ if (["left", "right"].includes(props.side)) {
42
+ return { width: `${props.width}px`, height: "100%" };
144
43
  }
44
+ return { width: "100%", height: `${props.height}px` };
45
+ });
46
+ const motionInitial = {
47
+ right: { x: props.width },
48
+ left: { x: -props.width },
49
+ top: { y: -props.height },
50
+ bottom: { y: props.height }
145
51
  };
52
+ const motionAnimate = { x: 0, y: 0 };
146
53
  </script>
147
54
 
148
55
  <template>
149
- <client-only>
150
- <Teleport :to="`#${idName}`">
151
- <div
152
- class="vsp-wrapper"
153
- :class="[modelValue && 'vsp-wrapper--active']"
154
- >
155
- <Transition name="overlay">
156
- <div
157
- v-show="modelValue"
158
- ref="overlay"
159
- class="vsp-overlay fixed top-0 left-0 w-full h-full"
160
- :style="overlayStyles"
161
- @click="() => noClose ? void 0 : closePanel()"
56
+ <dialog-root
57
+ v-if="showSidePanel"
58
+ v-model:open="open"
59
+ >
60
+ <dialog-portal>
61
+ <animate-presence>
62
+ <dialog-overlay as-child>
63
+ <Motion
64
+ class="fixed inset-0 bg-black/50"
65
+ :initial="{ opacity: 0 }"
66
+ :animate="{ opacity: 1 }"
67
+ :exit="{ opacity: 0 }"
68
+ :transition="{ duration: 0.3, ease: 'easeOut' }"
162
69
  />
163
- </Transition>
164
- <Transition
165
- :name="transitionName || `slide-${panelSide}`"
166
- @after-enter="$emit('opened')"
167
- @after-leave="$emit('closed')"
70
+ </dialog-overlay>
71
+
72
+ <dialog-content
73
+ as-child
74
+ :data-side="props.side"
75
+ :style="sizeStyle"
76
+ :class="[
77
+ 'fixed bg-white dark:bg-gray-900 shadow-2xl',
78
+ POSITION_CLASSES[props.side],
79
+ CORNER_CLASSES[props.side]
80
+ ]"
168
81
  >
169
- <div
170
- v-if="rerender ? modelValue : true"
171
- v-show="rerender ? true : modelValue"
172
- ref="panel"
173
- class="vsp fixed flex flex-col"
174
- :class="[`vsp--${panelSide}-side`, $attrs.class, roundedClass, panelColor]"
175
- :style="panelStyles"
82
+ <Motion
83
+ :initial="motionInitial[props.side]"
84
+ :animate="motionAnimate"
85
+ :exit="motionInitial[props.side]"
86
+ :transition="{ duration: 0.3, ease: 'easeInOut' }"
176
87
  >
177
- <div
178
- class="w-full flex justify-center items-center mt-1 lg:hidden"
179
- @touchmove="touchmove"
180
- @touchstart="touchstart"
181
- @touchend="touchend"
182
- >
183
- <div class="h-1 w-10 bg-[#D9D9D9] rounded m-1" />
184
- </div>
185
- <div
186
- v-if="!hideCloseBtn"
187
- :class="roundedClass"
188
- class="absolute w-8 px-2 py-4 bg-blue-700 text-white dark:text-gray-950 -left-8 top-8 cursor-pointer lg:block hidden"
189
- @click="closePanel"
88
+ <button
89
+ :class="[
90
+ 'absolute h-12 w-8 bg-blue-700 dark:bg-blue-500 cursor-pointer',
91
+ BUTTON_CORNERS[props.side],
92
+ BUTTON_POSITIONS[props.side]
93
+ ]"
94
+ @click="open = false"
190
95
  >
191
- <i-x-mark />
192
- </div>
96
+ <i-x-mark class="size-4 m-auto text-white dark:text-gray-900" />
97
+ </button>
193
98
  <div
194
- v-if="!!$slots.header"
195
- ref="header"
196
- :class="[headerClass, 'vsp__header border-b border-deepblue-100 dark:border-[#E3E5E80D] lg:px-8 p-4']"
197
- @touchmove="touchmove"
198
- @touchstart="touchstart"
199
- @touchend="touchend"
99
+ v-if="$slots.header"
100
+ class="border-b border-deepblue-900/5 dark:border-gray-200/5 lg:px-8 p-4"
200
101
  >
201
- <slot
202
- name="header"
203
- :close="closePanel"
204
- />
102
+ <slot name="header" />
205
103
  </div>
206
- <div
207
- ref="body"
208
- :class="[
209
- bodyClass,
210
- 'vsp__body overflow-y-auto relative flex-grow-1 h-full lg:px-8 p-4',
211
- hideScrollbar ? 'vsp__body--hide-scroll' : ''
212
- ]"
213
- >
214
- <slot
215
- name="default"
216
- :close="closePanel"
217
- />
104
+ <div class="lg:px-8 p-4">
105
+ <slot name="default" />
218
106
  </div>
219
107
  <div
220
- v-if="!!$slots.footer"
221
- ref="footer"
222
- :class="[footerClass, 'vsp__footer border-t border-deepblue-100 dark:border-[#E3E5E80D] lg:px-8 p-4']"
108
+ v-if="$slots.footer"
109
+ class="border-b border-deepblue-900/5 dark:border-gray-200/5 lg:px-8 p-4"
223
110
  >
224
111
  <slot name="footer" />
225
112
  </div>
226
- </div>
227
- </Transition>
228
- </div>
229
- </Teleport>
230
- </client-only>
113
+ </Motion>
114
+ </dialog-content>
115
+ </animate-presence>
116
+ </dialog-portal>
117
+ </dialog-root>
118
+ <adt-drawer
119
+ v-else
120
+ v-model:open="open"
121
+ :width="widthDrawer"
122
+ :height="heightDrawer"
123
+ >
124
+ <template
125
+ v-if="$slots.header"
126
+ #header
127
+ >
128
+ <slot name="header" />
129
+ </template>
130
+ <template #default>
131
+ <slot name="default" />
132
+ </template>
133
+ <template
134
+ v-if="$slots.footer"
135
+ #footer
136
+ >
137
+ <slot name="footer" />
138
+ </template>
139
+ </adt-drawer>
231
140
  </template>
232
-
233
- <style scoped>
234
- .vsp-wrapper .vsp--right-side, .vsp-wrapper .vsp--left-side {
235
- top: 0;
236
- height: 100%;
237
- }
238
- .vsp-wrapper .vsp--right-side {
239
- right: 0;
240
- left: unset;
241
- }
242
- .vsp-wrapper .vsp--left-side {
243
- right: unset;
244
- left: 0;
245
- }
246
- .vsp-wrapper .vsp--bottom-side, .vsp-wrapper .vsp--top-side {
247
- left: 0;
248
- width: 100%;
249
- }
250
- .vsp-wrapper .vsp--bottom-side {
251
- bottom: 0;
252
- }
253
- .vsp-wrapper .vsp--top-side {
254
- top: 0;
255
- }
256
- .vsp-wrapper .vsp__body.overflow-y-auto::-webkit-scrollbar {
257
- width: 8px;
258
- }
259
- .vsp-wrapper .vsp__body.overflow-y-auto::-webkit-scrollbar-thumb {
260
- background: rgba(44, 62, 80, 0.2);
261
- border-radius: 6px;
262
- }
263
- .vsp-wrapper .vsp__body.vsp__body--hide-scroll {
264
- scrollbar-width: none;
265
- }
266
- .vsp-wrapper .vsp__body.vsp__body--hide-scroll::-webkit-scrollbar {
267
- width: 0;
268
- height: 0;
269
- }
270
- .vsp-wrapper .overlay-enter-active,
271
- .vsp-wrapper .overlay-leave-active {
272
- animation: overlay-transition;
273
- }
274
- .vsp-wrapper .overlay-leave-active {
275
- animation-direction: reverse;
276
- }
277
- .vsp-wrapper .slide-right-enter-active,
278
- .vsp-wrapper .slide-right-leave-active {
279
- animation: slide-right;
280
- }
281
- .vsp-wrapper .slide-right-leave-active {
282
- animation-direction: reverse;
283
- }
284
- .vsp-wrapper .slide-left-enter-active,
285
- .vsp-wrapper .slide-left-leave-active {
286
- animation: slide-left;
287
- }
288
- .vsp-wrapper .slide-left-leave-active {
289
- animation-direction: reverse;
290
- }
291
- .vsp-wrapper .slide-top-enter-active,
292
- .vsp-wrapper .slide-top-leave-active {
293
- animation: slide-left;
294
- }
295
- .vsp-wrapper .slide-top-leave-active {
296
- animation-direction: reverse;
297
- }
298
- .vsp-wrapper .slide-top-enter-active,
299
- .vsp-wrapper .slide-top-leave-active {
300
- animation: slide-top;
301
- }
302
- .vsp-wrapper .slide-top-leave-active {
303
- animation-direction: reverse;
304
- }
305
- .vsp-wrapper .slide-bottom-enter-active,
306
- .vsp-wrapper .slide-bottom-leave-active {
307
- animation: slide-bottom;
308
- }
309
- .vsp-wrapper .slide-bottom-leave-active {
310
- animation-direction: reverse;
311
- }
312
- @keyframes slide-right {
313
- 0% {
314
- transform: translateX(100%);
315
- opacity: 0;
316
- }
317
- 100% {
318
- transform: translateX(0);
319
- opacity: 1;
320
- }
321
- }
322
- @keyframes slide-left {
323
- 0% {
324
- transform: translateX(-100%);
325
- opacity: 0;
326
- }
327
- 100% {
328
- transform: translateX(0);
329
- opacity: 1;
330
- }
331
- }
332
- @keyframes slide-bottom {
333
- 0% {
334
- transform: translateY(100%);
335
- opacity: 0;
336
- }
337
- 100% {
338
- transform: translateY(0);
339
- opacity: 1;
340
- }
341
- }
342
- @keyframes slide-top {
343
- 0% {
344
- transform: translateY(-100%);
345
- opacity: 0;
346
- }
347
- 100% {
348
- transform: translateY(0);
349
- opacity: 1;
350
- }
351
- }
352
- @keyframes slide-top {
353
- 0% {
354
- transform: translateY(-100%);
355
- opacity: 0;
356
- }
357
- 100% {
358
- transform: translateY(0);
359
- opacity: 1;
360
- }
361
- }
362
- @keyframes overlay-transition {
363
- 0% {
364
- opacity: 0;
365
- }
366
- 100% {
367
- opacity: var(--overlay-opacity);
368
- }
369
- }
370
- </style>