adata-ui 2.1.39 → 2.1.40-beta
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/.playground/app.vue +102 -0
- package/components/elements/button-login/index.vue +6 -10
- package/components/features/color-mode/AColorMode.client.vue +74 -32
- package/components/features/dropdown/ADropdownV2.vue +141 -0
- package/components/features/lang-switcher/lang-switcher.vue +120 -40
- package/components/features//321/201hange-version/AChangeVersion.vue +1 -1
- package/components/navigation/header/AHeader.vue +56 -33
- package/components/navigation/header/AlmatyContacts.vue +1 -1
- package/components/navigation/header/CardGallery.vue +5 -3
- package/components/navigation/header/ContactMenu.vue +26 -92
- package/components/navigation/header/HeaderLink.vue +189 -215
- package/components/navigation/header/HeaderUsage.vue +125 -0
- package/components/navigation/header/NavList.vue +35 -50
- package/components/navigation/header/ProductMenu.vue +72 -126
- package/components/navigation/header/ProfileMenu.vue +131 -150
- package/components/navigation/header/SystemNotification.vue +110 -0
- package/components/navigation/mobile-navigation/AMobileNavigation.vue +23 -15
- package/components/navigation/pill-tabs/APillTabs.vue +7 -2
- package/components/overlays/tooltip/ATooltipV2.vue +233 -0
- package/components/overlays/tooltip/types.ts +26 -0
- package/components/overlays/tooltip/useTooltipTrigger.ts +101 -0
- package/composables/useHeaderNavigationLinks.ts +14 -7
- package/icons/gauge.vue +17 -0
- package/icons/sun.vue +13 -3
- package/lang/en.ts +6 -0
- package/lang/kk.ts +6 -0
- package/lang/ru.ts +6 -0
- package/package.json +1 -1
- package/components/navigation/header/TopHeader.vue +0 -196
|
@@ -13,15 +13,11 @@ const props = defineProps<{
|
|
|
13
13
|
title: string
|
|
14
14
|
link: string
|
|
15
15
|
badge?: boolean
|
|
16
|
-
to
|
|
16
|
+
to?: string
|
|
17
17
|
navList: NavList[]
|
|
18
18
|
currentModule: boolean
|
|
19
19
|
}>()
|
|
20
20
|
|
|
21
|
-
const colorMode = useColorMode()
|
|
22
|
-
|
|
23
|
-
const isDark = computed(() => colorMode.value === 'dark')
|
|
24
|
-
|
|
25
21
|
function isActive(itemPath: string) {
|
|
26
22
|
if (!props.currentModule) return false
|
|
27
23
|
|
|
@@ -70,62 +66,51 @@ function isActive(itemPath: string) {
|
|
|
70
66
|
</script>
|
|
71
67
|
|
|
72
68
|
<template>
|
|
73
|
-
<
|
|
74
|
-
class="flex
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<p class="text-sm font-semibold">
|
|
79
|
-
{{ title }}
|
|
80
|
-
</p>
|
|
81
|
-
<a-status-badge
|
|
82
|
-
v-if="badge"
|
|
83
|
-
type="primary"
|
|
84
|
-
class="w-fit"
|
|
85
|
-
size="xs"
|
|
86
|
-
view="inverted"
|
|
69
|
+
<section class="group/section overflow-hidden rounded-xl border border-gray-200 bg-white p-3 shadow-sm transition-colors hover:border-blue-700/40 dark:border-gray-800 dark:bg-gray-950 dark:hover:border-blue-500/40">
|
|
70
|
+
<div class="mb-3 flex items-start justify-between gap-2">
|
|
71
|
+
<nuxt-link-locale
|
|
72
|
+
:to="link"
|
|
73
|
+
class="group/title flex min-w-0 items-center gap-2 text-sm font-bold text-deepblue-900 transition-colors hover:text-blue-700 dark:text-gray-100 dark:hover:text-blue-500"
|
|
87
74
|
>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
<span class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-blue-700/10 text-blue-700 transition-colors group-hover/title:bg-blue-700 group-hover/title:text-white dark:bg-blue-500/10 dark:text-blue-500">
|
|
76
|
+
<component
|
|
77
|
+
:is="icon"
|
|
78
|
+
class="size-4"
|
|
79
|
+
/>
|
|
80
|
+
</span>
|
|
81
|
+
<span class="block truncate normal-case">{{ title }}</span>
|
|
82
|
+
</nuxt-link-locale>
|
|
83
|
+
|
|
84
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
85
|
+
<span
|
|
86
|
+
v-if="badge"
|
|
87
|
+
class="rounded-full bg-blue-700/10 px-1.5 py-0.5 text-[10px] font-bold uppercase leading-none text-blue-700 dark:bg-blue-500/10 dark:text-blue-500"
|
|
88
|
+
>NEW</span>
|
|
89
|
+
<a-icon-arrow-side-up class="size-4 text-gray-500 transition-colors group-hover/section:text-blue-700 dark:group-hover/section:text-blue-500" />
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<ul class="grid gap-1">
|
|
92
94
|
<li
|
|
93
95
|
v-for="item in navList"
|
|
94
96
|
:key="item.title"
|
|
95
|
-
class="flex w-full items-center gap-2 rounded-md px-[10px] py-[6px] hover:bg-blue-100 dark:hover:bg-gray-200/10 text-gray-600 dark:text-gray-200 hover:text-blue-700 dark:hover:text-blue-500"
|
|
96
|
-
:class="{ 'bg-blue-100 dark:bg-gray-200/10': isActive(item.to) }"
|
|
97
97
|
>
|
|
98
|
-
<div class="rounded-lg p-1" :class="{ 'bg-gradient-blue-dark ': isDark, 'bg-gradient-blue-light': !isDark }">
|
|
99
|
-
<component
|
|
100
|
-
:is="item.icon"
|
|
101
|
-
class="size-[18px] text-white dark:text-gray-900"
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
98
|
<nuxt-link-locale
|
|
105
99
|
v-if="item.to"
|
|
106
100
|
:to="item.to"
|
|
107
101
|
itemprop="name"
|
|
108
|
-
class="
|
|
102
|
+
class="group/item flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors hover:bg-blue-100 dark:hover:bg-gray-200/10"
|
|
103
|
+
:class="{ 'bg-blue-100 dark:bg-gray-200/10': isActive(item.to) }"
|
|
109
104
|
>
|
|
110
|
-
|
|
105
|
+
<span class="flex size-7 shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-600 transition-colors group-hover/item:bg-blue-700/10 group-hover/item:text-blue-700 dark:bg-gray-800 dark:text-gray-300 dark:group-hover/item:text-blue-500">
|
|
106
|
+
<component
|
|
107
|
+
:is="item.icon"
|
|
108
|
+
class="size-[14px]"
|
|
109
|
+
/>
|
|
110
|
+
</span>
|
|
111
|
+
<span class="truncate text-sm font-semibold normal-case text-gray-600 transition-colors group-hover/item:text-deepblue-900 dark:text-gray-300 dark:group-hover/item:text-gray-100">{{ item.title }}</span>
|
|
111
112
|
</nuxt-link-locale>
|
|
112
|
-
<div
|
|
113
|
-
v-else
|
|
114
|
-
class="inline-block w-full align-middle text-sm font-semibold text-gray-600 dark:text-gray-200"
|
|
115
|
-
>
|
|
116
|
-
{{ item.title }}
|
|
117
|
-
</div>
|
|
118
113
|
</li>
|
|
119
114
|
</ul>
|
|
120
|
-
</
|
|
115
|
+
</section>
|
|
121
116
|
</template>
|
|
122
|
-
|
|
123
|
-
<style scoped lang="scss">
|
|
124
|
-
.bg-gradient-blue-dark {
|
|
125
|
-
background: linear-gradient(236.46deg, #4FBDFF -2.39%, #1B98E2 79.1%);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.bg-gradient-blue-light {
|
|
129
|
-
background: linear-gradient(236.46deg, #479FFF -2.39%, #0070EB 79.1%);
|
|
130
|
-
}
|
|
131
|
-
</style>
|
|
@@ -1,146 +1,92 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useHeaderNavigationLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
|
|
3
|
-
import NavList from '#adata-ui/components/navigation/header/NavList.vue'
|
|
4
2
|
import CardGallery from '#adata-ui/components/navigation/header/CardGallery.vue'
|
|
3
|
+
import NavList from '#adata-ui/components/navigation/header/NavList.vue'
|
|
4
|
+
import { useHeaderNavigationLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
defineProps<{
|
|
8
|
-
animation?: string
|
|
9
|
-
index?: number
|
|
10
|
-
url?: string
|
|
11
|
-
}>(),
|
|
12
|
-
{
|
|
13
|
-
animation: 'next',
|
|
14
|
-
index: 0,
|
|
15
|
-
url: ''
|
|
16
|
-
}
|
|
17
|
-
)
|
|
18
|
-
|
|
6
|
+
defineProps<{ url?: string }>()
|
|
19
7
|
defineEmits(['outerClick', 'mouseOver'])
|
|
20
8
|
|
|
21
|
-
const
|
|
22
|
-
const
|
|
9
|
+
const { t } = useI18n()
|
|
10
|
+
const modules = useHeaderNavigationLinks()
|
|
23
11
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (currentModule === 'analytics') return 'analytics'
|
|
27
|
-
if (currentModule === 'compliance') return 'ac'
|
|
28
|
-
if (currentModule === 'fea') return 'tnved'
|
|
29
|
-
if (currentModule === 'tenders') return 'zakupki'
|
|
12
|
+
// Fixed EDO promo card on the left (like edo-editor); EDO is excluded from the catalog grid below.
|
|
13
|
+
const edoModule = computed(() => modules.value.find(module => module.key === 'edo') ?? null)
|
|
30
14
|
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
const COLUMN_KEYS = [['pk', 'fines', 'work'], ['fea', 'tenders'], ['compliance', 'analytics']]
|
|
16
|
+
const catalogColumns = computed(() =>
|
|
17
|
+
COLUMN_KEYS.map(keys =>
|
|
18
|
+
keys
|
|
19
|
+
.map(key => modules.value.find(module => module.key === key))
|
|
20
|
+
.filter((module): module is NonNullable<typeof module> => module !== undefined),
|
|
21
|
+
),
|
|
22
|
+
)
|
|
33
23
|
</script>
|
|
34
24
|
|
|
35
25
|
<template>
|
|
36
26
|
<div class="capitalize">
|
|
37
27
|
<div class="relative bg-white dark:bg-gray-950">
|
|
38
|
-
<
|
|
39
|
-
<div
|
|
40
|
-
:
|
|
41
|
-
class="
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
28
|
+
<div class="a-container max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain py-8">
|
|
29
|
+
<div class="flex justify-between gap-5">
|
|
30
|
+
<!-- Left sidebar: EDO promo card (edo-editor style) + promo carousel. -->
|
|
31
|
+
<aside class="flex w-[320px] shrink-0 flex-col gap-5">
|
|
32
|
+
<nuxt-link-locale
|
|
33
|
+
v-if="edoModule"
|
|
34
|
+
:to="edoModule.link"
|
|
35
|
+
class="group block overflow-hidden rounded-xl border border-blue-700/20 bg-blue-50 p-4 shadow-sm transition-colors hover:border-blue-700/40 hover:bg-blue-100 dark:border-blue-500/20 dark:bg-blue-500/5 dark:hover:border-blue-500/40 dark:hover:bg-blue-500/10"
|
|
36
|
+
:data-test-id="edoModule.data_attribute"
|
|
37
|
+
>
|
|
38
|
+
<div class="flex items-start gap-3">
|
|
39
|
+
<div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-blue-700 text-white shadow-sm">
|
|
40
|
+
<component
|
|
41
|
+
:is="edoModule.icon"
|
|
42
|
+
class="size-5"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="min-w-0">
|
|
46
|
+
<div class="flex items-center gap-2">
|
|
47
|
+
<h3 class="text-base font-bold normal-case text-deepblue-900 dark:text-gray-100">
|
|
48
|
+
{{ edoModule.name }}
|
|
49
|
+
</h3>
|
|
50
|
+
<a-icon-arrow-side-up class="size-4 text-blue-700 transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5 dark:text-blue-500" />
|
|
51
|
+
</div>
|
|
52
|
+
<p class="mt-1 text-sm normal-case leading-snug text-gray-600 dark:text-gray-300">
|
|
53
|
+
{{ t('header.products.edo.heroSubtitle') }}
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
59
56
|
</div>
|
|
60
|
-
<div class="flex
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
:id="module.key"
|
|
64
|
-
:key="module.key"
|
|
65
|
-
:current-module="pageUrl.hostname.startsWith(isCurrentModule(module.key))"
|
|
66
|
-
:title="module.name"
|
|
67
|
-
:link="module.link"
|
|
68
|
-
:nav-list="module.items"
|
|
69
|
-
:to="module.to"
|
|
70
|
-
:icon="module.icon"
|
|
71
|
-
:badge="module.is_new"
|
|
72
|
-
:data-test-id="module.data_attribute"
|
|
73
|
-
/>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="flex flex-col gap-5 w-[330px] pl-[10px]">
|
|
76
|
-
<nav-list
|
|
77
|
-
v-for="module in filteredItems.slice(5,8)"
|
|
78
|
-
:id="module.key"
|
|
79
|
-
:key="module.key"
|
|
80
|
-
:current-module="pageUrl.hostname.startsWith(isCurrentModule(module.key))"
|
|
81
|
-
:title="module.name"
|
|
82
|
-
:link="module.link"
|
|
83
|
-
:nav-list="module.items"
|
|
84
|
-
:to="module.to"
|
|
85
|
-
:icon="module.icon"
|
|
86
|
-
:badge="module.is_new"
|
|
87
|
-
:data-test-id="module.data_attribute"
|
|
88
|
-
/>
|
|
57
|
+
<div class="mt-4 inline-flex items-center gap-1.5 text-sm font-semibold normal-case text-blue-700 dark:text-blue-500">
|
|
58
|
+
{{ t('header.products.edo.heroCta') }}
|
|
59
|
+
<a-icon-arrow-side-up class="size-3.5" />
|
|
89
60
|
</div>
|
|
61
|
+
</nuxt-link-locale>
|
|
62
|
+
|
|
63
|
+
<card-gallery class="hidden lg:block" />
|
|
64
|
+
</aside>
|
|
65
|
+
|
|
66
|
+
<!-- Catalog grid: products as bordered section cards (EDO lives in the hero). -->
|
|
67
|
+
<div class="grid min-w-0 flex-1 grid-cols-3 gap-3">
|
|
68
|
+
<div
|
|
69
|
+
v-for="(column, index) in catalogColumns"
|
|
70
|
+
:key="index"
|
|
71
|
+
class="flex flex-col gap-3"
|
|
72
|
+
>
|
|
73
|
+
<nav-list
|
|
74
|
+
v-for="module in column"
|
|
75
|
+
:id="module.key"
|
|
76
|
+
:key="module.key"
|
|
77
|
+
:current-module="false"
|
|
78
|
+
:title="module.name"
|
|
79
|
+
:link="module.link"
|
|
80
|
+
:nav-list="module.items"
|
|
81
|
+
:to="module.to"
|
|
82
|
+
:icon="module.icon"
|
|
83
|
+
:badge="module.is_new"
|
|
84
|
+
:data-test-id="module.data_attribute"
|
|
85
|
+
/>
|
|
90
86
|
</div>
|
|
91
|
-
<card-gallery class="hidden xl:block" />
|
|
92
87
|
</div>
|
|
93
88
|
</div>
|
|
94
|
-
</
|
|
95
|
-
<button
|
|
96
|
-
class="absolute right-8 top-4"
|
|
97
|
-
@click="$emit('outerClick')"
|
|
98
|
-
>
|
|
99
|
-
<a-icon-x-mark
|
|
100
|
-
width="32"
|
|
101
|
-
height="32"
|
|
102
|
-
/>
|
|
103
|
-
</button>
|
|
89
|
+
</div>
|
|
104
90
|
</div>
|
|
105
91
|
</div>
|
|
106
92
|
</template>
|
|
107
|
-
|
|
108
|
-
<style scoped lang="scss">
|
|
109
|
-
$percent: 30%;
|
|
110
|
-
.next-enter-from,
|
|
111
|
-
.next-leave-to {
|
|
112
|
-
opacity: 0;
|
|
113
|
-
transform: translateX($percent);
|
|
114
|
-
position: absolute;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.next-enter-active {
|
|
118
|
-
transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.next-leave-active {
|
|
122
|
-
transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
123
|
-
opacity: 0;
|
|
124
|
-
transform: translateX(-$percent);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Backwards transition
|
|
128
|
-
|
|
129
|
-
.prev-enter-from,
|
|
130
|
-
.prev-leave-to {
|
|
131
|
-
position: absolute;
|
|
132
|
-
|
|
133
|
-
opacity: 0;
|
|
134
|
-
transform: translateX(-$percent);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.prev-enter-active {
|
|
138
|
-
transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.prev-leave-active {
|
|
142
|
-
transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
143
|
-
opacity: 0;
|
|
144
|
-
transform: translateX($percent);
|
|
145
|
-
}
|
|
146
|
-
</style>
|