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

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 +16 -16
  5. package/dist/library-vue-ts.es.js +5975 -5966
  6. package/dist/library-vue-ts.umd.js +19 -19
  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 +31 -7
  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 +2 -2
  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
@@ -90,6 +90,15 @@ const meta = {
90
90
  description:
91
91
  "Formats the displayed date value; if true, a formatted date string is shown.",
92
92
  },
93
+ inputFilled: {
94
+ control: "boolean",
95
+ description: "Toggles the alternate Datepicker input Filled design.",
96
+ defaultValue: false,
97
+ table: {
98
+ type: { summary: "Boolean" },
99
+ defaultValue: { summary: "false" },
100
+ },
101
+ },
93
102
  },
94
103
  } satisfies Meta<typeof EUIDatepicker>;
95
104
 
@@ -100,7 +109,7 @@ type Story = StoryObj<typeof meta>;
100
109
  export const Default: Story = {
101
110
  args: {
102
111
  placeholder: "Select your date",
103
- label: "Datepicker",
112
+ label: "Date",
104
113
  modelValue: new Date(),
105
114
  required: true,
106
115
  readonly: false,
@@ -115,7 +124,24 @@ export const Default: Story = {
115
124
  const modelValue = ref(args.modelValue);
116
125
  return { args, modelValue };
117
126
  },
118
- template: `<div class="max-w-xl min-h-64"><EUIDatepicker v-bind="args" /></div>`,
127
+ template: `<div class="max-w-sm min-h-64"><EUIDatepicker v-bind="args" /></div>`,
128
+ }),
129
+ };
130
+
131
+ export const InputFilled: Story = {
132
+ args: {
133
+ modelValue: new Date(),
134
+ label: "Date of Event",
135
+ placeholder: "Select your date",
136
+ inputFilled: true,
137
+ },
138
+ render: (args) => ({
139
+ components: { EUIDatepicker },
140
+ setup() {
141
+ const modelValue = ref(args.modelValue);
142
+ return { args, modelValue };
143
+ },
144
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
119
145
  }),
120
146
  };
121
147
 
@@ -139,7 +165,7 @@ export const DateRange: Story = {
139
165
  const datepicker = ref([startDate, endDate]);
140
166
  return { args, datepicker };
141
167
  },
142
- template: `<div class="max-w-xl min-h-64"><EUIDatepicker v-bind="args" v-model="datepicker" /></div>`,
168
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" v-model="datepicker" /></div>`,
143
169
  }),
144
170
  parameters: {
145
171
  docs: {
@@ -163,7 +189,7 @@ const datepickerRange = ref([new Date(), new Date(new Date().setDate(new Date().
163
189
  export const TimeOnly: Story = {
164
190
  args: {
165
191
  placeholder: "Select your time",
166
- label: "Time",
192
+ label: "Time picker",
167
193
  required: true,
168
194
  timePicker: true,
169
195
  errors: {
@@ -180,7 +206,7 @@ export const TimeOnly: Story = {
180
206
  const modelValue = ref(time);
181
207
  return { args, modelValue };
182
208
  },
183
- template: `<div class="max-w-xl min-h-64"><EUIDatepicker v-bind="args" :modelValue="modelValue" /></div>`,
209
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" :modelValue="modelValue" /></div>`,
184
210
  }),
185
211
  parameters: {
186
212
  docs: {
@@ -204,7 +230,7 @@ export const TimeOnly: Story = {
204
230
  },
205
231
  };
206
232
 
207
- export const IconUsingStart: Story = {
233
+ export const DatepickerIconStart: Story = {
208
234
  args: {
209
235
  iconType: "startIcon",
210
236
  icon: CalendarDaysIcon,
@@ -215,7 +241,7 @@ export const IconUsingStart: Story = {
215
241
  const modelValue = ref(args.modelValue);
216
242
  return { args, modelValue };
217
243
  },
218
- template: `<div class="max-w-xl min-h-64"><EUIDatepicker v-bind="args" /></div>`,
244
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
219
245
  }),
220
246
  parameters: {
221
247
  docs: {
@@ -234,7 +260,7 @@ export const IconUsingStart: Story = {
234
260
  },
235
261
  };
236
262
 
237
- export const IconUsingEnd: Story = {
263
+ export const DatepickerIconEnd: Story = {
238
264
  args: {
239
265
  iconType: "endIcon",
240
266
  icon: CalendarDaysIcon,
@@ -245,7 +271,7 @@ export const IconUsingEnd: Story = {
245
271
  const modelValue = ref(args.modelValue);
246
272
  return { args, modelValue };
247
273
  },
248
- template: `<div class="max-w-xl min-h-64"><EUIDatepicker v-bind="args" /></div>`,
274
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
249
275
  }),
250
276
  parameters: {
251
277
  docs: {
@@ -264,10 +290,74 @@ export const IconUsingEnd: Story = {
264
290
  },
265
291
  };
266
292
 
267
- export const DateSelected: Story = {
293
+ export const InputFilledIconStart: Story = {
268
294
  args: {
295
+ iconType: "startIcon",
296
+ icon: CalendarDaysIcon,
297
+ inputFilled: true,
298
+ },
299
+ render: (args) => ({
300
+ components: { EUIDatepicker, CalendarDaysIcon },
301
+ setup() {
302
+ const modelValue = ref(args.modelValue);
303
+ return { args, modelValue };
304
+ },
305
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
306
+ }),
307
+ parameters: {
308
+ docs: {
309
+ source: {
310
+ code: `<template>
311
+ <EUIDatepicker
312
+ v-model="datepicker"
313
+ label="Datepicker"
314
+ placeholder="Select Date here..."
315
+ :inputFilled="true"
316
+ icon-type="startIcon"
317
+ :icon="CalendarDaysIcon"
318
+ />
319
+ </template>`,
320
+ },
321
+ },
322
+ },
323
+ };
324
+
325
+ export const InputFilledIconEnd: Story = {
326
+ args: {
327
+ iconType: "endIcon",
328
+ icon: CalendarDaysIcon,
329
+ inputFilled: true,
330
+ },
331
+ render: (args) => ({
332
+ components: { EUIDatepicker, CalendarDaysIcon },
333
+ setup() {
334
+ const modelValue = ref(args.modelValue);
335
+ return { args, modelValue };
336
+ },
337
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
338
+ }),
339
+ parameters: {
340
+ docs: {
341
+ source: {
342
+ code: `<template>
343
+ <EUIDatepicker
344
+ v-model="datepicker"
345
+ label="Datepicker"
346
+ placeholder="Select Date here..."
347
+ :inputFilled="true"
348
+ :icon="CalendarDaysIcon"
349
+ icon-type="endIcon"
350
+ />
351
+ </template>`,
352
+ },
353
+ },
354
+ },
355
+ };
356
+
357
+ export const DatepickerWidthOutLabel: Story = {
358
+ args: {
359
+ placeholder: "Select your date",
269
360
  modelValue: new Date(),
270
- disabled: false,
271
361
  },
272
362
  render: (args) => ({
273
363
  components: { EUIDatepicker },
@@ -275,6 +365,40 @@ export const DateSelected: Story = {
275
365
  const modelValue = ref(args.modelValue);
276
366
  return { args, modelValue };
277
367
  },
278
- template: `<div class="max-w-xl"><EUIDatepicker v-bind="args" v-model="modelValue" @update:modelValue="onUpdateModelValue" /></div>`,
368
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
279
369
  }),
280
370
  };
371
+
372
+ export const DatepickerDiasabled: Story = {
373
+ args: {
374
+ placeholder: "Select your date",
375
+ modelValue: new Date(),
376
+ disabled: true,
377
+ inputFilled: true,
378
+ },
379
+ render: (args) => ({
380
+ components: { EUIDatepicker },
381
+ setup() {
382
+ const modelValue = ref(args.modelValue);
383
+ return { args, modelValue };
384
+ },
385
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
386
+ }),
387
+ };
388
+
389
+ export const DatepickerReadonly: Story = {
390
+ args: {
391
+ placeholder: "Select your date",
392
+ modelValue: new Date(),
393
+ readonly: true,
394
+ inputFilled: true,
395
+ },
396
+ render: (args) => ({
397
+ components: { EUIDatepicker },
398
+ setup() {
399
+ const modelValue = ref(args.modelValue);
400
+ return { args, modelValue };
401
+ },
402
+ template: `<div class="max-w-sm"><EUIDatepicker v-bind="args" /></div>`,
403
+ }),
404
+ };
@@ -1,28 +1,37 @@
1
1
  <template>
2
2
  <div>
3
+ <label
4
+ v-if="!inputFilled && label"
5
+ :class="[
6
+ 'text-xs w-full text-gray-500 cursor-pointer font-medium block mb-1',
7
+ required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
8
+ ]"
9
+ >
10
+ {{ label }}
11
+ </label>
3
12
  <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 eui-datepicker"
13
+ :class="[{'pointer-events-none cursor-not-allowed':disabled}, inputFilled ? 'overflow-hidden border border-gray-100 cursor-pointer group h-14 rounded-2xl eui-datepicker' : 'h-10 eui-datepicker normal', 'relative w-full mb-2']"
6
14
  >
7
15
  <label
16
+ v-if="inputFilled"
8
17
  :class="[
9
18
  getIconClass(),
10
19
  datepicker
11
20
  ? 'top-3.5 text-xs text-gray-400 leading-none cursor-default'
12
- : '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',
21
+ : 'top-1/2 text-sm w-full text-gray-700 cursor-pointer h-14 pt-5 pb-4 bg-white',
13
22
  disabled ? ' cursor-not-allowed' : '',
14
23
  required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
24
+ 'absolute font-medium left-0 px-4 z-[1] -translate-y-1/2 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-hover:text-xs group-focus-within:h-auto group-focus-within:py-0 group-hover:top-3.5 group-hover:bg-transparent group-hover:h-auto group-hover:py-0 group-focus-within:-translate-y-1/2 group-hover:-translate-y-1/2 text-start first-letter:capitalize group-hover:rounded-none group-hover:text-gray-400 group-hover:w-max transition-all ease-in-out duration-300'
15
25
  ]"
16
- class="absolute font-medium left-0 px-4 z-[1] -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-hover:text-xs group-focus-within:ring-transparent group-focus-within:h-auto group-focus-within:py-0 group-hover:top-3.5 group-hover:ring-0 group-hover:ring-transparent group-hover:bg-transparent group-hover:h-auto group-hover:py-0 group-focus-within:-translate-y-1/2 group-hover:-translate-y-1/2 text-start first-letter:capitalize group-hover:rounded-none group-hover:text-gray-400 group-hover:w-max group-hover:transition-colors"
17
26
  >
18
- {{ label }}
27
+ {{ label || 'Datepicker'}}
19
28
  </label>
20
29
  <div
21
30
  v-if="icon && iconType"
22
- class="absolute inset-y-0 z-10 flex items-center pointer-events-none"
23
31
  :class="[
24
32
  iconType === 'startIcon' ? 'left-0 pl-3' : 'right-0 pr-3',
25
33
  disabled ? 'cursor-not-allowed' : '',
34
+ inputFilled ? 'inset-y-0' : 'top-2', 'absolute z-10 flex items-center pointer-events-none'
26
35
  ]"
27
36
  >
28
37
  <component
@@ -91,7 +100,7 @@ const props = defineProps({
91
100
  label: {
92
101
  type: String,
93
102
  required: true,
94
- default: "Datepicker",
103
+ default: "",
95
104
  },
96
105
  iconType: {
97
106
  type: String as PropType<"startIcon" | "endIcon">,
@@ -110,6 +119,10 @@ const props = defineProps({
110
119
  disabled:Boolean,
111
120
  required: Boolean,
112
121
  range:Boolean,
122
+ inputFilled: {
123
+ type:Boolean,
124
+ default: false
125
+ }
113
126
  });
114
127
  const emit = defineEmits(["update:modelValue"]);
115
128
  const { modelValue, isUtc, clearIcon } = toRefs(props);
@@ -173,6 +186,17 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
173
186
  }
174
187
  }
175
188
 
189
+ &.normal {
190
+ .dp__main {
191
+ .dp__input {
192
+ @apply py-2 ring-1 ring-gray-100;
193
+ }
194
+ .dp__input.dp__input_focus {
195
+ @apply ring-2 h-10 rounded-md ring-purple-600;
196
+ }
197
+ }
198
+ }
199
+
176
200
  .dp__range_end,
177
201
  .dp__range_start,
178
202
  .dp__active_date {
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
 
22
22
 
23
- <div class="grid max-w-3xl gap-4 mx-auto sm:grid-cols-3">
23
+ <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
24
24
  <div>
25
25
  <EUIDatepicker
26
26
  v-model:modelValue="datepickerRange"
@@ -28,6 +28,8 @@
28
28
  placeholder="Select Date here..."
29
29
  :range="true"
30
30
  required
31
+ :icon="CalendarIcon"
32
+ iconType="startIcon"
31
33
  />
32
34
  </div>
33
35
 
@@ -39,6 +41,8 @@
39
41
  placeholder="Select your date"
40
42
  :readonly="false"
41
43
  required
44
+ :icon="CalendarIcon"
45
+ iconType="endIcon"
42
46
  />
43
47
  </div>
44
48
 
@@ -55,6 +59,49 @@
55
59
  </div>
56
60
  </div>
57
61
 
62
+
63
+ <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
64
+ <div>
65
+ <EUIDatepicker
66
+ v-model:modelValue="datepickerRange"
67
+ label="Datepicker Range"
68
+ placeholder="Select Date here..."
69
+ :range="true"
70
+ required
71
+ inputFilled
72
+ :icon="CalendarIcon"
73
+ iconType="startIcon"
74
+ />
75
+ </div>
76
+
77
+ <div>
78
+ <EUIDatepicker
79
+ :disabled="false"
80
+ label="Datepicker Single"
81
+ v-model:modelValue="singleDate"
82
+ placeholder="Select your date"
83
+ :readonly="false"
84
+ required
85
+ inputFilled
86
+ :icon="CalendarIcon"
87
+ iconType="endIcon"
88
+ />
89
+ </div>
90
+
91
+ <div>
92
+ <EUIDatepicker
93
+ v-model:modelValue="timepicker"
94
+ :disabled="false"
95
+ label="Time Picker"
96
+ placeholder="Select your time"
97
+ :readonly="false"
98
+ :timePicker="true"
99
+ required
100
+ inputFilled
101
+ />
102
+ </div>
103
+ </div>
104
+
58
105
  <EUITable
59
106
  :checkable="true"
60
107
  paginated
@@ -104,6 +151,7 @@ import EUITable from "./table/EUITable.vue";
104
151
  import EUITooltip from "./tooltip/EUITooltip.vue";
105
152
  import EUISearch from "./searchInput/EUISearch.vue";
106
153
  import EUIDatepicker from "./datepicker/EUIDatepicker.vue";
154
+ import { CalculatorIcon, CalendarIcon } from "@heroicons/vue/24/solid";
107
155
 
108
156
  // TODO: Datepicker
109
157
  const datepickerRange = ref([
@@ -1,7 +1,6 @@
1
1
  import "../style.scss";
2
2
  export { default as EUIButton } from "./button/EUIButton.vue";
3
3
  export { default as EUIInput } from "./input/EUIInput.vue";
4
- export { default as EUIInputNormal } from "./inputNormal/EUIInputNormal.vue";
5
4
  export { default as EUITelephone } from "./telephone/EUITelephone.vue";
6
5
  export { default as EUITextArea } from "./textArea/EUITextArea.vue";
7
6
 
@@ -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
+ };