@sewadah/selaras 0.7.1 → 0.9.0
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/README.md +1 -1
- package/dist/agent/catalog.json +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/Autocomplete.vue +6 -0
- package/dist/runtime/components/AvatarGroup.vue +3 -2
- package/dist/runtime/components/CodeGroup.vue +3 -15
- package/dist/runtime/components/ColorModeSwitch.vue +5 -4
- package/dist/runtime/components/ColorModeToggle.vue +5 -4
- package/dist/runtime/components/Input.d.vue.ts +7 -4
- package/dist/runtime/components/Input.vue +22 -5
- package/dist/runtime/components/Input.vue.d.ts +7 -4
- package/dist/runtime/components/Listbox.d.vue.ts +28 -0
- package/dist/runtime/components/Listbox.vue +53 -0
- package/dist/runtime/components/Listbox.vue.d.ts +28 -0
- package/dist/runtime/components/Select.vue +6 -0
- package/dist/runtime/components/Textarea.d.vue.ts +7 -4
- package/dist/runtime/components/Textarea.vue +24 -7
- package/dist/runtime/components/Textarea.vue.d.ts +7 -4
- package/dist/runtime/components/TransferList.d.vue.ts +47 -0
- package/dist/runtime/components/TransferList.vue +67 -0
- package/dist/runtime/components/TransferList.vue.d.ts +47 -0
- package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +7 -63
- package/dist/runtime/internal/ComboboxSelectBase.vue +18 -5
- package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +7 -63
- package/dist/runtime/internal/ListSelectionForm.d.vue.ts +15 -0
- package/dist/runtime/internal/ListSelectionForm.vue +33 -0
- package/dist/runtime/internal/ListSelectionForm.vue.d.ts +15 -0
- package/dist/runtime/internal/ListboxBase.d.vue.ts +49 -0
- package/dist/runtime/internal/ListboxBase.vue +177 -0
- package/dist/runtime/internal/ListboxBase.vue.d.ts +49 -0
- package/dist/runtime/internal/ListboxOption.d.vue.ts +31 -0
- package/dist/runtime/internal/ListboxOption.vue +37 -0
- package/dist/runtime/internal/ListboxOption.vue.d.ts +31 -0
- package/dist/runtime/internal/TransferListBase.d.vue.ts +63 -0
- package/dist/runtime/internal/TransferListBase.vue +206 -0
- package/dist/runtime/internal/TransferListBase.vue.d.ts +63 -0
- package/dist/runtime/internal/color-mode-control.d.ts +7 -0
- package/dist/runtime/internal/color-mode-control.js +12 -0
- package/dist/runtime/internal/list-selection.d.ts +15 -0
- package/dist/runtime/internal/list-selection.js +43 -0
- package/dist/runtime/theme/input.d.ts +6 -0
- package/dist/runtime/theme/input.js +2 -0
- package/dist/runtime/theme/listbox.d.ts +131 -0
- package/dist/runtime/theme/listbox.js +27 -0
- package/dist/runtime/theme/select.d.ts +6 -0
- package/dist/runtime/theme/select.js +3 -1
- package/dist/runtime/theme/textarea.d.ts +6 -0
- package/dist/runtime/theme/textarea.js +2 -0
- package/dist/runtime/theme/transfer-list.d.ts +74 -0
- package/dist/runtime/theme/transfer-list.js +21 -0
- package/dist/runtime/theme-config.d.ts +10 -0
- package/dist/runtime/types/index.d.ts +3 -0
- package/dist/runtime/utils/field-adornments.d.ts +14 -0
- package/dist/runtime/utils/field-adornments.js +36 -0
- package/dist/runtime/utils/listbox-contracts.d.ts +31 -0
- package/dist/runtime/utils/listbox-contracts.js +0 -0
- package/dist/runtime/utils/messages.d.ts +7 -0
- package/dist/runtime/utils/messages.js +7 -0
- package/dist/runtime/utils/select-contracts.d.ts +3 -0
- package/dist/runtime/utils/slot-children.d.ts +2 -0
- package/dist/runtime/utils/slot-children.js +15 -0
- package/dist/runtime/utils/transfer-list-contracts.d.ts +48 -0
- package/dist/runtime/utils/transfer-list-contracts.js +0 -0
- package/package.json +5 -4
- package/skills/selaras/SKILL.md +7 -7
package/dist/module.json
CHANGED
|
@@ -69,6 +69,12 @@ const unscopedSlots = ["header", "footer", "empty", "empty-filter", "clear-icon"
|
|
|
69
69
|
@update:model-value="updateValue"
|
|
70
70
|
@update:search-term="emit('update:searchTerm', $event)"
|
|
71
71
|
>
|
|
72
|
+
<template v-if="slots.leading" #leading="scope">
|
|
73
|
+
<slot name="leading" v-bind="scope" />
|
|
74
|
+
</template>
|
|
75
|
+
<template v-if="slots.trailing" #trailing="scope">
|
|
76
|
+
<slot name="trailing" v-bind="scope" />
|
|
77
|
+
</template>
|
|
72
78
|
<template v-if="slots.item" #item="{ item }">
|
|
73
79
|
<slot name="item" :item="itemData(item)" />
|
|
74
80
|
</template>
|
|
@@ -3,6 +3,7 @@ import { computed, provide, useSlots } from "vue";
|
|
|
3
3
|
import { useMessages } from "../composables/use-messages";
|
|
4
4
|
import { avatarGroupTheme } from "../theme/avatar-group";
|
|
5
5
|
import { AVATAR_SIZE_INJECTION_KEY } from "../utils/injection-keys";
|
|
6
|
+
import { flattenSlotChildren } from "../utils/slot-children";
|
|
6
7
|
import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
|
|
7
8
|
defineOptions({ inheritAttrs: false });
|
|
8
9
|
const props = defineProps({
|
|
@@ -18,7 +19,7 @@ const ui = computed(() => theme.value({
|
|
|
18
19
|
}));
|
|
19
20
|
const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
|
|
20
21
|
provide(AVATAR_SIZE_INJECTION_KEY, computed(() => props.size));
|
|
21
|
-
const slotChildren = computed(() => slots.default?.() ?? []);
|
|
22
|
+
const slotChildren = computed(() => flattenSlotChildren(slots.default?.() ?? []));
|
|
22
23
|
const visibleChildren = computed(() => {
|
|
23
24
|
if (!props.max || slotChildren.value.length <= props.max)
|
|
24
25
|
return slotChildren.value;
|
|
@@ -34,7 +35,7 @@ const overflowCount = computed(() => {
|
|
|
34
35
|
<template>
|
|
35
36
|
<div v-bind="rootProps">
|
|
36
37
|
<span v-if="overflowCount" v-bind="resolveSlot(ui.count, props.ui?.count)">{{ messages.avatarGroupOverflow(overflowCount) }}</span>
|
|
37
|
-
<span v-for="(child, i) in visibleChildren" :key="i" v-bind="resolveSlot(ui.item, props.ui?.item)">
|
|
38
|
+
<span v-for="(child, i) in visibleChildren" :key="child.key ?? i" v-bind="resolveSlot(ui.item, props.ui?.item)">
|
|
38
39
|
<component :is="child" />
|
|
39
40
|
</span>
|
|
40
41
|
</div>
|
|
@@ -1,25 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { cloneVNode,
|
|
2
|
+
import { cloneVNode, computed, ref, useSlots } from "vue";
|
|
3
3
|
import { useMessages } from "../composables/use-messages";
|
|
4
4
|
import { resolveFileIcon } from "../utils/file-icons";
|
|
5
|
+
import { flattenSlotChildren } from "../utils/slot-children";
|
|
5
6
|
import ProsePre from "./ProsePre.vue";
|
|
6
7
|
import Tabs from "./Tabs.vue";
|
|
7
8
|
const slots = useSlots();
|
|
8
9
|
const messages = useMessages();
|
|
9
|
-
|
|
10
|
-
const result = [];
|
|
11
|
-
for (const vnode of vnodes) {
|
|
12
|
-
if (vnode.type === Comment || vnode.type === Text)
|
|
13
|
-
continue;
|
|
14
|
-
if (vnode.type === Fragment && Array.isArray(vnode.children)) {
|
|
15
|
-
result.push(...flatten(vnode.children));
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
result.push(vnode);
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
const children = computed(() => flatten(slots.default?.() ?? []));
|
|
10
|
+
const children = computed(() => flattenSlotChildren(slots.default?.() ?? []));
|
|
23
11
|
function labelFor(child, index) {
|
|
24
12
|
const props = child.props ?? {};
|
|
25
13
|
return props.filename || props.language || messages.value.codeTabFallback(index + 1);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, useAttrs, useSlots } from "vue";
|
|
3
|
-
import { useColorMode } from "#imports";
|
|
4
3
|
import { useIcons } from "../composables/use-icons";
|
|
5
4
|
import { useMessages } from "../composables/use-messages";
|
|
5
|
+
import { useColorModeControl } from "../internal/color-mode-control";
|
|
6
6
|
import Switch from "./Switch.vue";
|
|
7
7
|
defineOptions({ inheritAttrs: false });
|
|
8
8
|
const props = defineProps({
|
|
@@ -18,10 +18,9 @@ const props = defineProps({
|
|
|
18
18
|
});
|
|
19
19
|
const attrs = useAttrs();
|
|
20
20
|
const slots = useSlots();
|
|
21
|
-
const colorMode =
|
|
21
|
+
const { colorMode, isDark, isDisabled } = useColorModeControl();
|
|
22
22
|
const icons = useIcons();
|
|
23
23
|
const messages = useMessages();
|
|
24
|
-
const isDark = computed(() => colorMode.value === "dark");
|
|
25
24
|
const switchUi = computed(() => {
|
|
26
25
|
const track = typeof props.ui?.track === "string" ? { class: props.ui.track } : props.ui?.track;
|
|
27
26
|
return {
|
|
@@ -35,6 +34,8 @@ const switchUi = computed(() => {
|
|
|
35
34
|
};
|
|
36
35
|
});
|
|
37
36
|
function updateMode(dark) {
|
|
37
|
+
if (isDisabled.value || props.disabled)
|
|
38
|
+
return;
|
|
38
39
|
colorMode.preference = dark ? "dark" : "light";
|
|
39
40
|
}
|
|
40
41
|
</script>
|
|
@@ -43,7 +44,7 @@ function updateMode(dark) {
|
|
|
43
44
|
<Switch
|
|
44
45
|
v-bind="{ ...attrs, ...props }"
|
|
45
46
|
:model-value="isDark"
|
|
46
|
-
:disabled="disabled ||
|
|
47
|
+
:disabled="disabled || isDisabled"
|
|
47
48
|
:checked-icon="checkedIcon ?? icons.darkMode"
|
|
48
49
|
:unchecked-icon="uncheckedIcon ?? icons.lightMode"
|
|
49
50
|
:ui="switchUi"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from "vue";
|
|
3
|
-
import { useColorMode } from "#imports";
|
|
4
2
|
import { useIcons } from "../composables/use-icons";
|
|
5
3
|
import { useMessages } from "../composables/use-messages";
|
|
4
|
+
import { useColorModeControl } from "../internal/color-mode-control";
|
|
6
5
|
import Button from "./Button.vue";
|
|
7
|
-
const colorMode =
|
|
6
|
+
const { colorMode, isDark, isDisabled } = useColorModeControl();
|
|
8
7
|
const icons = useIcons();
|
|
9
8
|
const messages = useMessages();
|
|
10
|
-
const isDark = computed(() => colorMode.value === "dark");
|
|
11
9
|
function toggle() {
|
|
10
|
+
if (isDisabled.value)
|
|
11
|
+
return;
|
|
12
12
|
colorMode.preference = isDark.value ? "light" : "dark";
|
|
13
13
|
}
|
|
14
14
|
</script>
|
|
@@ -19,6 +19,7 @@ function toggle() {
|
|
|
19
19
|
variant="ghost"
|
|
20
20
|
color="neutral"
|
|
21
21
|
:aria-label="messages.colorModeToggle"
|
|
22
|
+
:disabled="isDisabled"
|
|
22
23
|
@click="toggle"
|
|
23
24
|
/>
|
|
24
25
|
</template>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { InputThemeSlots } from '../theme/input.js';
|
|
3
3
|
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
|
+
import type { FieldAdornmentSlotProps } from '../utils/field-adornments.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { inputTheme } from '../theme/input.js';
|
|
6
7
|
type InputVariants = VariantProps<typeof inputTheme>;
|
|
8
|
+
type __VLS_Slots = InputSlots;
|
|
7
9
|
export interface InputProps {
|
|
8
10
|
id?: string;
|
|
9
11
|
name?: string;
|
|
@@ -23,10 +25,11 @@ export interface InputProps {
|
|
|
23
25
|
export interface InputEmits {
|
|
24
26
|
'update:modelValue': [value: string];
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
|
|
28
|
+
export interface InputSlots {
|
|
29
|
+
'leading'?: (props: FieldAdornmentSlotProps) => any;
|
|
30
|
+
'trailing'?: (props: FieldAdornmentSlotProps) => any;
|
|
31
|
+
'clear-icon'?: () => any;
|
|
32
|
+
}
|
|
30
33
|
declare const __VLS_base: import("vue").DefineComponent<InputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
34
|
"update:modelValue": (value: string) => any;
|
|
32
35
|
}, string, import("vue").PublicProps, Readonly<InputProps> & Readonly<{
|
|
@@ -4,6 +4,7 @@ import { useFormField } from "../composables/use-form-field";
|
|
|
4
4
|
import { useIcons } from "../composables/use-icons";
|
|
5
5
|
import { useMessages } from "../composables/use-messages";
|
|
6
6
|
import { inputTheme } from "../theme/input";
|
|
7
|
+
import { useFieldAdornments } from "../utils/field-adornments";
|
|
7
8
|
import { isNativeInputA11yAttr, isNativeInputAttr } from "../utils/native-input";
|
|
8
9
|
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
9
10
|
import { resolveSlot, useComponentTheme, useFallthroughAttrs, useRootProps, useThemeProps } from "../utils/ui";
|
|
@@ -26,6 +27,8 @@ const props = defineProps({
|
|
|
26
27
|
ui: { type: Object, required: false }
|
|
27
28
|
});
|
|
28
29
|
const emit = defineEmits(["update:modelValue"]);
|
|
30
|
+
const slots = defineSlots();
|
|
31
|
+
const { leading, trailing, padding, clearOffset } = useFieldAdornments();
|
|
29
32
|
const field = useFormField();
|
|
30
33
|
const effectivePlaceholder = computed(() => props.placeholder || (field?.floatingLabel.value ? " " : void 0));
|
|
31
34
|
const inputId = computed(() => props.id ?? field?.id);
|
|
@@ -39,6 +42,8 @@ function clear() {
|
|
|
39
42
|
const themeProps = useThemeProps("input");
|
|
40
43
|
const effectiveSize = computed(() => props.size ?? field?.size ?? themeProps.value.size ?? "md");
|
|
41
44
|
const clearSize = computed(() => ({ sm: "sm", md: "sm", lg: "md" })[effectiveSize.value]);
|
|
45
|
+
const adornmentScope = computed(() => ({ disabled: !!props.disabled, size: effectiveSize.value, buttonSize: clearSize.value }));
|
|
46
|
+
const clearWidth = computed(() => ({ sm: "1.75rem", md: "2.25rem", lg: "2.5rem" })[effectiveSize.value]);
|
|
42
47
|
const icons = useIcons();
|
|
43
48
|
const messages = useMessages();
|
|
44
49
|
const theme = useComponentTheme("input", inputTheme);
|
|
@@ -55,11 +60,20 @@ const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root, { excl
|
|
|
55
60
|
const nativeInputAttrs = useFallthroughAttrs(isInputAttr);
|
|
56
61
|
const baseProps = computed(() => resolveSlot(ui.value.base, props.ui?.base));
|
|
57
62
|
const inputProps = computed(() => mergeProps(baseProps.value, nativeInputAttrs.value));
|
|
63
|
+
function adornedInputProps() {
|
|
64
|
+
return mergeProps({ style: padding(!!slots.leading, !!slots.trailing, showClear.value ? clearWidth.value : "0rem") }, inputProps.value);
|
|
65
|
+
}
|
|
66
|
+
function clearProps() {
|
|
67
|
+
return mergeProps({ style: slots.trailing ? clearOffset() : void 0 }, resolveSlot(ui.value.clear, props.ui?.clear));
|
|
68
|
+
}
|
|
58
69
|
</script>
|
|
59
70
|
|
|
60
71
|
<template>
|
|
61
|
-
<div :data-selaras-color="inputInvalid ? 'danger' : effectiveColor" :data-selaras-field-leading="icon ? '' : void 0" v-bind="rootProps">
|
|
62
|
-
<
|
|
72
|
+
<div :data-selaras-color="inputInvalid ? 'danger' : effectiveColor" :data-selaras-field-leading="icon || slots.leading ? '' : void 0" v-bind="rootProps">
|
|
73
|
+
<fieldset v-if="slots.leading" ref="leading" :disabled="disabled" :inert="disabled || void 0" v-bind="resolveSlot(ui.leading, props.ui?.leading)">
|
|
74
|
+
<slot name="leading" v-bind="adornmentScope" />
|
|
75
|
+
</fieldset>
|
|
76
|
+
<Icon v-else-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
63
77
|
<input
|
|
64
78
|
:id="inputId"
|
|
65
79
|
data-ui-group-item
|
|
@@ -70,7 +84,7 @@ const inputProps = computed(() => mergeProps(baseProps.value, nativeInputAttrs.v
|
|
|
70
84
|
:disabled="disabled"
|
|
71
85
|
:aria-invalid="inputInvalid || void 0"
|
|
72
86
|
:aria-describedby="describedBy"
|
|
73
|
-
v-bind="
|
|
87
|
+
v-bind="adornedInputProps()"
|
|
74
88
|
@input="$emit('update:modelValue', $event.target.value)"
|
|
75
89
|
>
|
|
76
90
|
<Button
|
|
@@ -79,7 +93,7 @@ const inputProps = computed(() => mergeProps(baseProps.value, nativeInputAttrs.v
|
|
|
79
93
|
variant="text"
|
|
80
94
|
color="neutral"
|
|
81
95
|
:aria-label="messages.clear"
|
|
82
|
-
v-bind="
|
|
96
|
+
v-bind="clearProps()"
|
|
83
97
|
@click="clear"
|
|
84
98
|
>
|
|
85
99
|
<template #icon="{ class: iconClass }">
|
|
@@ -88,6 +102,9 @@ const inputProps = computed(() => mergeProps(baseProps.value, nativeInputAttrs.v
|
|
|
88
102
|
</slot>
|
|
89
103
|
</template>
|
|
90
104
|
</Button>
|
|
91
|
-
<Icon v-else-if="trailingIcon" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
105
|
+
<Icon v-else-if="trailingIcon && !slots.trailing" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
106
|
+
<fieldset v-if="slots.trailing" ref="trailing" :disabled="disabled" :inert="disabled || void 0" v-bind="resolveSlot(ui.trailing, props.ui?.trailing)">
|
|
107
|
+
<slot name="trailing" v-bind="adornmentScope" />
|
|
108
|
+
</fieldset>
|
|
92
109
|
</div>
|
|
93
110
|
</template>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { InputThemeSlots } from '../theme/input.js';
|
|
3
3
|
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
|
+
import type { FieldAdornmentSlotProps } from '../utils/field-adornments.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { inputTheme } from '../theme/input.js';
|
|
6
7
|
type InputVariants = VariantProps<typeof inputTheme>;
|
|
8
|
+
type __VLS_Slots = InputSlots;
|
|
7
9
|
export interface InputProps {
|
|
8
10
|
id?: string;
|
|
9
11
|
name?: string;
|
|
@@ -23,10 +25,11 @@ export interface InputProps {
|
|
|
23
25
|
export interface InputEmits {
|
|
24
26
|
'update:modelValue': [value: string];
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
|
|
28
|
+
export interface InputSlots {
|
|
29
|
+
'leading'?: (props: FieldAdornmentSlotProps) => any;
|
|
30
|
+
'trailing'?: (props: FieldAdornmentSlotProps) => any;
|
|
31
|
+
'clear-icon'?: () => any;
|
|
32
|
+
}
|
|
30
33
|
declare const __VLS_base: import("vue").DefineComponent<InputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
34
|
"update:modelValue": (value: string) => any;
|
|
32
35
|
}, string, import("vue").PublicProps, Readonly<InputProps> & Readonly<{
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ListboxProps, ListboxSlots } from '../utils/listbox-contracts.js';
|
|
2
|
+
import type { SelectEntry, SelectModel } from '../utils/select-contracts.js';
|
|
3
|
+
export type { ListboxEmits, ListboxProps, ListboxSlots } from '../utils/listbox-contracts.js';
|
|
4
|
+
declare const __VLS_export: <Entry extends SelectEntry, Key extends string = "value", Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<ListboxProps<Entry, Key, Multiple> & {
|
|
6
|
+
"onUpdate:modelValue"?: ((value: SelectModel<import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
7
|
+
value: infer Value;
|
|
8
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never, Multiple>) => any) | undefined;
|
|
9
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: ListboxSlots<Entry>;
|
|
16
|
+
emit: ((evt: "update:modelValue", value: SelectModel<import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
17
|
+
value: infer Value;
|
|
18
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never, Multiple>) => void) & ((evt: "update:searchTerm", value: string) => void);
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { getCurrentInstance } from "vue";
|
|
3
|
+
import ListboxBase from "../internal/ListboxBase.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
label: { type: String, required: false },
|
|
6
|
+
descriptionKey: { type: String, required: false },
|
|
7
|
+
selectionBehavior: { type: String, required: false },
|
|
8
|
+
checkbox: { type: Boolean, required: false },
|
|
9
|
+
selectAll: { type: Boolean, required: false },
|
|
10
|
+
ui: { type: Object, required: false },
|
|
11
|
+
items: { type: Array, required: true },
|
|
12
|
+
modelValue: { type: null, required: false },
|
|
13
|
+
defaultValue: { type: null, required: false },
|
|
14
|
+
valueKey: { type: void 0, required: false },
|
|
15
|
+
labelKey: { type: String, required: false },
|
|
16
|
+
multiple: { type: null, required: false },
|
|
17
|
+
searchable: { type: Boolean, required: false },
|
|
18
|
+
searchTerm: { type: String, required: false },
|
|
19
|
+
virtualize: { type: [Boolean, Object], required: false },
|
|
20
|
+
disabled: { type: Boolean, required: false },
|
|
21
|
+
loading: { type: Boolean, required: false },
|
|
22
|
+
invalid: { type: Boolean, required: false },
|
|
23
|
+
size: { type: null, required: false },
|
|
24
|
+
color: { type: null, required: false },
|
|
25
|
+
id: { type: String, required: false },
|
|
26
|
+
name: { type: String, required: false },
|
|
27
|
+
form: { type: String, required: false },
|
|
28
|
+
required: { type: Boolean, required: false }
|
|
29
|
+
});
|
|
30
|
+
const emit = defineEmits(["update:modelValue", "update:searchTerm"]);
|
|
31
|
+
const slots = defineSlots();
|
|
32
|
+
const instance = getCurrentInstance();
|
|
33
|
+
function baseProps() {
|
|
34
|
+
const controlled = Object.hasOwn(instance.vnode.props ?? {}, "modelValue") || Object.hasOwn(instance.vnode.props ?? {}, "model-value");
|
|
35
|
+
const { modelValue, ...rest } = props;
|
|
36
|
+
return { ...rest, ...controlled ? { modelValue } : {} };
|
|
37
|
+
}
|
|
38
|
+
const plainSlots = ["header", "footer", "empty", "empty-filter"];
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<ListboxBase v-bind="baseProps()" @update:model-value="emit('update:modelValue', $event)" @update:search-term="emit('update:searchTerm', $event)">
|
|
43
|
+
<template v-if="slots.item" #item="data">
|
|
44
|
+
<slot name="item" v-bind="data" />
|
|
45
|
+
</template>
|
|
46
|
+
<template v-if="slots.group" #group="{ group }">
|
|
47
|
+
<slot name="group" :group="group" />
|
|
48
|
+
</template>
|
|
49
|
+
<template v-for="name in plainSlots.filter((name) => slots[name])" :key="name" #[name]>
|
|
50
|
+
<slot :name="name" />
|
|
51
|
+
</template>
|
|
52
|
+
</ListboxBase>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ListboxProps, ListboxSlots } from '../utils/listbox-contracts.js';
|
|
2
|
+
import type { SelectEntry, SelectModel } from '../utils/select-contracts.js';
|
|
3
|
+
export type { ListboxEmits, ListboxProps, ListboxSlots } from '../utils/listbox-contracts.js';
|
|
4
|
+
declare const __VLS_export: <Entry extends SelectEntry, Key extends string = "value", Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<ListboxProps<Entry, Key, Multiple> & {
|
|
6
|
+
"onUpdate:modelValue"?: ((value: SelectModel<import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
7
|
+
value: infer Value;
|
|
8
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never, Multiple>) => any) | undefined;
|
|
9
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: ListboxSlots<Entry>;
|
|
16
|
+
emit: ((evt: "update:modelValue", value: SelectModel<import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
17
|
+
value: infer Value;
|
|
18
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never, Multiple>) => void) & ((evt: "update:searchTerm", value: string) => void);
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -75,6 +75,12 @@ const unscopedSlots = ["header", "footer", "empty", "empty-filter", "filter-icon
|
|
|
75
75
|
@update:model-value="updateValue"
|
|
76
76
|
@update:search-term="emit('update:searchTerm', $event)"
|
|
77
77
|
>
|
|
78
|
+
<template v-if="slots.leading" #leading="scope">
|
|
79
|
+
<slot name="leading" v-bind="scope" />
|
|
80
|
+
</template>
|
|
81
|
+
<template v-if="slots.trailing" #trailing="scope">
|
|
82
|
+
<slot name="trailing" v-bind="scope" />
|
|
83
|
+
</template>
|
|
78
84
|
<template v-if="slots.item" #item="{ item }">
|
|
79
85
|
<slot name="item" :item="itemData(item)" />
|
|
80
86
|
</template>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TextareaThemeSlots } from '../theme/textarea.js';
|
|
3
3
|
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
|
+
import type { FieldAdornmentSlotProps } from '../utils/field-adornments.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { textareaTheme } from '../theme/textarea.js';
|
|
6
7
|
type TextareaVariants = VariantProps<typeof textareaTheme>;
|
|
8
|
+
type __VLS_Slots = TextareaSlots;
|
|
7
9
|
export interface TextareaProps {
|
|
8
10
|
id?: string;
|
|
9
11
|
name?: string;
|
|
@@ -27,10 +29,11 @@ export interface TextareaProps {
|
|
|
27
29
|
export interface TextareaEmits {
|
|
28
30
|
'update:modelValue': [value: string];
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
|
|
32
|
+
export interface TextareaSlots {
|
|
33
|
+
'leading'?: (props: FieldAdornmentSlotProps) => any;
|
|
34
|
+
'trailing'?: (props: FieldAdornmentSlotProps) => any;
|
|
35
|
+
'clear-icon'?: () => any;
|
|
36
|
+
}
|
|
34
37
|
declare const __VLS_base: import("vue").DefineComponent<TextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
38
|
"update:modelValue": (value: string) => any;
|
|
36
39
|
}, string, import("vue").PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
@@ -4,6 +4,7 @@ import { useFormField } from "../composables/use-form-field";
|
|
|
4
4
|
import { useIcons } from "../composables/use-icons";
|
|
5
5
|
import { useMessages } from "../composables/use-messages";
|
|
6
6
|
import { textareaTheme } from "../theme/textarea";
|
|
7
|
+
import { useFieldAdornments } from "../utils/field-adornments";
|
|
7
8
|
import { isNativeInputA11yAttr, isNativeInputAttr } from "../utils/native-input";
|
|
8
9
|
import { resolveRegisteredColorRole } from "../utils/registered-colors";
|
|
9
10
|
import { resolveSlot, useComponentTheme, useFallthroughAttrs, useRootProps } from "../utils/ui";
|
|
@@ -28,6 +29,8 @@ const props = defineProps({
|
|
|
28
29
|
ui: { type: Object, required: false }
|
|
29
30
|
});
|
|
30
31
|
const emit = defineEmits(["update:modelValue"]);
|
|
32
|
+
const slots = defineSlots();
|
|
33
|
+
const { leading, trailing, padding, clearOffset } = useFieldAdornments();
|
|
31
34
|
const field = useFormField();
|
|
32
35
|
const effectivePlaceholder = computed(() => props.placeholder || (field?.floatingLabel.value ? " " : void 0));
|
|
33
36
|
const textareaId = computed(() => props.id ?? field?.id);
|
|
@@ -40,6 +43,8 @@ function clear() {
|
|
|
40
43
|
}
|
|
41
44
|
const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
|
|
42
45
|
const clearSize = computed(() => ({ sm: "sm", md: "sm", lg: "md" })[effectiveSize.value]);
|
|
46
|
+
const adornmentScope = computed(() => ({ disabled: !!props.disabled, size: effectiveSize.value, buttonSize: clearSize.value }));
|
|
47
|
+
const clearWidth = computed(() => ({ sm: "1.75rem", md: "2.25rem", lg: "2.5rem" })[effectiveSize.value]);
|
|
43
48
|
const icons = useIcons();
|
|
44
49
|
const messages = useMessages();
|
|
45
50
|
const theme = useComponentTheme("textarea", textareaTheme);
|
|
@@ -66,8 +71,8 @@ async function resize() {
|
|
|
66
71
|
if (props.maxrows) {
|
|
67
72
|
const cs = getComputedStyle(el);
|
|
68
73
|
const lineHeight = Number.parseFloat(cs.lineHeight);
|
|
69
|
-
const
|
|
70
|
-
const maxHeight = lineHeight * props.maxrows +
|
|
74
|
+
const padding2 = Number.parseFloat(cs.paddingTop) + Number.parseFloat(cs.paddingBottom);
|
|
75
|
+
const maxHeight = lineHeight * props.maxrows + padding2;
|
|
71
76
|
el.style.height = `${Math.min(el.scrollHeight, maxHeight)}px`;
|
|
72
77
|
el.style.overflowY = el.scrollHeight > maxHeight ? "auto" : "hidden";
|
|
73
78
|
return;
|
|
@@ -76,11 +81,20 @@ async function resize() {
|
|
|
76
81
|
}
|
|
77
82
|
onMounted(resize);
|
|
78
83
|
watch(() => props.modelValue, resize);
|
|
84
|
+
function adornedInputProps() {
|
|
85
|
+
return mergeProps({ style: padding(!!slots.leading, !!slots.trailing, showClear.value ? clearWidth.value : "0rem") }, baseProps.value);
|
|
86
|
+
}
|
|
87
|
+
function clearProps() {
|
|
88
|
+
return mergeProps({ style: slots.trailing ? clearOffset() : void 0 }, resolveSlot(ui.value.clear, props.ui?.clear));
|
|
89
|
+
}
|
|
79
90
|
</script>
|
|
80
91
|
|
|
81
92
|
<template>
|
|
82
|
-
<div :data-selaras-color="textareaInvalid ? 'danger' : effectiveColor" :data-selaras-field-leading="icon ? '' : void 0" v-bind="rootProps">
|
|
83
|
-
<
|
|
93
|
+
<div :data-selaras-color="textareaInvalid ? 'danger' : effectiveColor" :data-selaras-field-leading="icon || slots.leading ? '' : void 0" v-bind="rootProps">
|
|
94
|
+
<fieldset v-if="slots.leading" ref="leading" :disabled="disabled" :inert="disabled || void 0" v-bind="resolveSlot(ui.leading, props.ui?.leading)">
|
|
95
|
+
<slot name="leading" v-bind="adornmentScope" />
|
|
96
|
+
</fieldset>
|
|
97
|
+
<Icon v-else-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
|
|
84
98
|
<textarea
|
|
85
99
|
:id="textareaId"
|
|
86
100
|
ref="textareaRef"
|
|
@@ -92,7 +106,7 @@ watch(() => props.modelValue, resize);
|
|
|
92
106
|
:disabled="disabled"
|
|
93
107
|
:aria-invalid="textareaInvalid || void 0"
|
|
94
108
|
:aria-describedby="describedBy"
|
|
95
|
-
v-bind="
|
|
109
|
+
v-bind="adornedInputProps()"
|
|
96
110
|
@input="$emit('update:modelValue', $event.target.value);
|
|
97
111
|
resize()"
|
|
98
112
|
/>
|
|
@@ -102,7 +116,7 @@ watch(() => props.modelValue, resize);
|
|
|
102
116
|
variant="text"
|
|
103
117
|
color="neutral"
|
|
104
118
|
:aria-label="messages.clear"
|
|
105
|
-
v-bind="
|
|
119
|
+
v-bind="clearProps()"
|
|
106
120
|
@click="clear"
|
|
107
121
|
>
|
|
108
122
|
<template #icon="{ class: iconClass }">
|
|
@@ -111,6 +125,9 @@ watch(() => props.modelValue, resize);
|
|
|
111
125
|
</slot>
|
|
112
126
|
</template>
|
|
113
127
|
</Button>
|
|
114
|
-
<Icon v-else-if="trailingIcon" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
128
|
+
<Icon v-else-if="trailingIcon && !slots.trailing" :name="trailingIcon" v-bind="resolveSlot(ui.trailingIcon, props.ui?.trailingIcon)" />
|
|
129
|
+
<fieldset v-if="slots.trailing" ref="trailing" :disabled="disabled" :inert="disabled || void 0" v-bind="resolveSlot(ui.trailing, props.ui?.trailing)">
|
|
130
|
+
<slot name="trailing" v-bind="adornmentScope" />
|
|
131
|
+
</fieldset>
|
|
115
132
|
</div>
|
|
116
133
|
</template>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { VariantProps } from 'tailwind-variants';
|
|
2
2
|
import type { TextareaThemeSlots } from '../theme/textarea.js';
|
|
3
3
|
import type { ColorRole } from '../utils/color-registry.js';
|
|
4
|
+
import type { FieldAdornmentSlotProps } from '../utils/field-adornments.js';
|
|
4
5
|
import type { UiProp } from '../utils/ui.js';
|
|
5
6
|
import { textareaTheme } from '../theme/textarea.js';
|
|
6
7
|
type TextareaVariants = VariantProps<typeof textareaTheme>;
|
|
8
|
+
type __VLS_Slots = TextareaSlots;
|
|
7
9
|
export interface TextareaProps {
|
|
8
10
|
id?: string;
|
|
9
11
|
name?: string;
|
|
@@ -27,10 +29,11 @@ export interface TextareaProps {
|
|
|
27
29
|
export interface TextareaEmits {
|
|
28
30
|
'update:modelValue': [value: string];
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
|
|
32
|
+
export interface TextareaSlots {
|
|
33
|
+
'leading'?: (props: FieldAdornmentSlotProps) => any;
|
|
34
|
+
'trailing'?: (props: FieldAdornmentSlotProps) => any;
|
|
35
|
+
'clear-icon'?: () => any;
|
|
36
|
+
}
|
|
34
37
|
declare const __VLS_base: import("vue").DefineComponent<TextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
38
|
"update:modelValue": (value: string) => any;
|
|
36
39
|
}, string, import("vue").PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { SelectEntry } from '../utils/select-contracts.js';
|
|
2
|
+
import type { TransferListProps, TransferListSlots } from '../utils/transfer-list-contracts.js';
|
|
3
|
+
export type { TransferDirection, TransferListEmits, TransferListProps, TransferListSlots, TransferSide } from '../utils/transfer-list-contracts.js';
|
|
4
|
+
declare const __VLS_export: <Entry extends SelectEntry, Key extends string = "value">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TransferListProps<Entry, Key> & {
|
|
6
|
+
"onUpdate:modelValue"?: ((value: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
7
|
+
value: infer Value;
|
|
8
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[]) => any) | undefined;
|
|
9
|
+
"onUpdate:checked"?: ((value: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
10
|
+
value: infer Value;
|
|
11
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[]) => any) | undefined;
|
|
12
|
+
"onUpdate:sourceSearchTerm"?: ((value: string) => any) | undefined;
|
|
13
|
+
"onUpdate:targetSearchTerm"?: ((value: string) => any) | undefined;
|
|
14
|
+
onTransfer?: ((payload: {
|
|
15
|
+
direction: import("./TransferList.vue.js").TransferDirection;
|
|
16
|
+
items: import("../utils/select-contracts.js").SelectEntryItem<Entry>[];
|
|
17
|
+
values: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
18
|
+
value: infer Value;
|
|
19
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[];
|
|
20
|
+
}) => any) | undefined;
|
|
21
|
+
}> & (typeof globalThis extends {
|
|
22
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
23
|
+
} ? P : {});
|
|
24
|
+
expose: (exposed: {}) => void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: TransferListSlots<Entry>;
|
|
27
|
+
emit: ((evt: "update:modelValue", value: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
28
|
+
value: infer Value;
|
|
29
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[]) => void) & ((evt: "update:checked", value: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
30
|
+
value: infer Value;
|
|
31
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[]) => void) & ((evt: "update:sourceSearchTerm", value: string) => void) & ((evt: "update:targetSearchTerm", value: string) => void) & ((evt: "transfer", payload: {
|
|
32
|
+
direction: import("./TransferList.vue.js").TransferDirection;
|
|
33
|
+
items: import("../utils/select-contracts.js").SelectEntryItem<Entry>[];
|
|
34
|
+
values: (import("../utils/select-contracts.js").SelectEntryItem<Entry> extends infer T ? T extends import("../utils/select-contracts.js").SelectEntryItem<Entry> ? T extends import("../utils/select-contracts.js").SelectValue ? T : Key extends "value" ? T extends object ? "value" extends keyof T ? T extends infer T_1 ? T_1 extends T ? T_1 extends {
|
|
35
|
+
value: infer Value;
|
|
36
|
+
} ? Value : T_1 | NonNullable<T_1[keyof T_1 & "value"]> : never : never : T : never : Key extends keyof T ? T[Key] : never : never : never)[];
|
|
37
|
+
}) => void);
|
|
38
|
+
}>) => import("vue").VNode & {
|
|
39
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
40
|
+
};
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
44
|
+
[K in keyof T]: T[K];
|
|
45
|
+
} : {
|
|
46
|
+
[K in keyof T as K]: T[K];
|
|
47
|
+
}) & {};
|