@dao-style/core 0.1.4 → 0.2.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.
@@ -1,3 +1,4 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import("vue").DefineComponent<{
2
3
  modelValue: {
3
4
  type: BooleanConstructor;
@@ -12,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
12
13
  default: boolean;
13
14
  };
14
15
  size: {
15
- type: StringConstructor;
16
+ type: PropType<"md" | "sm" | "lg" | "xl">;
16
17
  default: string;
17
18
  };
18
19
  containerClass: {
@@ -93,7 +94,7 @@ declare const _default: import("vue").DefineComponent<{
93
94
  confirmDisabled?: unknown;
94
95
  showClose?: unknown;
95
96
  } & {
96
- size: string;
97
+ size: "md" | "sm" | "lg" | "xl";
97
98
  modelValue: boolean;
98
99
  top: string;
99
100
  bottom: string;
@@ -119,7 +120,7 @@ declare const _default: import("vue").DefineComponent<{
119
120
  "onBefore-close"?: ((...args: any[]) => any) | undefined;
120
121
  onClosed?: ((...args: any[]) => any) | undefined;
121
122
  }, {
122
- size: string;
123
+ size: "md" | "sm" | "lg" | "xl";
123
124
  modelValue: boolean;
124
125
  top: string;
125
126
  bottom: string;
@@ -23,6 +23,8 @@ export * from './switch';
23
23
  export * from './table';
24
24
  export * from './tabs';
25
25
  export * from './tag';
26
+ export * from './toolbar';
26
27
  export * from './tooltip';
28
+ export * from './text-button';
27
29
  export * from './ellipsis';
28
30
  export * from './transfer';
@@ -0,0 +1 @@
1
+ export { default as TextButton } from './text-button.vue';
@@ -0,0 +1,20 @@
1
+ import type { PropType, defineComponent } from 'vue';
2
+ export declare type TagType = string | Element['tagName'] | ReturnType<typeof defineComponent>;
3
+ export declare const TextButtonType: readonly ["default", "action", "link"];
4
+ declare type ThePropType = {
5
+ type: typeof TextButtonType[number];
6
+ icon?: string;
7
+ };
8
+ declare const _default: {
9
+ tag: {
10
+ type: PropType<any>;
11
+ default: string;
12
+ };
13
+ prop: {
14
+ type: PropType<ThePropType>;
15
+ default: () => {
16
+ type: string;
17
+ };
18
+ };
19
+ };
20
+ export default _default;
@@ -0,0 +1,33 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ tag: {
3
+ type: import("vue").PropType<any>;
4
+ default: string;
5
+ };
6
+ prop: {
7
+ type: import("vue").PropType<{
8
+ type: "link" | "default" | "action";
9
+ icon?: string | undefined;
10
+ }>;
11
+ default: () => {
12
+ type: string;
13
+ };
14
+ };
15
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
18
+ tag?: unknown;
19
+ prop?: unknown;
20
+ } & {
21
+ tag: string;
22
+ prop: {
23
+ type: "link" | "default" | "action";
24
+ icon?: string | undefined;
25
+ };
26
+ } & {}>, {
27
+ tag: string;
28
+ prop: {
29
+ type: "link" | "default" | "action";
30
+ icon?: string | undefined;
31
+ };
32
+ }>;
33
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as Toolbar } from './toolbar.vue';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,58 @@
1
+ import { PropType } from 'vue';
2
+ import type { SearchValue, SearchOption, SearchOptionValue, FuzzyOption } from './types';
3
+ interface FilterItem {
4
+ key: string;
5
+ label: string;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<{
8
+ search: {
9
+ type: PropType<Record<string, SearchValue[]>>;
10
+ default: () => {};
11
+ };
12
+ searchPlaceholder: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ searchOptions: {
17
+ type: PropType<SearchOption[]>;
18
+ default: () => never[];
19
+ };
20
+ fuzzy: {
21
+ type: PropType<FuzzyOption>;
22
+ default: undefined;
23
+ };
24
+ }, {
25
+ computedSearchPlaceholder: import("vue").ComputedRef<string>;
26
+ daoInputSearchRef: import("vue").Ref<any>;
27
+ filteredKeys: import("vue").ComputedRef<FilterItem[]>;
28
+ filteredValues: import("vue").ComputedRef<SearchOptionValue[]>;
29
+ visible: import("vue").Ref<boolean>;
30
+ searchText: import("vue").Ref<string>;
31
+ type: import("vue").ComputedRef<"value" | "key">;
32
+ selectedKey: import("vue").ComputedRef<SearchOption | undefined>;
33
+ dropdownRef: import("vue").Ref<any>;
34
+ selectKey: (item: FilterItem) => void;
35
+ selectValue: (item: SearchOptionValue) => void;
36
+ showPopover: () => void;
37
+ handleEnter: () => void;
38
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:search")[], "search" | "update:search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
39
+ search?: unknown;
40
+ searchPlaceholder?: unknown;
41
+ searchOptions?: unknown;
42
+ fuzzy?: unknown;
43
+ } & {
44
+ search: Record<string, SearchValue[]>;
45
+ searchPlaceholder: string;
46
+ searchOptions: SearchOption[];
47
+ } & {
48
+ fuzzy?: FuzzyOption | undefined;
49
+ }> & {
50
+ onSearch?: ((...args: any[]) => any) | undefined;
51
+ "onUpdate:search"?: ((...args: any[]) => any) | undefined;
52
+ }, {
53
+ search: Record<string, SearchValue[]>;
54
+ searchPlaceholder: string;
55
+ searchOptions: SearchOption[];
56
+ fuzzy: FuzzyOption;
57
+ }>;
58
+ export default _default;
@@ -0,0 +1,77 @@
1
+ import { PropType } from 'vue';
2
+ import type { SearchValue, SearchOption, FuzzyOption } from './types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ search: {
5
+ type: PropType<Record<string, SearchValue[]>>;
6
+ default: () => {};
7
+ };
8
+ searchPlaceholder: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ searchOptions: {
13
+ type: PropType<SearchOption[]>;
14
+ default: () => never[];
15
+ };
16
+ fuzzy: {
17
+ type: PropType<FuzzyOption>;
18
+ default: undefined;
19
+ };
20
+ hideRefresh: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ hideSearch: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }, {
29
+ t: {
30
+ (key: string | number): string;
31
+ (key: string | number, plural: number, options?: import("vue-i18n").TranslateOptions | undefined): string;
32
+ (key: string | number, defaultMsg: string, options?: import("vue-i18n").TranslateOptions | undefined): string;
33
+ (key: string | number, list: unknown[], options?: import("vue-i18n").TranslateOptions | undefined): string;
34
+ (key: string | number, list: unknown[], plural: number): string;
35
+ (key: string | number, list: unknown[], defaultMsg: string): string;
36
+ (key: string | number, named: Record<string, unknown>, options?: import("vue-i18n").TranslateOptions | undefined): string;
37
+ (key: string | number, named: Record<string, unknown>, plural: number): string;
38
+ (key: string | number, named: Record<string, unknown>, defaultMsg: string): string;
39
+ };
40
+ searchModel: import("vue").Ref<{
41
+ [x: string]: (string | number | boolean | unknown[] | {
42
+ [x: string]: unknown;
43
+ })[];
44
+ }> | import("vue").WritableComputedRef<Record<string, SearchValue[]>>;
45
+ isFuzzyOption: (key: string) => boolean;
46
+ removeValue: (key: string, valueIndex: number) => void;
47
+ clearFilter: () => void;
48
+ getKeyLabel: (key: string) => string;
49
+ getValueLabel: (key: string, value: SearchValue) => SearchValue;
50
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:search" | "refresh")[], "search" | "update:search" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
51
+ search?: unknown;
52
+ searchPlaceholder?: unknown;
53
+ searchOptions?: unknown;
54
+ fuzzy?: unknown;
55
+ hideRefresh?: unknown;
56
+ hideSearch?: unknown;
57
+ } & {
58
+ search: Record<string, SearchValue[]>;
59
+ searchPlaceholder: string;
60
+ searchOptions: SearchOption[];
61
+ hideRefresh: boolean;
62
+ hideSearch: boolean;
63
+ } & {
64
+ fuzzy?: FuzzyOption | undefined;
65
+ }> & {
66
+ onSearch?: ((...args: any[]) => any) | undefined;
67
+ "onUpdate:search"?: ((...args: any[]) => any) | undefined;
68
+ onRefresh?: ((...args: any[]) => any) | undefined;
69
+ }, {
70
+ search: Record<string, SearchValue[]>;
71
+ searchPlaceholder: string;
72
+ searchOptions: SearchOption[];
73
+ fuzzy: FuzzyOption;
74
+ hideRefresh: boolean;
75
+ hideSearch: boolean;
76
+ }>;
77
+ export default _default;
@@ -0,0 +1,16 @@
1
+ export declare type SearchValue = string | number | boolean | unknown[] | Record<string, unknown>;
2
+ export interface SearchOptionValue {
3
+ value: SearchValue;
4
+ label: string;
5
+ }
6
+ export interface SearchOption {
7
+ key: string;
8
+ label?: string;
9
+ values?: SearchOptionValue[];
10
+ single?: boolean;
11
+ enum?: boolean;
12
+ }
13
+ export interface FuzzyOption {
14
+ key: string;
15
+ single?: boolean;
16
+ }
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
48
48
  isEmpty: import("vue").ComputedRef<boolean>;
49
49
  hasFooter: import("vue").ComputedRef<boolean>;
50
50
  handleEvent: (action: 'remove' | 'check', row: import("./props").DataItem) => void;
51
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selectedChange" | "refresh")[], "selectedChange" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
51
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("refresh" | "selectedChange")[], "refresh" | "selectedChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
52
52
  type?: unknown;
53
53
  data?: unknown;
54
54
  checkedKeys?: unknown;
@@ -74,8 +74,8 @@ declare const _default: import("vue").DefineComponent<{
74
74
  filterMethod?: ((query: string, item: import("./props").DataItem) => boolean) | undefined;
75
75
  filterPlaceholder?: string | undefined;
76
76
  }> & {
77
- onSelectedChange?: ((...args: any[]) => any) | undefined;
78
77
  onRefresh?: ((...args: any[]) => any) | undefined;
78
+ onSelectedChange?: ((...args: any[]) => any) | undefined;
79
79
  }, {
80
80
  props: {
81
81
  key: string;