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.
Files changed (223) hide show
  1. package/README.md +1 -2
  2. package/dist/sprintify-ui.es.js +15426 -13066
  3. package/dist/style.css +1 -1
  4. package/dist/types/src/components/BaseActionItem.vue.d.ts +3 -3
  5. package/dist/types/src/components/BaseActionItemButton.vue.d.ts +9 -6
  6. package/dist/types/src/components/BaseAddressForm.vue.d.ts +17 -27
  7. package/dist/types/src/components/BaseAlert.vue.d.ts +1 -1
  8. package/dist/types/src/components/BaseApp.vue.d.ts +2 -2
  9. package/dist/types/src/components/BaseAppDialogs.vue.d.ts +1 -1
  10. package/dist/types/src/components/BaseAppNotifications.vue.d.ts +1 -1
  11. package/dist/types/src/components/BaseAutocomplete.vue.d.ts +33 -28
  12. package/dist/types/src/components/BaseAutocompleteDrawer.vue.d.ts +12 -11
  13. package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +12 -15
  14. package/dist/types/src/components/BaseAvatar.vue.d.ts +1 -1
  15. package/dist/types/src/components/BaseAvatarGroup.vue.d.ts +1 -1
  16. package/dist/types/src/components/BaseBadge.vue.d.ts +9 -6
  17. package/dist/types/src/components/BaseBelongsTo.vue.d.ts +12 -15
  18. package/dist/types/src/components/BaseBoolean.vue.d.ts +3 -3
  19. package/dist/types/src/components/BaseBreadcrumbs.vue.d.ts +1 -1
  20. package/dist/types/src/components/BaseButton.vue.d.ts +1 -1
  21. package/dist/types/src/components/BaseButtonGroup.vue.d.ts +13 -13
  22. package/dist/types/src/components/BaseCard.vue.d.ts +2 -2
  23. package/dist/types/src/components/BaseCardRow.vue.d.ts +1 -1
  24. package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +1 -1
  25. package/dist/types/src/components/BaseClickOutside.vue.d.ts +2 -2
  26. package/dist/types/src/components/BaseClipboard.vue.d.ts +2 -2
  27. package/dist/types/src/components/BaseColor.vue.d.ts +2 -2
  28. package/dist/types/src/components/BaseContainer.vue.d.ts +1 -1
  29. package/dist/types/src/components/BaseCounter.vue.d.ts +1 -1
  30. package/dist/types/src/components/BaseCropper.vue.d.ts +21 -19
  31. package/dist/types/src/components/BaseCropperModal.vue.d.ts +3 -3
  32. package/dist/types/src/components/BaseDataIterator.vue.d.ts +9 -9
  33. package/dist/types/src/components/BaseDataIteratorSectionBox.vue.d.ts +2 -2
  34. package/dist/types/src/components/BaseDataIteratorSectionButton.vue.d.ts +1 -1
  35. package/dist/types/src/components/BaseDataIteratorSectionColumns.vue.d.ts +141 -169
  36. package/dist/types/src/components/BaseDataIteratorSectionModal.vue.d.ts +2 -2
  37. package/dist/types/src/components/BaseDataTable.vue.d.ts +15 -13
  38. package/dist/types/src/components/BaseDataTableRowAction.vue.d.ts +1 -1
  39. package/dist/types/src/components/BaseDatePicker.vue.d.ts +9 -6
  40. package/dist/types/src/components/BaseDateSelect.vue.d.ts +2 -2
  41. package/dist/types/src/components/BaseDescriptionList.vue.d.ts +2 -2
  42. package/dist/types/src/components/BaseDescriptionListItem.vue.d.ts +3 -3
  43. package/dist/types/src/components/BaseDialog.vue.d.ts +2 -2
  44. package/dist/types/src/components/BaseDisplayRelativeTime.vue.d.ts +3 -3
  45. package/dist/types/src/components/BaseDraggable.vue.d.ts +3 -3
  46. package/dist/types/src/components/BaseDropdown.vue.d.ts +13 -10
  47. package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +7 -7
  48. package/dist/types/src/components/BaseField.vue.d.ts +3 -3
  49. package/dist/types/src/components/BaseFieldI18n.vue.d.ts +9 -12
  50. package/dist/types/src/components/BaseFilePicker.vue.d.ts +13 -10
  51. package/dist/types/src/components/BaseFilePickerCrop.vue.d.ts +13 -10
  52. package/dist/types/src/components/BaseFileUploader.vue.d.ts +40 -13
  53. package/dist/types/src/components/BaseForm.vue.d.ts +24 -21
  54. package/dist/types/src/components/BaseHasMany.vue.d.ts +13 -16
  55. package/dist/types/src/components/BaseHeader.vue.d.ts +7 -4
  56. package/dist/types/src/components/BaseIconPicker.vue.d.ts +6 -3
  57. package/dist/types/src/components/BaseInput.vue.d.ts +5 -5
  58. package/dist/types/src/components/BaseInputError.vue.d.ts +2 -2
  59. package/dist/types/src/components/BaseInputLabel.vue.d.ts +1 -1
  60. package/dist/types/src/components/BaseInputPercent.vue.d.ts +4 -4
  61. package/dist/types/src/components/BaseLayoutNotificationDropdown.vue.d.ts +1 -1
  62. package/dist/types/src/components/BaseLayoutNotificationItem.vue.d.ts +1 -1
  63. package/dist/types/src/components/BaseLayoutNotificationItemContent.vue.d.ts +1 -1
  64. package/dist/types/src/components/BaseLayoutSidebar.vue.d.ts +4 -4
  65. package/dist/types/src/components/BaseLayoutSidebarConfigurable.vue.d.ts +3 -3
  66. package/dist/types/src/components/BaseLayoutStacked.vue.d.ts +4 -4
  67. package/dist/types/src/components/BaseLayoutStackedConfigurable.vue.d.ts +2 -2
  68. package/dist/types/src/components/BaseLoadingCover.vue.d.ts +8 -8
  69. package/dist/types/src/components/BaseMediaGallery.vue.d.ts +2 -2
  70. package/dist/types/src/components/BaseMediaGalleryItem.vue.d.ts +2 -2
  71. package/dist/types/src/components/BaseMediaItem.vue.d.ts +1 -1
  72. package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +26 -8
  73. package/dist/types/src/components/BaseMediaList.vue.d.ts +2 -2
  74. package/dist/types/src/components/BaseMediaListItem.vue.d.ts +2 -2
  75. package/dist/types/src/components/BaseMediaPictures.vue.d.ts +2 -2
  76. package/dist/types/src/components/BaseMediaPicturesItem.vue.d.ts +2 -2
  77. package/dist/types/src/components/BaseMediaPreview.vue.d.ts +1 -1
  78. package/dist/types/src/components/BaseMenu.vue.d.ts +19 -19
  79. package/dist/types/src/components/BaseMenuItem.vue.d.ts +2 -2
  80. package/dist/types/src/components/BaseModalCenter.vue.d.ts +13 -12
  81. package/dist/types/src/components/BaseModalSide.vue.d.ts +13 -12
  82. package/dist/types/src/components/BaseNavbar.vue.d.ts +10 -7
  83. package/dist/types/src/components/BaseNavbarItem.vue.d.ts +1 -1
  84. package/dist/types/src/components/BaseNavbarItemContent.vue.d.ts +1 -1
  85. package/dist/types/src/components/BaseNavbarSideItem.vue.d.ts +1 -1
  86. package/dist/types/src/components/BaseNavbarSideItemContent.vue.d.ts +1 -1
  87. package/dist/types/src/components/BaseNumber.vue.d.ts +4 -4
  88. package/dist/types/src/components/BasePagination.vue.d.ts +1 -1
  89. package/dist/types/src/components/BasePanel.vue.d.ts +1 -1
  90. package/dist/types/src/components/BasePassword.vue.d.ts +3 -3
  91. package/dist/types/src/components/BaseProgressCircle.vue.d.ts +1 -1
  92. package/dist/types/src/components/BaseRadioGroup.vue.d.ts +7 -7
  93. package/dist/types/src/components/BaseReadMore.vue.d.ts +2 -2
  94. package/dist/types/src/components/BaseRichText.vue.d.ts +6 -6
  95. package/dist/types/src/components/BaseSelect.vue.d.ts +8 -7
  96. package/dist/types/src/components/BaseShortcut.vue.d.ts +1 -1
  97. package/dist/types/src/components/BaseSideNavigation.vue.d.ts +8 -5
  98. package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +9 -6
  99. package/dist/types/src/components/BaseSkeleton.vue.d.ts +8 -7
  100. package/dist/types/src/components/BaseStatistic.vue.d.ts +1 -1
  101. package/dist/types/src/components/BaseStepper.vue.d.ts +1 -1
  102. package/dist/types/src/components/BaseStepperItem.vue.d.ts +1 -1
  103. package/dist/types/src/components/BaseSwitch.vue.d.ts +3 -3
  104. package/dist/types/src/components/BaseSystemAlert.vue.d.ts +5 -5
  105. package/dist/types/src/components/BaseTabItem.vue.d.ts +9 -6
  106. package/dist/types/src/components/BaseTable.vue.d.ts +6 -6
  107. package/dist/types/src/components/BaseTableColumn.vue.d.ts +2 -2
  108. package/dist/types/src/components/BaseTabs.vue.d.ts +8 -5
  109. package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +39 -34
  110. package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +12 -15
  111. package/dist/types/src/components/BaseTextarea.vue.d.ts +3 -3
  112. package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +13 -3
  113. package/dist/types/src/components/BaseTimeline.vue.d.ts +1 -1
  114. package/dist/types/src/components/BaseTimelineItem.vue.d.ts +1 -1
  115. package/dist/types/src/components/SlotComponent.d.ts +1 -1
  116. package/dist/types/src/svg/BaseEmptyState.vue.d.ts +1 -1
  117. package/dist/types/src/svg/BaseSpinnerLarge.vue.d.ts +1 -1
  118. package/dist/types/src/svg/BaseSpinnerSmall.vue.d.ts +1 -1
  119. package/package.json +5 -8
  120. package/src/assets/main.css +3 -3
  121. package/src/components/BaseActionItem.vue +9 -4
  122. package/src/components/BaseActionItemButton.vue +1 -1
  123. package/src/components/BaseAddressForm.vue +6 -5
  124. package/src/components/BaseAlert.vue +8 -2
  125. package/src/components/BaseAppNotifications.vue +4 -1
  126. package/src/components/BaseAutocomplete.vue +21 -12
  127. package/src/components/BaseAutocompleteDrawer.vue +29 -11
  128. package/src/components/BaseAutocompleteFetch.vue +14 -3
  129. package/src/components/BaseAvatar.vue +1 -1
  130. package/src/components/BaseBadge.vue +1 -2
  131. package/src/components/BaseBelongsTo.vue +12 -3
  132. package/src/components/BaseBreadcrumbs.vue +8 -2
  133. package/src/components/BaseButton.vue +9 -2
  134. package/src/components/BaseButtonGroup.stories.js +5 -4
  135. package/src/components/BaseButtonGroup.vue +9 -6
  136. package/src/components/BaseCharacterCounter.vue +4 -1
  137. package/src/components/BaseClickOutside.vue +1 -1
  138. package/src/components/BaseClipboard.vue +5 -2
  139. package/src/components/BaseColor.vue +7 -4
  140. package/src/components/BaseCropper.vue +17 -5
  141. package/src/components/BaseCropperModal.vue +4 -1
  142. package/src/components/BaseDataIterator.vue +30 -12
  143. package/src/components/BaseDataIteratorSectionBox.vue +5 -2
  144. package/src/components/BaseDataIteratorSectionButton.vue +6 -4
  145. package/src/components/BaseDataIteratorSectionColumns.vue +5 -2
  146. package/src/components/BaseDataTable.stories.js +1 -1
  147. package/src/components/BaseDataTable.vue +44 -21
  148. package/src/components/BaseDataTableRowAction.vue +8 -2
  149. package/src/components/BaseDatePicker.vue +5 -2
  150. package/src/components/BaseDateSelect.vue +33 -6
  151. package/src/components/BaseDisplayRelativeTime.vue +4 -1
  152. package/src/components/BaseDraggable.vue +1 -1
  153. package/src/components/BaseDropdown.vue +16 -5
  154. package/src/components/BaseDropdownAutocomplete.vue +13 -7
  155. package/src/components/BaseField.vue +5 -2
  156. package/src/components/BaseFieldI18n.vue +10 -2
  157. package/src/components/BaseFilePicker.vue +9 -5
  158. package/src/components/BaseFilePickerCrop.stories.js +3 -3
  159. package/src/components/BaseFilePickerCrop.vue +7 -4
  160. package/src/components/BaseFileUploader.stories.js +3 -3
  161. package/src/components/BaseFileUploader.vue +4 -4
  162. package/src/components/BaseForm.vue +14 -6
  163. package/src/components/BaseHasMany.vue +16 -4
  164. package/src/components/BaseHeader.vue +4 -1
  165. package/src/components/BaseIconPicker.vue +14 -4
  166. package/src/components/BaseInput.vue +10 -7
  167. package/src/components/BaseInputError.vue +1 -1
  168. package/src/components/BaseInputLabel.vue +4 -1
  169. package/src/components/BaseInputPercent.vue +1 -1
  170. package/src/components/BaseLayoutNotificationDropdown.vue +12 -6
  171. package/src/components/BaseLayoutNotificationItem.vue +15 -5
  172. package/src/components/BaseLayoutNotificationItemContent.vue +5 -2
  173. package/src/components/BaseLayoutSidebar.vue +22 -5
  174. package/src/components/BaseLayoutSidebarConfigurable.vue +19 -5
  175. package/src/components/BaseLayoutStackedConfigurable.vue +24 -7
  176. package/src/components/BaseLoadingCover.stories.js +2 -2
  177. package/src/components/BaseLoadingCover.vue +14 -7
  178. package/src/components/BaseMediaGallery.vue +4 -1
  179. package/src/components/BaseMediaGalleryItem.vue +13 -4
  180. package/src/components/BaseMediaItem.vue +12 -3
  181. package/src/components/BaseMediaLibrary.vue +11 -6
  182. package/src/components/BaseMediaList.vue +1 -1
  183. package/src/components/BaseMediaListItem.vue +15 -6
  184. package/src/components/BaseMediaPictures.vue +1 -1
  185. package/src/components/BaseMediaPicturesItem.vue +9 -3
  186. package/src/components/BaseMediaPreview.vue +2 -2
  187. package/src/components/BaseMenu.vue +56 -20
  188. package/src/components/BaseMenuItem.vue +14 -3
  189. package/src/components/BaseModalCenter.vue +17 -8
  190. package/src/components/BaseModalSide.vue +12 -6
  191. package/src/components/BaseNavbar.stories.js +1 -1
  192. package/src/components/BaseNavbarItemContent.vue +14 -3
  193. package/src/components/BaseNavbarSideItem.vue +4 -1
  194. package/src/components/BaseNavbarSideItemContent.vue +9 -2
  195. package/src/components/BaseNumber.vue +7 -4
  196. package/src/components/BasePagination.vue +2 -2
  197. package/src/components/BasePanel.vue +4 -1
  198. package/src/components/BasePassword.vue +6 -2
  199. package/src/components/BaseProgressCircle.vue +4 -1
  200. package/src/components/BaseRadioGroup.vue +7 -4
  201. package/src/components/BaseRichText.vue +1 -2
  202. package/src/components/BaseSelect.vue +6 -2
  203. package/src/components/BaseShortcut.vue +11 -4
  204. package/src/components/BaseSideNavigation.vue +4 -1
  205. package/src/components/BaseSideNavigationItem.vue +5 -2
  206. package/src/components/BaseSkeleton.vue +23 -7
  207. package/src/components/BaseStatistic.vue +15 -4
  208. package/src/components/BaseStepper.vue +4 -1
  209. package/src/components/BaseSwitch.stories.js +0 -1
  210. package/src/components/BaseSwitch.vue +8 -2
  211. package/src/components/BaseSystemAlert.vue +4 -1
  212. package/src/components/BaseTabItem.vue +5 -2
  213. package/src/components/BaseTable.vue +19 -9
  214. package/src/components/BaseTagAutocomplete.stories.js +1 -1
  215. package/src/components/BaseTagAutocomplete.vue +19 -9
  216. package/src/components/BaseTagAutocompleteFetch.vue +18 -4
  217. package/src/components/BaseTextarea.vue +2 -2
  218. package/src/components/BaseTextareaAutoresize.stories.js +30 -1
  219. package/src/components/BaseTextareaAutoresize.vue +20 -10
  220. package/src/components/BaseTimeline.vue +8 -2
  221. package/src/svg/BaseEmptyState.vue +5 -1
  222. package/src/svg/BaseSpinnerLarge.vue +15 -3
  223. package/src/svg/BaseSpinnerSmall.vue +8 -2
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div :data-name="nameInternal">
3
3
  <div class="space-y-2">
4
- <div v-for="(locale, key) in localesInternal" :key="key">
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 v-if="globalErrorMessage" class="mt-3" bordered color="danger">
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>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <button
3
3
  type="button"
4
- :class="buttonClass"
4
+ :class="twButton"
5
5
  :disabled="disabled"
6
6
  @drop.prevent="
7
7
  dragging = false;
@@ -12,7 +12,11 @@
12
12
  @dragenter.prevent="dragging = true"
13
13
  @click="pickFile"
14
14
  >
15
- <slot :selecting="selecting" :dragging="dragging" :disabled="disabled" />
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>
@@ -32,14 +36,14 @@ import { maxSize, validExtension } from '@/utils/fileValidations';
32
36
  const props = withDefaults(
33
37
  defineProps<{
34
38
  disabled?: boolean;
35
- buttonClass?: string;
39
+ twButton?: string;
36
40
  maxSize?: number;
37
41
  accept?: string;
38
42
  acceptedExtensions?: string[];
39
43
  }>(),
40
44
  {
41
45
  disabled: false,
42
- buttonClass: '',
46
+ twButton: '',
43
47
  maxSize: 1024 * 1024 * 20, // 20 MB,
44
48
  accept: undefined,
45
49
  acceptedExtensions: undefined,
@@ -11,7 +11,7 @@ export default {
11
11
  title: 'Form/BaseFilePickerCrop',
12
12
  component: BaseFilePickerCrop,
13
13
  args: {
14
- buttonClass: 'w-full',
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-class="text-primary-600 w-6 h-6"
72
- backdrop-class="bg-white opacity-60"
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-class="buttonClass"
3
+ :tw-button="twButton"
4
4
  :disabled="disabled"
5
5
  accept="image/*"
6
6
  :max-size="maxSize"
@@ -8,7 +8,10 @@
8
8
  @select="launchCropper"
9
9
  >
10
10
  <template #default="slotProps">
11
- <slot name="default" v-bind="slotProps" />
11
+ <slot
12
+ name="default"
13
+ v-bind="slotProps"
14
+ />
12
15
 
13
16
  <BaseCropperModal
14
17
  v-if="cropperInternal"
@@ -31,14 +34,14 @@ import { isObject, reject } from 'lodash';
31
34
  const props = withDefaults(
32
35
  defineProps<{
33
36
  disabled?: boolean;
34
- buttonClass?: string;
37
+ twButton?: string;
35
38
  maxSize?: number;
36
39
  acceptedExtensions?: string[];
37
40
  cropper: BaseCropperConfig | null;
38
41
  }>(),
39
42
  {
40
43
  disabled: false,
41
- buttonClass: '',
44
+ twButton: '',
42
45
  maxSize: 1024 * 1024 * 20, // 20 MB
43
46
  acceptedExtensions: undefined,
44
47
  }
@@ -7,7 +7,7 @@ export default {
7
7
  title: 'Form/BaseFileUploader',
8
8
  component: BaseFileUploader,
9
9
  args: {
10
- buttonClass: 'w-full',
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-class="text-red-600 w-6 h-6"
57
- backdrop-class="bg-white opacity-60"
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-class="w-6 h-6 text-primary-600"
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
- buttonClass?: string;
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
- buttonClass: '',
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
- buttonClass: props.buttonClass,
91
+ twButton: props.twButton,
92
92
  maxSize: props.maxSize,
93
93
  accept: props.component == 'BaseFilePickerCrop' ? undefined : props.accept,
94
94
  acceptedExtensions: props.acceptedExtensions,
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <form ref="form" class="relative" @submit.prevent="submit()">
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,13 +19,16 @@
15
19
  leave-from-class="opacity-100"
16
20
  leave-to-class="opacity-0"
17
21
  >
18
- <slot v-if="loading" name="loading">
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
  >
22
29
  <div
23
- class="absolute inset-0 h-full w-full opacity-80"
24
- :class="loadingMaskClass"
30
+ class="absolute inset-0 h-full w-full"
31
+ :class="twMerge('bg-white opacity-80', twLoadingMask)"
25
32
  />
26
33
  <svg
27
34
  class="relative h-6 w-6 animate-spin text-blue-600"
@@ -46,6 +53,7 @@ import { AxiosError, AxiosInstance, AxiosResponse } from 'axios';
46
53
  import { config, useNotificationsStore } from '@/index';
47
54
  import { get, isArray } from 'lodash';
48
55
  import { t } from '@/i18n';
56
+ import { twMerge } from 'tailwind-merge';
49
57
 
50
58
  const notifications = useNotificationsStore();
51
59
 
@@ -94,8 +102,8 @@ const props = defineProps({
94
102
  },
95
103
  type: Function as PropType<(error: AxiosError) => void>,
96
104
  },
97
- loadingMaskClass: {
98
- default: 'bg-white',
105
+ twLoadingMask: {
106
+ default: '',
99
107
  type: String,
100
108
  },
101
109
  showNotificationOnError: {
@@ -14,19 +14,31 @@
14
14
  @update:model-value="onUpdate"
15
15
  >
16
16
  <template #items="itemProps">
17
- <slot name="items" v-bind="itemProps" />
17
+ <slot
18
+ name="items"
19
+ v-bind="itemProps"
20
+ />
18
21
  </template>
19
22
 
20
23
  <template #option="optionProps">
21
- <slot name="option" v-bind="optionProps" />
24
+ <slot
25
+ name="option"
26
+ v-bind="optionProps"
27
+ />
22
28
  </template>
23
29
 
24
30
  <template #empty="emptyProps">
25
- <slot name="empty" v-bind="emptyProps" />
31
+ <slot
32
+ name="empty"
33
+ v-bind="emptyProps"
34
+ />
26
35
  </template>
27
36
 
28
37
  <template #footer="footerProps">
29
- <slot name="footer" v-bind="footerProps" />
38
+ <slot
39
+ name="footer"
40
+ v-bind="footerProps"
41
+ />
30
42
  </template>
31
43
  </BaseTagAutocompleteFetch>
32
44
  </template>
@@ -20,7 +20,10 @@
20
20
  {{ title }}
21
21
  </h2>
22
22
 
23
- <div v-if="badge" class="order-1 mb-1 xs:order-2 xs:mb-0">
23
+ <div
24
+ v-if="badge"
25
+ class="order-1 mb-1 xs:order-2 xs:mb-0"
26
+ >
24
27
  <BaseBadge
25
28
  :color="badge.color"
26
29
  :icon="badge.icon"
@@ -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 v-for="(label, key) in suffixes" :key="key" :value="key">
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 ref="drawer" class="h-44 overflow-y-auto px-2 pb-2">
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 v-for="icon in filteredIcons" :key="icon">
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 class="inline-flex rounded border" :class="[borderColor]">
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
- ? 'left'
33
- : emptyRight
34
- ? 'right'
35
- : 'none'
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"
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <p class="block text-sm font-medium leading-tight text-red-600">
3
- <slot></slot>
3
+ <slot />
4
4
  </p>
5
5
  </template>
6
6
 
@@ -14,7 +14,10 @@
14
14
  icon="heroicons:question-mark-circle-20-solid"
15
15
  />
16
16
 
17
- <span v-if="required" class="ml-0.5 text-red-600"> *</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"
@@ -14,7 +14,7 @@
14
14
  :min="min"
15
15
  :max="max"
16
16
  @update:model-value="onUpdate"
17
- ></BaseInput>
17
+ />
18
18
  </template>
19
19
 
20
20
  <script lang="ts" setup>
@@ -2,7 +2,7 @@
2
2
  <BaseMenu
3
3
  class="inline-block"
4
4
  :position="mobile ? 'custom' : 'bottom-left'"
5
- :menu-class="['sm:w-[320px] w-[280px]', mobile ? 'right-4' : '']"
5
+ :tw-menu="['sm:w-[320px] w-[280px]', mobile ? 'right-4' : '']"
6
6
  >
7
7
  <template #button="{ open }">
8
8
  <div
@@ -10,13 +10,16 @@
10
10
  :class="[open ? 'bg-slate-100' : '']"
11
11
  @click="onOpen"
12
12
  >
13
- <BaseIcon icon="fa-solid:bell" :class="[iconClasses]"></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
- ></BaseCounter>
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
- ></BaseLayoutNotificationItem>
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
- ></BaseIcon>
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 :to="notificationsConfig.footerTo" @mouseup="close">
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 v-if="notification.to" v-slot="{ active, close }">
3
- <RouterLink :to="notification.to" @mouseup="onClick(close)">
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
- ></BaseLayoutNotificationItemContent>
13
+ />
8
14
  </RouterLink>
9
15
  </MenuItem>
10
16
  <div v-else>
11
- <MenuItem v-slot="{ active }" as="button" class="w-full text-left">
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
- ></BaseLayoutNotificationItemContent>
26
+ />
17
27
  </MenuItem>
18
28
  </div>
19
29
  </template>
@@ -1,9 +1,12 @@
1
1
  <template>
2
- <div class="px-3 py-2" :class="[active ? 'bg-slate-100' : '']">
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
- ></div>
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 as="template" :show="showMobileMenu">
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 class="block h-8 w-auto" :src="logoUrl" :alt="appName" />
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 class="w-14 flex-shrink-0" aria-hidden="true">
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 class="flex bg-white" :style="{ height: navbarHeight + 'px' }">
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 class="block h-8 w-auto" :src="logoUrl" :alt="appName" />
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 v-for="section in actionSections" :key="section.title">
12
- <h2 v-if="section.title" class="pl-3" :class="sectionTitleClasses">
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
- ></BaseLayoutNotificationDropdown>
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 :items="userMenu" :size="size == 'xs' ? 'xs' : 'sm'">
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 :user="user" :size="size" show-details />
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 to="/" class="flex flex-shrink-0 items-center p-2 pl-0">
10
- <img class="block h-8 w-auto" :src="logoUrl" :alt="appName" />
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
- ></BaseLayoutNotificationDropdown>
41
+ />
35
42
 
36
43
  <!-- Profile dropdown -->
37
- <BaseMenu menu-class="w-52" class="hidden md:block" :items="userMenu">
44
+ <BaseMenu
45
+ tw-menu="w-52"
46
+ class="hidden md:block"
47
+ :items="userMenu"
48
+ >
38
49
  <template #button="{ open }">
39
- <div class="flex rounded-full" :class="[open ? '' : '']">
40
- <BaseAvatar :class="dark ? 'text-white' : ''" :user="user" />
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">