adata-ui 2.0.34 → 2.0.36
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.
|
@@ -55,10 +55,10 @@ onMounted(async () => {
|
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
57
|
<a-modal v-model="loginModal">
|
|
58
|
-
<id-login-modal />
|
|
58
|
+
<id-login-modal v-if="loginModal" />
|
|
59
59
|
</a-modal>
|
|
60
60
|
<a-modal v-model="twoFactorModal">
|
|
61
|
-
<id-two-factor-modal />
|
|
61
|
+
<id-two-factor-modal v-if="twoFactorModal" />
|
|
62
62
|
</a-modal>
|
|
63
63
|
|
|
64
64
|
<a-modal v-model="registrationModal">
|
|
@@ -74,13 +74,13 @@ onMounted(async () => {
|
|
|
74
74
|
<a-modal v-model="recoveryModal">
|
|
75
75
|
<id-recovery-modal v-if="recoveryModal" />
|
|
76
76
|
</a-modal>
|
|
77
|
-
<a-modal v-model="resetPasswordOtpModal">
|
|
77
|
+
<a-modal v-model="resetPasswordOtpModal" prevent-close>
|
|
78
78
|
<id-reset-password-otp-modal v-if="resetPasswordOtpModal" />
|
|
79
79
|
</a-modal>
|
|
80
|
-
<a-modal v-model="newPasswordModal">
|
|
80
|
+
<a-modal v-model="newPasswordModal" prevent-close>
|
|
81
81
|
<id-new-password-modal v-if="newPasswordModal" />
|
|
82
82
|
</a-modal>
|
|
83
|
-
<a-modal v-model="passwordSuccessfulModal">
|
|
83
|
+
<a-modal v-model="passwordSuccessfulModal" prevent-close>
|
|
84
84
|
<id-password-successful-modal v-if="passwordSuccessfulModal" />
|
|
85
85
|
</a-modal>
|
|
86
86
|
</template>
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="tabs"
|
|
4
4
|
class="scroll-container overflow-auto whitespace-nowrap"
|
|
5
|
-
:class="
|
|
5
|
+
:class="[
|
|
6
|
+
props.wrapper === 'row' ? 'flex gap-1' : 'flex flex-col gap-1',
|
|
7
|
+
isSegmented ? 'rounded-[12px] bg-gray-50 p-1 shadow-[inset_2px_2px_4px_0_#00000014] dark:bg-gray-800' : ''
|
|
8
|
+
]"
|
|
6
9
|
>
|
|
10
|
+
|
|
7
11
|
<button
|
|
8
12
|
v-for="option in options"
|
|
9
13
|
:key="option.key"
|
|
@@ -48,7 +52,8 @@ const emit = defineEmits(['selectOption', 'prevent'])
|
|
|
48
52
|
|
|
49
53
|
interface Props {
|
|
50
54
|
options: Tab[]
|
|
51
|
-
|
|
55
|
+
// TODO: переименовать segmented
|
|
56
|
+
view?: 'transparent' | 'main' | 'gray' | 'blue' | 'mobile' | 'segmented'
|
|
52
57
|
size?: 'lg' | 'sm' | 'xs'
|
|
53
58
|
badgeSize?: 'sm' | 'md' | 'lg'
|
|
54
59
|
align?: 'left' | 'center'
|
|
@@ -71,6 +76,10 @@ const tabs = ref<HTMLDivElement | null>(null)
|
|
|
71
76
|
const activeTab = defineModel<any>({ default: 1 })
|
|
72
77
|
const { t } = useI18n()
|
|
73
78
|
|
|
79
|
+
|
|
80
|
+
// todo: вынести в пропc
|
|
81
|
+
const isSegmented = computed(() => props.view === 'segmented')
|
|
82
|
+
|
|
74
83
|
const viewTypeValues: ViewType = {
|
|
75
84
|
main: {
|
|
76
85
|
default:
|
|
@@ -95,6 +104,10 @@ const viewTypeValues: ViewType = {
|
|
|
95
104
|
default:
|
|
96
105
|
'bg-white dark:text-gray-200 font-semibold dark:bg-gray-900 dark:hover:bg-gray-500 hover:bg-deepblue-100 ',
|
|
97
106
|
selected: 'text-white dark:text-gray-900 font-semibold dark:bg-white bg-deepblue-900'
|
|
107
|
+
},
|
|
108
|
+
segmented: {
|
|
109
|
+
default: 'text-deepblue-900 bg-transparent hover:bg-black/5 dark:hover:bg-white/10 dark:text-gray-200',
|
|
110
|
+
selected: 'bg-white text-deepblue-900 font-semibold shadow dark:bg-gray-900 dark:text-gray-200 shadow-[2px_2px_4px_0_#00000014]'
|
|
98
111
|
}
|
|
99
112
|
}
|
|
100
113
|
|