adata-ui 3.1.35 → 3.1.37
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/README.md +84 -84
- package/dist/module.json +1 -1
- package/dist/module.mjs +11 -1
- package/dist/runtime/components/Alert.vue +26 -26
- package/dist/runtime/components/Header.vue +8 -2
- package/dist/runtime/components/Modal.vue +286 -0
- package/dist/runtime/components/Modal.vue.d.ts +41 -0
- package/dist/runtime/components/Tag.vue +4 -4
- package/dist/runtime/components/forms/input/standard/InputStandard.vue +2 -2
- package/dist/runtime/components/header/ListItem.vue.d.ts +1 -1
- package/dist/runtime/components/header/ProductMenu.vue +6 -6
- package/dist/runtime/components/mobile-navigation/BottomNavigation.vue +8 -2
- package/dist/runtime/components/modals/NoAccessContent.vue +8 -2
- package/dist/runtime/components/modals/id/IdAccessModal.vue +75 -0
- package/dist/runtime/components/modals/id/IdAccessModal.vue.d.ts +6 -0
- package/dist/runtime/components/modals/id/IdBanner.vue +45 -0
- package/dist/runtime/components/modals/id/IdBanner.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdConfirmAccountOtpModal.vue +169 -0
- package/dist/runtime/components/modals/id/IdConfirmAccountOtpModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdConfirmSuccessfulModal.vue +38 -0
- package/dist/runtime/components/modals/id/IdConfirmSuccessfulModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdLoginModal.vue +277 -0
- package/dist/runtime/components/modals/id/IdLoginModal.vue.d.ts +6 -0
- package/dist/runtime/components/modals/id/IdModals.vue +98 -0
- package/dist/runtime/components/modals/id/IdModals.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdNewPasswordModal.vue +113 -0
- package/dist/runtime/components/modals/id/IdNewPasswordModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdOtpInput.vue +128 -0
- package/dist/runtime/components/modals/id/IdOtpInput.vue.d.ts +15 -0
- package/dist/runtime/components/modals/id/IdPasswordSuccessfulModal.vue +23 -0
- package/dist/runtime/components/modals/id/IdPasswordSuccessfulModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdRecoveryModal.vue +103 -0
- package/dist/runtime/components/modals/id/IdRecoveryModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdRegistrationModal.vue +177 -0
- package/dist/runtime/components/modals/id/IdRegistrationModal.vue.d.ts +7 -0
- package/dist/runtime/components/modals/id/IdResetPasswordOtpModal.vue +141 -0
- package/dist/runtime/components/modals/id/IdResetPasswordOtpModal.vue.d.ts +2 -0
- package/dist/runtime/components/modals/id/IdTwoFactorModal.vue +114 -0
- package/dist/runtime/components/modals/id/IdTwoFactorModal.vue.d.ts +2 -0
- package/dist/runtime/components/tree-select/components/tree-select-nodes.vue.d.ts +1 -1
- package/dist/runtime/composables/projectState.d.ts +2 -2
- package/dist/runtime/composables/useIdModals.d.ts +23 -0
- package/dist/runtime/composables/useIdModals.js +32 -0
- package/dist/runtime/i18n/i18n.config.d.ts +333 -0
- package/dist/runtime/i18n.d.ts +1 -1
- package/dist/runtime/icons/arrow/arrow-right.vue +24 -24
- package/dist/runtime/icons/calendar.vue +24 -24
- package/dist/runtime/icons/download.vue +26 -26
- package/dist/runtime/icons/edit.vue +24 -24
- package/dist/runtime/icons/file/excel.vue +88 -88
- package/dist/runtime/icons/hand-with-phone/hand-with-phone-dark.vue +52 -0
- package/dist/runtime/icons/hand-with-phone/hand-with-phone-dark.vue.d.ts +2 -0
- package/dist/runtime/icons/hand-with-phone/hand-with-phone-light.vue +52 -0
- package/dist/runtime/icons/hand-with-phone/hand-with-phone-light.vue.d.ts +2 -0
- package/dist/runtime/icons/id.vue +9 -9
- package/dist/runtime/icons/map-pin-rect.vue +15 -15
- package/dist/runtime/icons/more.vue +36 -36
- package/dist/runtime/icons/plus-circle.vue +24 -24
- package/dist/runtime/icons/socials/google.vue +41 -0
- package/dist/runtime/icons/socials/google.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/mailru.vue +34 -0
- package/dist/runtime/icons/socials/mailru.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/yandex.vue +28 -0
- package/dist/runtime/icons/socials/yandex.vue.d.ts +2 -0
- package/dist/runtime/icons/tenge.vue +22 -22
- package/dist/runtime/icons/toasts/check-circle-toast.vue +6 -0
- package/dist/runtime/icons/toasts/check-circle-toast.vue.d.ts +2 -0
- package/dist/runtime/icons/toasts/warning-triangle-toast.vue +7 -0
- package/dist/runtime/icons/toasts/warning-triangle-toast.vue.d.ts +2 -0
- package/dist/runtime/icons/trash.vue +24 -24
- package/dist/runtime/icons/upload.vue +26 -26
- package/dist/runtime/icons/user.vue +30 -30
- package/dist/runtime/icons/warning-triangle.vue +29 -29
- package/dist/runtime/illustrations/address-location.vue +38 -0
- package/dist/runtime/illustrations/address-location.vue.d.ts +2 -0
- package/dist/runtime/illustrations/ball-with-chain.vue +120 -0
- package/dist/runtime/illustrations/ball-with-chain.vue.d.ts +2 -0
- package/dist/runtime/illustrations/bill.vue +133 -0
- package/dist/runtime/illustrations/bill.vue.d.ts +2 -0
- package/dist/runtime/illustrations/buildings.vue +82 -0
- package/dist/runtime/illustrations/buildings.vue.d.ts +2 -0
- package/dist/runtime/illustrations/calendar.vue +156 -0
- package/dist/runtime/illustrations/calendar.vue.d.ts +2 -0
- package/dist/runtime/illustrations/chains.vue +152 -0
- package/dist/runtime/illustrations/chains.vue.d.ts +2 -0
- package/dist/runtime/illustrations/coin-percent.vue +126 -0
- package/dist/runtime/illustrations/coin-percent.vue.d.ts +2 -0
- package/dist/runtime/illustrations/coins-stack.vue +202 -0
- package/dist/runtime/illustrations/coins-stack.vue.d.ts +2 -0
- package/dist/runtime/illustrations/delete-dark.vue +31 -0
- package/dist/runtime/illustrations/delete-dark.vue.d.ts +2 -0
- package/dist/runtime/illustrations/delete.vue +32 -0
- package/dist/runtime/illustrations/delete.vue.d.ts +2 -0
- package/dist/runtime/illustrations/doc-with-stamp.vue +126 -0
- package/dist/runtime/illustrations/doc-with-stamp.vue.d.ts +2 -0
- package/dist/runtime/illustrations/document.vue +64 -0
- package/dist/runtime/illustrations/document.vue.d.ts +2 -0
- package/dist/runtime/illustrations/door.vue +74 -0
- package/dist/runtime/illustrations/door.vue.d.ts +2 -0
- package/dist/runtime/illustrations/empty-box.vue +77 -0
- package/dist/runtime/illustrations/empty-box.vue.d.ts +2 -0
- package/dist/runtime/illustrations/empty-wallet.vue +161 -0
- package/dist/runtime/illustrations/empty-wallet.vue.d.ts +2 -0
- package/dist/runtime/illustrations/graph-in-coin.vue +119 -0
- package/dist/runtime/illustrations/graph-in-coin.vue.d.ts +2 -0
- package/dist/runtime/illustrations/hammer.vue +156 -0
- package/dist/runtime/illustrations/hammer.vue.d.ts +2 -0
- package/dist/runtime/illustrations/hand-cash.vue +108 -0
- package/dist/runtime/illustrations/hand-cash.vue.d.ts +2 -0
- package/dist/runtime/illustrations/info.vue +39 -0
- package/dist/runtime/illustrations/info.vue.d.ts +2 -0
- package/dist/runtime/illustrations/mail.vue +68 -0
- package/dist/runtime/illustrations/mail.vue.d.ts +2 -0
- package/dist/runtime/illustrations/ok.vue +62 -0
- package/dist/runtime/illustrations/ok.vue.d.ts +2 -0
- package/dist/runtime/illustrations/people-group.vue +237 -0
- package/dist/runtime/illustrations/people-group.vue.d.ts +2 -0
- package/dist/runtime/illustrations/person-with-phone.vue +187 -0
- package/dist/runtime/illustrations/person-with-phone.vue.d.ts +2 -0
- package/dist/runtime/illustrations/person.vue +159 -0
- package/dist/runtime/illustrations/person.vue.d.ts +2 -0
- package/dist/runtime/illustrations/phone-check.vue +90 -0
- package/dist/runtime/illustrations/phone-check.vue.d.ts +2 -0
- package/dist/runtime/illustrations/phone-payment-method.vue +223 -0
- package/dist/runtime/illustrations/phone-payment-method.vue.d.ts +2 -0
- package/dist/runtime/illustrations/stop-hand.vue +77 -0
- package/dist/runtime/illustrations/stop-hand.vue.d.ts +2 -0
- package/dist/runtime/illustrations/stop-sign.vue +34 -0
- package/dist/runtime/illustrations/stop-sign.vue.d.ts +2 -0
- package/dist/runtime/illustrations/suit.vue +111 -0
- package/dist/runtime/illustrations/suit.vue.d.ts +2 -0
- package/dist/runtime/illustrations/suitcase.vue +105 -0
- package/dist/runtime/illustrations/suitcase.vue.d.ts +2 -0
- package/dist/runtime/illustrations/terminal-dark.vue +48 -0
- package/dist/runtime/illustrations/terminal-dark.vue.d.ts +2 -0
- package/dist/runtime/illustrations/terminal.vue +234 -0
- package/dist/runtime/illustrations/terminal.vue.d.ts +2 -0
- package/dist/runtime/illustrations/trash-can.vue +108 -0
- package/dist/runtime/illustrations/trash-can.vue.d.ts +2 -0
- package/dist/runtime/illustrations/turn-on-tariff.vue +38 -0
- package/dist/runtime/illustrations/turn-on-tariff.vue.d.ts +2 -0
- package/dist/runtime/illustrations/two-persons.vue +169 -0
- package/dist/runtime/illustrations/two-persons.vue.d.ts +2 -0
- package/dist/runtime/lang/en.js +113 -2
- package/dist/runtime/lang/kk.js +113 -2
- package/dist/runtime/lang/ru.d.ts +111 -0
- package/dist/runtime/lang/ru.js +113 -2
- package/dist/runtime/plugins/toast.client.d.ts +505 -0
- package/dist/runtime/plugins/toast.client.js +58 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/utils/localizedNavigation.d.ts +1 -1
- package/dist/runtime/utils/removeTrailingSlash.d.ts +1 -0
- package/dist/runtime/utils/removeTrailingSlash.js +6 -0
- package/dist/runtime/utils/useUrls.d.ts +15 -0
- package/dist/runtime/utils/useUrls.js +20 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Get your module up and running quickly.
|
|
3
|
-
|
|
4
|
-
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
-
- Name: My Module
|
|
6
|
-
- Package name: my-module
|
|
7
|
-
- Description: My new Nuxt module
|
|
8
|
-
-->
|
|
9
|
-
|
|
10
|
-
# My Module
|
|
11
|
-
|
|
12
|
-
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
-
[![License][license-src]][license-href]
|
|
15
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
-
|
|
17
|
-
My new Nuxt module for doing amazing things.
|
|
18
|
-
|
|
19
|
-
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
-
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
-
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
-
|
|
23
|
-
## Features
|
|
24
|
-
|
|
25
|
-
<!-- Highlight some of the features your module provide here -->
|
|
26
|
-
- ⛰ Foo
|
|
27
|
-
- 🚠 Bar
|
|
28
|
-
- 🌲 Baz
|
|
29
|
-
|
|
30
|
-
## Quick Setup
|
|
31
|
-
|
|
32
|
-
Install the module to your Nuxt application with one command:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx nuxi module add my-module
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Contribution
|
|
42
|
-
|
|
43
|
-
<details>
|
|
44
|
-
<summary>Local development</summary>
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Install dependencies
|
|
48
|
-
npm install
|
|
49
|
-
|
|
50
|
-
# Generate type stubs
|
|
51
|
-
npm run dev:prepare
|
|
52
|
-
|
|
53
|
-
# Develop with the playground
|
|
54
|
-
npm run dev
|
|
55
|
-
|
|
56
|
-
# Build the playground
|
|
57
|
-
npm run dev:build
|
|
58
|
-
|
|
59
|
-
# Run ESLint
|
|
60
|
-
npm run lint
|
|
61
|
-
|
|
62
|
-
# Run Vitest
|
|
63
|
-
npm run test
|
|
64
|
-
npm run test:watch
|
|
65
|
-
|
|
66
|
-
# Release new version
|
|
67
|
-
npm run release
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
</details>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<!-- Badges -->
|
|
74
|
-
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
-
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
-
|
|
77
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
-
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
-
|
|
80
|
-
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
-
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
-
|
|
83
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
|
-
[nuxt-href]: https://nuxt.com
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: My Module
|
|
6
|
+
- Package name: my-module
|
|
7
|
+
- Description: My new Nuxt module
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# My Module
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
My new Nuxt module for doing amazing things.
|
|
18
|
+
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your module provide here -->
|
|
26
|
+
- ⛰ Foo
|
|
27
|
+
- 🚠 Bar
|
|
28
|
+
- 🌲 Baz
|
|
29
|
+
|
|
30
|
+
## Quick Setup
|
|
31
|
+
|
|
32
|
+
Install the module to your Nuxt application with one command:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx nuxi module add my-module
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Contribution
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Local development</summary>
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Install dependencies
|
|
48
|
+
npm install
|
|
49
|
+
|
|
50
|
+
# Generate type stubs
|
|
51
|
+
npm run dev:prepare
|
|
52
|
+
|
|
53
|
+
# Develop with the playground
|
|
54
|
+
npm run dev
|
|
55
|
+
|
|
56
|
+
# Build the playground
|
|
57
|
+
npm run dev:build
|
|
58
|
+
|
|
59
|
+
# Run ESLint
|
|
60
|
+
npm run lint
|
|
61
|
+
|
|
62
|
+
# Run Vitest
|
|
63
|
+
npm run test
|
|
64
|
+
npm run test:watch
|
|
65
|
+
|
|
66
|
+
# Release new version
|
|
67
|
+
npm run release
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<!-- Badges -->
|
|
74
|
+
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
+
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
+
|
|
77
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
+
|
|
80
|
+
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
+
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
+
|
|
83
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defu } from 'defu';
|
|
2
|
-
import { defineNuxtModule, createResolver, addVitePlugin, addComponentsDir,
|
|
2
|
+
import { defineNuxtModule, createResolver, addVitePlugin, addComponentsDir, addPlugin, installModule, hasNuxtModule } from '@nuxt/kit';
|
|
3
3
|
|
|
4
4
|
const module = defineNuxtModule({
|
|
5
5
|
meta: {
|
|
@@ -49,6 +49,16 @@ const module = defineNuxtModule({
|
|
|
49
49
|
path: resolver.resolve("./runtime/icons"),
|
|
50
50
|
prefix: "I"
|
|
51
51
|
});
|
|
52
|
+
_nuxt.options.alias["#adata-ui"] = resolver.resolve("./runtime");
|
|
53
|
+
_nuxt.options.alias["#illustrations"] = resolver.resolve("./runtime/illustrations");
|
|
54
|
+
addComponentsDir({
|
|
55
|
+
path: resolver.resolve("./runtime/illustrations"),
|
|
56
|
+
prefix: "Ill"
|
|
57
|
+
});
|
|
58
|
+
addPlugin({
|
|
59
|
+
src: resolver.resolve("./runtime/plugins/toast.client.ts"),
|
|
60
|
+
mode: "client"
|
|
61
|
+
});
|
|
52
62
|
await installModule("@nuxtjs/i18n", {
|
|
53
63
|
defaultLocale: "ru",
|
|
54
64
|
strategy: "prefix_except_default"
|
|
@@ -33,30 +33,30 @@ const colorOptions = {
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
36
|
-
<div
|
|
37
|
-
class="inline-flex w-full rounded-md"
|
|
38
|
-
:class="twMerge(colorOptions.description[color], textBgClasses)"
|
|
39
|
-
>
|
|
40
|
-
<div
|
|
41
|
-
class="flex items-center justify-center rounded-l-md"
|
|
42
|
-
:class="twMerge([colorOptions.icon[color], sizeOptions[size]], iconBgClasses)"
|
|
43
|
-
>
|
|
44
|
-
<slot name="icon">
|
|
45
|
-
<i-info-circle
|
|
46
|
-
v-if="iconType == 'circle'"
|
|
47
|
-
:class="`w-[${iconSize}] h-[${iconSize}]`"
|
|
48
|
-
/>
|
|
49
|
-
<i-warning-triangle
|
|
50
|
-
v-if="iconType == 'triangle'"
|
|
51
|
-
:class="`w-[${iconSize}] h-[${iconSize}]`"
|
|
52
|
-
/>
|
|
53
|
-
</slot>
|
|
54
|
-
</div>
|
|
55
|
-
<div
|
|
56
|
-
:class="sizeOptions[size]"
|
|
57
|
-
class="rounded-r-md flex items-center"
|
|
58
|
-
>
|
|
59
|
-
<slot name="default" />
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
36
|
+
<div
|
|
37
|
+
class="inline-flex w-full rounded-md"
|
|
38
|
+
:class="twMerge(colorOptions.description[color], textBgClasses)"
|
|
39
|
+
>
|
|
40
|
+
<div
|
|
41
|
+
class="flex items-center justify-center rounded-l-md"
|
|
42
|
+
:class="twMerge([colorOptions.icon[color], sizeOptions[size]], iconBgClasses)"
|
|
43
|
+
>
|
|
44
|
+
<slot name="icon">
|
|
45
|
+
<i-info-circle
|
|
46
|
+
v-if="iconType == 'circle'"
|
|
47
|
+
:class="`w-[${iconSize}] h-[${iconSize}]`"
|
|
48
|
+
/>
|
|
49
|
+
<i-warning-triangle
|
|
50
|
+
v-if="iconType == 'triangle'"
|
|
51
|
+
:class="`w-[${iconSize}] h-[${iconSize}]`"
|
|
52
|
+
/>
|
|
53
|
+
</slot>
|
|
54
|
+
</div>
|
|
55
|
+
<div
|
|
56
|
+
:class="sizeOptions[size]"
|
|
57
|
+
class="rounded-r-md flex items-center"
|
|
58
|
+
>
|
|
59
|
+
<slot name="default" />
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
62
|
</template>
|
|
@@ -8,6 +8,7 @@ import { useI18n, ref, onBeforeMount, useAppConfig, useRuntimeConfig } from "#im
|
|
|
8
8
|
import ILogout from "#icons/navigation/logout.vue";
|
|
9
9
|
import IAdata from "#icons/logo/adata.vue";
|
|
10
10
|
import LangSwitcher from "./header/LangSwitcher.vue";
|
|
11
|
+
import { useIdModals } from "#adata-ui/composables/useIdModals";
|
|
11
12
|
const { localize, isColorModeActive } = useRuntimeConfig().public.adataUI;
|
|
12
13
|
const props = defineProps({
|
|
13
14
|
replenish: { type: String, required: false },
|
|
@@ -26,11 +27,16 @@ const props = defineProps({
|
|
|
26
27
|
});
|
|
27
28
|
const emit = defineEmits(["logout", "search", "login"]);
|
|
28
29
|
const { t } = useI18n();
|
|
29
|
-
const
|
|
30
|
-
const mode =
|
|
30
|
+
const { adataUI } = useAppConfig();
|
|
31
|
+
const { mode, authMode } = adataUI;
|
|
32
|
+
const { loginModal } = useIdModals();
|
|
31
33
|
const langIsOn = false;
|
|
32
34
|
const contacts = ref(useContacts());
|
|
33
35
|
const goAuth = () => {
|
|
36
|
+
if (authMode === "local") {
|
|
37
|
+
loginModal.value = true;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
34
40
|
if (window) {
|
|
35
41
|
emit("login");
|
|
36
42
|
let fullPath = props.redirectAfterLogin ?? encodeURIComponent(window.location.toString());
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { watch, ref, computed, useSlots, onBeforeMount, nextTick } from "#imports";
|
|
3
|
+
import { twJoin, twMerge } from "tailwind-merge";
|
|
4
|
+
import { onClickOutside, useWindowSize } from "@vueuse/core";
|
|
5
|
+
import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
|
|
6
|
+
const uiConfig = {
|
|
7
|
+
wrapper: "modal-wrapper relative z-[10001]",
|
|
8
|
+
overlay: {
|
|
9
|
+
base: "fixed inset-0 transition-opacity ",
|
|
10
|
+
background: "bg-deepblue-900/20 dark:bg-white/20 backdrop-blur",
|
|
11
|
+
transition: {
|
|
12
|
+
"enter-active-class": "ease-out duration-300",
|
|
13
|
+
"enter-from-class": "opacity-0",
|
|
14
|
+
"enter-to-class": "opacity-100",
|
|
15
|
+
"leave-active-class": "ease-in duration-200",
|
|
16
|
+
"leave-from-class": "opacity-100",
|
|
17
|
+
"leave-to-class": "opacity-0"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
base: "base-modal max-h-full fixed text-deepblue-900 dark:text-gray-200 text-left rtl:text-right flex flex-col max-w-full sm:max-h-[calc(100%-48px)]",
|
|
21
|
+
position: "top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2",
|
|
22
|
+
padding: "p-8",
|
|
23
|
+
background: "bg-white dark:bg-gray-900",
|
|
24
|
+
rounded: "rounded-lg",
|
|
25
|
+
fullscreen: "w-screen h-screen rounded-none",
|
|
26
|
+
mobile: {
|
|
27
|
+
width: "w-screen",
|
|
28
|
+
position: "bottom-0 left-0 transition-transform",
|
|
29
|
+
padding: "px-4 sm:pb-8 pb-4 pt-3",
|
|
30
|
+
rounded: "rounded-t-2xl"
|
|
31
|
+
},
|
|
32
|
+
transition: {
|
|
33
|
+
desktop: {
|
|
34
|
+
"enter-active-class": "ease-out duration-300",
|
|
35
|
+
"enter-from-class": "opacity-0 bg",
|
|
36
|
+
"enter-to-class": "opacity-100",
|
|
37
|
+
"leave-active-class": "ease-in duration-200",
|
|
38
|
+
"leave-from-class": "opacity-100",
|
|
39
|
+
"leave-to-class": "opacity-0"
|
|
40
|
+
},
|
|
41
|
+
mobile: {
|
|
42
|
+
"enter-active-class": "transition-transform ease-in-out duration-300",
|
|
43
|
+
"leave-active-class": "transition-transform ease-in-out duration-200",
|
|
44
|
+
"enter-from-class": "translate-y-[100%]",
|
|
45
|
+
"leave-to-class": "translate-y-[100%]"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const props = defineProps({
|
|
50
|
+
title: { type: String, required: false, default: "" },
|
|
51
|
+
transition: { type: Boolean, required: false, default: true },
|
|
52
|
+
overlay: { type: Boolean, required: false, default: true },
|
|
53
|
+
preventClose: { type: Boolean, required: false, default: false },
|
|
54
|
+
fullscreen: { type: Boolean, required: false, default: false },
|
|
55
|
+
name: { type: String, required: false, default: "modal" },
|
|
56
|
+
isScrollable: { type: Boolean, required: false, default: false },
|
|
57
|
+
width: { type: [String, Number], required: false, default: 424 },
|
|
58
|
+
heightModalClass: { type: String, required: false, default: "" }
|
|
59
|
+
});
|
|
60
|
+
const content = ref();
|
|
61
|
+
const emit = defineEmits(["close"]);
|
|
62
|
+
const slots = useSlots();
|
|
63
|
+
const { width: windowWidth } = useWindowSize();
|
|
64
|
+
const modelValue = defineModel({ type: Boolean });
|
|
65
|
+
let teleportContainer;
|
|
66
|
+
const modal = ref(null);
|
|
67
|
+
const isMobile = computed(() => windowWidth.value < 1025);
|
|
68
|
+
const wrapperClasses = uiConfig.wrapper;
|
|
69
|
+
const overlayClasses = computed(() => !props.overlay || twMerge(twJoin(uiConfig.overlay.base, uiConfig.overlay.background)));
|
|
70
|
+
const baseClasses = computed(() => twMerge(twJoin(
|
|
71
|
+
uiConfig.base,
|
|
72
|
+
uiConfig.background,
|
|
73
|
+
props.heightModalClass,
|
|
74
|
+
props.fullscreen ? uiConfig.fullscreen : "",
|
|
75
|
+
isMobile.value ? uiConfig.mobile.padding : uiConfig.padding,
|
|
76
|
+
isMobile.value ? uiConfig.mobile.rounded : uiConfig.rounded,
|
|
77
|
+
isMobile.value ? uiConfig.mobile.width : "",
|
|
78
|
+
isMobile.value ? uiConfig.mobile.position : uiConfig.position
|
|
79
|
+
)));
|
|
80
|
+
const transitionClasses = computed(() => {
|
|
81
|
+
return {
|
|
82
|
+
overlay: props.transition ? uiConfig.overlay.transition : {},
|
|
83
|
+
base: props.transition ? !isMobile.value ? uiConfig.transition.desktop : uiConfig.transition.mobile : {}
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const modalStyles = computed(() => {
|
|
87
|
+
if (props.fullscreen || isMobile.value) return;
|
|
88
|
+
return ` width: ${props.width}${typeof props.width === "number" ? "px" : ""}`;
|
|
89
|
+
});
|
|
90
|
+
const onClose = () => {
|
|
91
|
+
modelValue.value = false;
|
|
92
|
+
emit("close");
|
|
93
|
+
};
|
|
94
|
+
onClickOutside(modal, () => props.preventClose || onClose());
|
|
95
|
+
const hasSlot = (name) => {
|
|
96
|
+
return Boolean(slots[name]);
|
|
97
|
+
};
|
|
98
|
+
const hasFooter = computed(() => {
|
|
99
|
+
return hasSlot("footer");
|
|
100
|
+
});
|
|
101
|
+
const hasHeader = computed(() => {
|
|
102
|
+
return props.title || hasSlot("header");
|
|
103
|
+
});
|
|
104
|
+
const hasContent = computed(() => {
|
|
105
|
+
return Boolean(slots.default);
|
|
106
|
+
});
|
|
107
|
+
onBeforeMount(() => {
|
|
108
|
+
const alreadyCreatedTarget = document.getElementById(props.name);
|
|
109
|
+
if (alreadyCreatedTarget) return;
|
|
110
|
+
teleportContainer = document.createElement("div");
|
|
111
|
+
teleportContainer.setAttribute("id", props.name);
|
|
112
|
+
document.body.appendChild(teleportContainer);
|
|
113
|
+
});
|
|
114
|
+
const positionStart = ref(0);
|
|
115
|
+
const isClose = ref(false);
|
|
116
|
+
const modalHeight = ref(0);
|
|
117
|
+
const touchstart = (event) => {
|
|
118
|
+
isClose.value = false;
|
|
119
|
+
positionStart.value = event.touches[0].clientY;
|
|
120
|
+
modalHeight.value = modal.value?.offsetHeight || 0;
|
|
121
|
+
};
|
|
122
|
+
const touchmove = (event) => {
|
|
123
|
+
if (!isMobile.value) return;
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
const touchPosition = event.touches[0].clientY;
|
|
126
|
+
const step = touchPosition - positionStart.value;
|
|
127
|
+
if (step < 0) return;
|
|
128
|
+
const newHeight = modalHeight.value - step;
|
|
129
|
+
modal.value.style.height = `${newHeight}px`;
|
|
130
|
+
isClose.value = step > 65;
|
|
131
|
+
};
|
|
132
|
+
const touchend = () => {
|
|
133
|
+
if (isClose.value) {
|
|
134
|
+
onClose();
|
|
135
|
+
} else {
|
|
136
|
+
modal.value.style.height = `${modalHeight.value}px`;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const toggleBodyScroll = (lock) => {
|
|
140
|
+
if (!content.value) return;
|
|
141
|
+
if (lock) {
|
|
142
|
+
setTimeout(() => {
|
|
143
|
+
disableBodyScroll(content.value, {
|
|
144
|
+
reserveScrollBarGap: true,
|
|
145
|
+
allowTouchMove: (el) => {
|
|
146
|
+
return el && modal.value?.contains(el);
|
|
147
|
+
}
|
|
148
|
+
// allowTouchMove: (el: EventTarget | null): boolean => {
|
|
149
|
+
// if (!el || !content.value) return false;
|
|
150
|
+
//
|
|
151
|
+
// // Функция проверки, есть ли у элемента вертикальный скролл
|
|
152
|
+
// const hasScroll = (el: HTMLElement | null): boolean => {
|
|
153
|
+
// if (!el) return false;
|
|
154
|
+
// return el.scrollHeight > el.clientHeight;
|
|
155
|
+
// };
|
|
156
|
+
//
|
|
157
|
+
// // Функция поиска блока с position: absolute
|
|
158
|
+
// const findAbsoluteBlock = (el: HTMLElement | null): HTMLElement | null => {
|
|
159
|
+
// while (el && el !== content.value) {
|
|
160
|
+
// const style = window.getComputedStyle(el);
|
|
161
|
+
// if (style.position === 'absolute') return el; // Возвращаем найденный absolute-элемент
|
|
162
|
+
// el = el.parentElement;
|
|
163
|
+
// }
|
|
164
|
+
// return null;
|
|
165
|
+
// };
|
|
166
|
+
//
|
|
167
|
+
// // Проверяем, есть ли у родителя absolute-позиционирование
|
|
168
|
+
// const someParentHasScroll = (el: HTMLElement | null, maxParentEl: HTMLElement | null): boolean => {
|
|
169
|
+
// while (el && maxParentEl && el !== maxParentEl) {
|
|
170
|
+
// if (hasScroll(el)){
|
|
171
|
+
// return true
|
|
172
|
+
// } // Если нашли родителя со скроллом, возвращаем true
|
|
173
|
+
// el = el?.parentElement;
|
|
174
|
+
// }
|
|
175
|
+
// return false; // Если не нашли, возвращаем false
|
|
176
|
+
// };
|
|
177
|
+
//
|
|
178
|
+
// const absoluteBlock = findAbsoluteBlock(el as HTMLElement);
|
|
179
|
+
//
|
|
180
|
+
//
|
|
181
|
+
// // Проверяем наличие скролла у основного контента
|
|
182
|
+
// const contentHasScroll = hasScroll(content.value);
|
|
183
|
+
//
|
|
184
|
+
// // Проверка на то, что элемент находится внутри модального контента
|
|
185
|
+
// const isInsideModal = content.value.contains(el as Node);
|
|
186
|
+
//
|
|
187
|
+
//
|
|
188
|
+
// return (contentHasScroll && isInsideModal) || (isInsideModal && absoluteBlock && someParentHasScroll(el, absoluteBlock));
|
|
189
|
+
// }
|
|
190
|
+
//
|
|
191
|
+
});
|
|
192
|
+
}, 0);
|
|
193
|
+
} else {
|
|
194
|
+
enableBodyScroll(content.value);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
watch(modelValue, async (newValue) => {
|
|
198
|
+
if (newValue) {
|
|
199
|
+
await nextTick();
|
|
200
|
+
toggleBodyScroll(true);
|
|
201
|
+
} else {
|
|
202
|
+
toggleBodyScroll(false);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
</script>
|
|
206
|
+
|
|
207
|
+
<template>
|
|
208
|
+
<client-only>
|
|
209
|
+
<teleport :to="`#${name}`">
|
|
210
|
+
<div
|
|
211
|
+
:class="wrapperClasses"
|
|
212
|
+
>
|
|
213
|
+
<Transition
|
|
214
|
+
name="overlay"
|
|
215
|
+
v-bind="transitionClasses.overlay"
|
|
216
|
+
>
|
|
217
|
+
<div
|
|
218
|
+
v-show="modelValue"
|
|
219
|
+
ref="overlay"
|
|
220
|
+
:class="overlayClasses"
|
|
221
|
+
/>
|
|
222
|
+
</Transition>
|
|
223
|
+
<Transition
|
|
224
|
+
name="modal"
|
|
225
|
+
v-bind="transitionClasses.base"
|
|
226
|
+
>
|
|
227
|
+
<div
|
|
228
|
+
v-if="modelValue"
|
|
229
|
+
class="fixed overflow-y-auto inset-0"
|
|
230
|
+
>
|
|
231
|
+
<div
|
|
232
|
+
ref="modal"
|
|
233
|
+
:class="baseClasses"
|
|
234
|
+
:style="modalStyles"
|
|
235
|
+
>
|
|
236
|
+
<div
|
|
237
|
+
v-if="isMobile"
|
|
238
|
+
class="w-full flex justify-center items-center -mt-3 pt-3 mb-2"
|
|
239
|
+
@touchmove="touchmove"
|
|
240
|
+
@touchstart="touchstart"
|
|
241
|
+
@touchend="touchend"
|
|
242
|
+
>
|
|
243
|
+
<div class="h-1 w-10 bg-[#D9D9D9] rounded m-1" />
|
|
244
|
+
</div>
|
|
245
|
+
<div
|
|
246
|
+
class="flex flex-col gap-5"
|
|
247
|
+
:class="isScrollable ? 'overflow-x-hidden' : ''"
|
|
248
|
+
>
|
|
249
|
+
<div
|
|
250
|
+
v-if="hasHeader"
|
|
251
|
+
class="top"
|
|
252
|
+
>
|
|
253
|
+
<h4
|
|
254
|
+
v-if="title"
|
|
255
|
+
class="heading-02 text-center"
|
|
256
|
+
@touchmove="touchmove"
|
|
257
|
+
@touchstart="touchstart"
|
|
258
|
+
@touchend="touchend"
|
|
259
|
+
>
|
|
260
|
+
{{ title }}
|
|
261
|
+
</h4>
|
|
262
|
+
<div v-if="!!$slots.header">
|
|
263
|
+
<slot name="header" />
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div
|
|
267
|
+
v-if="hasContent"
|
|
268
|
+
ref="content"
|
|
269
|
+
class="grow"
|
|
270
|
+
:class="isScrollable ? 'overflow-x-hidden' : ''"
|
|
271
|
+
>
|
|
272
|
+
<slot />
|
|
273
|
+
</div>
|
|
274
|
+
<div
|
|
275
|
+
v-if="hasFooter"
|
|
276
|
+
>
|
|
277
|
+
<slot name="footer" />
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</Transition>
|
|
283
|
+
</div>
|
|
284
|
+
</teleport>
|
|
285
|
+
</client-only>
|
|
286
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title?: string;
|
|
3
|
+
transition?: boolean;
|
|
4
|
+
overlay?: boolean;
|
|
5
|
+
preventClose?: boolean;
|
|
6
|
+
fullscreen?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
isScrollable?: boolean;
|
|
9
|
+
width?: string | number;
|
|
10
|
+
heightModalClass?: string;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Props = Props;
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
14
|
+
modelValue?: boolean;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_18: {}, __VLS_20: {}, __VLS_22: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
header?: (props: typeof __VLS_18) => any;
|
|
19
|
+
} & {
|
|
20
|
+
default?: (props: typeof __VLS_20) => any;
|
|
21
|
+
} & {
|
|
22
|
+
footer?: (props: typeof __VLS_22) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {
|
|
25
|
+
name: string;
|
|
26
|
+
transition: boolean;
|
|
27
|
+
title: string;
|
|
28
|
+
overlay: boolean;
|
|
29
|
+
preventClose: boolean;
|
|
30
|
+
fullscreen: boolean;
|
|
31
|
+
isScrollable: boolean;
|
|
32
|
+
width: string | number;
|
|
33
|
+
heightModalClass: string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -39,8 +39,8 @@ const typeSwitchValues = {
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
|
-
<div :class="[[classes], customClasses]">
|
|
43
|
-
<slot name="point" />
|
|
44
|
-
<slot />
|
|
45
|
-
</div>
|
|
42
|
+
<div :class="[[classes], customClasses]">
|
|
43
|
+
<slot name="point" />
|
|
44
|
+
<slot />
|
|
45
|
+
</div>
|
|
46
46
|
</template>
|
|
@@ -227,7 +227,7 @@ defineExpose({
|
|
|
227
227
|
ref="input"
|
|
228
228
|
v-model="modelValue"
|
|
229
229
|
:type="type"
|
|
230
|
-
:class="inputClass"
|
|
230
|
+
:class="[inputClass, { not_empty: !!modelValue }]"
|
|
231
231
|
class="input"
|
|
232
232
|
required
|
|
233
233
|
:tabindex="disabled ? -1 : 0"
|
|
@@ -299,5 +299,5 @@ defineExpose({
|
|
|
299
299
|
</template>
|
|
300
300
|
|
|
301
301
|
<style scoped>
|
|
302
|
-
.input:-webkit-autofill~.label,.input:focus~.label
|
|
302
|
+
.input.not_empty~.label,.input:-webkit-autofill~.label,.input:focus~.label{font-size:10px;transform:translateY(-10px)}.input.sm:-webkit-autofill~.label,.input.sm:focus~.label,.input.sm:not(:focus):valid~.label{display:none}.input::-ms-clear,.input::-ms-reveal{display:none}.autocomplete-shadow{box-shadow:0 1px 8px 0 #8b929c4d}.slide-in-enter-active{opacity:0;transform:translateY(-50%);transition:transform .5s;z-index:0}.slide-in-enter-to{z-index:auto}.slide-in-enter-to,.slide-in-leave-active{opacity:1;transform:translateY(0)}.slide-in-leave-to{opacity:0;transform:translateY(-100%)}.autocomplete-fade-enter-active,.autocomplete-fade-leave-active{transition:opacity .15s ease}.autocomplete-fade-enter-from,.autocomplete-fade-leave-to{opacity:0}.move-input{padding-left:40px!important}
|
|
303
303
|
</style>
|
|
@@ -201,12 +201,12 @@ const filteredItems = computed(() => [
|
|
|
201
201
|
name: t("header.products.fea.label"),
|
|
202
202
|
icon: IGlobe,
|
|
203
203
|
items: [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
{
|
|
205
|
+
title: t("header.products.fea.items.i.t"),
|
|
206
|
+
subtitle: t("header.products.fea.items.i.st"),
|
|
207
|
+
icon: IHandshake,
|
|
208
|
+
to: `https://tnved.${mode}.kz` + PAGES.fea.t
|
|
209
|
+
},
|
|
210
210
|
{
|
|
211
211
|
title: t("header.products.fea.items.o.t"),
|
|
212
212
|
subtitle: t("header.products.fea.items.o.st"),
|