edvoyui-component-library-test-flight 0.0.235 → 0.0.237

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.
@@ -276,10 +276,11 @@ const clearIconRight = computed(() =>
276
276
  --dp-primary-color: rgba(139, 92, 246, 1);
277
277
  --dp-row-margin: 2px 0;
278
278
  --dp-cell-size: 36px;
279
+ --dp-disabled-color: theme("colors.gray.100");
279
280
  }
280
281
 
281
282
  .eui-datepicker {
282
- @apply min-w-56;
283
+ @apply min-w-44;
283
284
  .dp__main {
284
285
  .dp__input {
285
286
  @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;
@@ -337,4 +338,7 @@ const clearIconRight = computed(() =>
337
338
  .dp__calendar_row {
338
339
  margin: var(--dp-row-margin);
339
340
  }
341
+ .dp__disabled {
342
+ background: var(--dp-disabled-color)
343
+ }
340
344
  </style>
@@ -107,6 +107,11 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
107
107
  required: false;
108
108
  default: boolean;
109
109
  };
110
+ readonly: {
111
+ type: PropType<boolean>;
112
+ required: false;
113
+ default: boolean;
114
+ };
110
115
  isStartCaseText: {
111
116
  type: PropType<boolean>;
112
117
  required: false;
@@ -268,6 +273,11 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
268
273
  required: false;
269
274
  default: boolean;
270
275
  };
276
+ readonly: {
277
+ type: PropType<boolean>;
278
+ required: false;
279
+ default: boolean;
280
+ };
271
281
  isStartCaseText: {
272
282
  type: PropType<boolean>;
273
283
  required: false;
@@ -354,6 +364,7 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
354
364
  required: boolean;
355
365
  modelValue: string | unknown[] | Record<string, any>;
356
366
  placeholder: string;
367
+ readonly: boolean;
357
368
  inputFilled: boolean;
358
369
  className: string[];
359
370
  value: string | unknown[] | Record<string, any>;
@@ -23,10 +23,11 @@
23
23
  :push-tags="pushtags"
24
24
  :deselect-from-dropdown="true"
25
25
  append-to-body
26
- :searchable="searchable"
26
+ :searchable="readonly ? false : searchable"
27
27
  :calculate-position="withPopper"
28
28
  :loading="loading"
29
29
  :disabled="disabled"
30
+ :aria-readonly="readonly"
30
31
  :selectable="selectedLimit"
31
32
  class="eui-style"
32
33
  :class="[
@@ -34,11 +35,11 @@
34
35
  ? 'customselect'
35
36
  : 'border border-gray-200 focus-within:border-purple-600 focus-within:ring-inset focus-within:ring-1 focus-within:ring-purple-600 z-10 focus-within:rounded',
36
37
  inputFilled ? 'rounded-xl min-h-14' : 'rounded-md min-h-10',
37
- 'group relative w-full bg-white cursor-pointer overflow-hidden',
38
- { 'opacity-75': disabled },
38
+ 'group relative w-full cursor-pointer overflow-hidden',
39
+ disabled ? 'bg-gray-100 cursor-not-allowed' : 'bg-white',
39
40
  className,
40
41
  ]"
41
- :clearable="clearable"
42
+ :clearable="readonly ? false : clearable"
42
43
  :no-drop="nodropDown"
43
44
  :components="customComponents"
44
45
  @search="search($event)"
@@ -58,8 +59,9 @@
58
59
  :class="[
59
60
  inputValue
60
61
  ? 'top-3.5 text-xs text-gray-400 cursor-default max-w-max'
61
- : 'top-1/2 text-sm text-gray-700 cursor-pointer h-14 pt-5 pb-4 bg-transparent ring-0 ring-gray-200 bg-white ml-px group-focus-within:top-3.5 group-focus-within:py-0 group-focus-within:h-auto group-focus-within:text-xs group-focus-within:w-max w-[88%] group-focus-within:-translate-y-1/2 group-focus-within:text-gray-400',
62
- disabled ? ' cursor-not-allowed' : '',
62
+ : 'top-1/2 text-sm text-gray-700 h-14 pt-5 pb-4 ring-0 ring-gray-200 ml-px group-focus-within:top-3.5 group-focus-within:py-0 group-focus-within:h-auto group-focus-within:text-xs group-focus-within:w-max w-[88%] group-focus-within:-translate-y-1/2 group-focus-within:text-gray-400',
63
+ !inputValue && (disabled ? 'bg-gray-100' : 'bg-white'),
64
+ disabled ? 'cursor-not-allowed' : !inputValue && 'cursor-pointer',
63
65
  required && `after:content-['*'] after:ml-0.5 after:text-red-500`,
64
66
  ]"
65
67
  class="absolute pointer-events-none text-left font-medium inset-x-0 px-4 z-10 -translate-y-1/2 duration-200 group-focus-within:top-3.5 group-focus-within:text-xs group-focus-within:text-gray-400 rounded-xl 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 capitalize leading-[normal]"
@@ -93,22 +95,33 @@
93
95
  :class="
94
96
  isUseCustomSelect
95
97
  ? 'break-words flex items-start'
96
- : 'flex items-center'
98
+ : 'flex items-center min-w-0 max-w-full overflow-hidden'
97
99
  "
98
100
  >
99
101
  <img
100
102
  v-if="
101
103
  name == 'country' ? getFlag({ nameText:item[fieldName], iconlink:(item as any)?.iconlink }) : (item as any)?.iconlink
102
104
  "
103
- :class="isUseCustomSelect ? 'w-6 mr-1 flex-initial' : 'w-6 mr-2'"
105
+ :class="
106
+ isUseCustomSelect
107
+ ? 'w-6 mr-1 flex-initial'
108
+ : 'w-6 mr-2 flex-shrink-0'
109
+ "
104
110
  :src="
105
111
  name == 'country' ? getFlag({ nameText:item[fieldName], iconlink:(item as any)?.iconlink }) : (item as any)?.iconlink
106
112
  "
107
113
  :alt="item[fieldName]"
108
114
  />
109
- {{
110
- isStartCaseText ? startCaseText(item[fieldName]) : item[fieldName]
111
- }}
115
+ <span
116
+ :class="!isUseCustomSelect && 'block min-w-0 truncate'"
117
+ :title="
118
+ !isUseCustomSelect ? String(item[fieldName] ?? '') : undefined
119
+ "
120
+ >
121
+ {{
122
+ isStartCaseText ? startCaseText(item[fieldName]) : item[fieldName]
123
+ }}
124
+ </span>
112
125
  </div>
113
126
  </template>
114
127
 
@@ -118,7 +131,7 @@
118
131
  <!-- Passing the 'option' data -->
119
132
  </template>
120
133
  <template v-else #option="item">
121
- <div class="flex items-center gap-2">
134
+ <div class="flex items-center gap-2 break-words whitespace-normal">
122
135
  <img
123
136
  v-if="(item as any).iconlink"
124
137
  class="flex-shrink-0 size-6"
@@ -396,6 +409,11 @@ const props = defineProps({
396
409
  required: false,
397
410
  default: false,
398
411
  },
412
+ readonly: {
413
+ type: Boolean as PropType<boolean>,
414
+ required: false,
415
+ default: false,
416
+ },
399
417
  isStartCaseText: {
400
418
  type: Boolean as PropType<boolean>,
401
419
  required: false,
@@ -495,6 +513,10 @@ const isCheckedAll = (e: Event) => {
495
513
  const isShowDropdown = ref(false);
496
514
 
497
515
  const dropdownShouldOpen = (VueSelect: any) => {
516
+ if (props.readonly) {
517
+ isShowDropdown.value = false;
518
+ return false;
519
+ }
498
520
  isShowDropdown.value = VueSelect.open;
499
521
  return VueSelect.open;
500
522
  };
@@ -716,6 +738,7 @@ const slectedChipHeight = computed(() =>
716
738
  const dropDownIcon = computed(() => (props.clearable ? "flex" : "none"));
717
739
 
718
740
  const selectBG = computed(() => {
741
+ if (props.disabled) return "var(--vs-disabled-bg)";
719
742
  if (selected.value?.length === 0 || !!_.isEmpty(selected.value)) {
720
743
  return "#ffffff";
721
744
  }
@@ -831,7 +854,7 @@ const open = () => {
831
854
  :root {
832
855
  --vs-dropdown-color: theme("colors.gray.600");
833
856
  --vs-dropdown-option--active-color: theme("colors.white");
834
- --vs-disabled-bg: theme("colors.white");
857
+ --vs-disabled-bg: theme("colors.gray.100");
835
858
  }
836
859
  .scrollbar {
837
860
  &--hide {
@@ -929,6 +952,16 @@ const open = () => {
929
952
  }
930
953
  }
931
954
 
955
+ .v-select.vs--single:not(.customselect) {
956
+ .vs__selected-options {
957
+ @apply min-w-0 flex-nowrap overflow-hidden;
958
+ }
959
+
960
+ .vs__selected {
961
+ @apply min-w-0 max-w-full overflow-hidden;
962
+ }
963
+ }
964
+
932
965
  .vs__selected-options {
933
966
  @apply group-focus:bg-transparent focus-within:bg-transparent border-transparent;
934
967
  background-color: v-bind(selectBG);