edvoyui-component-library-test-flight 0.0.25 → 0.0.27

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.
Files changed (37) hide show
  1. package/dist/{input/EUIInput.vue.d.ts → EUIInput.vue.d.ts} +1 -1
  2. package/dist/EUIInput.vue.d.ts.map +1 -0
  3. package/dist/button/EUIButton.vue.d.ts.map +1 -0
  4. package/dist/library-vue-ts.cjs.js +21 -21
  5. package/dist/library-vue-ts.es.js +6229 -6201
  6. package/dist/library-vue-ts.umd.js +24 -24
  7. package/dist/modal/EUIModal.vue.d.ts +1 -1
  8. package/dist/modal/EUIModal.vue.d.ts.map +1 -1
  9. package/dist/table/EUIDashboardTable.vue.d.ts +1 -1
  10. package/dist/table/EUITable.vue.d.ts +1 -1
  11. package/package.json +1 -1
  12. package/src/assets/svg/ChevronBigDown.vue +22 -0
  13. package/src/components/HelloWorld.vue +235 -77
  14. package/src/components/checkbox/EUICheckbox.vue +2 -2
  15. package/src/components/datepicker/EUIDatepicker.stories.ts +136 -12
  16. package/src/components/datepicker/EUIDatepicker.vue +41 -15
  17. package/src/components/delete.vue +49 -1
  18. package/src/components/index.ts +0 -1
  19. package/src/components/input/EUIInput.stories.ts +219 -6
  20. package/src/components/input/EUIInput.vue +30 -15
  21. package/src/components/modal/EUIModal.vue +13 -16
  22. package/src/components/select/EUISelect.stories.ts +49 -3
  23. package/src/components/select/EUISelect.vue +79 -34
  24. package/src/components/table/EUIDashboardTable.vue +68 -36
  25. package/src/components/table/EUITable.vue +2 -2
  26. package/src/components/telephone/EUITelephone.stories.ts +164 -8
  27. package/src/components/telephone/EUITelephone.vue +33 -11
  28. package/src/components/textArea/EUITextArea.stories.ts +52 -0
  29. package/src/components/textArea/EUITextArea.vue +36 -5
  30. package/dist/EUIButton.vue.d.ts.map +0 -1
  31. package/dist/input/EUIInput.vue.d.ts.map +0 -1
  32. package/dist/inputNormal/EUIInputNormal.vue.d.ts +0 -5
  33. package/dist/inputNormal/EUIInputNormal.vue.d.ts.map +0 -1
  34. package/src/components/inputNormal/EUIInputNormal.stories.ts +0 -164
  35. package/src/components/inputNormal/EUIInputNormal.vue +0 -161
  36. package/src/components/select/EUISelect.scss +0 -0
  37. /package/dist/{EUIButton.vue.d.ts → button/EUIButton.vue.d.ts} +0 -0
@@ -2,7 +2,7 @@ import { expect, userEvent, within } from "@storybook/test";
2
2
  import type { Meta, StoryObj } from "@storybook/vue3";
3
3
  import EUIInput from "./EUIInput.vue";
4
4
  import { UserCircleIcon } from "@heroicons/vue/24/outline";
5
-
5
+ import { MagnifyingGlassIcon } from "@heroicons/vue/24/solid";
6
6
  // Meta configuration for the component's stories
7
7
  const meta = {
8
8
  title: "Forms/Input",
@@ -38,7 +38,7 @@ const meta = {
38
38
  ],
39
39
  },
40
40
  description:
41
- "Specifies the type of input, such as `text`, `number`, `email`, etc.",
41
+ "Defines the type of input field. Accepted values are 'text', 'number', 'email', 'password', 'search', 'date', and 'url'.",
42
42
  },
43
43
  placeholder: {
44
44
  control: "text",
@@ -81,6 +81,24 @@ const meta = {
81
81
  description:
82
82
  "An object containing error messages or validation information, typically used for form validation.",
83
83
  },
84
+ rounded: {
85
+ control: "boolean",
86
+ description:
87
+ "rounded the input field. (InputFilled rounded and className not working)",
88
+ },
89
+ className: {
90
+ control: "text",
91
+ description: "Required design to add class",
92
+ },
93
+ inputFilled: {
94
+ control: "boolean",
95
+ description: "Toggles the alternate input design.",
96
+ defaultValue: false,
97
+ table: {
98
+ type: { summary: "Boolean" },
99
+ defaultValue: { summary: "false" },
100
+ },
101
+ },
84
102
  },
85
103
  } satisfies Meta<typeof EUIInput>;
86
104
 
@@ -100,6 +118,13 @@ export const Default: Story = {
100
118
  disabled: false,
101
119
  autoFocus: false,
102
120
  },
121
+ render: (args) => ({
122
+ components: { EUIInput },
123
+ setup() {
124
+ return { args };
125
+ },
126
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
127
+ }),
103
128
  };
104
129
 
105
130
  export const TypeOfInput: Story = {
@@ -113,13 +138,45 @@ export const TypeOfInput: Story = {
113
138
  errors: {
114
139
  message: "Enter valid mobile number",
115
140
  },
141
+ class: "max-w-sm",
142
+ },
143
+ parameters: {
144
+ docs: {
145
+ description: {
146
+ story:
147
+ "Specifies the type of input, such as `text`, `number`, `email`, etc.",
148
+ },
149
+ },
150
+ },
151
+ };
152
+
153
+ export const InputFilled: Story = {
154
+ args: {
155
+ modelValue: "",
156
+ name: "emailaddress",
157
+ label: "Email Address",
158
+ type: "email",
159
+ placeholder: "Enter your email here...",
160
+ disabled: false,
161
+ errors: {
162
+ message: "Enter valid mobile number",
163
+ },
164
+ class: "max-w-sm",
165
+ inputFilled: true,
166
+ },
167
+ parameters: {
168
+ docs: {
169
+ description: {
170
+ story: "Toggles the alternate input Filled design.",
171
+ },
172
+ },
116
173
  },
117
174
  render: (args) => ({
118
175
  components: { EUIInput },
119
176
  setup() {
120
177
  return { args };
121
178
  },
122
- template: '<div class="max-w-xl"><EUIInput v-bind="args" /></div>',
179
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
123
180
  }),
124
181
  };
125
182
 
@@ -130,6 +187,7 @@ export const InputValue: Story = {
130
187
  label: "User Name",
131
188
  placeholder: "Enter fullname here..",
132
189
  name: "inputName",
190
+ class: "max-w-sm",
133
191
  },
134
192
  play: async ({ canvasElement }) => {
135
193
  const canvas = within(canvasElement);
@@ -139,7 +197,47 @@ export const InputValue: Story = {
139
197
  },
140
198
  };
141
199
 
142
- export const IconUsingStart: Story = {
200
+ export const InputWithoutLabel: Story = {
201
+ args: {
202
+ modelValue: "",
203
+ type: "text",
204
+ placeholder: "Enter full name",
205
+ name: "userName",
206
+ disabled: true,
207
+ class: "max-w-sm",
208
+ },
209
+ };
210
+
211
+ export const InputDisabled: Story = {
212
+ args: {
213
+ modelValue: "",
214
+ label: "User Name",
215
+ type: "text",
216
+ placeholder: "Enter fullname here..",
217
+ name: "userName",
218
+ disabled: true,
219
+ class: "max-w-sm",
220
+ },
221
+ };
222
+
223
+ export const InputReadonly: Story = {
224
+ args: {
225
+ modelValue: "John Cena",
226
+ label: "User Name",
227
+ placeholder: "Enter fullname here..",
228
+ name: "inputName",
229
+ readonly: true,
230
+ class: "max-w-sm",
231
+ },
232
+ play: async ({ canvasElement }) => {
233
+ const canvas = within(canvasElement);
234
+ const inputElement = canvas.getByPlaceholderText("Enter fullname here..");
235
+ await userEvent.type(inputElement, "Storybook Test");
236
+ await expect(inputElement).toBe("Storybook Test");
237
+ },
238
+ };
239
+
240
+ export const InputIconStart: Story = {
143
241
  args: {
144
242
  iconType: "startIcon",
145
243
  icon: UserCircleIcon,
@@ -147,6 +245,7 @@ export const IconUsingStart: Story = {
147
245
  placeholder: "Enter fullname here..",
148
246
  name: "inputStarIcon",
149
247
  modelValue: "",
248
+ class: "max-w-sm",
150
249
  },
151
250
  play: async ({ canvasElement }) => {
152
251
  const canvas = within(canvasElement);
@@ -156,7 +255,7 @@ export const IconUsingStart: Story = {
156
255
  },
157
256
  };
158
257
 
159
- export const IconUsingEnd: Story = {
258
+ export const InputIconEnd: Story = {
160
259
  args: {
161
260
  modelValue: "",
162
261
  iconType: "endIcon",
@@ -164,6 +263,7 @@ export const IconUsingEnd: Story = {
164
263
  label: "User Name",
165
264
  placeholder: "Enter fullname here..",
166
265
  name: "inputEndIcon",
266
+ class: "max-w-sm",
167
267
  },
168
268
  play: async ({ canvasElement }) => {
169
269
  const canvas = within(canvasElement);
@@ -171,4 +271,117 @@ export const IconUsingEnd: Story = {
171
271
  await userEvent.type(inputElement, "Jane Doe");
172
272
  expect(inputElement).toBe("Jane Doe");
173
273
  },
174
- };
274
+ };
275
+
276
+ export const InputRoundedDefault: Story = {
277
+ args: {
278
+ modelValue: "",
279
+ type: "text",
280
+ placeholder: "Enter full name",
281
+ name: "userName",
282
+ rounded: true,
283
+ class: "max-w-sm",
284
+ },
285
+ };
286
+
287
+ export const InputAddClassName: Story = {
288
+ args: {
289
+ modelValue: "",
290
+ name: "searchInput",
291
+ type: "search",
292
+ placeholder: "Search here...",
293
+ rounded: true,
294
+ className: ["bg-gray-100/50 rounded-3xl"],
295
+ icon: MagnifyingGlassIcon,
296
+ iconType: "startIcon",
297
+ },
298
+ render: (args) => ({
299
+ components: { EUIInput },
300
+ setup() {
301
+ return { args };
302
+ },
303
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
304
+ }),
305
+ };
306
+
307
+ export const InputFilledIconStart: Story = {
308
+ args: {
309
+ modelValue: "",
310
+ name: "courseSearch",
311
+ label: "Course search",
312
+ type: "search",
313
+ placeholder: "Search here...",
314
+ inputFilled: true,
315
+ icon: MagnifyingGlassIcon,
316
+ iconType: "startIcon",
317
+ },
318
+ render: (args) => ({
319
+ components: { EUIInput },
320
+ setup() {
321
+ return { args };
322
+ },
323
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
324
+ }),
325
+ };
326
+
327
+ export const InputFilledIconEnd: Story = {
328
+ args: {
329
+ modelValue: "",
330
+ name: "courseSearch",
331
+ label: "Course search",
332
+ type: "search",
333
+ placeholder: "Search here...",
334
+ inputFilled: true,
335
+ icon: MagnifyingGlassIcon,
336
+ iconType: "endIcon",
337
+ },
338
+ render: (args) => ({
339
+ components: { EUIInput },
340
+ setup() {
341
+ return { args };
342
+ },
343
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
344
+ }),
345
+ };
346
+
347
+ export const InputFilledDisabled: Story = {
348
+ args: {
349
+ modelValue: "",
350
+ name: "courseSearch",
351
+ label: "Course search",
352
+ type: "search",
353
+ placeholder: "Search here...",
354
+ inputFilled: true,
355
+ icon: MagnifyingGlassIcon,
356
+ iconType: "startIcon",
357
+ disabled: true,
358
+ },
359
+ render: (args) => ({
360
+ components: { EUIInput },
361
+ setup() {
362
+ return { args };
363
+ },
364
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
365
+ }),
366
+ };
367
+
368
+ export const InputFilledReadonly: Story = {
369
+ args: {
370
+ modelValue: "Lorem ipsum dolor sit amet ",
371
+ name: "courseSearch",
372
+ label: "Course search",
373
+ type: "search",
374
+ placeholder: "Search here...",
375
+ inputFilled: true,
376
+ icon: MagnifyingGlassIcon,
377
+ iconType: "startIcon",
378
+ readonly: true,
379
+ },
380
+ render: (args) => ({
381
+ components: { EUIInput },
382
+ setup() {
383
+ return { args };
384
+ },
385
+ template: '<div class="max-w-sm"><EUIInput v-bind="args" /></div>',
386
+ }),
387
+ };
@@ -1,38 +1,43 @@
1
1
  <template>
2
2
  <div>
3
+ <label
4
+ v-if="!inputFilled && label"
5
+ :for="`${name}-${id}`"
6
+ :class="[
7
+ 'text-xs w-full text-gray-500 cursor-pointer font-medium',
8
+ required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
9
+ ]"
10
+ >
11
+ {{ label }}
12
+ </label>
3
13
  <div
4
- :class="disabled ? 'pointer-events-none cursor-not-allowed' : ''"
5
- class="relative w-full mb-2 overflow-hidden border border-gray-100 cursor-pointer group h-14 rounded-2xl focus-within:border-purple-600 focus-within:ring-1 focus-within:ring-purple-600"
14
+ :class="[{'pointer-events-none cursor-not-allowed': disabled}, {'h-14 rounded-2xl focus-within:border-purple-600 focus-within:ring-1 focus-within:ring-purple-600 border border-gray-100': inputFilled}, 'group cursor-pointer relative w-full mb-2 overflow-hidden']"
6
15
  >
7
16
  <label
17
+ v-if="inputFilled"
8
18
  :for="`${name}-${id}`"
9
19
  :class="[
10
20
  getIconClass(),
11
21
  inputValue
12
22
  ? 'top-3.5 text-xs text-gray-400 leading-none cursor-default'
13
- : 'top-1/2 text-sm w-full text-gray-700 cursor-pointer h-14 pt-5 pb-4 bg-white ring-1 ring-gray-200',
14
- disabled ? ' cursor-not-allowed' : '',
23
+ : 'top-1/2 text-sm w-full text-gray-700 cursor-pointer h-14 pt-5 pb-4',
24
+ disabled ? 'cursor-not-allowed bg-gray-50 z-10' : 'z-0 bg-white',
15
25
  required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
26
+ 'absolute font-medium left-0 px-4 -translate-y-1/2 duration-300 group-focus-within:top-3.5 group-focus-within:text-xs group-focus-within:text-gray-400 rounded-2xl group-focus-within:bg-transparent group-focus-within:-translate-y-1/2 group-focus-within:ring-transparent group-focus-within:h-auto group-focus-within:py-0 first-letter:capitalize transition-all ease-in-out'
16
27
  ]"
17
- class="absolute font-medium left-0 px-4 z-0 -translate-y-1/2 duration-200 group-focus-within:top-3.5 group-focus-within:text-xs group-focus-within:text-gray-400 rounded-2xl group-focus-within:bg-transparent group-focus-within:-translate-y-1/2 group-focus-within:ring-transparent group-focus-within:h-auto group-focus-within:py-0"
18
28
  >
19
- {{ label }}
29
+ {{ label || 'Label' }}
20
30
  </label>
21
31
  <div
22
32
  v-if="icon && iconType"
23
- class="absolute inset-y-0 flex items-center pointer-events-none"
24
- :class="[
25
- iconType === 'startIcon' ? 'left-0 pl-3' : 'right-0 pr-3',
26
- disabled ? 'cursor-not-allowed' : '',
27
- ]"
33
+ :class="['absolute inset-y-0 flex items-center pointer-events-none', iconType === 'startIcon' ? 'left-0 pl-3' : 'right-0 pr-3', disabled ? 'z-20': '']"
28
34
  >
29
35
  <component
30
36
  :is="icon"
31
- class="w-6 h-6 text-gray-400"
37
+ class="text-gray-400 size-6"
32
38
  aria-hidden="true"
33
39
  />
34
40
  </div>
35
-
36
41
  <input
37
42
  :id="`${name}-${id}`"
38
43
  ref="input"
@@ -40,8 +45,8 @@
40
45
  :value="modelValue"
41
46
  :placeholder="placeholder"
42
47
  :name="name"
43
- class="z-10 block w-full h-full pt-6 pb-3 text-sm font-medium leading-6 appearance-none rounded-2xl placeholder:text-gray-400 focus:outline-none disabled:opacity-75 focus:border-purple-600 autofill:bg-white"
44
- :class="[getIconClass(), disabled ? 'cursor-not-allowed' : '']"
48
+ :class="['z-10 block placeholder:text-gray-400 focus:outline-none text-sm font-medium appearance-none disabled:opacity-75 autofill:bg-white leading-6 transition-all duration-100 border-none outline-none', inputFilled ? 'pt-6 pb-3 rounded-2xl size-full' : 'px-4 py-3 h-10 w-full ring-1 ring-gray-100 focus-within:ring-purple-600 focus-within:ring-2 ring-inset', !inputFilled && rounded ? 'rounded-2xl' : 'rounded-md', disabled ? 'cursor-not-allowed' : 'cursor-text', getIconClass(), !inputFilled && className]"
49
+
45
50
  :required="required"
46
51
  :disabled="disabled"
47
52
  :readonly="readonly"
@@ -118,6 +123,16 @@ const props = defineProps({
118
123
  type: Boolean,
119
124
  default: false,
120
125
  },
126
+ inputFilled: {
127
+ type:Boolean,
128
+ default: false
129
+ },
130
+ rounded:Boolean,
131
+ className: {
132
+ type: Array as PropType<string[]>,
133
+ required: false,
134
+ default: () => [],
135
+ },
121
136
  });
122
137
 
123
138
  const hasFocus = ref(false);
@@ -7,7 +7,7 @@
7
7
  @click.self="closeModal"
8
8
  >
9
9
  <div
10
- class="backdrop fixed inset-0 z-[-1] w-screen h-screen bg-black/25 pointer-events-none overflow-hidden"
10
+ class="backdrop fixed inset-0 z-[-1] w-screen h-screen bg-black/50 pointer-events-none overflow-hidden"
11
11
  ></div>
12
12
  <div
13
13
  class="bg-white shadow-lg max-w-lg w-full max-h-[calc(100svh-3rem)] md:h-auto overflow-hidden relative"
@@ -20,13 +20,13 @@
20
20
  </template>
21
21
  <div
22
22
  v-else
23
- class="flex items-center justify-between font-medium text-gray-700"
23
+ class="flex flex-row items-center justify-between font-medium text-gray-700"
24
24
  :class="slimHeader ? 'p-4 text-base' : 'p-6 text-lg'"
25
25
  >
26
26
  <h3 class="text-xl font-semibold">
27
27
  <slot name="title">{{ title || "Modal Title" }}</slot>
28
28
  </h3>
29
- <div>
29
+ <div v-if="visibleClose" class="flex-initial">
30
30
  <button
31
31
  type="button"
32
32
  class="flex items-center justify-center text-gray-400 bg-white hover:bg-gray-50 rounded-3xl hover:text-gray-600 size-8"
@@ -104,6 +104,10 @@ export default defineComponent({
104
104
  type: String,
105
105
  default: "",
106
106
  },
107
+ visibleClose: {
108
+ type: Boolean,
109
+ default: true,
110
+ },
107
111
  },
108
112
  emits: ["update:isVisible", "confirm"],
109
113
  methods: {
@@ -131,33 +135,26 @@ export default defineComponent({
131
135
  <style lang="scss" scoped>
132
136
  .modal-enter-active,
133
137
  .modal-leave-active {
134
- transition: opacity 0.5s ease, transform 0.5s ease;
138
+ transition: opacity 0.3s ease, transform 0.3s ease;
135
139
  }
136
140
  .modal-enter-from,
137
141
  .modal-leave-to {
138
- opacity: 0;
139
- transform-origin: top;
140
- transform: translateY(40%) scale(0.4);
142
+ @apply opacity-0;
141
143
  }
142
144
  .modal-enter-to,
143
145
  .modal-leave-from {
144
- opacity: 1;
145
- transform-origin: top center;
146
- transform: translateY(0%) scale(1);
146
+ @apply opacity-100;
147
147
  }
148
148
 
149
149
  .backdrop {
150
- transition: opacity 0.6s ease, transform 0.6s ease;
150
+ transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
151
151
  }
152
152
  .modal-enter-from .backdrop,
153
153
  .modal-leave-to .backdrop {
154
- transform: scale(0.3) rotate3d(0.5, 1, 0, 60deg);
155
- opacity: 0;
154
+ @apply opacity-0;
156
155
  }
157
156
  .modal-enter-to .backdrop,
158
157
  .modal-leave-from .backdrop {
159
- // transform: scale(0.8) rotate3d(0.5, 0, 0, 90deg); //rotate effect
160
- transform: scale(1) rotate3d(0, 0, 0, 90deg); // fade effect only
161
- opacity: 0.2;
158
+ @apply opacity-100;
162
159
  }
163
160
  </style>
@@ -25,6 +25,15 @@ const meta = {
25
25
  description:
26
26
  "Object containing validation errors where keys are field names and values are the error messages.",
27
27
  },
28
+ inputFilled: {
29
+ control: "boolean",
30
+ description: "Toggles the alternate Select input Filled design.",
31
+ defaultValue: false,
32
+ table: {
33
+ type: { summary: "Boolean" },
34
+ defaultValue: { summary: "false" },
35
+ },
36
+ },
28
37
  },
29
38
  } satisfies Meta<typeof EUISelect>;
30
39
 
@@ -35,8 +44,8 @@ type Story = StoryObj<typeof meta>;
35
44
  export const Default: Story = {
36
45
  args: {
37
46
  name: "country",
38
- label: "country",
39
- placeholder: "country",
47
+ label: "Country Name",
48
+ placeholder: "select country",
40
49
  items: [
41
50
  { value: "usa", label: "United States", name: "United States" },
42
51
  { value: "canada", label: "Canada", name: "Canada" },
@@ -44,6 +53,43 @@ export const Default: Story = {
44
53
  ],
45
54
  modelValue: { value: "usa", label: "United States", name: "United States" },
46
55
  errors: {},
47
- required: true,
56
+ required: false,
48
57
  },
58
+ render: (args) => ({
59
+ components: { EUISelect },
60
+ setup() {
61
+ return { args };
62
+ },
63
+ template: '<div class="max-w-xs"><EUISelect v-bind="args" /></div>',
64
+ }),
49
65
  };
66
+
67
+ export const inputFilled: Story = {
68
+ args: {
69
+ name: "country",
70
+ label: "Country Name",
71
+ placeholder: "select country",
72
+ items: [
73
+ { value: "usa", label: "United States", name: "United States" },
74
+ { value: "canada", label: "Canada", name: "Canada" },
75
+ { value: "uk", label: "United Kingdom", name: "United Kingdom" },
76
+ ],
77
+ modelValue: [],
78
+ errors: {},
79
+ inputFilled: true,
80
+ },
81
+ parameters: {
82
+ docs: {
83
+ description: {
84
+ story: "Toggles the alternate Select Filled design.",
85
+ },
86
+ },
87
+ },
88
+ render: (args) => ({
89
+ components: { EUISelect },
90
+ setup() {
91
+ return { args };
92
+ },
93
+ template: '<div class="max-w-xs"><EUISelect v-bind="args" /></div>',
94
+ }),
95
+ };