adata-ui 2.0.50 → 2.0.52

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/.nuxtrc CHANGED
@@ -1 +1 @@
1
- typescript.includeWorkspace = true
1
+ typescript.includeWorkspace = true
@@ -1,5 +1,5 @@
1
- export default defineAppConfig({
2
- myLayer: {
3
- name: 'My amazing Nuxt layer (overwritten)'
4
- }
5
- })
1
+ export default defineAppConfig({
2
+ myLayer: {
3
+ name: 'My amazing Nuxt layer (overwritten)'
4
+ }
5
+ })
package/README.md CHANGED
@@ -1,75 +1,75 @@
1
- # Adata UI with Nuxt 3 using Layers
2
-
3
- Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
-
5
- ## Setup
6
-
7
- Make sure to install the dependencies:
8
-
9
- ```bash
10
- # npm
11
- npm install
12
-
13
- # pnpm
14
- pnpm install
15
-
16
- # yarn
17
- yarn install
18
-
19
- # bun
20
- bun install
21
- ```
22
-
23
- ## Development Server
24
-
25
- Start the development server on `https://localhost:3000`:
26
-
27
- ```bash
28
- # npm
29
- npm run dev
30
-
31
- # pnpm
32
- pnpm run dev
33
-
34
- # yarn
35
- yarn dev
36
-
37
- # bun
38
- bun run dev
39
- ```
40
-
41
- ## Production
42
-
43
- Build the application for production:
44
-
45
- ```bash
46
- # npm
47
- npm run build
48
-
49
- # pnpm
50
- pnpm run build
51
-
52
- # yarn
53
- yarn build
54
-
55
- # bun
56
- bun run build
57
- ```
58
-
59
- Locally preview production build:
60
-
61
- ```bash
62
- # npm
63
- npm run preview
64
-
65
- # pnpm
66
- pnpm run preview
67
-
68
- # yarn
69
- yarn preview
70
-
71
- # bun
72
- bun run preview
73
- ```
74
-
75
- Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
1
+ # Adata UI with Nuxt 3 using Layers
2
+
3
+ Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
+
5
+ ## Setup
6
+
7
+ Make sure to install the dependencies:
8
+
9
+ ```bash
10
+ # npm
11
+ npm install
12
+
13
+ # pnpm
14
+ pnpm install
15
+
16
+ # yarn
17
+ yarn install
18
+
19
+ # bun
20
+ bun install
21
+ ```
22
+
23
+ ## Development Server
24
+
25
+ Start the development server on `https://localhost:3000`:
26
+
27
+ ```bash
28
+ # npm
29
+ npm run dev
30
+
31
+ # pnpm
32
+ pnpm run dev
33
+
34
+ # yarn
35
+ yarn dev
36
+
37
+ # bun
38
+ bun run dev
39
+ ```
40
+
41
+ ## Production
42
+
43
+ Build the application for production:
44
+
45
+ ```bash
46
+ # npm
47
+ npm run build
48
+
49
+ # pnpm
50
+ pnpm run build
51
+
52
+ # yarn
53
+ yarn build
54
+
55
+ # bun
56
+ bun run build
57
+ ```
58
+
59
+ Locally preview production build:
60
+
61
+ ```bash
62
+ # npm
63
+ npm run preview
64
+
65
+ # pnpm
66
+ pnpm run preview
67
+
68
+ # yarn
69
+ yarn preview
70
+
71
+ # bun
72
+ bun run preview
73
+ ```
74
+
75
+ Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
@@ -1 +1 @@
1
- # button, alerts, dropdown
1
+ # button, alerts, dropdown
@@ -6,6 +6,7 @@ const props = defineProps<{
6
6
  title: string
7
7
  description: string
8
8
  to?: string
9
+ wide?: boolean
9
10
  }>()
10
11
  </script>
11
12
 
@@ -17,6 +18,54 @@ const props = defineProps<{
17
18
  active-class="active-item"
18
19
  >
19
20
  <svg
21
+ v-if="wide"
22
+ class="w-full"
23
+ viewBox="-2 -4 416 188"
24
+ fill="none"
25
+ preserveAspectRatio="none"
26
+ xmlns="http://www.w3.org/2000/svg"
27
+ >
28
+ <path
29
+ class="border-path border-path--large"
30
+ d="M413.333 105.936C413.333 116.008 399.074 123 389.001 123C369.671 123 354.001 138.67 354.001 158C354.001 168.009 347.088 182 337.079 182H16.3334C7.49682 182 0.333374 174.837 0.333374 166V16C0.333374 7.16344 7.49682 0 16.3334 0H397.333C406.17 0 413.333 7.16344 413.333 16V105.936Z"
31
+ stroke-width="2"
32
+ fill="transparent"
33
+ />
34
+ <defs>
35
+ <linearGradient
36
+ id="gradient-light"
37
+ x1="164.372"
38
+ y1="-137.957"
39
+ x2="-20.5433"
40
+ y2="68.1723"
41
+ gradientUnits="userSpaceOnUse"
42
+ >
43
+ <stop stop-color="#479FFF" />
44
+ <stop
45
+ offset="1"
46
+ stop-color="#0070EB"
47
+ />
48
+ </linearGradient>
49
+
50
+ <linearGradient
51
+ id="gradient-dark"
52
+ x1="164.372"
53
+ y1="-137.957"
54
+ x2="-20.5433"
55
+ y2="68.1723"
56
+ gradientUnits="userSpaceOnUse"
57
+ >
58
+ <stop stop-color="#4FBDFF" />
59
+ <stop
60
+ offset="1"
61
+ stop-color="#1B98E2"
62
+ />
63
+ </linearGradient>
64
+ </defs>
65
+ </svg>
66
+
67
+ <svg
68
+ v-else
20
69
  class="w-full"
21
70
  viewBox="-1 -1 308 184"
22
71
  xmlns="http://www.w3.org/2000/svg"
@@ -72,7 +121,7 @@ const props = defineProps<{
72
121
  {{ title }}
73
122
  </p>
74
123
  </div>
75
- <p class="text-sm text-gray-600 dark:text-gray-200">
124
+ <p class="text-left text-sm text-gray-600 dark:text-gray-200">
76
125
  {{ description }}
77
126
  </p>
78
127
  </div>
@@ -148,14 +197,17 @@ const props = defineProps<{
148
197
  fill: #F4F5F6;
149
198
  }
150
199
 
200
+ .border-path--large {
201
+ stroke-dasharray: 1400;
202
+ stroke-dashoffset: 1400;
203
+ }
204
+
151
205
  .animated-border {
152
206
  stroke-dasharray: 180;
153
207
  stroke-dashoffset: 180;
154
208
  fill: #F4F5F6;
155
209
  }
156
210
 
157
-
158
-
159
211
  .active-item .title {
160
212
  color: #0070EB;
161
213
  }
@@ -1,104 +1,104 @@
1
- <script setup lang="ts">
2
- import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
3
-
4
- const props = defineProps<{
5
- balance: number
6
- }>()
7
-
8
- const { $toast } = useNuxtApp()
9
- const { t, locale } = useI18n()
10
- const { commonAuth } = useAppConfig()
11
- const accessToken = useCookie('accessToken')
12
-
13
- const { topUpSidePanel } = usePayment()
14
-
15
- const userApiURL = commonAuth.userApiURL
16
-
17
- const isLoading = ref(false)
18
-
19
- async function updateUserRate() {
20
- try {
21
- isLoading.value = true
22
- await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
23
- method: 'PUT',
24
- credentials: 'include',
25
- headers: {
26
- Authorization: `Bearer ${accessToken.value}`,
27
- lang: locale.value,
28
- },
29
- body: {
30
- rate_code: 'basic_plus',
31
- },
32
- })
33
- window.location.reload()
34
- }
35
- catch (error) {
36
- $toast.error(error.data.message)
37
- }
38
- finally {
39
- isLoading.value = false
40
- }
41
- }
42
-
43
- function onUpdate() {
44
- if (props.balance >= 1000) {
45
- updateUserRate()
46
- }
47
- else {
48
- topUpSidePanel.value = true
49
- }
50
- }
51
- </script>
52
-
53
- <template>
54
- <div class="gradient flex justify-between rounded-lg p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
55
- <div>
56
- <p class="mb-2 font-semibold">
57
- {{ t('modals.id.banners.basicPlusLimit.title') }}
58
- </p>
59
- <i18n-t
60
- keypath="modals.id.banners.basicPlusLimit.subtitle"
61
- tag="p"
62
- class="text-sm text-gray-600 dark:text-gray-200"
63
- >
64
- <template #topUp>
65
- <button
66
- class="font-semibold text-blue-700 dark:text-blue-500"
67
- @click="topUpSidePanel = true"
68
- >
69
- {{ t('modals.id.banners.basicPlusLimit.topUp') }}
70
- </button>
71
- </template>
72
- </i18n-t>
73
- </div>
74
-
75
- <a-button
76
- size="md"
77
- class="self-end"
78
- @click="onUpdate"
79
- :loading="isLoading"
80
- >
81
- {{ t('actions.update') }}
82
- </a-button>
83
- </div>
84
- </template>
85
-
86
- <style scoped>
87
- .gradient {
88
- background: linear-gradient(
89
- 239.71deg,
90
- #B3D5F9 -7.48%,
91
- #E6F1FD 39.62%,
92
- #CCE2FB 85.82%
93
- );
94
- }
95
-
96
- .dark .gradient {
97
- background: linear-gradient(
98
- 239.71deg,
99
- #17303F -7.48%,
100
- #161617 39.62%,
101
- #17303F 85.82%
102
- );
103
- }
104
- </style>
1
+ <script setup lang="ts">
2
+ import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
3
+
4
+ const props = defineProps<{
5
+ balance: number
6
+ }>()
7
+
8
+ const { $toast } = useNuxtApp()
9
+ const { t, locale } = useI18n()
10
+ const { commonAuth } = useAppConfig()
11
+ const accessToken = useCookie('accessToken')
12
+
13
+ const { topUpSidePanel } = usePayment()
14
+
15
+ const userApiURL = commonAuth.userApiURL
16
+
17
+ const isLoading = ref(false)
18
+
19
+ async function updateUserRate() {
20
+ try {
21
+ isLoading.value = true
22
+ await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
23
+ method: 'PUT',
24
+ credentials: 'include',
25
+ headers: {
26
+ Authorization: `Bearer ${accessToken.value}`,
27
+ lang: locale.value,
28
+ },
29
+ body: {
30
+ rate_code: 'basic_plus',
31
+ },
32
+ })
33
+ window.location.reload()
34
+ }
35
+ catch (error) {
36
+ $toast.error(error.data.message)
37
+ }
38
+ finally {
39
+ isLoading.value = false
40
+ }
41
+ }
42
+
43
+ function onUpdate() {
44
+ if (props.balance >= 1000) {
45
+ updateUserRate()
46
+ }
47
+ else {
48
+ topUpSidePanel.value = true
49
+ }
50
+ }
51
+ </script>
52
+
53
+ <template>
54
+ <div class="gradient flex justify-between rounded-lg p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
55
+ <div>
56
+ <p class="mb-2 font-semibold">
57
+ {{ t('modals.id.banners.basicPlusLimit.title') }}
58
+ </p>
59
+ <i18n-t
60
+ keypath="modals.id.banners.basicPlusLimit.subtitle"
61
+ tag="p"
62
+ class="text-sm text-gray-600 dark:text-gray-200"
63
+ >
64
+ <template #topUp>
65
+ <button
66
+ class="font-semibold text-blue-700 dark:text-blue-500"
67
+ @click="topUpSidePanel = true"
68
+ >
69
+ {{ t('modals.id.banners.basicPlusLimit.topUp') }}
70
+ </button>
71
+ </template>
72
+ </i18n-t>
73
+ </div>
74
+
75
+ <a-button
76
+ size="md"
77
+ class="self-end"
78
+ @click="onUpdate"
79
+ :loading="isLoading"
80
+ >
81
+ {{ t('actions.update') }}
82
+ </a-button>
83
+ </div>
84
+ </template>
85
+
86
+ <style scoped>
87
+ .gradient {
88
+ background: linear-gradient(
89
+ 239.71deg,
90
+ #B3D5F9 -7.48%,
91
+ #E6F1FD 39.62%,
92
+ #CCE2FB 85.82%
93
+ );
94
+ }
95
+
96
+ .dark .gradient {
97
+ background: linear-gradient(
98
+ 239.71deg,
99
+ #17303F -7.48%,
100
+ #161617 39.62%,
101
+ #17303F 85.82%
102
+ );
103
+ }
104
+ </style>
@@ -82,17 +82,17 @@ async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
82
82
 
83
83
  async function updateUserRate() {
84
84
  try {
85
- await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
86
- method: 'PUT',
87
- credentials: 'include',
88
- headers: {
89
- Authorization: `Bearer ${accessToken.value}`,
90
- lang: locale.value,
91
- },
92
- body: {
93
- rate_code: 'basic_plus',
94
- },
95
- })
85
+ // await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
86
+ // method: 'PUT',
87
+ // credentials: 'include',
88
+ // headers: {
89
+ // Authorization: `Bearer ${accessToken.value}`,
90
+ // lang: locale.value,
91
+ // },
92
+ // body: {
93
+ // rate_code: 'basic_plus',
94
+ // },
95
+ // })
96
96
  window.location.reload()
97
97
  }
98
98
  catch (error) {
@@ -1 +1 @@
1
- # inputs
1
+ # inputs
@@ -1 +1 @@
1
- # breadcrumb, tabs
1
+ # breadcrumb, tabs
@@ -31,16 +31,15 @@ const { locale } = useI18n()
31
31
 
32
32
  const items = useHeaderMenuLinks()
33
33
 
34
+ const { topUpSidePanel } = usePayment()
35
+
34
36
  const onReplenish = () => {
35
37
  // if (myLayer.authMode === 'locale') {
36
38
  // topUpSidePanel.value = true
37
39
  // return
38
40
  // }
39
41
 
40
- if (window) {
41
- window.location.href =
42
- buildLocalizedUrl(locale.value, myLayer.landingUrl, '/profile?popupBalance=1')
43
- }
42
+ topUpSidePanel.value = true
44
43
  }
45
44
  </script>
46
45
 
@@ -1 +1 @@
1
- # tooltip, popover, slide over, modal, context menu
1
+ # tooltip, popover, slide over, modal, context menu
package/icons/sun.vue CHANGED
@@ -1,14 +1,14 @@
1
- <script setup lang="ts">
2
-
3
- </script>
4
-
5
- <template>
6
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="https://www.w3.org/2000/svg">
7
- <path opacity="0.4" d="M7.99998 12.6666C10.5773 12.6666 12.6666 10.5772 12.6666 7.99992C12.6666 5.42259 10.5773 3.33325 7.99998 3.33325C5.42265 3.33325 3.33331 5.42259 3.33331 7.99992C3.33331 10.5772 5.42265 12.6666 7.99998 12.6666Z" fill="#FBC920"/>
8
- <path d="M8.00002 15.3067C7.63335 15.3067 7.33335 15.0334 7.33335 14.6667V14.6134C7.33335 14.2467 7.63335 13.9467 8.00002 13.9467C8.36669 13.9467 8.66669 14.2467 8.66669 14.6134C8.66669 14.9801 8.36669 15.3067 8.00002 15.3067ZM12.76 13.4267C12.5867 13.4267 12.42 13.3601 12.2867 13.2334L12.2 13.1467C11.94 12.8867 11.94 12.4667 12.2 12.2067C12.46 11.9467 12.88 11.9467 13.14 12.2067L13.2267 12.2934C13.4867 12.5534 13.4867 12.9734 13.2267 13.2334C13.1 13.3601 12.9334 13.4267 12.76 13.4267ZM3.24002 13.4267C3.06669 13.4267 2.90002 13.3601 2.76669 13.2334C2.50669 12.9734 2.50669 12.5534 2.76669 12.2934L2.85335 12.2067C3.11335 11.9467 3.53335 11.9467 3.79335 12.2067C4.05335 12.4667 4.05335 12.8867 3.79335 13.1467L3.70669 13.2334C3.58002 13.3601 3.40669 13.4267 3.24002 13.4267ZM14.6667 8.66675H14.6134C14.2467 8.66675 13.9467 8.36675 13.9467 8.00008C13.9467 7.63341 14.2467 7.33342 14.6134 7.33342C14.98 7.33342 15.3067 7.63341 15.3067 8.00008C15.3067 8.36675 15.0334 8.66675 14.6667 8.66675ZM1.38669 8.66675H1.33335C0.966687 8.66675 0.666687 8.36675 0.666687 8.00008C0.666687 7.63341 0.966687 7.33342 1.33335 7.33342C1.70002 7.33342 2.02669 7.63341 2.02669 8.00008C2.02669 8.36675 1.75335 8.66675 1.38669 8.66675ZM12.6734 3.99341C12.5 3.99341 12.3334 3.92675 12.2 3.80008C11.94 3.54008 11.94 3.12008 12.2 2.86008L12.2867 2.77341C12.5467 2.51341 12.9667 2.51341 13.2267 2.77341C13.4867 3.03341 13.4867 3.45341 13.2267 3.71341L13.14 3.80008C13.0134 3.92675 12.8467 3.99341 12.6734 3.99341ZM3.32669 3.99341C3.15335 3.99341 2.98669 3.92675 2.85335 3.80008L2.76669 3.70675C2.50669 3.44675 2.50669 3.02675 2.76669 2.76675C3.02669 2.50675 3.44669 2.50675 3.70669 2.76675L3.79335 2.85342C4.05335 3.11342 4.05335 3.53341 3.79335 3.79341C3.66669 3.92675 3.49335 3.99341 3.32669 3.99341ZM8.00002 2.02675C7.63335 2.02675 7.33335 1.75341 7.33335 1.38675V1.33341C7.33335 0.966748 7.63335 0.666748 8.00002 0.666748C8.36669 0.666748 8.66669 0.966748 8.66669 1.33341C8.66669 1.70008 8.36669 2.02675 8.00002 2.02675Z" fill="#FBC920"/>
9
- </svg>
10
- </template>
11
-
12
- <style scoped>
13
-
14
- </style>
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="https://www.w3.org/2000/svg">
7
+ <path opacity="0.4" d="M7.99998 12.6666C10.5773 12.6666 12.6666 10.5772 12.6666 7.99992C12.6666 5.42259 10.5773 3.33325 7.99998 3.33325C5.42265 3.33325 3.33331 5.42259 3.33331 7.99992C3.33331 10.5772 5.42265 12.6666 7.99998 12.6666Z" fill="#FBC920"/>
8
+ <path d="M8.00002 15.3067C7.63335 15.3067 7.33335 15.0334 7.33335 14.6667V14.6134C7.33335 14.2467 7.63335 13.9467 8.00002 13.9467C8.36669 13.9467 8.66669 14.2467 8.66669 14.6134C8.66669 14.9801 8.36669 15.3067 8.00002 15.3067ZM12.76 13.4267C12.5867 13.4267 12.42 13.3601 12.2867 13.2334L12.2 13.1467C11.94 12.8867 11.94 12.4667 12.2 12.2067C12.46 11.9467 12.88 11.9467 13.14 12.2067L13.2267 12.2934C13.4867 12.5534 13.4867 12.9734 13.2267 13.2334C13.1 13.3601 12.9334 13.4267 12.76 13.4267ZM3.24002 13.4267C3.06669 13.4267 2.90002 13.3601 2.76669 13.2334C2.50669 12.9734 2.50669 12.5534 2.76669 12.2934L2.85335 12.2067C3.11335 11.9467 3.53335 11.9467 3.79335 12.2067C4.05335 12.4667 4.05335 12.8867 3.79335 13.1467L3.70669 13.2334C3.58002 13.3601 3.40669 13.4267 3.24002 13.4267ZM14.6667 8.66675H14.6134C14.2467 8.66675 13.9467 8.36675 13.9467 8.00008C13.9467 7.63341 14.2467 7.33342 14.6134 7.33342C14.98 7.33342 15.3067 7.63341 15.3067 8.00008C15.3067 8.36675 15.0334 8.66675 14.6667 8.66675ZM1.38669 8.66675H1.33335C0.966687 8.66675 0.666687 8.36675 0.666687 8.00008C0.666687 7.63341 0.966687 7.33342 1.33335 7.33342C1.70002 7.33342 2.02669 7.63341 2.02669 8.00008C2.02669 8.36675 1.75335 8.66675 1.38669 8.66675ZM12.6734 3.99341C12.5 3.99341 12.3334 3.92675 12.2 3.80008C11.94 3.54008 11.94 3.12008 12.2 2.86008L12.2867 2.77341C12.5467 2.51341 12.9667 2.51341 13.2267 2.77341C13.4867 3.03341 13.4867 3.45341 13.2267 3.71341L13.14 3.80008C13.0134 3.92675 12.8467 3.99341 12.6734 3.99341ZM3.32669 3.99341C3.15335 3.99341 2.98669 3.92675 2.85335 3.80008L2.76669 3.70675C2.50669 3.44675 2.50669 3.02675 2.76669 2.76675C3.02669 2.50675 3.44669 2.50675 3.70669 2.76675L3.79335 2.85342C4.05335 3.11342 4.05335 3.53341 3.79335 3.79341C3.66669 3.92675 3.49335 3.99341 3.32669 3.99341ZM8.00002 2.02675C7.63335 2.02675 7.33335 1.75341 7.33335 1.38675V1.33341C7.33335 0.966748 7.63335 0.666748 8.00002 0.666748C8.36669 0.666748 8.66669 0.966748 8.66669 1.33341C8.66669 1.70008 8.36669 2.02675 8.00002 2.02675Z" fill="#FBC920"/>
9
+ </svg>
10
+ </template>
11
+
12
+ <style scoped>
13
+
14
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.0.50",
4
+ "version": "2.0.52",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",