sprintify-ui 0.0.12 → 0.0.13
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 +8 -7
- package/dist/sprintify-ui.es.js +4511 -3696
- package/dist/style.css +1 -1
- package/dist/tailwindcss/index.js +1 -2
- package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +4 -4
- package/dist/types/src/components/BaseHasMany.vue.d.ts +277 -0
- package/dist/types/src/components/{BaseMediaLibraryItem.vue.d.ts → BaseMediaItem.vue.d.ts} +26 -4
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +23 -15
- package/dist/types/src/components/BaseMediaPreview.vue.d.ts +97 -0
- package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +20 -1
- package/dist/types/src/components/BaseTabItem.vue.d.ts +20 -1
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +25 -17
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +37 -21
- package/dist/types/src/components/index.d.ts +10 -4
- package/package.json +1 -1
- package/src/components/BaseAppDialogs.vue +2 -2
- package/src/components/BaseAppNotifications.vue +1 -1
- package/src/components/BaseAutocomplete.vue +16 -18
- package/src/components/BaseBelongsTo.vue +1 -0
- package/src/components/BaseClipboard.vue +1 -1
- package/src/components/BaseHasMany.vue +92 -0
- package/src/components/BaseMediaItem.stories.js +41 -0
- package/src/components/BaseMediaItem.vue +71 -0
- package/src/components/BaseMediaLibrary.stories.js +80 -0
- package/src/components/BaseMediaLibrary.vue +67 -68
- package/src/components/BaseMediaPreview.stories.js +72 -0
- package/src/components/BaseMediaPreview.vue +90 -0
- package/src/components/BaseMenu.vue +1 -1
- package/src/components/BaseSideNavigationItem.vue +11 -3
- package/src/components/BaseTabItem.vue +13 -3
- package/src/components/BaseTable.vue +2 -2
- package/src/components/BaseTagAutocomplete.stories.js +129 -0
- package/src/components/BaseTagAutocomplete.vue +155 -57
- package/src/components/BaseTagAutocompleteFetch.stories.js +130 -0
- package/src/components/BaseTagAutocompleteFetch.vue +36 -25
- package/src/components/HasMany.stories.js +135 -0
- package/src/components/index.ts +18 -6
- package/src/lang/en.json +1 -1
- package/src/lang/fr.json +1 -1
- package/dist/types/src/components/BasePaginationSimple.vue.d.ts +0 -25
- package/src/components/BaseMediaLibraryItem.vue +0 -92
- package/src/components/BasePaginationSimple.vue +0 -60
|
@@ -6,6 +6,7 @@ declare const _default: {
|
|
|
6
6
|
$data: {};
|
|
7
7
|
$props: Partial<{
|
|
8
8
|
disabled: boolean;
|
|
9
|
+
activeStrategy: "default" | "exact";
|
|
9
10
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
10
11
|
to: {
|
|
11
12
|
required: true;
|
|
@@ -15,7 +16,11 @@ declare const _default: {
|
|
|
15
16
|
default: boolean;
|
|
16
17
|
type: BooleanConstructor;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
activeStrategy: {
|
|
20
|
+
default: string;
|
|
21
|
+
type: PropType<"default" | "exact">;
|
|
22
|
+
};
|
|
23
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "activeStrategy">;
|
|
19
24
|
$attrs: {
|
|
20
25
|
[x: string]: unknown;
|
|
21
26
|
};
|
|
@@ -38,8 +43,13 @@ declare const _default: {
|
|
|
38
43
|
default: boolean;
|
|
39
44
|
type: BooleanConstructor;
|
|
40
45
|
};
|
|
46
|
+
activeStrategy: {
|
|
47
|
+
default: string;
|
|
48
|
+
type: PropType<"default" | "exact">;
|
|
49
|
+
};
|
|
41
50
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
42
51
|
disabled: boolean;
|
|
52
|
+
activeStrategy: "default" | "exact";
|
|
43
53
|
}, {}, string> & {
|
|
44
54
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
45
55
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -69,6 +79,10 @@ declare const _default: {
|
|
|
69
79
|
default: boolean;
|
|
70
80
|
type: BooleanConstructor;
|
|
71
81
|
};
|
|
82
|
+
activeStrategy: {
|
|
83
|
+
default: string;
|
|
84
|
+
type: PropType<"default" | "exact">;
|
|
85
|
+
};
|
|
72
86
|
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
73
87
|
__isFragment?: undefined;
|
|
74
88
|
__isTeleport?: undefined;
|
|
@@ -82,8 +96,13 @@ declare const _default: {
|
|
|
82
96
|
default: boolean;
|
|
83
97
|
type: BooleanConstructor;
|
|
84
98
|
};
|
|
99
|
+
activeStrategy: {
|
|
100
|
+
default: string;
|
|
101
|
+
type: PropType<"default" | "exact">;
|
|
102
|
+
};
|
|
85
103
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
86
104
|
disabled: boolean;
|
|
105
|
+
activeStrategy: "default" | "exact";
|
|
87
106
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
88
107
|
$slots: {
|
|
89
108
|
default: (_: {}) => any;
|
|
@@ -6,6 +6,7 @@ declare const _default: {
|
|
|
6
6
|
$data: {};
|
|
7
7
|
$props: Partial<{
|
|
8
8
|
disabled: boolean;
|
|
9
|
+
activeStrategy: "default" | "exact";
|
|
9
10
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
10
11
|
to: {
|
|
11
12
|
required: true;
|
|
@@ -15,7 +16,11 @@ declare const _default: {
|
|
|
15
16
|
default: boolean;
|
|
16
17
|
type: BooleanConstructor;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
activeStrategy: {
|
|
20
|
+
default: string;
|
|
21
|
+
type: PropType<"default" | "exact">;
|
|
22
|
+
};
|
|
23
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "activeStrategy">;
|
|
19
24
|
$attrs: {
|
|
20
25
|
[x: string]: unknown;
|
|
21
26
|
};
|
|
@@ -38,8 +43,13 @@ declare const _default: {
|
|
|
38
43
|
default: boolean;
|
|
39
44
|
type: BooleanConstructor;
|
|
40
45
|
};
|
|
46
|
+
activeStrategy: {
|
|
47
|
+
default: string;
|
|
48
|
+
type: PropType<"default" | "exact">;
|
|
49
|
+
};
|
|
41
50
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
42
51
|
disabled: boolean;
|
|
52
|
+
activeStrategy: "default" | "exact";
|
|
43
53
|
}, {}, string> & {
|
|
44
54
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
45
55
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -69,6 +79,10 @@ declare const _default: {
|
|
|
69
79
|
default: boolean;
|
|
70
80
|
type: BooleanConstructor;
|
|
71
81
|
};
|
|
82
|
+
activeStrategy: {
|
|
83
|
+
default: string;
|
|
84
|
+
type: PropType<"default" | "exact">;
|
|
85
|
+
};
|
|
72
86
|
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
73
87
|
__isFragment?: undefined;
|
|
74
88
|
__isTeleport?: undefined;
|
|
@@ -82,8 +96,13 @@ declare const _default: {
|
|
|
82
96
|
default: boolean;
|
|
83
97
|
type: BooleanConstructor;
|
|
84
98
|
};
|
|
99
|
+
activeStrategy: {
|
|
100
|
+
default: string;
|
|
101
|
+
type: PropType<"default" | "exact">;
|
|
102
|
+
};
|
|
85
103
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
86
104
|
disabled: boolean;
|
|
105
|
+
activeStrategy: "default" | "exact";
|
|
87
106
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
88
107
|
$slots: {
|
|
89
108
|
default: (_: {}) => any;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Option } from '@/types/types';
|
|
2
|
+
import { NormalizedOption, Option } from '@/types/types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
new (...args: any[]): {
|
|
5
5
|
$: import("vue").ComponentInternalInstance;
|
|
6
6
|
$data: {};
|
|
7
7
|
$props: Partial<{
|
|
8
|
+
filter: (option: NormalizedOption) => boolean;
|
|
8
9
|
required: boolean;
|
|
9
10
|
inputClass: string;
|
|
10
11
|
placeholder: string;
|
|
11
12
|
loading: boolean;
|
|
12
13
|
disabled: boolean;
|
|
13
14
|
max: number;
|
|
14
|
-
min: number;
|
|
15
15
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
modelValue: {
|
|
17
17
|
required: true;
|
|
@@ -49,20 +49,20 @@ declare const _default: {
|
|
|
49
49
|
default: boolean;
|
|
50
50
|
type: BooleanConstructor;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
max: {
|
|
53
53
|
default: undefined;
|
|
54
54
|
type: NumberConstructor;
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
filter: {
|
|
57
57
|
default: undefined;
|
|
58
|
-
type:
|
|
58
|
+
type: PropType<(option: NormalizedOption) => boolean>;
|
|
59
59
|
};
|
|
60
60
|
}>> & {
|
|
61
61
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
62
62
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
63
63
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
64
64
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
65
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "inputClass" | "placeholder" | "loading" | "disabled" | "max"
|
|
65
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "filter" | "required" | "inputClass" | "placeholder" | "loading" | "disabled" | "max">;
|
|
66
66
|
$attrs: {
|
|
67
67
|
[x: string]: unknown;
|
|
68
68
|
};
|
|
@@ -113,13 +113,13 @@ declare const _default: {
|
|
|
113
113
|
default: boolean;
|
|
114
114
|
type: BooleanConstructor;
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
max: {
|
|
117
117
|
default: undefined;
|
|
118
118
|
type: NumberConstructor;
|
|
119
119
|
};
|
|
120
|
-
|
|
120
|
+
filter: {
|
|
121
121
|
default: undefined;
|
|
122
|
-
type:
|
|
122
|
+
type: PropType<(option: NormalizedOption) => boolean>;
|
|
123
123
|
};
|
|
124
124
|
}>> & {
|
|
125
125
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -127,13 +127,13 @@ declare const _default: {
|
|
|
127
127
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
128
128
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
129
129
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "typing" | "focus" | "scrollBottom")[], string, {
|
|
130
|
+
filter: (option: NormalizedOption) => boolean;
|
|
130
131
|
required: boolean;
|
|
131
132
|
inputClass: string;
|
|
132
133
|
placeholder: string;
|
|
133
134
|
loading: boolean;
|
|
134
135
|
disabled: boolean;
|
|
135
136
|
max: number;
|
|
136
|
-
min: number;
|
|
137
137
|
}, {}, string> & {
|
|
138
138
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
139
139
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -191,13 +191,13 @@ declare const _default: {
|
|
|
191
191
|
default: boolean;
|
|
192
192
|
type: BooleanConstructor;
|
|
193
193
|
};
|
|
194
|
-
|
|
194
|
+
max: {
|
|
195
195
|
default: undefined;
|
|
196
196
|
type: NumberConstructor;
|
|
197
197
|
};
|
|
198
|
-
|
|
198
|
+
filter: {
|
|
199
199
|
default: undefined;
|
|
200
|
-
type:
|
|
200
|
+
type: PropType<(option: NormalizedOption) => boolean>;
|
|
201
201
|
};
|
|
202
202
|
}>> & {
|
|
203
203
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -245,13 +245,13 @@ declare const _default: {
|
|
|
245
245
|
default: boolean;
|
|
246
246
|
type: BooleanConstructor;
|
|
247
247
|
};
|
|
248
|
-
|
|
248
|
+
max: {
|
|
249
249
|
default: undefined;
|
|
250
250
|
type: NumberConstructor;
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
filter: {
|
|
253
253
|
default: undefined;
|
|
254
|
-
type:
|
|
254
|
+
type: PropType<(option: NormalizedOption) => boolean>;
|
|
255
255
|
};
|
|
256
256
|
}>> & {
|
|
257
257
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -259,16 +259,24 @@ declare const _default: {
|
|
|
259
259
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
260
260
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
261
261
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "typing" | "focus" | "scrollBottom")[], "update:modelValue" | "typing" | "focus" | "scrollBottom", {
|
|
262
|
+
filter: (option: NormalizedOption) => boolean;
|
|
262
263
|
required: boolean;
|
|
263
264
|
inputClass: string;
|
|
264
265
|
placeholder: string;
|
|
265
266
|
loading: boolean;
|
|
266
267
|
disabled: boolean;
|
|
267
268
|
max: number;
|
|
268
|
-
min: number;
|
|
269
269
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
270
270
|
$slots: {
|
|
271
271
|
empty: (_: {}) => any;
|
|
272
|
+
option: (_: {
|
|
273
|
+
option: Option;
|
|
274
|
+
selected: boolean;
|
|
275
|
+
active: boolean;
|
|
276
|
+
}) => any;
|
|
277
|
+
footer: (_: {
|
|
278
|
+
options: NormalizedOption[];
|
|
279
|
+
}) => any;
|
|
272
280
|
};
|
|
273
281
|
});
|
|
274
282
|
export default _default;
|
|
@@ -9,8 +9,8 @@ declare const _default: {
|
|
|
9
9
|
inputClass: string;
|
|
10
10
|
placeholder: string;
|
|
11
11
|
disabled: boolean;
|
|
12
|
+
queryKey: string;
|
|
12
13
|
max: number;
|
|
13
|
-
min: number;
|
|
14
14
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
15
15
|
modelValue: {
|
|
16
16
|
required: true;
|
|
@@ -44,20 +44,20 @@ declare const _default: {
|
|
|
44
44
|
default: boolean;
|
|
45
45
|
type: BooleanConstructor;
|
|
46
46
|
};
|
|
47
|
-
min: {
|
|
48
|
-
default: undefined;
|
|
49
|
-
type: NumberConstructor;
|
|
50
|
-
};
|
|
51
47
|
max: {
|
|
52
48
|
default: undefined;
|
|
53
49
|
type: NumberConstructor;
|
|
54
50
|
};
|
|
51
|
+
queryKey: {
|
|
52
|
+
default: string;
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
};
|
|
55
55
|
}>> & {
|
|
56
56
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
58
58
|
onTyping?: ((...args: any[]) => any) | undefined;
|
|
59
59
|
onScrollBottom?: ((...args: any[]) => any) | undefined;
|
|
60
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "inputClass" | "placeholder" | "disabled" | "
|
|
60
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "inputClass" | "placeholder" | "disabled" | "queryKey" | "max">;
|
|
61
61
|
$attrs: {
|
|
62
62
|
[x: string]: unknown;
|
|
63
63
|
};
|
|
@@ -104,14 +104,14 @@ declare const _default: {
|
|
|
104
104
|
default: boolean;
|
|
105
105
|
type: BooleanConstructor;
|
|
106
106
|
};
|
|
107
|
-
min: {
|
|
108
|
-
default: undefined;
|
|
109
|
-
type: NumberConstructor;
|
|
110
|
-
};
|
|
111
107
|
max: {
|
|
112
108
|
default: undefined;
|
|
113
109
|
type: NumberConstructor;
|
|
114
110
|
};
|
|
111
|
+
queryKey: {
|
|
112
|
+
default: string;
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
};
|
|
115
115
|
}>> & {
|
|
116
116
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
117
117
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -122,8 +122,8 @@ declare const _default: {
|
|
|
122
122
|
inputClass: string;
|
|
123
123
|
placeholder: string;
|
|
124
124
|
disabled: boolean;
|
|
125
|
+
queryKey: string;
|
|
125
126
|
max: number;
|
|
126
|
-
min: number;
|
|
127
127
|
}, {}, string> & {
|
|
128
128
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
129
129
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -177,14 +177,14 @@ declare const _default: {
|
|
|
177
177
|
default: boolean;
|
|
178
178
|
type: BooleanConstructor;
|
|
179
179
|
};
|
|
180
|
-
min: {
|
|
181
|
-
default: undefined;
|
|
182
|
-
type: NumberConstructor;
|
|
183
|
-
};
|
|
184
180
|
max: {
|
|
185
181
|
default: undefined;
|
|
186
182
|
type: NumberConstructor;
|
|
187
183
|
};
|
|
184
|
+
queryKey: {
|
|
185
|
+
default: string;
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
};
|
|
188
188
|
}>> & {
|
|
189
189
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
190
190
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -227,14 +227,14 @@ declare const _default: {
|
|
|
227
227
|
default: boolean;
|
|
228
228
|
type: BooleanConstructor;
|
|
229
229
|
};
|
|
230
|
-
min: {
|
|
231
|
-
default: undefined;
|
|
232
|
-
type: NumberConstructor;
|
|
233
|
-
};
|
|
234
230
|
max: {
|
|
235
231
|
default: undefined;
|
|
236
232
|
type: NumberConstructor;
|
|
237
233
|
};
|
|
234
|
+
queryKey: {
|
|
235
|
+
default: string;
|
|
236
|
+
type: StringConstructor;
|
|
237
|
+
};
|
|
238
238
|
}>> & {
|
|
239
239
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
240
240
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -245,7 +245,23 @@ declare const _default: {
|
|
|
245
245
|
inputClass: string;
|
|
246
246
|
placeholder: string;
|
|
247
247
|
disabled: boolean;
|
|
248
|
+
queryKey: string;
|
|
248
249
|
max: number;
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
251
|
+
$slots: {
|
|
252
|
+
option: (_: {
|
|
253
|
+
option: Option;
|
|
254
|
+
selected: boolean;
|
|
255
|
+
active: boolean;
|
|
256
|
+
}) => any;
|
|
257
|
+
footer: (_: {
|
|
258
|
+
options: import("@/types/types").NormalizedOption[];
|
|
259
|
+
} & {
|
|
260
|
+
keywords: string;
|
|
261
|
+
}) => any;
|
|
262
|
+
empty: (_: {
|
|
263
|
+
firstSearch: boolean;
|
|
264
|
+
}) => any;
|
|
265
|
+
};
|
|
266
|
+
});
|
|
251
267
|
export default _default;
|
|
@@ -12,6 +12,7 @@ import BaseBreadcrumbs from './BaseBreadcrumbs.vue';
|
|
|
12
12
|
import BaseButton from './BaseButton.vue';
|
|
13
13
|
import BaseCard from './BaseCard.vue';
|
|
14
14
|
import BaseCardRow from './BaseCardRow.vue';
|
|
15
|
+
import BaseCharacterCounter from './BaseCharacterCounter.vue';
|
|
15
16
|
import BaseClipboard from './BaseClipboard.vue';
|
|
16
17
|
import BaseContainer from './BaseContainer.vue';
|
|
17
18
|
import BaseCounter from './BaseCounter.vue';
|
|
@@ -24,10 +25,14 @@ import BaseDescriptionListItem from './BaseDescriptionListItem.vue';
|
|
|
24
25
|
import BaseDialog from './BaseDialog.vue';
|
|
25
26
|
import BaseFilePicker from './BaseFilePicker.vue';
|
|
26
27
|
import BaseFileUploader from './BaseFileUploader.vue';
|
|
28
|
+
import BaseHasMany from './BaseHasMany.vue';
|
|
27
29
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
28
30
|
import BaseInput from './BaseInput.vue';
|
|
29
31
|
import BaseInputLabel from './BaseInputLabel.vue';
|
|
30
32
|
import BaseLoadingCover from './BaseLoadingCover.vue';
|
|
33
|
+
import BaseMediaItem from './BaseMediaItem.vue';
|
|
34
|
+
import BaseMediaLibrary from './BaseMediaLibrary.vue';
|
|
35
|
+
import BaseMediaPreview from './BaseMediaPreview.vue';
|
|
31
36
|
import BaseMenu from './BaseMenu.vue';
|
|
32
37
|
import BaseMenuItem from './BaseMenuItem.vue';
|
|
33
38
|
import BaseModalCenter from './BaseModalCenter.vue';
|
|
@@ -46,11 +51,12 @@ import BaseSideNavigationItem from './BaseSideNavigationItem.vue';
|
|
|
46
51
|
import BaseSkeleton from './BaseSkeleton.vue';
|
|
47
52
|
import BaseSwitch from './BaseSwitch.vue';
|
|
48
53
|
import BaseSystemAlert from './BaseSystemAlert.vue';
|
|
49
|
-
import BaseTextarea from './BaseTextarea.vue';
|
|
50
|
-
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
51
|
-
import BaseCharacterCounter from './BaseCharacterCounter.vue';
|
|
52
54
|
import BaseTabs from './BaseTabs.vue';
|
|
53
55
|
import BaseTabItem from './BaseTabItem.vue';
|
|
56
|
+
import BaseTagAutocomplete from './BaseTagAutocomplete.vue';
|
|
57
|
+
import BaseTagAutocompleteFetch from './BaseTagAutocompleteFetch.vue';
|
|
54
58
|
import BaseTable from './BaseTable.vue';
|
|
55
59
|
import BaseTableColumn from './BaseTableColumn.vue';
|
|
56
|
-
|
|
60
|
+
import BaseTextarea from './BaseTextarea.vue';
|
|
61
|
+
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
62
|
+
export { BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseBadge, BaseBelongsTo, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseContainer, BaseCounter, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseFilePicker, BaseFileUploader, BaseHasMany, BaseIcon, BaseInput, BaseInputLabel, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BasePagination, BasePanel, BasePassword, BaseProcessRing, BaseReadMore, BaseSelect, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
>
|
|
12
12
|
<div
|
|
13
13
|
v-if="dialogs.length"
|
|
14
|
-
class="fixed inset-0
|
|
14
|
+
class="z-dialogs fixed inset-0 h-full w-full bg-black bg-opacity-60"
|
|
15
15
|
/>
|
|
16
16
|
</Transition>
|
|
17
17
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
v-for="dialog in dialogs"
|
|
30
30
|
:key="dialog.id"
|
|
31
31
|
scroll-lock-target
|
|
32
|
-
class="fixed inset-0
|
|
32
|
+
class="z-dialogs fixed inset-0 transform overflow-y-auto"
|
|
33
33
|
>
|
|
34
34
|
<div
|
|
35
35
|
class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="body">
|
|
3
3
|
<div
|
|
4
|
-
class="pointer-events-none fixed inset-0 flex items-end justify-end p-6 md:p-8"
|
|
4
|
+
class="pointer-events-none fixed inset-0 z-notifications flex items-end justify-end p-6 md:p-8"
|
|
5
5
|
>
|
|
6
6
|
<div class="w-full max-w-sm">
|
|
7
7
|
<TransitionGroup
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<div class="relative">
|
|
49
49
|
<div
|
|
50
50
|
v-show="showDropdown"
|
|
51
|
-
class="absolute top-1 z-
|
|
51
|
+
class="absolute top-1 z-menu min-h-[110px] w-full overflow-hidden rounded border border-slate-300 bg-white shadow-md"
|
|
52
52
|
>
|
|
53
53
|
<div
|
|
54
54
|
ref="dropdown"
|
|
@@ -102,24 +102,22 @@
|
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
>
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
></BaseSkeleton>
|
|
120
|
-
</div>
|
|
105
|
+
<div
|
|
106
|
+
v-if="loading"
|
|
107
|
+
class="absolute inset-0 h-full w-full space-y-1 bg-white p-2"
|
|
108
|
+
>
|
|
109
|
+
<div class="space-y-1">
|
|
110
|
+
<BaseSkeleton class="h-7 w-full" delay="0ms"></BaseSkeleton>
|
|
111
|
+
<BaseSkeleton
|
|
112
|
+
class="h-7 w-full opacity-70"
|
|
113
|
+
delay="50ms"
|
|
114
|
+
></BaseSkeleton>
|
|
115
|
+
<BaseSkeleton
|
|
116
|
+
class="h-7 w-full opacity-30"
|
|
117
|
+
delay="100ms"
|
|
118
|
+
></BaseSkeleton>
|
|
121
119
|
</div>
|
|
122
|
-
</
|
|
120
|
+
</div>
|
|
123
121
|
</div>
|
|
124
122
|
</div>
|
|
125
123
|
</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
19
19
|
v-show="tooltipShown"
|
|
20
|
-
class="pointer-events-none absolute left-full z-
|
|
20
|
+
class="pointer-events-none absolute left-full z-[1] items-center"
|
|
21
21
|
>
|
|
22
22
|
<div
|
|
23
23
|
class="ml-2 whitespace-nowrap rounded bg-slate-900 bg-opacity-80 px-3 py-2 text-xs leading-tight text-white backdrop-blur"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseTagAutocompleteFetch
|
|
3
|
+
:model-value="models"
|
|
4
|
+
:url="url"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:placeholder="placeholder"
|
|
7
|
+
:required="required"
|
|
8
|
+
:value-key="foreignKey"
|
|
9
|
+
:label-key="field"
|
|
10
|
+
:input-class="inputClass"
|
|
11
|
+
:query-key="queryKey"
|
|
12
|
+
:max="max"
|
|
13
|
+
@update:model-value="onUpdate"
|
|
14
|
+
>
|
|
15
|
+
<template #option="optionProps">
|
|
16
|
+
<slot name="option" v-bind="optionProps" />
|
|
17
|
+
</template>
|
|
18
|
+
<template #empty="emptyProps">
|
|
19
|
+
<slot name="empty" v-bind="emptyProps"></slot>
|
|
20
|
+
</template>
|
|
21
|
+
<template #footer="footerProps">
|
|
22
|
+
<slot name="footer" v-bind="footerProps"></slot>
|
|
23
|
+
</template>
|
|
24
|
+
</BaseTagAutocompleteFetch>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts" setup>
|
|
28
|
+
import { PropType } from 'vue';
|
|
29
|
+
import { Option } from '@/types/types';
|
|
30
|
+
import BaseTagAutocompleteFetch from './BaseTagAutocompleteFetch.vue';
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
modelValue: {
|
|
34
|
+
required: true,
|
|
35
|
+
type: Array as PropType<Option[]>,
|
|
36
|
+
},
|
|
37
|
+
url: {
|
|
38
|
+
required: true,
|
|
39
|
+
type: String,
|
|
40
|
+
},
|
|
41
|
+
foreignKey: {
|
|
42
|
+
default: 'id',
|
|
43
|
+
type: String,
|
|
44
|
+
},
|
|
45
|
+
field: {
|
|
46
|
+
required: true,
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
required: {
|
|
50
|
+
default: false,
|
|
51
|
+
type: Boolean,
|
|
52
|
+
},
|
|
53
|
+
disabled: {
|
|
54
|
+
default: false,
|
|
55
|
+
type: Boolean,
|
|
56
|
+
},
|
|
57
|
+
placeholder: {
|
|
58
|
+
default: undefined,
|
|
59
|
+
type: String,
|
|
60
|
+
},
|
|
61
|
+
inputClass: {
|
|
62
|
+
default: undefined,
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
max: {
|
|
66
|
+
default: undefined,
|
|
67
|
+
type: Number,
|
|
68
|
+
},
|
|
69
|
+
queryKey: {
|
|
70
|
+
default: 'search',
|
|
71
|
+
type: String,
|
|
72
|
+
},
|
|
73
|
+
currentModels: {
|
|
74
|
+
default() {
|
|
75
|
+
return [];
|
|
76
|
+
},
|
|
77
|
+
type: Array as PropType<Option[]>,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const emit = defineEmits(['update:modelValue']);
|
|
82
|
+
|
|
83
|
+
const models = ref(props.currentModels);
|
|
84
|
+
|
|
85
|
+
function onUpdate(newModels: Option[]) {
|
|
86
|
+
models.value = newModels;
|
|
87
|
+
emit(
|
|
88
|
+
'update:modelValue',
|
|
89
|
+
newModels.map((m) => m[props.foreignKey])
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import BaseMediaItem from './BaseMediaItem.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/BaseMediaItem',
|
|
5
|
+
component: BaseMediaItem,
|
|
6
|
+
args: {},
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: {
|
|
11
|
+
BaseMediaItem,
|
|
12
|
+
},
|
|
13
|
+
setup() {
|
|
14
|
+
return { args };
|
|
15
|
+
},
|
|
16
|
+
template: `
|
|
17
|
+
<BaseMediaItem v-bind="args" />
|
|
18
|
+
`,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const Demo = Template.bind({});
|
|
22
|
+
Demo.args = {
|
|
23
|
+
media: {
|
|
24
|
+
id: 'xxxxxxxxxxx',
|
|
25
|
+
file_name: 'picture.jpg',
|
|
26
|
+
url: 'https://images.unsplash.com/photo-1670139018938-af8bf748a1bc?auto=format&fit=crop&w=800&h=800&q=80',
|
|
27
|
+
mime_type: 'image',
|
|
28
|
+
size: 430 * 1024,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const PDF = Template.bind({});
|
|
33
|
+
PDF.args = {
|
|
34
|
+
media: {
|
|
35
|
+
id: 'xxxxxxxxxxx',
|
|
36
|
+
file_name: 'document.pdf',
|
|
37
|
+
url: 'https://images.unsplash.com/photo-1670139018938-af8bf748a1bc?auto=format&fit=crop&w=800&h=800&q=80',
|
|
38
|
+
mime_type: 'application/pdf',
|
|
39
|
+
size: 430 * 1024,
|
|
40
|
+
},
|
|
41
|
+
};
|