@shwfed/nuxt 0.7.9 → 0.7.11
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/module.json +1 -1
- package/dist/runtime/components/app.d.vue.ts +7 -56
- package/dist/runtime/components/app.vue +17 -404
- package/dist/runtime/components/app.vue.d.ts +7 -56
- package/dist/runtime/components/fields.d.vue.ts +154 -132
- package/dist/runtime/components/fields.vue +30 -295
- package/dist/runtime/components/fields.vue.d.ts +154 -132
- package/dist/runtime/components/table.d.vue.ts +129 -59
- package/dist/runtime/components/table.vue +51 -617
- package/dist/runtime/components/table.vue.d.ts +129 -59
- package/dist/runtime/components/ui/app/App.d.vue.ts +86 -0
- package/dist/runtime/components/ui/app/App.vue +414 -0
- package/dist/runtime/components/ui/app/App.vue.d.ts +86 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +6 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +87 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/index.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/index.js +1 -0
- package/dist/runtime/components/ui/field/FieldContent.vue +1 -1
- package/dist/runtime/components/ui/field/FieldError.vue +2 -2
- package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +376 -0
- package/dist/runtime/components/ui/fields/Fields.vue +441 -0
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +376 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +163 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +363 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +163 -0
- package/dist/runtime/components/ui/icon-picker/IconPicker.d.vue.ts +15 -0
- package/dist/runtime/components/ui/icon-picker/IconPicker.vue +178 -0
- package/dist/runtime/components/ui/icon-picker/IconPicker.vue.d.ts +15 -0
- package/dist/runtime/components/ui/icon-picker/index.d.ts +1 -0
- package/dist/runtime/components/ui/icon-picker/index.js +1 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +1 -0
- package/dist/runtime/components/ui/input/Input.vue +2 -0
- package/dist/runtime/components/ui/input/Input.vue.d.ts +1 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +4 -1
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +8 -3
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +8 -3
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +8 -3
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.d.vue.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +11 -2
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue.d.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.d.vue.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +10 -4
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue.d.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
- package/dist/runtime/components/ui/input-group/index.js +1 -1
- package/dist/runtime/components/ui/locale/Locale.d.vue.ts +20 -0
- package/dist/runtime/components/ui/locale/Locale.vue +291 -0
- package/dist/runtime/components/ui/locale/Locale.vue.d.ts +20 -0
- package/dist/runtime/components/ui/locale/index.d.ts +1 -0
- package/dist/runtime/components/ui/locale/index.js +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +1 -1
- package/dist/runtime/components/ui/native-select/NativeSelect.vue.d.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +4 -1
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +1 -0
- package/dist/runtime/components/ui/number-field/NumberFieldInput.vue +1 -1
- package/dist/runtime/components/ui/switch/Switch.vue +2 -2
- package/dist/runtime/components/ui/table/Table.d.vue.ts +147 -0
- package/dist/runtime/components/ui/table/Table.vue +952 -0
- package/dist/runtime/components/ui/table/Table.vue.d.ts +147 -0
- package/dist/runtime/components/ui/table/schema.d.ts +151 -0
- package/dist/runtime/components/ui/table/schema.js +142 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +128 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2719 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +128 -0
- package/dist/runtime/components/ui/table-configurator/menu.d.ts +37 -0
- package/dist/runtime/components/ui/table-configurator/menu.js +227 -0
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +24 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +30 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +24 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue +23 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +25 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +27 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/index.d.ts +4 -0
- package/dist/runtime/components/ui/tabs/index.js +4 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +4 -2
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +34 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue +32 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +34 -0
- package/dist/runtime/components/ui/toggle/index.d.ts +7 -0
- package/dist/runtime/components/ui/toggle/index.js +22 -0
- package/dist/runtime/composables/useTableRenderers.d.ts +2 -1
- package/dist/runtime/composables/useTableRenderers.js +2 -1
- package/dist/runtime/plugins/toast/index.d.ts +2 -2
- package/dist/runtime/style.css +1 -1
- package/dist/runtime/table-renderers/builtins.js +328 -137
- package/dist/runtime/table-renderers/registry.d.ts +2 -1
- package/dist/runtime/table-renderers/registry.js +3 -0
- package/dist/runtime/utils/coders.d.ts +29 -2
- package/dist/runtime/utils/coders.js +40 -2
- package/package.json +8 -6
- /package/dist/runtime/components/{logo.d.vue.ts → ui/logo/Logo.d.vue.ts} +0 -0
- /package/dist/runtime/components/{logo.vue → ui/logo/Logo.vue} +0 -0
- /package/dist/runtime/components/{logo.vue.d.ts → ui/logo/Logo.vue.d.ts} +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { icons } from "@iconify-json/fluent";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { useVirtualizer } from "@tanstack/vue-virtual";
|
|
5
|
+
import { computed, shallowRef, ref, watch } from "vue";
|
|
6
|
+
import { cn } from "../../../utils/cn";
|
|
7
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../input-group";
|
|
8
|
+
defineOptions({
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
});
|
|
11
|
+
const ICON_COLUMNS = 6;
|
|
12
|
+
const ICON_ROW_HEIGHT = 60;
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
modelValue: { type: String, required: false },
|
|
15
|
+
placeholder: { type: String, required: false },
|
|
16
|
+
disabled: { type: Boolean, required: false },
|
|
17
|
+
invalid: { type: Boolean, required: false },
|
|
18
|
+
class: { type: null, required: false }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
21
|
+
const availableIcons = Object.entries(icons.icons).filter(([name]) => name.endsWith("-20-regular")).map(([name, icon]) => ({
|
|
22
|
+
id: `fluent:${name}`,
|
|
23
|
+
icon
|
|
24
|
+
}));
|
|
25
|
+
const availableIconIds = new Set(availableIcons.map((icon) => icon.id));
|
|
26
|
+
const searchQuery = ref("");
|
|
27
|
+
const galleryElement = shallowRef(null);
|
|
28
|
+
const selectedIcon = computed(() => props.modelValue && availableIconIds.has(props.modelValue) ? availableIcons.find((icon) => icon.id === props.modelValue) : void 0);
|
|
29
|
+
const filteredIcons = computed(() => {
|
|
30
|
+
const term = searchQuery.value.trim().toLowerCase();
|
|
31
|
+
if (!term) {
|
|
32
|
+
return availableIcons;
|
|
33
|
+
}
|
|
34
|
+
return availableIcons.filter((icon) => icon.id.includes(term));
|
|
35
|
+
});
|
|
36
|
+
const rowCount = computed(() => Math.ceil(filteredIcons.value.length / ICON_COLUMNS));
|
|
37
|
+
const rowVirtualizer = useVirtualizer(computed(() => ({
|
|
38
|
+
count: rowCount.value,
|
|
39
|
+
getScrollElement: () => galleryElement.value,
|
|
40
|
+
estimateSize: () => ICON_ROW_HEIGHT,
|
|
41
|
+
overscan: 4
|
|
42
|
+
})));
|
|
43
|
+
watch(() => props.modelValue, (value) => {
|
|
44
|
+
if (value && availableIconIds.has(value)) {
|
|
45
|
+
searchQuery.value = "";
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
function iconsForRow(index) {
|
|
49
|
+
const start = index * ICON_COLUMNS;
|
|
50
|
+
return filteredIcons.value.slice(start, start + ICON_COLUMNS);
|
|
51
|
+
}
|
|
52
|
+
function selectIcon(iconId) {
|
|
53
|
+
if (props.disabled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
searchQuery.value = "";
|
|
57
|
+
emit("update:modelValue", iconId);
|
|
58
|
+
}
|
|
59
|
+
function clearIcon() {
|
|
60
|
+
if (props.disabled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
searchQuery.value = "";
|
|
64
|
+
emit("update:modelValue", void 0);
|
|
65
|
+
}
|
|
66
|
+
function handleSearchUpdate(value) {
|
|
67
|
+
searchQuery.value = String(value);
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<div
|
|
73
|
+
v-bind="$attrs"
|
|
74
|
+
data-slot="icon-picker"
|
|
75
|
+
:data-disabled="props.disabled ? 'true' : void 0"
|
|
76
|
+
:class="cn(
|
|
77
|
+
'flex min-h-88 flex-col overflow-hidden rounded-xl border bg-white',
|
|
78
|
+
props.invalid ? 'border-red-400' : 'border-zinc-200',
|
|
79
|
+
props.disabled ? 'bg-zinc-50' : void 0,
|
|
80
|
+
props.class
|
|
81
|
+
)"
|
|
82
|
+
>
|
|
83
|
+
<section
|
|
84
|
+
v-if="selectedIcon"
|
|
85
|
+
data-slot="icon-picker-selected"
|
|
86
|
+
class="flex flex-1 flex-col items-center justify-center gap-4 px-6 py-8 text-center"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
data-slot="icon-picker-hero"
|
|
90
|
+
:data-icon-id="selectedIcon.id"
|
|
91
|
+
class="relative flex size-40 items-center justify-center rounded-3xl border border-zinc-200 bg-zinc-50 text-zinc-700 shadow-xs"
|
|
92
|
+
>
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
data-slot="icon-picker-clear"
|
|
96
|
+
class="absolute right-3 top-3 flex size-8 items-center justify-center rounded-full border border-zinc-200 bg-white text-zinc-500 transition-colors hover:border-red-200 hover:bg-red-50 hover:text-red-600 disabled:pointer-events-none disabled:opacity-60"
|
|
97
|
+
:disabled="props.disabled"
|
|
98
|
+
@click="clearIcon"
|
|
99
|
+
>
|
|
100
|
+
<Icon icon="fluent:dismiss-20-regular" />
|
|
101
|
+
</button>
|
|
102
|
+
<Icon
|
|
103
|
+
:icon="selectedIcon.icon"
|
|
104
|
+
class="size-16"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<p
|
|
109
|
+
data-slot="icon-picker-name"
|
|
110
|
+
class="font-mono text-sm text-zinc-500"
|
|
111
|
+
>
|
|
112
|
+
{{ selectedIcon.id }}
|
|
113
|
+
</p>
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
<template v-else>
|
|
117
|
+
<div
|
|
118
|
+
data-slot="icon-picker-search"
|
|
119
|
+
class="border-b border-zinc-200 p-4"
|
|
120
|
+
>
|
|
121
|
+
<InputGroup class="overflow-hidden">
|
|
122
|
+
<InputGroupAddon>
|
|
123
|
+
<Icon icon="fluent:search-20-regular" />
|
|
124
|
+
</InputGroupAddon>
|
|
125
|
+
<InputGroupInput
|
|
126
|
+
:model-value="searchQuery"
|
|
127
|
+
:placeholder="props.placeholder ?? 'Search icons'"
|
|
128
|
+
:disabled="props.disabled"
|
|
129
|
+
@update:model-value="handleSearchUpdate"
|
|
130
|
+
/>
|
|
131
|
+
</InputGroup>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div
|
|
135
|
+
v-if="filteredIcons.length > 0"
|
|
136
|
+
ref="galleryElement"
|
|
137
|
+
data-slot="icon-picker-gallery"
|
|
138
|
+
class="h-80 overflow-auto px-4 py-4"
|
|
139
|
+
>
|
|
140
|
+
<div
|
|
141
|
+
class="relative w-full"
|
|
142
|
+
:style="{ height: `${rowVirtualizer.getTotalSize()}px` }"
|
|
143
|
+
>
|
|
144
|
+
<div
|
|
145
|
+
v-for="row in rowVirtualizer.getVirtualItems()"
|
|
146
|
+
:key="String(row.key)"
|
|
147
|
+
class="absolute left-0 top-0 grid w-full grid-cols-6 gap-2"
|
|
148
|
+
:style="{
|
|
149
|
+
height: `${row.size}px`,
|
|
150
|
+
transform: `translateY(${row.start}px)`
|
|
151
|
+
}"
|
|
152
|
+
>
|
|
153
|
+
<button
|
|
154
|
+
v-for="item in iconsForRow(row.index)"
|
|
155
|
+
:key="item.id"
|
|
156
|
+
type="button"
|
|
157
|
+
data-slot="icon-picker-item"
|
|
158
|
+
:data-icon-id="item.id"
|
|
159
|
+
class="flex h-12 items-center justify-center rounded-lg border border-transparent bg-zinc-50 text-zinc-600 transition-colors hover:border-zinc-200 hover:bg-zinc-100 hover:text-zinc-800 disabled:pointer-events-none disabled:opacity-60"
|
|
160
|
+
:disabled="props.disabled"
|
|
161
|
+
@click="selectIcon(item.id)"
|
|
162
|
+
>
|
|
163
|
+
<Icon :icon="item.icon" />
|
|
164
|
+
</button>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div
|
|
170
|
+
v-else
|
|
171
|
+
data-slot="icon-picker-empty"
|
|
172
|
+
class="flex h-80 items-center justify-center px-6 text-center text-sm text-zinc-400"
|
|
173
|
+
>
|
|
174
|
+
No icons match your search.
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (args_0: string | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconPicker } from './IconPicker.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconPicker } from "./IconPicker.vue";
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
defaultValue?: string | number;
|
|
4
4
|
modelValue?: string | number;
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
|
+
placeholder?: string;
|
|
6
7
|
treatEmptyAsDifferentStateFromNull?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -5,6 +5,7 @@ const props = defineProps({
|
|
|
5
5
|
defaultValue: { type: [String, Number], required: false },
|
|
6
6
|
modelValue: { type: [String, Number], required: false },
|
|
7
7
|
class: { type: null, required: false },
|
|
8
|
+
placeholder: { type: String, required: false },
|
|
8
9
|
treatEmptyAsDifferentStateFromNull: { type: Boolean, required: false }
|
|
9
10
|
});
|
|
10
11
|
const emits = defineEmits(["update:modelValue"]);
|
|
@@ -19,6 +20,7 @@ const modelValue = useVModel(props, "modelValue", emits, {
|
|
|
19
20
|
v-model="modelValue"
|
|
20
21
|
data-slot="input"
|
|
21
22
|
:data-value="!treatEmptyAsDifferentStateFromNull ? !!modelValue : modelValue !== void 0"
|
|
23
|
+
:placeholder="props.placeholder"
|
|
22
24
|
:class="cn(
|
|
23
25
|
'file:text-zinc-700 placeholder:text-zinc-300 text-zinc-700 border-zinc-200 h-9 w-full min-w-0 rounded border bg-transparent px-3 py-1 text-base transition-colors ease-out duration-180 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
24
26
|
'aria-invalid:border-red-400 hover:border-zinc-300 focus-visible:border-(--primary)',
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
defaultValue?: string | number;
|
|
4
4
|
modelValue?: string | number;
|
|
5
5
|
class?: HTMLAttributes['class'];
|
|
6
|
+
placeholder?: string;
|
|
6
7
|
treatEmptyAsDifferentStateFromNull?: boolean;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -12,7 +12,10 @@ function handleInputGroupAddonClick(e) {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
if (currentTarget && currentTarget?.parentElement) {
|
|
15
|
-
currentTarget.parentElement
|
|
15
|
+
const control = currentTarget.parentElement.querySelector("input, textarea");
|
|
16
|
+
if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) {
|
|
17
|
+
control.focus();
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
</script>
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { type PopoverContentProps } from 'reka-ui';
|
|
2
2
|
type __VLS_Props = PopoverContentProps & {
|
|
3
3
|
disabled?: boolean;
|
|
4
|
+
invalid?: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare var
|
|
6
|
+
declare var __VLS_50: {};
|
|
6
7
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_50) => any;
|
|
8
9
|
};
|
|
9
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
blur: (...args: any[]) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
16
|
declare const _default: typeof __VLS_export;
|
|
12
17
|
export default _default;
|
|
@@ -31,9 +31,11 @@ const props = defineProps({
|
|
|
31
31
|
asChild: { type: Boolean, required: false },
|
|
32
32
|
as: { type: null, required: false },
|
|
33
33
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
34
|
-
disabled: { type: Boolean, required: false }
|
|
34
|
+
disabled: { type: Boolean, required: false },
|
|
35
|
+
invalid: { type: Boolean, required: false }
|
|
35
36
|
});
|
|
36
|
-
const
|
|
37
|
+
const emits = defineEmits(["blur"]);
|
|
38
|
+
const delegatedProps = reactiveOmit(props, "disabled", "invalid");
|
|
37
39
|
const forwarded = useForwardProps(delegatedProps);
|
|
38
40
|
</script>
|
|
39
41
|
|
|
@@ -47,7 +49,10 @@ const forwarded = useForwardProps(delegatedProps);
|
|
|
47
49
|
as="input"
|
|
48
50
|
as-child
|
|
49
51
|
>
|
|
50
|
-
<InputGroupComboboxInput
|
|
52
|
+
<InputGroupComboboxInput
|
|
53
|
+
:invalid="props.invalid"
|
|
54
|
+
@blur="emits('blur', $event)"
|
|
55
|
+
/>
|
|
51
56
|
</PopoverTrigger>
|
|
52
57
|
<PopoverContent
|
|
53
58
|
v-bind="forwarded"
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { type PopoverContentProps } from 'reka-ui';
|
|
2
2
|
type __VLS_Props = PopoverContentProps & {
|
|
3
3
|
disabled?: boolean;
|
|
4
|
+
invalid?: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare var
|
|
6
|
+
declare var __VLS_50: {};
|
|
6
7
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_50) => any;
|
|
8
9
|
};
|
|
9
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
blur: (...args: any[]) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
16
|
declare const _default: typeof __VLS_export;
|
|
12
17
|
export default _default;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
blur: (...args: any[]) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
9
|
declare const _default: typeof __VLS_export;
|
|
3
10
|
export default _default;
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
import { cn } from "../../../utils/cn";
|
|
3
3
|
import { ListboxFilter } from "reka-ui";
|
|
4
4
|
import { useCommand } from "../command";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
invalid: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
const emits = defineEmits(["blur"]);
|
|
5
9
|
const { filterState } = useCommand();
|
|
10
|
+
function handleBlur(event) {
|
|
11
|
+
filterState.search = "";
|
|
12
|
+
emits("blur", event);
|
|
13
|
+
}
|
|
6
14
|
</script>
|
|
7
15
|
|
|
8
16
|
<template>
|
|
@@ -10,9 +18,10 @@ const { filterState } = useCommand();
|
|
|
10
18
|
v-model="filterState.search"
|
|
11
19
|
data-slot="input-group-control"
|
|
12
20
|
:data-value="!!filterState.search"
|
|
21
|
+
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
13
22
|
:class="cn(
|
|
14
|
-
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none
|
|
23
|
+
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none peer outline-none disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
15
24
|
)"
|
|
16
|
-
@blur="
|
|
25
|
+
@blur="handleBlur"
|
|
17
26
|
/>
|
|
18
27
|
</template>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
blur: (...args: any[]) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
9
|
declare const _default: typeof __VLS_export;
|
|
3
10
|
export default _default;
|
|
@@ -13,7 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
data-slot="input-group-control"
|
|
14
14
|
:treat-empty-as-different-state-from-null="treatEmptyAsDifferentStateFromNull"
|
|
15
15
|
:class="cn(
|
|
16
|
-
'flex-1 rounded-none border-0 bg-transparent shadow-none
|
|
16
|
+
'flex-1 rounded-none border-0 bg-transparent shadow-none peer disabled:text-zinc-600 disabled:opacity-100',
|
|
17
17
|
props.class
|
|
18
18
|
)"
|
|
19
19
|
/>
|
|
@@ -2,11 +2,14 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = NumberFieldRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
|
+
invalid?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
blur: (...args: any[]) => void;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((
|
|
11
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -22,10 +22,14 @@ const props = defineProps({
|
|
|
22
22
|
as: { type: null, required: false },
|
|
23
23
|
name: { type: String, required: false },
|
|
24
24
|
required: { type: Boolean, required: false },
|
|
25
|
-
class: { type: null, required: false }
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
invalid: { type: Boolean, required: false }
|
|
26
27
|
});
|
|
27
|
-
const emits = defineEmits([
|
|
28
|
-
|
|
28
|
+
const emits = defineEmits([
|
|
29
|
+
"update:modelValue",
|
|
30
|
+
"blur"
|
|
31
|
+
]);
|
|
32
|
+
const delegatedProps = reactiveOmit(props, "class", "invalid");
|
|
29
33
|
</script>
|
|
30
34
|
|
|
31
35
|
<template>
|
|
@@ -37,9 +41,11 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
37
41
|
<NumberFieldInput
|
|
38
42
|
data-slot="input-group-control"
|
|
39
43
|
:data-value="typeof delegatedProps.modelValue === 'number'"
|
|
44
|
+
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
40
45
|
:class="cn(
|
|
41
|
-
'flex-1 px-2 py-1 rounded-none w-full text-sm text-zinc-700 border-0 bg-transparent shadow-none
|
|
46
|
+
'flex-1 px-2 py-1 rounded-none w-full text-sm text-zinc-700 border-0 bg-transparent shadow-none outline-none peer disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
42
47
|
)"
|
|
48
|
+
@blur="emits('blur', $event)"
|
|
43
49
|
/>
|
|
44
50
|
</NumberField>
|
|
45
51
|
</template>
|
|
@@ -2,11 +2,14 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = NumberFieldRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
|
+
invalid?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
blur: (...args: any[]) => void;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((
|
|
11
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -10,7 +10,7 @@ const props = defineProps({
|
|
|
10
10
|
<Textarea
|
|
11
11
|
data-slot="input-group-control"
|
|
12
12
|
:class="cn(
|
|
13
|
-
'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none
|
|
13
|
+
'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none',
|
|
14
14
|
props.class
|
|
15
15
|
)"
|
|
16
16
|
/>
|
|
@@ -31,7 +31,7 @@ export const inputGroupButtonVariants = cva(
|
|
|
31
31
|
size: {
|
|
32
32
|
"xs": "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
33
33
|
"sm": "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
34
|
-
"icon-xs": "size-6 rounded-
|
|
34
|
+
"icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
|
|
35
35
|
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { type LocaleValue } from '../../../utils/coders.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: LocaleValue;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
multiline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (args_0: readonly {
|
|
10
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
11
|
+
message: string;
|
|
12
|
+
}[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((args_0: readonly {
|
|
15
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
16
|
+
message: string;
|
|
17
|
+
}[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|