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
@@ -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,18 +119,24 @@ 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);
116
- const startDate = ref(new Date());
117
- const endDate = ref(new Date(new Date().setDate(startDate.value.getDate() + 7)));
129
+ // const startDate = ref(new Date());
130
+ // const endDate = ref(new Date(new Date().setDate(startDate.value.getDate() + 7)));
118
131
 
119
- const time = ref({
120
- hours: new Date().getHours(),
121
- minutes: new Date().getMinutes()
122
- });
132
+ // const time = ref({
133
+ // hours: new Date().getHours(),
134
+ // minutes: new Date().getMinutes()
135
+ // });
136
+
137
+ // const datepicker = ref( props.modelValue ? props.modelValue : props.timePicker ? time.value : props.range ? [startDate.value, endDate.value] : startDate.value);
123
138
 
124
- const datepicker = ref( props.modelValue ? props.modelValue : props.timePicker ? time.value : props.range ? [startDate.value, endDate.value] : startDate.value);
139
+ const datepicker = ref(props.modelValue)
125
140
 
126
141
  watch(
127
142
  datepicker,
@@ -158,7 +173,7 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
158
173
  }
159
174
 
160
175
  .eui-datepicker {
161
- @apply min-w-56;
176
+ @apply min-w-56;
162
177
  .dp__main {
163
178
  .dp__input {
164
179
  @apply pb-2 pt-6 border-0 transition-colors duration-100 ease-in-out text-sm font-medium leading-6 placeholder:text-gray-400 placeholder:font-normal;
@@ -173,6 +188,17 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
173
188
  }
174
189
  }
175
190
 
191
+ &.normal {
192
+ .dp__main {
193
+ .dp__input {
194
+ @apply py-2 ring-1 ring-gray-100;
195
+ }
196
+ .dp__input.dp__input_focus {
197
+ @apply ring-2 h-10 rounded-md ring-purple-600;
198
+ }
199
+ }
200
+ }
201
+
176
202
  .dp__range_end,
177
203
  .dp__range_start,
178
204
  .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