@dskripchenko/ui 0.3.0 → 0.5.0
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 +103 -21
- package/dist/components/Affix/UidAffix.vue.d.ts +33 -0
- package/dist/components/Affix/index.d.ts +2 -0
- package/dist/components/Anchor/UidAnchor.vue.d.ts +30 -0
- package/dist/components/Anchor/index.d.ts +2 -0
- package/dist/components/BackTop/UidBackTop.vue.d.ts +33 -0
- package/dist/components/BackTop/index.d.ts +2 -0
- package/dist/components/Calendar/UidCalendar.vue.d.ts +34 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/UidCard.vue.d.ts +5 -1
- package/dist/components/Carousel/UidCarousel.vue.d.ts +41 -0
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Cascader/UidCascader.vue.d.ts +36 -0
- package/dist/components/Cascader/index.d.ts +2 -0
- package/dist/components/Combobox/UidCombobox.vue.d.ts +0 -2
- package/dist/components/DatePicker/UidDatePicker.vue.d.ts +1 -1
- package/dist/components/DateRangePicker/UidDateRangePicker.vue.d.ts +0 -1
- package/dist/components/FileUpload/UidFileUpload.vue.d.ts +0 -2
- package/dist/components/LocaleProvider/UidLocaleProvider.vue.d.ts +23 -0
- package/dist/components/LocaleProvider/index.d.ts +2 -0
- package/dist/components/Mention/UidMention.vue.d.ts +33 -0
- package/dist/components/Mention/index.d.ts +2 -0
- package/dist/components/NotificationBadge/UidNotificationBadge.vue.d.ts +37 -0
- package/dist/components/NotificationBadge/index.d.ts +2 -0
- package/dist/components/Select/UidSelect.vue.d.ts +0 -1
- package/dist/components/TimePicker/UidTimePicker.vue.d.ts +0 -1
- package/dist/components/Tour/UidTour.vue.d.ts +42 -0
- package/dist/components/Tour/index.d.ts +2 -0
- package/dist/components/Transfer/UidTransfer.vue.d.ts +27 -0
- package/dist/components/Transfer/index.d.ts +2 -0
- package/dist/components/TreeSelect/UidTreeSelect.vue.d.ts +41 -0
- package/dist/components/TreeSelect/index.d.ts +2 -0
- package/dist/components/Watermark/UidWatermark.vue.d.ts +34 -0
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/composables/useLocale.d.ts +4 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +29 -0
- package/dist/index.mjs +3113 -1439
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/index.d.ts +3 -0
- package/dist/locales/ru.d.ts +2 -0
- package/dist/locales/types.d.ts +98 -0
- package/dist/styles/index.css +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -2,22 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Набор Vue 3 компонентов, токенов и тем на CSS custom properties.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@dskripchenko/ui)
|
|
6
|
+
[](https://bundlephobia.com/package/@dskripchenko/ui)
|
|
7
|
+
[](./LICENSE)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
> **Статус:** ранняя разработка. API нестабилен до `1.0`.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
11
|
+
📖 **Storybook:** [dskripchenko.github.io/ui](https://dskripchenko.github.io/ui/)
|
|
12
|
+
|
|
13
|
+
## Особенности
|
|
14
|
+
|
|
15
|
+
- **59 компонентов** — формы, навигация, оверлеи, отображение данных, паттерны и лейауты
|
|
16
|
+
- **Vue 3 + TypeScript** — Composition API, `<script setup>`, полная типизация
|
|
17
|
+
- **CSS custom properties** — никакого CSS-in-JS, Tailwind или препроцессоров; всё через переменные
|
|
18
|
+
- **Light / Dark темы** — через `data-theme` на `:root`, легко переопределяются
|
|
19
|
+
- **Tree-shakeable** — импорт по компонентам, ESM + CJS сборки
|
|
20
|
+
- **A11y** — `:focus-visible`, ARIA-атрибуты, keyboard-навигация во всех интерактивных компонентах
|
|
21
|
+
- **~1500 иконок** — `lucide-vue-next` под капотом + sub-export `@dskripchenko/ui/icons`
|
|
14
22
|
|
|
15
23
|
## Установка
|
|
16
24
|
|
|
17
25
|
```bash
|
|
18
|
-
npm install @dskripchenko/ui
|
|
19
|
-
# или
|
|
20
26
|
pnpm add @dskripchenko/ui
|
|
27
|
+
# или
|
|
28
|
+
npm install @dskripchenko/ui
|
|
21
29
|
```
|
|
22
30
|
|
|
23
31
|
## Быстрый старт
|
|
@@ -33,7 +41,7 @@ import '@dskripchenko/ui/styles/themes.css'
|
|
|
33
41
|
createApp(App).mount('#app')
|
|
34
42
|
```
|
|
35
43
|
|
|
36
|
-
```
|
|
44
|
+
```vue
|
|
37
45
|
<!-- App.vue -->
|
|
38
46
|
<script setup lang="ts">
|
|
39
47
|
import { UidButton, UidIcon } from '@dskripchenko/ui'
|
|
@@ -47,28 +55,102 @@ import { Check } from '@dskripchenko/ui/icons'
|
|
|
47
55
|
</template>
|
|
48
56
|
```
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Переключение темы:
|
|
58
|
+
Переключение темы — атрибут на `<html>`:
|
|
53
59
|
|
|
54
60
|
```html
|
|
55
61
|
<html data-theme="dark">
|
|
56
62
|
```
|
|
57
63
|
|
|
58
|
-
##
|
|
64
|
+
## Состав библиотеки
|
|
65
|
+
|
|
66
|
+
### Базовые формы и ввод
|
|
67
|
+
|
|
68
|
+
`UidButton`, `UidInput`, `UidTextarea`, `UidNumberInput`, `UidCheckbox`, `UidRadio`, `UidRadioGroup`, `UidSwitch`, `UidLabel`, `UidFormField`, `UidSelect`, `UidCombobox`, `UidTagsInput`, `UidDatePicker`, `UidDateRangePicker`, `UidTimePicker`, `UidColorPicker`, `UidSlider`, `UidRating`, `UidFileUpload`, `UidMention`, `UidTreeSelect`
|
|
69
|
+
|
|
70
|
+
### Обратная связь
|
|
71
|
+
|
|
72
|
+
`UidSpinner`, `UidSkeleton`, `UidBadge`, `UidAlert`, `UidProgress`, `UidToast`, `UidToastProvider`, `UidTour`
|
|
73
|
+
|
|
74
|
+
### Оверлеи
|
|
75
|
+
|
|
76
|
+
`UidModal`, `UidDrawer`, `UidTooltip`, `UidPopover`, `UidMenu`, `UidMenuItem`, `UidCommand`
|
|
77
|
+
|
|
78
|
+
### Навигация
|
|
79
|
+
|
|
80
|
+
`UidTabs`, `UidTab`, `UidTabPanel`, `UidBreadcrumb`, `UidLink`, `UidPagination`, `UidPaginationCursor`, `UidLoadMore`, `UidInfiniteScroll`, `UidPageSize`, `UidBackTop`, `UidAffix`, `UidAnchor`
|
|
81
|
+
|
|
82
|
+
### Отображение данных
|
|
83
|
+
|
|
84
|
+
`UidCard`, `UidAvatar`, `UidAvatarGroup`, `UidTag`, `UidDivider`, `UidAccordion`, `UidTable`, `UidVirtualList`, `UidStat`, `UidDescriptionList`, `UidDescriptionItem`, `UidTimeline`, `UidTimelineItem`, `UidTreeView`, `UidCode`, `UidWatermark`
|
|
85
|
+
|
|
86
|
+
### Layout-помощники
|
|
87
|
+
|
|
88
|
+
`UidStack`, `UidGrid`, `UidContainer`, `UidSplitter`
|
|
89
|
+
|
|
90
|
+
### Wizards
|
|
91
|
+
|
|
92
|
+
`UidStepper`, `UidWizard`, `UidWizardStep`
|
|
59
93
|
|
|
60
|
-
|
|
94
|
+
### Patterns
|
|
95
|
+
|
|
96
|
+
`UidHeader`, `UidFooter`, `UidSidebar`, `UidPageHeader`, `UidEmptyState`, `UidErrorState`, `UidResult`
|
|
97
|
+
|
|
98
|
+
### Layouts
|
|
99
|
+
|
|
100
|
+
`UidSimpleLayout`, `UidSidebarLayout`, `UidAuthLayout`, `UidWizardLayout`
|
|
101
|
+
|
|
102
|
+
### Composables
|
|
103
|
+
|
|
104
|
+
`useTheme`, `useField`, `useToast`, `useWizard`, `useSidebar`, `useCommandPalette`, `useFocusTrap`, `useScrollLock`, `usePopover`
|
|
105
|
+
|
|
106
|
+
Полный каталог с интерактивными примерами — в **[Storybook](https://dskripchenko.github.io/ui/)**.
|
|
107
|
+
|
|
108
|
+
## Темизация
|
|
109
|
+
|
|
110
|
+
Все цвета, отступы, шрифты — CSS-переменные. Переопределить тему — задать токены на `:root` или контейнере:
|
|
111
|
+
|
|
112
|
+
```css
|
|
113
|
+
:root[data-theme='dark'] {
|
|
114
|
+
--uid-color-primary: #8b5cf6;
|
|
115
|
+
--uid-color-bg: #0a0a0a;
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Подробнее — [`docs/THEMING.md`](./docs/THEMING.md) и [`docs/TOKENS.md`](./docs/TOKENS.md).
|
|
120
|
+
|
|
121
|
+
## Иконки
|
|
122
|
+
|
|
123
|
+
Sub-export `@dskripchenko/ui/icons` реэкспортирует все ~1500 иконок Lucide:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
import { UidIcon } from '@dskripchenko/ui'
|
|
127
|
+
import { Heart, Star } from '@dskripchenko/ui/icons'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Подробнее — [`docs/ICONS.md`](./docs/ICONS.md).
|
|
131
|
+
|
|
132
|
+
## Документация
|
|
61
133
|
|
|
62
134
|
- [Архитектура](./docs/ARCHITECTURE.md) — структура пакета, сборка, экспорт
|
|
63
135
|
- [Дизайн-токены](./docs/TOKENS.md) — система CSS-переменных
|
|
64
136
|
- [Темизация](./docs/THEMING.md) — light/dark и кастомизация
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
67
|
-
- [Валидация форм](./docs/VALIDATION.md) — useField, useForm, встроенные правила
|
|
137
|
+
- [Иконки](./docs/ICONS.md) — `UidIcon` и реестр Lucide
|
|
138
|
+
- [Валидация форм](./docs/VALIDATION.md) — `useField`, правила
|
|
68
139
|
- [Patterns и Layouts](./docs/PATTERNS.md) — составные блоки и шаблоны страниц
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
140
|
+
- [Гайдлайны компонентов](./docs/COMPONENT_GUIDELINES.md) — конвенции
|
|
141
|
+
- [Roadmap](./docs/ROADMAP.md) — план развития
|
|
142
|
+
- [Контрибьютинг](./docs/CONTRIBUTING.md) — workflow
|
|
143
|
+
|
|
144
|
+
## Разработка
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pnpm install
|
|
148
|
+
pnpm dev # Storybook на :6006
|
|
149
|
+
pnpm test # Vitest
|
|
150
|
+
pnpm build # Сборка библиотеки
|
|
151
|
+
pnpm build-storybook # Сборка Storybook → storybook-static
|
|
152
|
+
pnpm changeset # Описать изменения для следующего релиза
|
|
153
|
+
```
|
|
72
154
|
|
|
73
155
|
## Лицензия
|
|
74
156
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface UidAffixProps {
|
|
2
|
+
offsetTop?: number;
|
|
3
|
+
offsetBottom?: number;
|
|
4
|
+
}
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default?(): unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
default?(): unknown;
|
|
11
|
+
};
|
|
12
|
+
refs: {
|
|
13
|
+
rootRef: HTMLDivElement;
|
|
14
|
+
sentinelRef: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
rootEl: HTMLDivElement;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<UidAffixProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
change: (affixed: boolean) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<UidAffixProps> & Readonly<{
|
|
22
|
+
onChange?: ((affixed: boolean) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
rootRef: HTMLDivElement;
|
|
25
|
+
sentinelRef: HTMLDivElement;
|
|
26
|
+
}, HTMLDivElement>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface AnchorItem {
|
|
2
|
+
key: string;
|
|
3
|
+
href: string;
|
|
4
|
+
title: string;
|
|
5
|
+
children?: AnchorItem[];
|
|
6
|
+
}
|
|
7
|
+
export interface UidAnchorProps {
|
|
8
|
+
items: AnchorItem[];
|
|
9
|
+
offsetTop?: number;
|
|
10
|
+
target?: () => HTMLElement | Window | null;
|
|
11
|
+
smooth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = UidAnchorProps;
|
|
14
|
+
type __VLS_PublicProps = {
|
|
15
|
+
modelValue?: string;
|
|
16
|
+
} & __VLS_Props;
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
click: (item: AnchorItem, event: MouseEvent) => any;
|
|
19
|
+
"update:modelValue": (value: string) => any;
|
|
20
|
+
change: (key: string) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
onClick?: ((item: AnchorItem, event: MouseEvent) => any) | undefined;
|
|
23
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
|
+
onChange?: ((key: string) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
target: () => HTMLElement | Window | null;
|
|
27
|
+
smooth: boolean;
|
|
28
|
+
offsetTop: number;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface UidBackTopProps {
|
|
2
|
+
visibleAfter?: number;
|
|
3
|
+
target?: string | HTMLElement | (() => HTMLElement | null);
|
|
4
|
+
smooth?: boolean;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
default?(): unknown;
|
|
11
|
+
}> & {
|
|
12
|
+
default?(): unknown;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<UidBackTopProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
click: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<UidBackTopProps> & Readonly<{
|
|
21
|
+
onClick?: (() => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
target: string | HTMLElement | (() => HTMLElement | null);
|
|
24
|
+
visibleAfter: number;
|
|
25
|
+
smooth: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface CalendarEvent {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
date: string;
|
|
4
|
+
title: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UidCalendarProps {
|
|
8
|
+
events?: CalendarEvent[];
|
|
9
|
+
min?: string;
|
|
10
|
+
max?: string;
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
maxEventsPerDay?: number;
|
|
13
|
+
todayLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Props = UidCalendarProps;
|
|
16
|
+
type __VLS_PublicProps = {
|
|
17
|
+
modelValue?: string | null;
|
|
18
|
+
} & __VLS_Props;
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: string | null) => any;
|
|
21
|
+
change: (iso: string | null) => any;
|
|
22
|
+
"event-click": (event: CalendarEvent) => any;
|
|
23
|
+
"date-click": (iso: string) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
26
|
+
onChange?: ((iso: string | null) => any) | undefined;
|
|
27
|
+
"onEvent-click"?: ((event: CalendarEvent) => any) | undefined;
|
|
28
|
+
"onDate-click"?: ((iso: string) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
compact: boolean;
|
|
31
|
+
events: CalendarEvent[];
|
|
32
|
+
maxEventsPerDay: number;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
34
|
+
export default _default;
|
|
@@ -19,7 +19,11 @@ declare function __VLS_template(): {
|
|
|
19
19
|
rootEl: HTMLDivElement;
|
|
20
20
|
};
|
|
21
21
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
-
declare const __VLS_component: import('vue').DefineComponent<UidCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<UidCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
click: (event: MouseEvent | KeyboardEvent) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<UidCardProps> & Readonly<{
|
|
25
|
+
onClick?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
26
|
+
}>, {
|
|
23
27
|
padding: "none" | "sm" | "md" | "lg";
|
|
24
28
|
clickable: boolean;
|
|
25
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface UidCarouselProps<T> {
|
|
2
|
+
items: T[];
|
|
3
|
+
direction?: 'horizontal' | 'vertical';
|
|
4
|
+
loop?: boolean;
|
|
5
|
+
autoplay?: number;
|
|
6
|
+
showArrows?: boolean;
|
|
7
|
+
showIndicators?: boolean;
|
|
8
|
+
pauseOnHover?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
12
|
+
readonly "onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
13
|
+
readonly onChange?: ((index: number) => any) | undefined;
|
|
14
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & ({
|
|
15
|
+
modelValue?: number;
|
|
16
|
+
} & UidCarouselProps<T>) & Partial<{}>> & import('vue').PublicProps;
|
|
17
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
18
|
+
next: () => void;
|
|
19
|
+
prev: () => void;
|
|
20
|
+
goTo: (index: number, instant?: boolean) => void;
|
|
21
|
+
}>): void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: Readonly<{
|
|
24
|
+
default(props: {
|
|
25
|
+
item: T;
|
|
26
|
+
index: number;
|
|
27
|
+
}): unknown;
|
|
28
|
+
}> & {
|
|
29
|
+
default(props: {
|
|
30
|
+
item: T;
|
|
31
|
+
index: number;
|
|
32
|
+
}): unknown;
|
|
33
|
+
};
|
|
34
|
+
emit: ((evt: "change", index: number) => void) & ((evt: "update:modelValue", value: number) => void);
|
|
35
|
+
}>) => import('vue').VNode & {
|
|
36
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_PrettifyLocal<T> = {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} & {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type CascaderValue = string | number;
|
|
2
|
+
export interface CascaderOption {
|
|
3
|
+
value: CascaderValue;
|
|
4
|
+
label: string;
|
|
5
|
+
children?: CascaderOption[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface UidCascaderProps {
|
|
9
|
+
options: CascaderOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
separator?: string;
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
hint?: string;
|
|
16
|
+
expandTrigger?: 'click' | 'hover';
|
|
17
|
+
}
|
|
18
|
+
type __VLS_Props = UidCascaderProps;
|
|
19
|
+
type __VLS_PublicProps = {
|
|
20
|
+
modelValue?: CascaderValue[];
|
|
21
|
+
} & __VLS_Props;
|
|
22
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
+
"update:modelValue": (value: CascaderValue[]) => any;
|
|
24
|
+
change: (value: CascaderValue[], path: CascaderOption[]) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: CascaderValue[]) => any) | undefined;
|
|
27
|
+
onChange?: ((value: CascaderValue[], path: CascaderOption[]) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
separator: string;
|
|
31
|
+
clearable: boolean;
|
|
32
|
+
expandTrigger: "click" | "hover";
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
|
+
containerRef: HTMLDivElement;
|
|
35
|
+
}, HTMLDivElement>;
|
|
36
|
+
export default _default;
|
|
@@ -37,8 +37,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
37
37
|
filter: (option: ComboboxOption, query: string) => boolean;
|
|
38
38
|
required: boolean;
|
|
39
39
|
disabled: boolean;
|
|
40
|
-
placeholder: string;
|
|
41
|
-
emptyText: string;
|
|
42
40
|
clearable: boolean;
|
|
43
41
|
allowCreate: boolean;
|
|
44
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -17,10 +17,10 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
17
17
|
disabled: boolean;
|
|
18
18
|
min: string;
|
|
19
19
|
max: string;
|
|
20
|
-
placeholder: string;
|
|
21
20
|
format: (date: Date) => string;
|
|
22
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
22
|
containerRef: HTMLDivElement;
|
|
24
23
|
triggerRef: HTMLDivElement;
|
|
24
|
+
gridRef: HTMLDivElement;
|
|
25
25
|
}, HTMLDivElement>;
|
|
26
26
|
export default _default;
|
|
@@ -24,7 +24,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
24
24
|
disabled: boolean;
|
|
25
25
|
min: string;
|
|
26
26
|
max: string;
|
|
27
|
-
placeholder: string;
|
|
28
27
|
format: (date: Date) => string;
|
|
29
28
|
clearable: boolean;
|
|
30
29
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -38,8 +38,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
38
38
|
accept: string;
|
|
39
39
|
maxSize: number;
|
|
40
40
|
maxFiles: number;
|
|
41
|
-
primaryText: string;
|
|
42
|
-
secondaryText: string;
|
|
43
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
42
|
inputRef: HTMLInputElement;
|
|
45
43
|
}, HTMLDivElement>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UidLocale, UidPartialLocale } from '../../locales/types.js';
|
|
2
|
+
export interface UidLocaleProviderProps {
|
|
3
|
+
locale?: UidLocale | UidPartialLocale;
|
|
4
|
+
}
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): unknown;
|
|
9
|
+
}> & {
|
|
10
|
+
default(): unknown;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<UidLocaleProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidLocaleProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface MentionOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UidMentionProps {
|
|
7
|
+
options: MentionOption[];
|
|
8
|
+
prefix?: string | string[];
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
rows?: number;
|
|
12
|
+
label?: string;
|
|
13
|
+
emptyText?: string;
|
|
14
|
+
filter?: (option: MentionOption, query: string) => boolean;
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Props = UidMentionProps;
|
|
17
|
+
type __VLS_PublicProps = {
|
|
18
|
+
modelValue?: string;
|
|
19
|
+
} & __VLS_Props;
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
select: (option: MentionOption, prefix: string) => any;
|
|
22
|
+
"update:modelValue": (value: string) => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
|
|
25
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
filter: (option: MentionOption, query: string) => boolean;
|
|
28
|
+
rows: number;
|
|
29
|
+
prefix: string | string[];
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
fieldRef: HTMLTextAreaElement;
|
|
32
|
+
}, HTMLDivElement>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type BadgePlacement = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
2
|
+
export type BadgeTone = 'danger' | 'primary' | 'success' | 'warning' | 'info';
|
|
3
|
+
export interface UidNotificationBadgeProps {
|
|
4
|
+
count?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
dot?: boolean;
|
|
7
|
+
showZero?: boolean;
|
|
8
|
+
placement?: BadgePlacement;
|
|
9
|
+
tone?: BadgeTone;
|
|
10
|
+
offset?: [number, number];
|
|
11
|
+
}
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: Readonly<{
|
|
15
|
+
default?(): unknown;
|
|
16
|
+
}> & {
|
|
17
|
+
default?(): unknown;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: HTMLSpanElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<UidNotificationBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UidNotificationBadgeProps> & Readonly<{}>, {
|
|
24
|
+
max: number;
|
|
25
|
+
dot: boolean;
|
|
26
|
+
placement: BadgePlacement;
|
|
27
|
+
tone: BadgeTone;
|
|
28
|
+
count: number;
|
|
29
|
+
showZero: boolean;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -25,7 +25,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
25
25
|
}>, {
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
disabled: boolean;
|
|
28
|
-
placeholder: string;
|
|
29
28
|
searchable: boolean;
|
|
30
29
|
clearable: boolean;
|
|
31
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type TourPlacement = 'top' | 'right' | 'bottom' | 'left' | 'center';
|
|
2
|
+
export interface TourStep {
|
|
3
|
+
target?: string | HTMLElement | (() => HTMLElement | null) | null;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
placement?: TourPlacement;
|
|
7
|
+
}
|
|
8
|
+
export interface UidTourProps {
|
|
9
|
+
steps: TourStep[];
|
|
10
|
+
maskClosable?: boolean;
|
|
11
|
+
showSkip?: boolean;
|
|
12
|
+
showProgress?: boolean;
|
|
13
|
+
nextText?: string;
|
|
14
|
+
prevText?: string;
|
|
15
|
+
finishText?: string;
|
|
16
|
+
skipText?: string;
|
|
17
|
+
}
|
|
18
|
+
type __VLS_Props = UidTourProps;
|
|
19
|
+
type __VLS_PublicProps = {
|
|
20
|
+
modelValue?: boolean;
|
|
21
|
+
'current'?: number;
|
|
22
|
+
} & __VLS_Props;
|
|
23
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: boolean) => any;
|
|
25
|
+
change: (index: number) => any;
|
|
26
|
+
close: () => any;
|
|
27
|
+
finish: () => any;
|
|
28
|
+
"update:current": (value: number) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
onChange?: ((index: number) => any) | undefined;
|
|
32
|
+
onClose?: (() => any) | undefined;
|
|
33
|
+
onFinish?: (() => any) | undefined;
|
|
34
|
+
"onUpdate:current"?: ((value: number) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
maskClosable: boolean;
|
|
37
|
+
showSkip: boolean;
|
|
38
|
+
showProgress: boolean;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
40
|
+
popoverRef: HTMLDivElement;
|
|
41
|
+
}, any>;
|
|
42
|
+
export default _default;
|