adata-ui 4.0.10 → 4.0.11

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/module.mjs +2 -1
  3. package/dist/runtime/components/Alert.vue +62 -0
  4. package/dist/runtime/components/Alert.vue.d.ts +29 -0
  5. package/dist/runtime/components/ColorMode.vue +44 -0
  6. package/dist/runtime/components/ColorMode.vue.d.ts +2 -0
  7. package/dist/runtime/components/Footer.vue +171 -6
  8. package/dist/runtime/components/FooterAccordion.vue +46 -4
  9. package/dist/runtime/components/FooterAccordion.vue.d.ts +10 -1
  10. package/dist/runtime/components/Header.vue +35 -21
  11. package/dist/runtime/components/Tag.vue.d.ts +1 -1
  12. package/dist/runtime/components/Toggle.vue +138 -0
  13. package/dist/runtime/components/Toggle.vue.d.ts +39 -0
  14. package/dist/runtime/components/button/Button.vue +133 -0
  15. package/dist/runtime/components/button/Button.vue.d.ts +37 -0
  16. package/dist/runtime/components/button/types.d.ts +21 -0
  17. package/dist/runtime/components/button/types.js +0 -0
  18. package/dist/runtime/components/header/ProductMenu.vue +236 -3
  19. package/dist/runtime/components/header/ProfileMenu.vue +69 -15
  20. package/dist/runtime/components/header/TopHeader.vue +9 -6
  21. package/dist/runtime/i18n.d.ts +1 -1
  22. package/dist/runtime/icons/arrow/chevron-down.vue +19 -0
  23. package/dist/runtime/icons/arrow/chevron-down.vue.d.ts +2 -0
  24. package/dist/runtime/icons/bookmark.vue +19 -0
  25. package/dist/runtime/icons/bookmark.vue.d.ts +2 -0
  26. package/dist/runtime/icons/history.vue +19 -0
  27. package/dist/runtime/icons/history.vue.d.ts +2 -0
  28. package/dist/runtime/icons/lock.vue +19 -0
  29. package/dist/runtime/icons/lock.vue.d.ts +2 -0
  30. package/dist/runtime/icons/message.vue +24 -0
  31. package/dist/runtime/icons/message.vue.d.ts +2 -0
  32. package/dist/runtime/icons/moon.vue +10 -0
  33. package/dist/runtime/icons/moon.vue.d.ts +2 -0
  34. package/dist/runtime/icons/sun.vue +14 -0
  35. package/dist/runtime/icons/sun.vue.d.ts +2 -0
  36. package/dist/runtime/icons/warning-triangle.vue +29 -0
  37. package/dist/runtime/icons/warning-triangle.vue.d.ts +2 -0
  38. package/package.json +1 -1
  39. package/dist/runtime/composables/useHeaderNavigationLinks.d.ts +0 -28
  40. package/dist/runtime/composables/useHeaderNavigationLinks.js +0 -238
@@ -0,0 +1,39 @@
1
+ type Size = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
2
+ type Color = 'blue' | 'green';
3
+ interface Props {
4
+ disabled?: boolean;
5
+ size?: Size;
6
+ color?: Color;
7
+ switchClass?: string;
8
+ activeClass?: string;
9
+ inactiveClass?: string;
10
+ onIcon?: SVGElement | null;
11
+ onIconClass?: string | null;
12
+ offIcon?: SVGElement | null;
13
+ offIconClass?: string | null;
14
+ activeContainerClass?: string;
15
+ inactiveContainerClass?: string;
16
+ }
17
+ type __VLS_Props = Props;
18
+ type __VLS_PublicProps = __VLS_Props & {
19
+ modelValue: boolean;
20
+ };
21
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:modelValue": (value: boolean) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
25
+ }>, {
26
+ size: Size;
27
+ color: Color;
28
+ disabled: boolean;
29
+ switchClass: string;
30
+ activeClass: string;
31
+ inactiveClass: string;
32
+ onIcon: SVGElement | null;
33
+ onIconClass: string | null;
34
+ offIcon: SVGElement | null;
35
+ offIconClass: string | null;
36
+ activeContainerClass: string;
37
+ inactiveContainerClass: string;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ export default _default;
@@ -0,0 +1,133 @@
1
+ <script setup>
2
+ import { twJoin, twMerge } from "tailwind-merge";
3
+ import { NuxtLink } from "#components";
4
+ import { computed } from "#imports";
5
+ defineOptions({ name: "AButton" });
6
+ const props = defineProps({
7
+ variant: { type: String, required: false, default: "primary" },
8
+ view: { type: String, required: false, default: "default" },
9
+ size: { type: String, required: false, default: "lg" },
10
+ form: { type: String, required: false, default: "button" },
11
+ icon: { type: null, required: false },
12
+ iconClass: { type: String, required: false, default: "" },
13
+ loading: { type: Boolean, required: false, default: false },
14
+ disabled: { type: Boolean, required: false, default: false },
15
+ block: { type: Boolean, required: false, default: false },
16
+ active: { type: Boolean, required: false, default: false },
17
+ to: { type: String, required: false, default: "" }
18
+ });
19
+ const classes = computed(() => [
20
+ "body-600 rounded-md cursor-pointer outline-none transition duration-200 select-none",
21
+ props.block ? "w-full" : "",
22
+ typeSwitchValues[props.view][props.variant],
23
+ sizeSwitchValues[props.form][props.size]
24
+ ]);
25
+ const disabledClasses = computed(() => [
26
+ "body-600 rounded-md outline-none transition duration-200 select-none",
27
+ props.block ? "w-full" : "",
28
+ disabledTypeSwitchValues[props.view],
29
+ sizeSwitchValues[props.form][props.size]
30
+ ]);
31
+ const typeSwitchActiveValues = {
32
+ default: {
33
+ primary: "bg-deepblue-900 text-white dark:bg-gray-200",
34
+ success: "bg-deepblue-900 text-white dark:bg-gray-200",
35
+ danger: "bg-deepblue-900 text-white dark:bg-gray-200 ",
36
+ gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
37
+ ghost: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200"
38
+ },
39
+ transparent: {
40
+ primary: "bg-blue-700 text-white dark:bg-blue-500 dark:text-gray-900",
41
+ success: "bg-green-500 text-white dark:bg-green-400 dark:text-gray-900",
42
+ danger: "bg-red-500 text-white dark:bg-red-400 dark:text-gray-900",
43
+ gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
44
+ ghost: "bg-white text-deepblue-900 dark:bg-gray-900 dark:text-gray-200 hover:text-deepblue-900 dark:hover:text-gray-200"
45
+ },
46
+ outline: {
47
+ primary: "bg-blue-700 text-white dark:bg-blue-500 dark:text-gray-900",
48
+ success: "bg-green-500 text-white dark:bg-green-400 dark:text-gray-900",
49
+ danger: "bg-red-500 text-white dark:bg-red-400 dark:text-gray-900",
50
+ gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
51
+ ghost: "bg-gray-500 text-white dark:bg-gray-500 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200"
52
+ }
53
+ };
54
+ const typeSwitchValues = {
55
+ default: {
56
+ primary: "bg-blue-700 text-white hover:bg-blue-900 active:bg-deepblue-900 active:text-white dark:bg-blue-500 dark:text-gray-900 dark:hover:bg-blue-700 dark:active:bg-gray-200",
57
+ success: "bg-green-500 text-white hover:bg-green-900 active:bg-deepblue-900 active:text-white dark:bg-green dark:text-gray-900 dark:hover:bg-green-300 dark:active:bg-gray-200",
58
+ danger: "bg-red-500 text-white hover:bg-red-700 active:bg-deepblue-900 active:text-white dark:bg-red-400 dark:text-gray-900 dark:hover:bg-red-300 dark:active:bg-gray-200",
59
+ gray: "bg-deepblue-900/5 text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:bg-gray-200/5 dark:hover:bg-gray-200/10 dark:active:bg-gray-200 dark:text-gray-200 dark:active:text-gray-900",
60
+ ghost: "bg-white text-deepblue-900 hover:bg-deepblue-900/5 active:bg-deepblue-900 active:text-white dark:bg-gray-900 dark:text-gray-200 dark:bg-gray-900 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900"
61
+ },
62
+ transparent: {
63
+ primary: "text-blue-700 hover:bg-blue-100 active:bg-blue-700 active:text-white dark:text-blue-500 dark:hover:bg-blue-500/20 dark:active:bg-blue-500 dark:active:text-gray-900",
64
+ success: "text-green-500 hover:bg-green-500/20 active:bg-green-500 active:text-white dark:text-green-400 dark:hover:bg-green-400/20 dark:active:bg-green-400 dark:active:text-gray-900",
65
+ danger: "text-red-500 hover:bg-red-500/20 active:bg-red-500 active:text-white dark:text-red-400 dark:hover:bg-red-400/20 dark:active:bg-red-400 dark:active:text-gray-900",
66
+ gray: "text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900",
67
+ ghost: "text-white hover:bg-deepblue-900/10 active:bg-white active:text-deepblue-900 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-900 dark:active:text-gray-200"
68
+ },
69
+ outline: {
70
+ primary: "border border-blue-700 text-blue-700 hover:bg-blue-100 active:bg-blue-700 active:text-white dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500/20 dark:active:bg-blue-500 dark:active:text-gray-900",
71
+ success: "border border-green-500 text-green-500 hover:bg-green-500/20 active:bg-green-500 active:text-white dark:border-green-400 dark:text-green-400 dark:hover:bg-green-400/20 dark:active:bg-green-400 dark:active:text-gray-900",
72
+ danger: "border border-red-500 text-red-500 hover:bg-red-500/20 active:bg-red-500 active:text-white dark:text-red-400 dark:border-red-400 dark:hover:bg-red-400/20 dark:active:bg-red-400 dark:active:text-gray-900",
73
+ gray: "border border-gray-500/50 text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:border-gray-500/50 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900",
74
+ ghost: "border border-white text-white hover:bg-deepblue-900 active:bg-gray-500 active:text-white dark:border-gray-200 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-500 dark:active:text-gray-900"
75
+ }
76
+ };
77
+ const disabledTypeSwitchValues = {
78
+ default: "bg-deepblue-900/5 text-deepblue-900/20 dark:bg-gray-200/5 dark:text-gray-200/20 pointer-events-none",
79
+ transparent: "text-gray-500/50 pointer-events-none",
80
+ outline: "border border-gray-500/50 text-gray-500/50 pointer-events-none"
81
+ };
82
+ const sizeSwitchValues = {
83
+ icon: {
84
+ sm: "p-1 text-base",
85
+ md: "p-2 text-base",
86
+ lg: "p-2 text-2xl",
87
+ xl: "p-4 text-3xl"
88
+ },
89
+ button: {
90
+ sm: "px-4 py-1.5 leading-4 !h-[28px]",
91
+ md: "px-4 py-1.5 !h-[32px]",
92
+ lg: "px-4 py-2.5",
93
+ xl: "px-8 py-2.5"
94
+ }
95
+ };
96
+ const buttonClasses = computed(
97
+ () => twMerge(
98
+ twJoin(
99
+ props.disabled ? disabledClasses.value : classes.value,
100
+ props.active ? typeSwitchActiveValues[props.view][props.variant] : "",
101
+ props.to ? "inline-block" : ""
102
+ )
103
+ )
104
+ );
105
+ </script>
106
+
107
+ <template>
108
+ <component
109
+ :is="to ? NuxtLink : 'button'"
110
+ :class="[buttonClasses, 'relative h-fit transition flex items-center justify-center']"
111
+ :disabled="disabled"
112
+ :to="to"
113
+ >
114
+ <span
115
+ :class="[
116
+ { 'opacity-0': loading },
117
+ 'flex items-center justify-center gap-2 whitespace-nowrap'
118
+ ]"
119
+ >
120
+ <component
121
+ :is="icon"
122
+ :class="[`${iconClass}`]"
123
+ />
124
+ <slot />
125
+ </span>
126
+ <span
127
+ v-if="loading"
128
+ class="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center"
129
+ >
130
+ <i-loader-circle class="animate-spin" />
131
+ </span>
132
+ </component>
133
+ </template>
@@ -0,0 +1,37 @@
1
+ import type { Component } from 'vue';
2
+ interface Props {
3
+ variant?: 'primary' | 'success' | 'danger' | 'gray' | 'ghost';
4
+ view?: 'default' | 'outline' | 'transparent';
5
+ size?: 'sm' | 'md' | 'lg' | 'xl';
6
+ form?: 'icon' | 'button';
7
+ icon?: Component;
8
+ iconClass?: string;
9
+ loading?: boolean;
10
+ disabled?: boolean;
11
+ block?: boolean;
12
+ active?: boolean;
13
+ to?: string;
14
+ }
15
+ declare var __VLS_10: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_10) => any;
18
+ };
19
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
20
+ size: "sm" | "md" | "lg" | "xl";
21
+ disabled: boolean;
22
+ active: boolean;
23
+ view: "default" | "outline" | "transparent";
24
+ to: string;
25
+ variant: "primary" | "success" | "danger" | "gray" | "ghost";
26
+ form: "icon" | "button";
27
+ iconClass: string;
28
+ loading: boolean;
29
+ block: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,21 @@
1
+ export type TypeSwitchValues = {
2
+ [key in 'primary' | 'success' | 'danger' | 'gray' | 'ghost']: string;
3
+ };
4
+ export type ViewSwitchValues = {
5
+ default: TypeSwitchValues;
6
+ transparent: TypeSwitchValues;
7
+ outline: TypeSwitchValues;
8
+ };
9
+ export type SizeSwitchValues = {
10
+ icon: {
11
+ [key in 'sm' | 'md' | 'lg' | 'xl']: string;
12
+ };
13
+ button: {
14
+ [key in 'sm' | 'md' | 'lg' | 'xl']: string;
15
+ };
16
+ };
17
+ export type DisabledViewSwitchValues = {
18
+ default: string;
19
+ transparent: string;
20
+ outline: string;
21
+ };
File without changes
@@ -1,15 +1,248 @@
1
1
  <script setup>
2
- import { useHeaderNavigationLinks } from "../../composables/useHeaderNavigationLinks";
3
2
  import NavList from "./NavList.vue";
4
3
  import CardGallery from "./CardGallery.vue";
5
4
  import { useI18n } from "#imports";
5
+ import IUsersThree from "#icons/users/users-three.vue";
6
+ import ISearch from "#icons/search.vue";
7
+ import { PAGES } from "../../shared/constants/pages";
8
+ import IArrowCircleDown from "#icons/arrow/arrow-circle-down.vue";
9
+ import IUsers from "#icons/users/users.vue";
10
+ import IGlobe from "#icons/globe.vue";
11
+ import IScale from "#icons/scale.vue";
12
+ import ILinkChanin from "#icons/link-chain.vue";
13
+ import IBlock from "#icons/block.vue";
14
+ import IDollar from "#icons/currency/dollar.vue";
15
+ import IWorkBag from "#icons/work-bag.vue";
16
+ import IHdocument from "#icons/document/hdocument.vue";
17
+ import IReceipt from "#icons/receipt/receipt.vue";
18
+ import IHcheck from "#icons/receipt/hcheck.vue";
19
+ import IFile from "#icons/file.vue";
20
+ import ICar from "#icons/avto/car.vue";
21
+ import ICheckCircle from "#icons/check-circle.vue";
22
+ import ITruck from "#icons/avto/truck.vue";
23
+ import IArrowGraphUp from "#icons/arrow/arrow-graph-up.vue";
24
+ import IClipboardText from "#icons/clipboard-text.vue";
25
+ import IMedal from "#icons/medal.vue";
26
+ import ICompany from "#icons/company.vue";
27
+ import IHandshake from "#icons/handshake.vue";
28
+ import ISviazi from "#icons/sviazi.vue";
29
+ import ICalculator from "#icons/calculator.vue";
30
+ import IId from "#icons/document/id.vue";
31
+ import IProfile from "#icons/document/profile.vue";
6
32
  const props = defineProps({
7
33
  animation: { type: String, required: false, default: "next" },
8
34
  index: { type: Number, required: false, default: 0 },
9
35
  url: { type: String, required: false, default: "" }
10
36
  });
37
+ const { t } = useI18n();
38
+ const appConfig = useAppConfig();
39
+ const mode = appConfig.adataUI.mode;
11
40
  defineEmits(["outerClick", "mouseOver"]);
12
- const filteredItems = useHeaderNavigationLinks();
41
+ const filteredItems = [
42
+ {
43
+ key: "pk",
44
+ name: t("header.products.counterparties.label"),
45
+ icon: IUsersThree,
46
+ to: `https://pk.${mode}.kz`,
47
+ items: [
48
+ {
49
+ title: t("header.products.counterparties.items.counterparty.title"),
50
+ subtitle: t("header.products.counterparties.items.counterparty.subtitle"),
51
+ icon: ISearch,
52
+ to: `https://pk.${mode}.kz` + PAGES.pk.main
53
+ },
54
+ {
55
+ title: t("header.products.counterparties.items.unloading.title"),
56
+ subtitle: t("header.products.counterparties.items.unloading.subtitle"),
57
+ icon: IArrowCircleDown,
58
+ to: `https://pk.${mode}.kz` + PAGES.pk.unload
59
+ },
60
+ {
61
+ title: t("header.products.counterparties.items.wholesale.title"),
62
+ subtitle: t("header.products.counterparties.items.wholesale.subtitle"),
63
+ icon: IUsers,
64
+ to: `https://pk.${mode}.kz` + PAGES.pk.employees
65
+ },
66
+ {
67
+ title: t("header.products.counterparties.items.foreign.title"),
68
+ subtitle: t("header.products.counterparties.items.foreign.subtitle"),
69
+ icon: IGlobe,
70
+ to: `https://pk.${mode}.kz` + PAGES.pk.foreign
71
+ },
72
+ {
73
+ title: t("header.products.counterparties.items.compare.title"),
74
+ icon: IScale,
75
+ to: `https://pk.${mode}.kz` + PAGES.pk.compare
76
+ },
77
+ {
78
+ title: t("header.products.counterparties.items.networks.title"),
79
+ icon: ILinkChanin,
80
+ to: `https://pk.${mode}.kz` + PAGES.pk.connections
81
+ },
82
+ {
83
+ title: t("header.products.counterparties.items.sanction.title"),
84
+ icon: IBlock,
85
+ to: `https://pk.${mode}.kz` + PAGES.pk.sanctions
86
+ },
87
+ {
88
+ title: t("header.products.counterparties.items.offshore.title"),
89
+ icon: IDollar,
90
+ to: `https://pk.${mode}.kz` + PAGES.pk.offshore
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ key: "work",
96
+ name: t("header.products.jobs.label"),
97
+ icon: IWorkBag,
98
+ items: [
99
+ {
100
+ title: t("header.products.jobs.items.vacancies.title"),
101
+ icon: IWorkBag,
102
+ subtitle: t("header.products.jobs.items.vacancies.subtitle"),
103
+ to: `https://work.${mode}.kz` + PAGES.work.vacancy
104
+ },
105
+ {
106
+ title: t("header.products.jobs.items.resume.title"),
107
+ subtitle: t("header.products.jobs.items.resume.subtitle"),
108
+ icon: IHdocument,
109
+ to: `https://work.${mode}.kz` + PAGES.work.summary
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ key: "tenders",
115
+ name: t("header.products.tenders.label"),
116
+ icon: IReceipt,
117
+ to: `https://tender.${mode}.kz`,
118
+ items: [
119
+ {
120
+ title: t("header.products.tenders.items.tenders.title"),
121
+ subtitle: t("header.products.tenders.items.tenders.subtitle"),
122
+ icon: ISearch,
123
+ to: `https://tender.${mode}.kz` + PAGES.tender.main
124
+ },
125
+ {
126
+ title: t("header.products.tenders.items.procurement.title"),
127
+ subtitle: t("header.products.tenders.items.procurement.subtitle"),
128
+ icon: IHcheck,
129
+ to: `https://tender.${mode}.kz` + PAGES.tender.plans
130
+ },
131
+ {
132
+ title: t("header.products.tenders.items.contracts.title"),
133
+ subtitle: t("header.products.tenders.items.contracts.subtitle"),
134
+ icon: IFile,
135
+ to: `https://tender.${mode}.kz` + PAGES.tender.contracts
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ key: "fines",
141
+ name: t("header.products.fines.label"),
142
+ icon: ICar,
143
+ items: [
144
+ {
145
+ title: t("header.products.fines.items.fines.title"),
146
+ subtitle: t("header.products.fines.items.fines.subtitle"),
147
+ icon: ICheckCircle,
148
+ to: `https://avto.${mode}.kz` + PAGES.fines.main
149
+ },
150
+ {
151
+ title: t("header.products.fines.items.auto.title"),
152
+ subtitle: t("header.products.fines.items.auto.subtitle"),
153
+ icon: ICar,
154
+ to: `https://avto.${mode}.kz` + PAGES.fines.avto
155
+ },
156
+ {
157
+ title: t("header.products.fines.items.wholesaleAuto.title"),
158
+ subtitle: t("header.products.fines.items.wholesaleAuto.subtitle"),
159
+ icon: ITruck,
160
+ to: `https://avto.${mode}.kz` + PAGES.fines.bulk
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ key: "analytics",
166
+ name: t("header.products.analytics.label"),
167
+ icon: IArrowGraphUp,
168
+ items: [
169
+ {
170
+ title: t("header.products.analytics.items.procurement.title"),
171
+ subtitle: t("header.products.analytics.items.procurement.subtitle"),
172
+ icon: IClipboardText,
173
+ to: `https://analytics.${mode}.kz` + PAGES.analytics.analysis
174
+ },
175
+ {
176
+ title: t("header.products.analytics.items.activity.title"),
177
+ subtitle: t("header.products.analytics.items.activity.subtitle"),
178
+ icon: IArrowGraphUp,
179
+ to: `https://analytics.${mode}.kz` + PAGES.analytics.index
180
+ },
181
+ {
182
+ title: t("header.products.analytics.items.rate.title"),
183
+ subtitle: t("header.products.analytics.items.rate.subtitle"),
184
+ icon: IMedal,
185
+ to: `https://analytics.${mode}.kz` + PAGES.analytics.rating
186
+ },
187
+ {
188
+ title: t("header.products.analytics.items.subjects.title"),
189
+ subtitle: t("header.products.analytics.items.subjects.subtitle"),
190
+ icon: ICompany,
191
+ to: `https://analytics.${mode}.kz` + PAGES.analytics.business
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ key: "fea",
197
+ name: t("header.products.fea.label"),
198
+ icon: IGlobe,
199
+ items: [
200
+ {
201
+ title: t("header.products.fea.items.i.t"),
202
+ subtitle: t("header.products.fea.items.i.st"),
203
+ icon: IHandshake,
204
+ to: `https://tnved.${mode}.kz` + PAGES.fea.t
205
+ },
206
+ {
207
+ title: t("header.products.fea.items.o.t"),
208
+ subtitle: t("header.products.fea.items.o.st"),
209
+ icon: ISviazi,
210
+ to: `https://tnved.${mode}.kz` + PAGES.fea.o
211
+ },
212
+ {
213
+ title: t("header.products.fea.items.cp.t"),
214
+ subtitle: t("header.products.fea.items.cp.st"),
215
+ icon: ITruck,
216
+ to: `https://tnved.${mode}.kz` + PAGES.fea.cp
217
+ },
218
+ {
219
+ title: t("header.products.fea.items.ca.t"),
220
+ subtitle: t("header.products.fea.items.ca.st"),
221
+ icon: ICalculator,
222
+ to: `https://tnved.${mode}.kz` + PAGES.fea.ca
223
+ },
224
+ {
225
+ title: t("header.products.fea.items.tr.t"),
226
+ subtitle: t("header.products.fea.items.tr.st"),
227
+ icon: IGlobe,
228
+ to: `https://tnved.${mode}.kz` + PAGES.fea.tr
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ key: "compliance",
234
+ name: t("header.products.compliance.label"),
235
+ icon: IId,
236
+ items: [
237
+ {
238
+ title: t("header.products.compliance.items.l.t"),
239
+ subtitle: t("header.products.compliance.items.l.st"),
240
+ icon: IProfile,
241
+ to: `https://ac.${mode}.kz/` + PAGES.compliance.l
242
+ }
243
+ ]
244
+ }
245
+ ];
13
246
  </script>
14
247
 
15
248
  <template>
@@ -18,7 +251,7 @@ const filteredItems = useHeaderNavigationLinks();
18
251
  <transition :name="animation">
19
252
  <div
20
253
  :key="index"
21
- class="container mx-auto py-8"
254
+ class="a-container py-8"
22
255
  >
23
256
  <div class="flex justify-between gap-5">
24
257
  <div class="flex gap-[10px] divide-x divide-gray-500/50">
@@ -1,7 +1,18 @@
1
1
  <script setup>
2
+ import { PAGES } from "../../shared/constants/pages";
3
+ import AStatusBadge from "../Tag.vue";
4
+ import AButton from "../button/Button.vue";
2
5
  import { useI18n } from "#imports";
3
6
  import IPlus from "#icons/plus.vue";
4
7
  import ILogout from "#icons/navigation/logout.vue";
8
+ import IProfile from "#icons/document/profile.vue";
9
+ import ILock from "#icons/lock.vue";
10
+ import IReceipt from "#icons/receipt/receipt.vue";
11
+ import IBookmark from "#icons/bookmark.vue";
12
+ import IFile from "#icons/file.vue";
13
+ import IHistory from "#icons/history.vue";
14
+ import IUsers from "#icons/users/users.vue";
15
+ import IMessage from "#icons/message.vue";
5
16
  const isLargeScreen = true;
6
17
  const props = defineProps({
7
18
  rate: { type: String, required: true },
@@ -11,9 +22,52 @@ const props = defineProps({
11
22
  replenish: { type: String, required: false },
12
23
  oldVersion: { type: String, required: false }
13
24
  });
25
+ const appConfig = useAppConfig();
26
+ const mode = appConfig.adataUI.mode;
14
27
  defineEmits(["logout"]);
15
28
  const { t } = useI18n();
16
- const items = [];
29
+ const items = [
30
+ {
31
+ title: t("header.profile.menu.personalInfo"),
32
+ icon: IProfile,
33
+ to: `https://${mode}.kz` + PAGES.profile.index
34
+ },
35
+ {
36
+ title: t("header.profile.menu.security"),
37
+ icon: ILock,
38
+ to: `https://${mode}.kz` + PAGES.profile.security
39
+ },
40
+ {
41
+ title: t("header.profile.menu.paymentHistory"),
42
+ icon: IReceipt,
43
+ to: `https://${mode}.kz` + PAGES.profile.paymentHistory
44
+ },
45
+ {
46
+ title: t("header.profile.menu.favourites"),
47
+ icon: IBookmark,
48
+ to: `https://${mode}.kz` + PAGES.profile.favourites
49
+ },
50
+ {
51
+ title: t("header.profile.menu.myReports"),
52
+ icon: IFile,
53
+ to: `https://${mode}.kz` + PAGES.profile.reports
54
+ },
55
+ {
56
+ title: t("header.profile.menu.browsingHistory"),
57
+ icon: IHistory,
58
+ to: `https://${mode}.kz` + PAGES.profile.browsingHistory
59
+ },
60
+ {
61
+ title: t("header.profile.menu.myGroups"),
62
+ icon: IUsers,
63
+ to: `https://${mode}.kz` + PAGES.profile.myGroups
64
+ },
65
+ {
66
+ title: t("header.profile.menu.notes"),
67
+ icon: IMessage,
68
+ to: `https://${mode}.kz` + PAGES.profile.notes
69
+ }
70
+ ];
17
71
  const onReplenish = () => {
18
72
  if (window) {
19
73
  window.location.href = "https://adata.kz/profile?popupBalance=1";
@@ -33,13 +87,13 @@ const onReplenish = () => {
33
87
  <div class="flex items-center justify-between gap-4 lg:mt-2">
34
88
  <div>
35
89
  <span class="mr-2 font-semibold lg:text-lg">{{ rate }}</span>
36
- <div
90
+ <a-status-badge
37
91
  type="success"
38
92
  class="!px-3 font-semibold text-white"
39
93
  size="sm"
40
94
  >
41
95
  {{ t("header.profile.connected") }}
42
- </div>
96
+ </a-status-badge>
43
97
  </div>
44
98
  <span class="bg-deepblue ml-2 rounded-xl px-2 py-1 text-xs lg:hidden">{{ balance.toLocaleString("RU-ru") }} ₸</span>
45
99
  </div>
@@ -48,14 +102,14 @@ const onReplenish = () => {
48
102
  {{ t("header.profile.currentBalance") }}
49
103
  <span class="ml-2 rounded-xl bg-deepblue-900 px-2 py-1">{{ balance.toLocaleString("RU-ru") }} ₸</span>
50
104
  </div>
51
- <button
105
+ <a-button
52
106
  size="sm"
53
107
  view="outline"
54
108
  variant="ghost"
55
109
  @click="onReplenish"
56
110
  >
57
111
  {{ t("header.profile.addBalance") }}
58
- </button>
112
+ </a-button>
59
113
  </div>
60
114
  </div>
61
115
  <!-- mobile -->
@@ -65,26 +119,26 @@ const onReplenish = () => {
65
119
  <div class="font-semibold">
66
120
  {{ rate }}
67
121
  </div>
68
- <div
122
+ <a-status-badge
69
123
  type="success"
70
124
  class="!px-3 font-semibold text-white dark:text-gray-900"
71
125
  size="sm"
72
126
  >
73
127
  {{ t("header.profile.connected") }}
74
- </div>
128
+ </a-status-badge>
75
129
  </div>
76
130
  <div class="flex min-w-[90px] flex-col">
77
131
  <div class="font-semibold">
78
132
  {{ t("header.profile.balance") }}
79
133
  </div>
80
134
  <div class="flex gap-1">
81
- <div
135
+ <a-status-badge
82
136
  size="sm"
83
137
  class="!px-3 font-semibold text-white dark:!bg-[#E3E5E8] dark:text-gray-900"
84
138
  type="gray"
85
139
  >
86
140
  {{ balance.toLocaleString("RU-ru") }} ₸
87
- </div>
141
+ </a-status-badge>
88
142
  <button
89
143
  class="flex h-[23px] w-[23px] items-center justify-center rounded-md bg-white text-deepblue-900 dark:bg-gray-900 dark:text-[#E3E5E8]"
90
144
  @click="onReplenish"
@@ -100,7 +154,7 @@ const onReplenish = () => {
100
154
  </div>
101
155
  <div class="rounded-b-[0.5rem] bg-white p-4 dark:bg-[#232324]">
102
156
  <div class="mb-2 flex justify-between gap-2 lg:hidden">
103
- <div
157
+ <a-status-badge
104
158
  size="sm"
105
159
  class="w-full py-[6px] font-semibold"
106
160
  >
@@ -108,8 +162,8 @@ const onReplenish = () => {
108
162
  {{ t("header.profile.requests") }}
109
163
  </span>
110
164
  {{ limitRemaining }}
111
- </div>
112
- <div
165
+ </a-status-badge>
166
+ <a-status-badge
113
167
  size="sm"
114
168
  class="w-full py-[6px] font-semibold"
115
169
  >
@@ -117,7 +171,7 @@ const onReplenish = () => {
117
171
  {{ t("header.profile.daysLeft") }}
118
172
  </span>
119
173
  {{ daysRemaining }}
120
- </div>
174
+ </a-status-badge>
121
175
  </div>
122
176
  <div class="grid grid-cols-2 gap-2">
123
177
  <nuxt-link
@@ -149,7 +203,7 @@ const onReplenish = () => {
149
203
  </span>
150
204
  <div />
151
205
  </div>
152
- <button
206
+ <a-button
153
207
  class="lg:mt-2"
154
208
  block
155
209
  @click="$emit('logout')"
@@ -158,7 +212,7 @@ const onReplenish = () => {
158
212
  <span>
159
213
  {{ t("header.profile.logout") }}
160
214
  </span>
161
- </button>
215
+ </a-button>
162
216
  </div>
163
217
  </div>
164
218
  </template>