edvoyui-component-library-test-flight 0.0.88 → 0.0.90
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/EUISelectSearch.vue.d.ts +4 -0
- package/dist/EUISelectSearch.vue.d.ts.map +1 -0
- package/dist/accordion/EUIAccordion.vue.d.ts +2 -2
- package/dist/accordion/EUIAccordion.vue.d.ts.map +1 -1
- package/dist/avatar/EUIAvatar.vue.d.ts +2 -2
- package/dist/avatar/EUIAvatar.vue.d.ts.map +1 -1
- package/dist/button/EUIButton.vue.d.ts +5 -0
- package/dist/button/EUIButton.vue.d.ts.map +1 -0
- package/dist/checkbox/EUICheckbox.vue.d.ts +3 -3
- package/dist/checkbox/EUICheckbox.vue.d.ts.map +1 -1
- package/dist/datepicker/EUIDatepicker.vue.d.ts +3 -3
- package/dist/datepicker/EUIDatepicker.vue.d.ts.map +1 -1
- package/dist/dropdown/EUIMultiDropdown.vue.d.ts +2 -2
- package/dist/dropdown/EUIMultiDropdown.vue.d.ts.map +1 -1
- package/dist/errorMessage/EUIErrorMessage.vue.d.ts +2 -2
- package/dist/errorMessage/EUIErrorMessage.vue.d.ts.map +1 -1
- package/dist/input/EUIInput.vue.d.ts +2 -2
- package/dist/input/EUIInput.vue.d.ts.map +1 -1
- package/dist/library-vue-ts.cjs.js +37 -37
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +2400 -2389
- package/dist/library-vue-ts.umd.js +38 -38
- package/dist/loader/EUICircleLoader.vue.d.ts +1 -1
- package/dist/loader/EUICircleLoader.vue.d.ts.map +1 -1
- package/dist/loader/EUICubeLoader.vue.d.ts +1 -1
- package/dist/loader/EUICubeLoader.vue.d.ts.map +1 -1
- package/dist/loader/EUILoader.vue.d.ts +2 -2
- package/dist/loader/EUILoader.vue.d.ts.map +1 -1
- package/dist/loader/EUISquareLoader.vue.d.ts +1 -1
- package/dist/loader/EUISquareLoader.vue.d.ts.map +1 -1
- package/dist/modal/EUIModal.vue.d.ts +2 -2
- package/dist/modal/EUIModal.vue.d.ts.map +1 -1
- package/dist/pillSelect/EUIPillSelect.vue.d.ts +2 -2
- package/dist/pillSelect/EUIPillSelect.vue.d.ts.map +1 -1
- package/dist/popover/EUIPopover.vue.d.ts +2 -2
- package/dist/popover/EUIPopover.vue.d.ts.map +1 -1
- package/dist/radio/EUIRadio.vue.d.ts +2 -2
- package/dist/radio/EUIRadio.vue.d.ts.map +1 -1
- package/dist/searchInput/EUISearch.vue.d.ts +2 -2
- package/dist/searchInput/EUISearch.vue.d.ts.map +1 -1
- package/dist/searchexpand/EUISearchExpand.vue.d.ts +2 -2
- package/dist/searchexpand/EUISearchExpand.vue.d.ts.map +1 -1
- package/dist/searchexpand/EUISearchToggle.vue.d.ts +2 -2
- package/dist/searchexpand/EUISearchToggle.vue.d.ts.map +1 -1
- package/dist/select/EUISelect.vue.d.ts +3 -3
- package/dist/select/EUISelect.vue.d.ts.map +1 -1
- package/dist/slideover/EUISlideover.vue.d.ts +2 -2
- package/dist/slideover/EUISlideover.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperHorizontal.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperHorizontal.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperTimeline.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperTimeline.vue.d.ts.map +1 -1
- package/dist/stepperTimeline/EUIStepperVertical.vue.d.ts +2 -2
- package/dist/stepperTimeline/EUIStepperVertical.vue.d.ts.map +1 -1
- package/dist/table/EUIDashboardTable.vue.d.ts +2 -2
- package/dist/table/EUIDashboardTable.vue.d.ts.map +1 -1
- package/dist/table/EUIPageLimit.vue.d.ts +2 -2
- package/dist/table/EUIPageLimit.vue.d.ts.map +1 -1
- package/dist/table/EUIPagination.vue.d.ts +2 -2
- package/dist/table/EUIPagination.vue.d.ts.map +1 -1
- package/dist/table/EUIStudentPagination.vue.d.ts +2 -2
- package/dist/table/EUIStudentPagination.vue.d.ts.map +1 -1
- package/dist/table/EUITable.vue.d.ts +2 -2
- package/dist/table/EUITable.vue.d.ts.map +1 -1
- package/dist/table/EUITableCheckbox.vue.d.ts +3 -3
- package/dist/table/EUITableCheckbox.vue.d.ts.map +1 -1
- package/dist/table/UCheckbox.vue.d.ts +2 -2
- package/dist/table/UCheckbox.vue.d.ts.map +1 -1
- package/dist/table/UTable.vue.d.ts +2 -2
- package/dist/table/UTable.vue.d.ts.map +1 -1
- package/dist/tabs/EUITabs.vue.d.ts +2 -2
- package/dist/tabs/EUITabs.vue.d.ts.map +1 -1
- package/dist/tag/EUITag.vue.d.ts +2 -2
- package/dist/tag/EUITag.vue.d.ts.map +1 -1
- package/dist/telephone/EUITelephone.vue.d.ts +3 -3
- package/dist/telephone/EUITelephone.vue.d.ts.map +1 -1
- package/dist/textArea/EUITextArea.vue.d.ts +2 -2
- package/dist/textArea/EUITextArea.vue.d.ts.map +1 -1
- package/dist/timeLine/EUITimeLine.vue.d.ts +2 -2
- package/dist/timeLine/EUITimeLine.vue.d.ts.map +1 -1
- package/dist/timeLine/EUITimeLineItem.vue.d.ts +2 -2
- package/dist/timeLine/EUITimeLineItem.vue.d.ts.map +1 -1
- package/dist/toggle/EUIToggle.vue.d.ts +2 -2
- package/dist/toggle/EUIToggle.vue.d.ts.map +1 -1
- package/dist/tooltip/EUITooltip.vue.d.ts +2 -2
- package/dist/tooltip/EUITooltip.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/datepicker/EUIDatepicker.vue +130 -117
- package/src/components/select/EUISelect.stories.ts +7 -1
- package/src/components/select/EUISelect.vue +16 -15
- package/dist/EUIButton.vue.d.ts +0 -5
- package/dist/EUIButton.vue.d.ts.map +0 -1
- package/dist/selectSearch/EUISelectSearch.vue.d.ts +0 -4
- package/dist/selectSearch/EUISelectSearch.vue.d.ts.map +0 -1
- /package/src/components/checkbox/{EUIcheckbox.stories.ts → EUICheckbox.stories.ts} +0 -0
- /package/src/components/modal/{EUImodal.stories.ts → EUIModal.stories.ts} +0 -0
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<label
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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>
|
|
12
12
|
<div
|
|
13
|
-
:class="[
|
|
13
|
+
:class="[
|
|
14
|
+
{ 'pointer-events-none cursor-not-allowed': disabled },
|
|
15
|
+
inputFilled
|
|
16
|
+
? 'overflow-hidden border border-gray-100 cursor-pointer group h-14 rounded-2xl eui-datepicker'
|
|
17
|
+
: 'h-10 eui-datepicker normal',
|
|
18
|
+
'relative w-full mb-2',
|
|
19
|
+
]"
|
|
14
20
|
>
|
|
15
|
-
|
|
21
|
+
<label
|
|
16
22
|
v-if="inputFilled"
|
|
17
23
|
:class="[
|
|
18
24
|
getIconClass(),
|
|
@@ -21,17 +27,18 @@
|
|
|
21
27
|
: 'top-1/2 text-sm w-full text-gray-700 cursor-pointer h-14 pt-5 pb-4 bg-white',
|
|
22
28
|
disabled ? ' cursor-not-allowed' : '',
|
|
23
29
|
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'
|
|
30
|
+
'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',
|
|
25
31
|
]"
|
|
26
32
|
>
|
|
27
|
-
{{ label
|
|
33
|
+
{{ label || 'Datepicker' }}
|
|
28
34
|
</label>
|
|
29
35
|
<div
|
|
30
36
|
v-if="icon && iconType"
|
|
31
37
|
:class="[
|
|
32
38
|
iconType === 'startIcon' ? 'left-0 pl-3' : 'right-0 pr-3',
|
|
33
39
|
disabled ? 'cursor-not-allowed' : '',
|
|
34
|
-
inputFilled ? 'inset-y-0' : 'top-2',
|
|
40
|
+
inputFilled ? 'inset-y-0' : 'top-2',
|
|
41
|
+
'absolute z-10 flex items-center pointer-events-none',
|
|
35
42
|
]"
|
|
36
43
|
>
|
|
37
44
|
<component
|
|
@@ -40,35 +47,35 @@
|
|
|
40
47
|
aria-hidden="true"
|
|
41
48
|
/>
|
|
42
49
|
</div>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
50
|
+
<VueDatePicker
|
|
51
|
+
locale="en-US"
|
|
52
|
+
:name="name"
|
|
53
|
+
:placeholder="placeholder"
|
|
54
|
+
:model-value="datepicker"
|
|
55
|
+
:utc="isUtc"
|
|
56
|
+
:range="range"
|
|
57
|
+
:teleport="true"
|
|
58
|
+
:clearable="clearIcon"
|
|
59
|
+
:required="required"
|
|
60
|
+
:disabled="disabled"
|
|
61
|
+
:readonly="readonly"
|
|
62
|
+
:disabled-dates="disableDate ? disabledDates : undefined"
|
|
63
|
+
:time-picker="timePicker"
|
|
64
|
+
:enable-time-picker="false"
|
|
65
|
+
:enable-seconds="false"
|
|
66
|
+
:is-24="false"
|
|
67
|
+
:dark="false"
|
|
68
|
+
:inline="false"
|
|
69
|
+
:text-input="false"
|
|
70
|
+
:auto-apply="autoApply"
|
|
71
|
+
:hide-input-icon="true"
|
|
72
|
+
position="left"
|
|
73
|
+
:multi-calendars="multiCalendars"
|
|
74
|
+
:min-date="minDate"
|
|
75
|
+
:max-date="maxDate"
|
|
76
|
+
:format="format"
|
|
77
|
+
:config="config"
|
|
78
|
+
@update:model-value="handleDate"
|
|
72
79
|
/>
|
|
73
80
|
</div>
|
|
74
81
|
<EUIErrorMessage :errors="errors" :name="name" />
|
|
@@ -76,35 +83,34 @@
|
|
|
76
83
|
</template>
|
|
77
84
|
|
|
78
85
|
<script setup lang="ts">
|
|
79
|
-
import { computed,
|
|
80
|
-
import
|
|
81
|
-
import
|
|
86
|
+
import { computed, ref, toRefs, watch } from 'vue'
|
|
87
|
+
import type { PropType } from 'vue'
|
|
88
|
+
import VueDatePicker from '@vuepic/vue-datepicker'
|
|
89
|
+
import '@vuepic/vue-datepicker/dist/main.css'
|
|
82
90
|
|
|
83
91
|
const props = defineProps({
|
|
84
92
|
modelValue: {
|
|
85
93
|
type: Date as any,
|
|
86
|
-
default:
|
|
94
|
+
default: '',
|
|
87
95
|
},
|
|
88
96
|
format: {
|
|
89
97
|
type: [String, Function] as PropType<
|
|
90
|
-
| string
|
|
91
|
-
| ((date: Date) => string)
|
|
92
|
-
| ((dates: Date[]) => string)
|
|
98
|
+
string | ((date: Date) => string) | ((dates: Date[]) => string)
|
|
93
99
|
>,
|
|
94
100
|
default: 'dd/MM/yyyy', // Default format dd/MM/yyyy HH:mm
|
|
95
101
|
},
|
|
96
102
|
maxDate: {
|
|
97
103
|
type: Date as any,
|
|
98
|
-
default:
|
|
104
|
+
default: '',
|
|
99
105
|
},
|
|
100
106
|
minDate: {
|
|
101
107
|
type: Date as any,
|
|
102
|
-
default:
|
|
108
|
+
default: '',
|
|
103
109
|
},
|
|
104
110
|
name: {
|
|
105
111
|
type: String,
|
|
106
112
|
required: false,
|
|
107
|
-
default:
|
|
113
|
+
default: 'date-picker',
|
|
108
114
|
},
|
|
109
115
|
isUtc: {
|
|
110
116
|
type: Boolean,
|
|
@@ -121,15 +127,15 @@ const props = defineProps({
|
|
|
121
127
|
label: {
|
|
122
128
|
type: String,
|
|
123
129
|
required: true,
|
|
124
|
-
default:
|
|
130
|
+
default: '',
|
|
125
131
|
},
|
|
126
132
|
iconType: {
|
|
127
|
-
type: String as PropType<
|
|
128
|
-
default:
|
|
133
|
+
type: String as PropType<'startIcon' | 'endIcon'>,
|
|
134
|
+
default: '',
|
|
129
135
|
},
|
|
130
136
|
icon: {
|
|
131
137
|
type: [Object, String],
|
|
132
|
-
default:
|
|
138
|
+
default: '',
|
|
133
139
|
},
|
|
134
140
|
errors: { type: Object, required: false, default: () => {} },
|
|
135
141
|
timePicker: Boolean,
|
|
@@ -137,24 +143,26 @@ const props = defineProps({
|
|
|
137
143
|
disableDate: Boolean,
|
|
138
144
|
formatDate: Boolean,
|
|
139
145
|
readonly: Boolean,
|
|
140
|
-
disabled:Boolean,
|
|
146
|
+
disabled: Boolean,
|
|
141
147
|
required: Boolean,
|
|
142
|
-
range:Boolean,
|
|
143
|
-
multiCalendars:Boolean,
|
|
148
|
+
range: Boolean,
|
|
149
|
+
multiCalendars: Boolean,
|
|
144
150
|
autoApply: {
|
|
145
|
-
type:Boolean,
|
|
146
|
-
default: true
|
|
151
|
+
type: Boolean,
|
|
152
|
+
default: true,
|
|
147
153
|
},
|
|
148
154
|
inputFilled: {
|
|
149
|
-
type:Boolean,
|
|
150
|
-
default: false
|
|
155
|
+
type: Boolean,
|
|
156
|
+
default: false,
|
|
151
157
|
},
|
|
152
158
|
config: {
|
|
153
|
-
type: Object,
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
type: Object,
|
|
160
|
+
required: false,
|
|
161
|
+
default: () => {},
|
|
162
|
+
},
|
|
163
|
+
})
|
|
164
|
+
const emit = defineEmits(['update:modelValue'])
|
|
165
|
+
const { isUtc, clearIcon } = toRefs(props)
|
|
158
166
|
// const startDate = ref(new Date());
|
|
159
167
|
// const endDate = ref(new Date(new Date().setDate(startDate.value.getDate() + 7)));
|
|
160
168
|
|
|
@@ -170,45 +178,51 @@ const datepicker = ref(props.modelValue || (props.range ? [] : null))
|
|
|
170
178
|
//Date clear
|
|
171
179
|
watch(
|
|
172
180
|
() => props.modelValue,
|
|
173
|
-
|
|
174
|
-
if (
|
|
175
|
-
|
|
181
|
+
newValue => {
|
|
182
|
+
if (
|
|
183
|
+
newValue === null ||
|
|
184
|
+
newValue === undefined ||
|
|
185
|
+
(Array.isArray(newValue) && newValue.length === 0)
|
|
186
|
+
) {
|
|
187
|
+
datepicker.value = props.range ? [] : null
|
|
176
188
|
} else {
|
|
177
|
-
datepicker.value = newValue
|
|
189
|
+
datepicker.value = newValue
|
|
178
190
|
}
|
|
179
191
|
},
|
|
180
|
-
{ immediate: true }
|
|
181
|
-
)
|
|
192
|
+
{ immediate: true },
|
|
193
|
+
)
|
|
182
194
|
|
|
183
|
-
|
|
184
|
-
datepicker
|
|
185
|
-
(
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
);
|
|
195
|
+
const handleDate = (modelData: any) => {
|
|
196
|
+
datepicker.value = modelData
|
|
197
|
+
emit('update:modelValue', modelData)
|
|
198
|
+
}
|
|
189
199
|
|
|
190
200
|
const disabledDates = (date: Date) => {
|
|
191
|
-
const today = new Date()
|
|
192
|
-
today.setHours(0, 0, 0, 0)
|
|
193
|
-
return date < today
|
|
194
|
-
}
|
|
201
|
+
const today = new Date()
|
|
202
|
+
today.setHours(0, 0, 0, 0)
|
|
203
|
+
return date < today
|
|
204
|
+
}
|
|
195
205
|
|
|
196
206
|
const getIconClass = () => {
|
|
197
207
|
switch (props.iconType) {
|
|
198
|
-
case
|
|
199
|
-
return
|
|
200
|
-
case
|
|
201
|
-
return
|
|
208
|
+
case 'startIcon':
|
|
209
|
+
return 'pl-12 pr-4'
|
|
210
|
+
case 'endIcon':
|
|
211
|
+
return 'pr-12 pl-4'
|
|
202
212
|
default:
|
|
203
|
-
return
|
|
213
|
+
return 'px-4'
|
|
204
214
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
215
|
+
}
|
|
208
216
|
|
|
209
|
-
const iconshowLeft = computed(() =>
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
const iconshowLeft = computed(() =>
|
|
218
|
+
props.iconType === 'startIcon' ? '46px' : '16px',
|
|
219
|
+
)
|
|
220
|
+
const iconshowRight = computed(() =>
|
|
221
|
+
props.iconType === 'endIcon' ? '46px' : '16px',
|
|
222
|
+
)
|
|
223
|
+
const clearIconRight = computed(() =>
|
|
224
|
+
props.iconType === 'endIcon' ? '40px' : '0px',
|
|
225
|
+
)
|
|
212
226
|
</script>
|
|
213
227
|
|
|
214
228
|
<style lang="scss">
|
|
@@ -217,10 +231,10 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
|
|
|
217
231
|
--dp-menu-min-width: 232px;
|
|
218
232
|
}
|
|
219
233
|
.dp__theme_light {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
234
|
+
--dp-primary-color: rgba(139, 92, 246, 1);
|
|
235
|
+
--dp-row-margin: 2px 0;
|
|
236
|
+
--dp-cell-size: 36px;
|
|
237
|
+
}
|
|
224
238
|
|
|
225
239
|
.eui-datepicker {
|
|
226
240
|
@apply min-w-56;
|
|
@@ -231,10 +245,10 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
|
|
|
231
245
|
padding-right: v-bind(iconshowRight);
|
|
232
246
|
}
|
|
233
247
|
.dp__input.dp__input_focus {
|
|
234
|
-
|
|
248
|
+
@apply ring-2 ring-purple-600 rounded-2xl ring-inset h-[3.365rem];
|
|
235
249
|
}
|
|
236
250
|
.dp--clear-btn {
|
|
237
|
-
|
|
251
|
+
right: v-bind(clearIconRight);
|
|
238
252
|
}
|
|
239
253
|
}
|
|
240
254
|
&.normal {
|
|
@@ -243,7 +257,7 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
|
|
|
243
257
|
@apply py-2 ring-1 ring-gray-100;
|
|
244
258
|
}
|
|
245
259
|
.dp__input.dp__input_focus {
|
|
246
|
-
|
|
260
|
+
@apply ring-2 h-10 rounded-md ring-purple-600;
|
|
247
261
|
}
|
|
248
262
|
}
|
|
249
263
|
}
|
|
@@ -261,19 +275,18 @@ const clearIconRight = computed(() => (props.iconType === 'endIcon' ? '40px' : '
|
|
|
261
275
|
color: #fff;
|
|
262
276
|
}
|
|
263
277
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
278
|
+
.dp__calendar_header {
|
|
279
|
+
@apply text-sm font-medium;
|
|
280
|
+
}
|
|
281
|
+
.dp__cell_inner {
|
|
282
|
+
height: var(--dp-cell-size);
|
|
283
|
+
width: var(--dp-cell-size);
|
|
284
|
+
@apply text-sm font-normal;
|
|
285
|
+
}
|
|
286
|
+
.dp__month_year_wrap {
|
|
287
|
+
@apply text-sm font-semibold;
|
|
288
|
+
}
|
|
289
|
+
.dp__calendar_row {
|
|
290
|
+
margin: var(--dp-row-margin);
|
|
291
|
+
}
|
|
279
292
|
</style>
|
|
@@ -33,8 +33,13 @@ const meta = {
|
|
|
33
33
|
type: { summary: "Boolean" },
|
|
34
34
|
defaultValue: { summary: "false" },
|
|
35
35
|
},
|
|
36
|
+
fieldName: {
|
|
37
|
+
control: "text",
|
|
38
|
+
description:
|
|
39
|
+
"the field name of the target field which gonna be on view ",
|
|
36
40
|
},
|
|
37
41
|
},
|
|
42
|
+
}
|
|
38
43
|
} satisfies Meta<typeof EUISelect>;
|
|
39
44
|
|
|
40
45
|
export default meta;
|
|
@@ -53,7 +58,8 @@ export const Default: Story = {
|
|
|
53
58
|
],
|
|
54
59
|
modelValue: { value: "usa", label: "United States", name: "United States" },
|
|
55
60
|
errors: {},
|
|
56
|
-
required:
|
|
61
|
+
required: true,
|
|
62
|
+
fieldName:'name'
|
|
57
63
|
},
|
|
58
64
|
render: (args) => ({
|
|
59
65
|
components: { EUISelect },
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
{{ startCaseText(label) || "Select" }}
|
|
59
59
|
</div>
|
|
60
60
|
</template>
|
|
61
|
-
<template #selected-option="
|
|
61
|
+
<template #selected-option="item">
|
|
62
62
|
<div
|
|
63
63
|
:class="
|
|
64
64
|
isUseCustomSelect
|
|
@@ -68,27 +68,27 @@
|
|
|
68
68
|
>
|
|
69
69
|
<img
|
|
70
70
|
v-if="
|
|
71
|
-
name == 'country' ? getFlag({ nameText, iconlink }) : iconlink
|
|
71
|
+
name == 'country' ? getFlag({ nameText:item[fieldName], iconlink:(item as any)?.iconlink }) : (item as any)?.iconlink
|
|
72
72
|
"
|
|
73
73
|
:class="isUseCustomSelect ? 'w-6 mr-1 flex-initial' : 'w-6 mr-2'"
|
|
74
74
|
:src="
|
|
75
|
-
name == 'country' ? getFlag({ nameText, iconlink }) : iconlink
|
|
75
|
+
name == 'country' ? getFlag({ nameText:item[fieldName], iconlink:(item as any)?.iconlink }) : (item as any)?.iconlink
|
|
76
76
|
"
|
|
77
|
-
:alt="
|
|
77
|
+
:alt="item[fieldName]"
|
|
78
78
|
/>
|
|
79
|
-
{{ isStartCaseText ? startCaseText(
|
|
79
|
+
{{ isStartCaseText ? startCaseText(item[fieldName]) : item[fieldName] }}
|
|
80
80
|
</div>
|
|
81
81
|
</template>
|
|
82
|
-
<template #option="
|
|
82
|
+
<template #option="item">
|
|
83
83
|
<div class="flex items-center">
|
|
84
84
|
<img
|
|
85
|
-
v-if="iconlink"
|
|
85
|
+
v-if="(item as any).iconlink"
|
|
86
86
|
class="w-6 mr-2"
|
|
87
|
-
:src="iconlink"
|
|
88
|
-
:alt="
|
|
87
|
+
:src="(item as any).iconlink"
|
|
88
|
+
:alt="item[fieldName]"
|
|
89
89
|
/>
|
|
90
90
|
|
|
91
|
-
{{ isStartCaseText ? startCaseText(
|
|
91
|
+
{{ isStartCaseText ? startCaseText(item[fieldName]) : item[fieldName] }}
|
|
92
92
|
</div>
|
|
93
93
|
</template>
|
|
94
94
|
<template #spinner="{ loading: _loading }">
|
|
@@ -279,6 +279,10 @@ const props = defineProps({
|
|
|
279
279
|
type: Boolean,
|
|
280
280
|
default: false,
|
|
281
281
|
},
|
|
282
|
+
fieldName:{
|
|
283
|
+
type: String,
|
|
284
|
+
default: 'name',
|
|
285
|
+
}
|
|
282
286
|
});
|
|
283
287
|
|
|
284
288
|
const {
|
|
@@ -293,6 +297,7 @@ const {
|
|
|
293
297
|
isStartCaseText,
|
|
294
298
|
isSelectAll,
|
|
295
299
|
required,
|
|
300
|
+
fieldName
|
|
296
301
|
} = toRefs(props);
|
|
297
302
|
const emit = defineEmits([
|
|
298
303
|
"update:modelValue",
|
|
@@ -324,7 +329,7 @@ const change = (newValue: any) => {
|
|
|
324
329
|
|
|
325
330
|
const deselected = (newValue: any) => {
|
|
326
331
|
emit("deselected", newValue);
|
|
327
|
-
if (newValue.
|
|
332
|
+
if (newValue[fieldName.value] === "All") {
|
|
328
333
|
nodropDown.value = false;
|
|
329
334
|
}
|
|
330
335
|
};
|
|
@@ -510,10 +515,6 @@ const open=()=>{
|
|
|
510
515
|
|
|
511
516
|
}
|
|
512
517
|
|
|
513
|
-
// const handlers = (e: Event) => {
|
|
514
|
-
// console.log("@e", e);
|
|
515
|
-
// // e.preventDefault();
|
|
516
|
-
// };
|
|
517
518
|
</script>
|
|
518
519
|
<style lang="scss">
|
|
519
520
|
.scrollbar {
|
package/dist/EUIButton.vue.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=script&setup=true&lang.ts";
|
|
3
|
-
import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/button/EUIButton.vue?vue&type=style&index=0&lang.scss";
|
|
4
|
-
export default _sfc_main;
|
|
5
|
-
//# sourceMappingURL=EUIButton.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EUIButton.vue.d.ts","sourceRoot":"","sources":["../src/components/button/EUIButton.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wHAAwH,CAAC;AAC/I,cAAc,wHAAwH,CAAC;AACvI,OAAO,sHAAsH,CAAC;AAC9H,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/selectSearch/EUISelectSearch.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/selectSearch/EUISelectSearch.vue?vue&type=script&setup=true&lang.ts";
|
|
3
|
-
export default _sfc_main;
|
|
4
|
-
//# sourceMappingURL=EUISelectSearch.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EUISelectSearch.vue.d.ts","sourceRoot":"","sources":["../../src/components/selectSearch/EUISelectSearch.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oIAAoI,CAAC;AAC3J,cAAc,oIAAoI,CAAC;AACnJ,eAAe,SAAS,CAAC"}
|
|
File without changes
|
|
File without changes
|