sprintify-ui 0.0.86 → 0.0.87
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 +4 -2
- 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 +6 -2
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -2451,8 +2451,10 @@ 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: C(() => h(M)(he))
|
|
2455
|
-
active:
|
|
2454
|
+
selected: C(() => h(M)(he)),
|
|
2455
|
+
active: C(
|
|
2456
|
+
() => h(t) && h(t).value == he.value
|
|
2457
|
+
)
|
|
2456
2458
|
}, () => [
|
|
2457
2459
|
v("div", {
|
|
2458
2460
|
class: N(["flex items-center rounded px-2 py-1 text-sm", [ne(he), h(Y)]])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, ComputedRef } 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: boolean
|
|
407
|
-
active: boolean
|
|
406
|
+
selected: ComputedRef<boolean>;
|
|
407
|
+
active: ComputedRef<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: boolean
|
|
357
|
-
active: boolean
|
|
356
|
+
selected: import("vue").ComputedRef<boolean>;
|
|
357
|
+
active: import("vue").ComputedRef<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: boolean
|
|
363
|
-
active: boolean
|
|
362
|
+
selected: import("vue").ComputedRef<boolean>;
|
|
363
|
+
active: import("vue").ComputedRef<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 && !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,
|
|
114
|
+
'hover:bg-slate-100': !active.value && !selected.value,
|
|
115
|
+
'bg-slate-200 hover:bg-slate-300': active.value && !selected.value,
|
|
116
|
+
'bg-blue-500 text-white hover:bg-blue-600': !active.value && selected.value,
|
|
117
|
+
'bg-blue-600 text-white hover:bg-blue-700': active.value && selected.value,
|
|
118
118
|
}"
|
|
119
|
-
:style="{ color: selected ? '' : option.value }"
|
|
119
|
+
:style="{ color: selected.value ? '' : option.value }"
|
|
120
120
|
>
|
|
121
121
|
{{ option.label }}
|
|
122
122
|
</div>
|
|
@@ -95,8 +95,12 @@
|
|
|
95
95
|
<slot
|
|
96
96
|
name="option"
|
|
97
97
|
:option="option.option"
|
|
98
|
-
:selected="computed(() => isSelected(option))
|
|
99
|
-
:active="
|
|
98
|
+
:selected="computed(() => isSelected(option))"
|
|
99
|
+
:active="
|
|
100
|
+
computed(
|
|
101
|
+
() => optionActive && optionActive.value == option.value
|
|
102
|
+
)
|
|
103
|
+
"
|
|
100
104
|
>
|
|
101
105
|
<div
|
|
102
106
|
class="flex items-center rounded px-2 py-1 text-sm"
|