sprintify-ui 0.0.34 → 0.0.36
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 +2 -2
- package/dist/sprintify-ui.es.js +2597 -2377
- package/dist/types/src/components/BaseDataIterator.vue.d.ts +1 -32
- package/dist/types/src/components/BaseDataTable.vue.d.ts +1 -32
- package/dist/types/src/components/BaseShortcut.vue.d.ts +67 -0
- package/dist/types/src/components/BaseStatistic.vue.d.ts +56 -0
- package/dist/types/src/components/BaseTimeline.vue.d.ts +14 -0
- package/dist/types/src/components/BaseTimelineItem.vue.d.ts +14 -0
- package/dist/types/src/components/index.d.ts +5 -1
- package/dist/types/src/index.d.ts +0 -2
- package/dist/types/src/types/Colors.d.ts +9 -0
- package/dist/types/src/types/TimelineItem.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/BaseDataIterator.vue +0 -8
- package/src/components/BaseDataTable.vue +0 -9
- package/src/components/BaseShortcut.stories.js +92 -0
- package/src/components/BaseShortcut.vue +153 -0
- package/src/components/BaseStatistic.stories.js +51 -0
- package/src/components/BaseStatistic.vue +98 -0
- package/src/components/BaseTimeline.stories.js +53 -0
- package/src/components/BaseTimeline.vue +29 -0
- package/src/components/BaseTimelineItem.stories.js +78 -0
- package/src/components/BaseTimelineItem.vue +79 -0
- package/src/components/index.ts +8 -0
- package/src/index.ts +0 -3
- package/src/types/Colors.ts +9 -0
- package/src/types/TimelineItem.ts +8 -0
|
@@ -7,7 +7,6 @@ declare const _default: {
|
|
|
7
7
|
$data: {};
|
|
8
8
|
$props: Partial<{
|
|
9
9
|
actions: MenuItemInterface[];
|
|
10
|
-
routeKeyName: string;
|
|
11
10
|
urlQuery: Record<string, any>;
|
|
12
11
|
defaultQuery: DataTableQuery;
|
|
13
12
|
searchable: boolean;
|
|
@@ -20,13 +19,6 @@ declare const _default: {
|
|
|
20
19
|
required: true;
|
|
21
20
|
type: StringConstructor;
|
|
22
21
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Route key name for Laravel route model binding
|
|
25
|
-
*/
|
|
26
|
-
routeKeyName: {
|
|
27
|
-
default: string;
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
};
|
|
30
22
|
/**
|
|
31
23
|
* Query params that always get applied.
|
|
32
24
|
* To add overwrite-able query params, use defaultQuery.
|
|
@@ -72,7 +64,7 @@ declare const _default: {
|
|
|
72
64
|
"onUpdate:checked-rows"?: ((...args: any[]) => any) | undefined;
|
|
73
65
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
74
66
|
"onUpdate:query"?: ((...args: any[]) => any) | undefined;
|
|
75
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "actions" | "
|
|
67
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "actions" | "urlQuery" | "defaultQuery" | "searchable" | "historyMode">;
|
|
76
68
|
$attrs: {
|
|
77
69
|
[x: string]: unknown;
|
|
78
70
|
};
|
|
@@ -94,13 +86,6 @@ declare const _default: {
|
|
|
94
86
|
required: true;
|
|
95
87
|
type: StringConstructor;
|
|
96
88
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Route key name for Laravel route model binding
|
|
99
|
-
*/
|
|
100
|
-
routeKeyName: {
|
|
101
|
-
default: string;
|
|
102
|
-
type: StringConstructor;
|
|
103
|
-
};
|
|
104
89
|
/**
|
|
105
90
|
* Query params that always get applied.
|
|
106
91
|
* To add overwrite-able query params, use defaultQuery.
|
|
@@ -152,7 +137,6 @@ declare const _default: {
|
|
|
152
137
|
query: Ref<DataTableQuery>;
|
|
153
138
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query")[], string, {
|
|
154
139
|
actions: MenuItemInterface[];
|
|
155
|
-
routeKeyName: string;
|
|
156
140
|
urlQuery: Record<string, any>;
|
|
157
141
|
defaultQuery: DataTableQuery;
|
|
158
142
|
searchable: boolean;
|
|
@@ -185,13 +169,6 @@ declare const _default: {
|
|
|
185
169
|
required: true;
|
|
186
170
|
type: StringConstructor;
|
|
187
171
|
};
|
|
188
|
-
/**
|
|
189
|
-
* Route key name for Laravel route model binding
|
|
190
|
-
*/
|
|
191
|
-
routeKeyName: {
|
|
192
|
-
default: string;
|
|
193
|
-
type: StringConstructor;
|
|
194
|
-
};
|
|
195
172
|
/**
|
|
196
173
|
* Query params that always get applied.
|
|
197
174
|
* To add overwrite-able query params, use defaultQuery.
|
|
@@ -253,13 +230,6 @@ declare const _default: {
|
|
|
253
230
|
required: true;
|
|
254
231
|
type: StringConstructor;
|
|
255
232
|
};
|
|
256
|
-
/**
|
|
257
|
-
* Route key name for Laravel route model binding
|
|
258
|
-
*/
|
|
259
|
-
routeKeyName: {
|
|
260
|
-
default: string;
|
|
261
|
-
type: StringConstructor;
|
|
262
|
-
};
|
|
263
233
|
/**
|
|
264
234
|
* Query params that always get applied.
|
|
265
235
|
* To add overwrite-able query params, use defaultQuery.
|
|
@@ -311,7 +281,6 @@ declare const _default: {
|
|
|
311
281
|
query: Ref<DataTableQuery>;
|
|
312
282
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query")[], "click" | "delete" | "checkAll" | "update:checked-rows" | "check" | "update:query", {
|
|
313
283
|
actions: MenuItemInterface[];
|
|
314
|
-
routeKeyName: string;
|
|
315
284
|
urlQuery: Record<string, any>;
|
|
316
285
|
defaultQuery: DataTableQuery;
|
|
317
286
|
searchable: boolean;
|
|
@@ -6,7 +6,6 @@ declare const _default: {
|
|
|
6
6
|
$data: {};
|
|
7
7
|
$props: Partial<{
|
|
8
8
|
actions: MenuItemInterface[];
|
|
9
|
-
routeKeyName: string;
|
|
10
9
|
urlQuery: Record<string, any>;
|
|
11
10
|
defaultQuery: DataTableQuery;
|
|
12
11
|
searchable: boolean;
|
|
@@ -31,13 +30,6 @@ declare const _default: {
|
|
|
31
30
|
required: true;
|
|
32
31
|
type: StringConstructor;
|
|
33
32
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Route key name for Laravel route model binding
|
|
36
|
-
*/
|
|
37
|
-
routeKeyName: {
|
|
38
|
-
default: string;
|
|
39
|
-
type: StringConstructor;
|
|
40
|
-
};
|
|
41
33
|
/**
|
|
42
34
|
* Query params that always get applied
|
|
43
35
|
*/
|
|
@@ -161,7 +153,7 @@ declare const _default: {
|
|
|
161
153
|
onCheckAll?: ((...args: any[]) => any) | undefined;
|
|
162
154
|
"onUpdate:checked-rows"?: ((...args: any[]) => any) | undefined;
|
|
163
155
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
164
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "actions" | "
|
|
156
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "actions" | "urlQuery" | "defaultQuery" | "searchable" | "historyMode" | "detailed" | "checkable" | "checkableActions" | "isRowCheckable" | "checkedRows" | "hasDetailedVisible" | "maxHeight" | "editButton" | "editUrl" | "deleteButton" | "deleteUrl" | "toggleable">;
|
|
165
157
|
$attrs: {
|
|
166
158
|
[x: string]: unknown;
|
|
167
159
|
};
|
|
@@ -183,13 +175,6 @@ declare const _default: {
|
|
|
183
175
|
required: true;
|
|
184
176
|
type: StringConstructor;
|
|
185
177
|
};
|
|
186
|
-
/**
|
|
187
|
-
* Route key name for Laravel route model binding
|
|
188
|
-
*/
|
|
189
|
-
routeKeyName: {
|
|
190
|
-
default: string;
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
};
|
|
193
178
|
/**
|
|
194
179
|
* Query params that always get applied
|
|
195
180
|
*/
|
|
@@ -318,7 +303,6 @@ declare const _default: {
|
|
|
318
303
|
query: import("vue").ComputedRef<DataTableQuery | null>;
|
|
319
304
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check")[], string, {
|
|
320
305
|
actions: MenuItemInterface[];
|
|
321
|
-
routeKeyName: string;
|
|
322
306
|
urlQuery: Record<string, any>;
|
|
323
307
|
defaultQuery: DataTableQuery;
|
|
324
308
|
searchable: boolean;
|
|
@@ -363,13 +347,6 @@ declare const _default: {
|
|
|
363
347
|
required: true;
|
|
364
348
|
type: StringConstructor;
|
|
365
349
|
};
|
|
366
|
-
/**
|
|
367
|
-
* Route key name for Laravel route model binding
|
|
368
|
-
*/
|
|
369
|
-
routeKeyName: {
|
|
370
|
-
default: string;
|
|
371
|
-
type: StringConstructor;
|
|
372
|
-
};
|
|
373
350
|
/**
|
|
374
351
|
* Query params that always get applied
|
|
375
352
|
*/
|
|
@@ -508,13 +485,6 @@ declare const _default: {
|
|
|
508
485
|
required: true;
|
|
509
486
|
type: StringConstructor;
|
|
510
487
|
};
|
|
511
|
-
/**
|
|
512
|
-
* Route key name for Laravel route model binding
|
|
513
|
-
*/
|
|
514
|
-
routeKeyName: {
|
|
515
|
-
default: string;
|
|
516
|
-
type: StringConstructor;
|
|
517
|
-
};
|
|
518
488
|
/**
|
|
519
489
|
* Query params that always get applied
|
|
520
490
|
*/
|
|
@@ -643,7 +613,6 @@ declare const _default: {
|
|
|
643
613
|
query: import("vue").ComputedRef<DataTableQuery | null>;
|
|
644
614
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "delete" | "checkAll" | "update:checked-rows" | "check")[], "click" | "delete" | "checkAll" | "update:checked-rows" | "check", {
|
|
645
615
|
actions: MenuItemInterface[];
|
|
646
|
-
routeKeyName: string;
|
|
647
616
|
urlQuery: Record<string, any>;
|
|
648
617
|
defaultQuery: DataTableQuery;
|
|
649
618
|
searchable: boolean;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
to: {
|
|
5
|
+
required: true;
|
|
6
|
+
type: PropType<RouteLocationRaw>;
|
|
7
|
+
};
|
|
8
|
+
title: {
|
|
9
|
+
required: true;
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
description: {
|
|
13
|
+
default: null;
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
linkText: {
|
|
17
|
+
default: null;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
default: string;
|
|
22
|
+
type: PropType<"gray" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink">;
|
|
23
|
+
};
|
|
24
|
+
icon: {
|
|
25
|
+
required: true;
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
contrast: {
|
|
29
|
+
default: string;
|
|
30
|
+
type: PropType<"high" | "low">;
|
|
31
|
+
};
|
|
32
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
to: {
|
|
34
|
+
required: true;
|
|
35
|
+
type: PropType<RouteLocationRaw>;
|
|
36
|
+
};
|
|
37
|
+
title: {
|
|
38
|
+
required: true;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
description: {
|
|
42
|
+
default: null;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
linkText: {
|
|
46
|
+
default: null;
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
};
|
|
49
|
+
color: {
|
|
50
|
+
default: string;
|
|
51
|
+
type: PropType<"gray" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink">;
|
|
52
|
+
};
|
|
53
|
+
icon: {
|
|
54
|
+
required: true;
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
};
|
|
57
|
+
contrast: {
|
|
58
|
+
default: string;
|
|
59
|
+
type: PropType<"high" | "low">;
|
|
60
|
+
};
|
|
61
|
+
}>>, {
|
|
62
|
+
color: "gray" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink";
|
|
63
|
+
description: string;
|
|
64
|
+
contrast: "high" | "low";
|
|
65
|
+
linkText: string;
|
|
66
|
+
}>;
|
|
67
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
label: {
|
|
4
|
+
default: null;
|
|
5
|
+
type: PropType<string | null>;
|
|
6
|
+
};
|
|
7
|
+
primaryValue: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
secondaryValue: {
|
|
12
|
+
default: null;
|
|
13
|
+
type: PropType<string | null>;
|
|
14
|
+
};
|
|
15
|
+
trend: {
|
|
16
|
+
default: null;
|
|
17
|
+
type: PropType<"up" | "down" | null>;
|
|
18
|
+
};
|
|
19
|
+
caption: {
|
|
20
|
+
default: null;
|
|
21
|
+
type: PropType<string | null>;
|
|
22
|
+
};
|
|
23
|
+
}, unknown, unknown, {
|
|
24
|
+
backgroundClass(): string;
|
|
25
|
+
textClass(): string;
|
|
26
|
+
iconClass(): string;
|
|
27
|
+
icon(): string;
|
|
28
|
+
centerClass(): string;
|
|
29
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
|
+
label: {
|
|
31
|
+
default: null;
|
|
32
|
+
type: PropType<string | null>;
|
|
33
|
+
};
|
|
34
|
+
primaryValue: {
|
|
35
|
+
required: true;
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
secondaryValue: {
|
|
39
|
+
default: null;
|
|
40
|
+
type: PropType<string | null>;
|
|
41
|
+
};
|
|
42
|
+
trend: {
|
|
43
|
+
default: null;
|
|
44
|
+
type: PropType<"up" | "down" | null>;
|
|
45
|
+
};
|
|
46
|
+
caption: {
|
|
47
|
+
default: null;
|
|
48
|
+
type: PropType<string | null>;
|
|
49
|
+
};
|
|
50
|
+
}>>, {
|
|
51
|
+
caption: string | null;
|
|
52
|
+
label: string | null;
|
|
53
|
+
secondaryValue: string | null;
|
|
54
|
+
trend: "up" | "down" | null;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TimelineItem } from '../types/TimelineItem';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
items: {
|
|
5
|
+
required: true;
|
|
6
|
+
type: PropType<TimelineItem[]>;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
items: {
|
|
10
|
+
required: true;
|
|
11
|
+
type: PropType<TimelineItem[]>;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TimelineItem } from '../types/TimelineItem';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
item: {
|
|
5
|
+
required: true;
|
|
6
|
+
type: PropType<TimelineItem>;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
item: {
|
|
10
|
+
required: true;
|
|
11
|
+
type: PropType<TimelineItem>;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>;
|
|
14
|
+
export default _default;
|
|
@@ -49,9 +49,11 @@ import BaseProgressCircle from './BaseProgressCircle.vue';
|
|
|
49
49
|
import BaseRadioGroup from './BaseRadioGroup.vue';
|
|
50
50
|
import BaseReadMore from './BaseReadMore.vue';
|
|
51
51
|
import BaseSelect from './BaseSelect.vue';
|
|
52
|
+
import BaseShortcut from './BaseShortcut.vue';
|
|
52
53
|
import BaseSideNavigation from './BaseSideNavigation.vue';
|
|
53
54
|
import BaseSideNavigationItem from './BaseSideNavigationItem.vue';
|
|
54
55
|
import BaseSkeleton from './BaseSkeleton.vue';
|
|
56
|
+
import BaseStatistic from './BaseStatistic.vue';
|
|
55
57
|
import BaseSwitch from './BaseSwitch.vue';
|
|
56
58
|
import BaseSystemAlert from './BaseSystemAlert.vue';
|
|
57
59
|
import BaseTabs from './BaseTabs.vue';
|
|
@@ -62,8 +64,10 @@ import BaseTable from './BaseTable.vue';
|
|
|
62
64
|
import BaseTableColumn from './BaseTableColumn.vue';
|
|
63
65
|
import BaseTextarea from './BaseTextarea.vue';
|
|
64
66
|
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
67
|
+
import BaseTimeline from './BaseTimeline.vue';
|
|
68
|
+
import BaseTimelineItem from './BaseTimelineItem.vue';
|
|
65
69
|
import BaseLayoutStacked from './BaseLayoutStacked.vue';
|
|
66
70
|
import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
|
|
67
71
|
import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
|
|
68
72
|
import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
|
|
69
|
-
export { BaseActionItem, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseBadge, BaseBelongsTo, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, 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, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseSelect, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
|
73
|
+
export { BaseActionItem, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseBadge, BaseBelongsTo, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, 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, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
|
@@ -4,7 +4,6 @@ import { I18n } from 'vue-i18n';
|
|
|
4
4
|
import { useDialogsStore } from './stores/dialogs';
|
|
5
5
|
import { useNotificationsStore } from './stores/notifications';
|
|
6
6
|
import { useSystemAlertStore } from './stores/systemAlerts';
|
|
7
|
-
import { ActionItem } from './types/types';
|
|
8
7
|
declare const messages: {
|
|
9
8
|
en: {
|
|
10
9
|
sui: {
|
|
@@ -292,4 +291,3 @@ export { config };
|
|
|
292
291
|
export { useDialogsStore };
|
|
293
292
|
export { useNotificationsStore };
|
|
294
293
|
export { useSystemAlertStore };
|
|
295
|
-
export { type ActionItem };
|
package/package.json
CHANGED
|
@@ -224,14 +224,6 @@ const props = defineProps({
|
|
|
224
224
|
type: String,
|
|
225
225
|
},
|
|
226
226
|
|
|
227
|
-
/**
|
|
228
|
-
* Route key name for Laravel route model binding
|
|
229
|
-
*/
|
|
230
|
-
routeKeyName: {
|
|
231
|
-
default: 'id',
|
|
232
|
-
type: String,
|
|
233
|
-
},
|
|
234
|
-
|
|
235
227
|
/**
|
|
236
228
|
* Query params that always get applied.
|
|
237
229
|
* To add overwrite-able query params, use defaultQuery.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<BaseDataIterator
|
|
3
3
|
ref="dataIterator"
|
|
4
4
|
:url="url"
|
|
5
|
-
:route-key-name="routeKeyName"
|
|
6
5
|
:url-query="urlQuery"
|
|
7
6
|
:default-query="defaultQuery"
|
|
8
7
|
:searchable="searchable"
|
|
@@ -194,14 +193,6 @@ const props = defineProps({
|
|
|
194
193
|
type: String,
|
|
195
194
|
},
|
|
196
195
|
|
|
197
|
-
/**
|
|
198
|
-
* Route key name for Laravel route model binding
|
|
199
|
-
*/
|
|
200
|
-
routeKeyName: {
|
|
201
|
-
default: 'id',
|
|
202
|
-
type: String,
|
|
203
|
-
},
|
|
204
|
-
|
|
205
196
|
/**
|
|
206
197
|
* Query params that always get applied
|
|
207
198
|
*/
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import BaseShortcut from './BaseShortcut.vue';
|
|
2
|
+
|
|
3
|
+
const colors = [
|
|
4
|
+
'gray',
|
|
5
|
+
'red',
|
|
6
|
+
'orange',
|
|
7
|
+
'yellow',
|
|
8
|
+
'green',
|
|
9
|
+
'blue',
|
|
10
|
+
'indigo',
|
|
11
|
+
'purple',
|
|
12
|
+
'pink',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const sizes = ['base', 'lg'];
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'Components/BaseShortcut',
|
|
19
|
+
component: BaseShortcut,
|
|
20
|
+
argTypes: {
|
|
21
|
+
color: {
|
|
22
|
+
control: { type: 'select' },
|
|
23
|
+
options: colors,
|
|
24
|
+
},
|
|
25
|
+
contrast: {
|
|
26
|
+
control: { type: 'select' },
|
|
27
|
+
options: ['low', 'high'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const Template = (args) => ({
|
|
33
|
+
components: { BaseShortcut },
|
|
34
|
+
setup() {
|
|
35
|
+
return { args };
|
|
36
|
+
},
|
|
37
|
+
template: `
|
|
38
|
+
<BaseShortcut v-bind="args">
|
|
39
|
+
</BaseShortcut>
|
|
40
|
+
`,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const Basic = Template.bind({});
|
|
44
|
+
Basic.args = {
|
|
45
|
+
to: '/restaurants',
|
|
46
|
+
title: 'Basic shortcut',
|
|
47
|
+
icon: 'heroicons:user',
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Colors = (args) => ({
|
|
51
|
+
components: { BaseShortcut },
|
|
52
|
+
setup() {
|
|
53
|
+
return { args, colors, sizes };
|
|
54
|
+
},
|
|
55
|
+
template: `
|
|
56
|
+
<div v-for="color in colors" :key="color">
|
|
57
|
+
<p class="text-xs text-slate-600 leading-tight my-2">{{ color }}</p>
|
|
58
|
+
<BaseShortcut v-bind="args" :color="color" icon="heroicons:beaker-20-solid"></BaseShortcut>
|
|
59
|
+
</div>
|
|
60
|
+
`,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
Colors.args = {
|
|
64
|
+
contrast: 'high',
|
|
65
|
+
to: '/restaurants',
|
|
66
|
+
title: 'Contrast example',
|
|
67
|
+
description:
|
|
68
|
+
'Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée à titre provisoire pour calibrer une mise en page',
|
|
69
|
+
linkText: 'Open app',
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const Contrast = (args) => ({
|
|
73
|
+
components: { BaseShortcut },
|
|
74
|
+
setup() {
|
|
75
|
+
return { args, colors, sizes };
|
|
76
|
+
},
|
|
77
|
+
template: `
|
|
78
|
+
<div v-for="color in colors" :key="color">
|
|
79
|
+
<p class="text-xs text-slate-600 leading-tight my-2">{{ color }}</p>
|
|
80
|
+
<BaseShortcut v-bind="args" :color="color" icon="heroicons:beaker-20-solid"></BaseShortcut>
|
|
81
|
+
</div>
|
|
82
|
+
`,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
Contrast.args = {
|
|
86
|
+
contrast: 'low',
|
|
87
|
+
to: '/restaurants',
|
|
88
|
+
title: 'Contrast example',
|
|
89
|
+
description:
|
|
90
|
+
'Le lorem ipsum est, en imprimerie, une suite de mots sans signification utilisée à titre provisoire pour calibrer une mise en page',
|
|
91
|
+
linkText: 'Open app',
|
|
92
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseCard class="inline-flex max-w-sm duration-200 hover:bg-slate-50">
|
|
3
|
+
<router-link :to="to">
|
|
4
|
+
<section class="whitespace-pre-line p-4">
|
|
5
|
+
<!-- Icon -->
|
|
6
|
+
<div
|
|
7
|
+
class="mb-2.5 inline-flex items-center rounded p-2"
|
|
8
|
+
:class="[colorClasses]"
|
|
9
|
+
>
|
|
10
|
+
<BaseIcon
|
|
11
|
+
v-if="icon"
|
|
12
|
+
:icon="icon"
|
|
13
|
+
:class="iconSizeClasses"
|
|
14
|
+
></BaseIcon>
|
|
15
|
+
</div>
|
|
16
|
+
<!-- Title -->
|
|
17
|
+
<div class="text-md font-semibold">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</div>
|
|
20
|
+
<!-- Description -->
|
|
21
|
+
<div
|
|
22
|
+
v-if="description"
|
|
23
|
+
class="mt-1 mb-3 whitespace-pre-line text-sm text-slate-500 line-clamp-2"
|
|
24
|
+
>
|
|
25
|
+
{{ description }}
|
|
26
|
+
</div>
|
|
27
|
+
<!-- Text link -->
|
|
28
|
+
<div
|
|
29
|
+
v-if="linkText"
|
|
30
|
+
class="flex items-center justify-start text-sm font-medium"
|
|
31
|
+
>
|
|
32
|
+
<div class="mr-1 leading-none">{{ linkText }}</div>
|
|
33
|
+
<div>
|
|
34
|
+
<BaseIcon
|
|
35
|
+
icon="heroicons:arrow-right-20-solid"
|
|
36
|
+
class="mt-px h-4 w-4"
|
|
37
|
+
></BaseIcon>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</section>
|
|
41
|
+
</router-link>
|
|
42
|
+
</BaseCard>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script lang="ts" setup>
|
|
46
|
+
import { PropType } from 'vue';
|
|
47
|
+
import { BaseIcon } from '.';
|
|
48
|
+
import BaseCard from './BaseCard.vue';
|
|
49
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
50
|
+
|
|
51
|
+
const props = defineProps({
|
|
52
|
+
to: {
|
|
53
|
+
required: true,
|
|
54
|
+
type: [String, Object] as PropType<RouteLocationRaw>,
|
|
55
|
+
},
|
|
56
|
+
title: {
|
|
57
|
+
required: true,
|
|
58
|
+
type: String,
|
|
59
|
+
},
|
|
60
|
+
description: {
|
|
61
|
+
default: null,
|
|
62
|
+
type: String,
|
|
63
|
+
},
|
|
64
|
+
linkText: {
|
|
65
|
+
default: null,
|
|
66
|
+
type: String,
|
|
67
|
+
},
|
|
68
|
+
color: {
|
|
69
|
+
default: 'gray',
|
|
70
|
+
type: String as PropType<
|
|
71
|
+
| 'gray'
|
|
72
|
+
| 'red'
|
|
73
|
+
| 'orange'
|
|
74
|
+
| 'yellow'
|
|
75
|
+
| 'green'
|
|
76
|
+
| 'blue'
|
|
77
|
+
| 'indigo'
|
|
78
|
+
| 'purple'
|
|
79
|
+
| 'pink'
|
|
80
|
+
>,
|
|
81
|
+
},
|
|
82
|
+
icon: {
|
|
83
|
+
required: true,
|
|
84
|
+
type: String,
|
|
85
|
+
},
|
|
86
|
+
contrast: {
|
|
87
|
+
default: 'low',
|
|
88
|
+
type: String as PropType<'low' | 'high'>,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const colorClasses = computed(() => {
|
|
93
|
+
if (props.color == 'gray') {
|
|
94
|
+
if (props.contrast == 'high') {
|
|
95
|
+
return 'bg-slate-600 text-white';
|
|
96
|
+
}
|
|
97
|
+
return 'bg-slate-100 text-slate-800 border border-slate-300';
|
|
98
|
+
}
|
|
99
|
+
if (props.color == 'red') {
|
|
100
|
+
if (props.contrast == 'high') {
|
|
101
|
+
return 'bg-red-600 text-white';
|
|
102
|
+
}
|
|
103
|
+
return 'bg-red-100 text-red-700 border border-red-300';
|
|
104
|
+
}
|
|
105
|
+
if (props.color == 'orange') {
|
|
106
|
+
if (props.contrast == 'high') {
|
|
107
|
+
return 'bg-orange-500 text-white';
|
|
108
|
+
}
|
|
109
|
+
return 'bg-orange-100 text-yellow-700 border border-orange-300';
|
|
110
|
+
}
|
|
111
|
+
if (props.color == 'yellow') {
|
|
112
|
+
if (props.contrast == 'high') {
|
|
113
|
+
return 'bg-yellow-500 text-white';
|
|
114
|
+
}
|
|
115
|
+
return 'bg-yellow-100 text-yellow-700 border border-yellow-300';
|
|
116
|
+
}
|
|
117
|
+
if (props.color == 'green') {
|
|
118
|
+
if (props.contrast == 'high') {
|
|
119
|
+
return 'bg-green-600 text-white';
|
|
120
|
+
}
|
|
121
|
+
return 'bg-green-100 text-green-700 border border-green-300';
|
|
122
|
+
}
|
|
123
|
+
if (props.color == 'blue') {
|
|
124
|
+
if (props.contrast == 'high') {
|
|
125
|
+
return 'bg-blue-600 text-white';
|
|
126
|
+
}
|
|
127
|
+
return 'bg-blue-100 text-blue-700 border border-blue-300';
|
|
128
|
+
}
|
|
129
|
+
if (props.color == 'indigo') {
|
|
130
|
+
if (props.contrast == 'high') {
|
|
131
|
+
return 'bg-indigo-600 text-white';
|
|
132
|
+
}
|
|
133
|
+
return 'bg-indigo-100 text-indigo-700 border border-indigo-300';
|
|
134
|
+
}
|
|
135
|
+
if (props.color == 'purple') {
|
|
136
|
+
if (props.contrast == 'high') {
|
|
137
|
+
return 'bg-purple-600 text-white';
|
|
138
|
+
}
|
|
139
|
+
return 'bg-purple-100 text-purple-700 border border-purple-300';
|
|
140
|
+
}
|
|
141
|
+
if (props.color == 'pink') {
|
|
142
|
+
if (props.contrast == 'high') {
|
|
143
|
+
return 'bg-pink-600 text-white';
|
|
144
|
+
}
|
|
145
|
+
return 'bg-pink-100 text-pink-700 border border-pink-300';
|
|
146
|
+
}
|
|
147
|
+
return 'bg-slate-100 text-slate-700 border border-slate-300';
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const iconSizeClasses = computed(() => {
|
|
151
|
+
return 'h-4 w-4';
|
|
152
|
+
});
|
|
153
|
+
</script>
|