una-nuxt-module 2.1.29 → 2.1.30
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/module.mjs +1 -1
- package/dist/runtime/components/ui/auto-form/AutoForm.d.vue.ts +4 -4
- package/dist/runtime/components/ui/auto-form/AutoForm.vue +8 -6
- package/dist/runtime/components/ui/auto-form/AutoForm.vue.d.ts +4 -4
- package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +21 -8
- package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.d.vue.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.vue +18 -6
- package/dist/runtime/components/ui/auto-form/AutoFormFieldBoolean.vue.d.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.d.vue.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.vue +44 -9
- package/dist/runtime/components/ui/auto-form/AutoFormFieldEnum.vue.d.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.d.vue.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +27 -14
- package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue.d.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.vue +12 -4
- package/dist/runtime/components/ui/auto-form/AutoFormFieldInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.d.vue.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.vue +13 -3
- package/dist/runtime/components/ui/auto-form/AutoFormFieldNumber.vue.d.ts +1 -1
- package/dist/runtime/components/ui/auto-form/AutoFormFieldObject.vue +22 -8
- package/dist/runtime/components/ui/auto-form/AutoFormLabel.vue +1 -1
- package/dist/runtime/components/ui/chart/ChartLegend.vue +18 -9
- package/dist/runtime/components/ui/chart/ChartTooltip.vue +1 -1
- package/dist/runtime/components/ui/command/CommandDialog.vue +8 -2
- package/dist/runtime/components/ui/input-group/index.d.ts +1 -1
- package/dist/runtime/components/ui/input-group/index.js +2 -2
- package/dist/runtime/components/ui/sidebar/SidebarMenuButton.vue +5 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { FormContext, GenericObject } from
|
|
2
|
-
import type { z } from
|
|
3
|
-
import type { Config, ConfigItem, Dependency, Shape } from
|
|
4
|
-
import { type ZodObjectOrWrapped } from
|
|
1
|
+
import type { FormContext, GenericObject } from "vee-validate";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { Config, ConfigItem, Dependency, Shape } from "./interface.js";
|
|
4
|
+
import { type ZodObjectOrWrapped } from "./utils.js";
|
|
5
5
|
declare const _default: <T extends ZodObjectOrWrapped>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
7
7
|
readonly onSubmit?: ((event: z.TypeOf<T>) => any) | undefined;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Form } from "
|
|
2
|
+
import { Form } from "../form";
|
|
3
3
|
import { toTypedSchema } from "@vee-validate/zod";
|
|
4
4
|
import { computed, toRefs } from "vue";
|
|
5
5
|
import AutoFormField from "./AutoFormField.vue";
|
|
6
6
|
import { provideDependencies } from "./dependencies";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getBaseSchema,
|
|
9
|
+
getBaseType,
|
|
10
|
+
getDefaultValueInZodStack,
|
|
11
|
+
getObjectFormSchema
|
|
12
|
+
} from "./utils";
|
|
8
13
|
const props = defineProps({
|
|
9
14
|
schema: { type: null, required: true },
|
|
10
15
|
form: { type: Object, required: false },
|
|
@@ -64,10 +69,7 @@ const formComponentProps = computed(() => {
|
|
|
64
69
|
</script>
|
|
65
70
|
|
|
66
71
|
<template>
|
|
67
|
-
<component
|
|
68
|
-
:is="formComponent"
|
|
69
|
-
v-bind="formComponentProps"
|
|
70
|
-
>
|
|
72
|
+
<component :is="formComponent" v-bind="formComponentProps">
|
|
71
73
|
<slot name="customAutoForm" :fields="fields">
|
|
72
74
|
<template v-for="(shape, key) of shapes" :key="key">
|
|
73
75
|
<slot
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { FormContext, GenericObject } from
|
|
2
|
-
import type { z } from
|
|
3
|
-
import type { Config, ConfigItem, Dependency, Shape } from
|
|
4
|
-
import { type ZodObjectOrWrapped } from
|
|
1
|
+
import type { FormContext, GenericObject } from "vee-validate";
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { Config, ConfigItem, Dependency, Shape } from "./interface.js";
|
|
4
|
+
import { type ZodObjectOrWrapped } from "./utils.js";
|
|
5
5
|
declare const _default: <T extends ZodObjectOrWrapped>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
7
7
|
readonly onSubmit?: ((event: z.TypeOf<T>) => any) | undefined;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
Accordion,
|
|
4
|
+
AccordionContent,
|
|
5
|
+
AccordionItem,
|
|
6
|
+
AccordionTrigger
|
|
7
|
+
} from "../accordion";
|
|
8
|
+
import { Button } from "../button";
|
|
9
|
+
import { FormItem, FormMessage } from "../form";
|
|
10
|
+
import { Separator } from "../separator";
|
|
6
11
|
import { PlusIcon, TrashIcon } from "lucide-vue-next";
|
|
7
12
|
import { FieldArray, FieldContextKey, useField } from "vee-validate";
|
|
8
13
|
import { computed, provide } from "vue";
|
|
@@ -24,9 +29,11 @@ function isZodDefault(item) {
|
|
|
24
29
|
return item instanceof z.ZodDefault;
|
|
25
30
|
}
|
|
26
31
|
const itemShape = computed(() => {
|
|
27
|
-
if (!props.schema)
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
if (!props.schema) return;
|
|
33
|
+
const schema = isZodArray(props.schema) ? props.schema._def.type : isZodDefault(props.schema) ? (
|
|
34
|
+
// @ts-expect-error missing schema
|
|
35
|
+
props.schema._def.innerType._def.type
|
|
36
|
+
) : null;
|
|
30
37
|
return {
|
|
31
38
|
type: getBaseType(schema),
|
|
32
39
|
schema
|
|
@@ -39,7 +46,13 @@ provide(FieldContextKey, fieldContext);
|
|
|
39
46
|
<template>
|
|
40
47
|
<FieldArray v-slot="{ fields, remove, push }" as="section" :name="fieldName">
|
|
41
48
|
<slot v-bind="props">
|
|
42
|
-
<Accordion
|
|
49
|
+
<Accordion
|
|
50
|
+
type="multiple"
|
|
51
|
+
class="w-full"
|
|
52
|
+
collapsible
|
|
53
|
+
:disabled="disabled"
|
|
54
|
+
as-child
|
|
55
|
+
>
|
|
43
56
|
<FormItem>
|
|
44
57
|
<AccordionItem :value="fieldName" class="border-none">
|
|
45
58
|
<AccordionTrigger>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Checkbox } from "
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { Checkbox } from "../checkbox";
|
|
3
|
+
import {
|
|
4
|
+
FormControl,
|
|
5
|
+
FormDescription,
|
|
6
|
+
FormField,
|
|
7
|
+
FormItem,
|
|
8
|
+
FormMessage
|
|
9
|
+
} from "../form";
|
|
10
|
+
import { Switch } from "../switch";
|
|
5
11
|
import { computed } from "vue";
|
|
6
12
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
7
13
|
import { beautifyObjectName, maybeBooleanishToBoolean } from "./utils";
|
|
@@ -12,7 +18,9 @@ const props = defineProps({
|
|
|
12
18
|
config: { type: Object, required: false },
|
|
13
19
|
disabled: { type: Boolean, required: false }
|
|
14
20
|
});
|
|
15
|
-
const booleanComponent = computed(
|
|
21
|
+
const booleanComponent = computed(
|
|
22
|
+
() => props.config?.component === "switch" ? Switch : Checkbox
|
|
23
|
+
);
|
|
16
24
|
</script>
|
|
17
25
|
|
|
18
26
|
<template>
|
|
@@ -23,10 +31,14 @@ const booleanComponent = computed(() => props.config?.component === "switch" ? S
|
|
|
23
31
|
<slot v-bind="slotProps">
|
|
24
32
|
<component
|
|
25
33
|
:is="booleanComponent"
|
|
26
|
-
:disabled="
|
|
34
|
+
:disabled="
|
|
35
|
+
maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
|
|
36
|
+
"
|
|
27
37
|
:name="slotProps.componentField.name"
|
|
28
38
|
:model-value="slotProps.componentField.modelValue"
|
|
29
|
-
@update:model-value="
|
|
39
|
+
@update:model-value="
|
|
40
|
+
slotProps.componentField['onUpdate:modelValue']
|
|
41
|
+
"
|
|
30
42
|
/>
|
|
31
43
|
</slot>
|
|
32
44
|
</FormControl>
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormControl,
|
|
4
|
+
FormDescription,
|
|
5
|
+
FormField,
|
|
6
|
+
FormItem,
|
|
7
|
+
FormMessage
|
|
8
|
+
} from "../form";
|
|
9
|
+
import { Label } from "../label";
|
|
10
|
+
import { RadioGroup, RadioGroupItem } from "../radio-group";
|
|
11
|
+
import {
|
|
12
|
+
Select,
|
|
13
|
+
SelectContent,
|
|
14
|
+
SelectItem,
|
|
15
|
+
SelectTrigger,
|
|
16
|
+
SelectValue
|
|
17
|
+
} from "../select";
|
|
6
18
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
7
19
|
import { beautifyObjectName, maybeBooleanishToBoolean } from "./utils";
|
|
8
20
|
defineProps({
|
|
@@ -23,19 +35,42 @@ defineProps({
|
|
|
23
35
|
</AutoFormLabel>
|
|
24
36
|
<FormControl>
|
|
25
37
|
<slot v-bind="slotProps">
|
|
26
|
-
<RadioGroup
|
|
27
|
-
|
|
38
|
+
<RadioGroup
|
|
39
|
+
v-if="config?.component === 'radio'"
|
|
40
|
+
:disabled="
|
|
41
|
+
maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
|
|
42
|
+
"
|
|
43
|
+
:orientation="'vertical'"
|
|
44
|
+
v-bind="{ ...slotProps.componentField }"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
v-for="(option, index) in options"
|
|
48
|
+
:key="option"
|
|
49
|
+
class="mb-2 flex items-center gap-3 space-y-0"
|
|
50
|
+
>
|
|
28
51
|
<RadioGroupItem :id="`${option}-${index}`" :value="option" />
|
|
29
|
-
<Label :for="`${option}-${index}`">{{
|
|
52
|
+
<Label :for="`${option}-${index}`">{{
|
|
53
|
+
beautifyObjectName(option)
|
|
54
|
+
}}</Label>
|
|
30
55
|
</div>
|
|
31
56
|
</RadioGroup>
|
|
32
57
|
|
|
33
|
-
<Select
|
|
58
|
+
<Select
|
|
59
|
+
v-else
|
|
60
|
+
:disabled="
|
|
61
|
+
maybeBooleanishToBoolean(config?.inputProps?.disabled) ?? disabled
|
|
62
|
+
"
|
|
63
|
+
v-bind="{ ...slotProps.componentField }"
|
|
64
|
+
>
|
|
34
65
|
<SelectTrigger class="w-full">
|
|
35
66
|
<SelectValue :placeholder="config?.inputProps?.placeholder" />
|
|
36
67
|
</SelectTrigger>
|
|
37
68
|
<SelectContent>
|
|
38
|
-
<SelectItem
|
|
69
|
+
<SelectItem
|
|
70
|
+
v-for="option in options"
|
|
71
|
+
:key="option"
|
|
72
|
+
:value="option"
|
|
73
|
+
>
|
|
39
74
|
{{ beautifyObjectName(option) }}
|
|
40
75
|
</SelectItem>
|
|
41
76
|
</SelectContent>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Button } from "
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { Button } from "../button";
|
|
3
|
+
import {
|
|
4
|
+
FormControl,
|
|
5
|
+
FormDescription,
|
|
6
|
+
FormField,
|
|
7
|
+
FormItem,
|
|
8
|
+
FormMessage
|
|
9
|
+
} from "../form";
|
|
10
|
+
import { Input } from "../input";
|
|
5
11
|
import { Trash } from "lucide-vue-next";
|
|
6
12
|
import { ref } from "vue";
|
|
7
13
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
@@ -43,14 +49,19 @@ async function parseFileAsString(file) {
|
|
|
43
49
|
type="file"
|
|
44
50
|
v-bind="{ ...config?.inputProps }"
|
|
45
51
|
:disabled="config?.inputProps?.disabled ?? disabled"
|
|
46
|
-
@change="
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
@change="
|
|
53
|
+
async (ev) => {
|
|
54
|
+
const file = ev.target.files?.[0];
|
|
55
|
+
inputFile = file;
|
|
56
|
+
const parsed = await parseFileAsString(file);
|
|
57
|
+
slotProps.componentField.onInput(parsed);
|
|
58
|
+
}
|
|
59
|
+
"
|
|
52
60
|
/>
|
|
53
|
-
<div
|
|
61
|
+
<div
|
|
62
|
+
v-else
|
|
63
|
+
class="flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent pl-3 pr-1 py-1 text-sm shadow-sm transition-colors"
|
|
64
|
+
>
|
|
54
65
|
<p>{{ inputFile?.name }}</p>
|
|
55
66
|
<Button
|
|
56
67
|
:size="'icon'"
|
|
@@ -58,10 +69,12 @@ async function parseFileAsString(file) {
|
|
|
58
69
|
class="h-[26px] w-[26px]"
|
|
59
70
|
aria-label="Remove file"
|
|
60
71
|
type="button"
|
|
61
|
-
@click="
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
@click="
|
|
73
|
+
() => {
|
|
74
|
+
inputFile = void 0;
|
|
75
|
+
slotProps.componentField.onInput(void 0);
|
|
76
|
+
}
|
|
77
|
+
"
|
|
65
78
|
>
|
|
66
79
|
<Trash />
|
|
67
80
|
</Button>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormControl,
|
|
4
|
+
FormDescription,
|
|
5
|
+
FormField,
|
|
6
|
+
FormItem,
|
|
7
|
+
FormMessage
|
|
8
|
+
} from "../form";
|
|
9
|
+
import { Input } from "../input";
|
|
10
|
+
import { Textarea } from "../textarea";
|
|
5
11
|
import { computed } from "vue";
|
|
6
12
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
7
13
|
import { beautifyObjectName } from "./utils";
|
|
@@ -12,7 +18,9 @@ const props = defineProps({
|
|
|
12
18
|
config: { type: Object, required: false },
|
|
13
19
|
disabled: { type: Boolean, required: false }
|
|
14
20
|
});
|
|
15
|
-
const inputComponent = computed(
|
|
21
|
+
const inputComponent = computed(
|
|
22
|
+
() => props.config?.component === "textarea" ? Textarea : Input
|
|
23
|
+
);
|
|
16
24
|
</script>
|
|
17
25
|
|
|
18
26
|
<template>
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormControl,
|
|
4
|
+
FormDescription,
|
|
5
|
+
FormField,
|
|
6
|
+
FormItem,
|
|
7
|
+
FormMessage
|
|
8
|
+
} from "../form";
|
|
9
|
+
import { Input } from "../input";
|
|
4
10
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
5
11
|
import { beautifyObjectName } from "./utils";
|
|
6
12
|
defineOptions({
|
|
@@ -23,7 +29,11 @@ defineProps({
|
|
|
23
29
|
</AutoFormLabel>
|
|
24
30
|
<FormControl>
|
|
25
31
|
<slot v-bind="slotProps">
|
|
26
|
-
<Input
|
|
32
|
+
<Input
|
|
33
|
+
type="number"
|
|
34
|
+
v-bind="{ ...slotProps.componentField, ...config?.inputProps }"
|
|
35
|
+
:disabled="config?.inputProps?.disabled ?? disabled"
|
|
36
|
+
/>
|
|
27
37
|
</slot>
|
|
28
38
|
</FormControl>
|
|
29
39
|
<FormDescription v-if="config?.description">
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Accordion,
|
|
4
|
+
AccordionContent,
|
|
5
|
+
AccordionItem,
|
|
6
|
+
AccordionTrigger
|
|
7
|
+
} from "../accordion";
|
|
8
|
+
import { FormItem } from "../form";
|
|
4
9
|
import { FieldContextKey, useField } from "vee-validate";
|
|
5
10
|
import { computed, provide } from "vue";
|
|
6
11
|
import AutoFormField from "./AutoFormField.vue";
|
|
7
12
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
8
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
beautifyObjectName,
|
|
15
|
+
getBaseSchema,
|
|
16
|
+
getBaseType,
|
|
17
|
+
getDefaultValueInZodStack
|
|
18
|
+
} from "./utils";
|
|
9
19
|
const props = defineProps({
|
|
10
20
|
fieldName: { type: String, required: true },
|
|
11
21
|
required: { type: Boolean, required: false },
|
|
@@ -15,11 +25,9 @@ const props = defineProps({
|
|
|
15
25
|
});
|
|
16
26
|
const shapes = computed(() => {
|
|
17
27
|
const val = {};
|
|
18
|
-
if (!props.schema)
|
|
19
|
-
return;
|
|
28
|
+
if (!props.schema) return;
|
|
20
29
|
const shape = getBaseSchema(props.schema)?.shape;
|
|
21
|
-
if (!shape)
|
|
22
|
-
return;
|
|
30
|
+
if (!shape) return;
|
|
23
31
|
Object.keys(shape).forEach((name) => {
|
|
24
32
|
const item = shape[name];
|
|
25
33
|
const baseItem = getBaseSchema(item);
|
|
@@ -43,7 +51,13 @@ provide(FieldContextKey, fieldContext);
|
|
|
43
51
|
<template>
|
|
44
52
|
<section>
|
|
45
53
|
<slot v-bind="props">
|
|
46
|
-
<Accordion
|
|
54
|
+
<Accordion
|
|
55
|
+
type="single"
|
|
56
|
+
as-child
|
|
57
|
+
class="w-full"
|
|
58
|
+
collapsible
|
|
59
|
+
:disabled="disabled"
|
|
60
|
+
>
|
|
47
61
|
<FormItem>
|
|
48
62
|
<AccordionItem :value="fieldName" class="border-none">
|
|
49
63
|
<AccordionTrigger>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { BulletLegend } from "@unovis/ts";
|
|
3
3
|
import { VisBulletLegend } from "@unovis/vue";
|
|
4
4
|
import { nextTick, onMounted, ref } from "vue";
|
|
5
|
-
import { buttonVariants } from "
|
|
5
|
+
import { buttonVariants } from "../button";
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
items: { type: Array, required: false, default: () => [] }
|
|
8
8
|
});
|
|
@@ -13,7 +13,9 @@ function keepStyling() {
|
|
|
13
13
|
nextTick(() => {
|
|
14
14
|
const elements = elRef.value?.querySelectorAll(selector);
|
|
15
15
|
const classes = buttonVariants({ variant: "ghost", size: "sm" }).split(" ");
|
|
16
|
-
elements?.forEach(
|
|
16
|
+
elements?.forEach(
|
|
17
|
+
(el) => el.classList.add(...classes, "!inline-flex", "!mr-2")
|
|
18
|
+
);
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
onMounted(() => {
|
|
@@ -24,9 +26,17 @@ function onLegendItemClick(d, i) {
|
|
|
24
26
|
const isBulletActive = !props.items[i].inactive;
|
|
25
27
|
const isFilterApplied = props.items.some((i2) => i2.inactive);
|
|
26
28
|
if (isFilterApplied && isBulletActive) {
|
|
27
|
-
emits(
|
|
29
|
+
emits(
|
|
30
|
+
"update:items",
|
|
31
|
+
props.items.map((item) => ({ ...item, inactive: false }))
|
|
32
|
+
);
|
|
28
33
|
} else {
|
|
29
|
-
emits(
|
|
34
|
+
emits(
|
|
35
|
+
"update:items",
|
|
36
|
+
props.items.map(
|
|
37
|
+
(item) => item.name === d.name ? { ...d, inactive: false } : { ...item, inactive: true }
|
|
38
|
+
)
|
|
39
|
+
);
|
|
30
40
|
}
|
|
31
41
|
keepStyling();
|
|
32
42
|
}
|
|
@@ -34,13 +44,12 @@ function onLegendItemClick(d, i) {
|
|
|
34
44
|
|
|
35
45
|
<template>
|
|
36
46
|
<div
|
|
37
|
-
ref="elRef"
|
|
47
|
+
ref="elRef"
|
|
48
|
+
class="w-max"
|
|
49
|
+
:style="{
|
|
38
50
|
'--vis-legend-bullet-size': '16px'
|
|
39
51
|
}"
|
|
40
52
|
>
|
|
41
|
-
<VisBulletLegend
|
|
42
|
-
:items="items"
|
|
43
|
-
:on-legend-item-click="onLegendItemClick"
|
|
44
|
-
/>
|
|
53
|
+
<VisBulletLegend :items="items" :on-legend-item-click="onLegendItemClick" />
|
|
45
54
|
</div>
|
|
46
55
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Card, CardContent, CardHeader, CardTitle } from "
|
|
2
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../card";
|
|
3
3
|
defineProps({
|
|
4
4
|
title: { type: String, required: false },
|
|
5
5
|
data: { type: Array, required: true }
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useForwardPropsEmits } from "reka-ui";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Dialog,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogDescription,
|
|
7
|
+
DialogHeader,
|
|
8
|
+
DialogTitle
|
|
9
|
+
} from "../dialog";
|
|
4
10
|
import Command from "./Command.vue";
|
|
5
11
|
const props = defineProps({
|
|
6
12
|
open: { type: Boolean, required: false },
|
|
@@ -15,7 +21,7 @@ const forwarded = useForwardPropsEmits(props, emits);
|
|
|
15
21
|
|
|
16
22
|
<template>
|
|
17
23
|
<Dialog v-bind="forwarded">
|
|
18
|
-
<DialogContent class="overflow-hidden p-0
|
|
24
|
+
<DialogContent class="overflow-hidden p-0">
|
|
19
25
|
<DialogHeader class="sr-only">
|
|
20
26
|
<DialogTitle>{{ title }}</DialogTitle>
|
|
21
27
|
<DialogDescription>{{ description }}</DialogDescription>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VariantProps } from "class-variance-authority";
|
|
2
2
|
import type { HTMLAttributes } from "vue";
|
|
3
|
-
import type { ButtonVariants } from
|
|
3
|
+
import type { ButtonVariants } from "../button/index.js";
|
|
4
4
|
export { default as InputGroup } from "./InputGroup.vue.js";
|
|
5
5
|
export { default as InputGroupAddon } from "./InputGroupAddon.vue.js";
|
|
6
6
|
export { default as InputGroupButton } from "./InputGroupButton.vue.js";
|
|
@@ -26,8 +26,8 @@ export const inputGroupButtonVariants = cva(
|
|
|
26
26
|
{
|
|
27
27
|
variants: {
|
|
28
28
|
size: {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
30
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
31
31
|
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
32
32
|
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
33
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
|
|
4
4
|
import SidebarMenuButtonChild from "./SidebarMenuButtonChild.vue";
|
|
5
5
|
import { useSidebar } from "./utils";
|
|
6
6
|
defineOptions({
|
|
@@ -20,7 +20,10 @@ const delegatedProps = reactiveOmit(props, "tooltip");
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<SidebarMenuButtonChild
|
|
23
|
+
<SidebarMenuButtonChild
|
|
24
|
+
v-if="!tooltip"
|
|
25
|
+
v-bind="{ ...delegatedProps, ...$attrs }"
|
|
26
|
+
>
|
|
24
27
|
<slot />
|
|
25
28
|
</SidebarMenuButtonChild>
|
|
26
29
|
|