@saasmakers/ui 2.0.44 → 2.0.45
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.
|
@@ -100,6 +100,19 @@ const selectedOption = computed(() => {
|
|
|
100
100
|
})
|
|
101
101
|
})
|
|
102
102
|
|
|
103
|
+
const textSize = computed<BaseSize>(() => {
|
|
104
|
+
switch (props.size) {
|
|
105
|
+
case 'base':
|
|
106
|
+
return 'sm'
|
|
107
|
+
case 'lg':
|
|
108
|
+
return 'base'
|
|
109
|
+
case 'sm':
|
|
110
|
+
return 'xs'
|
|
111
|
+
default:
|
|
112
|
+
return 'sm'
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
|
|
103
116
|
watch(opened, (isOpened) => {
|
|
104
117
|
if (isOpened && props.searchable) {
|
|
105
118
|
nextTick(() => {
|
|
@@ -266,6 +279,7 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
266
279
|
:class="{ 'mr-2': !hideLabel && !square }"
|
|
267
280
|
:color="selectedOption.iconColor"
|
|
268
281
|
:icon="selectedOption.icon"
|
|
282
|
+
:size="textSize"
|
|
269
283
|
/>
|
|
270
284
|
|
|
271
285
|
<span
|
|
@@ -351,7 +365,7 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
351
365
|
class="pointer-events-none"
|
|
352
366
|
color="gray"
|
|
353
367
|
:icon="getLayerIcon('infoCircle')"
|
|
354
|
-
:size="
|
|
368
|
+
:size="textSize"
|
|
355
369
|
:text="t('noResults')"
|
|
356
370
|
/>
|
|
357
371
|
</div>
|
|
@@ -371,7 +385,10 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
371
385
|
:key="option.value"
|
|
372
386
|
class="flex cursor-pointer items-center outline-none"
|
|
373
387
|
:class="{
|
|
374
|
-
'base-border-b
|
|
388
|
+
'base-border-b px-3 hover:bg-gray-100 dark:hover:bg-gray-800 last:border-b-0': computedColumns.length < 2,
|
|
389
|
+
'h-10': size === 'sm' && computedColumns.length < 2,
|
|
390
|
+
'h-12': size === 'base' && computedColumns.length < 2,
|
|
391
|
+
'h-14': size === 'lg' && computedColumns.length < 2,
|
|
375
392
|
'px-2 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 last:mb-2': computedColumns.length >= 2,
|
|
376
393
|
'font-medium underline': option.value === selectedOption?.value,
|
|
377
394
|
'text-gray-900 dark:text-gray-100': option.value === selectedOption?.value,
|
|
@@ -401,7 +418,7 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
401
418
|
class="pointer-events-none mr-2 flex-initial"
|
|
402
419
|
:color="option.iconColor"
|
|
403
420
|
:icon="option.icon"
|
|
404
|
-
:size="
|
|
421
|
+
:size="textSize"
|
|
405
422
|
:text="option.text"
|
|
406
423
|
/>
|
|
407
424
|
</div>
|