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.
- package/README.md +188 -0
- package/dist/types/src/components/BaseAlert.vue.d.ts +51 -0
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +268 -0
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +273 -0
- package/dist/types/src/components/BaseAvatar.vue.d.ts +126 -0
- package/dist/types/src/components/BaseBadge.vue.d.ts +94 -0
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +268 -0
- package/dist/types/src/components/BaseBoolean.vue.d.ts +64 -0
- package/dist/types/src/components/BaseBreadcrumbs.vue.d.ts +66 -0
- package/dist/types/src/components/BaseButton.vue.d.ts +23 -0
- package/dist/types/src/components/BaseCard.vue.d.ts +74 -0
- package/dist/types/src/components/BaseCardRow.vue.d.ts +16 -0
- package/dist/types/src/components/BaseClipboard.vue.d.ts +74 -0
- package/dist/types/src/components/BaseContainer.vue.d.ts +34 -0
- package/dist/types/src/components/BaseCounter.vue.d.ts +125 -0
- package/dist/types/src/components/BaseDataIterator.vue.d.ts +345 -0
- package/dist/types/src/components/BaseDataTable.vue.d.ts +657 -0
- package/dist/types/src/components/BaseDataTableToggleColumns.vue.d.ts +1281 -0
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +190 -0
- package/dist/types/src/components/BaseDateSelect.vue.d.ts +171 -0
- package/dist/types/src/components/BaseDescriptionList.vue.d.ts +48 -0
- package/dist/types/src/components/BaseDescriptionListItem.vue.d.ts +49 -0
- package/dist/types/src/components/BaseDialog.vue.d.ts +160 -0
- package/dist/types/src/components/BaseFilePicker.vue.d.ts +44 -0
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +220 -0
- package/dist/types/src/components/BaseInput.vue.d.ts +209 -0
- package/dist/types/src/components/BaseInputLabel.vue.d.ts +31 -0
- package/dist/types/src/components/BaseLoadingCover.vue.d.ts +166 -0
- package/dist/types/src/components/BaseLoadingPage.vue.d.ts +2 -0
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +269 -0
- package/dist/types/src/components/BaseMediaLibraryItem.vue.d.ts +75 -0
- package/dist/types/src/components/BaseMenu.vue.d.ts +117 -0
- package/dist/types/src/components/BaseMenuItem.vue.d.ts +147 -0
- package/dist/types/src/components/BaseModalCenter.vue.d.ts +141 -0
- package/dist/types/src/components/BaseModalSide.vue.d.ts +141 -0
- package/dist/types/src/components/BaseNavbar.vue.d.ts +79 -0
- package/dist/types/src/components/BaseNavbarItem.vue.d.ts +80 -0
- package/dist/types/src/components/BaseNavbarItemContent.vue.d.ts +127 -0
- package/dist/types/src/components/BasePagination.vue.d.ts +25 -0
- package/dist/types/src/components/BasePaginationSimple.vue.d.ts +25 -0
- package/dist/types/src/components/BasePanel.vue.d.ts +31 -0
- package/dist/types/src/components/BasePassword.vue.d.ts +66 -0
- package/dist/types/src/components/BaseProcessRing.vue.d.ts +36 -0
- package/dist/types/src/components/BaseReadMore.vue.d.ts +74 -0
- package/dist/types/src/components/BaseSelect.vue.d.ts +55 -0
- package/dist/types/src/components/BaseSideNavigation.vue.d.ts +48 -0
- package/dist/types/src/components/BaseSideNavigationItem.vue.d.ts +92 -0
- package/dist/types/src/components/BaseSkeleton.vue.d.ts +93 -0
- package/dist/types/src/components/BaseSpinner.vue.d.ts +2 -0
- package/dist/types/src/components/BaseSwitch.vue.d.ts +39 -0
- package/dist/types/src/components/BaseSystemAlert.vue.d.ts +141 -0
- package/dist/types/src/components/BaseTabItem.vue.d.ts +70 -0
- package/dist/types/src/components/BaseTable.vue.d.ts +467 -0
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +164 -0
- package/dist/types/src/components/BaseTabs.vue.d.ts +48 -0
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +274 -0
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +251 -0
- package/dist/types/src/components/BaseTextarea.vue.d.ts +228 -0
- package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +44 -0
- package/dist/types/src/components/BaseTitle.vue.d.ts +45 -0
- package/dist/types/src/components/BaseWordCount.vue.d.ts +31 -0
- package/dist/types/src/components/SlotComponent.d.ts +43 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/composables/breakpoints.d.ts +12 -0
- package/dist/types/src/composables/modal.d.ts +6 -0
- package/dist/types/src/constants/MyConstants.d.ts +1 -0
- package/dist/types/src/constants/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +253 -0
- package/dist/types/src/types/Media.d.ts +8 -0
- package/dist/types/src/types/UploadedFile.d.ts +9 -0
- package/dist/types/src/types/User.d.ts +6 -0
- package/dist/types/src/types/types.d.ts +88 -0
- package/dist/types/src/utils/fileSizeFormat.d.ts +1 -0
- package/dist/types/src/utils/index.d.ts +4 -0
- package/dist/types/src/utils/scrollPreventer.d.ts +4 -0
- package/dist/types/src/utils/toHumanList.d.ts +1 -0
- package/package.json +99 -0
- package/src/assets/button.css +80 -0
- package/src/assets/form.css +15 -0
- package/src/assets/main.css +3 -0
- package/src/assets/pikaday.css +134 -0
- package/src/assets/tailwind.css +5 -0
- package/src/components/BaseAlert.stories.js +52 -0
- package/src/components/BaseAlert.vue +152 -0
- package/src/components/BaseAutocomplete.stories.js +127 -0
- package/src/components/BaseAutocomplete.vue +376 -0
- package/src/components/BaseAutocompleteFetch.stories.js +121 -0
- package/src/components/BaseAutocompleteFetch.vue +185 -0
- package/src/components/BaseAvatar.stories.js +39 -0
- package/src/components/BaseAvatar.vue +92 -0
- package/src/components/BaseBadge.stories.js +61 -0
- package/src/components/BaseBadge.vue +70 -0
- package/src/components/BaseBelongsTo.stories.js +130 -0
- package/src/components/BaseBelongsTo.vue +122 -0
- package/src/components/BaseBoolean.stories.js +35 -0
- package/src/components/BaseBoolean.vue +29 -0
- package/src/components/BaseBreadcrumbs.stories.js +45 -0
- package/src/components/BaseBreadcrumbs.vue +78 -0
- package/src/components/BaseButton.stories.js +80 -0
- package/src/components/BaseButton.vue +39 -0
- package/src/components/BaseCard.stories.js +61 -0
- package/src/components/BaseCard.vue +49 -0
- package/src/components/BaseCardRow.vue +34 -0
- package/src/components/BaseClipboard.stories.js +31 -0
- package/src/components/BaseClipboard.vue +96 -0
- package/src/components/BaseContainer.stories.js +34 -0
- package/src/components/BaseContainer.vue +50 -0
- package/src/components/BaseCounter.stories.js +32 -0
- package/src/components/BaseCounter.vue +72 -0
- package/src/components/BaseDataIterator.stories.js +90 -0
- package/src/components/BaseDataIterator.vue +658 -0
- package/src/components/BaseDataTable.stories.js +95 -0
- package/src/components/BaseDataTable.vue +489 -0
- package/src/components/BaseDataTableToggleColumns.vue +69 -0
- package/src/components/BaseDatePicker.stories.js +53 -0
- package/src/components/BaseDatePicker.vue +166 -0
- package/src/components/BaseDateSelect.vue +192 -0
- package/src/components/BaseDescriptionList.vue +11 -0
- package/src/components/BaseDescriptionListItem.vue +12 -0
- package/src/components/BaseDialog.vue +104 -0
- package/src/components/BaseFilePicker.vue +101 -0
- package/src/components/BaseFileUploader.vue +166 -0
- package/src/components/BaseInput.vue +82 -0
- package/src/components/BaseInputLabel.vue +26 -0
- package/src/components/BaseLoadingCover.vue +84 -0
- package/src/components/BaseLoadingPage.vue +19 -0
- package/src/components/BaseMediaLibrary.vue +281 -0
- package/src/components/BaseMediaLibraryItem.vue +92 -0
- package/src/components/BaseMenu.vue +114 -0
- package/src/components/BaseMenuItem.vue +93 -0
- package/src/components/BaseModalCenter.vue +107 -0
- package/src/components/BaseModalSide.vue +112 -0
- package/src/components/BaseNavbar.vue +72 -0
- package/src/components/BaseNavbarItem.vue +72 -0
- package/src/components/BaseNavbarItemContent.vue +57 -0
- package/src/components/BasePagination.vue +82 -0
- package/src/components/BasePaginationSimple.vue +60 -0
- package/src/components/BasePanel.vue +39 -0
- package/src/components/BasePassword.vue +73 -0
- package/src/components/BaseProcessRing.vue +56 -0
- package/src/components/BaseReadMore.vue +72 -0
- package/src/components/BaseSelect.vue +59 -0
- package/src/components/BaseSideNavigation.vue +7 -0
- package/src/components/BaseSideNavigationItem.vue +42 -0
- package/src/components/BaseSkeleton.vue +24 -0
- package/src/components/BaseSpinner.vue +47 -0
- package/src/components/BaseSwitch.vue +87 -0
- package/src/components/BaseSystemAlert.vue +86 -0
- package/src/components/BaseTabItem.vue +30 -0
- package/src/components/BaseTable.vue +781 -0
- package/src/components/BaseTableColumn.vue +109 -0
- package/src/components/BaseTabs.vue +12 -0
- package/src/components/BaseTagAutocomplete.vue +385 -0
- package/src/components/BaseTagAutocompleteFetch.vue +154 -0
- package/src/components/BaseTextarea.vue +73 -0
- package/src/components/BaseTextareaAutoresize.vue +117 -0
- package/src/components/BaseTitle.vue +80 -0
- package/src/components/BaseWordCount.vue +36 -0
- package/src/components/SlotComponent.ts +37 -0
- package/src/components/index.ts +5 -0
- package/src/composables/breakpoints.ts +6 -0
- package/src/composables/modal.ts +77 -0
- package/src/constants/MyConstants.ts +1 -0
- package/src/constants/index.ts +5 -0
- package/src/env.d.ts +15 -0
- package/src/index.ts +70 -0
- package/src/lang/en.json +56 -0
- package/src/lang/fr.json +56 -0
- package/src/types/Media.ts +9 -0
- package/src/types/UploadedFile.ts +10 -0
- package/src/types/User.ts +7 -0
- package/src/types/types.ts +112 -0
- package/src/utils/fileSizeFormat.ts +15 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/scrollPreventer.ts +21 -0
- package/src/utils/toHumanList.ts +20 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<SwitchGroup>
|
|
3
|
+
<div class="inline-flex items-center space-x-3">
|
|
4
|
+
<Switch
|
|
5
|
+
:model-value="modelValue"
|
|
6
|
+
:class="[
|
|
7
|
+
modelValue ? bg : 'bg-slate-200',
|
|
8
|
+
'relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 ',
|
|
9
|
+
focus,
|
|
10
|
+
]"
|
|
11
|
+
@update:model-value="update"
|
|
12
|
+
>
|
|
13
|
+
<span
|
|
14
|
+
aria-hidden="true"
|
|
15
|
+
:class="[
|
|
16
|
+
modelValue ? 'translate-x-5' : 'translate-x-0',
|
|
17
|
+
'pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out',
|
|
18
|
+
]"
|
|
19
|
+
/>
|
|
20
|
+
</Switch>
|
|
21
|
+
<SwitchLabel v-if="$slots.default" class="cursor-pointer">
|
|
22
|
+
<slot />
|
|
23
|
+
</SwitchLabel>
|
|
24
|
+
</div>
|
|
25
|
+
</SwitchGroup>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { Switch, SwitchGroup, SwitchLabel } from '@headlessui/vue';
|
|
30
|
+
import { defineComponent } from 'vue';
|
|
31
|
+
|
|
32
|
+
export default defineComponent({
|
|
33
|
+
components: {
|
|
34
|
+
// eslint-disable-next-line vue/no-reserved-component-names
|
|
35
|
+
Switch,
|
|
36
|
+
SwitchGroup,
|
|
37
|
+
SwitchLabel,
|
|
38
|
+
},
|
|
39
|
+
props: {
|
|
40
|
+
modelValue: {
|
|
41
|
+
default: false,
|
|
42
|
+
type: Boolean,
|
|
43
|
+
},
|
|
44
|
+
color: {
|
|
45
|
+
default: 'primary',
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
default: 'base',
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
emits: ['update:modelValue'],
|
|
54
|
+
computed: {
|
|
55
|
+
bg() {
|
|
56
|
+
if (this.color == 'primary') {
|
|
57
|
+
return 'bg-primary-500';
|
|
58
|
+
}
|
|
59
|
+
if (this.color == 'red') {
|
|
60
|
+
return 'bg-red-500';
|
|
61
|
+
}
|
|
62
|
+
if (this.color == 'green') {
|
|
63
|
+
return 'bg-green-500';
|
|
64
|
+
}
|
|
65
|
+
return 'bg-slate-900';
|
|
66
|
+
},
|
|
67
|
+
focus() {
|
|
68
|
+
if (this.color == 'primary') {
|
|
69
|
+
return 'focus:ring-primary-500';
|
|
70
|
+
}
|
|
71
|
+
if (this.color == 'red') {
|
|
72
|
+
return 'focus:ring-red-500';
|
|
73
|
+
}
|
|
74
|
+
if (this.color == 'green') {
|
|
75
|
+
return 'focus:ring-green-500';
|
|
76
|
+
}
|
|
77
|
+
return 'focus:ring-slate-900';
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
+
update(payload: any) {
|
|
83
|
+
this.$emit('update:modelValue', payload);
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative">
|
|
3
|
+
<component
|
|
4
|
+
:is="is"
|
|
5
|
+
:type="is == 'button' ? 'button' : undefined"
|
|
6
|
+
:to="is == 'RouterLink' ? to : undefined"
|
|
7
|
+
class="relative flex w-full items-center justify-center bg-white text-center font-medium"
|
|
8
|
+
:class="[colorClasses]"
|
|
9
|
+
@click="is == 'button' && action ? action() : undefined"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="py-4 text-sm leading-tight"
|
|
13
|
+
:class="[closable ? 'pr-10 pl-3' : 'px-3']"
|
|
14
|
+
>
|
|
15
|
+
<div class="max-w-4xl">
|
|
16
|
+
<slot />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</component>
|
|
20
|
+
<div v-if="closable" class="absolute top-0 right-0 p-3">
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
class="rounded-full bg-black bg-opacity-50 p-1 text-white"
|
|
24
|
+
@click="close"
|
|
25
|
+
>
|
|
26
|
+
<Icon icon="heroicons:x-mark" />
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts" setup>
|
|
33
|
+
import { PropType } from 'vue';
|
|
34
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
35
|
+
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
to: {
|
|
38
|
+
default: undefined,
|
|
39
|
+
type: [Object, String, undefined] as PropType<RouteLocationRaw | undefined>,
|
|
40
|
+
},
|
|
41
|
+
action: {
|
|
42
|
+
default: undefined,
|
|
43
|
+
type: Function as PropType<() => Promise<void> | void>,
|
|
44
|
+
},
|
|
45
|
+
color: {
|
|
46
|
+
default: 'info',
|
|
47
|
+
type: String as PropType<'info' | 'warning' | 'danger' | 'success'>,
|
|
48
|
+
},
|
|
49
|
+
closable: {
|
|
50
|
+
default: false,
|
|
51
|
+
type: Boolean,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const emit = defineEmits(['close']);
|
|
56
|
+
|
|
57
|
+
function close() {
|
|
58
|
+
emit('close');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const is = computed((): string => {
|
|
62
|
+
if (props.to) {
|
|
63
|
+
return 'RouterLink';
|
|
64
|
+
}
|
|
65
|
+
if (props.action) {
|
|
66
|
+
return 'button';
|
|
67
|
+
}
|
|
68
|
+
return 'div';
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const colorClasses = computed((): string => {
|
|
72
|
+
if (props.color == 'info') {
|
|
73
|
+
return 'bg-blue-500 text-white';
|
|
74
|
+
}
|
|
75
|
+
if (props.color == 'success') {
|
|
76
|
+
return 'bg-green-600 text-white';
|
|
77
|
+
}
|
|
78
|
+
if (props.color == 'danger') {
|
|
79
|
+
return 'bg-red-600 text-white';
|
|
80
|
+
}
|
|
81
|
+
if (props.color == 'warning') {
|
|
82
|
+
return 'bg-yellow-400 text-yellow-900';
|
|
83
|
+
}
|
|
84
|
+
return 'bg-slate-900 text-white';
|
|
85
|
+
});
|
|
86
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li role="presentation">
|
|
3
|
+
<router-link v-slot="{ href, navigate, isExactActive }" :to="to" custom>
|
|
4
|
+
<a
|
|
5
|
+
:href="href"
|
|
6
|
+
class="relative inline-block whitespace-nowrap rounded-t-lg border-b-[2px] p-4 font-medium"
|
|
7
|
+
:class="[
|
|
8
|
+
isExactActive
|
|
9
|
+
? 'border-blue-600 text-blue-600'
|
|
10
|
+
: 'border-transparent hover:border-slate-300 hover:text-slate-600',
|
|
11
|
+
]"
|
|
12
|
+
@click="navigate"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</a>
|
|
16
|
+
</router-link>
|
|
17
|
+
</li>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import { PropType } from 'vue';
|
|
22
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
23
|
+
|
|
24
|
+
defineProps({
|
|
25
|
+
to: {
|
|
26
|
+
required: true,
|
|
27
|
+
type: [Object, String] as PropType<RouteLocationRaw>,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
</script>
|