sprintify-ui 0.0.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.
Files changed (176) hide show
  1. package/README.md +188 -0
  2. package/dist/types/src/components/BaseAlert.vue.d.ts +51 -0
  3. package/dist/types/src/components/BaseAutocomplete.vue.d.ts +268 -0
  4. package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +273 -0
  5. package/dist/types/src/components/BaseAvatar.vue.d.ts +126 -0
  6. package/dist/types/src/components/BaseBadge.vue.d.ts +94 -0
  7. package/dist/types/src/components/BaseBelongsTo.vue.d.ts +268 -0
  8. package/dist/types/src/components/BaseBoolean.vue.d.ts +64 -0
  9. package/dist/types/src/components/BaseBreadcrumbs.vue.d.ts +66 -0
  10. package/dist/types/src/components/BaseButton.vue.d.ts +23 -0
  11. package/dist/types/src/components/BaseCard.vue.d.ts +74 -0
  12. package/dist/types/src/components/BaseCardRow.vue.d.ts +16 -0
  13. package/dist/types/src/components/BaseClipboard.vue.d.ts +74 -0
  14. package/dist/types/src/components/BaseContainer.vue.d.ts +34 -0
  15. package/dist/types/src/components/BaseCounter.vue.d.ts +125 -0
  16. package/dist/types/src/components/BaseDataIterator.vue.d.ts +345 -0
  17. package/dist/types/src/components/BaseDataTable.vue.d.ts +657 -0
  18. package/dist/types/src/components/BaseDataTableToggleColumns.vue.d.ts +1281 -0
  19. package/dist/types/src/components/BaseDatePicker.vue.d.ts +190 -0
  20. package/dist/types/src/components/BaseDateSelect.vue.d.ts +171 -0
  21. package/dist/types/src/components/BaseDescriptionList.vue.d.ts +48 -0
  22. package/dist/types/src/components/BaseDescriptionListItem.vue.d.ts +49 -0
  23. package/dist/types/src/components/BaseDialog.vue.d.ts +160 -0
  24. package/dist/types/src/components/BaseFilePicker.vue.d.ts +44 -0
  25. package/dist/types/src/components/BaseFileUploader.vue.d.ts +220 -0
  26. package/dist/types/src/components/BaseInput.vue.d.ts +209 -0
  27. package/dist/types/src/components/BaseInputLabel.vue.d.ts +31 -0
  28. package/dist/types/src/components/BaseLoadingCover.vue.d.ts +166 -0
  29. package/dist/types/src/components/BaseLoadingPage.vue.d.ts +2 -0
  30. package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +269 -0
  31. package/dist/types/src/components/BaseMediaLibraryItem.vue.d.ts +75 -0
  32. package/dist/types/src/components/BaseMenu.vue.d.ts +117 -0
  33. package/dist/types/src/components/BaseMenuItem.vue.d.ts +147 -0
  34. package/dist/types/src/components/BaseModalCenter.vue.d.ts +141 -0
  35. package/dist/types/src/components/BaseModalSide.vue.d.ts +141 -0
  36. package/dist/types/src/components/BaseNavbar.vue.d.ts +79 -0
  37. package/dist/types/src/components/BaseNavbarItem.vue.d.ts +80 -0
  38. package/dist/types/src/components/BaseNavbarItemContent.vue.d.ts +127 -0
  39. package/dist/types/src/components/BasePagination.vue.d.ts +25 -0
  40. package/dist/types/src/components/BasePaginationSimple.vue.d.ts +25 -0
  41. package/dist/types/src/components/BasePanel.vue.d.ts +31 -0
  42. package/dist/types/src/components/BasePassword.vue.d.ts +66 -0
  43. package/dist/types/src/components/BaseProcessRing.vue.d.ts +36 -0
  44. package/dist/types/src/components/BaseReadMore.vue.d.ts +74 -0
  45. package/dist/types/src/components/BaseSelect.vue.d.ts +55 -0
  46. package/dist/types/src/components/BaseSideNavigation.vue.d.ts +48 -0
  47. package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +92 -0
  48. package/dist/types/src/components/BaseSkeleton.vue.d.ts +93 -0
  49. package/dist/types/src/components/BaseSpinner.vue.d.ts +2 -0
  50. package/dist/types/src/components/BaseSwitch.vue.d.ts +39 -0
  51. package/dist/types/src/components/BaseSystemAlert.vue.d.ts +141 -0
  52. package/dist/types/src/components/BaseTabItem.vue.d.ts +70 -0
  53. package/dist/types/src/components/BaseTable.vue.d.ts +467 -0
  54. package/dist/types/src/components/BaseTableColumn.vue.d.ts +164 -0
  55. package/dist/types/src/components/BaseTabs.vue.d.ts +48 -0
  56. package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +274 -0
  57. package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +251 -0
  58. package/dist/types/src/components/BaseTextarea.vue.d.ts +228 -0
  59. package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +44 -0
  60. package/dist/types/src/components/BaseTitle.vue.d.ts +45 -0
  61. package/dist/types/src/components/BaseWordCount.vue.d.ts +31 -0
  62. package/dist/types/src/components/SlotComponent.d.ts +43 -0
  63. package/dist/types/src/components/index.d.ts +2 -0
  64. package/dist/types/src/composables/breakpoints.d.ts +12 -0
  65. package/dist/types/src/composables/modal.d.ts +6 -0
  66. package/dist/types/src/constants/MyConstants.d.ts +1 -0
  67. package/dist/types/src/constants/index.d.ts +2 -0
  68. package/dist/types/src/index.d.ts +253 -0
  69. package/dist/types/src/types/Media.d.ts +8 -0
  70. package/dist/types/src/types/UploadedFile.d.ts +9 -0
  71. package/dist/types/src/types/User.d.ts +6 -0
  72. package/dist/types/src/types/types.d.ts +88 -0
  73. package/dist/types/src/utils/fileSizeFormat.d.ts +1 -0
  74. package/dist/types/src/utils/index.d.ts +4 -0
  75. package/dist/types/src/utils/scrollPreventer.d.ts +4 -0
  76. package/dist/types/src/utils/toHumanList.d.ts +1 -0
  77. package/package.json +99 -0
  78. package/src/assets/button.css +80 -0
  79. package/src/assets/form.css +15 -0
  80. package/src/assets/main.css +3 -0
  81. package/src/assets/pikaday.css +134 -0
  82. package/src/assets/tailwind.css +5 -0
  83. package/src/components/BaseAlert.stories.js +52 -0
  84. package/src/components/BaseAlert.vue +152 -0
  85. package/src/components/BaseAutocomplete.stories.js +127 -0
  86. package/src/components/BaseAutocomplete.vue +376 -0
  87. package/src/components/BaseAutocompleteFetch.stories.js +121 -0
  88. package/src/components/BaseAutocompleteFetch.vue +185 -0
  89. package/src/components/BaseAvatar.stories.js +39 -0
  90. package/src/components/BaseAvatar.vue +92 -0
  91. package/src/components/BaseBadge.stories.js +61 -0
  92. package/src/components/BaseBadge.vue +70 -0
  93. package/src/components/BaseBelongsTo.stories.js +130 -0
  94. package/src/components/BaseBelongsTo.vue +122 -0
  95. package/src/components/BaseBoolean.stories.js +35 -0
  96. package/src/components/BaseBoolean.vue +29 -0
  97. package/src/components/BaseBreadcrumbs.stories.js +45 -0
  98. package/src/components/BaseBreadcrumbs.vue +78 -0
  99. package/src/components/BaseButton.stories.js +80 -0
  100. package/src/components/BaseButton.vue +39 -0
  101. package/src/components/BaseCard.stories.js +61 -0
  102. package/src/components/BaseCard.vue +49 -0
  103. package/src/components/BaseCardRow.vue +34 -0
  104. package/src/components/BaseClipboard.stories.js +31 -0
  105. package/src/components/BaseClipboard.vue +96 -0
  106. package/src/components/BaseContainer.stories.js +34 -0
  107. package/src/components/BaseContainer.vue +50 -0
  108. package/src/components/BaseCounter.stories.js +32 -0
  109. package/src/components/BaseCounter.vue +72 -0
  110. package/src/components/BaseDataIterator.stories.js +90 -0
  111. package/src/components/BaseDataIterator.vue +658 -0
  112. package/src/components/BaseDataTable.stories.js +95 -0
  113. package/src/components/BaseDataTable.vue +489 -0
  114. package/src/components/BaseDataTableToggleColumns.vue +69 -0
  115. package/src/components/BaseDatePicker.stories.js +53 -0
  116. package/src/components/BaseDatePicker.vue +166 -0
  117. package/src/components/BaseDateSelect.vue +192 -0
  118. package/src/components/BaseDescriptionList.vue +11 -0
  119. package/src/components/BaseDescriptionListItem.vue +12 -0
  120. package/src/components/BaseDialog.vue +104 -0
  121. package/src/components/BaseFilePicker.vue +101 -0
  122. package/src/components/BaseFileUploader.vue +166 -0
  123. package/src/components/BaseInput.vue +82 -0
  124. package/src/components/BaseInputLabel.vue +26 -0
  125. package/src/components/BaseLoadingCover.vue +84 -0
  126. package/src/components/BaseLoadingPage.vue +19 -0
  127. package/src/components/BaseMediaLibrary.vue +281 -0
  128. package/src/components/BaseMediaLibraryItem.vue +92 -0
  129. package/src/components/BaseMenu.vue +114 -0
  130. package/src/components/BaseMenuItem.vue +93 -0
  131. package/src/components/BaseModalCenter.vue +107 -0
  132. package/src/components/BaseModalSide.vue +112 -0
  133. package/src/components/BaseNavbar.vue +72 -0
  134. package/src/components/BaseNavbarItem.vue +72 -0
  135. package/src/components/BaseNavbarItemContent.vue +57 -0
  136. package/src/components/BasePagination.vue +82 -0
  137. package/src/components/BasePaginationSimple.vue +60 -0
  138. package/src/components/BasePanel.vue +39 -0
  139. package/src/components/BasePassword.vue +73 -0
  140. package/src/components/BaseProcessRing.vue +56 -0
  141. package/src/components/BaseReadMore.vue +72 -0
  142. package/src/components/BaseSelect.vue +59 -0
  143. package/src/components/BaseSideNavigation.vue +7 -0
  144. package/src/components/BaseSideNavigationItem.vue +42 -0
  145. package/src/components/BaseSkeleton.vue +24 -0
  146. package/src/components/BaseSpinner.vue +47 -0
  147. package/src/components/BaseSwitch.vue +87 -0
  148. package/src/components/BaseSystemAlert.vue +86 -0
  149. package/src/components/BaseTabItem.vue +30 -0
  150. package/src/components/BaseTable.vue +781 -0
  151. package/src/components/BaseTableColumn.vue +109 -0
  152. package/src/components/BaseTabs.vue +12 -0
  153. package/src/components/BaseTagAutocomplete.vue +385 -0
  154. package/src/components/BaseTagAutocompleteFetch.vue +154 -0
  155. package/src/components/BaseTextarea.vue +73 -0
  156. package/src/components/BaseTextareaAutoresize.vue +117 -0
  157. package/src/components/BaseTitle.vue +80 -0
  158. package/src/components/BaseWordCount.vue +36 -0
  159. package/src/components/SlotComponent.ts +37 -0
  160. package/src/components/index.ts +5 -0
  161. package/src/composables/breakpoints.ts +6 -0
  162. package/src/composables/modal.ts +77 -0
  163. package/src/constants/MyConstants.ts +1 -0
  164. package/src/constants/index.ts +5 -0
  165. package/src/env.d.ts +15 -0
  166. package/src/index.ts +70 -0
  167. package/src/lang/en.json +56 -0
  168. package/src/lang/fr.json +56 -0
  169. package/src/types/Media.ts +9 -0
  170. package/src/types/UploadedFile.ts +10 -0
  171. package/src/types/User.ts +7 -0
  172. package/src/types/types.ts +112 -0
  173. package/src/utils/fileSizeFormat.ts +15 -0
  174. package/src/utils/index.ts +5 -0
  175. package/src/utils/scrollPreventer.ts +21 -0
  176. package/src/utils/toHumanList.ts +20 -0
@@ -0,0 +1,112 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+
3
+ import { RouteLocationRaw } from 'vue-router';
4
+ import { UploadedFile } from './UploadedFile';
5
+
6
+ export interface Breadcrumb {
7
+ icon?: string;
8
+ to: RouteLocationRaw;
9
+ label: string;
10
+ }
11
+
12
+ export interface DataTableQuery extends Record<string, any> {
13
+ page?: number;
14
+ sort?: string;
15
+ search?: string;
16
+ filter?: Record<string, any>;
17
+ }
18
+
19
+ export type OptionValue = string | number;
20
+
21
+ export type Option = Record<string, any>;
22
+
23
+ export type Selection = Record<string, any> | null | undefined;
24
+
25
+ export type NormalizedOption = {
26
+ option: Option;
27
+ value: OptionValue;
28
+ label: string;
29
+ };
30
+
31
+ export type NormalizedSelection = NormalizedOption | null | undefined;
32
+
33
+ export type MediaLibraryPayload = {
34
+ to_remove: string[];
35
+ to_add: UploadedFile[];
36
+ };
37
+
38
+ export interface PaginationMetadata {
39
+ current_page: number;
40
+ per_page: number;
41
+ last_page: number;
42
+ total: number;
43
+ }
44
+
45
+ export interface CollectionItem {
46
+ [key: string]: any;
47
+ }
48
+
49
+ export type Collection = CollectionItem[];
50
+
51
+ export interface ResourceCollection {
52
+ meta: PaginationMetadata;
53
+ data: Collection;
54
+ }
55
+
56
+ export interface PaginatedCollection extends PaginationMetadata {
57
+ data: Collection;
58
+ }
59
+
60
+ export interface MenuItemInterface {
61
+ label?: string;
62
+ icon?: string;
63
+ action?: () => Promise<void> | void;
64
+ to?: RouteLocationRaw;
65
+ href?: string;
66
+ line?: boolean;
67
+ count?: number;
68
+ color?: 'dark' | 'light' | 'danger' | 'success' | 'warning';
69
+ }
70
+
71
+ export interface ActionItem {
72
+ label: string;
73
+ type: 'RouterLink' | 'a' | 'button';
74
+ href?: string;
75
+ to?: RouteLocationRaw;
76
+ action?: () => Promise<void> | void;
77
+ icon?: string;
78
+ count?: number;
79
+ meta?: Record<string, any>;
80
+ }
81
+
82
+ export interface ActionSection {
83
+ title: string;
84
+ actions: ActionItem[];
85
+ }
86
+
87
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
88
+ export type Row = Record<string, any>;
89
+
90
+ export interface BaseTableColumn {
91
+ id: string;
92
+ label: string;
93
+ field: string;
94
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
+ meta: undefined | Record<string, any>;
96
+ newKey: number;
97
+ numeric: boolean;
98
+ position: 'left' | 'right';
99
+ searchable: boolean;
100
+ sortable: boolean;
101
+ visible: boolean;
102
+ alwaysVisible: boolean;
103
+ optional: boolean;
104
+ width: number;
105
+ style: {
106
+ width: undefined | number;
107
+ };
108
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
109
+ thAttrs: (column: BaseTableColumn) => Record<string, any>;
110
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
+ tdAttrs: (row: Row, column: BaseTableColumn) => Record<string, any>;
112
+ }
@@ -0,0 +1,15 @@
1
+ import { config } from 'src';
2
+
3
+ export default function (size: number): string {
4
+ const i = Math.floor(Math.log(size) / Math.log(1024));
5
+
6
+ const units = [
7
+ config.i18n.global.t('sui.units.b'),
8
+ config.i18n.global.t('sui.units.kb'),
9
+ config.i18n.global.t('sui.units.mb'),
10
+ config.i18n.global.t('sui.units.gb'),
11
+ config.i18n.global.t('sui.units.tb'),
12
+ ];
13
+
14
+ return +(size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + units[i];
15
+ }
@@ -0,0 +1,5 @@
1
+ import toHumanList from './toHumanList';
2
+ import fileSizeFormat from './fileSizeFormat';
3
+ import { disableScroll, enableScroll } from './scrollPreventer';
4
+
5
+ export { toHumanList, fileSizeFormat, disableScroll, enableScroll };
@@ -0,0 +1,21 @@
1
+ import {
2
+ disablePageScroll,
3
+ clearQueueScrollLocks,
4
+ enablePageScroll,
5
+ ScrollableTarget,
6
+ } from 'scroll-lock';
7
+
8
+ function disableScroll(allow: ScrollableTarget | null = null) {
9
+ if (allow == null) {
10
+ allow = document.querySelectorAll('[scroll-lock-target]');
11
+ }
12
+
13
+ disablePageScroll(allow);
14
+ }
15
+
16
+ function enableScroll() {
17
+ clearQueueScrollLocks();
18
+ enablePageScroll();
19
+ }
20
+
21
+ export { disableScroll, enableScroll };
@@ -0,0 +1,20 @@
1
+ import { config } from 'src';
2
+
3
+ export default function (list: string[], conjunction?: string): string {
4
+ let sentence = '';
5
+
6
+ conjunction = conjunction ? conjunction : config.i18n.global.t('sui.and');
7
+
8
+ for (let i = 0; i < list.length; i++) {
9
+ const item = list[i];
10
+ sentence += item;
11
+
12
+ if (i < list.length - 2) {
13
+ sentence += ', ';
14
+ } else if (i == list.length - 2) {
15
+ sentence += ' ' + conjunction + ' ';
16
+ }
17
+ }
18
+
19
+ return sentence;
20
+ }