adata-ui 2.1.40-beta.18 → 2.1.40-beta.19
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/assets/styles/index.scss +67 -5
- package/components/elements/a-select-row/ASelectRowV2.vue +214 -0
- package/components/elements/a-select-row/index.vue +3 -5
- package/components/elements/accordion/AAccordion.vue +5 -3
- package/components/elements/accordion/AAccordionGroup/AAccordionGroup.vue +3 -3
- package/components/elements/alert/AAlert.vue +34 -47
- package/components/elements/bg-block/ABgBlock.vue +1 -1
- package/components/elements/button/AButton.vue +3 -3
- package/components/elements/button/AButtonV2.vue +133 -0
- package/components/elements/button-login/index.vue +6 -10
- package/components/elements/chip-wrapper/AChipWrapper.vue +1 -1
- package/components/elements/chips/AChips.vue +2 -2
- package/components/elements/companies/AOurClients.vue +3 -1
- package/components/elements/curve-block-v2/ACurveBlockV2.vue +85 -0
- package/components/elements/digit-badge/ADigitBadge.vue +24 -22
- package/components/elements/feature-description/AFeatureDescription.vue +1 -1
- package/components/elements/leave-note/ALeaveNote.vue +39 -18
- package/components/elements/pagination/APagination.vue +7 -7
- package/components/elements/segmented/ASegmentedV2.vue +151 -0
- package/components/elements/select/ASelect.vue +4 -4
- package/components/elements/select/ASelectMobile.vue +2 -2
- package/components/elements/select/ASelectV2.vue +588 -0
- package/components/elements/select/ui/select-button.vue +1 -1
- package/components/elements/show-more/AShowMoreV2.vue +26 -0
- package/components/elements/slider/ASlider.vue +174 -0
- package/components/elements/slider/ASliderItem.vue +31 -0
- package/components/elements/slider/types.ts +21 -0
- package/components/elements/star-rating/AStarRating.vue +12 -4
- package/components/elements/status-badge/AStatusBadge.vue +91 -44
- package/components/elements/step-slider/AStepSliderColCard.vue +232 -0
- package/components/elements/step-slider/AStepSliderColNumber.vue +178 -0
- package/components/elements/table/ATable.vue +1 -1
- package/components/elements/table/table.config.ts +2 -2
- package/components/elements/tree-select/ATreeSelect.vue +97 -113
- package/components/elements/tree-select/TreeService.ts +142 -207
- package/components/elements/tree-select/components/ATreeSelectNode.vue +104 -0
- package/components/elements/tree-select/types.ts +40 -11
- package/components/elements/tree-select/utils.ts +30 -0
- package/components/elements/tree-select-modal/ATreeSelectModal.vue +217 -0
- package/components/features/color-mode/AColorMode.client.vue +74 -32
- package/components/features/dropdown/ADropdownV2.vue +140 -0
- package/components/features/lang-switcher/lang-switcher.vue +125 -40
- package/components/features/payment/banner/BasicPlusLimitBanner.vue +3 -3
- package/components/features/payment/banner/PaymentBanner.vue +3 -3
- package/components/features/payment/banner/UpSellBanner.vue +3 -3
- package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +45 -27
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +34 -23
- package/components/features/payment/process/PaymentMethodSidePanel.vue +66 -49
- package/components/features/payment/process/PaymentProcess.vue +6 -6
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +49 -63
- package/components/features/pk-mobile-services/APkMobileServices.vue +6 -28
- package/components/features//321/201hange-version/AChangeVersion.vue +2 -2
- package/components/forms/checkbox/ACheckbox.vue +1 -1
- package/components/forms/checkbox/ACheckboxV2.vue +229 -0
- package/components/forms/feedback-form/FeedbackForm.vue +8 -8
- package/components/forms/feedback-form/FeedbackFormV2.vue +182 -0
- package/components/forms/input/AInputV2.vue +542 -0
- package/components/forms/input/date/AInputDate.vue +2 -2
- package/components/forms/input/password/AInputPassword.vue +8 -2
- package/components/forms/input/standard/AInputStandard.vue +3 -3
- package/components/forms/input/textarea/ATextarea.vue +2 -2
- package/components/forms/input/textarea/ATextareaV2.vue +248 -0
- package/components/forms/toggle/AToggle.vue +2 -3
- package/components/forms/toggle/AToggleV2.vue +71 -0
- package/components/modals/AnotherDeviceModal.vue +22 -18
- package/components/modals/ApplicationAcceptedModal.vue +12 -15
- package/components/modals/ConnectingTariffModal.vue +13 -20
- package/components/modals/ContactsMobileModel.vue +1 -1
- package/components/modals/ContentNavigationModal.vue +77 -333
- package/components/modals/Insufficient-funds-modal.vue +18 -33
- package/components/modals/LimitReachedModal.vue +17 -14
- package/components/modals/NoAccessModal.vue +9 -11
- package/components/modals/PaymentMethodModal.vue +1 -1
- package/components/modals/ReportBugConfirmModal.vue +12 -10
- package/components/modals/ReportBugModal.vue +46 -38
- package/components/modals/Resend.vue +9 -10
- package/components/modals/SubmitApplicationModal.vue +27 -24
- package/components/modals/id/IdBanner.vue +3 -3
- package/components/modals/id/IdConfirmAccountOtpModal.vue +4 -9
- package/components/modals/id/IdLoginModal.vue +3 -8
- package/components/modals/id/IdModals.vue +23 -10
- package/components/modals/id/IdRecoveryModal.vue +1 -1
- package/components/modals/id/IdTwoFactorModal.vue +3 -8
- package/components/navigation/bottom-navigation/ABottomNavigation.vue +1 -1
- package/components/navigation/breadcrumbs/ABreadcrumbs.vue +106 -45
- package/components/navigation/breadcrumbs/types.ts +3 -0
- package/components/navigation/footer/AFooter.vue +39 -40
- package/components/navigation/footer/ui/a-footer-accordion.vue +9 -9
- package/components/navigation/header/AHeader.vue +68 -51
- package/components/navigation/header/AlmatyContacts.vue +78 -78
- package/components/navigation/header/CardGallery.vue +9 -7
- package/components/navigation/header/ContactMenu.vue +26 -92
- package/components/navigation/header/HeaderLink.vue +181 -213
- package/components/navigation/header/HeaderUsage.vue +139 -0
- package/components/navigation/header/ListItem.vue +2 -2
- package/components/navigation/header/NavCard.vue +1 -1
- package/components/navigation/header/NavList.vue +33 -92
- package/components/navigation/header/NotificationsMenu.vue +2 -3
- package/components/navigation/header/ProductMenu.vue +81 -127
- package/components/navigation/header/ProfileMenu.vue +122 -151
- package/components/navigation/header/SystemNotification.vue +108 -0
- package/components/navigation/mobile-navigation/AMobileNavigation.vue +23 -15
- package/components/navigation/pill-tabs/APillTabs.vue +2 -2
- package/components/navigation/pill-tabs/APillTabsV2.vue +226 -0
- package/components/overlays/drawer/ADrawerV2.vue +335 -0
- package/components/overlays/modal/AModal.vue +4 -4
- package/components/overlays/modal/AModalV2.vue +397 -0
- package/components/overlays/side-panel/ASidePanel.vue +10 -7
- package/components/overlays/sideover/ASlideover.vue +6 -6
- package/components/overlays/tooltip/ATooltip.vue +1 -1
- package/components/overlays/tooltip/ATooltipV2.vue +223 -0
- package/components/overlays/tooltip/types.ts +26 -0
- package/components/overlays/tooltip/useTooltipTrigger.ts +101 -0
- package/components/transitions/ATransitionHeight.vue +1 -1
- package/composables/useAccessTokenCookie.ts +25 -0
- package/composables/useActiveNavigation.ts +84 -0
- package/composables/useChipOverflow.ts +92 -0
- package/composables/useHeaderNavigationLinks.ts +140 -98
- package/icons/archive.vue +16 -0
- package/icons/arrow/arrow-left-right.vue +8 -0
- package/icons/arrow/arrow-right.vue +14 -0
- package/icons/arrow/arrows-in.vue +11 -0
- package/icons/arrow/arrows-out.vue +11 -0
- package/icons/arrow/arrows-resize-in.vue +38 -0
- package/icons/arrow/arrows-resize-out.vue +17 -0
- package/icons/bill.vue +3 -0
- package/icons/bot.vue +52 -0
- package/icons/briefcase.vue +14 -0
- package/icons/building.vue +9 -0
- package/icons/car-side.vue +16 -0
- package/icons/cart.vue +15 -0
- package/icons/chart-no-axes-column.vue +3 -0
- package/icons/clock-time.vue +24 -0
- package/icons/cloud/cloud-upload.vue +3 -0
- package/icons/code.vue +9 -0
- package/icons/compare-outlined.vue +8 -0
- package/icons/dots-horizontal.vue +31 -0
- package/icons/download-line.vue +13 -0
- package/icons/download-rounded.vue +15 -0
- package/icons/egov.vue +41 -0
- package/icons/elicense.vue +38 -0
- package/icons/favourite-bookmark-outline.vue +17 -0
- package/icons/file/file-check-corner.vue +3 -0
- package/icons/file/file-spreadsheet.vue +3 -0
- package/icons/file-pen.vue +31 -0
- package/icons/file-stack.vue +31 -0
- package/icons/file-types/excel.vue +131 -0
- package/icons/file-types/html.vue +13 -0
- package/icons/file-types/jpeg.vue +16 -0
- package/icons/file-types/pdf.vue +11 -0
- package/icons/file-types/png.vue +11 -0
- package/icons/file-types/rar.vue +11 -0
- package/icons/file-types/word.vue +50 -0
- package/icons/file-types/zip.vue +11 -0
- package/icons/gauge.vue +17 -0
- package/icons/git-compare.vue +38 -0
- package/icons/git-fork.vue +3 -0
- package/icons/graduation-cap.vue +31 -0
- package/icons/graph-loading.vue +34 -0
- package/icons/headset.vue +6 -0
- package/icons/help-question-circle.vue +26 -0
- package/icons/in-row-type.vue +46 -0
- package/icons/in-table-type.vue +29 -0
- package/icons/landmark.vue +3 -0
- package/icons/layers.vue +3 -0
- package/icons/letter/letter-a.vue +6 -0
- package/icons/letter/letter-b.vue +6 -0
- package/icons/letter/letter-c.vue +6 -0
- package/icons/letter/letter-d.vue +6 -0
- package/icons/letter/letter-e.vue +6 -0
- package/icons/link-url.vue +3 -0
- package/icons/list-tree.vue +3 -0
- package/icons/mail-question-mark.vue +8 -0
- package/icons/message/message-square.vue +3 -0
- package/icons/message-dotted.vue +30 -0
- package/icons/network.vue +3 -0
- package/icons/newspaper.vue +3 -0
- package/icons/notification-error.vue +17 -0
- package/icons/person.vue +22 -0
- package/icons/phone-call.vue +6 -0
- package/icons/phone-reversed.vue +3 -0
- package/icons/route.vue +7 -0
- package/icons/scan-search.vue +3 -0
- package/icons/settings.vue +26 -0
- package/icons/shield-alert.vue +31 -0
- package/icons/shield-verified.vue +14 -0
- package/icons/socials/facebook-color.vue +16 -0
- package/icons/socials/globe-color.vue +16 -0
- package/icons/socials/instagram-color.vue +46 -0
- package/icons/socials/linkedin-color.vue +14 -0
- package/icons/socials/telegram-color.vue +16 -0
- package/icons/socials/tiktok-color.vue +14 -0
- package/icons/socials/vk-color.vue +16 -0
- package/icons/socials/youtube-color.vue +16 -0
- package/icons/sparkles.vue +3 -0
- package/icons/sun.vue +13 -3
- package/icons/users-round.vue +3 -0
- package/icons/view-eye-open.vue +13 -0
- package/icons/workflow.vue +3 -0
- package/icons/zap.vue +3 -0
- package/lang/en.ts +49 -5
- package/lang/kk.ts +50 -6
- package/lang/ru.ts +51 -7
- package/package.json +1 -1
- package/plugins/toast.client.ts +38 -55
- package/shared/constans/pages.ts +8 -2
- package/tailwind.config.ts +147 -116
- package/utils/twMerge.ts +34 -0
- package/components/elements/tree-select/components/tree-select-nodes.vue +0 -91
- package/components/navigation/header/TopHeader.vue +0 -196
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Component } from 'vue'
|
|
3
|
+
|
|
4
|
+
type View = 'solid' | 'outline' | 'ghost' | 'soft'
|
|
5
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg'
|
|
6
|
+
type Color = 'blue' | 'green' | 'red' | 'gray' | 'white'
|
|
7
|
+
type Rounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full'
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<{
|
|
10
|
+
view?: View
|
|
11
|
+
color?: Color
|
|
12
|
+
size?: Size
|
|
13
|
+
rounded?: Rounded
|
|
14
|
+
icon?: Component
|
|
15
|
+
iconRight?: boolean
|
|
16
|
+
loading?: boolean
|
|
17
|
+
disabled?: boolean
|
|
18
|
+
block?: boolean
|
|
19
|
+
type?: 'button' | 'submit' | 'reset'
|
|
20
|
+
}>(), {
|
|
21
|
+
view: 'solid',
|
|
22
|
+
color: 'blue',
|
|
23
|
+
size: 'md',
|
|
24
|
+
rounded: 'lg',
|
|
25
|
+
iconRight: false,
|
|
26
|
+
loading: false,
|
|
27
|
+
disabled: false,
|
|
28
|
+
block: false,
|
|
29
|
+
type: 'button',
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const emit = defineEmits<{ click: [event: MouseEvent] }>()
|
|
33
|
+
|
|
34
|
+
const VIEW_CLASS: Record<Color, Record<View, string>> = {
|
|
35
|
+
blue: {
|
|
36
|
+
solid: 'bg-blue-600 text-white shadow-sm hover:bg-blue-700 hover:shadow-md active:bg-blue-800 dark:bg-blue-500 dark:hover:bg-blue-400',
|
|
37
|
+
outline: 'border border-blue-500 bg-white text-blue-700 hover:bg-blue-50 active:bg-blue-100 dark:border-blue-500 dark:bg-gray-900 dark:text-blue-300 dark:hover:bg-blue-950/40',
|
|
38
|
+
ghost: 'text-deepblue-900 hover:bg-gray-100 active:bg-gray-200 dark:text-gray-100 dark:hover:bg-white/[0.06] dark:active:bg-white/[0.1]',
|
|
39
|
+
soft: 'bg-blue-50 text-blue-700 hover:bg-blue-100 active:bg-blue-200/70 dark:bg-blue-950/40 dark:text-blue-300 dark:hover:bg-blue-900/40',
|
|
40
|
+
},
|
|
41
|
+
green: {
|
|
42
|
+
solid: 'bg-green-600 text-white shadow-sm hover:bg-green-700 hover:shadow-md active:bg-green-800 dark:bg-green-500 dark:hover:bg-green-400',
|
|
43
|
+
outline: 'border border-green-500 bg-white text-green-700 hover:bg-green-50 active:bg-green-100 dark:border-green-500 dark:bg-gray-900 dark:text-green-300 dark:hover:bg-green-950/40',
|
|
44
|
+
ghost: 'text-green-700 hover:bg-green-50 active:bg-green-100 dark:text-green-300 dark:hover:bg-green-950/40',
|
|
45
|
+
soft: 'bg-green-50 text-green-700 hover:bg-green-100 active:bg-green-200/70 dark:bg-green-950/40 dark:text-green-300 dark:hover:bg-green-900/40',
|
|
46
|
+
},
|
|
47
|
+
red: {
|
|
48
|
+
solid: 'bg-red-600 text-white shadow-sm hover:bg-red-700 hover:shadow-md active:bg-red-800 dark:bg-red-500 dark:hover:bg-red-400',
|
|
49
|
+
outline: 'border border-red-500 bg-white text-red-700 hover:bg-red-50 active:bg-red-100 dark:border-red-500 dark:bg-gray-900 dark:text-red-300 dark:hover:bg-red-950/40',
|
|
50
|
+
ghost: 'text-red-700 hover:bg-red-50 active:bg-red-100 dark:text-red-300 dark:hover:bg-red-950/40',
|
|
51
|
+
soft: 'bg-red-50 text-red-700 hover:bg-red-100 active:bg-red-200/70 dark:bg-red-950/40 dark:text-red-300 dark:hover:bg-red-900/40',
|
|
52
|
+
},
|
|
53
|
+
gray: {
|
|
54
|
+
solid: 'bg-gray-600 text-white shadow-sm hover:bg-gray-700 hover:shadow-md active:bg-gray-800 dark:bg-gray-500 dark:hover:bg-gray-400',
|
|
55
|
+
outline: 'border border-gray-300 bg-white text-deepblue-900 hover:border-gray-400 hover:bg-gray-50 active:bg-gray-100 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:border-gray-600 dark:hover:bg-white/[0.06]',
|
|
56
|
+
ghost: 'text-deepblue-900 hover:bg-gray-100 active:bg-gray-200 dark:text-gray-100 dark:hover:bg-white/[0.06] dark:active:bg-white/[0.1]',
|
|
57
|
+
soft: 'bg-gray-100 text-gray-700 hover:bg-gray-200 active:bg-gray-200/70 dark:bg-gray-800/60 dark:text-gray-200 dark:hover:bg-gray-700/60',
|
|
58
|
+
},
|
|
59
|
+
white: {
|
|
60
|
+
solid: 'bg-white text-blue-700 shadow-sm hover:bg-blue-50 hover:shadow-md active:bg-blue-100 dark:bg-gray-900 dark:hover:bg-gray-800',
|
|
61
|
+
outline: 'border border-blue-500 bg-white text-blue-700 hover:bg-blue-50 active:bg-blue-100 dark:border-blue-500 dark:bg-gray-900 dark:text-blue-300 dark:hover:bg-blue-950/40',
|
|
62
|
+
ghost: 'text-blue-700 hover:bg-blue-50 active:bg-blue-100 dark:text-blue-300 dark:hover:bg-blue-950/40',
|
|
63
|
+
soft: 'bg-blue-50 text-blue-700 hover:bg-blue-100 active:bg-blue-200/70 dark:bg-blue-950/40 dark:text-blue-300 dark:hover:bg-blue-900/40',
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const SIZE_CLASS: Record<Size, string> = {
|
|
68
|
+
xs: 'h-6 gap-1 px-2 text-body-sm',
|
|
69
|
+
sm: 'h-8 gap-1.5 px-3 text-body-sm',
|
|
70
|
+
md: 'h-10 gap-2 px-4 text-body-md',
|
|
71
|
+
lg: 'h-12 gap-2.5 px-5 text-body-lg',
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const ROUNDED_CLASS: Record<Rounded, string> = {
|
|
75
|
+
none: 'rounded-none',
|
|
76
|
+
sm: 'rounded-sm',
|
|
77
|
+
md: 'rounded-md',
|
|
78
|
+
lg: 'rounded-lg',
|
|
79
|
+
xl: 'rounded-xl',
|
|
80
|
+
full: 'rounded-full',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const ICON_SIZE: Record<Size, string> = {
|
|
84
|
+
xs: 'size-3.5',
|
|
85
|
+
sm: 'size-4',
|
|
86
|
+
md: 'size-5',
|
|
87
|
+
lg: 'size-5',
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function onClick(event: MouseEvent) {
|
|
91
|
+
if (props.disabled || props.loading) return
|
|
92
|
+
emit('click', event)
|
|
93
|
+
}
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<template>
|
|
97
|
+
<button
|
|
98
|
+
:type="type"
|
|
99
|
+
:disabled="disabled || loading"
|
|
100
|
+
class="button-v2 inline-flex select-none items-center justify-center font-semibold transition-all duration-150 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
101
|
+
:class="[
|
|
102
|
+
VIEW_CLASS[color][view],
|
|
103
|
+
SIZE_CLASS[size],
|
|
104
|
+
ROUNDED_CLASS[rounded],
|
|
105
|
+
block ? 'w-full' : '',
|
|
106
|
+
iconRight ? 'flex-row-reverse' : '',
|
|
107
|
+
]"
|
|
108
|
+
@click="onClick"
|
|
109
|
+
>
|
|
110
|
+
<a-icon-loader-circle
|
|
111
|
+
v-if="loading"
|
|
112
|
+
class="shrink-0 animate-spin"
|
|
113
|
+
:class="ICON_SIZE[size]"
|
|
114
|
+
/>
|
|
115
|
+
<component
|
|
116
|
+
:is="icon"
|
|
117
|
+
v-else-if="icon"
|
|
118
|
+
class="shrink-0"
|
|
119
|
+
:class="ICON_SIZE[size]"
|
|
120
|
+
/>
|
|
121
|
+
<span v-if="$slots.default" class="truncate">
|
|
122
|
+
<slot />
|
|
123
|
+
</span>
|
|
124
|
+
</button>
|
|
125
|
+
</template>
|
|
126
|
+
|
|
127
|
+
<style scoped>
|
|
128
|
+
@media (prefers-reduced-motion: reduce) {
|
|
129
|
+
.button-v2 {
|
|
130
|
+
transition: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
defineEmits(['click'])
|
|
3
3
|
|
|
4
4
|
const { t } = useI18n()
|
|
5
|
-
|
|
6
|
-
defineEmits(['click'])
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<template>
|
|
10
|
-
<
|
|
11
|
-
|
|
8
|
+
<button
|
|
9
|
+
type="button"
|
|
10
|
+
class="hidden h-8 cursor-pointer items-center rounded-lg bg-blue-700 px-3.5 text-sm font-semibold text-white transition-colors duration-150 hover:bg-blue-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:ring-offset-1 dark:bg-blue-500 dark:text-gray-900 dark:hover:bg-blue-600 dark:focus-visible:ring-offset-gray-900 lg:inline-flex"
|
|
12
11
|
data-test-id="header-login-button"
|
|
13
12
|
@click="$emit('click')"
|
|
14
13
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{{ t('header.login') }}
|
|
18
|
-
</span>
|
|
19
|
-
</div>
|
|
14
|
+
{{ t('header.login') }}
|
|
15
|
+
</button>
|
|
20
16
|
</template>
|
|
21
17
|
|
|
22
18
|
<style scoped></style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {twMerge} from
|
|
2
|
+
import {twMerge} from '#adata-ui/utils/twMerge';
|
|
3
3
|
|
|
4
4
|
type Props = {
|
|
5
5
|
size?: 'sm' | 'md' | 'lg'
|
|
@@ -23,7 +23,7 @@ const sizeOptions = {
|
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
25
|
<button
|
|
26
|
-
:class="twMerge(['flex items-center gap-2 rounded-
|
|
26
|
+
:class="twMerge(['flex items-center gap-2 rounded-2xl border border-solid px-2.5 text-xs hover:bg-deepblue-100 dark:hover:bg-[#E3E5E80D] focus-visible:shadow-[0_0_0_4px#1B64B3] active:bg-blue active:text-white disabled:border-deepblue-200 disabled:text-deepblue-200', chipView[view], sizeOptions[size]], $attrs.class)"
|
|
27
27
|
>
|
|
28
28
|
<slot/>
|
|
29
29
|
</button>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex flex-col gap-4 lg:gap-8">
|
|
3
|
-
<
|
|
3
|
+
<slot name="title">
|
|
4
|
+
<h2 class="md:heading-01 heading-02">{{ t('our_clients.title') }}</h2>
|
|
5
|
+
</slot>
|
|
4
6
|
<a-infinite-carousel>
|
|
5
7
|
<div class="flex items-center justify-center">
|
|
6
8
|
<a-icon-company-forte class="max-w-[150px] sm:max-w-none"></a-icon-company-forte>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { NuxtLinkLocale } from '#components'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
|
|
5
|
+
// Same logic/props as ACurveBlock — only the visual design differs.
|
|
6
|
+
const props = withDefaults(defineProps<{
|
|
7
|
+
icon: Component
|
|
8
|
+
title: string
|
|
9
|
+
description: string
|
|
10
|
+
to?: string
|
|
11
|
+
/** Accent color as a hex code, e.g. "#068dff". */
|
|
12
|
+
color?: string
|
|
13
|
+
}>(), {
|
|
14
|
+
color: '#068dff',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const bg = computed(() => `${props.color}1A`) // ~10% opacity в hex
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<component
|
|
22
|
+
:is="to ? NuxtLinkLocale : 'button'"
|
|
23
|
+
:to="to"
|
|
24
|
+
:style="{ '--cb-color': color, '--cb-bg': bg }"
|
|
25
|
+
class="curve-block-v2 group relative flex w-full cursor-pointer flex-col gap-4 rounded-2xl border border-gray-100 bg-white p-6 text-left transition-all duration-200 hover:-translate-y-1 hover:border-gray-300 hover:shadow-lg dark:border-gray-700 dark:bg-gray-800"
|
|
26
|
+
:class="{ 'active-item': !to }"
|
|
27
|
+
active-class="active-item"
|
|
28
|
+
>
|
|
29
|
+
<!-- arrow, top-right -->
|
|
30
|
+
<div class="arrow-icon absolute right-4 top-4 flex size-7 items-center justify-center rounded-full p-2 bg-[#068dff]/10 text-[#068dff]">
|
|
31
|
+
<svg
|
|
32
|
+
class="size-2"
|
|
33
|
+
viewBox="16 16 16 16"
|
|
34
|
+
fill="none"
|
|
35
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
+
>
|
|
37
|
+
<path
|
|
38
|
+
fill-rule="evenodd"
|
|
39
|
+
clip-rule="evenodd"
|
|
40
|
+
d="M17.1155 16C16.4994 16 16 16.4994 16 17.1155C16 17.7315 16.4994 18.231 17.1155 18.231L28.1915 18.231L16.3267 30.0958C15.8911 30.5314 15.8911 31.2377 16.3267 31.6733C16.7623 32.1089 17.4686 32.1089 17.9042 31.6733L29.769 19.8085L29.769 30.8845C29.769 31.5006 30.2685 32 30.8845 32C31.5006 32 32 31.5006 32 30.8845L32 17.1155C32 16.9642 31.9699 16.82 31.9154 16.6885C31.8617 16.5589 31.7826 16.4373 31.678 16.3315C31.6749 16.3283 31.6717 16.3251 31.6685 16.322C31.5627 16.2174 31.4411 16.1383 31.3115 16.0846C31.18 16.0301 31.0358 16 30.8845 16L17.1155 16Z"
|
|
41
|
+
fill="currentColor"
|
|
42
|
+
/>
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- icon -->
|
|
47
|
+
<div class="icon-item w-fit rounded-xl p-3">
|
|
48
|
+
<component
|
|
49
|
+
:is="icon"
|
|
50
|
+
class="size-6 shrink-0"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="flex flex-col gap-2 pr-6">
|
|
55
|
+
<p class="title text-base font-semibold text-deepblue-900 dark:text-white">
|
|
56
|
+
{{ title }}
|
|
57
|
+
</p>
|
|
58
|
+
<p class="text-sm leading-relaxed text-gray-500 dark:text-gray-300">
|
|
59
|
+
{{ description }}
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
</component>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
/* icon uses the card's accent color at 10% bg + full-color glyph */
|
|
67
|
+
.icon-item {
|
|
68
|
+
background-color: var(--cb-bg);
|
|
69
|
+
color: var(--cb-color);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* active state (route match, or forced when there is no `to`) */
|
|
73
|
+
.active-item {
|
|
74
|
+
border-color: var(--cb-color);
|
|
75
|
+
background-color: var(--cb-bg);
|
|
76
|
+
}
|
|
77
|
+
.active-item .title,
|
|
78
|
+
.active-item .arrow-icon {
|
|
79
|
+
color: var(--cb-color);
|
|
80
|
+
}
|
|
81
|
+
.active-item .icon-item {
|
|
82
|
+
background-color: var(--cb-color);
|
|
83
|
+
color: #fff;
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
<script lang='ts' setup>
|
|
2
|
-
import {twMerge} from
|
|
2
|
+
import { twMerge } from '#adata-ui/utils/twMerge'
|
|
3
3
|
|
|
4
|
-
defineOptions({name: 'ADigitBadge'})
|
|
4
|
+
defineOptions({ name: 'ADigitBadge' })
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
7
|
+
type: 'primary',
|
|
8
|
+
view: 'default',
|
|
9
|
+
size: 'lg',
|
|
10
|
+
disabled: false,
|
|
11
|
+
customClasses: '',
|
|
12
|
+
prefix: '',
|
|
13
|
+
})
|
|
5
14
|
|
|
6
15
|
interface Props {
|
|
7
16
|
type?: 'primary' | 'success' | 'danger' | 'gray' | 'orange' | 'warning'
|
|
@@ -13,37 +22,29 @@ interface Props {
|
|
|
13
22
|
prefix?: string
|
|
14
23
|
}
|
|
15
24
|
|
|
16
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
17
|
-
type: 'primary',
|
|
18
|
-
view: 'default',
|
|
19
|
-
size: 'lg',
|
|
20
|
-
disabled: false,
|
|
21
|
-
customClasses: '',
|
|
22
|
-
prefix: ''
|
|
23
|
-
})
|
|
24
25
|
const formattedValue = computed(() => {
|
|
25
|
-
return Number(props.value).toLocaleString('ru-RU')
|
|
26
|
-
})
|
|
26
|
+
return Number(props.value).toLocaleString('ru-RU')
|
|
27
|
+
})
|
|
27
28
|
const classes = computed(() =>
|
|
28
29
|
[
|
|
29
30
|
props.disabled ? 'text-gray-500 bg-deepblue-900/5' : typeSwitchValues[props.view][props.type],
|
|
30
31
|
'inline-flex items-center justify-center font-medium rounded-full select-none inline-flex outline-none',
|
|
31
32
|
sizeSwitchValues[props.size],
|
|
32
|
-
props.value && props.value.toString().length >
|
|
33
|
+
props.value && props.value.toString().length > 1 ? 'w-auto' : '',
|
|
33
34
|
])
|
|
34
35
|
|
|
35
36
|
export type StateType = {
|
|
36
37
|
[key in 'primary' | 'success' | 'danger' | 'gray' | 'orange' | 'warning']?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
38
|
+
}
|
|
39
|
+
interface ViewType {
|
|
39
40
|
default: StateType
|
|
40
41
|
inverted: StateType
|
|
41
42
|
transparent: StateType
|
|
42
|
-
}
|
|
43
|
+
}
|
|
43
44
|
|
|
44
45
|
type SizeSwitchValues = {
|
|
45
46
|
[key in 'sm' | 'md' | 'lg']: string;
|
|
46
|
-
}
|
|
47
|
+
}
|
|
47
48
|
|
|
48
49
|
const typeSwitchValues: ViewType = {
|
|
49
50
|
default: {
|
|
@@ -52,7 +53,7 @@ const typeSwitchValues: ViewType = {
|
|
|
52
53
|
danger: 'bg-red-500 text-white dark:bg-red-400 dark:text-gray-900',
|
|
53
54
|
warning: 'bg-yellow-400 text-white dark:text-gray-900',
|
|
54
55
|
gray: 'bg-gray-50 text-gray-500 dark:text-gray-900',
|
|
55
|
-
orange: 'bg-orange-600 text-white dark:bg-orange-500 dark:text-gray-900'
|
|
56
|
+
orange: 'bg-orange-600 text-white dark:bg-orange-500 dark:text-gray-900',
|
|
56
57
|
},
|
|
57
58
|
inverted: {
|
|
58
59
|
primary: 'bg-white text-blue-700 dark:text-blue-500 dark:bg-gray-900',
|
|
@@ -65,15 +66,16 @@ const typeSwitchValues: ViewType = {
|
|
|
65
66
|
transparent: {
|
|
66
67
|
success: 'bg-green-500/20 text-green-500',
|
|
67
68
|
danger: 'bg-red-500/20 text-red-500 dark:text-red-400',
|
|
68
|
-
}
|
|
69
|
+
},
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
const sizeSwitchValues: SizeSwitchValues = {
|
|
72
|
-
sm: 'w-4 h-4 px-1 text-
|
|
73
|
-
md: 'w-5 h-5 px-1 text-
|
|
74
|
-
lg: 'px-2 w-6 h-6 text-
|
|
73
|
+
sm: 'w-4 h-4 px-1 text-body-sm',
|
|
74
|
+
md: 'w-5 h-5 px-1 text-body-sm',
|
|
75
|
+
lg: 'px-2 w-6 h-6 text-body-sm font-semibold',
|
|
75
76
|
}
|
|
76
77
|
</script>
|
|
78
|
+
|
|
77
79
|
<template>
|
|
78
80
|
<div
|
|
79
81
|
:class="twMerge(...classes, customClasses)"
|
|
@@ -62,7 +62,7 @@ onUnmounted(() => clearTimer())
|
|
|
62
62
|
<div
|
|
63
63
|
:class="[
|
|
64
64
|
'transition-all duration-300 ease-in-out',
|
|
65
|
-
selected === idx ? 'rounded-
|
|
65
|
+
selected === idx ? 'rounded-sm bg-blue-700 dark:bg-blue-500 p-2 icon-bg' : 'size-fit'
|
|
66
66
|
]"
|
|
67
67
|
>
|
|
68
68
|
<component
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import * as z from 'zod'
|
|
3
3
|
import { useUIValidation } from '#adata-ui/composables/useUIValidation'
|
|
4
|
+
import AButtonV2 from '#adata-ui/components/elements/button/AButtonV2.vue'
|
|
4
5
|
|
|
5
|
-
const props = defineProps<{
|
|
6
|
+
const props = withDefaults(defineProps<{
|
|
6
7
|
isError?: boolean,
|
|
7
8
|
errorText?: string
|
|
8
|
-
}>()
|
|
9
|
+
}>(), {
|
|
10
|
+
isError: false,
|
|
11
|
+
errorText: '',
|
|
12
|
+
})
|
|
9
13
|
|
|
10
14
|
const emit = defineEmits<{
|
|
15
|
+
(e: 'onCancel'): void
|
|
11
16
|
(e: 'onSubmit'): void
|
|
12
17
|
}>()
|
|
13
18
|
|
|
@@ -30,6 +35,12 @@ const { validation, getError } = useUIValidation(
|
|
|
30
35
|
submitted,
|
|
31
36
|
)
|
|
32
37
|
|
|
38
|
+
function onCancel() {
|
|
39
|
+
submitted.value = false
|
|
40
|
+
note.value = ''
|
|
41
|
+
emit('onCancel')
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
async function onSubmit() {
|
|
34
45
|
submitted.value = true
|
|
35
46
|
if (validation.value) return
|
|
@@ -42,37 +53,47 @@ defineExpose({
|
|
|
42
53
|
</script>
|
|
43
54
|
|
|
44
55
|
<template>
|
|
45
|
-
<div class="flex flex-col items-start rounded-
|
|
56
|
+
<div class="flex flex-col items-start rounded-sm">
|
|
46
57
|
<p class="text-sm font-semibold mb-4">
|
|
47
58
|
{{ t('forms.leaveNote.title') }}
|
|
48
59
|
</p>
|
|
49
60
|
<a-textarea
|
|
50
61
|
v-model="note"
|
|
62
|
+
class="min-h-[120px]"
|
|
63
|
+
color-classes="bg-deepblue-900/5 outline outline-1 outline-gray-200 dark:outline-gray-600 dark:bg-gray-200/5 !rounded-[10px]"
|
|
64
|
+
size="sm"
|
|
65
|
+
resizeable="y"
|
|
51
66
|
:label="t('forms.leaveNote.placeholder')"
|
|
52
67
|
:error="getError('note')"
|
|
53
|
-
class="mb-2 min-h-[120px]"
|
|
54
|
-
resizeable="none"
|
|
55
|
-
clearable
|
|
56
|
-
required
|
|
57
68
|
>
|
|
58
69
|
<template #alert>
|
|
59
70
|
<a-alert
|
|
60
|
-
v-if="isError
|
|
71
|
+
v-if="isError"
|
|
61
72
|
color="red"
|
|
62
73
|
class="mt-1"
|
|
63
74
|
>
|
|
64
|
-
{{
|
|
75
|
+
{{ isError ? (!!errorText ? errorText : t('forms.leaveNote.limit')) : '' }}
|
|
65
76
|
</a-alert>
|
|
66
77
|
</template>
|
|
67
78
|
</a-textarea>
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
<div class="mt-2 flex w-full justify-end items-center gap-2 md:gap-[10px]">
|
|
80
|
+
<a-button-v2
|
|
81
|
+
class="w-full sm:w-auto"
|
|
82
|
+
view="outline"
|
|
83
|
+
size="md"
|
|
84
|
+
@click="onCancel"
|
|
85
|
+
>
|
|
86
|
+
{{ t('actions.cancel') }}
|
|
87
|
+
</a-button-v2>
|
|
88
|
+
<a-button-v2
|
|
89
|
+
:disabled="!note.trim() && isLoading"
|
|
90
|
+
class="w-full sm:w-auto"
|
|
91
|
+
size="md"
|
|
92
|
+
:loading="isLoading"
|
|
93
|
+
@click="onSubmit"
|
|
94
|
+
>
|
|
95
|
+
{{ t('actions.send') }}
|
|
96
|
+
</a-button-v2>
|
|
97
|
+
</div>
|
|
77
98
|
</div>
|
|
78
99
|
</template>
|
|
@@ -38,14 +38,14 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
38
38
|
{ 'bg-blue-700 text-white hover:bg-blue-900': modelValue === 1 },
|
|
39
39
|
!!activeClasses && 1 === modelValue ? activeClasses : ''
|
|
40
40
|
]"
|
|
41
|
-
class="flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
41
|
+
class="flex size-[40px] cursor-pointer items-center justify-center rounded-md transition hover:bg-[#2C3E500D] dark:hover:bg-[#E3E5E80D]"
|
|
42
42
|
@click="modelValue = 1"
|
|
43
43
|
>
|
|
44
44
|
<double-chevron-right class="rotate-180 text-base" />
|
|
45
45
|
</li>
|
|
46
46
|
<li
|
|
47
47
|
v-show="prevPage"
|
|
48
|
-
class="flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
48
|
+
class="flex size-[40px] cursor-pointer items-center justify-center rounded-md transition hover:bg-[#2C3E500D] dark:text-white"
|
|
49
49
|
@click="modelValue -= 1"
|
|
50
50
|
>
|
|
51
51
|
<a-icon-chevron-left />
|
|
@@ -56,7 +56,7 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
56
56
|
:key="page"
|
|
57
57
|
:class="[
|
|
58
58
|
defaultClasses,
|
|
59
|
-
'flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
59
|
+
'flex size-[40px] cursor-pointer items-center justify-center rounded-md transition hover:bg-[#2C3E500D] dark:hover:bg-[#E3E5E80D]'
|
|
60
60
|
]"
|
|
61
61
|
@click="modelValue = page"
|
|
62
62
|
>
|
|
@@ -67,7 +67,7 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
67
67
|
:class="[
|
|
68
68
|
defaultClasses,
|
|
69
69
|
'bg-blue-700 text-white hover:bg-blue-900',
|
|
70
|
-
'flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
70
|
+
'flex size-[40px] cursor-pointer items-center justify-center rounded-md transition'
|
|
71
71
|
]"
|
|
72
72
|
>
|
|
73
73
|
{{ modelValue }}
|
|
@@ -78,7 +78,7 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
78
78
|
:key="idx"
|
|
79
79
|
:class="[
|
|
80
80
|
defaultClasses,
|
|
81
|
-
'flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
81
|
+
'flex size-[40px] cursor-pointer items-center justify-center rounded-md transition hover:bg-[#2C3E500D] dark:hover:bg-[#E3E5E80D]'
|
|
82
82
|
]"
|
|
83
83
|
@click="modelValue = n"
|
|
84
84
|
>
|
|
@@ -88,7 +88,7 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
88
88
|
<li
|
|
89
89
|
v-show="nextPage"
|
|
90
90
|
:class="{ disabled: disabled }"
|
|
91
|
-
class="flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
91
|
+
class="flex size-[40px] cursor-pointer items-center justify-center rounded-md hover:bg-[#2C3E500D] dark:hover:bg-[#E3E5E80D]"
|
|
92
92
|
@click="modelValue += 1"
|
|
93
93
|
>
|
|
94
94
|
<a-icon-chevron-right />
|
|
@@ -100,7 +100,7 @@ const showFirstPageIndex = computed(() => modelValue.value > 3)
|
|
|
100
100
|
{ disabled: disabled },
|
|
101
101
|
!!activeClasses && lastPage === modelValue ? activeClasses : ''
|
|
102
102
|
]"
|
|
103
|
-
class="flex size-[40px] cursor-pointer items-center justify-center rounded-
|
|
103
|
+
class="flex size-[40px] cursor-pointer items-center justify-center rounded-md hover:bg-[#2C3E500D] dark:hover:bg-[#E3E5E80D]"
|
|
104
104
|
@click="modelValue = lastPage"
|
|
105
105
|
>
|
|
106
106
|
<double-chevron-right class="text-base" />
|