edvoyui-component-library-test-flight 0.0.42 → 0.0.44

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.42",
4
+ "version": "0.0.44",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -1,28 +1,25 @@
1
1
  <template>
2
- <h1 class="my-10 text-2xl font-bold text-center text-gray-900 underline underline-offset-2 decoration-green-400 decoration-wavy">
2
+ <h1 class="my-10 text-2xl font-bold text-center text-gray-900 underline underline-offset-8 decoration-green-400 decoration-wavy">
3
3
  Edvoy User Interface
4
4
  </h1>
5
-
6
- <UTableview />
7
5
  </template>
8
6
  <script setup lang="ts">
9
- import UTableview from './table/UTableview.vue';
10
-
11
-
12
7
  </script>
13
8
  <style lang="scss"></style>
14
9
 
15
10
  <!-- Development code here -->
16
- <!-- <template>
11
+ <!-- <template>
17
12
  <div class="h-[clac(100svh-64px)] w-full px-10 py-8 max-w-screen-xl mx-auto">
18
13
  <h1 class="mb-2 font-semibold text-gray-900 tetx-lg">Edvoy UI Componnet</h1>
14
+ <Delete />
15
+ <UTableview />
19
16
  <div class="">
20
17
  <pre class="text-[0.5rem] p-2 rounded-lg max-h-72 overflow-y-auto text-red-600 border border-gray-100">
21
18
  {{ `Total Row:${selectedRows.length}` }}
22
19
  {{ selectedRows.map(x => x?._id)}}
23
20
  </pre>
24
21
 
25
- <div class="py-4">
22
+ <div class="py-4">
26
23
  <EUITable
27
24
  :checkable="true"
28
25
  :table-loading="loading"
@@ -59,7 +56,6 @@ import UTableview from './table/UTableview.vue';
59
56
  </EUITable>
60
57
  </div>
61
58
  </div>
62
- <Delete />
63
59
  <div class="grid gap-4 sm:grid-cols-2 place-items-start">
64
60
  <div
65
61
  class="w-full max-w-screen-xl col-span-2 p-4 bg-white border border-gray-200 border-solid rounded-lg hover:ring-2 ring-purple-500 ring-offset-1"
@@ -947,6 +943,8 @@ import { capitalizeText } from "../utils/lodash";
947
943
  import ChevronDownStroke from '../assets/svg/ChevronDownStroke.vue';
948
944
  import EUIMultiDropdown from './dropdown/EUIMultiDropdown.vue';
949
945
  import Delete from "./delete.vue";
946
+ import UTableview from './table/UTableview.vue';
947
+
950
948
  const mobileNumber = ref("+91 8667444951");
951
949
  const datepicker = ref(new Date());
952
950
  const loading = ref(false)
@@ -52,6 +52,24 @@ const meta = {
52
52
  control: "boolean",
53
53
  description: "Allows time selection in addition to the date if true.",
54
54
  },
55
+ maxDate: {
56
+ control: "date",
57
+ description:
58
+ "The maximum selectable date. ex: const maxDate = ref(new Date())",
59
+ table: {
60
+ type: { summary: "Date" },
61
+ defaultValue: { summary: '""' },
62
+ },
63
+ },
64
+ minDate: {
65
+ control: "date",
66
+ description:
67
+ "The minimum selectable date. ex: const minDate = ref(new Date(2024, 11))",
68
+ table: {
69
+ type: { summary: "Date" },
70
+ defaultValue: { summary: '""' },
71
+ },
72
+ },
55
73
  required: {
56
74
  control: "boolean",
57
75
  description: "Marks the datepicker as a required field.",
@@ -438,6 +456,24 @@ export const DatepickerDiasabled: Story = {
438
456
  }),
439
457
  };
440
458
 
459
+ export const DatepickerMinMax: Story = {
460
+ args: {
461
+ placeholder: "Select your date",
462
+ modelValue: new Date(),
463
+ minDate: ref(new Date(2024, 11)),
464
+ maxDate: ref(new Date()),
465
+ inputFilled: true,
466
+ },
467
+ render: (args) => ({
468
+ components: { EUIDatepicker },
469
+ setup() {
470
+ const modelValue = ref(args.modelValue);
471
+ return { args, modelValue };
472
+ },
473
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
474
+ }),
475
+ };
476
+
441
477
  export const DatepickerReadonly: Story = {
442
478
  args: {
443
479
  placeholder: "Select your date",
@@ -65,6 +65,8 @@
65
65
  :hide-input-icon="true"
66
66
  position="left"
67
67
  :multi-calendars="multiCalendars"
68
+ :min-date="minDate"
69
+ :max-date="maxDate"
68
70
  />
69
71
  </div>
70
72
  <EUIErrorMessage :errors="errors" :name="name" />
@@ -81,7 +83,15 @@ const props = defineProps({
81
83
  type: Date as any,
82
84
  default: "",
83
85
  },
84
- name: {
86
+ maxDate: {
87
+ type: Date as any,
88
+ default: "",
89
+ },
90
+ minDate: {
91
+ type: Date as any,
92
+ default: "",
93
+ },
94
+ name: {
85
95
  type: String,
86
96
  required: false,
87
97
  default: "date-picker",
@@ -4,7 +4,6 @@
4
4
  class="flex flex-row items-center justify-end max-w-screen-xl gap-6 mx-auto mb-10"
5
5
  >
6
6
  <EUISearch />
7
-
8
7
  <div>
9
8
  <EUITooltip placement="top">
10
9
  <template v-slot:default>
@@ -18,11 +17,21 @@
18
17
  </EUITooltip>
19
18
  </div>
20
19
  </div>
21
-
22
-
23
20
  <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
24
-
25
- <div>
21
+ <div>
22
+ <EUIDatepicker
23
+ v-model:modelValue="datepickerRange"
24
+ label="Date Min and max"
25
+ placeholder="Select Date here..."
26
+ :range="true"
27
+ required
28
+ :icon="CalendarIcon"
29
+ iconType="startIcon"
30
+ :min-date="minDate"
31
+ :max-date="maxDate"
32
+ />
33
+ </div>
34
+ <div>
26
35
  <EUIDatepicker
27
36
  v-model:modelValue="datepickerRange"
28
37
  label="Datepicker Range multi"
@@ -35,7 +44,6 @@
35
44
  />
36
45
  <EUIButton @click="resetFilter">Reset</EUIButton>
37
46
  </div>
38
-
39
47
  <div>
40
48
  <EUIDatepicker
41
49
  v-model:modelValue="datepickerRange"
@@ -47,7 +55,6 @@
47
55
  iconType="startIcon"
48
56
  />
49
57
  </div>
50
-
51
58
  <div>
52
59
  <EUIDatepicker
53
60
  :disabled="false"
@@ -60,7 +67,6 @@
60
67
  iconType="endIcon"
61
68
  />
62
69
  </div>
63
-
64
70
  <div>
65
71
  <EUIDatepicker
66
72
  v-model:modelValue="timepicker"
@@ -73,8 +79,6 @@
73
79
  />
74
80
  </div>
75
81
  </div>
76
-
77
-
78
82
  <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
79
83
  <div>
80
84
  <EUIDatepicker
@@ -221,6 +225,9 @@ const onSort = (field: string, order: string) => {
221
225
  const resetFilter = () => {
222
226
  datepickerRange.value = []
223
227
  }
228
+
229
+ const minDate = ref(new Date(2024, 11));
230
+ const maxDate = ref(new Date());
224
231
  </script>
225
232
 
226
233
  <style scoped></style> -->
@@ -9,19 +9,20 @@ const meta = {
9
9
  tags: ["autodocs"],
10
10
  argTypes: {
11
11
  closeIcon: {
12
- control: "boolean",
12
+ description:
13
+ "Displays a close (remove) button if true. <mark>@remove</mark> remove: Event emitted when the close button is clicked. A customizable tag component with an optional close button. It can be disabled or interactive.",
14
+ control: { type: "boolean" },
15
+ defaultValue: false,
13
16
  },
14
17
  disabled: {
15
- control: "boolean",
16
- },
17
- modelValue: {
18
- control: "boolean",
18
+ description: "Disables the tag, making it non-interactive.",
19
+ control: { type: "boolean" },
20
+ defaultValue: false,
19
21
  },
20
22
  errors: {
21
- control: "object",
22
- },
23
- name: {
24
- control: "text",
23
+ description: "Object containing error information.",
24
+ control: { type: "object" },
25
+ defaultValue: {},
25
26
  },
26
27
  },
27
28
  } satisfies Meta<typeof EUITag>;
@@ -32,7 +33,6 @@ type Story = StoryObj<typeof meta>;
32
33
  // Default story with minimum props
33
34
  export const Default: Story = {
34
35
  args: {
35
- modelValue: false,
36
36
  disabled: false,
37
37
  closeIcon: true,
38
38
  },
@@ -41,6 +41,13 @@ export const Default: Story = {
41
41
  setup() {
42
42
  return { args };
43
43
  },
44
- template: `<EUITag v-bind="args">Name</EUITag>`,
44
+ template: `<EUITag v-bind="args" @remove="args.remove">Name</EUITag>`,
45
45
  }),
46
+ parameters: {
47
+ docs: {
48
+ source: {
49
+ code: `<template><EUITag @remove="remove">Name</EUITag></template>`,
50
+ },
51
+ },
52
+ },
46
53
  };
@@ -1,9 +1,22 @@
1
1
  <template>
2
- <div class="inline-flex items-center gap-x-1 rounded-md bg-gray-50 px-2 py-1 text-sm font-medium text-gray-600 ring-1 ring-inset ring-gray-400/10">
3
- <slot />
4
- <button v-if="closeIcon" type="button" class="relative -mr-1 size-3.5 group rounded hover:bg-red-300/50 active:bg-red-300" @click.stop.prevent="removeTag">
2
+ <div
3
+ :class="[
4
+ 'inline-flex items-center px-2 py-1 rounded-md gap-x-1 bg-gray-50 ring-1 ring-inset ring-gray-400/10 max-w-xs w-auto',
5
+ {'pointer-events-none select-none cursor-none': disabled}
6
+ ]"
7
+ >
8
+ <div class="text-sm font-medium text-gray-600 truncate cursor-pointer"><slot /></div>
9
+ <button
10
+ v-if="closeIcon"
11
+ type="button"
12
+ class="relative -mr-1 size-3.5 group rounded hover:bg-red-300/50 active:bg-red-300"
13
+ @click.stop="removeTag"
14
+ >
5
15
  <span class="sr-only">Remove</span>
6
- <svg viewBox="0 0 14 14" class="size-3.5 stroke-gray-400 group-hover:stroke-red-600/75">
16
+ <svg
17
+ viewBox="0 0 14 14"
18
+ class="size-3.5 stroke-gray-400 group-hover:stroke-red-600/75"
19
+ >
7
20
  <path d="M4 4l6 6m0-6l-6 6" />
8
21
  </svg>
9
22
  </button>
@@ -11,7 +24,7 @@
11
24
  </template>
12
25
 
13
26
  <script setup lang="ts">
14
- import { PropType, toRefs } from "vue";
27
+ import { toRefs } from "vue";
15
28
 
16
29
  const props = defineProps({
17
30
  closeIcon: {
@@ -19,27 +32,16 @@ const props = defineProps({
19
32
  default: false,
20
33
  },
21
34
  errors: { type: Object, required: false, default: () => {} },
22
- name: {
23
- type: String,
24
- required: false,
25
- default: "",
26
- },
27
- modelValue: {
28
- type: Boolean as PropType<boolean>,
29
- required: true,
30
- default: false,
31
- },
32
35
  disabled: {
33
36
  type: Boolean,
34
37
  default: false,
35
38
  },
36
39
  });
37
40
  const { closeIcon } = toRefs(props);
38
- const emit = defineEmits(["remove", "update:modelValue"]);
41
+ const emit = defineEmits(["remove"]);
39
42
 
40
- const removeTag = (e: Event) => {
41
- emit("remove", e);
42
- emit("update:modelValue", false);
43
+ const removeTag = () => {
44
+ emit("remove");
43
45
  };
44
46
  </script>
45
47