adata-ui 4.0.50 → 4.0.52

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.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "4.0.50",
8
+ "version": "4.0.52",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -6,20 +6,11 @@ import { nextTick, ref, useI18n, computed } from "#imports";
6
6
  const props = defineProps({
7
7
  placeholder: { type: String, required: false },
8
8
  yearPicker: { type: Boolean, required: false },
9
- menuTitle: { type: String, required: false }
9
+ menuTitle: { type: String, required: false },
10
+ format: { type: String, required: false }
10
11
  });
11
12
  const { t, locale } = useI18n();
12
13
  const date = defineModel({ type: [Date, null], ...{ default: null } });
13
- function format(date2) {
14
- if (props.yearPicker) {
15
- return date2.getFullYear().toString();
16
- } else {
17
- const day = date2.getDate().toString().padStart(2, "0");
18
- const month = (date2.getMonth() + 1).toString().padStart(2, "0");
19
- const year = date2.getFullYear();
20
- return `${day}/${month}/${year}`;
21
- }
22
- }
23
14
  const datePicker = ref();
24
15
  function closeDatePicker() {
25
16
  datePicker.value?.closeMenu();
@@ -29,15 +20,6 @@ const currentLocale = computed(() => {
29
20
  if (locale.value === "kk") return kk;
30
21
  return ru;
31
22
  });
32
- function selectDate(data) {
33
- if (props.yearPicker) return;
34
- date.value = data;
35
- }
36
- function selectYear(data) {
37
- if (props.yearPicker) {
38
- date.value = data.year;
39
- }
40
- }
41
23
  function menuOpened() {
42
24
  nextTick(() => {
43
25
  const menu = document.querySelector(".dp__menu");
@@ -55,6 +37,7 @@ function menuOpened() {
55
37
  <vue-date-picker
56
38
  ref="datePicker"
57
39
  v-model="date"
40
+ v-bind="$attrs"
58
41
  :enable-time-picker="false"
59
42
  :format="format"
60
43
  :format-locale="currentLocale"
@@ -65,10 +48,10 @@ function menuOpened() {
65
48
  navBtnPrev: 'hidden',
66
49
  menu: 'p-2'
67
50
  }"
51
+ model-type="format"
68
52
  class="custom-date-picker"
53
+ auto-apply
69
54
  @open="menuOpened"
70
- @date-update="selectDate"
71
- @update-month-year="selectYear"
72
55
  >
73
56
  <template #top-extra>
74
57
  <div
@@ -3,6 +3,7 @@ type __VLS_Props = {
3
3
  placeholder?: string;
4
4
  yearPicker?: boolean;
5
5
  menuTitle?: string;
6
+ format?: string;
6
7
  };
7
8
  type __VLS_PublicProps = __VLS_Props & {
8
9
  modelValue?: Date | null;
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <svg
7
+ width="17"
8
+ height="16"
9
+ viewBox="0 0 17 16"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <path
14
+ fill-rule="evenodd"
15
+ clip-rule="evenodd"
16
+ d="M13.1278 2.05C12.9541 2.05 12.7822 2.0842 12.6218 2.15065C12.4613 2.2171 12.3156 2.3145 12.1928 2.43728L3.47449 11.1556L2.77325 13.7268L5.34444 13.0255L14.0627 4.30723C14.1855 4.18445 14.2829 4.03868 14.3494 3.87826C14.4158 3.71784 14.45 3.5459 14.45 3.37226C14.45 3.19861 14.4158 3.02667 14.3494 2.86625C14.2829 2.70583 14.1855 2.56006 14.0627 2.43728C13.94 2.3145 13.7942 2.2171 13.6338 2.15065C13.4734 2.0842 13.3014 2.05 13.1278 2.05ZM12.22 1.18058C12.5078 1.06136 12.8162 1 13.1278 1C13.4393 1 13.7478 1.06136 14.0356 1.18058C14.3234 1.29979 14.5849 1.47453 14.8052 1.69482C15.0255 1.9151 15.2002 2.17662 15.3195 2.46443C15.4387 2.75225 15.5 3.06073 15.5 3.37226C15.5 3.68378 15.4387 3.99226 15.3195 4.28008C15.2002 4.5679 15.0255 4.82941 14.8052 5.0497L5.98831 13.8666C5.92371 13.9312 5.84336 13.9778 5.75522 14.0019L2.16315 14.9815C1.98139 15.0311 1.787 14.9795 1.65378 14.8463C1.52056 14.713 1.46894 14.5186 1.51851 14.3369L2.49817 10.7448C2.52221 10.6567 2.56883 10.5763 2.63344 10.5117L11.4503 1.69482C11.6706 1.47453 11.9321 1.29979 12.22 1.18058Z"
17
+ fill="currentColor"
18
+ />
19
+ </svg>
20
+ </template>
21
+
22
+ <style scoped>
23
+
24
+ </style>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <svg
7
+ width="9"
8
+ height="12"
9
+ viewBox="0 0 9 12"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <path
14
+ d="M0.703125 4.40625V3.19531H8.3125V4.40625H5.24219V12H3.77344V4.40625H0.703125ZM8.3125 0.625V1.74219H0.703125V0.625H8.3125Z"
15
+ fill="currentColor"
16
+ />
17
+ </svg>
18
+ </template>
19
+
20
+ <style scoped>
21
+
22
+ </style>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,30 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <svg
7
+ width="21"
8
+ height="20"
9
+ viewBox="0 0 21 20"
10
+ fill="none"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ >
13
+ <path
14
+ fill-rule="evenodd"
15
+ clip-rule="evenodd"
16
+ d="M4.20993 13.131C4.96962 12.3713 5.99999 11.9445 7.07436 11.9445H13.9262C15.0006 11.9445 16.031 12.3713 16.7907 13.131C17.5503 13.8907 17.9771 14.9211 17.9771 15.9954V17.7084C17.9771 18.0536 17.6973 18.3334 17.3521 18.3334C17.007 18.3334 16.7271 18.0536 16.7271 17.7084V15.9954C16.7271 15.2526 16.432 14.5402 15.9068 14.0149C15.3815 13.4896 14.6691 13.1945 13.9262 13.1945H7.07436C6.33151 13.1945 5.61909 13.4896 5.09381 14.0149C4.56853 14.5402 4.27344 15.2526 4.27344 15.9954V17.7084C4.27344 18.0536 3.99362 18.3334 3.64844 18.3334C3.30326 18.3334 3.02344 18.0536 3.02344 17.7084V15.9954C3.02344 14.9211 3.45023 13.8907 4.20993 13.131Z"
17
+ fill="currentColor"
18
+ />
19
+ <path
20
+ fill-rule="evenodd"
21
+ clip-rule="evenodd"
22
+ d="M10.5003 2.91675C8.95338 2.91675 7.69937 4.17077 7.69937 5.71767C7.69937 7.26458 8.95338 8.5186 10.5003 8.5186C12.0472 8.5186 13.3012 7.26458 13.3012 5.71767C13.3012 4.17077 12.0472 2.91675 10.5003 2.91675ZM6.44937 5.71767C6.44937 3.48041 8.26303 1.66675 10.5003 1.66675C12.7376 1.66675 14.5512 3.48041 14.5512 5.71767C14.5512 7.95494 12.7376 9.7686 10.5003 9.7686C8.26303 9.7686 6.44937 7.95494 6.44937 5.71767Z"
23
+ fill="currentColor"
24
+ />
25
+ </svg>
26
+ </template>
27
+
28
+ <style scoped>
29
+
30
+ </style>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "4.0.50",
3
+ "version": "4.0.52",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",