sprintify-ui 0.1.18 → 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.
- package/README.md +1 -2
- package/dist/sprintify-ui.es.js +15696 -13336
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseActionItem.vue.d.ts +3 -3
- package/dist/types/src/components/BaseActionItemButton.vue.d.ts +9 -6
- package/dist/types/src/components/BaseAddressForm.vue.d.ts +17 -27
- package/dist/types/src/components/BaseAlert.vue.d.ts +1 -1
- package/dist/types/src/components/BaseApp.vue.d.ts +2 -2
- package/dist/types/src/components/BaseAppDialogs.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAppNotifications.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +33 -28
- package/dist/types/src/components/BaseAutocompleteDrawer.vue.d.ts +12 -11
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +12 -15
- package/dist/types/src/components/BaseAvatar.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAvatarGroup.vue.d.ts +1 -1
- package/dist/types/src/components/BaseBadge.vue.d.ts +9 -6
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +12 -15
- package/dist/types/src/components/BaseBoolean.vue.d.ts +3 -3
- package/dist/types/src/components/BaseBreadcrumbs.vue.d.ts +1 -1
- package/dist/types/src/components/BaseButton.vue.d.ts +1 -1
- package/dist/types/src/components/BaseButtonGroup.vue.d.ts +13 -13
- package/dist/types/src/components/BaseCard.vue.d.ts +2 -2
- package/dist/types/src/components/BaseCardRow.vue.d.ts +1 -1
- package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +1 -1
- package/dist/types/src/components/BaseClickOutside.vue.d.ts +2 -2
- package/dist/types/src/components/BaseClipboard.vue.d.ts +2 -2
- package/dist/types/src/components/BaseColor.vue.d.ts +2 -2
- package/dist/types/src/components/BaseContainer.vue.d.ts +1 -1
- package/dist/types/src/components/BaseCounter.vue.d.ts +1 -1
- package/dist/types/src/components/BaseCropper.vue.d.ts +21 -19
- package/dist/types/src/components/BaseCropperModal.vue.d.ts +3 -3
- package/dist/types/src/components/BaseDataIterator.vue.d.ts +9 -9
- package/dist/types/src/components/BaseDataIteratorSectionBox.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDataIteratorSectionButton.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDataIteratorSectionColumns.vue.d.ts +141 -169
- package/dist/types/src/components/BaseDataIteratorSectionModal.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDataTable.vue.d.ts +15 -13
- package/dist/types/src/components/BaseDataTableRowAction.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +9 -6
- package/dist/types/src/components/BaseDateSelect.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDescriptionList.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDescriptionListItem.vue.d.ts +3 -3
- package/dist/types/src/components/BaseDialog.vue.d.ts +2 -2
- package/dist/types/src/components/BaseDisplayRelativeTime.vue.d.ts +3 -3
- package/dist/types/src/components/BaseDraggable.vue.d.ts +3 -3
- package/dist/types/src/components/BaseDropdown.vue.d.ts +13 -10
- package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +7 -7
- package/dist/types/src/components/BaseField.vue.d.ts +3 -3
- package/dist/types/src/components/BaseFieldI18n.vue.d.ts +9 -12
- package/dist/types/src/components/BaseFilePicker.vue.d.ts +13 -10
- package/dist/types/src/components/BaseFilePickerCrop.vue.d.ts +13 -10
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +40 -13
- package/dist/types/src/components/BaseForm.vue.d.ts +24 -21
- package/dist/types/src/components/BaseHasMany.vue.d.ts +13 -16
- package/dist/types/src/components/BaseHeader.vue.d.ts +7 -4
- package/dist/types/src/components/BaseIconPicker.vue.d.ts +6 -3
- package/dist/types/src/components/BaseInput.vue.d.ts +5 -5
- package/dist/types/src/components/BaseInputError.vue.d.ts +2 -2
- package/dist/types/src/components/BaseInputLabel.vue.d.ts +1 -1
- package/dist/types/src/components/BaseInputPercent.vue.d.ts +4 -4
- package/dist/types/src/components/BaseLayoutNotificationDropdown.vue.d.ts +1 -1
- package/dist/types/src/components/BaseLayoutNotificationItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseLayoutNotificationItemContent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseLayoutSidebar.vue.d.ts +4 -4
- package/dist/types/src/components/BaseLayoutSidebarConfigurable.vue.d.ts +3 -3
- package/dist/types/src/components/BaseLayoutStacked.vue.d.ts +4 -4
- package/dist/types/src/components/BaseLayoutStackedConfigurable.vue.d.ts +2 -2
- package/dist/types/src/components/BaseLoadingCover.vue.d.ts +8 -8
- package/dist/types/src/components/BaseMediaGallery.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaGalleryItem.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +26 -8
- package/dist/types/src/components/BaseMediaList.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaListItem.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaPictures.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaPicturesItem.vue.d.ts +2 -2
- package/dist/types/src/components/BaseMediaPreview.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMenu.vue.d.ts +19 -19
- package/dist/types/src/components/BaseMenuItem.vue.d.ts +2 -2
- package/dist/types/src/components/BaseModalCenter.vue.d.ts +13 -12
- package/dist/types/src/components/BaseModalSide.vue.d.ts +13 -12
- package/dist/types/src/components/BaseNavbar.vue.d.ts +10 -7
- package/dist/types/src/components/BaseNavbarItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNavbarItemContent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNavbarSideItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNavbarSideItemContent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNumber.vue.d.ts +4 -4
- package/dist/types/src/components/BasePagination.vue.d.ts +1 -1
- package/dist/types/src/components/BasePanel.vue.d.ts +1 -1
- package/dist/types/src/components/BasePassword.vue.d.ts +3 -3
- package/dist/types/src/components/BaseProgressCircle.vue.d.ts +1 -1
- package/dist/types/src/components/BaseRadioGroup.vue.d.ts +7 -7
- package/dist/types/src/components/BaseReadMore.vue.d.ts +2 -2
- package/dist/types/src/components/BaseRichText.vue.d.ts +6 -6
- package/dist/types/src/components/BaseSelect.vue.d.ts +8 -7
- package/dist/types/src/components/BaseShortcut.vue.d.ts +1 -1
- package/dist/types/src/components/BaseSideNavigation.vue.d.ts +8 -5
- package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +9 -6
- package/dist/types/src/components/BaseSkeleton.vue.d.ts +8 -7
- package/dist/types/src/components/BaseStatistic.vue.d.ts +1 -1
- package/dist/types/src/components/BaseStepper.vue.d.ts +1 -1
- package/dist/types/src/components/BaseStepperItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseSwitch.vue.d.ts +3 -3
- package/dist/types/src/components/BaseSystemAlert.vue.d.ts +5 -5
- package/dist/types/src/components/BaseTabItem.vue.d.ts +9 -6
- package/dist/types/src/components/BaseTable.vue.d.ts +6 -6
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +2 -2
- package/dist/types/src/components/BaseTabs.vue.d.ts +8 -5
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +39 -34
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +12 -15
- package/dist/types/src/components/BaseTextarea.vue.d.ts +3 -3
- package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +13 -3
- package/dist/types/src/components/BaseTimeline.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTimelineItem.vue.d.ts +1 -1
- package/dist/types/src/components/SlotComponent.d.ts +1 -1
- package/dist/types/src/svg/BaseEmptyState.vue.d.ts +1 -1
- package/dist/types/src/svg/BaseSpinnerLarge.vue.d.ts +1 -1
- package/dist/types/src/svg/BaseSpinnerSmall.vue.d.ts +1 -1
- package/package.json +4 -5
- package/src/components/BaseAutocomplete.vue +3 -3
- package/src/components/BaseAutocompleteDrawer.vue +2 -2
- package/src/components/BaseButtonGroup.stories.js +5 -4
- package/src/components/BaseButtonGroup.vue +5 -5
- package/src/components/BaseColor.vue +3 -3
- package/src/components/BaseDataIterator.vue +1 -1
- package/src/components/BaseDataTable.stories.js +1 -1
- package/src/components/BaseDataTable.vue +1 -1
- package/src/components/BaseDropdownAutocomplete.vue +5 -3
- package/src/components/BaseFilePicker.vue +3 -3
- package/src/components/BaseFilePickerCrop.stories.js +3 -3
- package/src/components/BaseFilePickerCrop.vue +3 -3
- package/src/components/BaseFileUploader.stories.js +3 -3
- package/src/components/BaseFileUploader.vue +4 -4
- package/src/components/BaseForm.vue +5 -4
- package/src/components/BaseLayoutNotificationDropdown.vue +1 -1
- package/src/components/BaseLayoutStackedConfigurable.vue +1 -1
- package/src/components/BaseLoadingCover.stories.js +2 -2
- package/src/components/BaseLoadingCover.vue +14 -7
- package/src/components/BaseMediaLibrary.vue +1 -1
- package/src/components/BaseMenu.vue +20 -12
- package/src/components/BaseModalCenter.vue +13 -7
- package/src/components/BaseModalSide.vue +12 -6
- package/src/components/BaseNavbar.stories.js +1 -1
- package/src/components/BaseRadioGroup.vue +2 -2
- package/src/components/BaseSkeleton.vue +21 -5
- package/src/components/BaseTagAutocomplete.stories.js +1 -1
- package/src/components/BaseTagAutocomplete.vue +6 -5
- package/src/components/BaseTextarea.vue +2 -2
- package/src/components/BaseTextareaAutoresize.stories.js +30 -1
- package/src/components/BaseTextareaAutoresize.vue +19 -13
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
|
2
3
|
modelValue: {
|
|
3
4
|
default: string;
|
|
@@ -39,6 +40,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
40
|
default: boolean;
|
|
40
41
|
type: BooleanConstructor;
|
|
41
42
|
};
|
|
43
|
+
twTextarea: {
|
|
44
|
+
default: string;
|
|
45
|
+
type: PropType<string | string[]>;
|
|
46
|
+
};
|
|
42
47
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "submit" | "update:modelValue" | "focus")[], "input" | "submit" | "update:modelValue" | "focus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
48
|
modelValue: {
|
|
44
49
|
default: string;
|
|
@@ -80,19 +85,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
85
|
default: boolean;
|
|
81
86
|
type: BooleanConstructor;
|
|
82
87
|
};
|
|
88
|
+
twTextarea: {
|
|
89
|
+
default: string;
|
|
90
|
+
type: PropType<string | string[]>;
|
|
91
|
+
};
|
|
83
92
|
}>> & {
|
|
84
93
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
85
94
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
86
95
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
87
96
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
88
97
|
}, {
|
|
89
|
-
required: boolean;
|
|
90
|
-
modelValue: string;
|
|
91
98
|
placeholder: string;
|
|
92
99
|
disabled: boolean;
|
|
100
|
+
required: boolean;
|
|
101
|
+
modelValue: string;
|
|
93
102
|
hasError: boolean;
|
|
94
103
|
maxHeight: number;
|
|
95
104
|
rows: number;
|
|
96
105
|
submitOnEnter: boolean;
|
|
97
|
-
|
|
106
|
+
twTextarea: string | string[];
|
|
107
|
+
}, {}>;
|
|
98
108
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"build-fast": "rimraf dist && vite build",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
19
19
|
"@tailwindcss/forms": "^0.5.3",
|
|
20
|
-
"@tailwindcss/line-clamp": "^0.4.2",
|
|
21
20
|
"@tailwindcss/typography": "^0.5.8",
|
|
22
21
|
"@vueup/vue-quill": "^1.0.0",
|
|
23
22
|
"@vueuse/core": "^10.0.0",
|
|
@@ -33,13 +32,14 @@
|
|
|
33
32
|
"pinia": "^2.0.0",
|
|
34
33
|
"qs": "^6.0.0",
|
|
35
34
|
"sortablejs": "^1.15.0",
|
|
36
|
-
"tailwindcss": "^3.
|
|
35
|
+
"tailwindcss": "^3.3.0",
|
|
37
36
|
"vue": "^3.0.0",
|
|
38
37
|
"vue-router": "^4.0.0"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
40
|
"@headlessui/vue": "^1.7.12",
|
|
42
|
-
"color2k": "^2.0.2"
|
|
41
|
+
"color2k": "^2.0.2",
|
|
42
|
+
"tailwind-merge": "^1.12.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.20.12",
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"@storybook/vue3": "^6.5.16",
|
|
56
56
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
57
57
|
"@tailwindcss/forms": "^0.5.3",
|
|
58
|
-
"@tailwindcss/line-clamp": "^0.4.2",
|
|
59
58
|
"@tailwindcss/typography": "^0.5.9",
|
|
60
59
|
"@types/croppie": "^2.6.1",
|
|
61
60
|
"@types/google.maps": "^3.51.1",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
@keydown="onTextKeydown"
|
|
51
51
|
/>
|
|
52
52
|
<div
|
|
53
|
-
class="pointer-events-none absolute
|
|
53
|
+
class="pointer-events-none absolute left-0 top-0 flex h-full items-center justify-center"
|
|
54
54
|
:class="[iconWrapClass]"
|
|
55
55
|
>
|
|
56
56
|
<BaseIcon
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
<div
|
|
66
66
|
v-if="normalizedModelValue && !disabled && showModelValue"
|
|
67
|
-
class="absolute
|
|
67
|
+
class="absolute right-0 top-0 flex h-full items-center p-1"
|
|
68
68
|
>
|
|
69
69
|
<button
|
|
70
70
|
type="button"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
:size="size"
|
|
98
98
|
:loading="loading"
|
|
99
99
|
:loading-bottom="loadingBottom"
|
|
100
|
-
:drawer
|
|
100
|
+
:tw-drawer="inline ? 'pt-1' : 'p-1'"
|
|
101
101
|
:keywords="keywords"
|
|
102
102
|
@select="onSelect"
|
|
103
103
|
@scroll-bottom="emit('scrollBottom')"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</slot>
|
|
16
16
|
|
|
17
17
|
<!-- Option list -->
|
|
18
|
-
<ul v-else :class="
|
|
18
|
+
<ul v-else :class="twDrawer">
|
|
19
19
|
<li
|
|
20
20
|
v-for="(option, index) in options"
|
|
21
21
|
:key="option.value ? option.value : 'null'"
|
|
@@ -133,7 +133,7 @@ const props = defineProps({
|
|
|
133
133
|
type: String as PropType<'xs' | 'sm' | 'base'>,
|
|
134
134
|
default: 'base',
|
|
135
135
|
},
|
|
136
|
-
|
|
136
|
+
twDrawer: {
|
|
137
137
|
type: String,
|
|
138
138
|
default: '',
|
|
139
139
|
},
|
|
@@ -65,12 +65,13 @@ export const SlotOption = (args) => ({
|
|
|
65
65
|
v-bind="args"
|
|
66
66
|
v-model="value"
|
|
67
67
|
:options="options"
|
|
68
|
-
button
|
|
69
|
-
button-selected
|
|
68
|
+
tw-button="btn btn-xl"
|
|
69
|
+
tw-button-selected="btn-black"
|
|
70
|
+
tw-button-unselected="btn-secondary-outline"
|
|
70
71
|
>
|
|
71
72
|
<template #option="{ option }">
|
|
72
|
-
<div class="flex items-center space-x-
|
|
73
|
-
<div class="w-3 h-3 rounded" :style="{ backgroundColor: option.value }"></div>
|
|
73
|
+
<div class="flex items-center space-x-2 font-semibold">
|
|
74
|
+
<div class="w-3 h-3 rounded border border-white" :style="{ backgroundColor: option.value }"></div>
|
|
74
75
|
<div>{{ option.label }}</div>
|
|
75
76
|
</div>
|
|
76
77
|
</template>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
:type="buttonType"
|
|
10
10
|
:disabled="disabled"
|
|
11
11
|
:class="[
|
|
12
|
-
|
|
13
|
-
isSelected(option) ?
|
|
12
|
+
twButton,
|
|
13
|
+
isSelected(option) ? twButtonSelected : twButtonUnselected,
|
|
14
14
|
]"
|
|
15
15
|
@click="onSelect(option)"
|
|
16
16
|
>
|
|
@@ -53,15 +53,15 @@ const props = defineProps({
|
|
|
53
53
|
default: 'button',
|
|
54
54
|
type: String as PropType<'button' | 'submit'>,
|
|
55
55
|
},
|
|
56
|
-
|
|
56
|
+
twButton: {
|
|
57
57
|
default: 'btn btn-sm',
|
|
58
58
|
type: String,
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
twButtonSelected: {
|
|
61
61
|
default: 'btn-primary',
|
|
62
62
|
type: String,
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
twButtonUnselected: {
|
|
65
65
|
default: '',
|
|
66
66
|
type: String,
|
|
67
67
|
},
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
:options="colorOptions"
|
|
10
10
|
:multiple="multiple"
|
|
11
11
|
:button-type="buttonType"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
tw-button=""
|
|
13
|
+
tw-button-selected=""
|
|
14
|
+
tw-button-unselected=""
|
|
15
15
|
@update:model-value="(value) => transformModelValue(value)"
|
|
16
16
|
>
|
|
17
17
|
<template #option="option">
|
|
@@ -52,7 +52,7 @@ const template = `
|
|
|
52
52
|
<div class="font-medium text-slate-900 leading-tight truncate">
|
|
53
53
|
{{ row.title }}
|
|
54
54
|
</div>
|
|
55
|
-
<p
|
|
55
|
+
<p class="text-xs leading-tight mt-1 text-slate-500 line-clamp-2">
|
|
56
56
|
{{ row.subtitle }}
|
|
57
57
|
</p>
|
|
58
58
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<template #option="optionProps">
|
|
32
32
|
<div
|
|
33
33
|
:class="[optionProps.active ? 'bg-slate-100' : 'bg-white']"
|
|
34
|
-
class="mb-px flex items-center rounded
|
|
34
|
+
class="mb-px flex items-center rounded px-1 py-1"
|
|
35
35
|
>
|
|
36
36
|
<div class="flex grow items-center">
|
|
37
37
|
<slot
|
|
@@ -126,7 +126,7 @@ const props = defineProps({
|
|
|
126
126
|
|
|
127
127
|
const emit = defineEmits(['update:model-value', 'close']);
|
|
128
128
|
|
|
129
|
-
const componentName = computed(() => {
|
|
129
|
+
const componentName = computed<any>(() => {
|
|
130
130
|
if (props.multiple) {
|
|
131
131
|
if (props.url) {
|
|
132
132
|
return BaseTagAutocompleteFetch;
|
|
@@ -141,10 +141,12 @@ const componentName = computed(() => {
|
|
|
141
141
|
if (props.url) {
|
|
142
142
|
return BaseAutocompleteFetch;
|
|
143
143
|
}
|
|
144
|
+
|
|
144
145
|
if (props.options) {
|
|
145
146
|
return BaseAutocomplete;
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
+
|
|
149
|
+
throw new Error('BaseDropdownAutocomplete: options or url is required');
|
|
148
150
|
});
|
|
149
151
|
|
|
150
152
|
const autocomplete = ref<any>(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
3
|
type="button"
|
|
4
|
-
:class="
|
|
4
|
+
:class="twButton"
|
|
5
5
|
:disabled="disabled"
|
|
6
6
|
@drop.prevent="
|
|
7
7
|
dragging = false;
|
|
@@ -32,14 +32,14 @@ import { maxSize, validExtension } from '@/utils/fileValidations';
|
|
|
32
32
|
const props = withDefaults(
|
|
33
33
|
defineProps<{
|
|
34
34
|
disabled?: boolean;
|
|
35
|
-
|
|
35
|
+
twButton?: string;
|
|
36
36
|
maxSize?: number;
|
|
37
37
|
accept?: string;
|
|
38
38
|
acceptedExtensions?: string[];
|
|
39
39
|
}>(),
|
|
40
40
|
{
|
|
41
41
|
disabled: false,
|
|
42
|
-
|
|
42
|
+
twButton: '',
|
|
43
43
|
maxSize: 1024 * 1024 * 20, // 20 MB,
|
|
44
44
|
accept: undefined,
|
|
45
45
|
acceptedExtensions: undefined,
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
title: 'Form/BaseFilePickerCrop',
|
|
12
12
|
component: BaseFilePickerCrop,
|
|
13
13
|
args: {
|
|
14
|
-
|
|
14
|
+
twButton: 'w-full',
|
|
15
15
|
acceptedExtensions: ['jpg', 'jpeg', 'png'],
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -68,8 +68,8 @@ const Template = (args) => ({
|
|
|
68
68
|
<BaseLoadingCover
|
|
69
69
|
:model-value="args.loading || uploading || selecting"
|
|
70
70
|
:delay="0"
|
|
71
|
-
icon
|
|
72
|
-
backdrop
|
|
71
|
+
tw-icon="text-primary-600 w-6 h-6"
|
|
72
|
+
tw-backdrop="bg-white opacity-60"
|
|
73
73
|
/>
|
|
74
74
|
</template>
|
|
75
75
|
</BaseFilePickerCrop>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseFilePicker
|
|
3
|
-
:button
|
|
3
|
+
:tw-button="twButton"
|
|
4
4
|
:disabled="disabled"
|
|
5
5
|
accept="image/*"
|
|
6
6
|
:max-size="maxSize"
|
|
@@ -31,14 +31,14 @@ import { isObject, reject } from 'lodash';
|
|
|
31
31
|
const props = withDefaults(
|
|
32
32
|
defineProps<{
|
|
33
33
|
disabled?: boolean;
|
|
34
|
-
|
|
34
|
+
twButton?: string;
|
|
35
35
|
maxSize?: number;
|
|
36
36
|
acceptedExtensions?: string[];
|
|
37
37
|
cropper: BaseCropperConfig | null;
|
|
38
38
|
}>(),
|
|
39
39
|
{
|
|
40
40
|
disabled: false,
|
|
41
|
-
|
|
41
|
+
twButton: '',
|
|
42
42
|
maxSize: 1024 * 1024 * 20, // 20 MB
|
|
43
43
|
acceptedExtensions: undefined,
|
|
44
44
|
}
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
title: 'Form/BaseFileUploader',
|
|
8
8
|
component: BaseFileUploader,
|
|
9
9
|
args: {
|
|
10
|
-
|
|
10
|
+
twButton: 'w-full',
|
|
11
11
|
acceptedExtensions: ['jpg', 'png'],
|
|
12
12
|
maxSize: 1024 * 200, // 200kb
|
|
13
13
|
url: 'https://dummyjson.com/posts/add',
|
|
@@ -53,8 +53,8 @@ const Template = (args) => ({
|
|
|
53
53
|
<BaseLoadingCover
|
|
54
54
|
:model-value="args.loading || uploading || selecting"
|
|
55
55
|
:delay="0"
|
|
56
|
-
icon
|
|
57
|
-
backdrop
|
|
56
|
+
tw-icon="text-red-600 w-6 h-6"
|
|
57
|
+
tw-backdrop="bg-white opacity-60"
|
|
58
58
|
/>
|
|
59
59
|
</template>
|
|
60
60
|
</BaseFileUploader>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<BaseLoadingCover
|
|
22
22
|
:delay="0"
|
|
23
|
-
icon
|
|
23
|
+
tw-icon="w-6 h-6 text-primary-600"
|
|
24
24
|
:model-value="loading || uploading || slotProps.selecting"
|
|
25
25
|
/>
|
|
26
26
|
</slot>
|
|
@@ -49,7 +49,7 @@ const props = withDefaults(
|
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
loading?: boolean;
|
|
51
51
|
beforeUpload?: () => boolean;
|
|
52
|
-
|
|
52
|
+
twButton?: string;
|
|
53
53
|
maxSize?: number;
|
|
54
54
|
accept?: string;
|
|
55
55
|
acceptedExtensions?: string[];
|
|
@@ -63,7 +63,7 @@ const props = withDefaults(
|
|
|
63
63
|
beforeUpload: (): boolean => {
|
|
64
64
|
return true;
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
twButton: '',
|
|
67
67
|
maxSize: undefined,
|
|
68
68
|
accept: undefined,
|
|
69
69
|
acceptedExtensions: undefined,
|
|
@@ -88,7 +88,7 @@ const componentInternal = computed(() => {
|
|
|
88
88
|
const pickerProps = computed(() => {
|
|
89
89
|
const pickerProps = {
|
|
90
90
|
disabled: props.disabled || props.loading || uploading.value,
|
|
91
|
-
|
|
91
|
+
twButton: props.twButton,
|
|
92
92
|
maxSize: props.maxSize,
|
|
93
93
|
accept: props.component == 'BaseFilePickerCrop' ? undefined : props.accept,
|
|
94
94
|
acceptedExtensions: props.acceptedExtensions,
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
class="absolute inset-0 flex h-full w-full items-center justify-center"
|
|
21
21
|
>
|
|
22
22
|
<div
|
|
23
|
-
class="absolute inset-0 h-full w-full
|
|
24
|
-
:class="
|
|
23
|
+
class="absolute inset-0 h-full w-full"
|
|
24
|
+
:class="twMerge('bg-white opacity-80', twLoadingMask)"
|
|
25
25
|
/>
|
|
26
26
|
<svg
|
|
27
27
|
class="relative h-6 w-6 animate-spin text-blue-600"
|
|
@@ -46,6 +46,7 @@ import { AxiosError, AxiosInstance, AxiosResponse } from 'axios';
|
|
|
46
46
|
import { config, useNotificationsStore } from '@/index';
|
|
47
47
|
import { get, isArray } from 'lodash';
|
|
48
48
|
import { t } from '@/i18n';
|
|
49
|
+
import { twMerge } from 'tailwind-merge';
|
|
49
50
|
|
|
50
51
|
const notifications = useNotificationsStore();
|
|
51
52
|
|
|
@@ -94,8 +95,8 @@ const props = defineProps({
|
|
|
94
95
|
},
|
|
95
96
|
type: Function as PropType<(error: AxiosError) => void>,
|
|
96
97
|
},
|
|
97
|
-
|
|
98
|
-
default: '
|
|
98
|
+
twLoadingMask: {
|
|
99
|
+
default: '',
|
|
99
100
|
type: String,
|
|
100
101
|
},
|
|
101
102
|
showNotificationOnError: {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
></BaseLayoutNotificationDropdown>
|
|
35
35
|
|
|
36
36
|
<!-- Profile dropdown -->
|
|
37
|
-
<BaseMenu menu
|
|
37
|
+
<BaseMenu tw-menu="w-52" class="hidden md:block" :items="userMenu">
|
|
38
38
|
<template #button="{ open }">
|
|
39
39
|
<div class="flex rounded-full" :class="[open ? '' : '']">
|
|
40
40
|
<BaseAvatar :class="dark ? 'text-white' : ''" :user="user" />
|
|
@@ -46,10 +46,10 @@ LargeSpinner.args = {
|
|
|
46
46
|
|
|
47
47
|
export const SpinnerCustomClass = Template.bind({});
|
|
48
48
|
SpinnerCustomClass.args = {
|
|
49
|
-
|
|
49
|
+
twIcon: 'text-red-500 w-10 h-10',
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export const BackdropCustomClass = Template.bind({});
|
|
53
53
|
BackdropCustomClass.args = {
|
|
54
|
-
|
|
54
|
+
twBackdrop: 'bg-slate-100 opacity-50',
|
|
55
55
|
};
|
|
@@ -11,16 +11,23 @@
|
|
|
11
11
|
v-if="showSpinner"
|
|
12
12
|
class="absolute inset-0 flex h-full w-full items-center justify-center"
|
|
13
13
|
>
|
|
14
|
-
<div class="absolute h-full w-full
|
|
14
|
+
<div :class="twMerge('absolute h-full w-full bg-white', twBackdrop)" />
|
|
15
15
|
|
|
16
|
-
<BaseSpinnerSmall
|
|
17
|
-
|
|
16
|
+
<BaseSpinnerSmall
|
|
17
|
+
v-if="size == 'sm'"
|
|
18
|
+
:class="twMerge('h-10 w-10 text-blue-500', twIcon)"
|
|
19
|
+
/>
|
|
20
|
+
<BaseSpinnerLarge
|
|
21
|
+
v-else-if="size == 'lg'"
|
|
22
|
+
:class="twMerge('h-10 w-10 text-blue-500', twIcon)"
|
|
23
|
+
/>
|
|
18
24
|
</div>
|
|
19
25
|
</Transition>
|
|
20
26
|
</template>
|
|
21
27
|
|
|
22
28
|
<script lang="ts" setup>
|
|
23
29
|
import { PropType } from 'vue';
|
|
30
|
+
import { twMerge } from 'tailwind-merge';
|
|
24
31
|
import BaseSpinnerSmall from '../svg/BaseSpinnerSmall.vue';
|
|
25
32
|
import BaseSpinnerLarge from '../svg/BaseSpinnerLarge.vue';
|
|
26
33
|
|
|
@@ -35,15 +42,15 @@ const props = defineProps({
|
|
|
35
42
|
/**
|
|
36
43
|
* Classes added to the backdrop
|
|
37
44
|
*/
|
|
38
|
-
|
|
39
|
-
default: '
|
|
45
|
+
twBackdrop: {
|
|
46
|
+
default: '',
|
|
40
47
|
type: String,
|
|
41
48
|
},
|
|
42
49
|
/**
|
|
43
50
|
* Classes added to the spinner icon
|
|
44
51
|
*/
|
|
45
|
-
|
|
46
|
-
default: '
|
|
52
|
+
twIcon: {
|
|
53
|
+
default: '',
|
|
47
54
|
type: String,
|
|
48
55
|
},
|
|
49
56
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:class="[position == 'custom' ? 'static' : 'relative']"
|
|
7
7
|
>
|
|
8
8
|
<div>
|
|
9
|
-
<MenuButton :class="
|
|
9
|
+
<MenuButton :class="twButton">
|
|
10
10
|
<slot name="button" :open="open" />
|
|
11
11
|
</MenuButton>
|
|
12
12
|
</div>
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
leave-to-class="transform scale-95 opacity-0"
|
|
21
21
|
>
|
|
22
22
|
<MenuItems
|
|
23
|
-
:
|
|
23
|
+
:style="menuPositionStyles"
|
|
24
|
+
:class="twMerge('w-48', twMenu)"
|
|
24
25
|
class="absolute z-menu mt-2 rounded-md bg-white p-1 shadow-lg outline-none ring-1 ring-black ring-opacity-10 focus:outline-none"
|
|
25
26
|
>
|
|
26
27
|
<slot name="items" :items="items">
|
|
27
28
|
<template v-for="item in items" :key="item.label + 'link'">
|
|
28
|
-
<div v-if="item.line" class="
|
|
29
|
+
<div v-if="item.line" class="-mx-1 my-1 flex h-px bg-slate-200" />
|
|
29
30
|
|
|
30
31
|
<MenuItem v-else-if="item.to" v-slot="{ active, close }">
|
|
31
32
|
<RouterLink :to="item.to" @mouseup="close">
|
|
@@ -91,16 +92,13 @@ import { PropType } from 'vue';
|
|
|
91
92
|
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue';
|
|
92
93
|
import { MenuItemInterface } from '@/types';
|
|
93
94
|
import BaseMenuItem from './BaseMenuItem.vue';
|
|
95
|
+
import { twMerge } from 'tailwind-merge';
|
|
94
96
|
|
|
95
97
|
const props = defineProps({
|
|
96
98
|
items: {
|
|
97
99
|
default: undefined,
|
|
98
100
|
type: Array as PropType<MenuItemInterface[]>,
|
|
99
101
|
},
|
|
100
|
-
menuClass: {
|
|
101
|
-
default: 'w-48',
|
|
102
|
-
type: [String, Array, Object],
|
|
103
|
-
},
|
|
104
102
|
position: {
|
|
105
103
|
default: 'bottom-left',
|
|
106
104
|
type: String as PropType<'bottom-left' | 'bottom-right' | 'custom'>,
|
|
@@ -109,21 +107,31 @@ const props = defineProps({
|
|
|
109
107
|
default: 'sm',
|
|
110
108
|
type: String as PropType<'xs' | 'sm' | 'md'>,
|
|
111
109
|
},
|
|
112
|
-
|
|
110
|
+
twMenu: {
|
|
111
|
+
default: '',
|
|
112
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
113
|
+
},
|
|
114
|
+
twButton: {
|
|
113
115
|
default: 'flex',
|
|
114
116
|
type: [String, Array, Object],
|
|
115
117
|
},
|
|
116
118
|
});
|
|
117
119
|
|
|
118
|
-
const
|
|
120
|
+
const menuPositionStyles = computed(() => {
|
|
119
121
|
if (props.position == 'custom') {
|
|
120
|
-
return
|
|
122
|
+
return {};
|
|
121
123
|
}
|
|
122
124
|
if (props.position == 'bottom-left') {
|
|
123
|
-
return
|
|
125
|
+
return {
|
|
126
|
+
origin: 'top-right',
|
|
127
|
+
right: '0',
|
|
128
|
+
};
|
|
124
129
|
}
|
|
125
130
|
if (props.position == 'bottom-right') {
|
|
126
|
-
return
|
|
131
|
+
return {
|
|
132
|
+
origin: 'top-left',
|
|
133
|
+
left: '0',
|
|
134
|
+
};
|
|
127
135
|
}
|
|
128
136
|
});
|
|
129
137
|
</script>
|