@huntflow/ui 0.2.16 → 0.2.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.
@@ -7,14 +7,14 @@ declare function __VLS_template(): {
7
7
  after?(_: {}): any;
8
8
  };
9
9
  refs: {};
10
- rootEl: HTMLButtonElement;
10
+ rootEl: any;
11
11
  };
12
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
13
  declare const __VLS_component: import('vue').DefineComponent<UiButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
14
  click: (event: MouseEvent) => any;
15
15
  }, string, import('vue').PublicProps, Readonly<UiButtonProps> & Readonly<{
16
16
  onClick?: ((event: MouseEvent) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
19
  export default _default;
20
20
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ to?: string;
3
+ disabled?: boolean;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ 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, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -1,6 +1,6 @@
1
+ import { IconBySize } from '../ui-icon';
1
2
  export type UiButtonProps = {
2
3
  size?: UiButtonSize;
3
- className?: string;
4
4
  type?: UiButtonType;
5
5
  disabled?: boolean;
6
6
  loading?: boolean;
@@ -10,6 +10,9 @@ export type UiButtonProps = {
10
10
  circle?: boolean;
11
11
  bordered?: boolean;
12
12
  htmlType?: UiButtonHTMLType;
13
+ to?: string;
14
+ iconBefore?: IconBySize<18> | IconBySize<20>;
15
+ iconAfter?: IconBySize<18> | IconBySize<20>;
13
16
  };
14
17
  export type UiButtonSize = 's' | 'xs' | 'm' | 'l';
15
18
  export type UiButtonType = 'primary' | 'secondary' | 'accent' | 'jobsites' | 'ghost' | 'ghost-danger' | 'danger';
@@ -3,5 +3,5 @@ declare const _default: import('vue').DefineComponent<UiButtonIconProps, {}, {},
3
3
  click: () => any;
4
4
  }, string, import('vue').PublicProps, Readonly<UiButtonIconProps> & Readonly<{
5
5
  onClick?: (() => any) | undefined;
6
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
6
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
7
  export default _default;
@@ -1,5 +1,6 @@
1
+ import { IconBySize } from '../ui-icon';
1
2
  export type UiButtonIconProps = {
2
- icon: string;
3
+ icon: IconBySize<18> | IconBySize<20>;
3
4
  size?: UiButtonIconSize;
4
5
  className?: string;
5
6
  type?: UiButtonIconType;
@@ -1,4 +1,4 @@
1
1
  import { default as UiIcon } from './icon.vue';
2
- export type { UiIconProps, IconType } from './types';
2
+ export type { UiIconProps, IconType, IconBySize } from './types';
3
3
  declare const injectSvgSprite: () => Promise<void>;
4
4
  export { UiIcon, injectSvgSprite };
@@ -1,5 +1,6 @@
1
1
  import { icons } from './icon-list.ts';
2
2
  export type IconType = typeof icons[number];
3
+ export type IconBySize<Size extends number, Icons = IconType> = Icons extends `${infer Icon}-${Size}` ? Icon : never;
3
4
  export type UiIconProps = {
4
5
  name: IconType;
5
6
  color?: string;