adata-ui 2.1.40-beta.1 → 2.1.40-beta.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 (56) hide show
  1. package/.claude/settings.local.json +19 -0
  2. package/components/elements/a-select-row/ASelectRowV2.vue +214 -0
  3. package/components/elements/button/AButtonV2.vue +112 -0
  4. package/components/elements/leave-note/ALeaveNote.vue +38 -17
  5. package/components/elements/segmented/ASegmentedV2.vue +58 -0
  6. package/components/elements/select/ASelectV2.vue +589 -0
  7. package/components/elements/show-more/AShowMoreV2.vue +26 -0
  8. package/components/elements/star-rating/AStarRating.vue +12 -4
  9. package/components/elements/status-badge-v2/StatusBadgeV2.vue +78 -0
  10. package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +43 -27
  11. package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +34 -23
  12. package/components/features/payment/process/PaymentMethodSidePanel.vue +61 -49
  13. package/components/features/payment/process/PaymentProcess.vue +6 -6
  14. package/components/features/payment/process/PaymentTopUpSidePanel.vue +44 -63
  15. package/components/forms/checkbox/ACheckboxV2.vue +229 -0
  16. package/components/forms/feedback-form/FeedbackForm.vue +8 -8
  17. package/components/forms/input/AInputV2.vue +542 -0
  18. package/components/forms/input/textarea/ATextareaV2.vue +248 -0
  19. package/components/forms/toggle/AToggleV2.vue +71 -0
  20. package/components/modals/AnotherDeviceModal.vue +22 -18
  21. package/components/modals/ApplicationAcceptedModal.vue +12 -15
  22. package/components/modals/ConnectingTariffModal.vue +13 -20
  23. package/components/modals/ContentNavigationModal.vue +77 -333
  24. package/components/modals/Insufficient-funds-modal.vue +18 -33
  25. package/components/modals/LimitReachedModal.vue +4 -3
  26. package/components/modals/NoAccessModal.vue +9 -11
  27. package/components/modals/PaymentMethodModal.vue +1 -1
  28. package/components/modals/ReportBugConfirmModal.vue +12 -10
  29. package/components/modals/ReportBugModal.vue +42 -36
  30. package/components/modals/Resend.vue +9 -10
  31. package/components/modals/SubmitApplicationModal.vue +27 -24
  32. package/components/modals/id/IdConfirmAccountOtpModal.vue +4 -9
  33. package/components/modals/id/IdLoginModal.vue +3 -8
  34. package/components/modals/id/IdModals.vue +23 -10
  35. package/components/modals/id/IdTwoFactorModal.vue +3 -8
  36. package/components/navigation/bottom-navigation/ABottomNavigation.vue +1 -1
  37. package/components/navigation/header/AHeader.vue +15 -19
  38. package/components/navigation/header/HeaderLink.vue +15 -21
  39. package/components/navigation/header/NavList.vue +8 -32
  40. package/components/navigation/header/ProductMenu.vue +52 -50
  41. package/components/navigation/pill-tabs/APillTabsV2.vue +134 -0
  42. package/components/overlays/modal/AModalV2.vue +391 -0
  43. package/composables/useAccessTokenCookie.ts +25 -0
  44. package/composables/useChipOverflow.ts +92 -0
  45. package/composables/useHeaderNavigationLinks.ts +53 -23
  46. package/icons/arrow/arrow-right.vue +14 -0
  47. package/icons/briefcase.vue +14 -0
  48. package/icons/car-side.vue +16 -0
  49. package/icons/cart.vue +15 -0
  50. package/icons/download-rounded.vue +15 -0
  51. package/icons/shield-verified.vue +14 -0
  52. package/lang/en.ts +35 -4
  53. package/lang/kk.ts +36 -5
  54. package/lang/ru.ts +37 -6
  55. package/package.json +1 -1
  56. package/shared/constans/pages.ts +8 -2
@@ -27,19 +27,14 @@ function isActive(itemPath: string) {
27
27
  </script>
28
28
 
29
29
  <template>
30
- <section
31
- class="group/section overflow-hidden rounded-xl border p-3 shadow-sm transition-colors"
32
- :class="currentModule
33
- ? 'border-blue-700/20 bg-blue-50 hover:border-blue-700/40 dark:border-blue-500/20 dark:bg-blue-500/5 dark:hover:border-blue-500/40'
34
- : 'border-gray-200 bg-white hover:border-blue-700/40 dark:border-gray-800 dark:bg-gray-950 dark:hover:border-blue-500/40'"
35
- >
30
+ <section class="group/section overflow-hidden flex flex-col ">
36
31
  <div class="mb-3 flex items-start justify-between gap-2">
37
32
  <nuxt-link-locale
38
33
  :to="link"
39
- 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"
34
+ class="group/title flex min-w-0 items-center gap-2 text-base font-semibold text-deepblue-900 transition-colors hover:text-blue-700 dark:text-gray-100 dark:hover:text-blue-500"
40
35
  >
41
36
  <span
42
- 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">
37
+ class="flex size-8 shrink-0 items-center justify-center rounded-lg bg-blue-50 text-blue-500 transition-colors group-hover/title:bg-blue-700 group-hover/title:text-white dark:bg-blue-500/10 dark:text-blue-500 dark:group-hover/title:bg-blue-500">
43
38
  <component
44
39
  :is="icon"
45
40
  class="size-4"
@@ -47,15 +42,6 @@ function isActive(itemPath: string) {
47
42
  </span>
48
43
  <span class="block truncate normal-case">{{ title }}</span>
49
44
  </nuxt-link-locale>
50
-
51
- <div class="flex shrink-0 items-center gap-1">
52
- <span
53
- v-if="badge"
54
- 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"
55
- >NEW</span>
56
- <a-icon-arrow-side-up
57
- class="size-4 text-gray-500 transition-colors group-hover/section:text-blue-700 dark:group-hover/section:text-blue-500"/>
58
- </div>
59
45
  </div>
60
46
 
61
47
  <ul class="grid gap-1">
@@ -67,24 +53,12 @@ function isActive(itemPath: string) {
67
53
  v-if="item.to"
68
54
  :to="item.to"
69
55
  itemprop="name"
70
- 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"
56
+ class="group/item flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors hover:bg-gray-50 dark:hover:bg-gray-200/10"
71
57
  :class="{ 'bg-blue-100 dark:bg-gray-200/10': isActive(item.to) }"
72
58
  >
59
+ <a-icon-chevron-right class="size-[14px] shrink-0 text-gray-300 group-hover/item:text-blue-500 dark:group-hover/item:text-blue-700" />
73
60
  <span
74
- class="flex size-7 shrink-0 items-center justify-center rounded-md transition-colors group-hover/item:bg-blue-700/10 group-hover/item:text-blue-700 dark:group-hover/item:text-blue-500"
75
- :class="{
76
- 'bg-blue-700/10 text-blue-700 dark:bg-blue-500/10 dark:text-blue-500': isActive(item.to),
77
- 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-300': !isActive(item.to),
78
- // 'bg-white text-gray-600 dark:bg-white dark:text-gray-300': currentModule,
79
- }"
80
- >
81
- <component
82
- :is="item.icon"
83
- class="size-[14px]"
84
- />
85
- </span>
86
- <span
87
- class="truncate text-sm font-semibold normal-case transition-colors group-hover/item:text-deepblue-900 dark:group-hover/item:text-gray-100"
61
+ class="min-w-0 text-sm normal-case transition-colors group-hover/item:text-deepblue-900 group-hover/item:font-semibold dark:group-hover/item:text-gray-100"
88
62
  :class="isActive(item.to)
89
63
  ? 'text-blue-700 dark:text-blue-500'
90
64
  : 'text-gray-600 dark:text-gray-300'"
@@ -92,5 +66,7 @@ function isActive(itemPath: string) {
92
66
  </nuxt-link-locale>
93
67
  </li>
94
68
  </ul>
69
+
70
+ <slot name="bottom" />
95
71
  </section>
96
72
  </template>
@@ -1,20 +1,21 @@
1
1
  <script setup lang="ts">
2
- import CardGallery from '#adata-ui/components/navigation/header/CardGallery.vue'
3
2
  import NavList from '#adata-ui/components/navigation/header/NavList.vue'
4
3
  import { useActiveNavigation } from '#adata-ui/composables/useActiveNavigation'
5
4
  import { useHeaderNavigationLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
5
+ import { useUrls } from '#adata-ui/composables/useUrls'
6
+ import AIconArrowRight from '#adata-ui/icons/arrow/arrow-right.vue'
7
+ import AIconDownloadRounded from '#adata-ui/icons/download-rounded.vue'
8
+ import { PAGES } from '#adata-ui/shared/constans/pages'
6
9
 
7
10
  defineProps<{ url?: string }>()
8
11
  defineEmits(['outerClick', 'mouseOver'])
9
12
 
10
- const { t } = useI18n()
13
+ const urls = useUrls()
14
+ const { t, locale } = useI18n()
11
15
  const modules = useHeaderNavigationLinks()
12
16
  const { isActiveModule } = useActiveNavigation()
13
17
 
14
- // Fixed EDO promo card on the left (like edo-editor); EDO is excluded from the catalog grid below.
15
- const edoModule = computed(() => modules.value.find(module => module.key === 'edo') ?? null)
16
-
17
- const COLUMN_KEYS = [['pk', 'fines', 'work'], ['fea', 'tenders'], ['compliance', 'analytics']]
18
+ const COLUMN_KEYS = [['edo'], ['pk'], ['compliance', 'fines'], ['tenders', 'analytics'], ['fea', 'work']]
18
19
  const catalogColumns = computed(() =>
19
20
  COLUMN_KEYS.map(keys =>
20
21
  keys
@@ -22,6 +23,14 @@ const catalogColumns = computed(() =>
22
23
  .filter((module): module is NonNullable<typeof module> => module !== undefined),
23
24
  ),
24
25
  )
26
+
27
+ function handleExportClick() {
28
+ navigateToLocalizedPage({
29
+ locale: locale.value,
30
+ projectUrl: urls.pk,
31
+ path: PAGES.pk.unload,
32
+ })
33
+ }
25
34
  </script>
26
35
 
27
36
  <template>
@@ -29,52 +38,12 @@ const catalogColumns = computed(() =>
29
38
  <div class="relative bg-white dark:bg-gray-950">
30
39
  <div class="a-container max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain py-8">
31
40
  <div class="flex justify-between gap-5">
32
- <!-- Left sidebar: EDO promo card (edo-editor style) + promo carousel. -->
33
- <aside class="flex w-[320px] shrink-0 flex-col gap-5">
34
- <nuxt-link-locale
35
- v-if="edoModule"
36
- :to="edoModule.link"
37
- class="group block overflow-hidden rounded-xl border border-blue-700/20 p-4 shadow-sm transition-colors hover:border-blue-700/40 hover:bg-blue-100 dark:border-blue-500/20 dark:hover:border-blue-500/40 dark:hover:bg-blue-500/10"
38
- :data-test-id="edoModule.data_attribute"
39
- >
40
- <div class="flex items-start gap-3">
41
- <div
42
- class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-blue-700 text-white shadow-sm">
43
- <component
44
- :is="edoModule.icon"
45
- class="size-5"
46
- />
47
- </div>
48
- <div class="min-w-0">
49
- <div class="flex items-center justify-between gap-2">
50
- <h3 class="text-base font-bold normal-case text-deepblue-900 dark:text-gray-100">
51
- {{ edoModule.name }}
52
- </h3>
53
- <div class="flex items-center gap-1 justify-end">
54
- <span
55
- v-if="edoModule.is_new"
56
- 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"
57
- >NEW</span>
58
- <a-icon-arrow-side-up
59
- class="size-4 text-gray-500 transition group-hover:-translate-y-0.5 group-hover:translate-x-0.5 group-hover:text-blue-700 dark:text-gray-400 dark:group-hover:text-blue-500"/>
60
- </div>
61
- </div>
62
- <p class="mt-1 text-sm normal-case leading-snug text-gray-600 dark:text-gray-300">
63
- {{ t('header.products.edo.heroSubtitle') }}
64
- </p>
65
- </div>
66
- </div>
67
- </nuxt-link-locale>
68
-
69
- <card-gallery class="hidden lg:block"/>
70
- </aside>
71
-
72
- <!-- Catalog grid: products as bordered section cards (EDO lives in the hero). -->
73
- <div class="grid min-w-0 flex-1 grid-cols-3 gap-3">
41
+ <div class="grid min-w-0 flex-1 grid-cols-5 gap-3">
74
42
  <div
75
43
  v-for="(column, index) in catalogColumns"
76
44
  :key="index"
77
- class="flex flex-col gap-3"
45
+ class="flex flex-col gap-[22px]"
46
+ :class="index > 0 ? 'border-l border-gray-100 pl-3 dark:border-gray-800' : ''"
78
47
  >
79
48
  <nav-list
80
49
  v-for="module in column"
@@ -88,7 +57,40 @@ const catalogColumns = computed(() =>
88
57
  :icon="module.icon"
89
58
  :badge="module.is_new"
90
59
  :data-test-id="module.data_attribute"
91
- />
60
+ >
61
+ <template
62
+ v-if="module.key === 'edo'"
63
+ #bottom
64
+ >
65
+ <div class="mt-4 flex flex-col gap-4 rounded-xl bg-blue-700 p-4 normal-case text-white dark:bg-blue-500">
66
+ <div class="flex items-center gap-3">
67
+ <span class="rounded-[10px] bg-white p-[10px] dark:bg-gray-950">
68
+ <a-icon-download-rounded class="size-5 text-blue-700 dark:text-blue-500" />
69
+ </span>
70
+ <span class="font-semibold text-white dark:text-gray-950">
71
+ {{ t('header.products.exportCard.title') }}
72
+ </span>
73
+ </div>
74
+
75
+ <div class="text-xs text-white dark:text-gray-950">
76
+ {{ t('header.products.exportCard.subTitle') }}
77
+ </div>
78
+
79
+ <a-button-v2
80
+ view="soft"
81
+ class="!h-9 w-fit !bg-white text-blue-700 dark:!bg-gray-950 dark:text-blue-500"
82
+ size="sm"
83
+ :icon="AIconArrowRight"
84
+ icon-right
85
+ @click="handleExportClick"
86
+ >
87
+ <span class="text-sm">
88
+ {{ t('header.products.exportCard.receive') }}
89
+ </span>
90
+ </a-button-v2>
91
+ </div>
92
+ </template>
93
+ </nav-list>
92
94
  </div>
93
95
  </div>
94
96
  </div>
@@ -0,0 +1,134 @@
1
+ <script lang="ts" setup>
2
+ type CountColor = 'gray' | 'blue' | 'yellow' | 'red' | 'green' | 'neutral'
3
+
4
+ export interface PillTab {
5
+ key: string
6
+ name: string
7
+ count?: number
8
+ countColor?: CountColor
9
+ disabled?: boolean
10
+ hideCount?: boolean
11
+ }
12
+
13
+ const props = withDefaults(defineProps<{
14
+ modelValue: string
15
+ options: PillTab[]
16
+ showCount?: boolean
17
+ ariaLabel?: string
18
+ block?: boolean
19
+ disabled?: boolean
20
+ size?: 'sm' | 'md'
21
+ scrollIntoView?: boolean
22
+ }>(), {
23
+ showCount: false,
24
+ block: false,
25
+ disabled: false,
26
+ size: 'sm',
27
+ scrollIntoView: false,
28
+ })
29
+
30
+ const emit = defineEmits<{ (e: 'update:modelValue', value: string): void }>()
31
+
32
+ const listRef = ref<HTMLElement | null>(null)
33
+
34
+ const SIZE_CLASS: Record<'sm' | 'md', string> = {
35
+ sm: 'text-xs',
36
+ md: 'text-sm',
37
+ }
38
+
39
+ const COUNT_COLOR_CLASS: Record<CountColor, string> = {
40
+ gray: 'bg-gray-200/70 text-gray-600 dark:bg-white/[0.08] dark:text-gray-300',
41
+ blue: 'bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300',
42
+ yellow: 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/40 dark:text-yellow-300',
43
+ red: 'bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300',
44
+ green: 'bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300',
45
+ neutral: 'bg-gray-100 text-gray-500 dark:bg-white/[0.06] dark:text-gray-400',
46
+ }
47
+
48
+ const { t, te } = useI18n()
49
+
50
+ function localize(label: string) {
51
+ return te(label) ? t(label) : label
52
+ }
53
+
54
+ function isDisabled(option: PillTab) {
55
+ return props.disabled || option.disabled === true
56
+ }
57
+
58
+ function select(option: PillTab) {
59
+ if (isDisabled(option)) return
60
+ emit('update:modelValue', option.key)
61
+ }
62
+
63
+ function scrollActiveIntoView() {
64
+ if (!props.scrollIntoView) return
65
+ nextTick(() => {
66
+ const active = listRef.value?.querySelector<HTMLElement>('[aria-selected="true"]')
67
+ active?.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' })
68
+ })
69
+ }
70
+
71
+ watch(() => props.modelValue, scrollActiveIntoView)
72
+ onMounted(scrollActiveIntoView)
73
+ </script>
74
+
75
+ <template>
76
+ <div
77
+ class="pill-tabs-v2 min-w-0 max-w-full rounded-xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]"
78
+ :class="[
79
+ block ? 'w-full' : 'w-fit',
80
+ disabled ? 'pill-tabs-v2--disabled opacity-60' : '',
81
+ ]"
82
+ :aria-disabled="disabled || undefined"
83
+ >
84
+ <div
85
+ ref="listRef"
86
+ role="tablist"
87
+ :aria-label="ariaLabel"
88
+ class="pill-tabs-v2__list flex w-full flex-nowrap items-center gap-1 overflow-x-auto"
89
+ >
90
+ <button
91
+ v-for="option in options"
92
+ :key="option.key"
93
+ type="button"
94
+ role="tab"
95
+ :aria-selected="modelValue === option.key"
96
+ :aria-disabled="isDisabled(option) || undefined"
97
+ :disabled="isDisabled(option)"
98
+ :tabindex="modelValue === option.key ? 0 : -1"
99
+ class="inline-flex items-center gap-1.5 whitespace-nowrap rounded-lg px-3 py-1.5 font-medium transition-colors duration-150"
100
+ :class="[
101
+ SIZE_CLASS[size],
102
+ isDisabled(option)
103
+ ? 'cursor-not-allowed text-gray-300 dark:text-gray-600'
104
+ : modelValue === option.key
105
+ ? 'bg-white text-deepblue-900 shadow-sm dark:bg-gray-700 dark:text-gray-100 dark:shadow-none dark:ring-1 dark:ring-inset dark:ring-white/10'
106
+ : 'text-gray-700 hover:bg-white/70 hover:text-gray-900 dark:text-gray-200 dark:hover:bg-white/[0.06] dark:hover:text-gray-100',
107
+ block ? 'flex-1 basis-0 justify-center' : 'shrink-0',
108
+ ]"
109
+ @click="select(option)"
110
+ >
111
+ <slot name="option" :option="option">
112
+ <span>{{ localize(option.name) }}</span>
113
+
114
+ <span
115
+ v-if="showCount && !option.hideCount"
116
+ class="inline-flex min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 text-xs font-semibold leading-5"
117
+ :class="COUNT_COLOR_CLASS[option.countColor ?? 'gray']"
118
+ >
119
+ {{ option.count }}
120
+ </span>
121
+ </slot>
122
+ </button>
123
+ </div>
124
+ </div>
125
+ </template>
126
+
127
+ <style scoped>
128
+ .pill-tabs-v2__list {
129
+ scrollbar-width: none;
130
+ }
131
+ .pill-tabs-v2__list::-webkit-scrollbar {
132
+ display: none;
133
+ }
134
+ </style>