adata-ui 3.0.2 → 3.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/dist/module.d.mts +2 -0
- package/dist/module.json +5 -1
- package/dist/module.mjs +39 -6
- package/dist/runtime/components/Alert.vue +62 -0
- package/dist/runtime/components/Alert.vue.d.ts +29 -0
- package/dist/runtime/components/Chip.vue +24 -0
- package/dist/runtime/components/Chip.vue.d.ts +19 -0
- package/dist/runtime/components/ColorMode.vue +46 -0
- package/dist/runtime/components/ColorMode.vue.d.ts +2 -0
- package/dist/runtime/components/DigitBadge.vue +58 -0
- package/dist/runtime/components/DigitBadge.vue.d.ts +21 -0
- package/dist/runtime/components/Footer.vue +283 -0
- package/dist/runtime/components/Footer.vue.d.ts +2 -0
- package/dist/runtime/components/FooterAccordion.vue +78 -0
- package/dist/runtime/components/FooterAccordion.vue.d.ts +11 -0
- package/dist/runtime/components/Header.vue +139 -0
- package/dist/runtime/components/Header.vue.d.ts +41 -0
- package/dist/runtime/components/NewFooter.vue +267 -0
- package/dist/runtime/components/NewFooter.vue.d.ts +2 -0
- package/dist/runtime/components/NewFooterAccordion.vue +85 -0
- package/dist/runtime/components/NewFooterAccordion.vue.d.ts +11 -0
- package/dist/runtime/components/OtherServiceFeatures.vue +104 -0
- package/dist/runtime/components/OtherServiceFeatures.vue.d.ts +2 -0
- package/dist/runtime/components/Tag.vue +46 -0
- package/dist/runtime/components/Tag.vue.d.ts +25 -0
- package/dist/runtime/components/Toggle.vue +139 -0
- package/dist/runtime/components/Toggle.vue.d.ts +39 -0
- package/dist/runtime/components/accordion/Accordion.vue +149 -0
- package/dist/runtime/components/accordion/Accordion.vue.d.ts +41 -0
- package/dist/runtime/components/accordion/types.d.ts +15 -0
- package/dist/runtime/components/accordion/types.js +0 -0
- package/dist/runtime/components/accordion/ui.config.d.ts +22 -0
- package/dist/runtime/components/accordion/ui.config.js +21 -0
- package/dist/runtime/components/button/Button.vue +133 -0
- package/dist/runtime/components/button/Button.vue.d.ts +37 -0
- package/dist/runtime/components/button/types.d.ts +21 -0
- package/dist/runtime/components/button/types.js +0 -0
- package/dist/runtime/components/checkbox/Checkbox.vue +124 -0
- package/dist/runtime/components/checkbox/Checkbox.vue.d.ts +45 -0
- package/dist/runtime/components/date-picker/DatePicker.vue +102 -0
- package/dist/runtime/components/date-picker/DatePicker.vue.d.ts +16 -0
- package/dist/runtime/components/floating-label/FloatingLabel.vue +22 -0
- package/dist/runtime/components/floating-label/FloatingLabel.vue.d.ts +16 -0
- package/dist/runtime/components/forms/input/standard/InputStandard.vue +301 -0
- package/dist/runtime/components/forms/input/standard/InputStandard.vue.d.ts +0 -0
- package/dist/runtime/components/forms/input/textarea/ATextarea.vue +158 -0
- package/dist/runtime/components/forms/input/textarea/ATextarea.vue.d.ts +43 -0
- package/dist/runtime/components/forms/need-more-data/NeedMoreData.vue +114 -0
- package/dist/runtime/components/forms/need-more-data/NeedMoreData.vue.d.ts +5 -0
- package/dist/runtime/components/forms/request-demo/RequestDemo.vue +67 -0
- package/dist/runtime/components/forms/request-demo/RequestDemo.vue.d.ts +23 -0
- package/dist/runtime/components/header/AlmatyContacts.vue +120 -0
- package/dist/runtime/components/header/AlmatyContacts.vue.d.ts +2 -0
- package/dist/runtime/components/header/AstanaContacts.vue +65 -0
- package/dist/runtime/components/header/AstanaContacts.vue.d.ts +2 -0
- package/dist/runtime/components/header/CardGallery.vue +156 -0
- package/dist/runtime/components/header/CardGallery.vue.d.ts +2 -0
- package/dist/runtime/components/header/ContactMenu.vue +105 -0
- package/dist/runtime/components/header/ContactMenu.vue.d.ts +11 -0
- package/dist/runtime/components/header/HeaderLink.vue +169 -0
- package/dist/runtime/components/header/HeaderLink.vue.d.ts +2 -0
- package/dist/runtime/components/header/LangSwitcher.vue +48 -0
- package/dist/runtime/components/header/LangSwitcher.vue.d.ts +2 -0
- package/dist/runtime/components/header/ListItem.vue +26 -0
- package/dist/runtime/components/header/ListItem.vue.d.ts +7 -0
- package/dist/runtime/components/header/NavCard.vue +40 -0
- package/dist/runtime/components/header/NavCard.vue.d.ts +8 -0
- package/dist/runtime/components/header/NavList.vue +101 -0
- package/dist/runtime/components/header/NavList.vue.d.ts +17 -0
- package/dist/runtime/components/header/ProductMenu.vue +369 -0
- package/dist/runtime/components/header/ProductMenu.vue.d.ts +11 -0
- package/dist/runtime/components/header/ProfileMenu.vue +56 -0
- package/dist/runtime/components/header/ProfileMenu.vue.d.ts +16 -0
- package/dist/runtime/components/header/ProfileMenuContent.vue +228 -0
- package/dist/runtime/components/header/ProfileMenuContent.vue.d.ts +16 -0
- package/dist/runtime/components/header/TopHeader.vue +152 -0
- package/dist/runtime/components/header/TopHeader.vue.d.ts +10 -0
- package/dist/runtime/components/header/types.d.ts +19 -0
- package/dist/runtime/components/header/types.js +0 -0
- package/dist/runtime/components/header-mobile/HeaderMobile.vue +53 -0
- package/dist/runtime/components/header-mobile/HeaderMobile.vue.d.ts +17 -0
- package/dist/runtime/components/mobile-navigation/BottomNavigation.vue +68 -0
- package/dist/runtime/components/mobile-navigation/BottomNavigation.vue.d.ts +29 -0
- package/dist/runtime/components/mobile-navigation/MainButton.vue +16 -0
- package/dist/runtime/components/mobile-navigation/MainButton.vue.d.ts +2 -0
- package/dist/runtime/components/mobile-navigation/MobileProductMenu.vue +261 -0
- package/dist/runtime/components/mobile-navigation/MobileProductMenu.vue.d.ts +2 -0
- package/dist/runtime/components/modals/NoAccessContent.vue +58 -0
- package/dist/runtime/components/modals/NoAccessContent.vue.d.ts +5 -0
- package/dist/runtime/components/pill-tabs/PillTabs.vue +137 -0
- package/dist/runtime/components/pill-tabs/PillTabs.vue.d.ts +38 -0
- package/dist/runtime/components/pill-tabs/types.d.ts +18 -0
- package/dist/runtime/components/pill-tabs/types.js +0 -0
- package/dist/runtime/components/radio-button/RadioButton.vue +69 -0
- package/dist/runtime/components/radio-button/RadioButton.vue.d.ts +40 -0
- package/dist/runtime/components/row-card/RowCard.vue +44 -0
- package/dist/runtime/components/row-card/RowCard.vue.d.ts +26 -0
- package/dist/runtime/components/select-row/index.vue +117 -0
- package/dist/runtime/components/select-row/index.vue.d.ts +31 -0
- package/dist/runtime/components/tree-select/TreeSelect.vue +132 -0
- package/dist/runtime/components/tree-select/TreeSelect.vue.d.ts +22 -0
- package/dist/runtime/components/tree-select/TreeService.d.ts +54 -0
- package/dist/runtime/components/tree-select/TreeService.js +209 -0
- package/dist/runtime/components/tree-select/components/tree-select-nodes.vue +100 -0
- package/dist/runtime/components/tree-select/components/tree-select-nodes.vue.d.ts +9 -0
- package/dist/runtime/components/tree-select/types.d.ts +29 -0
- package/dist/runtime/components/tree-select/types.js +0 -0
- package/dist/runtime/composables/highlight.d.ts +1 -0
- package/dist/runtime/composables/highlight.js +15 -0
- package/dist/runtime/composables/projectState.d.ts +2 -0
- package/dist/runtime/composables/projectState.js +3 -0
- package/dist/runtime/i18n/i18n.config.d.ts +1731 -0
- package/dist/runtime/i18n/i18n.config.js +20 -0
- package/dist/runtime/i18n.d.ts +2 -0
- package/dist/runtime/i18n.js +15 -0
- package/dist/runtime/icons/arrow/arrow-circle-down.vue +30 -0
- package/dist/runtime/icons/arrow/arrow-circle-down.vue.d.ts +2 -0
- package/dist/runtime/icons/arrow/arrow-graph-up.vue +24 -0
- package/dist/runtime/icons/arrow/arrow-graph-up.vue.d.ts +2 -0
- package/dist/runtime/icons/arrow/arrow-right.vue +24 -0
- package/dist/runtime/icons/arrow/arrow-right.vue.d.ts +2 -0
- package/dist/runtime/icons/arrow/arrow-side-up.vue +19 -0
- package/dist/runtime/icons/arrow/arrow-side-up.vue.d.ts +2 -0
- package/dist/runtime/icons/arrow/arrow-top-right-on-square.vue +19 -0
- package/dist/runtime/icons/arrow/arrow-top-right-on-square.vue.d.ts +2 -0
- package/dist/runtime/icons/arrow/chevron-down.vue +19 -0
- package/dist/runtime/icons/arrow/chevron-down.vue.d.ts +2 -0
- package/dist/runtime/icons/avatar.vue +41 -0
- package/dist/runtime/icons/avatar.vue.d.ts +2 -0
- package/dist/runtime/icons/avto/car.vue +17 -0
- package/dist/runtime/icons/avto/car.vue.d.ts +2 -0
- package/dist/runtime/icons/avto/truck.vue +17 -0
- package/dist/runtime/icons/avto/truck.vue.d.ts +2 -0
- package/dist/runtime/icons/block.vue +19 -0
- package/dist/runtime/icons/block.vue.d.ts +2 -0
- package/dist/runtime/icons/bookmark.vue +19 -0
- package/dist/runtime/icons/bookmark.vue.d.ts +2 -0
- package/dist/runtime/icons/calculator.vue +19 -0
- package/dist/runtime/icons/calculator.vue.d.ts +2 -0
- package/dist/runtime/icons/calendar.vue +24 -0
- package/dist/runtime/icons/calendar.vue.d.ts +2 -0
- package/dist/runtime/icons/check-circle.vue +25 -0
- package/dist/runtime/icons/check-circle.vue.d.ts +2 -0
- package/dist/runtime/icons/checkbox/checkbox-active.vue +19 -0
- package/dist/runtime/icons/checkbox/checkbox-active.vue.d.ts +2 -0
- package/dist/runtime/icons/checkbox/checkbox-empty.vue +20 -0
- package/dist/runtime/icons/checkbox/checkbox-empty.vue.d.ts +2 -0
- package/dist/runtime/icons/checkbox/checkbox-intermediate.vue +19 -0
- package/dist/runtime/icons/checkbox/checkbox-intermediate.vue.d.ts +2 -0
- package/dist/runtime/icons/clipboard-text.vue +17 -0
- package/dist/runtime/icons/clipboard-text.vue.d.ts +2 -0
- package/dist/runtime/icons/clock.vue +25 -0
- package/dist/runtime/icons/clock.vue.d.ts +2 -0
- package/dist/runtime/icons/color-mode/moon.vue +20 -0
- package/dist/runtime/icons/color-mode/moon.vue.d.ts +2 -0
- package/dist/runtime/icons/color-mode/sun.vue +27 -0
- package/dist/runtime/icons/color-mode/sun.vue.d.ts +2 -0
- package/dist/runtime/icons/communication/mail.vue +19 -0
- package/dist/runtime/icons/communication/mail.vue.d.ts +2 -0
- package/dist/runtime/icons/communication/phone.vue +19 -0
- package/dist/runtime/icons/communication/phone.vue.d.ts +2 -0
- package/dist/runtime/icons/company.vue +19 -0
- package/dist/runtime/icons/company.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/dollar.vue +19 -0
- package/dist/runtime/icons/currency/dollar.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/down.vue +22 -0
- package/dist/runtime/icons/currency/down.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/eur.vue +69 -0
- package/dist/runtime/icons/currency/eur.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/rub.vue +25 -0
- package/dist/runtime/icons/currency/rub.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/usd.vue +269 -0
- package/dist/runtime/icons/currency/usd.vue.d.ts +2 -0
- package/dist/runtime/icons/currency/yuan.vue +37 -0
- package/dist/runtime/icons/currency/yuan.vue.d.ts +2 -0
- package/dist/runtime/icons/document/hdocument.vue +17 -0
- package/dist/runtime/icons/document/hdocument.vue.d.ts +2 -0
- package/dist/runtime/icons/document/id.vue +19 -0
- package/dist/runtime/icons/document/id.vue.d.ts +2 -0
- package/dist/runtime/icons/document/profile.vue +19 -0
- package/dist/runtime/icons/document/profile.vue.d.ts +2 -0
- package/dist/runtime/icons/download.vue +26 -0
- package/dist/runtime/icons/download.vue.d.ts +2 -0
- package/dist/runtime/icons/edit.vue +24 -0
- package/dist/runtime/icons/edit.vue.d.ts +2 -0
- package/dist/runtime/icons/file/excel.vue +88 -0
- package/dist/runtime/icons/file/excel.vue.d.ts +2 -0
- package/dist/runtime/icons/file/file.vue +19 -0
- package/dist/runtime/icons/file/file.vue.d.ts +2 -0
- package/dist/runtime/icons/file/files.vue +17 -0
- package/dist/runtime/icons/file/files.vue.d.ts +2 -0
- package/dist/runtime/icons/globe.vue +19 -0
- package/dist/runtime/icons/globe.vue.d.ts +2 -0
- package/dist/runtime/icons/handshake.vue +19 -0
- package/dist/runtime/icons/handshake.vue.d.ts +2 -0
- package/dist/runtime/icons/history.vue +19 -0
- package/dist/runtime/icons/history.vue.d.ts +2 -0
- package/dist/runtime/icons/info/info-circle.vue +29 -0
- package/dist/runtime/icons/info/info-circle.vue.d.ts +2 -0
- package/dist/runtime/icons/invoice.vue +35 -0
- package/dist/runtime/icons/invoice.vue.d.ts +2 -0
- package/dist/runtime/icons/link-chain.vue +31 -0
- package/dist/runtime/icons/link-chain.vue.d.ts +2 -0
- package/dist/runtime/icons/loader-circle.vue +41 -0
- package/dist/runtime/icons/loader-circle.vue.d.ts +2 -0
- package/dist/runtime/icons/lock.vue +19 -0
- package/dist/runtime/icons/lock.vue.d.ts +2 -0
- package/dist/runtime/icons/logo/adata.vue +48 -0
- package/dist/runtime/icons/logo/adata.vue.d.ts +2 -0
- package/dist/runtime/icons/logo/logo.vue +27 -0
- package/dist/runtime/icons/logo/logo.vue.d.ts +2 -0
- package/dist/runtime/icons/medal.vue +17 -0
- package/dist/runtime/icons/medal.vue.d.ts +2 -0
- package/dist/runtime/icons/menu/menu-filled.vue +61 -0
- package/dist/runtime/icons/menu/menu-filled.vue.d.ts +2 -0
- package/dist/runtime/icons/menu/menu.vue +41 -0
- package/dist/runtime/icons/menu/menu.vue.d.ts +2 -0
- package/dist/runtime/icons/message.vue +24 -0
- package/dist/runtime/icons/message.vue.d.ts +2 -0
- package/dist/runtime/icons/modals/door.vue +170 -0
- package/dist/runtime/icons/modals/door.vue.d.ts +2 -0
- package/dist/runtime/icons/moon.vue +10 -0
- package/dist/runtime/icons/moon.vue.d.ts +2 -0
- package/dist/runtime/icons/more.vue +36 -0
- package/dist/runtime/icons/more.vue.d.ts +2 -0
- package/dist/runtime/icons/navigation/expand-window.vue +19 -0
- package/dist/runtime/icons/navigation/expand-window.vue.d.ts +2 -0
- package/dist/runtime/icons/navigation/location.vue +25 -0
- package/dist/runtime/icons/navigation/location.vue.d.ts +2 -0
- package/dist/runtime/icons/navigation/logout.vue +19 -0
- package/dist/runtime/icons/navigation/logout.vue.d.ts +2 -0
- package/dist/runtime/icons/notifications.vue +25 -0
- package/dist/runtime/icons/notifications.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/arrow-square-down.vue +15 -0
- package/dist/runtime/icons/other-service/arrow-square-down.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/arrow-top-right-on-square.vue +6 -0
- package/dist/runtime/icons/other-service/arrow-top-right-on-square.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/block.vue +16 -0
- package/dist/runtime/icons/other-service/block.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/currency-dollar.vue +16 -0
- package/dist/runtime/icons/other-service/currency-dollar.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/globe.vue +16 -0
- package/dist/runtime/icons/other-service/globe.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/link.vue +7 -0
- package/dist/runtime/icons/other-service/link.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/magnifying-glass.vue +9 -0
- package/dist/runtime/icons/other-service/magnifying-glass.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/standing-scales.vue +15 -0
- package/dist/runtime/icons/other-service/standing-scales.vue.d.ts +2 -0
- package/dist/runtime/icons/other-service/users-three.vue +7 -0
- package/dist/runtime/icons/other-service/users-three.vue.d.ts +2 -0
- package/dist/runtime/icons/plus-circle.vue +24 -0
- package/dist/runtime/icons/plus-circle.vue.d.ts +2 -0
- package/dist/runtime/icons/plus.vue +24 -0
- package/dist/runtime/icons/plus.vue.d.ts +2 -0
- package/dist/runtime/icons/radio/radio-check.vue +24 -0
- package/dist/runtime/icons/radio/radio-check.vue.d.ts +2 -0
- package/dist/runtime/icons/radio/radio-empty.vue +20 -0
- package/dist/runtime/icons/radio/radio-empty.vue.d.ts +2 -0
- package/dist/runtime/icons/receipt/hcheck.vue +27 -0
- package/dist/runtime/icons/receipt/hcheck.vue.d.ts +2 -0
- package/dist/runtime/icons/receipt/receipt.vue +27 -0
- package/dist/runtime/icons/receipt/receipt.vue.d.ts +2 -0
- package/dist/runtime/icons/scale.vue +19 -0
- package/dist/runtime/icons/scale.vue.d.ts +2 -0
- package/dist/runtime/icons/search.vue +27 -0
- package/dist/runtime/icons/search.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/facebook.vue +15 -0
- package/dist/runtime/icons/socials/facebook.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/instagram.vue +19 -0
- package/dist/runtime/icons/socials/instagram.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/linkedin.vue +24 -0
- package/dist/runtime/icons/socials/linkedin.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/telegram.vue +15 -0
- package/dist/runtime/icons/socials/telegram.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/tik-tok.vue +15 -0
- package/dist/runtime/icons/socials/tik-tok.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/whatsapp.vue +21 -0
- package/dist/runtime/icons/socials/whatsapp.vue.d.ts +2 -0
- package/dist/runtime/icons/socials/youtube.vue +16 -0
- package/dist/runtime/icons/socials/youtube.vue.d.ts +2 -0
- package/dist/runtime/icons/sun.vue +14 -0
- package/dist/runtime/icons/sun.vue.d.ts +2 -0
- package/dist/runtime/icons/sviazi.vue +19 -0
- package/dist/runtime/icons/sviazi.vue.d.ts +2 -0
- package/dist/runtime/icons/tenge.vue +22 -0
- package/dist/runtime/icons/tenge.vue.d.ts +2 -0
- package/dist/runtime/icons/trash.vue +24 -0
- package/dist/runtime/icons/trash.vue.d.ts +2 -0
- package/dist/runtime/icons/upload.vue +26 -0
- package/dist/runtime/icons/upload.vue.d.ts +2 -0
- package/dist/runtime/icons/user.vue +30 -0
- package/dist/runtime/icons/user.vue.d.ts +2 -0
- package/dist/runtime/icons/users/users-three.vue +17 -0
- package/dist/runtime/icons/users/users-three.vue.d.ts +2 -0
- package/dist/runtime/icons/users/users.vue +31 -0
- package/dist/runtime/icons/users/users.vue.d.ts +2 -0
- package/dist/runtime/icons/warning-triangle.vue +29 -0
- package/dist/runtime/icons/warning-triangle.vue.d.ts +2 -0
- package/dist/runtime/icons/work-bag.vue +20 -0
- package/dist/runtime/icons/work-bag.vue.d.ts +2 -0
- package/dist/runtime/icons/x-mark.vue +18 -0
- package/dist/runtime/icons/x-mark.vue.d.ts +2 -0
- package/dist/runtime/lang/en.d.ts +4 -0
- package/dist/runtime/lang/en.js +545 -0
- package/dist/runtime/lang/kk.d.ts +4 -0
- package/dist/runtime/lang/kk.js +545 -0
- package/dist/runtime/lang/ru.d.ts +575 -0
- package/dist/runtime/lang/ru.js +607 -0
- package/dist/runtime/shared/constants/pages.d.ts +71 -0
- package/dist/runtime/shared/constants/pages.js +71 -0
- package/package.json +66 -58
- package/dist/runtime/components/header/TheHeader.vue +0 -15
- package/dist/runtime/components/header/TheHeader.vue.d.ts +0 -2
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -4
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { twJoin, twMerge } from "tailwind-merge";
|
|
3
|
+
import { NuxtLink } from "#components";
|
|
4
|
+
import { computed } from "#imports";
|
|
5
|
+
defineOptions({ name: "AButton" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
variant: { type: String, required: false, default: "primary" },
|
|
8
|
+
view: { type: String, required: false, default: "default" },
|
|
9
|
+
size: { type: String, required: false, default: "lg" },
|
|
10
|
+
form: { type: String, required: false, default: "button" },
|
|
11
|
+
icon: { type: null, required: false },
|
|
12
|
+
iconClass: { type: String, required: false, default: "" },
|
|
13
|
+
loading: { type: Boolean, required: false, default: false },
|
|
14
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
15
|
+
block: { type: Boolean, required: false, default: false },
|
|
16
|
+
active: { type: Boolean, required: false, default: false },
|
|
17
|
+
to: { type: String, required: false, default: "" }
|
|
18
|
+
});
|
|
19
|
+
const classes = computed(() => [
|
|
20
|
+
"body-600 rounded-md cursor-pointer outline-none transition duration-200 select-none",
|
|
21
|
+
props.block ? "w-full" : "",
|
|
22
|
+
typeSwitchValues[props.view][props.variant],
|
|
23
|
+
sizeSwitchValues[props.form][props.size]
|
|
24
|
+
]);
|
|
25
|
+
const disabledClasses = computed(() => [
|
|
26
|
+
"body-600 rounded-md outline-none transition duration-200 select-none",
|
|
27
|
+
props.block ? "w-full" : "",
|
|
28
|
+
disabledTypeSwitchValues[props.view],
|
|
29
|
+
sizeSwitchValues[props.form][props.size]
|
|
30
|
+
]);
|
|
31
|
+
const typeSwitchActiveValues = {
|
|
32
|
+
default: {
|
|
33
|
+
primary: "bg-deepblue-900 text-white dark:bg-gray-200",
|
|
34
|
+
success: "bg-deepblue-900 text-white dark:bg-gray-200",
|
|
35
|
+
danger: "bg-deepblue-900 text-white dark:bg-gray-200 ",
|
|
36
|
+
gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
|
|
37
|
+
ghost: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200"
|
|
38
|
+
},
|
|
39
|
+
transparent: {
|
|
40
|
+
primary: "bg-blue-700 text-white dark:bg-blue-500 dark:text-gray-900",
|
|
41
|
+
success: "bg-green-500 text-white dark:bg-green-400 dark:text-gray-900",
|
|
42
|
+
danger: "bg-red-500 text-white dark:bg-red-400 dark:text-gray-900",
|
|
43
|
+
gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
|
|
44
|
+
ghost: "bg-white text-deepblue-900 dark:bg-gray-900 dark:text-gray-200 hover:text-deepblue-900 dark:hover:text-gray-200"
|
|
45
|
+
},
|
|
46
|
+
outline: {
|
|
47
|
+
primary: "bg-blue-700 text-white dark:bg-blue-500 dark:text-gray-900",
|
|
48
|
+
success: "bg-green-500 text-white dark:bg-green-400 dark:text-gray-900",
|
|
49
|
+
danger: "bg-red-500 text-white dark:bg-red-400 dark:text-gray-900",
|
|
50
|
+
gray: "bg-deepblue-900 text-white dark:bg-gray-200 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200",
|
|
51
|
+
ghost: "bg-gray-500 text-white dark:bg-gray-500 dark:text-gray-900 hover:text-deepblue-900 dark:hover:text-gray-200"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const typeSwitchValues = {
|
|
55
|
+
default: {
|
|
56
|
+
primary: "bg-blue-700 text-white hover:bg-blue-900 active:bg-deepblue-900 active:text-white dark:bg-blue-500 dark:text-gray-900 dark:hover:bg-blue-700 dark:active:bg-gray-200",
|
|
57
|
+
success: "bg-green-500 text-white hover:bg-green-900 active:bg-deepblue-900 active:text-white dark:bg-green dark:text-gray-900 dark:hover:bg-green-300 dark:active:bg-gray-200",
|
|
58
|
+
danger: "bg-red-500 text-white hover:bg-red-700 active:bg-deepblue-900 active:text-white dark:bg-red-400 dark:text-gray-900 dark:hover:bg-red-300 dark:active:bg-gray-200",
|
|
59
|
+
gray: "bg-deepblue-900/5 text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:bg-gray-200/5 dark:hover:bg-gray-200/10 dark:active:bg-gray-200 dark:text-gray-200 dark:active:text-gray-900",
|
|
60
|
+
ghost: "bg-white text-deepblue-900 hover:bg-deepblue-900/5 active:bg-deepblue-900 active:text-white dark:bg-gray-900 dark:text-gray-200 dark:bg-gray-900 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900"
|
|
61
|
+
},
|
|
62
|
+
transparent: {
|
|
63
|
+
primary: "text-blue-700 hover:bg-blue-100 active:bg-blue-700 active:text-white dark:text-blue-500 dark:hover:bg-blue-500/20 dark:active:bg-blue-500 dark:active:text-gray-900",
|
|
64
|
+
success: "text-green-500 hover:bg-green-500/20 active:bg-green-500 active:text-white dark:text-green-400 dark:hover:bg-green-400/20 dark:active:bg-green-400 dark:active:text-gray-900",
|
|
65
|
+
danger: "text-red-500 hover:bg-red-500/20 active:bg-red-500 active:text-white dark:text-red-400 dark:hover:bg-red-400/20 dark:active:bg-red-400 dark:active:text-gray-900",
|
|
66
|
+
gray: "text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900",
|
|
67
|
+
ghost: "text-white hover:bg-deepblue-900/10 active:bg-white active:text-deepblue-900 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-900 dark:active:text-gray-200"
|
|
68
|
+
},
|
|
69
|
+
outline: {
|
|
70
|
+
primary: "border border-blue-700 text-blue-700 hover:bg-blue-100 active:bg-blue-700 active:text-white dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500/20 dark:active:bg-blue-500 dark:active:text-gray-900",
|
|
71
|
+
success: "border border-green-500 text-green-500 hover:bg-green-500/20 active:bg-green-500 active:text-white dark:border-green-400 dark:text-green-400 dark:hover:bg-green-400/20 dark:active:bg-green-400 dark:active:text-gray-900",
|
|
72
|
+
danger: "border border-red-500 text-red-500 hover:bg-red-500/20 active:bg-red-500 active:text-white dark:text-red-400 dark:border-red-400 dark:hover:bg-red-400/20 dark:active:bg-red-400 dark:active:text-gray-900",
|
|
73
|
+
gray: "border border-gray-500/50 text-deepblue-900 hover:bg-deepblue-900/10 active:bg-deepblue-900 active:text-white dark:border-gray-500/50 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-200 dark:active:text-gray-900",
|
|
74
|
+
ghost: "border border-white text-white hover:bg-deepblue-900 active:bg-gray-500 active:text-white dark:border-gray-200 dark:text-gray-200 dark:hover:bg-gray-200/5 dark:active:bg-gray-500 dark:active:text-gray-900"
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const disabledTypeSwitchValues = {
|
|
78
|
+
default: "bg-deepblue-900/5 text-deepblue-900/20 dark:bg-gray-200/5 dark:text-gray-200/20 pointer-events-none",
|
|
79
|
+
transparent: "text-gray-500/50 pointer-events-none",
|
|
80
|
+
outline: "border border-gray-500/50 text-gray-500/50 pointer-events-none"
|
|
81
|
+
};
|
|
82
|
+
const sizeSwitchValues = {
|
|
83
|
+
icon: {
|
|
84
|
+
sm: "p-1 text-base",
|
|
85
|
+
md: "p-2 text-base",
|
|
86
|
+
lg: "p-2 text-2xl",
|
|
87
|
+
xl: "p-4 text-3xl"
|
|
88
|
+
},
|
|
89
|
+
button: {
|
|
90
|
+
sm: "px-4 py-1.5 leading-4 !h-[28px]",
|
|
91
|
+
md: "px-4 py-1.5 !h-[32px]",
|
|
92
|
+
lg: "px-4 py-2.5",
|
|
93
|
+
xl: "px-8 py-2.5"
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const buttonClasses = computed(
|
|
97
|
+
() => twMerge(
|
|
98
|
+
twJoin(
|
|
99
|
+
props.disabled ? disabledClasses.value : classes.value,
|
|
100
|
+
props.active ? typeSwitchActiveValues[props.view][props.variant] : "",
|
|
101
|
+
props.to ? "inline-block" : ""
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<template>
|
|
108
|
+
<component
|
|
109
|
+
:is="to ? NuxtLink : 'button'"
|
|
110
|
+
:class="[buttonClasses, 'relative h-fit transition flex items-center justify-center']"
|
|
111
|
+
:disabled="disabled"
|
|
112
|
+
:to="to"
|
|
113
|
+
>
|
|
114
|
+
<span
|
|
115
|
+
:class="[
|
|
116
|
+
{ 'opacity-0': loading },
|
|
117
|
+
'flex items-center justify-center gap-2 whitespace-nowrap'
|
|
118
|
+
]"
|
|
119
|
+
>
|
|
120
|
+
<component
|
|
121
|
+
:is="icon"
|
|
122
|
+
:class="[`${iconClass}`]"
|
|
123
|
+
/>
|
|
124
|
+
<slot />
|
|
125
|
+
</span>
|
|
126
|
+
<span
|
|
127
|
+
v-if="loading"
|
|
128
|
+
class="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center"
|
|
129
|
+
>
|
|
130
|
+
<i-loader-circle class="animate-spin" />
|
|
131
|
+
</span>
|
|
132
|
+
</component>
|
|
133
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
interface Props {
|
|
3
|
+
variant?: 'primary' | 'success' | 'danger' | 'gray' | 'ghost';
|
|
4
|
+
view?: 'default' | 'outline' | 'transparent';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
form?: 'icon' | 'button';
|
|
7
|
+
icon?: Component;
|
|
8
|
+
iconClass?: string;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
block?: boolean;
|
|
12
|
+
active?: boolean;
|
|
13
|
+
to?: string;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_10: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_10) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
20
|
+
size: "sm" | "md" | "lg" | "xl";
|
|
21
|
+
view: "default" | "outline" | "transparent";
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
active: boolean;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
variant: "primary" | "success" | "danger" | "gray" | "ghost";
|
|
26
|
+
form: "icon" | "button";
|
|
27
|
+
iconClass: string;
|
|
28
|
+
block: boolean;
|
|
29
|
+
to: string;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type TypeSwitchValues = {
|
|
2
|
+
[key in 'primary' | 'success' | 'danger' | 'gray' | 'ghost']: string;
|
|
3
|
+
};
|
|
4
|
+
export type ViewSwitchValues = {
|
|
5
|
+
default: TypeSwitchValues;
|
|
6
|
+
transparent: TypeSwitchValues;
|
|
7
|
+
outline: TypeSwitchValues;
|
|
8
|
+
};
|
|
9
|
+
export type SizeSwitchValues = {
|
|
10
|
+
icon: {
|
|
11
|
+
[key in 'sm' | 'md' | 'lg' | 'xl']: string;
|
|
12
|
+
};
|
|
13
|
+
button: {
|
|
14
|
+
[key in 'sm' | 'md' | 'lg' | 'xl']: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type DisabledViewSwitchValues = {
|
|
18
|
+
default: string;
|
|
19
|
+
transparent: string;
|
|
20
|
+
outline: string;
|
|
21
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import { useSlots, computed } from "#imports";
|
|
4
|
+
defineOptions({ name: "ACheckbox" });
|
|
5
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
size: { type: String, required: false, default: "sm" },
|
|
8
|
+
name: { type: String, required: false, default: "check" },
|
|
9
|
+
modelValue: { type: [String, Number, Array, Object, Boolean, null], required: true, default: () => [] },
|
|
10
|
+
value: { type: [String, Number, Object, null], required: false, default: null },
|
|
11
|
+
intermediate: { type: Boolean, required: false },
|
|
12
|
+
disabled: { type: Boolean, required: false },
|
|
13
|
+
side: { type: [String, null], required: false, default: "left" },
|
|
14
|
+
masterControl: { type: Boolean, required: false, default: false },
|
|
15
|
+
emptyCheckboxClass: { type: String, required: false, default: "" },
|
|
16
|
+
intermediateCheckboxClass: { type: String, required: false, default: "" },
|
|
17
|
+
alwaysIntermediate: { type: Boolean, required: false, default: false },
|
|
18
|
+
checkboxClass: { type: String, required: false, default: "" },
|
|
19
|
+
labelClass: { type: String, required: false, default: "" },
|
|
20
|
+
viewType: { type: String, required: false, default: "checkbox" }
|
|
21
|
+
});
|
|
22
|
+
const slots = useSlots();
|
|
23
|
+
const isChecked = computed(() => {
|
|
24
|
+
if (props.modelValue instanceof Array) {
|
|
25
|
+
return props.modelValue.includes(props.value);
|
|
26
|
+
}
|
|
27
|
+
return props.modelValue === true;
|
|
28
|
+
});
|
|
29
|
+
const isIntermediate = computed(() => {
|
|
30
|
+
if (props.alwaysIntermediate) {
|
|
31
|
+
return props.intermediate;
|
|
32
|
+
} else {
|
|
33
|
+
return isChecked.value && props.intermediate;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const updateInput = (e) => {
|
|
37
|
+
const isChecked2 = e.target.checked;
|
|
38
|
+
if (props.masterControl) {
|
|
39
|
+
emit("update:modelValue", isChecked2);
|
|
40
|
+
} else if (props.modelValue instanceof Array) {
|
|
41
|
+
const newValue = [...props.modelValue];
|
|
42
|
+
if (isChecked2) {
|
|
43
|
+
newValue.push(props.value);
|
|
44
|
+
} else {
|
|
45
|
+
newValue.splice(newValue.indexOf(props.value), 1);
|
|
46
|
+
}
|
|
47
|
+
emit("update:modelValue", newValue);
|
|
48
|
+
} else {
|
|
49
|
+
emit("update:modelValue", !!isChecked2);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const sizeOptions = {
|
|
53
|
+
lg: "min-w-6 min-h-6 max-w-6 max-h-6",
|
|
54
|
+
sm: "min-w-4 min-h-4 max-w-4 max-h-4"
|
|
55
|
+
};
|
|
56
|
+
const textSizeOptions = {
|
|
57
|
+
lg: "text-sm gap-2.5",
|
|
58
|
+
sm: "text-xs gap-2"
|
|
59
|
+
};
|
|
60
|
+
const hasSlotContent = computed(() => {
|
|
61
|
+
return !!slots.default?.().length;
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<div
|
|
67
|
+
class="flex items-center"
|
|
68
|
+
:class="[disabled ? 'opacity-20' : '']"
|
|
69
|
+
>
|
|
70
|
+
<input
|
|
71
|
+
:id="name"
|
|
72
|
+
type="checkbox"
|
|
73
|
+
class="hidden"
|
|
74
|
+
:checked="isChecked"
|
|
75
|
+
:disabled="disabled"
|
|
76
|
+
:value="value"
|
|
77
|
+
@change="updateInput"
|
|
78
|
+
>
|
|
79
|
+
<label
|
|
80
|
+
v-if="viewType === 'checkbox'"
|
|
81
|
+
:for="name"
|
|
82
|
+
class="flex items-center text-deepblue-900 dark:text-gray-200"
|
|
83
|
+
:class="twMerge(textSizeOptions[size], disabled ? 'cursor-default' : 'cursor-pointer', labelClass)"
|
|
84
|
+
>
|
|
85
|
+
<span
|
|
86
|
+
v-if="side === 'left' && hasSlotContent"
|
|
87
|
+
class="select-none"
|
|
88
|
+
>
|
|
89
|
+
<slot />
|
|
90
|
+
</span>
|
|
91
|
+
<span :class="[sizeOptions[size]]">
|
|
92
|
+
<i-checkbox-intermediate
|
|
93
|
+
v-if="isIntermediate"
|
|
94
|
+
class="w-full h-full"
|
|
95
|
+
:class="twMerge('text-blue-700 dark:text-blue-500', intermediateCheckboxClass)"
|
|
96
|
+
/>
|
|
97
|
+
<i-checkbox-active
|
|
98
|
+
v-else-if="isChecked"
|
|
99
|
+
class="w-full h-full"
|
|
100
|
+
:class="twMerge('text-blue-700 dark:text-blue-500', checkboxClass)"
|
|
101
|
+
/>
|
|
102
|
+
<i-checkbox-empty
|
|
103
|
+
v-else
|
|
104
|
+
class="w-full h-full"
|
|
105
|
+
:class="twMerge('text-deepblue-900 dark:text-gray-200', emptyCheckboxClass)"
|
|
106
|
+
/>
|
|
107
|
+
</span>
|
|
108
|
+
<span
|
|
109
|
+
v-if="side === 'right' && hasSlotContent"
|
|
110
|
+
class="select-none"
|
|
111
|
+
>
|
|
112
|
+
<slot />
|
|
113
|
+
</span>
|
|
114
|
+
</label>
|
|
115
|
+
<label
|
|
116
|
+
v-else-if="viewType === 'chip'"
|
|
117
|
+
:for="name"
|
|
118
|
+
class="px-[10px] py-[3.5px] text-deepblue-900 border border-gray-500 rounded-full dark:text-gray-200 text-xs"
|
|
119
|
+
:class="[{ 'bg-blue-700 text-white dark:bg-blue-500 dark:border-blue-500 dark:text-gray-900 font-medium': isChecked }]"
|
|
120
|
+
>
|
|
121
|
+
<slot />
|
|
122
|
+
</label>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
size?: 'lg' | 'sm';
|
|
3
|
+
name?: string;
|
|
4
|
+
modelValue: string | number | Array<any> | object | boolean | null;
|
|
5
|
+
value?: string | number | object | null;
|
|
6
|
+
intermediate?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
side?: 'right' | 'left' | null;
|
|
9
|
+
masterControl?: boolean;
|
|
10
|
+
emptyCheckboxClass?: string;
|
|
11
|
+
intermediateCheckboxClass?: string;
|
|
12
|
+
alwaysIntermediate?: boolean;
|
|
13
|
+
checkboxClass?: string;
|
|
14
|
+
labelClass?: string;
|
|
15
|
+
viewType?: 'checkbox' | 'chip';
|
|
16
|
+
}
|
|
17
|
+
declare var __VLS_1: {}, __VLS_15: {}, __VLS_17: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_1) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_15) => any;
|
|
22
|
+
} & {
|
|
23
|
+
default?: (props: typeof __VLS_17) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
26
|
+
name: string;
|
|
27
|
+
size: "lg" | "sm";
|
|
28
|
+
modelValue: string | number | Array<any> | object | boolean | null;
|
|
29
|
+
value: string | number | object | null;
|
|
30
|
+
side: "right" | "left" | null;
|
|
31
|
+
masterControl: boolean;
|
|
32
|
+
emptyCheckboxClass: string;
|
|
33
|
+
intermediateCheckboxClass: string;
|
|
34
|
+
alwaysIntermediate: boolean;
|
|
35
|
+
checkboxClass: string;
|
|
36
|
+
labelClass: string;
|
|
37
|
+
viewType: "checkbox" | "chip";
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import VueDatePicker from "@vuepic/vue-datepicker";
|
|
3
|
+
import "@vuepic/vue-datepicker/dist/main.css";
|
|
4
|
+
import { kk, ru, enUS } from "date-fns/locale";
|
|
5
|
+
import { nextTick, ref, useI18n, computed } from "#imports";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
placeholder: { type: String, required: false },
|
|
8
|
+
yearPicker: { type: Boolean, required: false },
|
|
9
|
+
menuTitle: { type: String, required: false },
|
|
10
|
+
format: { type: String, required: false }
|
|
11
|
+
});
|
|
12
|
+
const { t, locale } = useI18n();
|
|
13
|
+
const date = defineModel({ type: [Date, null], ...{ default: null } });
|
|
14
|
+
const datePicker = ref();
|
|
15
|
+
function closeDatePicker() {
|
|
16
|
+
datePicker.value?.closeMenu();
|
|
17
|
+
}
|
|
18
|
+
const currentLocale = computed(() => {
|
|
19
|
+
if (locale.value === "en") return enUS;
|
|
20
|
+
if (locale.value === "kk") return kk;
|
|
21
|
+
return ru;
|
|
22
|
+
});
|
|
23
|
+
function menuOpened() {
|
|
24
|
+
nextTick(() => {
|
|
25
|
+
const menu = document.querySelector(".dp__menu");
|
|
26
|
+
menu?.classList.remove("dp__theme_light");
|
|
27
|
+
menu?.classList.add("date-picker-menu-shadow");
|
|
28
|
+
const topArrow = document.querySelector(".dp__arrow_top");
|
|
29
|
+
const bottomArrow = document.querySelector(".dp__arrow_bottom");
|
|
30
|
+
topArrow?.remove();
|
|
31
|
+
bottomArrow?.remove();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<vue-date-picker
|
|
38
|
+
ref="datePicker"
|
|
39
|
+
v-model="date"
|
|
40
|
+
v-bind="$attrs"
|
|
41
|
+
:enable-time-picker="false"
|
|
42
|
+
:format="format"
|
|
43
|
+
:format-locale="currentLocale"
|
|
44
|
+
:placeholder="placeholder || t('reuse.date')"
|
|
45
|
+
:year-picker="yearPicker"
|
|
46
|
+
:ui="{
|
|
47
|
+
navBtnNext: 'hidden',
|
|
48
|
+
navBtnPrev: 'hidden',
|
|
49
|
+
menu: 'p-2'
|
|
50
|
+
}"
|
|
51
|
+
model-type="format"
|
|
52
|
+
class="custom-date-picker"
|
|
53
|
+
auto-apply
|
|
54
|
+
@open="menuOpened"
|
|
55
|
+
>
|
|
56
|
+
<template #top-extra>
|
|
57
|
+
<div
|
|
58
|
+
class="flex items-center justify-between"
|
|
59
|
+
:class="{ 'mb-2': yearPicker }"
|
|
60
|
+
>
|
|
61
|
+
<p class="text-base font-semibold">
|
|
62
|
+
{{ menuTitle || t("reuse.selectDate") }}
|
|
63
|
+
</p>
|
|
64
|
+
<i-x-mark
|
|
65
|
+
class="cursor-pointer size-6 shrink-0"
|
|
66
|
+
@click="closeDatePicker"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
<template #calendar-header="{ index, day }">
|
|
71
|
+
<p class="text-gray-600 dark:text-gray-200 text-sm font-normal">
|
|
72
|
+
{{ day }}
|
|
73
|
+
</p>
|
|
74
|
+
</template>
|
|
75
|
+
<template #action-row />
|
|
76
|
+
<template #action-preview />
|
|
77
|
+
<template #action-buttons />
|
|
78
|
+
</vue-date-picker>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style>
|
|
82
|
+
.custom-date-picker {
|
|
83
|
+
--dp-border-radius: 8px;
|
|
84
|
+
--dp-background-color: white;
|
|
85
|
+
--dp-menu-border-color: white;
|
|
86
|
+
--dp-border-color: white;
|
|
87
|
+
--dp-text-color: #2C3E50;
|
|
88
|
+
--dp-primary-color: #0070EB;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.date-picker-menu-shadow {
|
|
92
|
+
box-shadow: 0px 1px 8px 0px rgba(139, 146, 156, 0.3019607843);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dark .custom-date-picker {
|
|
96
|
+
--dp-background-color: #26282B;
|
|
97
|
+
--dp-menu-border-color: #26282B;
|
|
98
|
+
--dp-border-color: #26282B;
|
|
99
|
+
--dp-text-color: #e3e5e8;
|
|
100
|
+
--dp-primary-color: #1B98E2;
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
yearPicker?: boolean;
|
|
5
|
+
menuTitle?: string;
|
|
6
|
+
format?: string;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
9
|
+
modelValue?: Date | null;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: Date | null) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: Date | null) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
value: { type: String, required: false },
|
|
5
|
+
labelClasses: { type: String, required: false }
|
|
6
|
+
});
|
|
7
|
+
const combinedClasses = twMerge(`
|
|
8
|
+
pointer-events-none absolute
|
|
9
|
+
left-8 top-0 text-[10px] ps-1.5
|
|
10
|
+
transition-all
|
|
11
|
+
peer-focus:top-0 peer-focus:pt-0 peer-focus:text-[10px]
|
|
12
|
+
peer-placeholder-shown:text-sm peer-placeholder-shown:top-1.5 peer-placeholder-shown:pt-0.5
|
|
13
|
+
`, props.labelClasses);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<label :class="combinedClasses">
|
|
18
|
+
<slot>
|
|
19
|
+
<span class="text-gray-500 leading-4">{{ value }}</span>
|
|
20
|
+
</slot>
|
|
21
|
+
</label>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value?: string;
|
|
3
|
+
labelClasses?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|