@huntflow/ui 0.0.17 → 0.0.18

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 CHANGED
@@ -4,6 +4,11 @@
4
4
  <img alt="" src="https://img.shields.io/npm/dm/@huntflow/ui.svg" />
5
5
  </a>
6
6
 
7
+ <a href="https://deno.bundlejs.com/badge?q=@huntflow/ui@0.0.17&treeshake=[*]" target="\_parent">
8
+ <img alt="" src="https://deno.bundlejs.com/badge?q=@huntflow/ui@0.0.17&treeshake=[*]" />
9
+ </a>
10
+
11
+
7
12
  **@huntflow/ui** — это библиотека компонентов, предназначенная для создания удобных, масштабируемых и согласованных пользовательских интерфейсов. Проект ориентирован на упрощение разработки и поддержания единого стиля интерфейса во всех продуктах компании.
8
13
 
9
14
  ## 🚀 Основные возможности
@@ -21,6 +26,12 @@
21
26
  npm install @huntflow/ui
22
27
  ```
23
28
 
29
+ ## 📚 Storybook
30
+
31
+ ```javascript
32
+ npm run storybook
33
+ ```
34
+
24
35
  ## Пример использования
25
36
  ```javascript
26
37
 
@@ -0,0 +1,31 @@
1
+ import { BaseButtonProps } from './types';
2
+ declare function __VLS_template(): {
3
+ slots: {
4
+ leftIcon?(_: {
5
+ icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
6
+ [key: string]: any;
7
+ }>;
8
+ }): any;
9
+ default?(_: {}): any;
10
+ rightIcon?(_: {
11
+ icon: import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
12
+ [key: string]: any;
13
+ }>;
14
+ }): any;
15
+ };
16
+ refs: {};
17
+ attrs: Partial<{}>;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<BaseButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
+ click: () => any;
22
+ }, string, import('vue').PublicProps, Readonly<BaseButtonProps> & Readonly<{
23
+ onClick?: (() => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,35 @@
1
+ import { VNode } from 'vue';
2
+ export type BaseButtonProps = {
3
+ size?: ButtonSize;
4
+ className?: string;
5
+ type?: ButtonType;
6
+ leftIcon?: VNode;
7
+ rightIcon?: VNode;
8
+ block?: boolean;
9
+ disabled?: boolean;
10
+ loading?: boolean;
11
+ active?: boolean;
12
+ name?: string;
13
+ circle?: boolean;
14
+ bordered?: boolean;
15
+ htmlType?: ButtonHTMLType;
16
+ };
17
+ export declare enum ButtonSize {
18
+ XS = "xs",
19
+ S = "s",
20
+ M = "m",
21
+ L = "l",
22
+ XL = "xl"
23
+ }
24
+ export declare enum ButtonType {
25
+ PRIMARY = "primary",
26
+ DANGER = "danger",
27
+ DEFAULT = "default",
28
+ TEXT = "text",
29
+ LINK = "link"
30
+ }
31
+ export declare enum ButtonHTMLType {
32
+ SUBMIT = "submit",
33
+ BUTTON = "button",
34
+ RESET = "reset"
35
+ }
@@ -0,0 +1,28 @@
1
+ import { BaseInputProps } from './types.ts';
2
+ declare let __VLS_typeProps: BaseInputProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: string;
5
+ } & typeof __VLS_typeProps;
6
+ declare function __VLS_template(): {
7
+ slots: {
8
+ prefix?(_: {}): any;
9
+ suffix?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ attrs: Partial<{}>;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "update:modelValue": (...args: any[]) => void;
17
+ enter: (...args: any[]) => void;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
20
+ onEnter?: ((...args: any[]) => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
+ export default _default;
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,27 @@
1
+ export type BaseInputProps = {
2
+ value: string;
3
+ type?: InputType;
4
+ id?: string;
5
+ name?: string;
6
+ disabled?: boolean;
7
+ label?: string;
8
+ placeholder?: string;
9
+ loading?: boolean;
10
+ error?: string | null | void;
11
+ size?: InputSize;
12
+ className?: string;
13
+ };
14
+ export declare enum InputSize {
15
+ XS = "xs",
16
+ S = "s",
17
+ M = "m",
18
+ L = "l",
19
+ XL = "xl"
20
+ }
21
+ export declare enum InputType {
22
+ TEXT = "text",
23
+ PASSWORD = "password",
24
+ EMAIL = "email",
25
+ TEL = "tel",
26
+ SEARCH = "search"
27
+ }
package/dist/main.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- export * as styles from './global.css';
2
- export { default as TestButton } from './components/TestButton/TestButton.vue';
1
+ export { default as BaseInput } from './components/input/input.vue';
2
+ export { type BaseInputProps } from './components/input/types.ts';
3
+ export { default as BaseButton } from './components/button/button.vue';
4
+ export { type BaseButtonProps } from './components/button/types.ts';