@pksep/yui 0.1.314 → 0.1.316
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 +83 -83
- package/dist/components/ContentEditor/ContentEditorColorPicker.vue.d.ts +28 -0
- package/dist/components/ContentEditor/EmojiPickerPanel.vue.d.ts +8 -0
- package/dist/components/ContentEditor/emoji-picker-config.d.ts +45 -0
- package/dist/components/Icon/enum/enum.d.ts +14 -1
- package/dist/components/Icon/icons.d.ts +13 -0
- package/dist/components/Preview/PdfPreview.vue.d.ts +17 -3
- package/dist/components/Preview/interface/index.d.ts +1 -0
- package/dist/components/Slider/interface/interface.d.ts +2 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/sep-yui.mjs +27218 -25976
- package/dist/sep-yui.umd.cjs +438 -407
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
# SEP-YUI
|
|
2
|
-
|
|
3
|
-
**SEP-YUI** — библиотека UI-компонентов для Vue, созданная для решения задачи удобного переиспользования интерфейсных элементов между проектами.
|
|
4
|
-
Она позволяет использовать единый набор UI-решений, снижает связанность компонентов и упрощает поддержку.
|
|
5
|
-
|
|
6
|
-
## Основные преимущества
|
|
7
|
-
|
|
8
|
-
- Лёгкая интеграция в существующие проекты
|
|
9
|
-
- Низкий порог входа
|
|
10
|
-
- Гибкость и кастомизация
|
|
11
|
-
- Регулярные обновления и техническая поддержка
|
|
12
|
-
- Возможность комбинирования компонентов внутри проекта
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Установка и подключение
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
bun add @pksep/yui
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
#### 1. Для использования библиотеки в проекте, необходимо импортировать компоненты библиотеки в главный файл проекта main.ts таким образом:
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
main.ts;
|
|
26
|
-
import Ylibrary from '@pksep/yui';
|
|
27
|
-
app.use(Ylibrary);
|
|
28
|
-
app.mount('#app');
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
#### 1.1 Для выборочного импорта компонентов, можно использовать подключение такого вида.
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
main.ts;
|
|
35
|
-
import { Toggle } from '@pksep/yui';
|
|
36
|
-
app.component('Toggle', Toggle);
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
#### 2. Стили импортируются через путь "@pksep/yui/styles" также в файле main.ts
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
main.ts;
|
|
43
|
-
import '@pksep/yui/styles';
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Стили библиотеки подключаются отдельно от JavaScript и уже содержат используемые
|
|
47
|
-
шрифты Inter Variable и Source Sans Pro. Если проект переопределяет токены или
|
|
48
|
-
стили компонентов, импортируйте собственный stylesheet после `@pksep/yui/styles`.
|
|
49
|
-
|
|
50
|
-
#### 3. Далее просто пишем название компонента внутри проекта и используем как при обычной разработке на Vue.
|
|
51
|
-
|
|
52
|
-
```vue
|
|
53
|
-
App.vue
|
|
54
|
-
<template>
|
|
55
|
-
<Toggle :disabled="true" :backgroundColor="'red'" />
|
|
56
|
-
</template>
|
|
57
|
-
<script setup lang="ts"></script>
|
|
58
|
-
<styles scoped></styles>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Примеры и Storybook
|
|
65
|
-
|
|
66
|
-
Документация и примеры компонентов:
|
|
67
|
-
|
|
68
|
-
➡️ https://pksep.github.io/sep_yui
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Разработка
|
|
73
|
-
|
|
74
|
-
### Публикация пакетов
|
|
75
|
-
|
|
76
|
-
Обязательно через команду, так как генерятся changelog. Для этого используем:
|
|
77
|
-
[changeloggen](https://unjs.io/packages/changelogen/)
|
|
78
|
-
|
|
79
|
-
```sh
|
|
80
|
-
bun run publish:lib
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Токен можно для публикации можно получить у менеджера.
|
|
1
|
+
# SEP-YUI
|
|
2
|
+
|
|
3
|
+
**SEP-YUI** — библиотека UI-компонентов для Vue, созданная для решения задачи удобного переиспользования интерфейсных элементов между проектами.
|
|
4
|
+
Она позволяет использовать единый набор UI-решений, снижает связанность компонентов и упрощает поддержку.
|
|
5
|
+
|
|
6
|
+
## Основные преимущества
|
|
7
|
+
|
|
8
|
+
- Лёгкая интеграция в существующие проекты
|
|
9
|
+
- Низкий порог входа
|
|
10
|
+
- Гибкость и кастомизация
|
|
11
|
+
- Регулярные обновления и техническая поддержка
|
|
12
|
+
- Возможность комбинирования компонентов внутри проекта
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Установка и подключение
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bun add @pksep/yui
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
#### 1. Для использования библиотеки в проекте, необходимо импортировать компоненты библиотеки в главный файл проекта main.ts таким образом:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
main.ts;
|
|
26
|
+
import Ylibrary from '@pksep/yui';
|
|
27
|
+
app.use(Ylibrary);
|
|
28
|
+
app.mount('#app');
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### 1.1 Для выборочного импорта компонентов, можно использовать подключение такого вида.
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
main.ts;
|
|
35
|
+
import { Toggle } from '@pksep/yui';
|
|
36
|
+
app.component('Toggle', Toggle);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### 2. Стили импортируются через путь "@pksep/yui/styles" также в файле main.ts
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
main.ts;
|
|
43
|
+
import '@pksep/yui/styles';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Стили библиотеки подключаются отдельно от JavaScript и уже содержат используемые
|
|
47
|
+
шрифты Inter Variable и Source Sans Pro. Если проект переопределяет токены или
|
|
48
|
+
стили компонентов, импортируйте собственный stylesheet после `@pksep/yui/styles`.
|
|
49
|
+
|
|
50
|
+
#### 3. Далее просто пишем название компонента внутри проекта и используем как при обычной разработке на Vue.
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
App.vue
|
|
54
|
+
<template>
|
|
55
|
+
<Toggle :disabled="true" :backgroundColor="'red'" />
|
|
56
|
+
</template>
|
|
57
|
+
<script setup lang="ts"></script>
|
|
58
|
+
<styles scoped></styles>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Примеры и Storybook
|
|
65
|
+
|
|
66
|
+
Документация и примеры компонентов:
|
|
67
|
+
|
|
68
|
+
➡️ https://pksep.github.io/sep_yui
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Разработка
|
|
73
|
+
|
|
74
|
+
### Публикация пакетов
|
|
75
|
+
|
|
76
|
+
Обязательно через команду, так как генерятся changelog. Для этого используем:
|
|
77
|
+
[changeloggen](https://unjs.io/packages/changelogen/)
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
bun run publish:lib
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Токен можно для публикации можно получить у менеджера.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface ContentEditorColorOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
colors: ContentEditorColorOption[];
|
|
7
|
+
activeTextColor?: string | null;
|
|
8
|
+
activeBackgroundColor?: string | null;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"select-text-color": (color: string) => void;
|
|
12
|
+
"select-background-color": (color: string) => void;
|
|
13
|
+
"reset-colors": () => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
15
|
+
"onSelect-text-color"?: ((color: string) => any) | undefined;
|
|
16
|
+
"onSelect-background-color"?: ((color: string) => any) | undefined;
|
|
17
|
+
"onReset-colors"?: (() => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EmojiPickerSelection } from './emoji-picker-config';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
select: (emoji: EmojiPickerSelection) => void;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
6
|
+
onSelect?: ((emoji: EmojiPickerSelection) => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type EmojiPickerSelection = {
|
|
2
|
+
i: string;
|
|
3
|
+
n?: string[];
|
|
4
|
+
r?: string;
|
|
5
|
+
u?: string;
|
|
6
|
+
};
|
|
7
|
+
export type RecentEmoji = {
|
|
8
|
+
n: string[];
|
|
9
|
+
u: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const emojiAdditionalGroups: Record<'recent', RecentEmoji[]>;
|
|
12
|
+
export declare const rememberEmojiSelection: (emoji: EmojiPickerSelection) => void;
|
|
13
|
+
export declare const emojiGroupIcons: {
|
|
14
|
+
recent: string;
|
|
15
|
+
smileys_people: string;
|
|
16
|
+
animals_nature: string;
|
|
17
|
+
food_drink: string;
|
|
18
|
+
activities: string;
|
|
19
|
+
symbols: string;
|
|
20
|
+
objects: string;
|
|
21
|
+
flags: string;
|
|
22
|
+
travel_places: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const emojiPickerStyle: {
|
|
25
|
+
'--emoji-recent-icon': string;
|
|
26
|
+
};
|
|
27
|
+
export declare const emojiGroupNames: {
|
|
28
|
+
recent: string;
|
|
29
|
+
smileys_people: string;
|
|
30
|
+
animals_nature: string;
|
|
31
|
+
food_drink: string;
|
|
32
|
+
activities: string;
|
|
33
|
+
symbols: string;
|
|
34
|
+
objects: string;
|
|
35
|
+
flags: string;
|
|
36
|
+
travel_places: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const emojiGroupOrder: Array<keyof typeof emojiGroupNames>;
|
|
39
|
+
export declare const emojiStaticTexts: {
|
|
40
|
+
placeholder: string;
|
|
41
|
+
skinTone: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const syncEmojiGroupControls: (pickerRoot: HTMLElement) => void;
|
|
44
|
+
export declare const resetEmojiGroupRendering: (pickerRoot: HTMLElement) => void;
|
|
45
|
+
export declare const syncEmojiGroupScroll: (event: Event) => void;
|
|
@@ -162,5 +162,18 @@ export declare enum IconNameEnum {
|
|
|
162
162
|
connection = "connection",
|
|
163
163
|
tableError = "table-error",
|
|
164
164
|
rearrange = "rearrange",
|
|
165
|
-
checked = "checked"
|
|
165
|
+
checked = "checked",
|
|
166
|
+
hand = "hand",
|
|
167
|
+
checkCircle = "check-circle",
|
|
168
|
+
lightning = "lightning",
|
|
169
|
+
emojiRecent = "emoji-recent",
|
|
170
|
+
emojiSmileysPeople = "emoji-smileys-people",
|
|
171
|
+
emojiAnimalsNature = "emoji-animals-nature",
|
|
172
|
+
emojiFoodDrink = "emoji-food-drink",
|
|
173
|
+
emojiActivities = "emoji-activities",
|
|
174
|
+
emojiSymbols = "emoji-symbols",
|
|
175
|
+
emojiObjects = "emoji-objects",
|
|
176
|
+
emojiFlags = "emoji-flags",
|
|
177
|
+
emojiTravelPlaces = "emoji-travel-places",
|
|
178
|
+
lightbulbFilament = "lightbulb-filament"
|
|
166
179
|
}
|
|
@@ -176,3 +176,16 @@ export declare const colorPicker: IVectorIcon;
|
|
|
176
176
|
export declare const connection: IVectorIcon;
|
|
177
177
|
export declare const tableError: IVectorIcon;
|
|
178
178
|
export declare const rearrange: IVectorIcon;
|
|
179
|
+
export declare const hand: IVectorIcon;
|
|
180
|
+
export declare const checkCircle: IVectorIcon;
|
|
181
|
+
export declare const lightning: IVectorIcon;
|
|
182
|
+
export declare const emojiRecent: IVectorIcon;
|
|
183
|
+
export declare const emojiSmileysPeople: IVectorIcon;
|
|
184
|
+
export declare const emojiAnimalsNature: IVectorIcon;
|
|
185
|
+
export declare const emojiFoodDrink: IVectorIcon;
|
|
186
|
+
export declare const emojiActivities: IVectorIcon;
|
|
187
|
+
export declare const emojiSymbols: IVectorIcon;
|
|
188
|
+
export declare const emojiObjects: IVectorIcon;
|
|
189
|
+
export declare const emojiFlags: IVectorIcon;
|
|
190
|
+
export declare const emojiTravelPlaces: IVectorIcon;
|
|
191
|
+
export declare const lightbulbFilament: IVectorIcon;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { IPdfPreviewProps } from './interface';
|
|
2
2
|
|
|
3
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps>, {
|
|
4
|
+
resolutionScale: number;
|
|
5
|
+
}>>, {
|
|
4
6
|
clearCanvas: () => void;
|
|
5
7
|
rotatePdf: (deltaAngle: number) => Promise<void>;
|
|
6
8
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
9
|
load: () => void;
|
|
8
10
|
error: (error: unknown) => void;
|
|
9
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps>, {
|
|
12
|
+
resolutionScale: number;
|
|
13
|
+
}>>> & Readonly<{
|
|
10
14
|
onLoad?: (() => any) | undefined;
|
|
11
15
|
onError?: ((error: unknown) => any) | undefined;
|
|
12
|
-
}>, {
|
|
16
|
+
}>, {
|
|
17
|
+
resolutionScale: number;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
19
|
export default _default;
|
|
14
20
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
21
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -20,3 +26,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
20
26
|
required: true;
|
|
21
27
|
};
|
|
22
28
|
};
|
|
29
|
+
type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
@@ -8,11 +8,13 @@ export type SliderPathError = {
|
|
|
8
8
|
export type SliderPath = string | SliderPathError;
|
|
9
9
|
export type SliderItem = {
|
|
10
10
|
path: SliderPath;
|
|
11
|
+
fallbackPath?: string;
|
|
11
12
|
name?: string;
|
|
12
13
|
file?: File;
|
|
13
14
|
};
|
|
14
15
|
export type IFile = {
|
|
15
16
|
path: string;
|
|
17
|
+
fallbackPath?: string;
|
|
16
18
|
name?: string;
|
|
17
19
|
file?: File;
|
|
18
20
|
};
|
|
@@ -48,6 +48,7 @@ import { default as TableSimple } from './Table/TableSimple.vue';
|
|
|
48
48
|
import { default as Avatar } from './Avatar/Avatar.vue';
|
|
49
49
|
import { default as Tabs } from './Tabs/Tabs.vue';
|
|
50
50
|
import { default as ContentEditor } from './ContentEditor/ContentEditor.vue';
|
|
51
|
+
import { default as EmojiPickerPanel } from './ContentEditor/EmojiPickerPanel.vue';
|
|
51
52
|
import { default as ContentEditorFormattingToolbar } from './ContentEditor/ContentEditorFormattingToolbar.vue';
|
|
52
53
|
import { default as ContentEditorSlashMenu } from './ContentEditor/ContentEditorSlashMenu.vue';
|
|
53
54
|
import { default as ModalCroppedAvatar } from './Cropper/ModalCroppedAvatar.vue';
|
|
@@ -81,4 +82,4 @@ declare const _default: {
|
|
|
81
82
|
install: (app: App) => void;
|
|
82
83
|
};
|
|
83
84
|
export default _default;
|
|
84
|
-
export { Accordion, Badges, BreadCrumbs, Button, Dialog, Card, Calendar, DragAndDrop, Switch, SelectList, Dropdown, Textarea, Filter, Icon, Input, Combobox, InputNumber, Search, PushNotification, Picture, Scroll, Modal, Slider, Checkbox, Toggle, UserMenu, CopyIcon, Loader, FilterTag, CircularProgress, Popover, Table, TableSimple, TableNew, TableRow, TableRowNew, TableTd, TableTh, SectionTableRow, HeadTableRow, HeadTableRowNew, ScrollWrapper, Radio, Tooltip, BaseFilter, Range, Avatar, Tabs, ContentEditor, ContentEditorFormattingToolbar, ContentEditorSlashMenu, ModalCroppedAvatar, TimePicker, type IDialogProps, type IRangeForDatePicker, type OptionsObject, type IDataTestIdProp, type IContentEditorSlashMenuItem, type IContentEditorProps, type IContentEditorSendPayload, type IContentEditorSlots, CheckboxSizeEnum, CheckboxCircularEnum, TextFieldEnum, IconNameEnum, SizesEnum, ButtonTypeEnum, ColorsEnum, ImageExtensionsEnum, BadgesTypeEnum, VideoExtensionsEnum, InputTypeEnum, TextareaTypeEnum, MenuTypeEnum, MessageTypeEnum, getLastTime, getFirstTime, vuePluginRemoveTestid, SliderModal, PdfPreview, ImagePreview, VideoPreview, Skeleton };
|
|
85
|
+
export { Accordion, Badges, BreadCrumbs, Button, Dialog, Card, Calendar, DragAndDrop, Switch, SelectList, Dropdown, Textarea, Filter, Icon, Input, Combobox, InputNumber, Search, PushNotification, Picture, Scroll, Modal, Slider, Checkbox, Toggle, UserMenu, CopyIcon, Loader, FilterTag, CircularProgress, Popover, Table, TableSimple, TableNew, TableRow, TableRowNew, TableTd, TableTh, SectionTableRow, HeadTableRow, HeadTableRowNew, ScrollWrapper, Radio, Tooltip, BaseFilter, Range, Avatar, Tabs, ContentEditor, EmojiPickerPanel, ContentEditorFormattingToolbar, ContentEditorSlashMenu, ModalCroppedAvatar, TimePicker, type IDialogProps, type IRangeForDatePicker, type OptionsObject, type IDataTestIdProp, type IContentEditorSlashMenuItem, type IContentEditorProps, type IContentEditorSendPayload, type IContentEditorSlots, CheckboxSizeEnum, CheckboxCircularEnum, TextFieldEnum, IconNameEnum, SizesEnum, ButtonTypeEnum, ColorsEnum, ImageExtensionsEnum, BadgesTypeEnum, VideoExtensionsEnum, InputTypeEnum, TextareaTypeEnum, MenuTypeEnum, MessageTypeEnum, getLastTime, getFirstTime, vuePluginRemoveTestid, SliderModal, PdfPreview, ImagePreview, VideoPreview, Skeleton };
|