@mobileaction/action-kit 1.1.46 → 1.1.47

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.
@@ -1,5 +1,6 @@
1
1
  import type { PropType as __PropType } from 'vue';
2
2
  import { DefaultOptionType as OptionType } from "ant-design-vue/lib/select";
3
+ import { AutoCompleteSize } from "./types";
3
4
  export interface MaAutocompleteProps {
4
5
  value?: string | undefined;
5
6
  options?: OptionType[] | undefined;
@@ -9,6 +10,7 @@ export interface MaAutocompleteProps {
9
10
  prefixIcon?: string;
10
11
  avatarUrl?: string;
11
12
  open?: boolean;
13
+ size?: AutoCompleteSize;
12
14
  }
13
15
  declare const _sfc_main: import("vue").DefineComponent<{
14
16
  value: {
@@ -46,6 +48,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
46
48
  required: false;
47
49
  default: boolean;
48
50
  };
51
+ size: {
52
+ type: __PropType<"small" | "medium" | "large">;
53
+ required: false;
54
+ default: string;
55
+ };
49
56
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:value")[], "search" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
57
  value: {
51
58
  type: __PropType<string>;
@@ -82,10 +89,16 @@ declare const _sfc_main: import("vue").DefineComponent<{
82
89
  required: false;
83
90
  default: boolean;
84
91
  };
92
+ size: {
93
+ type: __PropType<"small" | "medium" | "large">;
94
+ required: false;
95
+ default: string;
96
+ };
85
97
  }>> & {
86
98
  "onUpdate:value"?: (...args: any[]) => any;
87
99
  onSearch?: (...args: any[]) => any;
88
100
  }, {
101
+ size: "small" | "medium" | "large";
89
102
  options: OptionType[];
90
103
  filterFn: Function;
91
104
  open: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const AutoCompleteSizes: readonly ["large", "medium", "small"];
2
+ export type AutoCompleteSize = (typeof AutoCompleteSizes)[number];
@@ -1,4 +1,5 @@
1
1
  import { DefaultOptionType as OptionType } from "ant-design-vue/lib/select";
2
+ import { AutoCompleteSize } from "./types";
2
3
  export interface MaAutocompleteProps {
3
4
  value?: string | undefined;
4
5
  options?: OptionType[] | undefined;
@@ -8,19 +9,23 @@ export interface MaAutocompleteProps {
8
9
  prefixIcon?: string;
9
10
  avatarUrl?: string;
10
11
  open?: boolean;
12
+ size?: AutoCompleteSize;
11
13
  }
12
14
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MaAutocompleteProps>, {
13
15
  options: () => OptionType[];
14
16
  filterFn: (value: string, option: OptionType) => boolean;
15
17
  open: boolean;
18
+ size: string;
16
19
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "search")[], "search" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MaAutocompleteProps>, {
17
20
  options: () => OptionType[];
18
21
  filterFn: (value: string, option: OptionType) => boolean;
19
22
  open: boolean;
23
+ size: string;
20
24
  }>>> & {
21
25
  "onUpdate:value"?: (...args: any[]) => any;
22
26
  onSearch?: (...args: any[]) => any;
23
27
  }, {
28
+ size: "small" | "medium" | "large";
24
29
  options: OptionType[];
25
30
  open: boolean;
26
31
  filterFn: Function;
@@ -6,5 +6,7 @@ declare type Story = StoryObj<typeof MaAutoComplete>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithIcons: Story;
8
8
  export declare const WithAvatar: Story;
9
+ export declare const Small: Story;
10
+ export declare const Medium: Story;
9
11
  export declare const CustomInput: Story;
10
12
  export declare const CustomAppInput: Story;
@@ -0,0 +1,2 @@
1
+ export declare const AutoCompleteSizes: readonly ["large", "medium", "small"];
2
+ export declare type AutoCompleteSize = (typeof AutoCompleteSizes)[number];
@@ -0,0 +1,53 @@
1
+ import { MaCountry } from "./types";
2
+ import { SelectSize } from "../select/types";
3
+ export interface MaCountrySelectProps {
4
+ value: string | string[] | null;
5
+ filterFn?: Function;
6
+ countries: MaCountry[];
7
+ size?: SelectSize;
8
+ showSearch?: boolean;
9
+ dropdownMatchSelectWidth?: boolean | number;
10
+ listHeight?: number;
11
+ showSelectedCountryCode?: boolean;
12
+ placeholder?: string;
13
+ }
14
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MaCountrySelectProps>, {
15
+ filterFn: (searchTerm: string, country: MaCountry) => boolean;
16
+ size: string;
17
+ showSearch: boolean;
18
+ dropdownMatchSelectWidth: number;
19
+ listHeight: number;
20
+ showSelectedCountryCode: boolean;
21
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MaCountrySelectProps>, {
22
+ filterFn: (searchTerm: string, country: MaCountry) => boolean;
23
+ size: string;
24
+ showSearch: boolean;
25
+ dropdownMatchSelectWidth: number;
26
+ listHeight: number;
27
+ showSelectedCountryCode: boolean;
28
+ }>>> & {
29
+ onChange?: (...args: any[]) => any;
30
+ "onUpdate:value"?: (...args: any[]) => any;
31
+ }, {
32
+ size: "default" | "small" | "large";
33
+ dropdownMatchSelectWidth: number | boolean;
34
+ showSearch: boolean;
35
+ listHeight: number;
36
+ filterFn: Function;
37
+ showSelectedCountryCode: boolean;
38
+ }>;
39
+ export default _default;
40
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
41
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
42
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
43
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
44
+ } : {
45
+ type: import('vue').PropType<T[K]>;
46
+ required: true;
47
+ };
48
+ };
49
+ declare type __VLS_WithDefaults<P, D> = {
50
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
51
+ default: D[K];
52
+ } : P[K];
53
+ };
@@ -0,0 +1,4 @@
1
+ import type { Meta, StoryFn } from '@storybook/vue3';
2
+ import MaCountrySelect from '../index.vue';
3
+ export declare const baseConfig: Meta<typeof MaCountrySelect>;
4
+ export declare const Template: StoryFn;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import type MaCountrySelect from '../index.vue';
3
+ declare const meta: Meta<typeof MaCountrySelect>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof MaCountrySelect>;
6
+ export declare const Default: Story;
7
+ export declare const DefaultValue: Story;
8
+ export declare const CountryFullNameDisplay: Story;
@@ -0,0 +1,4 @@
1
+ export interface MaCountry {
2
+ name: string;
3
+ code: string;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobileaction/action-kit",
3
- "version": "1.1.46",
3
+ "version": "1.1.47",
4
4
  "main": "dist/action-kit.js",
5
5
  "module": "dist/action-kit.mjs",
6
6
  "types": "dist/index.d.ts",