sprintify-ui 0.0.87 → 0.0.88
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/sprintify-ui.es.js +2 -4
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +3 -3
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +2 -2
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/BaseAutocomplete.stories.js +5 -5
- package/src/components/BaseAutocomplete.vue +3 -7
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -2451,10 +2451,8 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2451
2451
|
}, [
|
|
2452
2452
|
Q(W.$slots, "option", {
|
|
2453
2453
|
option: he.option,
|
|
2454
|
-
selected:
|
|
2455
|
-
active:
|
|
2456
|
-
() => h(t) && h(t).value == he.value
|
|
2457
|
-
)
|
|
2454
|
+
selected: h(M)(he),
|
|
2455
|
+
active: h(t) && h(t).value == he.value
|
|
2458
2456
|
}, () => [
|
|
2459
2457
|
v("div", {
|
|
2460
2458
|
class: N(["flex items-center rounded px-2 py-1 text-sm", [ne(he), h(Y)]])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
2
|
import { NormalizedOption, Option } from '@/types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
new (...args: any[]): {
|
|
@@ -403,8 +403,8 @@ declare const _default: {
|
|
|
403
403
|
empty: (_: {}) => any;
|
|
404
404
|
option: (_: {
|
|
405
405
|
option: Option;
|
|
406
|
-
selected:
|
|
407
|
-
active:
|
|
406
|
+
selected: boolean;
|
|
407
|
+
active: boolean;
|
|
408
408
|
}) => any;
|
|
409
409
|
footer: (_: {
|
|
410
410
|
options: NormalizedOption[];
|
|
@@ -353,8 +353,8 @@ declare const _default: {
|
|
|
353
353
|
$slots: {
|
|
354
354
|
option: (_: {
|
|
355
355
|
option: Option;
|
|
356
|
-
selected:
|
|
357
|
-
active:
|
|
356
|
+
selected: boolean;
|
|
357
|
+
active: boolean;
|
|
358
358
|
}) => any;
|
|
359
359
|
footer: (_: {
|
|
360
360
|
options: import("@/types").NormalizedOption[];
|
|
@@ -359,8 +359,8 @@ declare const _default: {
|
|
|
359
359
|
$slots: {
|
|
360
360
|
option: (_: {
|
|
361
361
|
option: Option;
|
|
362
|
-
selected:
|
|
363
|
-
active:
|
|
362
|
+
selected: boolean;
|
|
363
|
+
active: boolean;
|
|
364
364
|
}) => any;
|
|
365
365
|
empty: (_: {
|
|
366
366
|
firstSearch: boolean;
|
package/package.json
CHANGED
|
@@ -111,12 +111,12 @@ export const SlotOption = (args) => ({
|
|
|
111
111
|
<div
|
|
112
112
|
class="rounded px-2 font-semibold py-1 text-sm"
|
|
113
113
|
:class="{
|
|
114
|
-
'hover:bg-slate-100': !active
|
|
115
|
-
'bg-slate-200 hover:bg-slate-300': active
|
|
116
|
-
'bg-blue-500 text-white hover:bg-blue-600': !active
|
|
117
|
-
'bg-blue-600 text-white hover:bg-blue-700': active
|
|
114
|
+
'hover:bg-slate-100': !active && !selected,
|
|
115
|
+
'bg-slate-200 hover:bg-slate-300': active && !selected,
|
|
116
|
+
'bg-blue-500 text-white hover:bg-blue-600': !active && selected,
|
|
117
|
+
'bg-blue-600 text-white hover:bg-blue-700': active && selected,
|
|
118
118
|
}"
|
|
119
|
-
:style="{ color: selected
|
|
119
|
+
:style="{ color: selected ? '' : option.value }"
|
|
120
120
|
>
|
|
121
121
|
{{ option.label }}
|
|
122
122
|
</div>
|
|
@@ -95,12 +95,8 @@
|
|
|
95
95
|
<slot
|
|
96
96
|
name="option"
|
|
97
97
|
:option="option.option"
|
|
98
|
-
:selected="
|
|
99
|
-
:active="
|
|
100
|
-
computed(
|
|
101
|
-
() => optionActive && optionActive.value == option.value
|
|
102
|
-
)
|
|
103
|
-
"
|
|
98
|
+
:selected="isSelected(option)"
|
|
99
|
+
:active="optionActive && optionActive.value == option.value"
|
|
104
100
|
>
|
|
105
101
|
<div
|
|
106
102
|
class="flex items-center rounded px-2 py-1 text-sm"
|
|
@@ -156,7 +152,7 @@
|
|
|
156
152
|
|
|
157
153
|
<script lang="ts" setup>
|
|
158
154
|
import { get } from 'lodash';
|
|
159
|
-
import { PropType, Ref, ComputedRef
|
|
155
|
+
import { PropType, Ref, ComputedRef } from 'vue';
|
|
160
156
|
import { NormalizedOption, Option } from '@/types';
|
|
161
157
|
import { useInfiniteScroll } from '@vueuse/core';
|
|
162
158
|
import BaseSkeleton from '@/components/BaseSkeleton.vue';
|