@huntflow/ui 0.3.8 → 0.3.10-beta.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.
@@ -5,7 +5,7 @@ export { UiButtonLink } from './ui-button-link';
5
5
  export { UiIcon, injectSvgSprite } from './ui-icon';
6
6
  export type { UiIconProps, IconType } from './ui-icon';
7
7
  export { UiInput } from './ui-input';
8
- export type { UiInputProps } from './ui-input';
8
+ export type { UiInputProps, UiInputSize } from './ui-input';
9
9
  export { UiLabel } from './ui-label';
10
10
  export { UiLoader } from './ui-loader';
11
11
  export type { UiLoaderSize } from './ui-loader';
@@ -32,6 +32,6 @@ export type UiButtonProps = {
32
32
  fill?: boolean;
33
33
  };
34
34
  export type UiButtonWeight = 'regular' | 'medium';
35
- export type UiButtonSize = 's' | 'xs' | 'm' | 'l' | 'xl';
35
+ export type UiButtonSize = 's' | 'xs' | 'm' | 'l' | 'xl' | 'xxl';
36
36
  export type UiButtonType = 'primary' | 'secondary' | 'accent' | 'jobsites' | 'ghost' | 'ghost-danger' | 'danger' | 'transparent-dark' | 'transparent-secondary' | 'text-primary' | 'text-secondary';
37
37
  export type UiButtonHTMLType = 'button' | 'submit' | 'reset';
@@ -1,4 +1,3 @@
1
- import { UiErrorProps } from './types';
2
1
  declare function __VLS_template(): {
3
2
  attrs: Partial<{}>;
4
3
  slots: {
@@ -8,7 +7,7 @@ declare function __VLS_template(): {
8
7
  rootEl: HTMLSpanElement;
9
8
  };
10
9
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<UiErrorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UiErrorProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
12
11
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
12
  export default _default;
14
13
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,3 +1 @@
1
- export type UiErrorProps = {
2
- className?: string;
3
- };
1
+ export type UiErrorProps = Record<string, never>;
@@ -1,3 +1,3 @@
1
1
  import { default as UiInput } from './input.vue';
2
- export type { UiInputProps } from './types';
2
+ export type { UiInputProps, UiInputSize } from './types';
3
3
  export { UiInput };
@@ -1,4 +1,5 @@
1
1
  import { IconType } from '../index';
2
+ export type UiInputSize = 's' | 'm';
2
3
  export type UiInputProps = {
3
4
  /** Тип нативного input. */
4
5
  type?: UiInputType;
@@ -30,5 +31,7 @@ export type UiInputProps = {
30
31
  rightIcon?: IconType;
31
32
  /** включение автофокуса на поле */
32
33
  autofocus?: boolean;
34
+ /** Размер input. */
35
+ size?: UiInputSize;
33
36
  };
34
37
  export type UiInputType = 'text' | 'password' | 'email' | 'tel' | 'search';
@@ -1,14 +1,19 @@
1
1
  type __VLS_Props = {
2
2
  title?: string;
3
3
  description?: string;
4
+ singleColumn?: boolean;
4
5
  };
5
6
  declare function __VLS_template(): {
6
7
  attrs: Partial<{}>;
7
8
  slots: {
8
9
  title?(_: {}): any;
9
10
  description?(_: {}): any;
11
+ prepend?(_: {}): any;
10
12
  main?(_: {}): any;
11
13
  default?(_: {}): any;
14
+ side?(_: {}): any;
15
+ append?(_: {}): any;
16
+ error?(_: {}): any;
12
17
  footer?(_: {}): any;
13
18
  };
14
19
  refs: {};
@@ -1 +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>";
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 #error>\n \u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F\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>";
@@ -6,14 +6,22 @@ type __VLS_PublicProps = {
6
6
  declare function __VLS_template(): {
7
7
  attrs: Partial<{}>;
8
8
  slots: {
9
- title?(_: {}): any;
10
- description?(_: {}): any;
9
+ loader?(_: {}): any;
10
+ body?(_: {
11
+ open: boolean;
12
+ setDirty: (value: boolean) => void;
13
+ isDismissing: boolean;
14
+ resolveDismissing: (value: boolean) => void;
15
+ dismiss: () => Promise<void>;
16
+ hide: () => void;
17
+ }): any;
11
18
  body?(_: {
12
19
  open: boolean;
13
20
  setDirty: (value: boolean) => void;
14
21
  isDismissing: boolean;
15
22
  resolveDismissing: (value: boolean) => void;
16
23
  dismiss: () => Promise<void>;
24
+ hide: () => void;
17
25
  }): any;
18
26
  default?(_: {
19
27
  open: boolean;
@@ -21,6 +29,7 @@ declare function __VLS_template(): {
21
29
  isDismissing: boolean;
22
30
  resolveDismissing: (value: boolean) => void;
23
31
  dismiss: () => Promise<void>;
32
+ hide: () => void;
24
33
  }): any;
25
34
  default?(_: {
26
35
  open: boolean;
@@ -28,9 +37,25 @@ declare function __VLS_template(): {
28
37
  isDismissing: boolean;
29
38
  resolveDismissing: (value: boolean) => void;
30
39
  dismiss: () => Promise<void>;
40
+ hide: () => void;
31
41
  }): any;
42
+ default?(_: {
43
+ open: boolean;
44
+ setDirty: (value: boolean) => void;
45
+ isDismissing: boolean;
46
+ resolveDismissing: (value: boolean) => void;
47
+ dismiss: () => Promise<void>;
48
+ hide: () => void;
49
+ }): any;
50
+ title?(_: {}): any;
51
+ description?(_: {}): any;
52
+ prepend?(_: {}): any;
53
+ side?(_: {}): any;
54
+ append?(_: {}): any;
55
+ error?(_: {}): any;
32
56
  footer?(_: {
33
57
  dismiss: () => Promise<void>;
58
+ hide: () => void;
34
59
  }): any;
35
60
  confirm?(_: {
36
61
  open: boolean;
@@ -38,6 +63,7 @@ declare function __VLS_template(): {
38
63
  isDismissing: boolean;
39
64
  resolveDismissing: (value: boolean) => void;
40
65
  dismiss: () => Promise<void>;
66
+ hide: () => void;
41
67
  }): any;
42
68
  'floating-root'?(_: {
43
69
  setFloatingRoot: (value: HTMLElement | undefined) => void;
@@ -48,9 +74,13 @@ declare function __VLS_template(): {
48
74
  };
49
75
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
50
76
  declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
51
- "update:open": (value: boolean) => any;
77
+ loading: (...args: any[]) => void;
78
+ loaded: (...args: any[]) => void;
79
+ "update:open": (value: boolean) => void;
52
80
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
81
+ onLoading?: ((...args: any[]) => any) | undefined;
53
82
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
83
+ onLoaded?: ((...args: any[]) => any) | undefined;
54
84
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
55
85
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
56
86
  export default _default;
@@ -1,4 +1,4 @@
1
- export type UiModalSize = 'm' | 'l';
1
+ export type UiModalSize = 'm' | 'l' | 'marketing';
2
2
  export type UiModalBeforeClose = () => boolean | Promise<boolean>;
3
3
  export type UiModalProps = {
4
4
  /** Состояние открытия modal. Используется с v-model:open. */
@@ -9,6 +9,12 @@ export type UiModalProps = {
9
9
  title?: string;
10
10
  /** Описание modal. */
11
11
  description?: string;
12
+ /** Одноколоночный layout без зарезервированной правой колонки. */
13
+ singleColumn?: boolean;
14
+ /** Состояние загрузки. */
15
+ loading?: boolean;
16
+ /** Наличие несохраненных изменений. */
17
+ dirty?: boolean;
12
18
  /** Хук перед закрытием модального окна. Возврат false отменяет закрытие. */
13
19
  beforeClose?: UiModalBeforeClose;
14
20
  /** Текст нативного подтверждения при закрытии modal с несохраненными изменениями. */