sprintify-ui 0.2.0 → 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/dist/sprintify-ui.es.js +1146 -1146
- package/dist/style.css +1 -1
- package/package.json +2 -4
- 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 +18 -9
- package/src/components/BaseAutocompleteDrawer.vue +28 -10
- 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.vue +4 -1
- 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 +4 -1
- package/src/components/BaseCropper.vue +17 -5
- package/src/components/BaseCropperModal.vue +4 -1
- package/src/components/BaseDataIterator.vue +29 -11
- 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.vue +43 -20
- 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 +8 -4
- package/src/components/BaseField.vue +5 -2
- package/src/components/BaseFieldI18n.vue +10 -2
- package/src/components/BaseFilePicker.vue +6 -2
- package/src/components/BaseFilePickerCrop.vue +4 -1
- package/src/components/BaseForm.vue +9 -2
- 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 +11 -5
- 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/BaseMediaGallery.vue +4 -1
- package/src/components/BaseMediaGalleryItem.vue +13 -4
- package/src/components/BaseMediaItem.vue +12 -3
- package/src/components/BaseMediaLibrary.vue +10 -5
- 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 +37 -9
- package/src/components/BaseMenuItem.vue +14 -3
- package/src/components/BaseModalCenter.vue +4 -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 +5 -2
- 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 +2 -2
- 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.vue +13 -4
- package/src/components/BaseTagAutocompleteFetch.vue +18 -4
- package/src/components/BaseTextareaAutoresize.vue +6 -2
- 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
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<button
|
|
4
|
-
|
|
3
|
+
<button
|
|
4
|
+
ref="button"
|
|
5
|
+
type="button"
|
|
6
|
+
@click="toggle()"
|
|
7
|
+
>
|
|
8
|
+
<slot name="button" />
|
|
5
9
|
</button>
|
|
6
10
|
<Teleport to="body">
|
|
7
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
ref="dropdown"
|
|
13
|
+
class="z-menu"
|
|
14
|
+
:style="dropdownStyles"
|
|
15
|
+
>
|
|
8
16
|
<Transition
|
|
9
17
|
:enter-active-class="
|
|
10
18
|
animated ? 'transition duration-200 ease-out' : ''
|
|
@@ -16,14 +24,17 @@
|
|
|
16
24
|
leave-to-class="transform scale-95 opacity-0"
|
|
17
25
|
>
|
|
18
26
|
<template v-if="showDropdown || keepAlive">
|
|
19
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
v-show="showDropdown"
|
|
29
|
+
class="inline-block"
|
|
30
|
+
>
|
|
20
31
|
<slot
|
|
21
32
|
name="dropdown"
|
|
22
33
|
:show-dropdown="showDropdown"
|
|
23
34
|
:close="close"
|
|
24
35
|
:open="open"
|
|
25
36
|
:toggle="toggle"
|
|
26
|
-
|
|
37
|
+
/>
|
|
27
38
|
</div>
|
|
28
39
|
</template>
|
|
29
40
|
</Transition>
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
@close="onClose"
|
|
9
9
|
>
|
|
10
10
|
<template #button="buttonProps">
|
|
11
|
-
<slot
|
|
11
|
+
<slot
|
|
12
|
+
name="button"
|
|
13
|
+
v-bind="buttonProps"
|
|
14
|
+
:new-value="newValue"
|
|
15
|
+
/>
|
|
12
16
|
</template>
|
|
13
17
|
<template #dropdown="{ close }">
|
|
14
18
|
<div
|
|
@@ -39,17 +43,17 @@
|
|
|
39
43
|
:option="optionProps.option"
|
|
40
44
|
:active="optionProps.active"
|
|
41
45
|
:size="size"
|
|
42
|
-
|
|
46
|
+
/>
|
|
43
47
|
</div>
|
|
44
48
|
<div class="shrink-0">
|
|
45
49
|
<BaseIcon
|
|
46
50
|
v-if="
|
|
47
51
|
(optionProps.selected ?? false) ||
|
|
48
|
-
|
|
52
|
+
(optionProps.option[valueKey] == null && newValue == null)
|
|
49
53
|
"
|
|
50
54
|
icon="mdi:check-bold"
|
|
51
55
|
class="h-4 w-4 text-slate-500"
|
|
52
|
-
|
|
56
|
+
/>
|
|
53
57
|
</div>
|
|
54
58
|
</div>
|
|
55
59
|
</template>
|
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
:required="required"
|
|
7
7
|
:class="labelClassInternal"
|
|
8
8
|
/>
|
|
9
|
-
<slot
|
|
9
|
+
<slot />
|
|
10
10
|
<template v-if="errorMessage">
|
|
11
|
-
<BaseInputError
|
|
11
|
+
<BaseInputError
|
|
12
|
+
v-if="errorTypeInternal == 'default'"
|
|
13
|
+
class="mt-1"
|
|
14
|
+
>
|
|
12
15
|
{{ errorMessage }}
|
|
13
16
|
</BaseInputError>
|
|
14
17
|
<BaseAlert
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :data-name="nameInternal">
|
|
3
3
|
<div class="space-y-2">
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
v-for="(locale, key) in localesInternal"
|
|
6
|
+
:key="key"
|
|
7
|
+
>
|
|
5
8
|
<BaseField
|
|
6
9
|
:name="`${nameInternal}.${key}`"
|
|
7
10
|
:required="requiredInternal"
|
|
@@ -26,7 +29,12 @@
|
|
|
26
29
|
</BaseField>
|
|
27
30
|
</div>
|
|
28
31
|
</div>
|
|
29
|
-
<BaseAlert
|
|
32
|
+
<BaseAlert
|
|
33
|
+
v-if="globalErrorMessage"
|
|
34
|
+
class="mt-3"
|
|
35
|
+
bordered
|
|
36
|
+
color="danger"
|
|
37
|
+
>
|
|
30
38
|
{{ globalErrorMessage }}
|
|
31
39
|
</BaseAlert>
|
|
32
40
|
</div>
|
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
@dragenter.prevent="dragging = true"
|
|
13
13
|
@click="pickFile"
|
|
14
14
|
>
|
|
15
|
-
<slot
|
|
15
|
+
<slot
|
|
16
|
+
:selecting="selecting"
|
|
17
|
+
:dragging="dragging"
|
|
18
|
+
:disabled="disabled"
|
|
19
|
+
/>
|
|
16
20
|
</button>
|
|
17
21
|
<input
|
|
18
22
|
ref="input"
|
|
@@ -20,7 +24,7 @@
|
|
|
20
24
|
:accept="accept"
|
|
21
25
|
hidden="true"
|
|
22
26
|
@change="onInputChange"
|
|
23
|
-
|
|
27
|
+
>
|
|
24
28
|
</template>
|
|
25
29
|
|
|
26
30
|
<script lang="ts" setup>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<form
|
|
2
|
+
<form
|
|
3
|
+
ref="form"
|
|
4
|
+
class="relative"
|
|
5
|
+
@submit.prevent="submit()"
|
|
6
|
+
>
|
|
3
7
|
<slot
|
|
4
8
|
:errors="errors"
|
|
5
9
|
:loading="loading"
|
|
@@ -15,7 +19,10 @@
|
|
|
15
19
|
leave-from-class="opacity-100"
|
|
16
20
|
leave-to-class="opacity-0"
|
|
17
21
|
>
|
|
18
|
-
<slot
|
|
22
|
+
<slot
|
|
23
|
+
v-if="loading"
|
|
24
|
+
name="loading"
|
|
25
|
+
>
|
|
19
26
|
<div
|
|
20
27
|
class="absolute inset-0 flex h-full w-full items-center justify-center"
|
|
21
28
|
>
|
|
@@ -14,19 +14,31 @@
|
|
|
14
14
|
@update:model-value="onUpdate"
|
|
15
15
|
>
|
|
16
16
|
<template #items="itemProps">
|
|
17
|
-
<slot
|
|
17
|
+
<slot
|
|
18
|
+
name="items"
|
|
19
|
+
v-bind="itemProps"
|
|
20
|
+
/>
|
|
18
21
|
</template>
|
|
19
22
|
|
|
20
23
|
<template #option="optionProps">
|
|
21
|
-
<slot
|
|
24
|
+
<slot
|
|
25
|
+
name="option"
|
|
26
|
+
v-bind="optionProps"
|
|
27
|
+
/>
|
|
22
28
|
</template>
|
|
23
29
|
|
|
24
30
|
<template #empty="emptyProps">
|
|
25
|
-
<slot
|
|
31
|
+
<slot
|
|
32
|
+
name="empty"
|
|
33
|
+
v-bind="emptyProps"
|
|
34
|
+
/>
|
|
26
35
|
</template>
|
|
27
36
|
|
|
28
37
|
<template #footer="footerProps">
|
|
29
|
-
<slot
|
|
38
|
+
<slot
|
|
39
|
+
name="footer"
|
|
40
|
+
v-bind="footerProps"
|
|
41
|
+
/>
|
|
30
42
|
</template>
|
|
31
43
|
</BaseTagAutocompleteFetch>
|
|
32
44
|
</template>
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
class="max-w-[150px] shrink-0 rounded-l border-r-0 border-slate-300 py-1.5 pl-2 pr-6 focus:border-slate-300 focus:outline-none focus:ring-0 sm:text-sm"
|
|
12
12
|
@change="onSuffixChange"
|
|
13
13
|
>
|
|
14
|
-
<option
|
|
14
|
+
<option
|
|
15
|
+
v-for="(label, key) in suffixes"
|
|
16
|
+
:key="key"
|
|
17
|
+
:value="key"
|
|
18
|
+
>
|
|
15
19
|
{{ label }}
|
|
16
20
|
</option>
|
|
17
21
|
</select>
|
|
@@ -21,12 +25,18 @@
|
|
|
21
25
|
type="text"
|
|
22
26
|
:placeholder="t('sui.search') + '...'"
|
|
23
27
|
class="min-w-[40px] grow rounded-r border-slate-300 py-0 px-2 focus:border-blue-500 focus:ring-2 focus:ring-blue-300 sm:text-sm"
|
|
24
|
-
|
|
28
|
+
>
|
|
25
29
|
</div>
|
|
26
30
|
|
|
27
|
-
<div
|
|
31
|
+
<div
|
|
32
|
+
ref="drawer"
|
|
33
|
+
class="h-44 overflow-y-auto px-2 pb-2"
|
|
34
|
+
>
|
|
28
35
|
<ul class="flex flex-wrap">
|
|
29
|
-
<li
|
|
36
|
+
<li
|
|
37
|
+
v-for="icon in filteredIcons"
|
|
38
|
+
:key="icon"
|
|
39
|
+
>
|
|
30
40
|
<button
|
|
31
41
|
type="button"
|
|
32
42
|
:data-icon="icon"
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="inline-flex rounded border"
|
|
4
|
+
:class="[borderColor]"
|
|
5
|
+
>
|
|
3
6
|
<div
|
|
4
7
|
v-if="iconLeft"
|
|
5
8
|
class="flex shrink-0 items-center justify-center rounded-l border-r px-3 transition-colors"
|
|
@@ -29,10 +32,10 @@
|
|
|
29
32
|
emptyLeft && emptyRight
|
|
30
33
|
? 'full'
|
|
31
34
|
: emptyLeft
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
? 'left'
|
|
36
|
+
: emptyRight
|
|
37
|
+
? 'right'
|
|
38
|
+
: 'none'
|
|
36
39
|
"
|
|
37
40
|
class="grow"
|
|
38
41
|
v-bind="bindings"
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
'w-full border-none bg-white outline-none focus:z-[1] focus:ring-2 focus:ring-primary-600 focus:ring-offset-1 disabled:cursor-not-allowed disabled:text-slate-300': true,
|
|
53
56
|
}"
|
|
54
57
|
@input="update"
|
|
55
|
-
|
|
58
|
+
>
|
|
56
59
|
<input
|
|
57
60
|
v-else
|
|
58
61
|
ref="input"
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
'w-full border-none bg-white outline-none focus:z-[1] focus:ring-2 focus:ring-primary-600 focus:ring-offset-1 disabled:cursor-not-allowed disabled:text-slate-300': true,
|
|
67
70
|
}"
|
|
68
71
|
@input="update"
|
|
69
|
-
|
|
72
|
+
>
|
|
70
73
|
<div
|
|
71
74
|
v-if="suffix"
|
|
72
75
|
class="flex shrink-0 items-center justify-center border-l px-4 transition-colors"
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
icon="heroicons:question-mark-circle-20-solid"
|
|
15
15
|
/>
|
|
16
16
|
|
|
17
|
-
<span
|
|
17
|
+
<span
|
|
18
|
+
v-if="required"
|
|
19
|
+
class="ml-0.5 text-red-600"
|
|
20
|
+
> *</span>
|
|
18
21
|
|
|
19
22
|
<Transition
|
|
20
23
|
enter-active-class="transition duration-200 ease-out"
|
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
:class="[open ? 'bg-slate-100' : '']"
|
|
11
11
|
@click="onOpen"
|
|
12
12
|
>
|
|
13
|
-
<BaseIcon
|
|
13
|
+
<BaseIcon
|
|
14
|
+
icon="fa-solid:bell"
|
|
15
|
+
:class="[iconClasses]"
|
|
16
|
+
/>
|
|
14
17
|
<BaseCounter
|
|
15
18
|
v-if="notificationsConfig.items.length"
|
|
16
19
|
class="absolute top-0 right-0"
|
|
17
20
|
:size="counterSize"
|
|
18
21
|
:count="notificationsConfig.items.length"
|
|
19
|
-
|
|
22
|
+
/>
|
|
20
23
|
</div>
|
|
21
24
|
</template>
|
|
22
25
|
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
<BaseLayoutNotificationItem
|
|
29
32
|
:notification="notification"
|
|
30
33
|
@click="onClick"
|
|
31
|
-
|
|
34
|
+
/>
|
|
32
35
|
</template>
|
|
33
36
|
|
|
34
37
|
<div
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
<BaseIcon
|
|
40
43
|
icon="heroicons:inbox-stack"
|
|
41
44
|
class="mx-auto mb-2 h-8 w-8 text-slate-400"
|
|
42
|
-
|
|
45
|
+
/>
|
|
43
46
|
<p class="text-center text-sm text-slate-700">
|
|
44
47
|
{{ t('sui.notifications_empty') }}
|
|
45
48
|
</p>
|
|
@@ -51,7 +54,10 @@
|
|
|
51
54
|
class="mt-1 border-t border-slate-200 pt-1"
|
|
52
55
|
>
|
|
53
56
|
<MenuItem v-slot="{ active, close }">
|
|
54
|
-
<RouterLink
|
|
57
|
+
<RouterLink
|
|
58
|
+
:to="notificationsConfig.footerTo"
|
|
59
|
+
@mouseup="close"
|
|
60
|
+
>
|
|
55
61
|
<div
|
|
56
62
|
class="hover block px-3 py-2 text-center text-sm font-medium text-primary-600 hover:bg-slate-100"
|
|
57
63
|
:class="[active ? 'bg-slate-100' : '']"
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<MenuItem
|
|
3
|
-
|
|
2
|
+
<MenuItem
|
|
3
|
+
v-if="notification.to"
|
|
4
|
+
v-slot="{ active, close }"
|
|
5
|
+
>
|
|
6
|
+
<RouterLink
|
|
7
|
+
:to="notification.to"
|
|
8
|
+
@mouseup="onClick(close)"
|
|
9
|
+
>
|
|
4
10
|
<BaseLayoutNotificationItemContent
|
|
5
11
|
:active="active"
|
|
6
12
|
:notification="notification"
|
|
7
|
-
|
|
13
|
+
/>
|
|
8
14
|
</RouterLink>
|
|
9
15
|
</MenuItem>
|
|
10
16
|
<div v-else>
|
|
11
|
-
<MenuItem
|
|
17
|
+
<MenuItem
|
|
18
|
+
v-slot="{ active }"
|
|
19
|
+
as="button"
|
|
20
|
+
class="w-full text-left"
|
|
21
|
+
>
|
|
12
22
|
<BaseLayoutNotificationItemContent
|
|
13
23
|
:active="active"
|
|
14
24
|
:notification="notification"
|
|
15
25
|
@mouseup="onClick()"
|
|
16
|
-
|
|
26
|
+
/>
|
|
17
27
|
</MenuItem>
|
|
18
28
|
</div>
|
|
19
29
|
</template>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="px-3 py-2"
|
|
4
|
+
:class="[active ? 'bg-slate-100' : '']"
|
|
5
|
+
>
|
|
3
6
|
<div
|
|
4
7
|
class="text-sm leading-tight text-slate-800"
|
|
5
8
|
v-html="notification.text"
|
|
6
|
-
|
|
9
|
+
/>
|
|
7
10
|
<BaseDisplayRelativeTime
|
|
8
11
|
v-if="notification.created_at"
|
|
9
12
|
v-slot="{ readableDate }"
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="min-h-full">
|
|
3
|
-
<TransitionRoot
|
|
3
|
+
<TransitionRoot
|
|
4
|
+
as="template"
|
|
5
|
+
:show="showMobileMenu"
|
|
6
|
+
>
|
|
4
7
|
<Dialog
|
|
5
8
|
as="div"
|
|
6
9
|
class="relative z-40 xl:hidden"
|
|
@@ -57,7 +60,11 @@
|
|
|
57
60
|
</div>
|
|
58
61
|
</TransitionChild>
|
|
59
62
|
<div class="flex flex-shrink-0 items-center px-4">
|
|
60
|
-
<img
|
|
63
|
+
<img
|
|
64
|
+
class="block h-8 w-auto"
|
|
65
|
+
:src="logoUrl"
|
|
66
|
+
:alt="appName"
|
|
67
|
+
>
|
|
61
68
|
</div>
|
|
62
69
|
<div
|
|
63
70
|
data-scroll-lock-scrollable
|
|
@@ -69,7 +76,10 @@
|
|
|
69
76
|
</div>
|
|
70
77
|
</DialogPanel>
|
|
71
78
|
</TransitionChild>
|
|
72
|
-
<div
|
|
79
|
+
<div
|
|
80
|
+
class="w-14 flex-shrink-0"
|
|
81
|
+
aria-hidden="true"
|
|
82
|
+
>
|
|
73
83
|
<!-- Dummy element to force sidebar to shrink to fit close icon -->
|
|
74
84
|
</div>
|
|
75
85
|
</div>
|
|
@@ -90,7 +100,10 @@
|
|
|
90
100
|
{{ systemAlert.message }}
|
|
91
101
|
</BaseSystemAlert>
|
|
92
102
|
|
|
93
|
-
<div
|
|
103
|
+
<div
|
|
104
|
+
class="flex bg-white"
|
|
105
|
+
:style="{ height: navbarHeight + 'px' }"
|
|
106
|
+
>
|
|
94
107
|
<button
|
|
95
108
|
type="button"
|
|
96
109
|
class="border-r border-slate-200 px-4 text-slate-500 xl:hidden"
|
|
@@ -130,7 +143,11 @@
|
|
|
130
143
|
:style="{ height: navbarHeight + 'px' }"
|
|
131
144
|
:class="[dark ? 'bg-slate-900' : 'bg-white']"
|
|
132
145
|
>
|
|
133
|
-
<img
|
|
146
|
+
<img
|
|
147
|
+
class="block h-8 w-auto"
|
|
148
|
+
:src="logoUrl"
|
|
149
|
+
:alt="appName"
|
|
150
|
+
>
|
|
134
151
|
</div>
|
|
135
152
|
<div class="flex flex-1">
|
|
136
153
|
<nav class="flex-1">
|
|
@@ -8,8 +8,15 @@
|
|
|
8
8
|
<template #menu>
|
|
9
9
|
<div class="px-3 py-6">
|
|
10
10
|
<div class="space-y-8">
|
|
11
|
-
<div
|
|
12
|
-
|
|
11
|
+
<div
|
|
12
|
+
v-for="section in actionSections"
|
|
13
|
+
:key="section.title"
|
|
14
|
+
>
|
|
15
|
+
<h2
|
|
16
|
+
v-if="section.title"
|
|
17
|
+
class="pl-3"
|
|
18
|
+
:class="sectionTitleClasses"
|
|
19
|
+
>
|
|
13
20
|
{{ section.title }}
|
|
14
21
|
</h2>
|
|
15
22
|
<div>
|
|
@@ -43,7 +50,7 @@
|
|
|
43
50
|
:size="size"
|
|
44
51
|
@click="onNotificationClick"
|
|
45
52
|
@open="onNotificationOpen"
|
|
46
|
-
|
|
53
|
+
/>
|
|
47
54
|
|
|
48
55
|
<!-- Profile dropdown -->
|
|
49
56
|
<div
|
|
@@ -54,13 +61,20 @@
|
|
|
54
61
|
'ml-0': size == 'xs',
|
|
55
62
|
}"
|
|
56
63
|
>
|
|
57
|
-
<BaseMenu
|
|
64
|
+
<BaseMenu
|
|
65
|
+
:items="userMenu"
|
|
66
|
+
:size="size == 'xs' ? 'xs' : 'sm'"
|
|
67
|
+
>
|
|
58
68
|
<template #button="{ open }">
|
|
59
69
|
<div
|
|
60
70
|
class="flex rounded-md p-1.5 hover:bg-slate-100"
|
|
61
71
|
:class="[open ? 'bg-slate-100' : '']"
|
|
62
72
|
>
|
|
63
|
-
<BaseAvatar
|
|
73
|
+
<BaseAvatar
|
|
74
|
+
:user="user"
|
|
75
|
+
:size="size"
|
|
76
|
+
show-details
|
|
77
|
+
/>
|
|
64
78
|
</div>
|
|
65
79
|
</template>
|
|
66
80
|
</BaseMenu>
|
|
@@ -6,8 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
<div class="flex justify-center">
|
|
8
8
|
<!-- Logo -->
|
|
9
|
-
<RouterLink
|
|
10
|
-
|
|
9
|
+
<RouterLink
|
|
10
|
+
to="/"
|
|
11
|
+
class="flex flex-shrink-0 items-center p-2 pl-0"
|
|
12
|
+
>
|
|
13
|
+
<img
|
|
14
|
+
class="block h-8 w-auto"
|
|
15
|
+
:src="logoUrl"
|
|
16
|
+
:alt="appName"
|
|
17
|
+
>
|
|
11
18
|
</RouterLink>
|
|
12
19
|
|
|
13
20
|
<!-- Links (desktop) -->
|
|
@@ -31,13 +38,23 @@
|
|
|
31
38
|
:notifications-config="notifications"
|
|
32
39
|
@click="onNotificationClick"
|
|
33
40
|
@open="onNotificationOpen"
|
|
34
|
-
|
|
41
|
+
/>
|
|
35
42
|
|
|
36
43
|
<!-- Profile dropdown -->
|
|
37
|
-
<BaseMenu
|
|
44
|
+
<BaseMenu
|
|
45
|
+
tw-menu="w-52"
|
|
46
|
+
class="hidden md:block"
|
|
47
|
+
:items="userMenu"
|
|
48
|
+
>
|
|
38
49
|
<template #button="{ open }">
|
|
39
|
-
<div
|
|
40
|
-
|
|
50
|
+
<div
|
|
51
|
+
class="flex rounded-full"
|
|
52
|
+
:class="[open ? '' : '']"
|
|
53
|
+
>
|
|
54
|
+
<BaseAvatar
|
|
55
|
+
:class="dark ? 'text-white' : ''"
|
|
56
|
+
:user="user"
|
|
57
|
+
/>
|
|
41
58
|
</div>
|
|
42
59
|
</template>
|
|
43
60
|
</BaseMenu>
|
|
@@ -59,7 +76,7 @@
|
|
|
59
76
|
<hr
|
|
60
77
|
class="mb-4 mt-2"
|
|
61
78
|
:class="[dark ? 'border-slate-700' : 'border-slate-200']"
|
|
62
|
-
|
|
79
|
+
>
|
|
63
80
|
|
|
64
81
|
<!-- Profile links -->
|
|
65
82
|
<div class="p-2 pb-6">
|
|
@@ -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>
|