@winchsa/ui 0.1.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 +166 -0
- package/dist/components/Breadcrumbs.vue +46 -0
- package/dist/components/Breadcrumbs.vue.d.ts +6 -0
- package/dist/components/Drawer.vue +60 -0
- package/dist/components/Drawer.vue.d.ts +44 -0
- package/dist/components/IconBtn.vue +18 -0
- package/dist/components/IconBtn.vue.d.ts +30 -0
- package/dist/components/Modal.vue +155 -0
- package/dist/components/Modal.vue.d.ts +0 -0
- package/dist/components/SiteTitle.vue +14 -0
- package/dist/components/SiteTitle.vue.d.ts +2 -0
- package/dist/components/Toaster.vue +19 -0
- package/dist/components/Toaster.vue.d.ts +5 -0
- package/dist/components/cards/CheckboxesCard.vue +76 -0
- package/dist/components/cards/CheckboxesCard.vue.d.ts +20 -0
- package/dist/components/cards/HeaderCard.vue +31 -0
- package/dist/components/cards/HeaderCard.vue.d.ts +8 -0
- package/dist/components/cards/ImageCard.vue +73 -0
- package/dist/components/cards/ImageCard.vue.d.ts +63 -0
- package/dist/components/cards/InputCard.vue +60 -0
- package/dist/components/cards/InputCard.vue.d.ts +41 -0
- package/dist/components/cards/StaticCard.vue +37 -0
- package/dist/components/cards/StaticCard.vue.d.ts +33 -0
- package/dist/components/core/AppBarSearch.vue +345 -0
- package/dist/components/core/AppBarSearch.vue.d.ts +1587 -0
- package/dist/components/core/AppDrawerHeaderSection.vue +21 -0
- package/dist/components/core/AppDrawerHeaderSection.vue.d.ts +30 -0
- package/dist/components/core/AppSearchHeader.vue +72 -0
- package/dist/components/core/AppSearchHeader.vue.d.ts +7 -0
- package/dist/components/core/AppStepper.vue +232 -0
- package/dist/components/core/AppStepper.vue.d.ts +25 -0
- package/dist/components/core/CustomizerSection.vue +19 -0
- package/dist/components/core/CustomizerSection.vue.d.ts +25 -0
- package/dist/components/core/DialogCloseBtn.vue +20 -0
- package/dist/components/core/DialogCloseBtn.vue.d.ts +9 -0
- package/dist/components/core/MoreBtn.vue +27 -0
- package/dist/components/core/MoreBtn.vue.d.ts +25 -0
- package/dist/components/core/ScrollToTop.vue +39 -0
- package/dist/components/core/ScrollToTop.vue.d.ts +2 -0
- package/dist/components/core/app-form-elements/AppCombobox.vue +67 -0
- package/dist/components/core/app-form-elements/AppCombobox.vue.d.ts +0 -0
- package/dist/components/core/app-form-elements/AppSelect.vue +98 -0
- package/dist/components/core/app-form-elements/AppSelect.vue.d.ts +0 -0
- package/dist/components/core/app-form-elements/AppSwitch.vue +59 -0
- package/dist/components/core/app-form-elements/AppSwitch.vue.d.ts +27 -0
- package/dist/components/core/app-form-elements/AppTextField.vue +66 -0
- package/dist/components/core/app-form-elements/AppTextField.vue.d.ts +26 -0
- package/dist/components/core/app-form-elements/AppTextarea.vue +69 -0
- package/dist/components/core/app-form-elements/AppTextarea.vue.d.ts +26 -0
- package/dist/components/core/app-form-elements/CustomCheckboxes.vue +69 -0
- package/dist/components/core/app-form-elements/CustomCheckboxes.vue.d.ts +39 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithIcon.vue +80 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithIcon.vue.d.ts +39 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithImage.vue +67 -0
- package/dist/components/core/app-form-elements/CustomCheckboxesWithImage.vue.d.ts +15 -0
- package/dist/components/core/app-form-elements/CustomRadios.vue +69 -0
- package/dist/components/core/app-form-elements/CustomRadios.vue.d.ts +40 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithIcon.vue +98 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithIcon.vue.d.ts +45 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithImage.vue +69 -0
- package/dist/components/core/app-form-elements/CustomRadiosWithImage.vue.d.ts +53 -0
- package/dist/components/core/cards/AppCard.vue +45 -0
- package/dist/components/core/cards/AppCard.vue.d.ts +26 -0
- package/dist/components/core/cards/AppCardActions.vue +126 -0
- package/dist/components/core/cards/AppCardActions.vue.d.ts +79 -0
- package/dist/components/core/cards/CardStatisticsHorizontal.vue +29 -0
- package/dist/components/core/cards/CardStatisticsHorizontal.vue.d.ts +10 -0
- package/dist/components/forms/Accordion.vue +43 -0
- package/dist/components/forms/Accordion.vue.d.ts +35 -0
- package/dist/components/forms/AppLabel.vue +47 -0
- package/dist/components/forms/AppLabel.vue.d.ts +36 -0
- package/dist/components/forms/AppLink.vue +50 -0
- package/dist/components/forms/AppLink.vue.d.ts +27 -0
- package/dist/components/forms/AppNumberField.vue +85 -0
- package/dist/components/forms/AppNumberField.vue.d.ts +45 -0
- package/dist/components/forms/AppOtpInput.vue +84 -0
- package/dist/components/forms/AppOtpInput.vue.d.ts +16 -0
- package/dist/components/forms/AttachmentCropperInput.vue +228 -0
- package/dist/components/forms/AttachmentCropperInput.vue.d.ts +25 -0
- package/dist/components/forms/AttachmentInput.vue +116 -0
- package/dist/components/forms/AttachmentInput.vue.d.ts +20 -0
- package/dist/components/forms/AutocompleteInput.vue +759 -0
- package/dist/components/forms/AutocompleteInput.vue.d.ts +0 -0
- package/dist/components/forms/BankSelect.vue +43 -0
- package/dist/components/forms/BankSelect.vue.d.ts +19 -0
- package/dist/components/forms/BaseButton.vue +42 -0
- package/dist/components/forms/BaseButton.vue.d.ts +31 -0
- package/dist/components/forms/CounterInput.vue +71 -0
- package/dist/components/forms/CounterInput.vue.d.ts +15 -0
- package/dist/components/forms/DatePicker.vue +400 -0
- package/dist/components/forms/DatePicker.vue.d.ts +34 -0
- package/dist/components/forms/DatePickerRange.vue +129 -0
- package/dist/components/forms/DatePickerRange.vue.d.ts +23 -0
- package/dist/components/forms/DraggedUploadFile.vue +120 -0
- package/dist/components/forms/DraggedUploadFile.vue.d.ts +10 -0
- package/dist/components/forms/ImageCardInput.vue +234 -0
- package/dist/components/forms/ImageCardInput.vue.d.ts +0 -0
- package/dist/components/forms/InputValidationWrapper.vue +24 -0
- package/dist/components/forms/InputValidationWrapper.vue.d.ts +33 -0
- package/dist/components/forms/LicensePlateInput.vue +159 -0
- package/dist/components/forms/LicensePlateInput.vue.d.ts +16 -0
- package/dist/components/forms/ManualDate.vue +262 -0
- package/dist/components/forms/ManualDate.vue.d.ts +17 -0
- package/dist/components/forms/MobileInput.vue +118 -0
- package/dist/components/forms/MobileInput.vue.d.ts +49 -0
- package/dist/components/forms/PasswordInput.vue +29 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +13 -0
- package/dist/components/forms/RangeInput.vue +48 -0
- package/dist/components/forms/RangeInput.vue.d.ts +5 -0
- package/dist/components/forms/Tabs.vue +35 -0
- package/dist/components/forms/Tabs.vue.d.ts +42 -0
- package/dist/components/forms/TimePicker.vue +370 -0
- package/dist/components/forms/TimePicker.vue.d.ts +23 -0
- package/dist/components/icons/EndMarker.vue +25 -0
- package/dist/components/icons/EndMarker.vue.d.ts +17 -0
- package/dist/components/icons/RedXIcon.vue +36 -0
- package/dist/components/icons/RedXIcon.vue.d.ts +2 -0
- package/dist/components/icons/StarFillIcon.vue +28 -0
- package/dist/components/icons/StarFillIcon.vue.d.ts +2 -0
- package/dist/components/icons/StartMarker.vue +25 -0
- package/dist/components/icons/StartMarker.vue.d.ts +17 -0
- package/dist/components/icons/WorkerIcon.vue +39 -0
- package/dist/components/icons/WorkerIcon.vue.d.ts +2 -0
- package/dist/components/loading/LoadingBar.vue +31 -0
- package/dist/components/loading/LoadingBar.vue.d.ts +5 -0
- package/dist/components/loading/LoadingDialog.vue +41 -0
- package/dist/components/loading/LoadingDialog.vue.d.ts +11 -0
- package/dist/components/loading/LoadingItem.vue +66 -0
- package/dist/components/loading/LoadingItem.vue.d.ts +47 -0
- package/dist/components/table/DataTable.vue +319 -0
- package/dist/components/table/DataTable.vue.d.ts +0 -0
- package/dist/components/table/EditableDataTable.vue +329 -0
- package/dist/components/table/EditableDataTable.vue.d.ts +73 -0
- package/dist/components/table/EditableDataTableRow.vue +243 -0
- package/dist/components/table/EditableDataTableRow.vue.d.ts +18 -0
- package/dist/components/table/FilterGenerator.vue +232 -0
- package/dist/components/table/FilterGenerator.vue.d.ts +14 -0
- package/dist/components/table/StaticTable.vue +152 -0
- package/dist/components/table/StaticTable.vue.d.ts +25 -0
- package/dist/components/table/TablePagination.vue +73 -0
- package/dist/components/table/TablePagination.vue.d.ts +13 -0
- package/dist/composables/use-is-mobile.d.ts +1 -0
- package/dist/composables/use-is-mobile.js +10 -0
- package/dist/composables/use-is-mobile.mjs +4 -0
- package/dist/composables/use-table-filters.d.ts +23 -0
- package/dist/composables/use-table-filters.js +196 -0
- package/dist/composables/use-table-filters.mjs +183 -0
- package/dist/fonts/NotoSans-Medium.ttf +0 -0
- package/dist/fonts/NotoSansArabic-Medium.ttf +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.eot +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.svg +9 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.ttf +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.woff +0 -0
- package/dist/fonts/saudi_riyal_symbol/saudi_riyal_symbol.woff2 +0 -0
- package/dist/images/avatar.png +0 -0
- package/dist/images/sa.svg +1 -0
- package/dist/images/successful-registration.svg +15 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +447 -0
- package/dist/index.mjs +128 -0
- package/dist/styles/@core/scss/base/_components.scss +164 -0
- package/dist/styles/@core/scss/base/_dark.scss +16 -0
- package/dist/styles/@core/scss/base/_default-layout-w-vertical-nav.scss +106 -0
- package/dist/styles/@core/scss/base/_default-layout.scss +16 -0
- package/dist/styles/@core/scss/base/_index.scss +47 -0
- package/dist/styles/@core/scss/base/_layouts.scss +63 -0
- package/dist/styles/@core/scss/base/_misc.scss +20 -0
- package/dist/styles/@core/scss/base/_mixins.scss +84 -0
- package/dist/styles/@core/scss/base/_route-transitions.scss +70 -0
- package/dist/styles/@core/scss/base/_utilities.scss +418 -0
- package/dist/styles/@core/scss/base/_utils.scss +100 -0
- package/dist/styles/@core/scss/base/_variables.scss +190 -0
- package/dist/styles/@core/scss/base/_vertical-nav.scss +264 -0
- package/dist/styles/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_index.scss +1 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_overrides.scss +385 -0
- package/dist/styles/@core/scss/base/libs/vuetify/_variables.scss +48 -0
- package/dist/styles/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/dist/styles/@core/scss/base/placeholders/_default-layout.scss +3 -0
- package/dist/styles/@core/scss/base/placeholders/_index.scss +5 -0
- package/dist/styles/@core/scss/base/placeholders/_misc.scss +7 -0
- package/dist/styles/@core/scss/base/placeholders/_nav.scss +26 -0
- package/dist/styles/@core/scss/base/placeholders/_vertical-nav.scss +84 -0
- package/dist/styles/@core/scss/base/skins/_bordered.scss +60 -0
- package/dist/styles/@core/scss/base/skins/_index.scss +1 -0
- package/dist/styles/@core/scss/template/_components.scss +1035 -0
- package/dist/styles/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
- package/dist/styles/@core/scss/template/_utilities.scss +20 -0
- package/dist/styles/@core/scss/template/_variables.scss +67 -0
- package/dist/styles/@core/scss/template/_vertical-nav.scss +41 -0
- package/dist/styles/@core/scss/template/index.css +18764 -0
- package/dist/styles/@core/scss/template/index.scss +15 -0
- package/dist/styles/@core/scss/template/libs/apex-chart.css +90 -0
- package/dist/styles/@core/scss/template/libs/apex-chart.scss +99 -0
- package/dist/styles/@core/scss/template/libs/shepherd.css +82 -0
- package/dist/styles/@core/scss/template/libs/shepherd.scss +88 -0
- package/dist/styles/@core/scss/template/libs/vuetify/_variables.scss +461 -0
- package/dist/styles/@core/scss/template/libs/vuetify/index.css +741 -0
- package/dist/styles/@core/scss/template/libs/vuetify/index.scss +1 -0
- package/dist/styles/@core/scss/template/pages/misc.css +16 -0
- package/dist/styles/@core/scss/template/pages/misc.scss +20 -0
- package/dist/styles/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/dist/styles/@core/scss/template/placeholders/_index.scss +3 -0
- package/dist/styles/@core/scss/template/placeholders/_nav.scss +15 -0
- package/dist/styles/@core/scss/template/placeholders/_vertical-nav.scss +18 -0
- package/dist/styles/@core/scss/template/skins/_bordered.scss +36 -0
- package/dist/styles/@core/scss/template/skins/_index.scss +1 -0
- package/dist/styles/@layouts/styles/_classes.scss +3 -0
- package/dist/styles/@layouts/styles/_dashboard-layout.scss +43 -0
- package/dist/styles/@layouts/styles/_global.scss +10 -0
- package/dist/styles/@layouts/styles/_mixins.scss +28 -0
- package/dist/styles/@layouts/styles/_placeholders.scss +53 -0
- package/dist/styles/@layouts/styles/_rtl.scss +7 -0
- package/dist/styles/@layouts/styles/_variables.scss +22 -0
- package/dist/styles/@layouts/styles/index.css +14 -0
- package/dist/styles/@layouts/styles/index.scss +2 -0
- package/dist/styles/assets/scss/styles.css +16099 -0
- package/dist/styles/assets/scss/styles.scss +246 -0
- package/dist/styles/assets/scss/variables/_template.scss +1 -0
- package/dist/styles/assets/scss/variables/_vuetify.scss +1 -0
- package/dist/types.d.ts +226 -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 +39 -0
- package/dist/utils/client.mjs +25 -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/index.d.ts +9 -0
- package/dist/utils/index.js +104 -0
- package/dist/utils/index.mjs +9 -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 +28 -0
- package/dist/utils/ruleValidator.js +158 -0
- package/dist/utils/ruleValidator.mjs +144 -0
- package/dist/utils/toaster.d.ts +12 -0
- package/dist/utils/toaster.js +71 -0
- package/dist/utils/toaster.mjs +59 -0
- package/dist/utils/utils.d.ts +8 -0
- package/dist/utils/utils.js +70 -0
- package/dist/utils/utils.mjs +56 -0
- package/package.json +79 -0
- package/src/styles/@core/scss/base/_components.scss +164 -0
- package/src/styles/@core/scss/base/_dark.scss +16 -0
- package/src/styles/@core/scss/base/_default-layout-w-vertical-nav.scss +106 -0
- package/src/styles/@core/scss/base/_default-layout.scss +16 -0
- package/src/styles/@core/scss/base/_index.scss +47 -0
- package/src/styles/@core/scss/base/_layouts.scss +63 -0
- package/src/styles/@core/scss/base/_misc.scss +20 -0
- package/src/styles/@core/scss/base/_mixins.scss +84 -0
- package/src/styles/@core/scss/base/_route-transitions.scss +70 -0
- package/src/styles/@core/scss/base/_utilities.scss +418 -0
- package/src/styles/@core/scss/base/_utils.scss +100 -0
- package/src/styles/@core/scss/base/_variables.scss +190 -0
- package/src/styles/@core/scss/base/_vertical-nav.scss +264 -0
- package/src/styles/@core/scss/base/libs/_perfect-scrollbar.scss +35 -0
- package/src/styles/@core/scss/base/libs/vuetify/_index.scss +1 -0
- package/src/styles/@core/scss/base/libs/vuetify/_overrides.scss +385 -0
- package/src/styles/@core/scss/base/libs/vuetify/_variables.scss +48 -0
- package/src/styles/@core/scss/base/placeholders/_default-layout-vertical-nav.scss +48 -0
- package/src/styles/@core/scss/base/placeholders/_default-layout.scss +3 -0
- package/src/styles/@core/scss/base/placeholders/_index.scss +5 -0
- package/src/styles/@core/scss/base/placeholders/_misc.scss +7 -0
- package/src/styles/@core/scss/base/placeholders/_nav.scss +26 -0
- package/src/styles/@core/scss/base/placeholders/_vertical-nav.scss +84 -0
- package/src/styles/@core/scss/base/skins/_bordered.scss +60 -0
- package/src/styles/@core/scss/base/skins/_index.scss +1 -0
- package/src/styles/@core/scss/template/_components.scss +1035 -0
- package/src/styles/@core/scss/template/_default-layout-w-vertical-nav.scss +20 -0
- package/src/styles/@core/scss/template/_utilities.scss +20 -0
- package/src/styles/@core/scss/template/_variables.scss +67 -0
- package/src/styles/@core/scss/template/_vertical-nav.scss +41 -0
- package/src/styles/@core/scss/template/index.scss +15 -0
- package/src/styles/@core/scss/template/libs/apex-chart.scss +99 -0
- package/src/styles/@core/scss/template/libs/shepherd.scss +88 -0
- package/src/styles/@core/scss/template/libs/vuetify/_variables.scss +461 -0
- package/src/styles/@core/scss/template/libs/vuetify/index.scss +1 -0
- package/src/styles/@core/scss/template/pages/misc.scss +20 -0
- package/src/styles/@core/scss/template/placeholders/_default-layout-vertical-nav.scss +9 -0
- package/src/styles/@core/scss/template/placeholders/_index.scss +3 -0
- package/src/styles/@core/scss/template/placeholders/_nav.scss +15 -0
- package/src/styles/@core/scss/template/placeholders/_vertical-nav.scss +18 -0
- package/src/styles/@core/scss/template/skins/_bordered.scss +36 -0
- package/src/styles/@core/scss/template/skins/_index.scss +1 -0
- package/src/styles/@layouts/styles/_classes.scss +3 -0
- package/src/styles/@layouts/styles/_dashboard-layout.scss +43 -0
- package/src/styles/@layouts/styles/_global.scss +10 -0
- package/src/styles/@layouts/styles/_mixins.scss +28 -0
- package/src/styles/@layouts/styles/_placeholders.scss +53 -0
- package/src/styles/@layouts/styles/_rtl.scss +7 -0
- package/src/styles/@layouts/styles/_variables.scss +22 -0
- package/src/styles/@layouts/styles/index.scss +2 -0
- package/src/styles/assets/scss/styles.scss +246 -0
- package/src/styles/assets/scss/variables/_template.scss +1 -0
- package/src/styles/assets/scss/variables/_vuetify.scss +1 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
import { VLabel, VSelect } from "vuetify/components";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: "AppSelect",
|
|
7
|
+
inheritAttrs: false
|
|
8
|
+
});
|
|
9
|
+
const { t } = useI18n();
|
|
10
|
+
const attrs = useAttrs();
|
|
11
|
+
const emit = defineEmits(["update:model-value"]);
|
|
12
|
+
const elementId = computed(() => {
|
|
13
|
+
const _elementIdToken = attrs.id || attrs.label;
|
|
14
|
+
return _elementIdToken ? `app-select-${_elementIdToken}-${Math.random().toString(36).slice(2, 7)}` : void 0;
|
|
15
|
+
});
|
|
16
|
+
const label = computed(() => attrs?.label);
|
|
17
|
+
const LangLabel = computed(() => label.value ? t(label.value) : "");
|
|
18
|
+
const placeholder = computed(() => {
|
|
19
|
+
if (attrs?.placeholder) {
|
|
20
|
+
return attrs?.placeholder;
|
|
21
|
+
}
|
|
22
|
+
if (label.value) {
|
|
23
|
+
return t("inputs.placeholder_select", {
|
|
24
|
+
name: LangLabel.value
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return "";
|
|
28
|
+
});
|
|
29
|
+
const handleMenuToggle = ($event) => {
|
|
30
|
+
const container = document.getElementsByClassName("v-overlay-container");
|
|
31
|
+
if (!$event) {
|
|
32
|
+
if (container && container[0]) {
|
|
33
|
+
for (let i = 0; i < container[0].children.length; i++) {
|
|
34
|
+
if (container[0].children[i].classList.contains(".v-menu")) {
|
|
35
|
+
container[0].children[i].remove();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div
|
|
45
|
+
class="app-select flex-grow-1"
|
|
46
|
+
:class="$attrs.class"
|
|
47
|
+
>
|
|
48
|
+
<VLabel
|
|
49
|
+
v-if="label"
|
|
50
|
+
:for="elementId"
|
|
51
|
+
class="mb-2 text-body-2 text-high-emphasis app-font-size-13"
|
|
52
|
+
:text="LangLabel"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<VSelect
|
|
56
|
+
v-bind="{
|
|
57
|
+
...$attrs,
|
|
58
|
+
class: null,
|
|
59
|
+
label: void 0,
|
|
60
|
+
variant: 'outlined',
|
|
61
|
+
id: elementId,
|
|
62
|
+
menuProps: {
|
|
63
|
+
contentClass: ['app-inner-list', 'app-select__content', 'v-select__content', $attrs.multiple !== void 0 ? 'v-list-select-multiple' : '',
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
...[$attrs?.['menu-props']?.contentClass || '']]
|
|
66
|
+
}
|
|
67
|
+
}"
|
|
68
|
+
class="app-font-size-13"
|
|
69
|
+
:class="{
|
|
70
|
+
'hide-arrow': !!$attrs.modelValue && $attrs?.clearable
|
|
71
|
+
}"
|
|
72
|
+
:placeholder="placeholder"
|
|
73
|
+
:no-data-text="t('no_data')"
|
|
74
|
+
persistent-clear
|
|
75
|
+
@update:model-value="e => emit('update:model-value', e)"
|
|
76
|
+
@update:menu="handleMenuToggle"
|
|
77
|
+
>
|
|
78
|
+
<template
|
|
79
|
+
v-for="(_, name) in $slots"
|
|
80
|
+
#[name]="slotProps"
|
|
81
|
+
>
|
|
82
|
+
<slot
|
|
83
|
+
:name="name"
|
|
84
|
+
v-bind="slotProps || {}"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
<template #details>
|
|
88
|
+
<span class="app-h-10px" />
|
|
89
|
+
</template>
|
|
90
|
+
</VSelect>
|
|
91
|
+
</div>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<style scoped>
|
|
95
|
+
.hide-arrow :deep(.v-field__append-inner) {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
import { VLabel, VSwitch } from "vuetify/components";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineProps({
|
|
6
|
+
labelSwitch: { type: String, required: false }
|
|
7
|
+
});
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: "AppSwitch",
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
});
|
|
12
|
+
const { t } = useI18n();
|
|
13
|
+
const elementId = computed(() => {
|
|
14
|
+
const attrs = useAttrs();
|
|
15
|
+
const _elementIdToken = attrs.id || attrs.label;
|
|
16
|
+
return _elementIdToken ? `app-switch-${_elementIdToken}-${Math.random().toString(36).slice(2, 7)}` : void 0;
|
|
17
|
+
});
|
|
18
|
+
const label = computed(() => useAttrs().label);
|
|
19
|
+
const LangLabel = computed(() => label.value ? t(label.value) : "");
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div
|
|
24
|
+
class="d-flex flex-column"
|
|
25
|
+
:class="$attrs.class"
|
|
26
|
+
>
|
|
27
|
+
<div>
|
|
28
|
+
<VLabel
|
|
29
|
+
v-if="label"
|
|
30
|
+
:for="elementId"
|
|
31
|
+
class="mb-2 text-body-2 text-high-emphasis"
|
|
32
|
+
:text="LangLabel"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
<VSwitch
|
|
37
|
+
v-bind="{
|
|
38
|
+
...$attrs,
|
|
39
|
+
class: null,
|
|
40
|
+
label: void 0,
|
|
41
|
+
variant: 'outlined',
|
|
42
|
+
id: elementId
|
|
43
|
+
}"
|
|
44
|
+
:label="labelSwitch"
|
|
45
|
+
class="item-center h-100"
|
|
46
|
+
>
|
|
47
|
+
<template
|
|
48
|
+
v-for="(_, name) in $slots"
|
|
49
|
+
#[name]="slotProps"
|
|
50
|
+
>
|
|
51
|
+
<slot
|
|
52
|
+
:name="name"
|
|
53
|
+
v-bind="slotProps || {}"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</VSwitch>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VLabel, VSwitch } from 'vuetify/components';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
labelSwitch?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const elementId: import("vue").ComputedRef<string | undefined>;
|
|
6
|
+
declare const label: import("vue").ComputedRef<string | undefined>;
|
|
7
|
+
declare const LangLabel: import("vue").ComputedRef<string>;
|
|
8
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
9
|
+
declare var __VLS_10: any, __VLS_11: any;
|
|
10
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
11
|
+
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
12
|
+
}>;
|
|
13
|
+
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
14
|
+
VLabel: typeof VLabel;
|
|
15
|
+
VSwitch: typeof VSwitch;
|
|
16
|
+
elementId: typeof elementId;
|
|
17
|
+
label: typeof label;
|
|
18
|
+
LangLabel: typeof LangLabel;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_component: 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>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
import { VLabel, VTextField } from "vuetify/components";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: "AppTextField",
|
|
7
|
+
inheritAttrs: false
|
|
8
|
+
});
|
|
9
|
+
const { t } = useI18n();
|
|
10
|
+
const elementId = computed(() => {
|
|
11
|
+
const attrs = useAttrs();
|
|
12
|
+
const _elementIdToken = attrs.id || attrs.label;
|
|
13
|
+
return _elementIdToken ? `AppTextField-${_elementIdToken}-${Math.random().toString(36).slice(2, 7)}` : void 0;
|
|
14
|
+
});
|
|
15
|
+
const label = computed(() => useAttrs()?.label);
|
|
16
|
+
const LangLabel = computed(() => label.value ? t(label.value) : "");
|
|
17
|
+
const placeholder = computed(() => {
|
|
18
|
+
if (useAttrs()?.placeholder) {
|
|
19
|
+
return useAttrs()?.placeholder;
|
|
20
|
+
}
|
|
21
|
+
if (label.value) {
|
|
22
|
+
return t("inputs.placeholder", {
|
|
23
|
+
name: LangLabel.value
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return "";
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div
|
|
32
|
+
class="AppTextField flex-grow-1"
|
|
33
|
+
:class="$attrs.class"
|
|
34
|
+
>
|
|
35
|
+
<VLabel
|
|
36
|
+
v-if="label"
|
|
37
|
+
:for="elementId"
|
|
38
|
+
class="mb-2 text-body-2 text-high-emphasis app-font-size-13"
|
|
39
|
+
:text="LangLabel"
|
|
40
|
+
/>
|
|
41
|
+
<VTextField
|
|
42
|
+
v-bind="{
|
|
43
|
+
...$attrs,
|
|
44
|
+
class: null,
|
|
45
|
+
label: void 0,
|
|
46
|
+
variant: 'outlined',
|
|
47
|
+
id: elementId
|
|
48
|
+
}"
|
|
49
|
+
:placeholder="placeholder"
|
|
50
|
+
class="app-font-size-13"
|
|
51
|
+
>
|
|
52
|
+
<template
|
|
53
|
+
v-for="(_, name) in $slots"
|
|
54
|
+
#[name]="slotProps"
|
|
55
|
+
>
|
|
56
|
+
<slot
|
|
57
|
+
:name="name"
|
|
58
|
+
v-bind="slotProps || {}"
|
|
59
|
+
/>
|
|
60
|
+
</template>
|
|
61
|
+
<template #details>
|
|
62
|
+
<span class="app-h-10px" />
|
|
63
|
+
</template>
|
|
64
|
+
</VTextField>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VLabel, VTextField } from 'vuetify/components';
|
|
2
|
+
declare const elementId: import("vue").ComputedRef<string | undefined>;
|
|
3
|
+
declare const label: import("vue").ComputedRef<string | null>;
|
|
4
|
+
declare const LangLabel: import("vue").ComputedRef<string>;
|
|
5
|
+
declare const placeholder: import("vue").ComputedRef<string>;
|
|
6
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
+
declare var __VLS_10: any, __VLS_11: any;
|
|
8
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
9
|
+
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
10
|
+
}>;
|
|
11
|
+
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
12
|
+
VLabel: typeof VLabel;
|
|
13
|
+
VTextField: typeof VTextField;
|
|
14
|
+
elementId: typeof elementId;
|
|
15
|
+
label: typeof label;
|
|
16
|
+
LangLabel: typeof LangLabel;
|
|
17
|
+
placeholder: typeof placeholder;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from "vue";
|
|
3
|
+
import { VLabel, VTextarea } from "vuetify/components";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
5
|
+
defineOptions({
|
|
6
|
+
name: "AppTextarea",
|
|
7
|
+
inheritAttrs: false
|
|
8
|
+
});
|
|
9
|
+
const { t } = useI18n();
|
|
10
|
+
const elementId = computed(() => {
|
|
11
|
+
const attrs = useAttrs();
|
|
12
|
+
const _elementIdToken = attrs.id || attrs.label;
|
|
13
|
+
return _elementIdToken ? `app-textarea-${_elementIdToken}-${Math.random().toString(36).slice(2, 7)}` : void 0;
|
|
14
|
+
});
|
|
15
|
+
const label = computed(() => useAttrs()?.label);
|
|
16
|
+
const LangLabel = computed(() => label.value ? t(label.value) : "");
|
|
17
|
+
const placeholder = computed(() => {
|
|
18
|
+
if (useAttrs()?.placeholder) {
|
|
19
|
+
return useAttrs()?.placeholder;
|
|
20
|
+
}
|
|
21
|
+
if (label.value) {
|
|
22
|
+
return t("inputs.placeholder", {
|
|
23
|
+
name: LangLabel.value
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return "";
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div
|
|
32
|
+
class="app-textarea flex-grow-1"
|
|
33
|
+
:class="$attrs.class"
|
|
34
|
+
>
|
|
35
|
+
<VLabel
|
|
36
|
+
v-if="label"
|
|
37
|
+
:for="elementId"
|
|
38
|
+
class="mb-2 text-body-2 text-high-emphasis"
|
|
39
|
+
:text="LangLabel"
|
|
40
|
+
/>
|
|
41
|
+
<VTextarea
|
|
42
|
+
v-bind="{
|
|
43
|
+
...$attrs,
|
|
44
|
+
class: null,
|
|
45
|
+
label: void 0,
|
|
46
|
+
variant: 'outlined',
|
|
47
|
+
id: elementId
|
|
48
|
+
}"
|
|
49
|
+
:placeholder="placeholder"
|
|
50
|
+
class="w-100"
|
|
51
|
+
>
|
|
52
|
+
<template
|
|
53
|
+
v-for="(_, name) in $slots"
|
|
54
|
+
#[name]="slotProps"
|
|
55
|
+
>
|
|
56
|
+
<slot
|
|
57
|
+
:name="name"
|
|
58
|
+
v-bind="slotProps || {}"
|
|
59
|
+
/>
|
|
60
|
+
</template>
|
|
61
|
+
</VTextarea>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style scoped>
|
|
66
|
+
:deep(textarea) {
|
|
67
|
+
padding: 15px 20px !important;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { VLabel, VTextarea } from 'vuetify/components';
|
|
2
|
+
declare const elementId: import("vue").ComputedRef<string | undefined>;
|
|
3
|
+
declare const label: import("vue").ComputedRef<string | null>;
|
|
4
|
+
declare const LangLabel: import("vue").ComputedRef<string>;
|
|
5
|
+
declare const placeholder: import("vue").ComputedRef<string>;
|
|
6
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
+
declare var __VLS_10: any, __VLS_11: any;
|
|
8
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
9
|
+
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
10
|
+
}>;
|
|
11
|
+
declare const __VLS_self: import("vue").DefineComponent<{}, {
|
|
12
|
+
VLabel: typeof VLabel;
|
|
13
|
+
VTextarea: typeof VTextarea;
|
|
14
|
+
elementId: typeof elementId;
|
|
15
|
+
label: typeof label;
|
|
16
|
+
LangLabel: typeof LangLabel;
|
|
17
|
+
placeholder: typeof placeholder;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { watch, ref, toRaw } from "vue";
|
|
3
|
+
import { VLabel, VCheckbox, VSpacer, VCol, VRow } from "vuetify/components";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
selectedCheckbox: { type: Array, required: true },
|
|
6
|
+
checkboxContent: { type: Array, required: true },
|
|
7
|
+
gridColumn: { type: null, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:selectedCheckbox"]);
|
|
10
|
+
const selectedOption = ref(structuredClone(toRaw(props.selectedCheckbox)));
|
|
11
|
+
watch(selectedOption, () => {
|
|
12
|
+
emit("update:selectedCheckbox", selectedOption.value);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<VRow
|
|
18
|
+
v-if="checkboxContent && selectedOption"
|
|
19
|
+
v-model="selectedOption"
|
|
20
|
+
>
|
|
21
|
+
<VCol
|
|
22
|
+
v-for="item in checkboxContent"
|
|
23
|
+
:key="item.title"
|
|
24
|
+
v-bind="gridColumn"
|
|
25
|
+
>
|
|
26
|
+
<VLabel
|
|
27
|
+
class="custom-input custom-checkbox rounded cursor-pointer"
|
|
28
|
+
:class="selectedOption.includes(item.value) ? 'active' : ''"
|
|
29
|
+
>
|
|
30
|
+
<div>
|
|
31
|
+
<VCheckbox
|
|
32
|
+
v-model="selectedOption"
|
|
33
|
+
:value="item.value"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
<slot :item="item">
|
|
37
|
+
<div class="flex-grow-1">
|
|
38
|
+
<div class="d-flex align-center mb-1">
|
|
39
|
+
<h6 class="cr-title text-base">
|
|
40
|
+
{{ item.title }}
|
|
41
|
+
</h6>
|
|
42
|
+
<VSpacer />
|
|
43
|
+
<span v-if="item.subtitle" class="text-disabled text-base">
|
|
44
|
+
{{ item.subtitle }}
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
<p class="text-sm mb-0">
|
|
48
|
+
{{ item.desc }}
|
|
49
|
+
</p>
|
|
50
|
+
</div>
|
|
51
|
+
</slot>
|
|
52
|
+
</VLabel>
|
|
53
|
+
</VCol>
|
|
54
|
+
</VRow>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<style scoped>
|
|
58
|
+
.custom-checkbox {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: flex-start;
|
|
61
|
+
gap: 0.5rem;
|
|
62
|
+
}
|
|
63
|
+
.custom-checkbox .v-checkbox {
|
|
64
|
+
margin-block-start: -0.375rem;
|
|
65
|
+
}
|
|
66
|
+
.custom-checkbox .cr-title {
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VLabel, VCheckbox, VSpacer, VCol, VRow } from 'vuetify/components';
|
|
2
|
+
import type { CustomInputContent, GridColumn } from '../../../types/core';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
selectedCheckbox: string[];
|
|
5
|
+
checkboxContent: CustomInputContent[];
|
|
6
|
+
gridColumn?: GridColumn;
|
|
7
|
+
};
|
|
8
|
+
declare const selectedOption: import("vue").Ref<string[], string[]>;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_18: {
|
|
11
|
+
item: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
14
|
+
default?: (props: typeof __VLS_18) => any;
|
|
15
|
+
}>;
|
|
16
|
+
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
17
|
+
VLabel: typeof VLabel;
|
|
18
|
+
VCheckbox: typeof VCheckbox;
|
|
19
|
+
VSpacer: typeof VSpacer;
|
|
20
|
+
VCol: typeof VCol;
|
|
21
|
+
VRow: typeof VRow;
|
|
22
|
+
selectedOption: typeof selectedOption;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
"update:selectedCheckbox": (value: string[]) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
"onUpdate:selectedCheckbox"?: ((value: string[]) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
+
"update:selectedCheckbox": (value: string[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:selectedCheckbox"?: ((value: string[]) => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch, toRaw } from "vue";
|
|
3
|
+
import { VLabel, VCheckbox, VIcon, VCol, VRow } from "vuetify/components";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
selectedCheckbox: { type: Array, required: true },
|
|
6
|
+
checkboxContent: { type: Array, required: true },
|
|
7
|
+
gridColumn: { type: null, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:selectedCheckbox"]);
|
|
10
|
+
const selectedOption = ref(structuredClone(toRaw(props.selectedCheckbox)));
|
|
11
|
+
watch(selectedOption, () => {
|
|
12
|
+
emit("update:selectedCheckbox", selectedOption.value);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<VRow
|
|
18
|
+
v-if="checkboxContent && selectedOption"
|
|
19
|
+
v-model="selectedOption"
|
|
20
|
+
>
|
|
21
|
+
<VCol
|
|
22
|
+
v-for="item in checkboxContent"
|
|
23
|
+
:key="item.title"
|
|
24
|
+
v-bind="gridColumn"
|
|
25
|
+
>
|
|
26
|
+
<VLabel
|
|
27
|
+
class="custom-input custom-checkbox-icon rounded cursor-pointer"
|
|
28
|
+
:class="selectedOption.includes(item.value) ? 'active' : ''"
|
|
29
|
+
>
|
|
30
|
+
<slot :item="item">
|
|
31
|
+
<div class="d-flex flex-column align-center text-center gap-2">
|
|
32
|
+
<VIcon
|
|
33
|
+
v-bind="item.icon"
|
|
34
|
+
class="text-high-emphasis"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<h6 class="cr-title text-base">
|
|
38
|
+
{{ item.title }}
|
|
39
|
+
</h6>
|
|
40
|
+
<p class="text-sm clamp-text mb-0">
|
|
41
|
+
{{ item.desc }}
|
|
42
|
+
</p>
|
|
43
|
+
</div>
|
|
44
|
+
</slot>
|
|
45
|
+
<div>
|
|
46
|
+
<VCheckbox
|
|
47
|
+
v-model="selectedOption"
|
|
48
|
+
:value="item.value"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</VLabel>
|
|
52
|
+
</VCol>
|
|
53
|
+
</VRow>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style scoped>
|
|
57
|
+
.custom-checkbox-icon {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 0.375rem;
|
|
61
|
+
}
|
|
62
|
+
.custom-checkbox-icon .v-checkbox {
|
|
63
|
+
margin-block-end: -0.375rem;
|
|
64
|
+
}
|
|
65
|
+
.custom-checkbox-icon .v-checkbox .v-selection-control__wrapper {
|
|
66
|
+
margin-inline-start: 0;
|
|
67
|
+
}
|
|
68
|
+
.custom-checkbox-icon .cr-title {
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
72
|
+
|
|
73
|
+
<style>
|
|
74
|
+
.custom-checkbox-icon .v-checkbox {
|
|
75
|
+
margin-block-end: -0.375rem;
|
|
76
|
+
}
|
|
77
|
+
.custom-checkbox-icon .v-checkbox .v-selection-control__wrapper {
|
|
78
|
+
margin-inline-start: 0;
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VLabel, VCheckbox, VIcon, VCol, VRow } from 'vuetify/components';
|
|
2
|
+
import type { CustomInputContent, GridColumn } from '../../../types/core';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
selectedCheckbox: string[];
|
|
5
|
+
checkboxContent: CustomInputContent[];
|
|
6
|
+
gridColumn?: GridColumn;
|
|
7
|
+
};
|
|
8
|
+
declare const selectedOption: import("vue").Ref<string[], string[]>;
|
|
9
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
10
|
+
declare var __VLS_14: {
|
|
11
|
+
item: any;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
14
|
+
default?: (props: typeof __VLS_14) => any;
|
|
15
|
+
}>;
|
|
16
|
+
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
17
|
+
VLabel: typeof VLabel;
|
|
18
|
+
VCheckbox: typeof VCheckbox;
|
|
19
|
+
VIcon: typeof VIcon;
|
|
20
|
+
VCol: typeof VCol;
|
|
21
|
+
VRow: typeof VRow;
|
|
22
|
+
selectedOption: typeof selectedOption;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
"update:selectedCheckbox": (value: string[]) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
"onUpdate:selectedCheckbox"?: ((value: string[]) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
+
"update:selectedCheckbox": (value: string[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
"onUpdate:selectedCheckbox"?: ((value: string[]) => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch, toRaw } from "vue";
|
|
3
|
+
import { VLabel, VCheckbox, VCol, VRow } from "vuetify/components";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
selectedCheckbox: { type: Array, required: true },
|
|
6
|
+
checkboxContent: { type: Array, required: true },
|
|
7
|
+
gridColumn: { type: null, required: false }
|
|
8
|
+
});
|
|
9
|
+
const emit = defineEmits(["update:selectedCheckbox"]);
|
|
10
|
+
const selectedOption = ref(structuredClone(toRaw(props.selectedCheckbox)));
|
|
11
|
+
watch(selectedOption, () => {
|
|
12
|
+
emit("update:selectedCheckbox", selectedOption.value);
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<VRow
|
|
18
|
+
v-if="checkboxContent && selectedOption"
|
|
19
|
+
v-model="selectedOption"
|
|
20
|
+
>
|
|
21
|
+
<VCol
|
|
22
|
+
v-for="item in checkboxContent"
|
|
23
|
+
:key="item.value"
|
|
24
|
+
v-bind="gridColumn"
|
|
25
|
+
>
|
|
26
|
+
<VLabel
|
|
27
|
+
class="custom-input custom-checkbox rounded cursor-pointer w-100"
|
|
28
|
+
:class="selectedOption.includes(item.value) ? 'active' : ''"
|
|
29
|
+
>
|
|
30
|
+
<div>
|
|
31
|
+
<VCheckbox
|
|
32
|
+
v-model="selectedOption"
|
|
33
|
+
:value="item.value"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
<img
|
|
37
|
+
:src="item.bgImage"
|
|
38
|
+
alt="bg-img"
|
|
39
|
+
class="custom-checkbox-image"
|
|
40
|
+
>
|
|
41
|
+
</VLabel>
|
|
42
|
+
</VCol>
|
|
43
|
+
</VRow>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.custom-checkbox {
|
|
48
|
+
position: relative;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border-width: 2px;
|
|
51
|
+
transition: all 0.5s;
|
|
52
|
+
}
|
|
53
|
+
.custom-checkbox .custom-checkbox-image {
|
|
54
|
+
block-size: 100%;
|
|
55
|
+
inline-size: 100%;
|
|
56
|
+
min-inline-size: 100%;
|
|
57
|
+
}
|
|
58
|
+
.custom-checkbox .v-checkbox {
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset-block-start: 0;
|
|
61
|
+
inset-inline-end: 0;
|
|
62
|
+
visibility: hidden;
|
|
63
|
+
}
|
|
64
|
+
.custom-checkbox:hover .v-checkbox, .custom-checkbox.active .v-checkbox {
|
|
65
|
+
visibility: visible;
|
|
66
|
+
}
|
|
67
|
+
</style>
|