adata-ui 2.1.41-beta.0 → 2.1.41-beta.1
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/CLAUDE.md +2 -1
- package/assets/styles/main.css +4 -3
- package/assets/styles/theme.css +9 -2
- package/assets/styles/ui.css +77 -0
- package/components/elements/button/AButtonV2.vue +58 -15
- package/components/elements/count-up/ACountUp.vue +54 -0
- package/components/elements/curve-block-v2/ACurveBlockV2.vue +54 -18
- package/components/elements/infinite-carousel/AInfiniteCarousel.vue +46 -8
- package/components/elements/section-heading/ASectionHeading.vue +35 -0
- package/components/elements/step-slider/AStepSliderColCard.vue +75 -38
- package/components/elements/step-slider/AStepSliderColNumber.vue +74 -53
- package/components/features/color-mode/AColorMode.client.vue +1 -23
- package/components/forms/feedback-form/FeedbackFormV2.vue +3 -3
- package/components/forms/input/AInputV2.vue +28 -10
- package/components/forms/input/textarea/ATextareaV2.vue +10 -5
- package/components/navigation/footer/AFooter.vue +2 -2
- package/components/navigation/header/AHeader.vue +3 -3
- package/components/navigation/pill-tabs/APillTabsV2.vue +29 -14
- package/icons/letter/letter-a.vue +4 -2
- package/icons/letter/letter-b.vue +2 -2
- package/icons/letter/letter-c.vue +2 -2
- package/icons/letter/letter-d.vue +2 -2
- package/icons/letter/letter-e.vue +2 -2
- package/nuxt.config.ts +7 -4
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
type CountColor = 'gray' | 'blue' | 'yellow' | 'red' | 'green' | 'neutral'
|
|
3
|
-
|
|
3
|
+
/* pill-round — полностью округлый переключатель-«тумблер» (ДС-2026, тарифы):
|
|
4
|
+
меняется не только радиус, но и поверхность трека, плотность и цвет активного
|
|
5
|
+
таба, поэтому это отдельная шкура, а не проп радиуса. */
|
|
6
|
+
type PillTabsType = 'pill' | 'pill-round' | 'underline'
|
|
4
7
|
|
|
5
8
|
export interface PillTab {
|
|
6
9
|
key: string
|
|
@@ -55,6 +58,7 @@ const COUNT_COLOR_CLASS: Record<CountColor, string> = {
|
|
|
55
58
|
const { t, te } = useI18n()
|
|
56
59
|
|
|
57
60
|
const isUnderline = computed(() => props.type === 'underline')
|
|
61
|
+
const isPillRound = computed(() => props.type === 'pill-round')
|
|
58
62
|
|
|
59
63
|
function hasCount(option: PillTab) {
|
|
60
64
|
if (typeof option.count === 'string') {
|
|
@@ -142,11 +146,13 @@ onBeforeUnmount(() => {
|
|
|
142
146
|
|
|
143
147
|
<template>
|
|
144
148
|
<div
|
|
145
|
-
class="pill-tabs-v2
|
|
149
|
+
class="pill-tabs-v2 max-w-full min-w-0"
|
|
146
150
|
:class="[
|
|
147
151
|
isUnderline
|
|
148
152
|
? 'border-b border-default'
|
|
149
|
-
:
|
|
153
|
+
: isPillRound
|
|
154
|
+
? 'rounded-full border border-default bg-canvas p-0.5'
|
|
155
|
+
: 'rounded-lg border border-default bg-muted p-1',
|
|
150
156
|
block ? 'w-full' : 'w-fit',
|
|
151
157
|
disabled ? 'pill-tabs-v2--disabled opacity-60' : '',
|
|
152
158
|
]"
|
|
@@ -168,26 +174,35 @@ onBeforeUnmount(() => {
|
|
|
168
174
|
:aria-disabled="isDisabled(option) || undefined"
|
|
169
175
|
:disabled="isDisabled(option)"
|
|
170
176
|
:tabindex="modelValue === option.key ? 0 : -1"
|
|
171
|
-
class="inline-flex items-center gap-1.5 whitespace-nowrap
|
|
177
|
+
class="inline-flex items-center gap-1.5 whitespace-nowrap transition-colors duration-150"
|
|
172
178
|
:class="[
|
|
173
179
|
SIZE_CLASS[size],
|
|
174
180
|
isUnderline
|
|
175
181
|
? [
|
|
176
|
-
'px-4 py-2',
|
|
182
|
+
'px-4 py-2 font-medium',
|
|
177
183
|
isDisabled(option)
|
|
178
184
|
? 'cursor-not-allowed text-icon-disabled'
|
|
179
185
|
: modelValue === option.key
|
|
180
186
|
? 'text-brand'
|
|
181
187
|
: 'text-quaternary hover:text-primary',
|
|
182
188
|
]
|
|
183
|
-
:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
: isPillRound
|
|
190
|
+
? [
|
|
191
|
+
'rounded-full px-3.5 py-1 font-semibold',
|
|
192
|
+
isDisabled(option)
|
|
193
|
+
? 'cursor-not-allowed text-icon-disabled'
|
|
194
|
+
: modelValue === option.key
|
|
195
|
+
? 'bg-main text-brand shadow-xs dark:shadow-none dark:ring-1 dark:ring-white/10 dark:ring-inset'
|
|
196
|
+
: 'text-secondary hover:text-primary',
|
|
197
|
+
]
|
|
198
|
+
: [
|
|
199
|
+
'rounded-md px-3 py-1.5 font-medium',
|
|
200
|
+
isDisabled(option)
|
|
201
|
+
? 'cursor-not-allowed text-icon-disabled'
|
|
202
|
+
: modelValue === option.key
|
|
203
|
+
? 'bg-main text-primary shadow-xs dark:shadow-none dark:ring-1 dark:ring-white/10 dark:ring-inset'
|
|
204
|
+
: 'text-quaternary hover:bg-action-secondary-hover hover:text-primary',
|
|
205
|
+
],
|
|
191
206
|
block ? 'flex-1 basis-0 justify-center' : 'shrink-0',
|
|
192
207
|
]"
|
|
193
208
|
@click="select(option)"
|
|
@@ -197,7 +212,7 @@ onBeforeUnmount(() => {
|
|
|
197
212
|
|
|
198
213
|
<span
|
|
199
214
|
v-if="showCount && !option.hideCount"
|
|
200
|
-
class="inline-flex min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 text-body-sm font-semibold
|
|
215
|
+
class="inline-flex min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 text-body-sm leading-5 font-semibold"
|
|
201
216
|
:class="COUNT_COLOR_CLASS[resolveCountColor(option)]"
|
|
202
217
|
>
|
|
203
218
|
{{ formatCount(option) }}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- Плитка-бейдж A–E: цвета через токены, иначе в тёмной теме светлая
|
|
3
|
+
подложка светится (палитра пар — как у бейджей сравнения в макете). -->
|
|
2
4
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<rect width="24" height="24" rx="7" fill="
|
|
4
|
-
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="
|
|
5
|
+
<rect width="24" height="24" rx="7" fill="var(--background-color-brand-subtle)"/>
|
|
6
|
+
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="var(--text-color-brand)">A</text>
|
|
5
7
|
</svg>
|
|
6
8
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
<rect width="24" height="24" rx="7" fill="
|
|
4
|
-
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="
|
|
3
|
+
<rect width="24" height="24" rx="7" fill="var(--background-color-success-subtle)"/>
|
|
4
|
+
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="var(--text-color-success)">B</text>
|
|
5
5
|
</svg>
|
|
6
6
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
<rect width="24" height="24" rx="7" fill="
|
|
4
|
-
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="
|
|
3
|
+
<rect width="24" height="24" rx="7" fill="var(--background-color-violet-subtle)"/>
|
|
4
|
+
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="var(--color-icon-violet)">C</text>
|
|
5
5
|
</svg>
|
|
6
6
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
<rect width="24" height="24" rx="7" fill="
|
|
4
|
-
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="
|
|
3
|
+
<rect width="24" height="24" rx="7" fill="var(--background-color-warning-subtle)"/>
|
|
4
|
+
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="var(--text-color-warning)">D</text>
|
|
5
5
|
</svg>
|
|
6
6
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
<rect width="24" height="24" rx="7" fill="
|
|
4
|
-
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="
|
|
3
|
+
<rect width="24" height="24" rx="7" fill="var(--background-color-pink-subtle)"/>
|
|
4
|
+
<text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif" font-size="13" font-weight="700" fill="var(--color-icon-pink)">E</text>
|
|
5
5
|
</svg>
|
|
6
6
|
</template>
|
package/nuxt.config.ts
CHANGED
|
@@ -38,6 +38,13 @@ export default defineNuxtConfig({
|
|
|
38
38
|
colorMode: {
|
|
39
39
|
preference: 'light',
|
|
40
40
|
classSuffix: '',
|
|
41
|
+
storage: 'cookie',
|
|
42
|
+
storageKey: 'colorMode',
|
|
43
|
+
cookieAttrs: {
|
|
44
|
+
path: '/',
|
|
45
|
+
maxAge: 60 * 60 * 24 * 365,
|
|
46
|
+
domain: process.env.COLOR_MODE_COOKIE_DOMAIN,
|
|
47
|
+
},
|
|
41
48
|
},
|
|
42
49
|
|
|
43
50
|
googleFonts: {
|
|
@@ -85,8 +92,4 @@ export default defineNuxtConfig({
|
|
|
85
92
|
},
|
|
86
93
|
},
|
|
87
94
|
|
|
88
|
-
// Tailwind + токены + глобальные стили; мержится в приложение-консьюмер
|
|
89
|
-
// штатно, как любой css: слоя.
|
|
90
|
-
css: [resolve('./assets/styles/main.css')],
|
|
91
|
-
|
|
92
95
|
})
|
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.
|
|
4
|
+
"version": "2.1.41-beta.1",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "nuxi dev .playground",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@headlessui/vue": "^1.7.23",
|
|
40
40
|
"@nuxt/image": "1.8.1",
|
|
41
41
|
"@nuxt/kit": "^3.18.1",
|
|
42
|
-
"@nuxtjs/color-mode": "^
|
|
42
|
+
"@nuxtjs/color-mode": "^4.0.1",
|
|
43
43
|
"@nuxtjs/google-fonts": "^3.2.0",
|
|
44
44
|
"@nuxtjs/i18n": "9.3.3",
|
|
45
45
|
"@popperjs/core": "^2.11.8",
|