sprintify-ui 0.1.18 → 0.2.1
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 +15426 -13066
- 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 +5 -8
- package/src/assets/main.css +3 -3
- package/src/components/BaseActionItem.vue +9 -4
- package/src/components/BaseActionItemButton.vue +1 -1
- package/src/components/BaseAddressForm.vue +6 -5
- package/src/components/BaseAlert.vue +8 -2
- package/src/components/BaseAppNotifications.vue +4 -1
- package/src/components/BaseAutocomplete.vue +21 -12
- package/src/components/BaseAutocompleteDrawer.vue +29 -11
- package/src/components/BaseAutocompleteFetch.vue +14 -3
- package/src/components/BaseAvatar.vue +1 -1
- package/src/components/BaseBadge.vue +1 -2
- package/src/components/BaseBelongsTo.vue +12 -3
- package/src/components/BaseBreadcrumbs.vue +8 -2
- package/src/components/BaseButton.vue +9 -2
- package/src/components/BaseButtonGroup.stories.js +5 -4
- package/src/components/BaseButtonGroup.vue +9 -6
- package/src/components/BaseCharacterCounter.vue +4 -1
- package/src/components/BaseClickOutside.vue +1 -1
- package/src/components/BaseClipboard.vue +5 -2
- package/src/components/BaseColor.vue +7 -4
- package/src/components/BaseCropper.vue +17 -5
- package/src/components/BaseCropperModal.vue +4 -1
- package/src/components/BaseDataIterator.vue +30 -12
- package/src/components/BaseDataIteratorSectionBox.vue +5 -2
- package/src/components/BaseDataIteratorSectionButton.vue +6 -4
- package/src/components/BaseDataIteratorSectionColumns.vue +5 -2
- package/src/components/BaseDataTable.stories.js +1 -1
- package/src/components/BaseDataTable.vue +44 -21
- package/src/components/BaseDataTableRowAction.vue +8 -2
- package/src/components/BaseDatePicker.vue +5 -2
- package/src/components/BaseDateSelect.vue +33 -6
- package/src/components/BaseDisplayRelativeTime.vue +4 -1
- package/src/components/BaseDraggable.vue +1 -1
- package/src/components/BaseDropdown.vue +16 -5
- package/src/components/BaseDropdownAutocomplete.vue +13 -7
- package/src/components/BaseField.vue +5 -2
- package/src/components/BaseFieldI18n.vue +10 -2
- package/src/components/BaseFilePicker.vue +9 -5
- package/src/components/BaseFilePickerCrop.stories.js +3 -3
- package/src/components/BaseFilePickerCrop.vue +7 -4
- package/src/components/BaseFileUploader.stories.js +3 -3
- package/src/components/BaseFileUploader.vue +4 -4
- package/src/components/BaseForm.vue +14 -6
- package/src/components/BaseHasMany.vue +16 -4
- package/src/components/BaseHeader.vue +4 -1
- package/src/components/BaseIconPicker.vue +14 -4
- package/src/components/BaseInput.vue +10 -7
- package/src/components/BaseInputError.vue +1 -1
- package/src/components/BaseInputLabel.vue +4 -1
- package/src/components/BaseInputPercent.vue +1 -1
- package/src/components/BaseLayoutNotificationDropdown.vue +12 -6
- package/src/components/BaseLayoutNotificationItem.vue +15 -5
- package/src/components/BaseLayoutNotificationItemContent.vue +5 -2
- package/src/components/BaseLayoutSidebar.vue +22 -5
- package/src/components/BaseLayoutSidebarConfigurable.vue +19 -5
- package/src/components/BaseLayoutStackedConfigurable.vue +24 -7
- package/src/components/BaseLoadingCover.stories.js +2 -2
- package/src/components/BaseLoadingCover.vue +14 -7
- package/src/components/BaseMediaGallery.vue +4 -1
- package/src/components/BaseMediaGalleryItem.vue +13 -4
- package/src/components/BaseMediaItem.vue +12 -3
- package/src/components/BaseMediaLibrary.vue +11 -6
- package/src/components/BaseMediaList.vue +1 -1
- package/src/components/BaseMediaListItem.vue +15 -6
- package/src/components/BaseMediaPictures.vue +1 -1
- package/src/components/BaseMediaPicturesItem.vue +9 -3
- package/src/components/BaseMediaPreview.vue +2 -2
- package/src/components/BaseMenu.vue +56 -20
- package/src/components/BaseMenuItem.vue +14 -3
- package/src/components/BaseModalCenter.vue +17 -8
- package/src/components/BaseModalSide.vue +12 -6
- package/src/components/BaseNavbar.stories.js +1 -1
- package/src/components/BaseNavbarItemContent.vue +14 -3
- package/src/components/BaseNavbarSideItem.vue +4 -1
- package/src/components/BaseNavbarSideItemContent.vue +9 -2
- package/src/components/BaseNumber.vue +7 -4
- package/src/components/BasePagination.vue +2 -2
- package/src/components/BasePanel.vue +4 -1
- package/src/components/BasePassword.vue +6 -2
- package/src/components/BaseProgressCircle.vue +4 -1
- package/src/components/BaseRadioGroup.vue +7 -4
- package/src/components/BaseRichText.vue +1 -2
- package/src/components/BaseSelect.vue +6 -2
- package/src/components/BaseShortcut.vue +11 -4
- package/src/components/BaseSideNavigation.vue +4 -1
- package/src/components/BaseSideNavigationItem.vue +5 -2
- package/src/components/BaseSkeleton.vue +23 -7
- package/src/components/BaseStatistic.vue +15 -4
- package/src/components/BaseStepper.vue +4 -1
- package/src/components/BaseSwitch.stories.js +0 -1
- package/src/components/BaseSwitch.vue +8 -2
- package/src/components/BaseSystemAlert.vue +4 -1
- package/src/components/BaseTabItem.vue +5 -2
- package/src/components/BaseTable.vue +19 -9
- package/src/components/BaseTagAutocomplete.stories.js +1 -1
- package/src/components/BaseTagAutocomplete.vue +19 -9
- package/src/components/BaseTagAutocompleteFetch.vue +18 -4
- package/src/components/BaseTextarea.vue +2 -2
- package/src/components/BaseTextareaAutoresize.stories.js +30 -1
- package/src/components/BaseTextareaAutoresize.vue +20 -10
- package/src/components/BaseTimeline.vue +8 -2
- package/src/svg/BaseEmptyState.vue +5 -1
- package/src/svg/BaseSpinnerLarge.vue +15 -3
- package/src/svg/BaseSpinnerSmall.vue +8 -2
|
@@ -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
|
/**
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
@update:model-value="onDragUpdate"
|
|
10
10
|
>
|
|
11
11
|
<template #item="{ element, index }">
|
|
12
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
:style="{ width: itemWidth }"
|
|
14
|
+
class="p-1"
|
|
15
|
+
>
|
|
13
16
|
<BaseMediaGalleryItem
|
|
14
17
|
:media="element"
|
|
15
18
|
:show-remove="!disabled"
|
|
@@ -12,10 +12,13 @@
|
|
|
12
12
|
v-if="draggable && !disabled"
|
|
13
13
|
class="handle flex shrink-0 cursor-move items-center justify-center border-r border-slate-300 bg-slate-200 px-1"
|
|
14
14
|
>
|
|
15
|
-
<BaseIcon icon="mdi:drag"
|
|
15
|
+
<BaseIcon icon="mdi:drag" />
|
|
16
16
|
</div>
|
|
17
17
|
<div class="shrink-0">
|
|
18
|
-
<BaseMediaPreview
|
|
18
|
+
<BaseMediaPreview
|
|
19
|
+
class="h-12 w-12"
|
|
20
|
+
:media="media"
|
|
21
|
+
/>
|
|
19
22
|
</div>
|
|
20
23
|
<component
|
|
21
24
|
:is="url ? 'a' : 'p'"
|
|
@@ -33,13 +36,19 @@
|
|
|
33
36
|
</div>
|
|
34
37
|
</component>
|
|
35
38
|
</div>
|
|
36
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
v-if="showRemove"
|
|
41
|
+
class="absolute top-px right-px"
|
|
42
|
+
>
|
|
37
43
|
<button
|
|
38
44
|
type="button"
|
|
39
45
|
class="rounded-full bg-white p-1 text-slate-500 hover:bg-slate-100"
|
|
40
46
|
@click="$emit('remove')"
|
|
41
47
|
>
|
|
42
|
-
<BaseIcon
|
|
48
|
+
<BaseIcon
|
|
49
|
+
icon="heroicons:x-mark-20-solid"
|
|
50
|
+
class="h-5 w-5"
|
|
51
|
+
/>
|
|
43
52
|
</button>
|
|
44
53
|
</div>
|
|
45
54
|
</div>
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<div class="rounded bg-white shadow">
|
|
3
3
|
<div class="relative flex">
|
|
4
4
|
<div class="shrink-0">
|
|
5
|
-
<BaseMediaPreview
|
|
5
|
+
<BaseMediaPreview
|
|
6
|
+
class="h-12 w-12 rounded-l"
|
|
7
|
+
:media="media"
|
|
8
|
+
/>
|
|
6
9
|
</div>
|
|
7
10
|
<component
|
|
8
11
|
:is="url ? 'a' : 'p'"
|
|
@@ -19,13 +22,19 @@
|
|
|
19
22
|
</p>
|
|
20
23
|
</div>
|
|
21
24
|
</component>
|
|
22
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
v-if="showRemove"
|
|
27
|
+
class="shrink-0 p-0.5"
|
|
28
|
+
>
|
|
23
29
|
<button
|
|
24
30
|
type="button"
|
|
25
31
|
class="rounded-full bg-white p-1 text-slate-400 hover:bg-slate-100"
|
|
26
32
|
@click="$emit('remove')"
|
|
27
33
|
>
|
|
28
|
-
<BaseIcon
|
|
34
|
+
<BaseIcon
|
|
35
|
+
icon="heroicons:x-mark-20-solid"
|
|
36
|
+
class="h-4 w-4"
|
|
37
|
+
/>
|
|
29
38
|
</button>
|
|
30
39
|
</div>
|
|
31
40
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:max-size="maxSize"
|
|
6
6
|
:disabled="disabled"
|
|
7
7
|
class="w-full"
|
|
8
|
-
button
|
|
8
|
+
tw-button="w-full"
|
|
9
9
|
:accept="accept"
|
|
10
10
|
:accepted-extensions="acceptedExtensions"
|
|
11
11
|
:url="uploadUrl"
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
</p>
|
|
43
43
|
|
|
44
44
|
<div class="mt-1 text-xs leading-tight text-slate-500">
|
|
45
|
-
<p v-if="maxFileText">
|
|
45
|
+
<p v-if="maxFileText">
|
|
46
|
+
{{ maxFileText }}
|
|
47
|
+
</p>
|
|
46
48
|
<p>{{ maxFileSize }}</p>
|
|
47
49
|
</div>
|
|
48
50
|
</div>
|
|
@@ -52,7 +54,10 @@
|
|
|
52
54
|
</template>
|
|
53
55
|
</BaseFileUploader>
|
|
54
56
|
|
|
55
|
-
<div
|
|
57
|
+
<div
|
|
58
|
+
v-if="normalizedModelValue.length"
|
|
59
|
+
class="mt-5"
|
|
60
|
+
>
|
|
56
61
|
<slot
|
|
57
62
|
:model-value="normalizedModelValue"
|
|
58
63
|
name="list"
|
|
@@ -69,7 +74,7 @@
|
|
|
69
74
|
:draggable="draggable"
|
|
70
75
|
@update:model-value="sync"
|
|
71
76
|
@remove="promptRemove($event)"
|
|
72
|
-
|
|
77
|
+
/>
|
|
73
78
|
|
|
74
79
|
<BaseMediaList
|
|
75
80
|
v-else-if="layout == 'list'"
|
|
@@ -79,7 +84,7 @@
|
|
|
79
84
|
:draggable="draggable"
|
|
80
85
|
@update:model-value="sync"
|
|
81
86
|
@remove="promptRemove($event)"
|
|
82
|
-
|
|
87
|
+
/>
|
|
83
88
|
|
|
84
89
|
<BaseMediaGallery
|
|
85
90
|
v-else-if="layout == 'gallery'"
|
|
@@ -89,7 +94,7 @@
|
|
|
89
94
|
:draggable="draggable"
|
|
90
95
|
@update:model-value="sync"
|
|
91
96
|
@remove="promptRemove($event)"
|
|
92
|
-
|
|
97
|
+
/>
|
|
93
98
|
</slot>
|
|
94
99
|
</div>
|
|
95
100
|
</div>
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
class="group flex h-10 items-center justify-between"
|
|
4
4
|
:class="[draggable ? 'pr-2' : 'px-2']"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
7
|
-
|
|
6
|
+
<div
|
|
7
|
+
v-if="draggable && !disabled"
|
|
8
|
+
class="handle shrink-0 cursor-move px-1"
|
|
9
|
+
>
|
|
10
|
+
<BaseIcon
|
|
11
|
+
icon="mdi:drag"
|
|
12
|
+
class="h-5 w-5 text-slate-400"
|
|
13
|
+
/>
|
|
8
14
|
</div>
|
|
9
15
|
<div class="mr-2 shrink-0">
|
|
10
16
|
<BaseIcon
|
|
11
17
|
icon="heroicons-solid:paper-clip"
|
|
12
18
|
class="h-5 w-5 shrink-0 text-slate-400"
|
|
13
|
-
|
|
19
|
+
/>
|
|
14
20
|
</div>
|
|
15
21
|
<div class="flex grow items-center gap-3 overflow-hidden">
|
|
16
22
|
<div
|
|
@@ -31,12 +37,15 @@
|
|
|
31
37
|
<BaseIcon
|
|
32
38
|
icon="heroicons-solid:pencil"
|
|
33
39
|
class="h-5 w-5 shrink-0 text-slate-400"
|
|
34
|
-
|
|
40
|
+
/>
|
|
35
41
|
</div>
|
|
36
42
|
</button>
|
|
37
43
|
</div>
|
|
38
44
|
|
|
39
|
-
<div
|
|
45
|
+
<div
|
|
46
|
+
v-else
|
|
47
|
+
class="flex grow items-center py-1"
|
|
48
|
+
>
|
|
40
49
|
<input
|
|
41
50
|
ref="inputRef"
|
|
42
51
|
class="h-8 w-full max-w-md rounded border border-slate-300 px-2 py-0 focus:ring-0"
|
|
@@ -46,7 +55,7 @@
|
|
|
46
55
|
@input="onNameChange"
|
|
47
56
|
@keydown.enter.prevent="saveName"
|
|
48
57
|
@keydown.escape.prevent="viewMode = 'show'"
|
|
49
|
-
|
|
58
|
+
>
|
|
50
59
|
|
|
51
60
|
<div class="flex shrink-0 items-center">
|
|
52
61
|
<button
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
height: size + 'px',
|
|
17
17
|
}"
|
|
18
18
|
class="overflow-hidden rounded-lg object-cover"
|
|
19
|
-
|
|
19
|
+
>
|
|
20
20
|
<div class="absolute -top-2 -right-2 flex gap-1">
|
|
21
21
|
<a
|
|
22
22
|
v-if="url"
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
target="_blank"
|
|
25
25
|
class="btn btn-white rounded-full p-1 shadow-sm ring-1 ring-black ring-opacity-10"
|
|
26
26
|
>
|
|
27
|
-
<BaseIcon
|
|
27
|
+
<BaseIcon
|
|
28
|
+
class="h-4 w-4"
|
|
29
|
+
icon="mdi:download"
|
|
30
|
+
/>
|
|
28
31
|
</a>
|
|
29
32
|
<button
|
|
30
33
|
v-if="showRemove"
|
|
@@ -33,7 +36,10 @@
|
|
|
33
36
|
class="btn btn-white rounded-full p-1 shadow-sm ring-1 ring-black ring-opacity-10 disabled:bg-white disabled:opacity-70"
|
|
34
37
|
@click="$emit('remove')"
|
|
35
38
|
>
|
|
36
|
-
<BaseIcon
|
|
39
|
+
<BaseIcon
|
|
40
|
+
class="h-4 w-4"
|
|
41
|
+
icon="mdi:close"
|
|
42
|
+
/>
|
|
37
43
|
</button>
|
|
38
44
|
</div>
|
|
39
45
|
</div>
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
:src="url"
|
|
13
13
|
class="h-full w-full bg-black object-contain object-center"
|
|
14
14
|
:alt="name"
|
|
15
|
-
|
|
15
|
+
>
|
|
16
16
|
<img
|
|
17
17
|
v-else-if="type == 'image' && 'data_url' in media && previewImage"
|
|
18
18
|
:src="media.data_url"
|
|
19
19
|
class="h-full w-full bg-black object-contain object-center"
|
|
20
20
|
:alt="name"
|
|
21
|
-
|
|
21
|
+
>
|
|
22
22
|
<div
|
|
23
23
|
v-else
|
|
24
24
|
class="flex h-full w-full items-center justify-center bg-slate-100"
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
:class="[position == 'custom' ? 'static' : 'relative']"
|
|
7
7
|
>
|
|
8
8
|
<div>
|
|
9
|
-
<MenuButton :class="
|
|
10
|
-
<slot
|
|
9
|
+
<MenuButton :class="twButton">
|
|
10
|
+
<slot
|
|
11
|
+
name="button"
|
|
12
|
+
:open="open"
|
|
13
|
+
/>
|
|
11
14
|
</MenuButton>
|
|
12
15
|
</div>
|
|
13
16
|
|
|
@@ -20,16 +23,35 @@
|
|
|
20
23
|
leave-to-class="transform scale-95 opacity-0"
|
|
21
24
|
>
|
|
22
25
|
<MenuItems
|
|
23
|
-
:
|
|
26
|
+
:style="menuPositionStyles"
|
|
27
|
+
:class="twMerge('w-48', twMenu)"
|
|
24
28
|
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
29
|
>
|
|
26
|
-
<slot
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
<slot
|
|
31
|
+
name="items"
|
|
32
|
+
:items="items"
|
|
33
|
+
>
|
|
34
|
+
<template
|
|
35
|
+
v-for="item in items"
|
|
36
|
+
:key="item.label + 'link'"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
v-if="item.line"
|
|
40
|
+
class="-mx-1 my-1 flex h-px bg-slate-200"
|
|
41
|
+
/>
|
|
29
42
|
|
|
30
|
-
<MenuItem
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
<MenuItem
|
|
44
|
+
v-else-if="item.to"
|
|
45
|
+
v-slot="{ active, close }"
|
|
46
|
+
>
|
|
47
|
+
<RouterLink
|
|
48
|
+
:to="item.to"
|
|
49
|
+
@mouseup="close"
|
|
50
|
+
>
|
|
51
|
+
<slot
|
|
52
|
+
name="item"
|
|
53
|
+
:item="item"
|
|
54
|
+
>
|
|
33
55
|
<BaseMenuItem
|
|
34
56
|
:label="item.label"
|
|
35
57
|
:count="item.count"
|
|
@@ -48,7 +70,10 @@
|
|
|
48
70
|
as="a"
|
|
49
71
|
:href="item.href"
|
|
50
72
|
>
|
|
51
|
-
<slot
|
|
73
|
+
<slot
|
|
74
|
+
name="item"
|
|
75
|
+
:item="item"
|
|
76
|
+
>
|
|
52
77
|
<BaseMenuItem
|
|
53
78
|
:label="item.label"
|
|
54
79
|
:count="item.count"
|
|
@@ -68,7 +93,11 @@
|
|
|
68
93
|
class="w-full"
|
|
69
94
|
@click="item.action"
|
|
70
95
|
>
|
|
71
|
-
<slot
|
|
96
|
+
<slot
|
|
97
|
+
name="item"
|
|
98
|
+
:item="item"
|
|
99
|
+
:active="active"
|
|
100
|
+
>
|
|
72
101
|
<BaseMenuItem
|
|
73
102
|
:label="item.label"
|
|
74
103
|
:count="item.count"
|
|
@@ -91,16 +120,13 @@ import { PropType } from 'vue';
|
|
|
91
120
|
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue';
|
|
92
121
|
import { MenuItemInterface } from '@/types';
|
|
93
122
|
import BaseMenuItem from './BaseMenuItem.vue';
|
|
123
|
+
import { twMerge } from 'tailwind-merge';
|
|
94
124
|
|
|
95
125
|
const props = defineProps({
|
|
96
126
|
items: {
|
|
97
127
|
default: undefined,
|
|
98
128
|
type: Array as PropType<MenuItemInterface[]>,
|
|
99
129
|
},
|
|
100
|
-
menuClass: {
|
|
101
|
-
default: 'w-48',
|
|
102
|
-
type: [String, Array, Object],
|
|
103
|
-
},
|
|
104
130
|
position: {
|
|
105
131
|
default: 'bottom-left',
|
|
106
132
|
type: String as PropType<'bottom-left' | 'bottom-right' | 'custom'>,
|
|
@@ -109,21 +135,31 @@ const props = defineProps({
|
|
|
109
135
|
default: 'sm',
|
|
110
136
|
type: String as PropType<'xs' | 'sm' | 'md'>,
|
|
111
137
|
},
|
|
112
|
-
|
|
138
|
+
twMenu: {
|
|
139
|
+
default: '',
|
|
140
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
141
|
+
},
|
|
142
|
+
twButton: {
|
|
113
143
|
default: 'flex',
|
|
114
144
|
type: [String, Array, Object],
|
|
115
145
|
},
|
|
116
146
|
});
|
|
117
147
|
|
|
118
|
-
const
|
|
148
|
+
const menuPositionStyles = computed(() => {
|
|
119
149
|
if (props.position == 'custom') {
|
|
120
|
-
return
|
|
150
|
+
return {};
|
|
121
151
|
}
|
|
122
152
|
if (props.position == 'bottom-left') {
|
|
123
|
-
return
|
|
153
|
+
return {
|
|
154
|
+
origin: 'top-right',
|
|
155
|
+
right: '0',
|
|
156
|
+
};
|
|
124
157
|
}
|
|
125
158
|
if (props.position == 'bottom-right') {
|
|
126
|
-
return
|
|
159
|
+
return {
|
|
160
|
+
origin: 'top-left',
|
|
161
|
+
left: '0',
|
|
162
|
+
};
|
|
127
163
|
}
|
|
128
164
|
});
|
|
129
165
|
</script>
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="buttonClasses">
|
|
3
3
|
<div class="flex items-center">
|
|
4
|
-
<BaseIcon
|
|
4
|
+
<BaseIcon
|
|
5
|
+
v-if="icon"
|
|
6
|
+
:icon="icon"
|
|
7
|
+
:class="iconClasses"
|
|
8
|
+
/>
|
|
5
9
|
<span :class="textSize">{{ label }}</span>
|
|
6
10
|
</div>
|
|
7
|
-
<div
|
|
8
|
-
|
|
11
|
+
<div
|
|
12
|
+
v-if="count"
|
|
13
|
+
class="relative -top-px ml-[5px]"
|
|
14
|
+
>
|
|
15
|
+
<BaseCounter
|
|
16
|
+
:count="count"
|
|
17
|
+
:max-digit="2"
|
|
18
|
+
:color="color"
|
|
19
|
+
/>
|
|
9
20
|
</div>
|
|
10
21
|
</div>
|
|
11
22
|
</template>
|
|
@@ -32,8 +32,12 @@
|
|
|
32
32
|
>
|
|
33
33
|
<div
|
|
34
34
|
v-if="modelValue"
|
|
35
|
-
:class="
|
|
36
|
-
|
|
35
|
+
:class="
|
|
36
|
+
twMerge(
|
|
37
|
+
'fixed inset-0 bg-slate-900 bg-opacity-70 transition-opacity',
|
|
38
|
+
twBackdrop
|
|
39
|
+
)
|
|
40
|
+
"
|
|
37
41
|
@click="
|
|
38
42
|
closeOnOutsideClick
|
|
39
43
|
? modal.close()
|
|
@@ -70,11 +74,14 @@
|
|
|
70
74
|
|
|
71
75
|
<button
|
|
72
76
|
v-if="showCloseButton"
|
|
73
|
-
class="right fixed
|
|
77
|
+
class="right fixed right-2 top-2 flex h-16 w-16 items-center justify-center rounded-full hover:bg-black hover:bg-opacity-20"
|
|
74
78
|
type="button"
|
|
75
79
|
@click="modal.close()"
|
|
76
80
|
>
|
|
77
|
-
<BaseIcon
|
|
81
|
+
<BaseIcon
|
|
82
|
+
class="h-8 w-8 text-white"
|
|
83
|
+
icon="heroicons:x-mark"
|
|
84
|
+
/>
|
|
78
85
|
</button>
|
|
79
86
|
</div>
|
|
80
87
|
</div>
|
|
@@ -84,6 +91,8 @@
|
|
|
84
91
|
|
|
85
92
|
<script lang="ts" setup>
|
|
86
93
|
import { useModal } from '@/composables/modal';
|
|
94
|
+
import { PropType } from 'vue';
|
|
95
|
+
import { twMerge } from 'tailwind-merge';
|
|
87
96
|
|
|
88
97
|
const props = defineProps({
|
|
89
98
|
modelValue: {
|
|
@@ -94,10 +103,6 @@ const props = defineProps({
|
|
|
94
103
|
default: 'center',
|
|
95
104
|
type: String,
|
|
96
105
|
},
|
|
97
|
-
backdropClass: {
|
|
98
|
-
default: 'bg-opacity-70 bg-slate-900',
|
|
99
|
-
type: String,
|
|
100
|
-
},
|
|
101
106
|
closeOnOutsideClick: {
|
|
102
107
|
default: true,
|
|
103
108
|
type: Boolean,
|
|
@@ -114,6 +119,10 @@ const props = defineProps({
|
|
|
114
119
|
default: false,
|
|
115
120
|
type: Boolean,
|
|
116
121
|
},
|
|
122
|
+
twBackdrop: {
|
|
123
|
+
default: '',
|
|
124
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
125
|
+
},
|
|
117
126
|
});
|
|
118
127
|
|
|
119
128
|
const emit = defineEmits(['update:modelValue']);
|
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
>
|
|
24
24
|
<div
|
|
25
25
|
v-show="modelValue"
|
|
26
|
-
:class="
|
|
27
|
-
|
|
26
|
+
:class="
|
|
27
|
+
twMerge(
|
|
28
|
+
'fixed inset-0 bg-slate-900 bg-opacity-70 transition-opacity',
|
|
29
|
+
twBackdrop
|
|
30
|
+
)
|
|
31
|
+
"
|
|
28
32
|
@click="
|
|
29
33
|
closeOnOutsideClick
|
|
30
34
|
? modal.close()
|
|
@@ -75,6 +79,8 @@
|
|
|
75
79
|
</template>
|
|
76
80
|
|
|
77
81
|
<script lang="ts" setup>
|
|
82
|
+
import { PropType } from 'vue';
|
|
83
|
+
import { twMerge } from 'tailwind-merge';
|
|
78
84
|
import { useModal } from '@/composables/modal';
|
|
79
85
|
import { useBreakpoints } from '@/composables/breakpoints';
|
|
80
86
|
|
|
@@ -87,10 +93,6 @@ const props = defineProps({
|
|
|
87
93
|
default: '32rem',
|
|
88
94
|
type: String,
|
|
89
95
|
},
|
|
90
|
-
backdropClass: {
|
|
91
|
-
default: 'bg-opacity-70 bg-slate-900',
|
|
92
|
-
type: String,
|
|
93
|
-
},
|
|
94
96
|
closeOnOutsideClick: {
|
|
95
97
|
default: true,
|
|
96
98
|
type: Boolean,
|
|
@@ -99,6 +101,10 @@ const props = defineProps({
|
|
|
99
101
|
default: false,
|
|
100
102
|
type: Boolean,
|
|
101
103
|
},
|
|
104
|
+
twBackdrop: {
|
|
105
|
+
default: '',
|
|
106
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
107
|
+
},
|
|
102
108
|
});
|
|
103
109
|
|
|
104
110
|
const emit = defineEmits(['update:modelValue']);
|
|
@@ -99,7 +99,7 @@ const Template = (args) => ({
|
|
|
99
99
|
|
|
100
100
|
<div class="hidden md:ml-6 md:flex md:items-center">
|
|
101
101
|
<!-- Profile dropdown -->
|
|
102
|
-
<BaseMenu menu
|
|
102
|
+
<BaseMenu tw-menu="w-52" :items="userMenu">
|
|
103
103
|
<template #button="{ open }">
|
|
104
104
|
<div
|
|
105
105
|
class="flex rounded-full"
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="classes">
|
|
3
3
|
<div class="group flex grow items-center">
|
|
4
|
-
<BaseIcon
|
|
4
|
+
<BaseIcon
|
|
5
|
+
v-if="icon"
|
|
6
|
+
:icon="icon"
|
|
7
|
+
:class="iconClasses"
|
|
8
|
+
/>
|
|
5
9
|
<span :class="[sizeClasses]">{{ label }}</span>
|
|
6
10
|
</div>
|
|
7
|
-
<div
|
|
8
|
-
|
|
11
|
+
<div
|
|
12
|
+
v-if="count"
|
|
13
|
+
class="relative -top-px ml-[5px]"
|
|
14
|
+
>
|
|
15
|
+
<BaseCounter
|
|
16
|
+
:count="count"
|
|
17
|
+
:max-digit="2"
|
|
18
|
+
:color="'primary'"
|
|
19
|
+
/>
|
|
9
20
|
</div>
|
|
10
21
|
</div>
|
|
11
22
|
</template>
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
v-if="showSubActions && item.actions && item.actions.length"
|
|
25
25
|
class="mt-2 mb-3"
|
|
26
26
|
>
|
|
27
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
v-for="subItem in item.actions"
|
|
29
|
+
:key="subItem.label"
|
|
30
|
+
>
|
|
28
31
|
<BaseActionItem
|
|
29
32
|
:to="subItem.to"
|
|
30
33
|
:href="subItem.href"
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="classes">
|
|
3
3
|
<div class="group flex grow items-center">
|
|
4
|
-
<BaseIcon
|
|
4
|
+
<BaseIcon
|
|
5
|
+
v-if="icon"
|
|
6
|
+
:icon="icon"
|
|
7
|
+
:class="iconClasses"
|
|
8
|
+
/>
|
|
5
9
|
<span>{{ label }}</span>
|
|
6
10
|
</div>
|
|
7
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
v-if="count"
|
|
13
|
+
class="relative -top-px ml-[5px]"
|
|
14
|
+
>
|
|
8
15
|
<BaseCounter
|
|
9
16
|
:size="size"
|
|
10
17
|
:count="count"
|