@winchsa/ui 0.1.33 → 0.1.34
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/components/Breadcrumbs.d.vue.ts +7 -0
- package/dist/components/Breadcrumbs.vue +46 -0
- package/dist/components/Breadcrumbs.vue.d.ts +7 -0
- package/dist/components/CustomizerSection.d.vue.ts +17 -0
- package/dist/components/CustomizerSection.vue +19 -0
- package/dist/components/CustomizerSection.vue.d.ts +17 -0
- package/dist/components/DialogCloseBtn.d.vue.ts +7 -0
- package/dist/components/DialogCloseBtn.vue +20 -0
- package/dist/components/DialogCloseBtn.vue.d.ts +7 -0
- package/dist/components/Drawer.d.vue.ts +28 -0
- package/dist/components/Drawer.vue +60 -0
- package/dist/components/Drawer.vue.d.ts +28 -0
- package/dist/components/IconBtn.d.vue.ts +18 -0
- package/dist/components/IconBtn.vue +24 -0
- package/dist/components/IconBtn.vue.d.ts +18 -0
- package/dist/components/LoadingBar.d.vue.ts +6 -0
- package/dist/components/LoadingBar.vue +31 -0
- package/dist/components/LoadingBar.vue.d.ts +6 -0
- package/dist/components/LoadingDialog.d.vue.ts +12 -0
- package/dist/components/LoadingDialog.vue +41 -0
- package/dist/components/LoadingDialog.vue.d.ts +12 -0
- package/dist/components/LoadingItem.d.vue.ts +25 -0
- package/dist/components/LoadingItem.vue +66 -0
- package/dist/components/LoadingItem.vue.d.ts +25 -0
- package/dist/components/Modal.d.vue.ts +50 -0
- package/dist/components/Modal.vue +155 -0
- package/dist/components/Modal.vue.d.ts +50 -0
- package/dist/components/MoreBtn.d.vue.ts +17 -0
- package/dist/components/MoreBtn.vue +28 -0
- package/dist/components/MoreBtn.vue.d.ts +17 -0
- package/dist/components/ScrollToTop.d.vue.ts +3 -0
- package/dist/components/ScrollToTop.vue +39 -0
- package/dist/components/ScrollToTop.vue.d.ts +3 -0
- package/dist/components/SiteTitle.d.vue.ts +3 -0
- package/dist/components/SiteTitle.vue +14 -0
- package/dist/components/SiteTitle.vue.d.ts +3 -0
- package/dist/components/Toaster.d.vue.ts +6 -0
- package/dist/components/Toaster.vue +19 -0
- package/dist/components/Toaster.vue.d.ts +6 -0
- package/dist/components/cards/AppCard.d.vue.ts +18 -0
- package/dist/components/cards/AppCard.vue +45 -0
- package/dist/components/cards/AppCard.vue.d.ts +18 -0
- package/dist/components/cards/AppCardActions.d.vue.ts +33 -0
- package/dist/components/cards/AppCardActions.vue +126 -0
- package/dist/components/cards/AppCardActions.vue.d.ts +33 -0
- package/dist/components/cards/CardStatisticsHorizontal.d.vue.ts +9 -0
- package/dist/components/cards/CardStatisticsHorizontal.vue +29 -0
- package/dist/components/cards/CardStatisticsHorizontal.vue.d.ts +9 -0
- package/dist/components/cards/CheckboxesCard.d.vue.ts +18 -0
- package/dist/components/cards/CheckboxesCard.vue +108 -0
- package/dist/components/cards/CheckboxesCard.vue.d.ts +18 -0
- package/dist/components/cards/HeaderCard.d.vue.ts +9 -0
- package/dist/components/cards/HeaderCard.vue +31 -0
- package/dist/components/cards/HeaderCard.vue.d.ts +9 -0
- package/dist/components/cards/ImageCard.d.vue.ts +33 -0
- package/dist/components/cards/ImageCard.vue +73 -0
- package/dist/components/cards/ImageCard.vue.d.ts +33 -0
- package/dist/components/cards/InputCard.d.vue.ts +21 -0
- package/dist/components/cards/InputCard.vue +60 -0
- package/dist/components/cards/InputCard.vue.d.ts +21 -0
- package/dist/components/cards/StaticCard.d.vue.ts +21 -0
- package/dist/components/cards/StaticCard.vue +37 -0
- package/dist/components/cards/StaticCard.vue.d.ts +21 -0
- package/dist/components/forms/Accordion.d.vue.ts +19 -0
- package/dist/components/forms/Accordion.vue +43 -0
- package/dist/components/forms/Accordion.vue.d.ts +19 -0
- package/dist/components/forms/AppBarSearch.d.vue.ts +43 -0
- package/dist/components/forms/AppBarSearch.vue +345 -0
- package/dist/components/forms/AppBarSearch.vue.d.ts +43 -0
- package/dist/components/forms/AppCombobox.d.vue.ts +13 -0
- package/dist/components/forms/AppCombobox.vue +60 -0
- package/dist/components/forms/AppCombobox.vue.d.ts +13 -0
- package/dist/components/forms/AppDrawerHeaderSection.d.vue.ts +20 -0
- package/dist/components/forms/AppDrawerHeaderSection.vue +21 -0
- package/dist/components/forms/AppDrawerHeaderSection.vue.d.ts +20 -0
- package/dist/components/forms/AppLabel.d.vue.ts +24 -0
- package/dist/components/forms/AppLabel.vue +47 -0
- package/dist/components/forms/AppLabel.vue.d.ts +24 -0
- package/dist/components/forms/AppLink.d.vue.ts +19 -0
- package/dist/components/forms/AppLink.vue +50 -0
- package/dist/components/forms/AppLink.vue.d.ts +19 -0
- package/dist/components/forms/AppNumberField.d.vue.ts +20 -0
- package/dist/components/forms/AppNumberField.vue +79 -0
- package/dist/components/forms/AppNumberField.vue.d.ts +20 -0
- package/dist/components/forms/AppOtpInput.d.vue.ts +13 -0
- package/dist/components/forms/AppOtpInput.vue +84 -0
- package/dist/components/forms/AppOtpInput.vue.d.ts +13 -0
- package/dist/components/forms/AppSearchHeader.d.vue.ts +8 -0
- package/dist/components/forms/AppSearchHeader.vue +72 -0
- package/dist/components/forms/AppSearchHeader.vue.d.ts +8 -0
- package/dist/components/forms/AppSelect.d.vue.ts +17 -0
- package/dist/components/forms/AppSelect.vue +91 -0
- package/dist/components/forms/AppSelect.vue.d.ts +17 -0
- package/dist/components/forms/AppStepper.d.vue.ts +21 -0
- package/dist/components/forms/AppStepper.vue +232 -0
- package/dist/components/forms/AppStepper.vue.d.ts +21 -0
- package/dist/components/forms/AppSwitch.d.vue.ts +16 -0
- package/dist/components/forms/AppSwitch.vue +59 -0
- package/dist/components/forms/AppSwitch.vue.d.ts +16 -0
- package/dist/components/forms/AppTextField.d.vue.ts +13 -0
- package/dist/components/forms/AppTextField.vue +59 -0
- package/dist/components/forms/AppTextField.vue.d.ts +13 -0
- package/dist/components/forms/AppTextarea.d.vue.ts +13 -0
- package/dist/components/forms/AppTextarea.vue +62 -0
- package/dist/components/forms/AppTextarea.vue.d.ts +13 -0
- package/dist/components/forms/AttachmentCropperInput.d.vue.ts +18 -0
- package/dist/components/forms/AttachmentCropperInput.vue +227 -0
- package/dist/components/forms/AttachmentCropperInput.vue.d.ts +18 -0
- package/dist/components/forms/AttachmentInput.d.vue.ts +16 -0
- package/dist/components/forms/AttachmentInput.vue +116 -0
- package/dist/components/forms/AttachmentInput.vue.d.ts +16 -0
- package/dist/components/forms/AutocompleteInput.d.vue.ts +84 -0
- package/dist/components/forms/AutocompleteInput.vue +760 -0
- package/dist/components/forms/AutocompleteInput.vue.d.ts +84 -0
- package/dist/components/forms/BankSelect.d.vue.ts +21 -0
- package/dist/components/forms/BankSelect.vue +43 -0
- package/dist/components/forms/BankSelect.vue.d.ts +21 -0
- package/dist/components/forms/BaseButton.d.vue.ts +20 -0
- package/dist/components/forms/BaseButton.vue +42 -0
- package/dist/components/forms/BaseButton.vue.d.ts +20 -0
- package/dist/components/forms/CounterInput.d.vue.ts +13 -0
- package/dist/components/forms/CounterInput.vue +71 -0
- package/dist/components/forms/CounterInput.vue.d.ts +13 -0
- package/dist/components/forms/CustomCheckboxes.d.vue.ts +25 -0
- package/dist/components/forms/CustomCheckboxes.vue +69 -0
- package/dist/components/forms/CustomCheckboxes.vue.d.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.d.vue.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.vue +80 -0
- package/dist/components/forms/CustomCheckboxesWithIcon.vue.d.ts +25 -0
- package/dist/components/forms/CustomCheckboxesWithImage.d.vue.ts +16 -0
- package/dist/components/forms/CustomCheckboxesWithImage.vue +67 -0
- package/dist/components/forms/CustomCheckboxesWithImage.vue.d.ts +16 -0
- package/dist/components/forms/CustomRadios.d.vue.ts +25 -0
- package/dist/components/forms/CustomRadios.vue +69 -0
- package/dist/components/forms/CustomRadios.vue.d.ts +25 -0
- package/dist/components/forms/CustomRadiosWithIcon.d.vue.ts +28 -0
- package/dist/components/forms/CustomRadiosWithIcon.vue +98 -0
- package/dist/components/forms/CustomRadiosWithIcon.vue.d.ts +28 -0
- package/dist/components/forms/CustomRadiosWithImage.d.vue.ts +35 -0
- package/dist/components/forms/CustomRadiosWithImage.vue +69 -0
- package/dist/components/forms/CustomRadiosWithImage.vue.d.ts +35 -0
- package/dist/components/forms/DatePicker.d.vue.ts +29 -0
- package/dist/components/forms/DatePicker.vue +392 -0
- package/dist/components/forms/DatePicker.vue.d.ts +29 -0
- package/dist/components/forms/DatePickerRange.d.vue.ts +24 -0
- package/dist/components/forms/DatePickerRange.vue +127 -0
- package/dist/components/forms/DatePickerRange.vue.d.ts +24 -0
- package/dist/components/forms/DraggedUploadFile.d.vue.ts +11 -0
- package/dist/components/forms/DraggedUploadFile.vue +120 -0
- package/dist/components/forms/DraggedUploadFile.vue.d.ts +11 -0
- package/dist/components/forms/ImageCardInput.d.vue.ts +35 -0
- package/dist/components/forms/ImageCardInput.vue +234 -0
- package/dist/components/forms/ImageCardInput.vue.d.ts +35 -0
- package/dist/components/forms/InputValidationWrapper.d.vue.ts +26 -0
- package/dist/components/forms/InputValidationWrapper.vue +24 -0
- package/dist/components/forms/InputValidationWrapper.vue.d.ts +26 -0
- package/dist/components/forms/LicensePlateInput.d.vue.ts +21 -0
- package/dist/components/forms/LicensePlateInput.vue +175 -0
- package/dist/components/forms/LicensePlateInput.vue.d.ts +21 -0
- package/dist/components/forms/ManualDate.d.vue.ts +20 -0
- package/dist/components/forms/ManualDate.vue +264 -0
- package/dist/components/forms/ManualDate.vue.d.ts +20 -0
- package/dist/components/forms/MobileInput.d.vue.ts +25 -0
- package/dist/components/forms/MobileInput.vue +118 -0
- package/dist/components/forms/MobileInput.vue.d.ts +25 -0
- package/dist/components/forms/PasswordInput.d.vue.ts +11 -0
- package/dist/components/forms/PasswordInput.vue +29 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +11 -0
- package/dist/components/forms/RangeInput.d.vue.ts +10 -0
- package/dist/components/forms/RangeInput.vue +48 -0
- package/dist/components/forms/RangeInput.vue.d.ts +10 -0
- package/dist/components/forms/Tabs.d.vue.ts +23 -0
- package/dist/components/forms/Tabs.vue +35 -0
- package/dist/components/forms/Tabs.vue.d.ts +23 -0
- package/dist/components/forms/TimePicker.d.vue.ts +18 -0
- package/dist/components/forms/TimePicker.vue +370 -0
- package/dist/components/forms/TimePicker.vue.d.ts +18 -0
- package/dist/components/table/DataTable.d.vue.ts +70 -0
- package/dist/components/table/DataTable.vue +361 -0
- package/dist/components/table/DataTable.vue.d.ts +70 -0
- package/dist/components/table/EditableDataTable.d.vue.ts +21 -0
- package/dist/components/table/EditableDataTable.vue +330 -0
- package/dist/components/table/EditableDataTable.vue.d.ts +21 -0
- package/dist/components/table/EditableDataTableRow.d.vue.ts +20 -0
- package/dist/components/table/EditableDataTableRow.vue +253 -0
- package/dist/components/table/EditableDataTableRow.vue.d.ts +20 -0
- package/dist/components/table/FilterGenerator.d.vue.ts +13 -0
- package/dist/components/table/FilterGenerator.vue +231 -0
- package/dist/components/table/FilterGenerator.vue.d.ts +13 -0
- package/dist/components/table/StaticTable.d.vue.ts +34 -0
- package/dist/components/table/StaticTable.vue +152 -0
- package/dist/components/table/StaticTable.vue.d.ts +34 -0
- package/dist/components/table/TablePagination.d.vue.ts +15 -0
- package/dist/components/table/TablePagination.vue +73 -0
- package/dist/components/table/TablePagination.vue.d.ts +15 -0
- package/dist/composables/useIsMobile.d.ts +1 -0
- package/dist/composables/useIsMobile.js +10 -0
- package/dist/composables/useIsMobile.mjs +4 -0
- package/dist/composables/useTableFilters.d.ts +23 -0
- package/dist/composables/useTableFilters.js +197 -0
- package/dist/composables/useTableFilters.mjs +184 -0
- package/dist/images/avatar.png +0 -0
- package/dist/images/sa.svg +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +454 -0
- package/dist/index.mjs +130 -0
- package/dist/lang/ar.json +54 -0
- package/dist/lang/en.json +54 -0
- package/dist/styles/assets/scss/variables/_template.scss +1 -0
- package/dist/styles/assets/scss/variables/_vuetify.scss +1 -0
- package/dist/styles/core/base/_components.scss +164 -0
- package/dist/styles/core/base/_dark.scss +16 -0
- package/dist/styles/core/base/_default-layout-w-vertical-nav.scss +106 -0
- package/dist/styles/core/base/_default-layout.scss +16 -0
- package/dist/styles/core/base/_index.scss +47 -0
- package/dist/styles/core/base/_layouts.scss +63 -0
- package/dist/styles/core/base/_misc.scss +20 -0
- package/dist/styles/core/base/_mixins.scss +84 -0
- package/dist/styles/core/base/_route-transitions.scss +70 -0
- package/dist/styles/core/base/_utilities.scss +418 -0
- package/dist/styles/core/base/_utils.scss +100 -0
- package/dist/styles/core/base/_variables.scss +190 -0
- package/dist/styles/core/base/_vertical-nav.scss +264 -0
- package/dist/styles/core/base/libs/_perfect-scrollbar.scss +35 -0
- package/dist/styles/core/base/libs/vuetify/_index.scss +1 -0
- package/dist/styles/core/base/libs/vuetify/_overrides.scss +380 -0
- package/dist/styles/core/base/libs/vuetify/_variables.scss +48 -0
- package/dist/styles/core/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/dist/styles/core/base/placeholders/_default-layout.scss +3 -0
- package/dist/styles/core/base/placeholders/_index.scss +5 -0
- package/dist/styles/core/base/placeholders/_misc.scss +7 -0
- package/dist/styles/core/base/placeholders/_nav.scss +26 -0
- package/dist/styles/core/base/placeholders/_vertical-nav.scss +84 -0
- package/dist/styles/core/base/skins/_bordered.scss +60 -0
- package/dist/styles/core/base/skins/_index.scss +1 -0
- package/dist/styles/core/template/_components.scss +1035 -0
- package/dist/styles/core/template/_default-layout-w-vertical-nav.scss +20 -0
- package/dist/styles/core/template/_utilities.scss +20 -0
- package/dist/styles/core/template/_variables.scss +67 -0
- package/dist/styles/core/template/_vertical-nav.scss +41 -0
- package/dist/styles/core/template/index.css +18779 -0
- package/dist/styles/core/template/index.scss +15 -0
- package/dist/styles/core/template/libs/vuetify/_variables.scss +464 -0
- package/dist/styles/core/template/libs/vuetify/index.css +739 -0
- package/dist/styles/core/template/libs/vuetify/index.scss +1 -0
- package/dist/styles/core/template/pages/misc.css +16 -0
- package/dist/styles/core/template/pages/misc.scss +20 -0
- package/dist/styles/core/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/dist/styles/core/template/placeholders/_index.scss +3 -0
- package/dist/styles/core/template/placeholders/_nav.scss +15 -0
- package/dist/styles/core/template/placeholders/_vertical-nav.scss +18 -0
- package/dist/styles/core/template/skins/_bordered.scss +36 -0
- package/dist/styles/core/template/skins/_index.scss +1 -0
- package/dist/styles/layouts/_classes.scss +3 -0
- package/dist/styles/layouts/_dashboard-layout.scss +43 -0
- package/dist/styles/layouts/_global.scss +10 -0
- package/dist/styles/layouts/_mixins.scss +28 -0
- package/dist/styles/layouts/_placeholders.scss +53 -0
- package/dist/styles/layouts/_rtl.scss +7 -0
- package/dist/styles/layouts/_variables.scss +22 -0
- package/dist/styles/layouts/index.css +14 -0
- package/dist/styles/layouts/index.scss +2 -0
- package/dist/types.d.ts +218 -0
- package/dist/utils/apiUrl.d.ts +1 -0
- package/dist/utils/apiUrl.js +15 -0
- package/dist/utils/apiUrl.mjs +8 -0
- package/dist/utils/client.d.ts +9 -0
- package/dist/utils/client.js +53 -0
- package/dist/utils/client.mjs +39 -0
- package/dist/utils/files.d.ts +2 -0
- package/dist/utils/files.js +35 -0
- package/dist/utils/files.mjs +22 -0
- package/dist/utils/formValidation.d.ts +7 -0
- package/dist/utils/formValidation.js +20 -0
- package/dist/utils/formValidation.mjs +13 -0
- package/dist/utils/formatters.d.ts +12 -0
- package/dist/utils/formatters.js +84 -0
- package/dist/utils/formatters.mjs +56 -0
- package/dist/utils/hijriDate.d.ts +58 -0
- package/dist/utils/hijriDate.js +168 -0
- package/dist/utils/hijriDate.mjs +1951 -0
- package/dist/utils/i18n.d.ts +8 -0
- package/dist/utils/i18n.js +36 -0
- package/dist/utils/i18n.mjs +27 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +115 -0
- package/dist/utils/index.mjs +10 -0
- package/dist/utils/queryParams.d.ts +4 -0
- package/dist/utils/queryParams.js +26 -0
- package/dist/utils/queryParams.mjs +18 -0
- package/dist/utils/ruleValidator.d.ts +41 -0
- package/dist/utils/ruleValidator.js +210 -0
- package/dist/utils/ruleValidator.mjs +195 -0
- package/dist/utils/toaster.d.ts +12 -0
- package/dist/utils/toaster.js +68 -0
- package/dist/utils/toaster.mjs +58 -0
- package/dist/utils/utils.d.ts +9 -0
- package/dist/utils/utils.js +84 -0
- package/dist/utils/utils.mjs +67 -0
- package/package.json +1 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { PerfectScrollbar } from "vue3-perfect-scrollbar";
|
|
3
|
+
import { useDisplay } from "vuetify";
|
|
4
|
+
import { computed, nextTick, ref } from "vue";
|
|
5
|
+
import { VDialog, VCol, VRow, VIcon } from "vuetify/components";
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
|
+
import AppCard from "./cards/AppCard.vue";
|
|
8
|
+
import BaseButton from "./forms/BaseButton.vue";
|
|
9
|
+
import DialogCloseBtn from "./DialogCloseBtn.vue";
|
|
10
|
+
const { xs } = useDisplay();
|
|
11
|
+
const { t } = useI18n();
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
modelValue: { type: Boolean, required: false, default: false },
|
|
14
|
+
persistent: { type: Boolean, required: false, default: false },
|
|
15
|
+
title: { type: String, required: false, default: "" },
|
|
16
|
+
width: { type: String, required: false, default: "434px" },
|
|
17
|
+
maxWidth: { type: String, required: false, default: "70%" },
|
|
18
|
+
zIndex: { type: String, required: false, default: "9999" },
|
|
19
|
+
confirmBtn: { type: [Object, null], required: false, default: () => ({
|
|
20
|
+
text: "actions.save",
|
|
21
|
+
color: "primary"
|
|
22
|
+
}) },
|
|
23
|
+
closeBtn: { type: [Object, null], required: false, default: () => ({
|
|
24
|
+
text: "actions.cancel",
|
|
25
|
+
color: "gray-200"
|
|
26
|
+
}) },
|
|
27
|
+
hasIcon: { type: Boolean, required: false, default: true },
|
|
28
|
+
icon: { type: String, required: false, default: "tabler-info-circle" },
|
|
29
|
+
iconColor: { type: String, required: false, default: "primary" },
|
|
30
|
+
contentContainerClass: { type: Array, required: false },
|
|
31
|
+
showActions: { type: Boolean, required: false, default: true },
|
|
32
|
+
loading: { type: Boolean, required: false },
|
|
33
|
+
actionsClass: { type: [String, Array], required: false },
|
|
34
|
+
height: { type: [String, Number], required: false }
|
|
35
|
+
});
|
|
36
|
+
const emits = defineEmits(["update:modelValue", "save", "cancel"]);
|
|
37
|
+
const modalScrollbarRef = ref(null);
|
|
38
|
+
const save = () => {
|
|
39
|
+
emits("save");
|
|
40
|
+
};
|
|
41
|
+
const cancel = () => {
|
|
42
|
+
isOpen.value = false;
|
|
43
|
+
emits("cancel");
|
|
44
|
+
};
|
|
45
|
+
const isOpen = computed({
|
|
46
|
+
get() {
|
|
47
|
+
return props.modelValue;
|
|
48
|
+
},
|
|
49
|
+
set(value) {
|
|
50
|
+
emits("update:modelValue", value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const checkScrollbar = () => {
|
|
54
|
+
nextTick(() => {
|
|
55
|
+
if (modalScrollbarRef?.value?.ps) {
|
|
56
|
+
modalScrollbarRef?.value?.ps.update();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const mergedConfirmBtn = computed(() => ({
|
|
61
|
+
text: "actions.save",
|
|
62
|
+
color: "primary",
|
|
63
|
+
disabled: false,
|
|
64
|
+
...props.confirmBtn || {}
|
|
65
|
+
}));
|
|
66
|
+
const mergedCloseBtn = computed(() => ({
|
|
67
|
+
text: "actions.cancel",
|
|
68
|
+
color: "gray-200",
|
|
69
|
+
disabled: false,
|
|
70
|
+
...props.closeBtn || {}
|
|
71
|
+
}));
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<PerfectScrollbar
|
|
76
|
+
ref="modalScrollbarRef"
|
|
77
|
+
:options="{
|
|
78
|
+
wheelPropagation: false,
|
|
79
|
+
suppressScrollX: true
|
|
80
|
+
}"
|
|
81
|
+
@mouseover="checkScrollbar"
|
|
82
|
+
>
|
|
83
|
+
<VDialog
|
|
84
|
+
v-model="isOpen"
|
|
85
|
+
:width="xs ? '100%' : width"
|
|
86
|
+
:max-width="xs ? '90%' : maxWidth"
|
|
87
|
+
:z-index="zIndex"
|
|
88
|
+
:persistent="persistent"
|
|
89
|
+
:height="height"
|
|
90
|
+
>
|
|
91
|
+
<DialogCloseBtn @click="cancel" />
|
|
92
|
+
<AppCard class="pa-4 pb-0 h-100" :height="height">
|
|
93
|
+
<div v-if="title" class="d-flex justify-space-between border-b pb-2 mb-3">
|
|
94
|
+
<h4 class="mb-2 font-weight-bold">
|
|
95
|
+
{{ title }}
|
|
96
|
+
</h4>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="d-flex flex-column align-center justify-center gap-2" :class="contentContainerClass">
|
|
100
|
+
<div v-if="hasIcon" class="d-flex align-center justify-center app-w-50px app-h-50px rounded-pill position-relative my-4">
|
|
101
|
+
<div class="d-flex align-center justify-center app-w-60px app-h-60px rounded-pill position-absolute app-opacity-17" :class="`bg-${iconColor}`" />
|
|
102
|
+
<div class="d-flex align-center justify-center app-w-50px app-h-50px rounded-pill position-absolute app-opacity-11" :class="`bg-${iconColor}`" />
|
|
103
|
+
<VIcon
|
|
104
|
+
size="30"
|
|
105
|
+
:icon="icon"
|
|
106
|
+
:color="iconColor"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="w-100 text-center">
|
|
110
|
+
<slot />
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<slot v-if="showActions" name="actions">
|
|
115
|
+
<VRow class="modal-actions" no-gutters>
|
|
116
|
+
<slot name="additional-actions" />
|
|
117
|
+
<VCol
|
|
118
|
+
cols="12"
|
|
119
|
+
:class="actionsClass"
|
|
120
|
+
class="d-flex flex-wrap justify-center gap-4 mt-4 "
|
|
121
|
+
>
|
|
122
|
+
<BaseButton
|
|
123
|
+
v-if="mergedCloseBtn"
|
|
124
|
+
:color="mergedCloseBtn.color"
|
|
125
|
+
:disabled="mergedCloseBtn?.disabled"
|
|
126
|
+
class="flex-1-1"
|
|
127
|
+
elevation="0"
|
|
128
|
+
@click="cancel"
|
|
129
|
+
>
|
|
130
|
+
{{ t(mergedCloseBtn.text) }}
|
|
131
|
+
</BaseButton>
|
|
132
|
+
|
|
133
|
+
<BaseButton
|
|
134
|
+
v-if="mergedConfirmBtn"
|
|
135
|
+
type="submit"
|
|
136
|
+
class="flex-1-1"
|
|
137
|
+
:color="mergedConfirmBtn.color"
|
|
138
|
+
:disabled="mergedConfirmBtn?.disabled"
|
|
139
|
+
elevation="0"
|
|
140
|
+
:loading="loading"
|
|
141
|
+
@click="save"
|
|
142
|
+
>
|
|
143
|
+
{{ t(mergedConfirmBtn.text) }}
|
|
144
|
+
</BaseButton>
|
|
145
|
+
</VCol>
|
|
146
|
+
</VRow>
|
|
147
|
+
</slot>
|
|
148
|
+
</AppCard>
|
|
149
|
+
</VDialog>
|
|
150
|
+
</PerfectScrollbar>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<style scoped>
|
|
154
|
+
.modal-actions{background-color:#fff;bottom:0;padding-bottom:18px;position:sticky}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
persistent?: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
width?: string;
|
|
6
|
+
maxWidth?: string;
|
|
7
|
+
zIndex?: string;
|
|
8
|
+
confirmBtn?: {
|
|
9
|
+
text?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
} | null;
|
|
13
|
+
closeBtn?: {
|
|
14
|
+
text?: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
} | null;
|
|
17
|
+
hasIcon?: boolean;
|
|
18
|
+
icon?: string;
|
|
19
|
+
iconColor?: string;
|
|
20
|
+
contentContainerClass?: string[];
|
|
21
|
+
showActions?: boolean;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
actionsClass?: string | string[];
|
|
24
|
+
height?: string | number;
|
|
25
|
+
};
|
|
26
|
+
declare var __VLS_35: {}, __VLS_37: {}, __VLS_45: {};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
default?: (props: typeof __VLS_35) => any;
|
|
29
|
+
} & {
|
|
30
|
+
actions?: (props: typeof __VLS_37) => any;
|
|
31
|
+
} & {
|
|
32
|
+
'additional-actions'?: (props: typeof __VLS_45) => any;
|
|
33
|
+
};
|
|
34
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:modelValue": (...args: any[]) => void;
|
|
36
|
+
save: (...args: any[]) => void;
|
|
37
|
+
cancel: (...args: any[]) => void;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
onSave?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
menuList?: unknown[];
|
|
3
|
+
itemProps?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_19: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_19) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { VIcon, VList, VMenu } from "vuetify/components";
|
|
3
|
+
import IconBtn from "./IconBtn.vue";
|
|
4
|
+
defineProps({
|
|
5
|
+
menuList: { type: Array, required: false },
|
|
6
|
+
itemProps: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<IconBtn
|
|
12
|
+
density="compact"
|
|
13
|
+
>
|
|
14
|
+
<VIcon icon="tabler-dots-vertical" color="text-on-background" />
|
|
15
|
+
|
|
16
|
+
<VMenu
|
|
17
|
+
activator="parent"
|
|
18
|
+
scroll-strategy="close"
|
|
19
|
+
>
|
|
20
|
+
<slot>
|
|
21
|
+
<VList
|
|
22
|
+
:items="menuList"
|
|
23
|
+
:item-props="itemProps"
|
|
24
|
+
/>
|
|
25
|
+
</slot>
|
|
26
|
+
</VMenu>
|
|
27
|
+
</IconBtn>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
menuList?: unknown[];
|
|
3
|
+
itemProps?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_19: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_19) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useWindowScroll } from "@vueuse/core";
|
|
3
|
+
import { VScaleTransition, VBtn, VIcon } from "vuetify/components";
|
|
4
|
+
const { y } = useWindowScroll();
|
|
5
|
+
const scrollToTop = () => {
|
|
6
|
+
window.scrollTo({
|
|
7
|
+
top: 0,
|
|
8
|
+
behavior: "smooth"
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<VScaleTransition
|
|
15
|
+
style="transform-origin: center"
|
|
16
|
+
class="scroll-to-top d-print-none"
|
|
17
|
+
>
|
|
18
|
+
<VBtn
|
|
19
|
+
v-show="y > 200"
|
|
20
|
+
icon
|
|
21
|
+
density="comfortable"
|
|
22
|
+
@click="scrollToTop"
|
|
23
|
+
>
|
|
24
|
+
<VIcon
|
|
25
|
+
size="22"
|
|
26
|
+
icon="tabler-arrow-up"
|
|
27
|
+
/>
|
|
28
|
+
</VBtn>
|
|
29
|
+
</VScaleTransition>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
.scroll-to-top {
|
|
34
|
+
position: fixed !important;
|
|
35
|
+
z-index: 999 !important;
|
|
36
|
+
inset-block-end: 5% !important;
|
|
37
|
+
inset-inline-end: 25px !important;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
const siteName = computed(() => {
|
|
6
|
+
return t(`${import.meta.env.VITE_APP_TYPE}_site_name`);
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<h2 class="text-center">
|
|
12
|
+
{{ siteName }}
|
|
13
|
+
</h2>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
theme: 'light' | 'dark';
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Toaster } from "vue-sonner";
|
|
3
|
+
defineProps({
|
|
4
|
+
theme: { type: String, required: true }
|
|
5
|
+
});
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<Toaster
|
|
10
|
+
position="top-center"
|
|
11
|
+
:theme="theme"
|
|
12
|
+
close-button
|
|
13
|
+
rich-colors
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
[data-sonner-toast] [data-icon]{margin:0}[data-sonner-toast] [data-icon] svg{margin-inline-start:-2px}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-text:var(--gray12);--normal-icon:#fdc930;--success-text:#28c76f;--error-text:#ea5455;--error-bg:#fbe3e4;--error-border:#fbe3e4;--success-bg:#dcf6e8;--success-border:#dcf6e8}[data-sonner-toaster][data-theme=dark]{--normal-bg:#2f3349;--normal-border:#2f3349;--normal-text:var(--gray1);--success-text:#28c76f;--error-text:#ea5455;--error-bg:#4c384b;--error-border:#4c384b;--success-bg:#2d4b4f;--success-border:#2d4b4f}[data-sonner-toast][data-styled=true]{gap:10px!important}
|
|
19
|
+
</style>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
theme: 'light' | 'dark';
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_9: {}, __VLS_18: string, __VLS_19: any;
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
[K in NonNullable<typeof __VLS_18>]?: (props: typeof __VLS_19) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_9) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useSlots } from "vue";
|
|
3
|
+
import { VCard } from "vuetify/components";
|
|
4
|
+
import LoadingBar from "../LoadingBar.vue";
|
|
5
|
+
defineProps({
|
|
6
|
+
isLoading: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: "AppCard",
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
});
|
|
12
|
+
const slots = computed(() => {
|
|
13
|
+
const slots2 = useSlots();
|
|
14
|
+
return Object.keys(slots2).reduce((item, key) => {
|
|
15
|
+
if (key !== "default") {
|
|
16
|
+
item[key] = slots2[key];
|
|
17
|
+
}
|
|
18
|
+
return item;
|
|
19
|
+
}, {});
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<VCard v-bind="$attrs">
|
|
25
|
+
<template #default>
|
|
26
|
+
<!-- card content -->
|
|
27
|
+
<slot />
|
|
28
|
+
|
|
29
|
+
<LoadingBar
|
|
30
|
+
v-if="isLoading"
|
|
31
|
+
:is-loading="isLoading"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template
|
|
36
|
+
v-for="(_, name) in slots"
|
|
37
|
+
#[name]="slotProps"
|
|
38
|
+
>
|
|
39
|
+
<slot
|
|
40
|
+
:name="name"
|
|
41
|
+
v-bind="slotProps || {}"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
44
|
+
</VCard>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_9: {}, __VLS_18: string, __VLS_19: any;
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
[K in NonNullable<typeof __VLS_18>]?: (props: typeof __VLS_19) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_9) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
collapsed?: boolean;
|
|
3
|
+
noActions?: boolean;
|
|
4
|
+
actionCollapsed?: boolean;
|
|
5
|
+
actionRefresh?: boolean;
|
|
6
|
+
actionRemove?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_26: {}, __VLS_29: {}, __VLS_76: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
title?: (props: typeof __VLS_26) => any;
|
|
12
|
+
} & {
|
|
13
|
+
'before-actions'?: (props: typeof __VLS_29) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: typeof __VLS_76) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
+
collapsed: (isContentCollapsed: boolean) => any;
|
|
19
|
+
refresh: (hideOverlay: () => void) => any;
|
|
20
|
+
trash: () => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
|
|
23
|
+
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
24
|
+
onTrash?: (() => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { VCard, VCardItem, VIcon, VOverlay, VExpandTransition, VProgressCircular, VCardTitle } from "vuetify/components";
|
|
4
|
+
import IconBtn from "../IconBtn.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
collapsed: { type: Boolean, required: false, default: false },
|
|
7
|
+
noActions: { type: Boolean, required: false, default: false },
|
|
8
|
+
actionCollapsed: { type: Boolean, required: false, default: false },
|
|
9
|
+
actionRefresh: { type: Boolean, required: false, default: false },
|
|
10
|
+
actionRemove: { type: Boolean, required: false, default: false },
|
|
11
|
+
title: { type: String, required: false, default: void 0 }
|
|
12
|
+
});
|
|
13
|
+
const emit = defineEmits(["collapsed", "refresh", "trash"]);
|
|
14
|
+
defineOptions({
|
|
15
|
+
inheritAttrs: false
|
|
16
|
+
});
|
|
17
|
+
const isContentCollapsed = ref(props.collapsed);
|
|
18
|
+
const isCardRemoved = ref(false);
|
|
19
|
+
const isOverlayVisible = ref(false);
|
|
20
|
+
const hideOverlay = () => {
|
|
21
|
+
isOverlayVisible.value = false;
|
|
22
|
+
};
|
|
23
|
+
const triggerCollapse = () => {
|
|
24
|
+
isContentCollapsed.value = !isContentCollapsed.value;
|
|
25
|
+
emit("collapsed", isContentCollapsed.value);
|
|
26
|
+
};
|
|
27
|
+
const triggerRefresh = () => {
|
|
28
|
+
isOverlayVisible.value = true;
|
|
29
|
+
emit("refresh", hideOverlay);
|
|
30
|
+
};
|
|
31
|
+
const triggeredRemove = () => {
|
|
32
|
+
isCardRemoved.value = true;
|
|
33
|
+
emit("trash");
|
|
34
|
+
};
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<VExpandTransition>
|
|
39
|
+
<!-- TODO remove div when transition work with v-card components: https://github.com/vuetifyjs/vuetify/issues/15111 -->
|
|
40
|
+
<div v-if="!isCardRemoved">
|
|
41
|
+
<VCard v-bind="$attrs">
|
|
42
|
+
<VCardItem>
|
|
43
|
+
<VCardTitle v-if="props.title || $slots.title">
|
|
44
|
+
<!-- Title slot and prop -->
|
|
45
|
+
<slot name="title">
|
|
46
|
+
{{ props.title }}
|
|
47
|
+
</slot>
|
|
48
|
+
</VCardTitle>
|
|
49
|
+
|
|
50
|
+
<template #append>
|
|
51
|
+
<!-- Before actions slot -->
|
|
52
|
+
<div>
|
|
53
|
+
<slot name="before-actions" />
|
|
54
|
+
|
|
55
|
+
<!-- SECTION Actions buttons -->
|
|
56
|
+
|
|
57
|
+
<!-- Collapse button -->
|
|
58
|
+
<IconBtn
|
|
59
|
+
v-if="(!(actionRemove || actionRefresh) || actionCollapsed) && !noActions"
|
|
60
|
+
@click="triggerCollapse"
|
|
61
|
+
>
|
|
62
|
+
<VIcon
|
|
63
|
+
size="20"
|
|
64
|
+
icon="tabler-chevron-up"
|
|
65
|
+
:style="{
|
|
66
|
+
transform: isContentCollapsed ? 'rotate(-180deg)' : null
|
|
67
|
+
}"
|
|
68
|
+
style="transition-duration: 0.28s"
|
|
69
|
+
/>
|
|
70
|
+
</IconBtn>
|
|
71
|
+
|
|
72
|
+
<!-- Overlay button -->
|
|
73
|
+
<IconBtn
|
|
74
|
+
v-if="(!(actionRemove || actionCollapsed) || actionRefresh) && !noActions"
|
|
75
|
+
@click="triggerRefresh"
|
|
76
|
+
>
|
|
77
|
+
<VIcon
|
|
78
|
+
size="20"
|
|
79
|
+
icon="tabler-refresh"
|
|
80
|
+
/>
|
|
81
|
+
</IconBtn>
|
|
82
|
+
|
|
83
|
+
<!-- Close button -->
|
|
84
|
+
<IconBtn
|
|
85
|
+
v-if="(!(actionRefresh || actionCollapsed) || actionRemove) && !noActions"
|
|
86
|
+
@click="triggeredRemove"
|
|
87
|
+
>
|
|
88
|
+
<VIcon
|
|
89
|
+
size="20"
|
|
90
|
+
icon="tabler-x"
|
|
91
|
+
/>
|
|
92
|
+
</IconBtn>
|
|
93
|
+
</div>
|
|
94
|
+
<!-- !SECTION -->
|
|
95
|
+
</template>
|
|
96
|
+
</VCardItem>
|
|
97
|
+
|
|
98
|
+
<!-- card content -->
|
|
99
|
+
<VExpandTransition>
|
|
100
|
+
<div
|
|
101
|
+
v-show="!isContentCollapsed"
|
|
102
|
+
class="v-card-content"
|
|
103
|
+
>
|
|
104
|
+
<slot />
|
|
105
|
+
</div>
|
|
106
|
+
</VExpandTransition>
|
|
107
|
+
|
|
108
|
+
<!-- Overlay -->
|
|
109
|
+
<VOverlay
|
|
110
|
+
v-model="isOverlayVisible"
|
|
111
|
+
contained
|
|
112
|
+
persistent
|
|
113
|
+
class="align-center justify-center"
|
|
114
|
+
>
|
|
115
|
+
<VProgressCircular indeterminate />
|
|
116
|
+
</VOverlay>
|
|
117
|
+
</VCard>
|
|
118
|
+
</div>
|
|
119
|
+
</VExpandTransition>
|
|
120
|
+
</template>
|
|
121
|
+
|
|
122
|
+
<style>
|
|
123
|
+
.v-card-item + .v-card-content .v-card-text:first-child {
|
|
124
|
+
padding-block-start: 0;
|
|
125
|
+
}
|
|
126
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
collapsed?: boolean;
|
|
3
|
+
noActions?: boolean;
|
|
4
|
+
actionCollapsed?: boolean;
|
|
5
|
+
actionRefresh?: boolean;
|
|
6
|
+
actionRemove?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_26: {}, __VLS_29: {}, __VLS_76: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
title?: (props: typeof __VLS_26) => any;
|
|
12
|
+
} & {
|
|
13
|
+
'before-actions'?: (props: typeof __VLS_29) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: typeof __VLS_76) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
+
collapsed: (isContentCollapsed: boolean) => any;
|
|
19
|
+
refresh: (hideOverlay: () => void) => any;
|
|
20
|
+
trash: () => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onCollapsed?: ((isContentCollapsed: boolean) => any) | undefined;
|
|
23
|
+
onRefresh?: ((hideOverlay: () => void) => any) | undefined;
|
|
24
|
+
onTrash?: (() => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
color?: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
stats: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|