@huntflow/ui 0.3.5 → 0.3.7

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.
@@ -35,7 +35,11 @@ export { UiDropzone } from './ui-dropzone';
35
35
  export type { UiDropzoneProps } from './ui-dropzone';
36
36
  export { UiDropdown } from './ui-dropdown';
37
37
  export type { UiDropdownProps, UiDropdownSide, UiDropdownAlign } from './ui-dropdown';
38
+ export { UiModal } from './ui-modal';
39
+ export type { UiModalProps } from './ui-modal';
38
40
  export { UiTabs } from './ui-tabs';
39
41
  export type { UiTabsProps, UiTabsValue, UiTabsItem } from './ui-tabs';
40
42
  export { UiPaginationDots } from './ui-pagination-dots';
41
43
  export type { UiPaginationDotsProps } from './ui-pagination-dots';
44
+ export { UiBadge } from './ui-badge';
45
+ export type { UiBadgeProps } from './ui-badge';
@@ -8,7 +8,13 @@ declare function __VLS_template(): {
8
8
  rootEl: HTMLDivElement;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<UiAvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiAvatarProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ declare const __VLS_component: import('vue').DefineComponent<UiAvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ error: () => any;
13
+ load: () => any;
14
+ }, string, import('vue').PublicProps, Readonly<UiAvatarProps> & Readonly<{
15
+ onError?: (() => any) | undefined;
16
+ onLoad?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
12
18
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
19
  export default _default;
14
20
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -4,6 +4,6 @@ export type UiAvatarProps = {
4
4
  /** Размер аватара. */
5
5
  size?: UiAvatarSize;
6
6
  /** Квадратная форма аватара. */
7
- square?: boolean;
7
+ squared?: boolean;
8
8
  };
9
- export type UiAvatarSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl';
9
+ export type UiAvatarSize = '4xs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | '3xl';
@@ -0,0 +1 @@
1
+ export declare const badgeCodeSnippet = "<script setup lang=\"ts\">\nimport { UiBadge } from '@huntflow/ui';\n</script>\n\n<template>\n <ui-badge\n color=\"grey\"\n size=\"xs\"\n >\n BadgeText\n </ui-badge>\n</template>";
@@ -0,0 +1,18 @@
1
+ import { UiBadgeProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<UiBadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiBadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,3 @@
1
+ import { default as UiBadge } from './badge.vue';
2
+ export type { UiBadgeProps, UiBadgeColor, UiBadgeSize } from './types';
3
+ export { UiBadge };
@@ -0,0 +1,14 @@
1
+ export type UiBadgeProps = {
2
+ /** Тег, которым будет отрендерен бейдж. */
3
+ tagName?: string;
4
+ /** Текст бейджа */
5
+ label?: string | number;
6
+ /** Цвет бейджа. */
7
+ color?: UiBadgeColor;
8
+ /** Включает заливку. */
9
+ fill?: boolean;
10
+ /** Размер бейджа. */
11
+ size?: UiBadgeSize;
12
+ };
13
+ export type UiBadgeColor = 'grey' | 'cyan' | 'green' | 'red' | 'orange' | 'marketing' | 'light';
14
+ export type UiBadgeSize = 'xs' | 's';
@@ -0,0 +1,4 @@
1
+ import { default as UiModal } from './modal.vue';
2
+ import { default as UiModalLayout } from './layout.vue';
3
+ export type { UiModalProps } from './types';
4
+ export { UiModal, UiModalLayout };
@@ -0,0 +1,25 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ description?: string;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ title?(_: {}): any;
9
+ description?(_: {}): any;
10
+ main?(_: {}): any;
11
+ default?(_: {}): any;
12
+ footer?(_: {}): any;
13
+ };
14
+ refs: {};
15
+ rootEl: HTMLDivElement;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1 @@
1
+ export declare const modalCodeSnippet = "<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { UiButton, UiModal } from '@huntflow/ui';\n\nconst isOpen = ref(false);\n</script>\n\n<template>\n <ui-button\n type=\"primary\"\n size=\"s\"\n @click=\"isOpen = true\"\n >\n \u041E\u0442\u043A\u0440\u044B\u0442\u044C\n </ui-button>\n\n <ui-modal\n v-model:open=\"isOpen\"\n title=\"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A\"\n description=\"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043E\u043A\u043D\u0430\"\n >\n <template #body=\"{ setDirty }\">\n \u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 modal\n </template>\n\n <template #footer=\"{ dismiss }\">\n <ui-button\n type=\"secondary\"\n size=\"s\"\n @click=\"dismiss\"\n >\n \u041E\u0442\u043C\u0435\u043D\u0430\n </ui-button>\n <ui-button\n type=\"primary\"\n size=\"s\"\n @click=\"dismiss\"\n >\n \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n </ui-button>\n </template>\n </ui-modal>\n</template>";
@@ -0,0 +1,61 @@
1
+ import { UiModalProps } from './types';
2
+ type __VLS_Props = UiModalProps;
3
+ type __VLS_PublicProps = {
4
+ 'open'?: boolean;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ title?(_: {}): any;
10
+ description?(_: {}): any;
11
+ body?(_: {
12
+ open: boolean;
13
+ setDirty: (value: boolean) => void;
14
+ isDismissing: boolean;
15
+ resolveDismissing: (value: boolean) => void;
16
+ dismiss: () => Promise<void>;
17
+ }): any;
18
+ default?(_: {
19
+ open: boolean;
20
+ setDirty: (value: boolean) => void;
21
+ isDismissing: boolean;
22
+ resolveDismissing: (value: boolean) => void;
23
+ dismiss: () => Promise<void>;
24
+ }): any;
25
+ default?(_: {
26
+ open: boolean;
27
+ setDirty: (value: boolean) => void;
28
+ isDismissing: boolean;
29
+ resolveDismissing: (value: boolean) => void;
30
+ dismiss: () => Promise<void>;
31
+ }): any;
32
+ footer?(_: {
33
+ dismiss: () => Promise<void>;
34
+ }): any;
35
+ confirm?(_: {
36
+ open: boolean;
37
+ setDirty: (value: boolean) => void;
38
+ isDismissing: boolean;
39
+ resolveDismissing: (value: boolean) => void;
40
+ dismiss: () => Promise<void>;
41
+ }): any;
42
+ 'floating-root'?(_: {
43
+ setFloatingRoot: (value: HTMLElement | undefined) => void;
44
+ }): any;
45
+ };
46
+ refs: {};
47
+ rootEl: any;
48
+ };
49
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
50
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
51
+ "update:open": (value: boolean) => any;
52
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
53
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
54
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
55
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
56
+ export default _default;
57
+ type __VLS_WithTemplateSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ confirmationText: string;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ resolve: (value: boolean) => any;
6
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onResolve?: ((value: boolean) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ export default _default;
@@ -0,0 +1,16 @@
1
+ export type UiModalSize = 'm' | 'l';
2
+ export type UiModalBeforeClose = () => boolean | Promise<boolean>;
3
+ export type UiModalProps = {
4
+ /** Состояние открытия modal. Используется с v-model:open. */
5
+ open?: boolean;
6
+ /** Размер modal. */
7
+ size?: UiModalSize;
8
+ /** Заголовок modal. */
9
+ title?: string;
10
+ /** Описание modal. */
11
+ description?: string;
12
+ /** Хук перед закрытием модального окна. Возврат false отменяет закрытие. */
13
+ beforeClose?: UiModalBeforeClose;
14
+ /** Текст нативного подтверждения при закрытии modal с несохраненными изменениями. */
15
+ confirmationText?: string;
16
+ };