sprintify-ui 0.8.47 → 0.8.49
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.
|
@@ -8,12 +8,12 @@ declare function __VLS_template(): {
|
|
|
8
8
|
};
|
|
9
9
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
10
|
declare const __VLS_component: import("vue").DefineComponent<{
|
|
11
|
-
size
|
|
11
|
+
size?: "xs" | "sm" | "base" | "lg";
|
|
12
12
|
class?: ClassNameValue;
|
|
13
13
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
14
|
click: (...args: any[]) => void;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
-
size
|
|
16
|
+
size?: "xs" | "sm" | "base" | "lg";
|
|
17
17
|
class?: ClassNameValue;
|
|
18
18
|
}> & Readonly<{
|
|
19
19
|
onClick?: ((...args: any[]) => any) | undefined;
|
package/package.json
CHANGED
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
<div class="relative">
|
|
66
66
|
<div
|
|
67
67
|
v-show="dropdownOpened"
|
|
68
|
-
class="w-full min-h-[110px] overflow-hidden bg-white border-
|
|
68
|
+
class="w-full min-h-[110px] overflow-hidden bg-white border-slate-300 input-rounded"
|
|
69
69
|
:class="[
|
|
70
70
|
inline
|
|
71
|
-
? 'relative'
|
|
72
|
-
:
|
|
71
|
+
? 'relative border-b border-x rounded-t-none'
|
|
72
|
+
: 'absolute top-1 border shadow-2xl z-menu',
|
|
73
73
|
]"
|
|
74
74
|
>
|
|
75
75
|
<BaseAutocompleteDrawer
|
|
@@ -533,14 +533,16 @@ const inputClasses = computed(() => {
|
|
|
533
533
|
const base = 'w-full';
|
|
534
534
|
const paddingRight = showRemoveButtonInternal.value ? 'pr-5' : '';
|
|
535
535
|
const withSelect = props.select ? 'rounded-l-none' : '';
|
|
536
|
-
|
|
537
|
-
const
|
|
536
|
+
|
|
537
|
+
const inline = props.inline ? 'relative focus-within:ring-0 focus-within:border-slate-300' : '';
|
|
538
|
+
const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
|
|
538
539
|
|
|
539
540
|
const internalClasses = [
|
|
540
541
|
base,
|
|
541
542
|
withSelect,
|
|
542
543
|
paddingRight,
|
|
543
|
-
|
|
544
|
+
inline,
|
|
545
|
+
inlineOpen,
|
|
544
546
|
];
|
|
545
547
|
|
|
546
548
|
if (!props.twInput) {
|
|
@@ -552,12 +554,14 @@ const inputClasses = computed(() => {
|
|
|
552
554
|
|
|
553
555
|
const selectClasses = computed(() => {
|
|
554
556
|
const base = 'relative rounded-r-none min-w-0';
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
+
|
|
558
|
+
const inline = props.inline ? 'relative focus:ring-0 focus:border-slate-300' : '';
|
|
559
|
+
const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
|
|
557
560
|
|
|
558
561
|
const internalClasses = [
|
|
559
562
|
base,
|
|
560
|
-
|
|
563
|
+
inline,
|
|
564
|
+
inlineOpen,
|
|
561
565
|
];
|
|
562
566
|
|
|
563
567
|
if (!props.twSelect) {
|
|
@@ -46,11 +46,12 @@
|
|
|
46
46
|
|
|
47
47
|
<div class="relative">
|
|
48
48
|
<div
|
|
49
|
-
v-if="
|
|
49
|
+
v-if="dropdownOpened"
|
|
50
|
+
class="w-full min-h-[110px] overflow-hidden bg-white border-slate-300 input-rounded"
|
|
50
51
|
:class="[
|
|
51
52
|
inline
|
|
52
|
-
? 'relative'
|
|
53
|
-
: 'absolute top-1
|
|
53
|
+
? 'relative border-b border-x rounded-t-none'
|
|
54
|
+
: 'absolute top-1 border shadow-2xl z-menu',
|
|
54
55
|
]"
|
|
55
56
|
>
|
|
56
57
|
<BaseAutocompleteDrawer
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
:size="size"
|
|
61
62
|
:loading="loading"
|
|
62
63
|
:loading-bottom="loadingBottom"
|
|
63
|
-
|
|
64
|
+
tw-drawer="p-1"
|
|
64
65
|
:keywords="keywords"
|
|
65
66
|
@select="onSelect"
|
|
66
67
|
@scroll-bottom="emit('scrollBottom')"
|
|
@@ -256,6 +257,8 @@ const shouldFilter = ref(false);
|
|
|
256
257
|
const opened = ref(false);
|
|
257
258
|
const selectionToDelete = ref<NormalizedOption | null>(null);
|
|
258
259
|
|
|
260
|
+
const dropdownOpened = computed(() => opened.value || props.dropdownShow == 'always');
|
|
261
|
+
|
|
259
262
|
const isSelected = hasOptions.isSelected;
|
|
260
263
|
const normalizedOptions = hasOptions.normalizedOptions;
|
|
261
264
|
const normalizedModelValue = hasOptions.normalizedModelValue as ComputedRef<
|
|
@@ -432,9 +435,16 @@ const wrapperClass = computed(() => {
|
|
|
432
435
|
'xl': 'min-h-control-xl gap-1 p-1',
|
|
433
436
|
}[sizeInternal.value];
|
|
434
437
|
|
|
435
|
-
const focus =
|
|
438
|
+
const focus = (dropdownOpened.value && !props.inline) ? 'input-focus border-blue-300' : '';
|
|
439
|
+
const inline = (dropdownOpened.value && props.inline) ? 'rounded-b-none' : '';
|
|
440
|
+
|
|
441
|
+
const internalClasses = [base, error, height, focus, inline];
|
|
436
442
|
|
|
437
|
-
|
|
443
|
+
if (props.twContainer) {
|
|
444
|
+
return twMerge(internalClasses, props.twContainer);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return internalClasses;
|
|
438
448
|
});
|
|
439
449
|
|
|
440
450
|
const innerHeight = computed(() => {
|
|
@@ -455,6 +465,9 @@ const inputClasses = computed(() => {
|
|
|
455
465
|
const disabled = 'disabled:cursor-not-allowed';
|
|
456
466
|
const sizeConfig = sizes[sizeInternal.value];
|
|
457
467
|
|
|
468
|
+
const inline = props.inline ? 'relative focus:ring-0 focus:border-slate-300' : '';
|
|
469
|
+
const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
|
|
470
|
+
|
|
458
471
|
const padding = {
|
|
459
472
|
'xs': 'pl-1.5',
|
|
460
473
|
'sm': 'pl-2',
|
|
@@ -463,7 +476,7 @@ const inputClasses = computed(() => {
|
|
|
463
476
|
'xl': 'pl-2.5',
|
|
464
477
|
}[sizeInternal.value];
|
|
465
478
|
|
|
466
|
-
return [base, padding, innerHeight.value, focus, disabled, sizeConfig.fontSize];
|
|
479
|
+
return [base, padding, innerHeight.value, focus, disabled, sizeConfig.fontSize, inline, inlineOpen];
|
|
467
480
|
});
|
|
468
481
|
|
|
469
482
|
const selectionClass = (selection: NormalizedOption): string => {
|