adata-ui 2.1.41-beta.2 → 2.1.41-beta.4

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
@@ -57,7 +57,7 @@ defineProps<Props>()
57
57
 
58
58
  <p
59
59
  v-if="subtitle"
60
- class="mt-1 text-secondary"
60
+ class="mt-1 text-secondary text-body-md"
61
61
  >
62
62
  {{ subtitle }}
63
63
  </p>
@@ -3,8 +3,11 @@ import { AIconArrowLeft, AIconHome } from '#components'
3
3
 
4
4
  interface Props {
5
5
  statusCode: number
6
+ homePath?: string
6
7
  }
7
- const props = defineProps<Props>()
8
+ const props = withDefaults(defineProps<Props>(), {
9
+ homePath: '/',
10
+ })
8
11
 
9
12
  const { t } = useI18n()
10
13
  const localePath = useLocalePath()
@@ -14,7 +17,7 @@ const errorTitle = computed(() => t(`errorPage.${props.statusCode}.title`))
14
17
  const errorSubTitle = computed(() => t(`errorPage.${props.statusCode}.subTitle`))
15
18
 
16
19
  function goToMainPage() {
17
- return navigateTo(`${localePath('/')}`, { external: true })
20
+ return navigateTo(`${localePath(props.homePath)}`, { external: true })
18
21
  }
19
22
 
20
23
  function goBack() {
@@ -22,7 +25,7 @@ function goBack() {
22
25
  router.back()
23
26
  }
24
27
  else {
25
- return navigateTo(`${localePath('/')}`, { external: true })
28
+ return navigateTo(`${localePath(props.homePath)}`, { external: true })
26
29
  }
27
30
  }
28
31
  </script>
@@ -1,6 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { AIconChevronUp } from "#components";
3
3
 
4
+ const { t } = useI18n()
5
+
4
6
  const props = defineProps<{
5
7
  bottomOffset?: number
6
8
  }>()
@@ -49,9 +51,11 @@ onUnmounted(() => {
49
51
  :class="[{ 'opacity-0': !isShow }]"
50
52
  :style="{ bottom: footerHeight + 'px' }"
51
53
  >
54
+ <!-- Кнопка только с иконкой: без aria-label скринридер читает её как "button". -->
52
55
  <a-button
53
56
  @click="goTop"
54
57
  form="icon"
58
+ :aria-label="t('reuse.goTop')"
55
59
  :icon="AIconChevronUp"
56
60
  icon-class="h-6 w-6"
57
61
  size="lg"
@@ -1 +1 @@
1
- # inputs
1
+ # inputs
@@ -30,10 +30,10 @@ const comment = ref<string>('')
30
30
  const submitted = ref(false)
31
31
 
32
32
  const scheme = z.object({
33
- fullName: z.string().nonempty(t('forms.feedback.fieldRequired')),
33
+ fullName: z.string(),
34
34
  phone: z.string().nonempty(t('forms.feedback.fieldRequired')).min(17, t('forms.feedback.phoneMinLength', { count: 10 })),
35
- mail: z.string().nonempty(t('forms.feedback.fieldRequired')).email(t('forms.feedback.emailValid')),
36
- comment: z.string().nonempty(t('forms.feedback.fieldRequired')).min(10, t('forms.feedback.commentMinLength', { count: 10 })).max(250, t('forms.feedback.commentMaxLength', { count: 250 })),
35
+ mail: z.string(),
36
+ comment: z.string().max(250, t('forms.feedback.commentMaxLength', { count: 250 })),
37
37
  })
38
38
 
39
39
  const { validation, getError } = useUIValidation(
@@ -98,7 +98,6 @@ onMounted(() => {
98
98
  v-model="fullName"
99
99
  variant="gray"
100
100
  size="md"
101
- required
102
101
  :label="t('forms.demo.n')"
103
102
  :error="getError('fullName')"
104
103
  :disabled="isLoading"
@@ -120,7 +119,6 @@ onMounted(() => {
120
119
  type="email"
121
120
  variant="gray"
122
121
  size="md"
123
- required
124
122
  :label="t('forms.feedback.email')"
125
123
  :error="getError('mail')"
126
124
  :disabled="isLoading"
@@ -135,7 +133,6 @@ onMounted(() => {
135
133
  :label="t('forms.feedback.comment')"
136
134
  :error="getError('comment')"
137
135
  :disabled="isLoading"
138
- required
139
136
  />
140
137
  <a-button-v2
141
138
  type="submit"
@@ -1,16 +1,20 @@
1
1
  <script setup lang="ts">
2
- import IdAutoLogoutModal from '#adata-ui/components/modals/id/IdAutoLogoutModal.vue'
3
- import IdConfirmAccountOtpModal from '#adata-ui/components/modals/id/IdConfirmAccountOtpModal.vue'
4
- import IdConfirmSuccessfulModal from '#adata-ui/components/modals/id/IdConfirmSuccessfulModal.vue'
5
- import IdLoginModal from '#adata-ui/components/modals/id/IdLoginModal.vue'
6
- import IdNewPasswordModal from '#adata-ui/components/modals/id/IdNewPasswordModal.vue'
7
- import IdPasswordSuccessfulModal from '#adata-ui/components/modals/id/IdPasswordSuccessfulModal.vue'
8
- import IdRecoveryModal from '#adata-ui/components/modals/id/IdRecoveryModal.vue'
9
- import IdRegistrationModal from '#adata-ui/components/modals/id/IdRegistrationModal.vue'
10
- import IdResetPasswordOtpModal from '#adata-ui/components/modals/id/IdResetPasswordOtpModal.vue'
11
- import IdTwoFactorModal from '#adata-ui/components/modals/id/IdTwoFactorModal.vue'
12
2
  import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
13
3
  import { writeAccessTokenCookie } from '#adata-ui/composables/useAccessTokenCookie'
4
+ // Каждое из этих окон рендерится только под своим v-if, но статический import
5
+ // всё равно тащил все десять (плюс zod, который они используют для валидации)
6
+ // в стартовый чанк каждого приложения-потребителя. defineAsyncComponent грузит
7
+ // чанк в момент открытия окна: поведение то же, стартовый бандл меньше.
8
+ const IdAutoLogoutModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdAutoLogoutModal.vue'))
9
+ const IdConfirmAccountOtpModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdConfirmAccountOtpModal.vue'))
10
+ const IdConfirmSuccessfulModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdConfirmSuccessfulModal.vue'))
11
+ const IdLoginModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdLoginModal.vue'))
12
+ const IdNewPasswordModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdNewPasswordModal.vue'))
13
+ const IdPasswordSuccessfulModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdPasswordSuccessfulModal.vue'))
14
+ const IdRecoveryModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdRecoveryModal.vue'))
15
+ const IdRegistrationModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdRegistrationModal.vue'))
16
+ const IdResetPasswordOtpModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdResetPasswordOtpModal.vue'))
17
+ const IdTwoFactorModal = defineAsyncComponent(() => import('#adata-ui/components/modals/id/IdTwoFactorModal.vue'))
14
18
 
15
19
  const emit = defineEmits<{
16
20
  (e: 'closed', value: boolean): void
@@ -1 +1 @@
1
- # breadcrumb, tabs
1
+ # breadcrumb, tabs
@@ -56,7 +56,7 @@ const profile: string = 'modals.mobile_navigation.type_profile'
56
56
  </script>
57
57
 
58
58
  <template>
59
- <header class="mx-3 mb-3 overflow-hidden rounded-full border border-default bg-subtle shadow-lg backdrop-blur-lg">
59
+ <header class="mx-3 mb-3 overflow-hidden rounded-full border border-default bg-main/10 shadow-lg backdrop-blur-lg backdrop-saturate-140">
60
60
  <div class="grid w-full grid-cols-3 justify-items-center">
61
61
  <slot>
62
62
  <button
@@ -107,7 +107,7 @@ onMounted(() => {
107
107
  <system-notification />
108
108
  <header
109
109
  ref="headerRef"
110
- class="relative h-16 border-b border-default bg-main/72 backdrop-blur-[14px] backdrop-saturate-140"
110
+ class="relative h-16 border-b border-default bg-main/10 backdrop-blur-lg backdrop-saturate-140"
111
111
  >
112
112
  <div class="a-container mobile-padding flex h-full items-center justify-between gap-2">
113
113
  <!-- Desktop hidden -->
@@ -152,11 +152,15 @@ onMounted(() => {
152
152
  />
153
153
  </div>
154
154
  <!-- Mobile hidden -->
155
+ <!--
156
+ role="list" здесь был вреден: у <nav> уже есть неявная роль navigation,
157
+ а list требует, чтобы прямые потомки были listitem — ими логотип и
158
+ header-link не являются. Разметка списка живёт внутри HeaderLink (ul/li).
159
+ -->
155
160
  <nav
156
161
  class="hidden items-center gap-4 lg:flex"
157
162
  itemscope
158
163
  itemtype="https://schema.org/SiteNavigationElement"
159
- role="list"
160
164
  >
161
165
  <nuxt-link-locale
162
166
  aria-label="Adata-logo"
@@ -1 +1 @@
1
- # tooltip, popover, slide over, modal, context menu
1
+ # tooltip, popover, slide over, modal, context menu
@@ -1,5 +1,10 @@
1
1
  <template>
2
2
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
- <path class="fill-icon-strong" fill-rule="evenodd" clip-rule="evenodd" d="M15.1487 5.43944C15.1487 4.71477 15.7361 4.1273 16.4608 4.1273C17.1855 4.1273 17.7729 4.71477 17.7729 5.43944C17.7729 6.16411 17.1855 6.75158 16.4608 6.75158C15.7361 6.75158 15.1487 6.16411 15.1487 5.43944ZM13.683 6.22775H2.29021C1.85541 6.22775 1.50293 5.87527 1.50293 5.44046C1.50293 5.00566 1.85541 4.65318 2.29021 4.65318H13.6825C14.0248 3.44103 15.1391 2.55273 16.4608 2.55273C17.7825 2.55273 18.8968 3.44103 19.2391 4.65318H21.7128C22.1476 4.65318 22.5 5.00566 22.5 5.44046C22.5 5.87527 22.1476 6.22775 21.7128 6.22775H19.2386C18.8955 7.43886 17.7818 8.32615 16.4608 8.32615C15.1398 8.32615 14.0261 7.43886 13.683 6.22775ZM8.59002 9.11292C9.91221 9.11292 11.0268 10.0018 11.3687 11.2146H21.7099C22.1447 11.2146 22.4972 11.5671 22.4972 12.0019C22.4972 12.4367 22.1447 12.7892 21.7099 12.7892H11.3674C11.024 13.9997 9.91053 14.8863 8.59002 14.8863C7.2695 14.8863 6.15608 13.9997 5.81263 12.7892H2.29021C1.85541 12.7892 1.50293 12.4367 1.50293 12.0019C1.50293 11.5671 1.85541 11.2146 2.29021 11.2146H5.81132C6.15325 10.0018 7.26783 9.11292 8.59002 9.11292ZM8.59002 10.6875C7.86534 10.6875 7.27788 11.2749 7.27788 11.9996C7.27788 12.7243 7.86534 13.3118 8.59002 13.3118C9.31469 13.3118 9.90216 12.7243 9.90216 11.9996C9.90216 11.2749 9.31469 10.6875 8.59002 10.6875ZM19.2386 19.349C18.8956 20.5602 17.7818 21.4475 16.4608 21.4475C15.1398 21.4475 14.026 20.5602 13.683 19.349H2.29021C1.85541 19.349 1.50293 18.9965 1.50293 18.5617C1.50293 18.1269 1.85541 17.7744 2.29021 17.7744H13.6825C14.0249 16.5624 15.1391 15.6741 16.4608 15.6741C17.7825 15.6741 18.8967 16.5624 19.2391 17.7744H21.7128C22.1476 17.7744 22.5 18.1269 22.5 18.5617C22.5 18.9965 22.1476 19.349 21.7128 19.349H19.2386ZM15.1487 18.5608C15.1487 17.8362 15.7361 17.2487 16.4608 17.2487C17.1855 17.2487 17.7729 17.8362 17.7729 18.5608C17.7729 19.2855 17.1855 19.873 16.4608 19.873C15.7361 19.873 15.1487 19.2855 15.1487 18.5608Z"/>
3
+ <path
4
+ fill-rule="evenodd"
5
+ clip-rule="evenodd"
6
+ fill="currentColor"
7
+ d="M15.1487 5.43944C15.1487 4.71477 15.7361 4.1273 16.4608 4.1273C17.1855 4.1273 17.7729 4.71477 17.7729 5.43944C17.7729 6.16411 17.1855 6.75158 16.4608 6.75158C15.7361 6.75158 15.1487 6.16411 15.1487 5.43944ZM13.683 6.22775H2.29021C1.85541 6.22775 1.50293 5.87527 1.50293 5.44046C1.50293 5.00566 1.85541 4.65318 2.29021 4.65318H13.6825C14.0248 3.44103 15.1391 2.55273 16.4608 2.55273C17.7825 2.55273 18.8968 3.44103 19.2391 4.65318H21.7128C22.1476 4.65318 22.5 5.00566 22.5 5.44046C22.5 5.87527 22.1476 6.22775 21.7128 6.22775H19.2386C18.8955 7.43886 17.7818 8.32615 16.4608 8.32615C15.1398 8.32615 14.0261 7.43886 13.683 6.22775ZM8.59002 9.11292C9.91221 9.11292 11.0268 10.0018 11.3687 11.2146H21.7099C22.1447 11.2146 22.4972 11.5671 22.4972 12.0019C22.4972 12.4367 22.1447 12.7892 21.7099 12.7892H11.3674C11.024 13.9997 9.91053 14.8863 8.59002 14.8863C7.2695 14.8863 6.15608 13.9997 5.81263 12.7892H2.29021C1.85541 12.7892 1.50293 12.4367 1.50293 12.0019C1.50293 11.5671 1.85541 11.2146 2.29021 11.2146H5.81132C6.15325 10.0018 7.26783 9.11292 8.59002 9.11292ZM8.59002 10.6875C7.86534 10.6875 7.27788 11.2749 7.27788 11.9996C7.27788 12.7243 7.86534 13.3118 8.59002 13.3118C9.31469 13.3118 9.90216 12.7243 9.90216 11.9996C9.90216 11.2749 9.31469 10.6875 8.59002 10.6875ZM19.2386 19.349C18.8956 20.5602 17.7818 21.4475 16.4608 21.4475C15.1398 21.4475 14.026 20.5602 13.683 19.349H2.29021C1.85541 19.349 1.50293 18.9965 1.50293 18.5617C1.50293 18.1269 1.85541 17.7744 2.29021 17.7744H13.6825C14.0249 16.5624 15.1391 15.6741 16.4608 15.6741C17.7825 15.6741 18.8967 16.5624 19.2391 17.7744H21.7128C22.1476 17.7744 22.5 18.1269 22.5 18.5617C22.5 18.9965 22.1476 19.349 21.7128 19.349H19.2386ZM15.1487 18.5608C15.1487 17.8362 15.7361 17.2487 16.4608 17.2487C17.1855 17.2487 17.7729 17.8362 17.7729 18.5608C17.7729 19.2855 17.1855 19.873 16.4608 19.873C15.7361 19.873 15.1487 19.2855 15.1487 18.5608Z"
8
+ />
4
9
  </svg>
5
10
  </template>
package/lang/en.ts CHANGED
@@ -21,6 +21,7 @@ const EnLocale: RuLocale = {
21
21
  yes: 'Yes',
22
22
  or: 'Or',
23
23
  successfully: 'Successfully',
24
+ goTop: 'Back to top',
24
25
  },
25
26
  header: {
26
27
  top: {
package/lang/kk.ts CHANGED
@@ -21,6 +21,7 @@ const KkLocale: RuLocale = {
21
21
  yes: 'Иә',
22
22
  or: 'Немесе',
23
23
  successfully: 'Сәтті',
24
+ goTop: 'Жоғарыға',
24
25
  },
25
26
  header: {
26
27
  top: {
package/lang/ru.ts CHANGED
@@ -17,6 +17,7 @@ const RuLocale = {
17
17
  yes: 'Да',
18
18
  or: 'Или',
19
19
  successfully: 'Успешно',
20
+ goTop: 'Наверх',
20
21
  },
21
22
  header: {
22
23
  top: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.1.41-beta.2",
4
+ "version": "2.1.41-beta.4",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",
@@ -1,19 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "PowerShell(npm view *)",
5
- "PowerShell(git rm *)",
6
- "PowerShell(npx --yes @tailwindcss/upgrade@latest --force)",
7
- "PowerShell(Out-File *)",
8
- "PowerShell(pnpm install *)",
9
- "PowerShell(Get-ChildItem node_modules\\\\eslint-plugin-tailwindcss\\\\lib\\\\rules | Select-Object -ExpandProperty Name; node -e \"const p=require\\('eslint-plugin-tailwindcss'\\); console.log\\(Object.keys\\(p.rules\\).join\\('\\\\n'\\)\\); console.log\\('CONFIGS:', Object.keys\\(p.configs\\).join\\(','\\)\\)\")",
10
- "PowerShell(node -e \"const p=require\\('eslint-plugin-tailwindcss'\\); console.log\\(JSON.stringify\\(p.configs.recommended, \\(k,v\\)=> typeof v==='object'&&v!==null&&k==='plugins'?Object.keys\\(v\\):v, 2\\).substring\\(0,800\\)\\)\"; Select-String -Path node_modules\\\\eslint-plugin-tailwindcss\\\\README.md -Pattern 'entryPoint|settings' | Select-Object -First 10 | ForEach-Object Line)",
11
- "PowerShell(Select-String -Path node_modules\\\\eslint-plugin-tailwindcss\\\\README.md -Pattern 'cssConfigPath|vue|\\\\.vue' -Context 2,4 | Select-Object -First 12 | ForEach-Object {$_.Context.PreContext + $_.Line + $_.Context.PostContext} | ForEach-Object {$_})",
12
- "PowerShell(pnpm build *)",
13
- "PowerShell($c = Get-Content .playground\\\\.output\\\\server\\\\chunks\\\\build\\\\entry-styles.B6sbRG45.mjs -Raw; foreach \\($m in '--color-deepblue-900','bg-gr-blue','heading-01','hover\\\\:bg-purple-900\\\\/20','a-container','--font-sans','outline-hidden','scrollbar-gutter'\\) { \"$m => $\\($c.Contains\\($m\\)\\)\" })",
14
- "PowerShell(pnpm eslint *)",
15
- "PowerShell(pnpm *)",
16
- "PowerShell(Get-Content C:\\\\adata\\\\adata-ui\\\\app.vue; \"=== -error.vue \\(first 100\\) ===\"; Get-Content C:\\\\adata\\\\adata-ui\\\\-error.vue -TotalCount 100; \"=== .playground/app.vue ===\"; Get-Content C:\\\\adata\\\\adata-ui\\\\.playground\\\\app.vue -TotalCount 60)"
17
- ]
18
- }
19
- }