adata-ui 2.1.40-beta.11 → 2.1.40-beta.13
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/assets/styles/index.scss +67 -5
- package/components/elements/a-select-row/ASelectRowV2.vue +8 -8
- 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 +7 -5
- package/components/elements/button-login/index.vue +1 -1
- package/components/elements/chip-wrapper/AChipWrapper.vue +1 -1
- package/components/elements/chips/AChips.vue +2 -2
- package/components/elements/digit-badge/ADigitBadge.vue +21 -19
- package/components/elements/feature-description/AFeatureDescription.vue +1 -1
- package/components/elements/leave-note/ALeaveNote.vue +1 -1
- package/components/elements/pagination/APagination.vue +7 -7
- package/components/elements/segmented/ASegmentedV2.vue +103 -10
- package/components/elements/select/ASelect.vue +4 -4
- package/components/elements/select/ASelectMobile.vue +2 -2
- package/components/elements/select/ASelectV2.vue +10 -11
- package/components/elements/select/ui/select-button.vue +1 -1
- package/components/elements/status-badge/AStatusBadge.vue +22 -19
- package/components/elements/status-badge-v2/StatusBadgeV2.vue +1 -3
- 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 +1 -1
- package/components/features/dropdown/ADropdownV2.vue +1 -2
- package/components/features/lang-switcher/lang-switcher.vue +9 -4
- 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 +3 -3
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +1 -1
- package/components/features/payment/process/PaymentMethodSidePanel.vue +3 -3
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +2 -2
- package/components/features/pk-mobile-services/APkMobileServices.vue +1 -1
- package/components/features//321/201hange-version/AChangeVersion.vue +2 -2
- package/components/forms/checkbox/ACheckbox.vue +1 -1
- package/components/forms/checkbox/ACheckboxV2.vue +5 -5
- package/components/forms/input/AInputV2.vue +4 -4
- 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/toggle/AToggle.vue +2 -3
- package/components/forms/toggle/AToggleV2.vue +3 -3
- package/components/modals/AnotherDeviceModal.vue +1 -1
- package/components/modals/ContactsMobileModel.vue +1 -1
- package/components/modals/ContentNavigationModal.vue +3 -3
- package/components/modals/Insufficient-funds-modal.vue +1 -1
- package/components/modals/PaymentMethodModal.vue +1 -1
- package/components/modals/id/IdBanner.vue +3 -3
- package/components/modals/id/IdRecoveryModal.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 +2 -4
- package/components/navigation/header/AlmatyContacts.vue +78 -78
- package/components/navigation/header/CardGallery.vue +4 -4
- package/components/navigation/header/HeaderUsage.vue +29 -15
- package/components/navigation/header/ListItem.vue +2 -2
- package/components/navigation/header/NavCard.vue +1 -1
- package/components/navigation/header/NavList.vue +2 -2
- package/components/navigation/header/NotificationsMenu.vue +2 -3
- package/components/navigation/header/ProductMenu.vue +1 -1
- package/components/navigation/header/ProfileMenu.vue +26 -35
- package/components/navigation/header/SystemNotification.vue +1 -3
- package/components/navigation/pill-tabs/APillTabs.vue +2 -2
- package/components/navigation/pill-tabs/APillTabsV2.vue +5 -5
- package/components/overlays/drawer/ADrawerV2.vue +335 -0
- package/components/overlays/modal/AModal.vue +4 -4
- package/components/overlays/modal/AModalV2.vue +10 -4
- package/components/overlays/side-panel/ASidePanel.vue +6 -6
- package/components/overlays/sideover/ASlideover.vue +6 -6
- package/components/overlays/tooltip/ATooltip.vue +1 -1
- package/components/overlays/tooltip/ATooltipV2.vue +2 -12
- package/components/transitions/ATransitionHeight.vue +1 -1
- package/composables/useHeaderNavigationLinks.ts +100 -94
- package/icons/archive.vue +16 -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/bot.vue +52 -0
- package/icons/clock-time.vue +24 -0
- package/icons/compare-outlined.vue +8 -0
- package/icons/dots-horizontal.vue +31 -0
- package/icons/download-line.vue +13 -0
- package/icons/egov.vue +41 -0
- package/icons/elicense.vue +38 -0
- package/icons/favourite-bookmark-outline.vue +17 -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/git-compare.vue +38 -0
- package/icons/graduation-cap.vue +31 -0
- package/icons/graph-loading.vue +34 -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/message-dotted.vue +30 -0
- package/icons/notification-error.vue +17 -0
- package/icons/person.vue +22 -0
- package/icons/settings.vue +26 -0
- package/icons/shield-alert.vue +31 -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/view-eye-open.vue +13 -0
- package/package.json +1 -1
- package/plugins/toast.client.ts +38 -55
- 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/plugins/toast.client.ts
CHANGED
|
@@ -1,58 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import InfoCircle from '#adata-ui/icons/info/info-circle.vue'
|
|
2
|
+
import CheckCircleToast from '#adata-ui/icons/toasts/check-circle-toast.vue'
|
|
3
|
+
import WarningTriangle from '#adata-ui/icons/warning/warning-triangle.vue'
|
|
4
|
+
import XMark from '#adata-ui/icons/x-mark.vue'
|
|
5
|
+
import Vue3Toastify, { toast } from 'vue3-toastify'
|
|
6
|
+
import 'vue3-toastify/dist/index.css'
|
|
6
7
|
|
|
7
8
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
fontSize:'16px',
|
|
38
|
-
color:'#E74135'
|
|
39
|
-
},
|
|
40
|
-
bodyClassName:'toast__body',
|
|
41
|
-
progressStyle:{
|
|
42
|
-
background:'#E7413533'
|
|
9
|
+
nuxtApp.vueApp.use(Vue3Toastify, { autoClose: 2500, theme: 'light' })
|
|
10
|
+
|
|
11
|
+
const baseOptions = (icon: any) => ({
|
|
12
|
+
position: 'top-right' as const,
|
|
13
|
+
theme: 'light' as const,
|
|
14
|
+
icon,
|
|
15
|
+
closeButton: XMark,
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const customSuccessToast = (message: string, options?: any) =>
|
|
19
|
+
toast.success(message, { ...baseOptions(CheckCircleToast), ...options })
|
|
20
|
+
|
|
21
|
+
const customErrorToast = (message: string, options?: any) =>
|
|
22
|
+
toast.error(message, { ...baseOptions(WarningTriangle), ...options })
|
|
23
|
+
|
|
24
|
+
const customInfoToast = (message: string, options?: any) =>
|
|
25
|
+
toast.info(message, { ...baseOptions(InfoCircle), ...options })
|
|
26
|
+
|
|
27
|
+
const customWarningToast = (message: string, options?: any) =>
|
|
28
|
+
toast.warning(message, { ...baseOptions(WarningTriangle), ...options })
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
provide: {
|
|
32
|
+
toast: {
|
|
33
|
+
...toast,
|
|
34
|
+
success: customSuccessToast,
|
|
35
|
+
error: customErrorToast,
|
|
36
|
+
info: customInfoToast,
|
|
37
|
+
warning: customWarningToast,
|
|
43
38
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return {
|
|
50
|
-
provide: {
|
|
51
|
-
toast: {
|
|
52
|
-
...toast,
|
|
53
|
-
success: customSuccessToast,
|
|
54
|
-
error: customErrorToast,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
});
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
})
|
package/tailwind.config.ts
CHANGED
|
@@ -4,160 +4,191 @@ import defaultColors from 'tailwindcss/colors'
|
|
|
4
4
|
|
|
5
5
|
export default <Partial<Config>>{
|
|
6
6
|
darkMode: 'class',
|
|
7
|
-
content: ['./components/**/*.vue', './
|
|
7
|
+
content: ['./components/**/*.vue', './components/**/*.ts', './icons/**/*.vue'],
|
|
8
8
|
safelist: [
|
|
9
9
|
{
|
|
10
10
|
pattern: /bg-(blue|green|yellow|red|orange|purple)-(|400|500|600|700|900)\/(10|20)/,
|
|
11
|
-
variants: ['hover']
|
|
12
|
-
}
|
|
11
|
+
variants: ['hover'],
|
|
12
|
+
},
|
|
13
13
|
],
|
|
14
14
|
theme: {
|
|
15
15
|
fontFamily: {
|
|
16
|
-
|
|
16
|
+
sans: ['"Open Sans"', 'sans-serif'],
|
|
17
|
+
},
|
|
18
|
+
borderRadius: {
|
|
19
|
+
'none': '0px',
|
|
20
|
+
'DEFAULT': '4px',
|
|
21
|
+
'xs': '4px',
|
|
22
|
+
'sm': '6px',
|
|
23
|
+
'md': '8px',
|
|
24
|
+
'10': '10px',
|
|
25
|
+
'lg': '12px',
|
|
26
|
+
'xl': '16px',
|
|
27
|
+
'2xl': '20px',
|
|
28
|
+
'full': '9999px',
|
|
17
29
|
},
|
|
18
30
|
colors: {
|
|
19
31
|
black: defaultColors.black,
|
|
20
32
|
white: defaultColors.white,
|
|
21
33
|
transparent: defaultColors.transparent,
|
|
22
|
-
|
|
34
|
+
blue: {
|
|
23
35
|
// DEFAULT: '#0070eb',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
50: '#eff7ff',
|
|
37
|
+
100: '#e0efff',
|
|
38
|
+
200: '#bddfff',
|
|
39
|
+
300: '#90d7ff',
|
|
40
|
+
400: '#43afed',
|
|
41
|
+
500: '#1b98e2',
|
|
42
|
+
600: '#068dff',
|
|
43
|
+
700: '#0070eb',
|
|
44
|
+
800: '#085dc5',
|
|
45
|
+
900: '#0d509b',
|
|
46
|
+
950: '#0e315d',
|
|
35
47
|
},
|
|
36
|
-
|
|
48
|
+
yellow: {
|
|
37
49
|
// DEFAULT: '#fbc920',
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
50: '#fefbe8',
|
|
51
|
+
100: '#fef7c3',
|
|
52
|
+
200: '#feed8a',
|
|
53
|
+
300: '#fedb46',
|
|
54
|
+
400: '#fbc920',
|
|
55
|
+
500: '#ebad07',
|
|
56
|
+
600: '#cb8503',
|
|
57
|
+
700: '#a25e06',
|
|
58
|
+
800: '#854a0e',
|
|
59
|
+
900: '#713c12',
|
|
60
|
+
950: '#421e06',
|
|
49
61
|
},
|
|
50
|
-
|
|
62
|
+
deepblue: {
|
|
51
63
|
// pickled-bluewood
|
|
52
64
|
// DEFAULT: '#2c3e50',
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
50: '#f5f7fa',
|
|
66
|
+
100: '#eaeff4',
|
|
67
|
+
200: '#cfdce8',
|
|
68
|
+
300: '#a6bfd3',
|
|
69
|
+
400: '#759cbb',
|
|
70
|
+
500: '#5480a3',
|
|
71
|
+
600: '#416788',
|
|
72
|
+
700: '#35526f',
|
|
73
|
+
800: '#2f475d',
|
|
74
|
+
900: '#2c3e50',
|
|
75
|
+
950: '#1d2834',
|
|
64
76
|
},
|
|
65
|
-
|
|
77
|
+
gray: {
|
|
66
78
|
// gray-chateau
|
|
67
79
|
// DEFAULT: '#9da3ac',
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
50: '#f4f5f6',
|
|
81
|
+
100: '#ebecee',
|
|
82
|
+
200: '#e3e5e8',
|
|
83
|
+
300: '#c9cccf',
|
|
84
|
+
400: '#b7bcc2',
|
|
85
|
+
500: '#9da3ac',
|
|
86
|
+
600: '#71757a',
|
|
87
|
+
700: '#5a5d60',
|
|
88
|
+
800: '#393d40',
|
|
89
|
+
900: '#26282b',
|
|
90
|
+
950: '#161617',
|
|
79
91
|
},
|
|
80
|
-
|
|
92
|
+
green: {
|
|
81
93
|
// DEFAULT: '#4caf50',
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
50: '#f3faf3',
|
|
95
|
+
100: '#e3f5e3',
|
|
96
|
+
200: '#c8eac9',
|
|
97
|
+
300: '#9dd89f',
|
|
98
|
+
400: '#6bbd6e',
|
|
99
|
+
500: '#4caf50',
|
|
100
|
+
600: '#358438',
|
|
101
|
+
700: '#2d6830',
|
|
102
|
+
800: '#275429',
|
|
103
|
+
900: '#224525',
|
|
104
|
+
950: '#0e2510',
|
|
93
105
|
},
|
|
94
|
-
|
|
106
|
+
orange: {
|
|
95
107
|
// DEFAULT: '#e37b00',
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
50: '#fffbea',
|
|
109
|
+
100: '#fff4c5',
|
|
110
|
+
200: '#ffe987',
|
|
111
|
+
300: '#ffd748',
|
|
112
|
+
400: '#ffc31e',
|
|
113
|
+
500: '#ff9900',
|
|
114
|
+
600: '#e37b00',
|
|
115
|
+
700: '#b95304',
|
|
116
|
+
800: '#96400a',
|
|
117
|
+
900: '#7b350c',
|
|
118
|
+
950: '#471901',
|
|
107
119
|
},
|
|
108
|
-
|
|
120
|
+
red: {
|
|
109
121
|
// cinnabar
|
|
110
122
|
// DEFAULT: '#e74135',
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
50: '#fef3f2',
|
|
124
|
+
100: '#fde5e3',
|
|
125
|
+
200: '#fccfcc',
|
|
126
|
+
300: '#f9ada8',
|
|
127
|
+
400: '#f47e75',
|
|
128
|
+
500: '#e74135',
|
|
129
|
+
600: '#d6372c',
|
|
130
|
+
700: '#b42b21',
|
|
131
|
+
800: '#95271f',
|
|
132
|
+
900: '#7c2620',
|
|
133
|
+
950: '#43100c',
|
|
122
134
|
},
|
|
123
|
-
|
|
124
|
-
//purple-heart
|
|
135
|
+
purple: {
|
|
136
|
+
// purple-heart
|
|
125
137
|
DEFAULT: '#7c25b6',
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
50: '#fbf5ff',
|
|
139
|
+
100: '#f4e8ff',
|
|
140
|
+
200: '#ebd5ff',
|
|
141
|
+
300: '#dcb5fd',
|
|
142
|
+
400: '#c685fb',
|
|
143
|
+
500: '#b056f6',
|
|
144
|
+
600: '#9c34e9',
|
|
145
|
+
700: '#8723cd',
|
|
146
|
+
800: '#7c25b6',
|
|
147
|
+
900: '#5d1d86',
|
|
148
|
+
950: '#400863',
|
|
137
149
|
},
|
|
138
|
-
|
|
150
|
+
turquoise: {
|
|
139
151
|
// light-blue
|
|
140
152
|
// DEFAULT: '#1ee1be',
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
50: '#effefa',
|
|
154
|
+
100: '#c8fff0',
|
|
155
|
+
200: '#92fde3',
|
|
156
|
+
300: '#53f5d3',
|
|
157
|
+
400: '#1ee1be',
|
|
158
|
+
500: '#07c5a6',
|
|
159
|
+
600: '#029f89',
|
|
160
|
+
700: '#077e6f',
|
|
161
|
+
800: '#0b6459',
|
|
162
|
+
900: '#0e534a',
|
|
163
|
+
950: '#01322e',
|
|
152
164
|
},
|
|
153
165
|
|
|
154
166
|
},
|
|
155
167
|
extend: {
|
|
156
168
|
backgroundImage: {
|
|
157
169
|
'gr-blue': 'linear-gradient(236.46deg, #479FFF -2.39%, #0070EB 79.1%)',
|
|
158
|
-
'gr-yellow': 'linear-gradient(236.46deg, #FFE364 -2.39%, #FBC920 79.1%);\n'
|
|
159
|
-
}
|
|
170
|
+
'gr-yellow': 'linear-gradient(236.46deg, #FFE364 -2.39%, #FBC920 79.1%);\n',
|
|
171
|
+
},
|
|
172
|
+
fontSize: {
|
|
173
|
+
'display-hero': ['60px', { lineHeight: '72px', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
174
|
+
'display-lg': ['40px', { lineHeight: '48px', letterSpacing: '-0.02em', fontWeight: '700' }],
|
|
175
|
+
'display-sm': ['32px', { lineHeight: '40px', letterSpacing: '-0.015em', fontWeight: '700' }],
|
|
176
|
+
'h1': ['28px', { lineHeight: '36px', letterSpacing: '-0.02em', fontWeight: '700' }],
|
|
177
|
+
'h2': ['24px', { lineHeight: '32px', letterSpacing: '-0.015em', fontWeight: '700' }],
|
|
178
|
+
'h3': ['20px', { lineHeight: '28px', letterSpacing: '-0.01em', fontWeight: '600' }],
|
|
179
|
+
'h4': ['18px', { lineHeight: '28px', letterSpacing: '-0.005em', fontWeight: '600' }],
|
|
180
|
+
'h5': ['16px', { lineHeight: '24px', fontWeight: '600' }],
|
|
181
|
+
'body-lg': ['16px', { lineHeight: '24px', fontWeight: '400' }],
|
|
182
|
+
'body-lg-medium': ['16px', { lineHeight: '24px', fontWeight: '500' }],
|
|
183
|
+
'body-lg-strong': ['16px', { lineHeight: '24px', fontWeight: '600' }],
|
|
184
|
+
'body-md': ['14px', { lineHeight: '20px', fontWeight: '400' }],
|
|
185
|
+
'body-md-medium': ['14px', { lineHeight: '20px', fontWeight: '500' }],
|
|
186
|
+
'body-md-strong': ['14px', { lineHeight: '20px', fontWeight: '600' }],
|
|
187
|
+
'body-sm': ['12px', { lineHeight: '16px', fontWeight: '400' }],
|
|
188
|
+
'body-sm-medium': ['12px', { lineHeight: '16px', fontWeight: '500' }],
|
|
189
|
+
'overline': ['12px', { lineHeight: '16px', letterSpacing: '0.02em', fontWeight: '600' }],
|
|
190
|
+
'overline-medium': ['12px', { lineHeight: '16px', letterSpacing: '0.02em', fontWeight: '500' }],
|
|
191
|
+
},
|
|
160
192
|
},
|
|
161
193
|
},
|
|
162
194
|
}
|
|
163
|
-
|
package/utils/twMerge.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { extendTailwindMerge } from 'tailwind-merge'
|
|
2
|
+
|
|
3
|
+
export { twJoin } from 'tailwind-merge'
|
|
4
|
+
|
|
5
|
+
export const twMerge = extendTailwindMerge({
|
|
6
|
+
extend: {
|
|
7
|
+
classGroups: {
|
|
8
|
+
// Нестандартный шаг шкалы скруглений ДС-2026 (radius/10 = 10px)
|
|
9
|
+
'rounded': [{ rounded: ['10'] }],
|
|
10
|
+
'font-size': [{
|
|
11
|
+
text: [
|
|
12
|
+
'display-hero',
|
|
13
|
+
'display-lg',
|
|
14
|
+
'display-sm',
|
|
15
|
+
'h1',
|
|
16
|
+
'h2',
|
|
17
|
+
'h3',
|
|
18
|
+
'h4',
|
|
19
|
+
'h5',
|
|
20
|
+
'body-lg',
|
|
21
|
+
'body-lg-medium',
|
|
22
|
+
'body-lg-strong',
|
|
23
|
+
'body-md',
|
|
24
|
+
'body-md-medium',
|
|
25
|
+
'body-md-strong',
|
|
26
|
+
'body-sm',
|
|
27
|
+
'body-sm-medium',
|
|
28
|
+
'overline',
|
|
29
|
+
'overline-medium',
|
|
30
|
+
],
|
|
31
|
+
}],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
})
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<li
|
|
3
|
-
:style="{ 'padding-left': `${node.level * 20}px` }"
|
|
4
|
-
:class="[
|
|
5
|
-
{ 'bg-[#2C3E500D] dark:bg-[#E3E5E80D]': node.state === 'checked' && type === 'select' }
|
|
6
|
-
]"
|
|
7
|
-
>
|
|
8
|
-
<div class="flex items-center gap-1 p-2" v-if="!node?.hidden"
|
|
9
|
-
:class="{ 'bg-deepblue-50 dark:bg-gray-200/5': disabled && node.state === 'unchecked' }"
|
|
10
|
-
>
|
|
11
|
-
<div class="min-w-4">
|
|
12
|
-
<a-icon-chevron-down
|
|
13
|
-
v-if="node.expandable"
|
|
14
|
-
width="16"
|
|
15
|
-
height="16"
|
|
16
|
-
:class="['cursor-pointer transition-all', { '-rotate-90': node.expandableClosed }]"
|
|
17
|
-
@click="toggleExpand(node)"
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
<div v-if="type === 'select'" class="w-full">
|
|
21
|
-
<input
|
|
22
|
-
:id="node.id.toString()"
|
|
23
|
-
type="checkbox"
|
|
24
|
-
:disabled="disabled && node.state === 'unchecked'"
|
|
25
|
-
class="hidden"
|
|
26
|
-
:checked="node.state === 'checked'"
|
|
27
|
-
@change="handleCheckboxChange"
|
|
28
|
-
/>
|
|
29
|
-
<label
|
|
30
|
-
:for="node.id.toString()"
|
|
31
|
-
class="flex grow cursor-pointer items-center justify-between gap-4"
|
|
32
|
-
>
|
|
33
|
-
<span :class="{ 'font-semibold': node.level === 0 }" v-html="node.text" />
|
|
34
|
-
<a-icon-check v-if="node.state === 'checked'" class="min-w-4 text-blue-700" />
|
|
35
|
-
</label>
|
|
36
|
-
</div>
|
|
37
|
-
<a-checkbox
|
|
38
|
-
v-if="type === 'checkbox'"
|
|
39
|
-
size="lg"
|
|
40
|
-
:model-value="node.state === 'checked'"
|
|
41
|
-
:name="`${node.id}`"
|
|
42
|
-
:intermediate="node.state === 'indeterminate'"
|
|
43
|
-
side="right"
|
|
44
|
-
:disabled="disabled && node.state === 'unchecked'"
|
|
45
|
-
always-intermediate
|
|
46
|
-
@change="handleCheckboxChange"
|
|
47
|
-
>
|
|
48
|
-
<span class="heading-05" v-html="node.text" />
|
|
49
|
-
</a-checkbox>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<a-transition-height>
|
|
53
|
-
<ul v-if="node.expandable && !node.expandableClosed">
|
|
54
|
-
<template v-for="childNode in node.child" :key="childNode.id">
|
|
55
|
-
<tree-select-nodes
|
|
56
|
-
:node="childNode"
|
|
57
|
-
:toggle-expand="toggleExpand"
|
|
58
|
-
:toggle-checkbox="toggleCheckbox"
|
|
59
|
-
:type="type"
|
|
60
|
-
:disabled="disabled"
|
|
61
|
-
/>
|
|
62
|
-
</template>
|
|
63
|
-
</ul>
|
|
64
|
-
</a-transition-height>
|
|
65
|
-
</li>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script lang="ts" setup>
|
|
69
|
-
import type { TreeNestedNode } from '#adata-ui/components/elements/tree-select/types'
|
|
70
|
-
|
|
71
|
-
interface Props {
|
|
72
|
-
node: TreeNestedNode
|
|
73
|
-
toggleExpand: Function
|
|
74
|
-
toggleCheckbox: Function
|
|
75
|
-
disabled: boolean
|
|
76
|
-
type: 'checkbox' | 'select'
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const props = defineProps<Props>()
|
|
80
|
-
|
|
81
|
-
const handleCheckboxChange = (event) => {
|
|
82
|
-
props.toggleCheckbox(props.node.id, event.target.checked)
|
|
83
|
-
}
|
|
84
|
-
const toggleExpand = (node) => {
|
|
85
|
-
props.toggleExpand(node)
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<style scoped>
|
|
90
|
-
/* Стили для узлов дерева и флажков выбора можно настроить по вашему усмотрению */
|
|
91
|
-
</style>
|