@una-ui/nuxt 1.0.0-alpha.1 → 1.0.0-alpha.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 +3 -3
- package/dist/module.mjs +10 -8
- package/dist/runtime/components/alert-dialog/AlertDialog.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogAction.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue.d.ts +1 -1
- package/dist/runtime/components/alert-dialog/AlertDialogContent.vue +0 -1
- package/dist/runtime/components/aspect-ratio/AspectRatio.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/Combobox.vue +4 -2
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +19 -19
- package/dist/runtime/components/combobox/ComboboxInput.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/ComboboxList.vue +3 -0
- package/dist/runtime/components/combobox/ComboboxTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/data/table/Table.vue +6 -1
- package/dist/runtime/components/data/table/TableEmpty.vue +17 -9
- package/dist/runtime/components/data/table/TableEmpty.vue.d.ts +4 -0
- package/dist/runtime/components/drawer/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/DrawerContent.vue +0 -1
- package/dist/runtime/components/drawer/DrawerOverlay.vue +1 -0
- package/dist/runtime/components/elements/Badge.vue.d.ts +1 -5
- package/dist/runtime/components/elements/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/elements/Toggle.vue.d.ts +1 -1
- package/dist/runtime/components/elements/accordion/Accordion.vue +86 -0
- package/dist/runtime/components/elements/accordion/Accordion.vue.d.ts +71 -0
- package/dist/runtime/components/elements/accordion/AccordionContent.vue +24 -0
- package/dist/runtime/components/elements/accordion/AccordionContent.vue.d.ts +13 -0
- package/dist/runtime/components/elements/accordion/AccordionHeader.vue +17 -0
- package/dist/runtime/components/elements/accordion/AccordionHeader.vue.d.ts +13 -0
- package/dist/runtime/components/elements/accordion/AccordionItem.vue +59 -0
- package/dist/runtime/components/elements/accordion/AccordionItem.vue.d.ts +27 -0
- package/dist/runtime/components/elements/accordion/AccordionTrigger.vue +56 -0
- package/dist/runtime/components/elements/accordion/AccordionTrigger.vue.d.ts +16 -0
- package/dist/runtime/components/elements/avatar/Avatar.vue.d.ts +1 -1
- package/dist/runtime/components/elements/collapsible/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/elements/collapsible/CollapsibleContent.vue +1 -0
- package/dist/runtime/components/elements/dialog/Dialog.vue.d.ts +1 -1
- package/dist/runtime/components/elements/dialog/DialogContent.vue +0 -1
- package/dist/runtime/components/elements/dialog/DialogDescription.vue +2 -1
- package/dist/runtime/components/elements/dialog/DialogScrollContent.vue +0 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenu.vue.d.ts +4 -4
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuContent.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubContent.vue +3 -1
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/elements/pagination/Pagination.vue.d.ts +2 -5
- package/dist/runtime/components/elements/pagination/PaginationListItem.vue.d.ts +1 -1
- package/dist/runtime/components/elements/popover/Popover.vue.d.ts +1 -1
- package/dist/runtime/components/elements/popover/PopoverContent.vue +3 -0
- package/dist/runtime/components/elements/tabs/Tabs.vue.d.ts +1 -1
- package/dist/runtime/components/elements/tabs/TabsTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/elements/tooltip/TooltipContent.vue +1 -0
- package/dist/runtime/components/forms/Input.vue.d.ts +1 -13
- package/dist/runtime/components/forms/Switch.vue.d.ts +2 -2
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue +1 -2
- package/dist/runtime/components/forms/radio-group/RadioGroup.vue.d.ts +5 -5
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue +1 -1
- package/dist/runtime/components/forms/radio-group/RadioGroupItem.vue.d.ts +2 -1
- package/dist/runtime/components/forms/select/Select.vue +5 -23
- package/dist/runtime/components/forms/select/Select.vue.d.ts +18 -20
- package/dist/runtime/components/forms/select/SelectContent.vue +3 -0
- package/dist/runtime/components/forms/select/SelectItem.vue +0 -2
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue +7 -6
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue.d.ts +1 -3
- package/dist/runtime/components/hover-card/HoverCard.vue.d.ts +1 -1
- package/dist/runtime/components/hover-card/HoverCardContent.vue +3 -0
- package/dist/runtime/components/misc/ThemeSwitcher.vue +25 -19
- package/dist/runtime/components/misc/ThemeSwitcher.vue.d.ts +1 -1
- package/dist/runtime/components/navigation/breadcrumb/Breadcrumb.vue.d.ts +6 -16
- package/dist/runtime/components/navigation-menu/NavigationMenu.vue.d.ts +11 -11
- package/dist/runtime/components/navigation-menu/NavigationMenuIndicator.vue +1 -0
- package/dist/runtime/components/navigation-menu/NavigationMenuLink.vue.d.ts +2 -2
- package/dist/runtime/components/navigation-menu/NavigationMenuTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/navigation-menu/NavigationMenuViewport.vue +1 -0
- package/dist/runtime/components/number-field/NumberField.vue +1 -0
- package/dist/runtime/components/overlays/Toaster.vue +1 -0
- package/dist/runtime/components/overlays/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/toast/Toast.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/toast/ToastAction.vue.d.ts +1 -1
- package/dist/runtime/components/overlays/toast/ToastProvider.vue +1 -0
- package/dist/runtime/components/pin-input/PinInput.vue +139 -0
- package/dist/runtime/components/pin-input/PinInput.vue.d.ts +33 -0
- package/dist/runtime/components/pin-input/PinInputGroup.vue +28 -0
- package/dist/runtime/components/pin-input/PinInputGroup.vue.d.ts +13 -0
- package/dist/runtime/components/pin-input/PinInputSeparator.vue +30 -0
- package/dist/runtime/components/pin-input/PinInputSeparator.vue.d.ts +15 -0
- package/dist/runtime/components/pin-input/PinInputSlot.vue +46 -0
- package/dist/runtime/components/pin-input/PinInputSlot.vue.d.ts +5 -0
- package/dist/runtime/components/resizable/ResizableHandle.vue +1 -0
- package/dist/runtime/components/resizable/ResizablePanel.vue.d.ts +1 -7
- package/dist/runtime/components/resizable/ResizablePanelGroup.vue.d.ts +1 -3
- package/dist/runtime/components/sheet/Sheet.vue.d.ts +1 -1
- package/dist/runtime/components/sheet/SheetContent.vue +6 -2
- package/dist/runtime/components/sheet/SheetOverlay.vue +6 -1
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/runtime/components/sidebar/SidebarProvider.vue +7 -2
- package/dist/runtime/components/sidebar/SidebarProvider.vue.d.ts +1 -1
- package/dist/runtime/components/stepper/Stepper.vue +163 -0
- package/dist/runtime/components/stepper/Stepper.vue.d.ts +62 -0
- package/dist/runtime/components/stepper/StepperContainer.vue +21 -0
- package/dist/runtime/components/stepper/StepperContainer.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperDescription.vue +28 -0
- package/dist/runtime/components/stepper/StepperDescription.vue.d.ts +13 -0
- package/dist/runtime/components/stepper/StepperHeader.vue +21 -0
- package/dist/runtime/components/stepper/StepperHeader.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperIndicator.vue +34 -0
- package/dist/runtime/components/stepper/StepperIndicator.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperItem.vue +44 -0
- package/dist/runtime/components/stepper/StepperItem.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperSeparator.vue +29 -0
- package/dist/runtime/components/stepper/StepperSeparator.vue.d.ts +6 -0
- package/dist/runtime/components/stepper/StepperTitle.vue +27 -0
- package/dist/runtime/components/stepper/StepperTitle.vue.d.ts +13 -0
- package/dist/runtime/components/stepper/StepperTrigger.vue +29 -0
- package/dist/runtime/components/stepper/StepperTrigger.vue.d.ts +15 -0
- package/dist/runtime/components/stepper/StepperWrapper.vue +21 -0
- package/dist/runtime/components/stepper/StepperWrapper.vue.d.ts +15 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue +70 -0
- package/dist/runtime/components/toggle-group/ToggleGroup.vue.d.ts +23 -0
- package/dist/runtime/components/toggle-group/ToggleGroupItem.vue +75 -0
- package/dist/runtime/components/toggle-group/ToggleGroupItem.vue.d.ts +18 -0
- package/dist/runtime/composables/useUnaSettings.d.ts +2 -2
- package/dist/runtime/composables/useUnaSettings.js +7 -6
- package/dist/runtime/plugins/theme.client.js +3 -2
- package/dist/runtime/plugins/theme.server.js +4 -2
- package/dist/runtime/types/accordion.d.ts +36 -91
- package/dist/runtime/types/combobox.d.ts +3 -2
- package/dist/runtime/types/index.d.ts +6 -3
- package/dist/runtime/types/index.js +3 -0
- package/dist/runtime/types/pin-input.d.ts +88 -0
- package/dist/runtime/types/pin-input.js +0 -0
- package/dist/runtime/types/radio-group.d.ts +5 -3
- package/dist/runtime/types/select.d.ts +6 -4
- package/dist/runtime/types/sidebar.d.ts +5 -0
- package/dist/runtime/types/stepper.d.ts +129 -0
- package/dist/runtime/types/stepper.js +0 -0
- package/dist/runtime/types/table.d.ts +16 -3
- package/dist/runtime/types/toggle-group.d.ts +39 -0
- package/dist/runtime/types/toggle-group.js +0 -0
- package/dist/runtime/utils/index.d.ts +1 -1
- package/package.json +20 -20
- package/dist/runtime/components/elements/Accordion.vue +0 -212
- package/dist/runtime/components/elements/Accordion.vue.d.ts +0 -28
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { AccordionItem, Primitive, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
import NAccordionContent from "./AccordionContent.vue";
|
|
6
|
+
import NAccordionHeader from "./AccordionHeader.vue";
|
|
7
|
+
import NAccordionTrigger from "./AccordionTrigger.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
label: { type: String, required: false },
|
|
10
|
+
content: { type: String, required: false },
|
|
11
|
+
una: { type: Object, required: false },
|
|
12
|
+
_accordionHeader: { type: Object, required: false },
|
|
13
|
+
_accordionTrigger: { type: Object, required: false },
|
|
14
|
+
_accordionContent: { type: Object, required: false },
|
|
15
|
+
disabled: { type: Boolean, required: false },
|
|
16
|
+
value: { type: String, required: true },
|
|
17
|
+
unmountOnHide: { type: Boolean, required: false },
|
|
18
|
+
asChild: { type: Boolean, required: false },
|
|
19
|
+
as: { type: null, required: false }
|
|
20
|
+
});
|
|
21
|
+
const forwardProps = useForwardProps(reactiveOmit(props, ["una", "label", "content", "_accordionContent", "_accordionHeader", "_accordionTrigger"]));
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<AccordionItem
|
|
26
|
+
v-slot="{ open }"
|
|
27
|
+
v-bind="forwardProps"
|
|
28
|
+
:class="cn('accordion-item', una?.accordionItem)"
|
|
29
|
+
>
|
|
30
|
+
<slot :open>
|
|
31
|
+
<NAccordionHeader :una v-bind="_accordionHeader">
|
|
32
|
+
<Primitive
|
|
33
|
+
as-child
|
|
34
|
+
:label
|
|
35
|
+
v-bind="_accordionTrigger"
|
|
36
|
+
:una="{
|
|
37
|
+
btnLeading: cn('accordion-leading', una?.accordionLeading),
|
|
38
|
+
btnTrailing: cn(
|
|
39
|
+
'accordion-trailing',
|
|
40
|
+
una?.accordionTrailing,
|
|
41
|
+
open ? una?.accordionTrailingOpen : una?.accordionTrailingClose
|
|
42
|
+
)
|
|
43
|
+
}"
|
|
44
|
+
>
|
|
45
|
+
<slot name="header" :open>
|
|
46
|
+
<NAccordionTrigger>
|
|
47
|
+
<slot name="trigger" :open />
|
|
48
|
+
</NAccordionTrigger>
|
|
49
|
+
</slot>
|
|
50
|
+
</Primitive>
|
|
51
|
+
</NAccordionHeader>
|
|
52
|
+
<NAccordionContent :una v-bind="_accordionContent">
|
|
53
|
+
<slot name="content" :open>
|
|
54
|
+
{{ content }}
|
|
55
|
+
</slot>
|
|
56
|
+
</NAccordionContent>
|
|
57
|
+
</slot>
|
|
58
|
+
</AccordionItem>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { NAccordionItemProps } from '../../../types/accordion.js';
|
|
2
|
+
declare var __VLS_6: {
|
|
3
|
+
open: any;
|
|
4
|
+
}, __VLS_15: {
|
|
5
|
+
open: any;
|
|
6
|
+
}, __VLS_20: {
|
|
7
|
+
open: any;
|
|
8
|
+
}, __VLS_25: {
|
|
9
|
+
open: any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_6) => any;
|
|
13
|
+
} & {
|
|
14
|
+
header?: (props: typeof __VLS_15) => any;
|
|
15
|
+
} & {
|
|
16
|
+
trigger?: (props: typeof __VLS_20) => any;
|
|
17
|
+
} & {
|
|
18
|
+
content?: (props: typeof __VLS_25) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<NAccordionItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAccordionItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { AccordionTrigger, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
una: { type: Object, required: false },
|
|
7
|
+
asChild: { type: Boolean, required: false },
|
|
8
|
+
as: { type: null, required: false },
|
|
9
|
+
type: { type: String, required: false },
|
|
10
|
+
loadingPlacement: { type: String, required: false },
|
|
11
|
+
icon: { type: Boolean, required: false },
|
|
12
|
+
disabled: { type: Boolean, required: false },
|
|
13
|
+
reverse: { type: Boolean, required: false },
|
|
14
|
+
loading: { type: Boolean, required: false },
|
|
15
|
+
block: { type: Boolean, required: false },
|
|
16
|
+
to: { type: null, required: false },
|
|
17
|
+
label: { type: String, required: false },
|
|
18
|
+
btn: { type: String, required: false, default: "~ text" },
|
|
19
|
+
leading: { type: String, required: false },
|
|
20
|
+
trailing: { type: String, required: false, default: "accordion-trailing-icon" },
|
|
21
|
+
size: { type: String, required: false },
|
|
22
|
+
square: { type: null, required: false },
|
|
23
|
+
rounded: { type: null, required: false },
|
|
24
|
+
class: { type: null, required: false },
|
|
25
|
+
breadcrumbActive: { type: String, required: false },
|
|
26
|
+
breadcrumbInactive: { type: String, required: false },
|
|
27
|
+
paginationSelected: { type: String, required: false },
|
|
28
|
+
paginationUnselected: { type: String, required: false },
|
|
29
|
+
dropdownMenu: { type: String, required: false },
|
|
30
|
+
toggleOn: { type: String, required: false },
|
|
31
|
+
toggleOff: { type: String, required: false },
|
|
32
|
+
tabsActive: { type: String, required: false },
|
|
33
|
+
tabsInactive: { type: String, required: false },
|
|
34
|
+
navigationMenu: { type: String, required: false },
|
|
35
|
+
navigationMenuLink: { type: String, required: false },
|
|
36
|
+
ariaLabel: { type: String, required: false }
|
|
37
|
+
});
|
|
38
|
+
const forwardProps = useForwardProps(reactiveOmit(props, ["una"]));
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<AccordionTrigger
|
|
43
|
+
class="group/accordion-trigger accordion-trigger"
|
|
44
|
+
v-bind="forwardProps"
|
|
45
|
+
as-child
|
|
46
|
+
:una="{
|
|
47
|
+
...una,
|
|
48
|
+
btn: cn('accordion-trigger-padding', una?.btn),
|
|
49
|
+
btnLabel: cn('accordion-trigger-label', una?.btnLabel)
|
|
50
|
+
}"
|
|
51
|
+
>
|
|
52
|
+
<slot>
|
|
53
|
+
<NButton />
|
|
54
|
+
</slot>
|
|
55
|
+
</AccordionTrigger>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NAccordionTriggerProps } from '../../../types/accordion.js';
|
|
2
|
+
declare var __VLS_6: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NAccordionTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAccordionTriggerProps> & Readonly<{}>, {
|
|
7
|
+
btn: string;
|
|
8
|
+
trailing: string;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -9,9 +9,9 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_component: import("vue").DefineComponent<NAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NAvatarProps> & Readonly<{}>, {
|
|
11
11
|
size: import("vue").HTMLAttributes["class"];
|
|
12
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
12
13
|
square: import("vue").HTMLAttributes["class"];
|
|
13
14
|
rounded: import("vue").HTMLAttributes["class"];
|
|
14
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
15
15
|
avatar: import("vue").HTMLAttributes["class"];
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NDialogProps } from '../../../types/index.js';
|
|
2
2
|
declare var __VLS_6: {}, __VLS_11: {
|
|
3
|
-
open:
|
|
3
|
+
open: any;
|
|
4
4
|
}, __VLS_27: {}, __VLS_32: {}, __VLS_37: {}, __VLS_42: {}, __VLS_44: {}, __VLS_49: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
6
|
default?: (props: typeof __VLS_6) => any;
|
|
@@ -20,7 +20,6 @@ const props = defineProps({
|
|
|
20
20
|
_dialogOverlay: { type: Object, required: false },
|
|
21
21
|
una: { type: Object, required: false },
|
|
22
22
|
forceMount: { type: Boolean, required: false },
|
|
23
|
-
trapFocus: { type: Boolean, required: false },
|
|
24
23
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
25
24
|
asChild: { type: Boolean, required: false },
|
|
26
25
|
as: { type: null, required: false },
|
|
@@ -17,7 +17,8 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
17
17
|
data-slot="dialog-description"
|
|
18
18
|
v-bind="forwardedProps"
|
|
19
19
|
:class="cn(
|
|
20
|
-
'
|
|
20
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-48%',
|
|
21
|
+
'dialog-description',
|
|
21
22
|
props.una?.dialogDescription,
|
|
22
23
|
props.class
|
|
23
24
|
)"
|
|
@@ -20,7 +20,6 @@ const props = defineProps({
|
|
|
20
20
|
_dialogOverlay: { type: Object, required: false },
|
|
21
21
|
una: { type: Object, required: false },
|
|
22
22
|
forceMount: { type: Boolean, required: false },
|
|
23
|
-
trapFocus: { type: Boolean, required: false },
|
|
24
23
|
disableOutsidePointerEvents: { type: Boolean, required: false },
|
|
25
24
|
asChild: { type: Boolean, required: false },
|
|
26
25
|
as: { type: null, required: false },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { NDropdownMenuProps } from '../../../types/index.js';
|
|
2
2
|
declare var __VLS_7: {}, __VLS_12: {}, __VLS_17: {}, __VLS_22: {
|
|
3
|
-
items:
|
|
3
|
+
items: any;
|
|
4
4
|
}, __VLS_27: {
|
|
5
|
-
items:
|
|
6
|
-
}, __VLS_30:
|
|
7
|
-
label:
|
|
5
|
+
items: any;
|
|
6
|
+
}, __VLS_30: any, __VLS_31: {}, __VLS_62: {
|
|
7
|
+
label: any;
|
|
8
8
|
};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
[K in NonNullable<typeof __VLS_30>]?: (props: typeof __VLS_31) => any;
|
|
@@ -19,8 +19,10 @@ const props = defineProps({
|
|
|
19
19
|
loop: { type: Boolean, required: false },
|
|
20
20
|
side: { type: null, required: false },
|
|
21
21
|
sideOffset: { type: Number, required: false, default: 4 },
|
|
22
|
+
sideFlip: { type: Boolean, required: false },
|
|
22
23
|
align: { type: null, required: false },
|
|
23
24
|
alignOffset: { type: Number, required: false },
|
|
25
|
+
alignFlip: { type: Boolean, required: false },
|
|
24
26
|
avoidCollisions: { type: Boolean, required: false },
|
|
25
27
|
collisionBoundary: { type: null, required: false },
|
|
26
28
|
collisionPadding: { type: [Number, Object], required: false },
|
|
@@ -45,7 +47,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
45
47
|
<DropdownMenuContent
|
|
46
48
|
v-bind="forwarded"
|
|
47
49
|
:class="cn(
|
|
48
|
-
'dropdown-menu-content data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
50
|
+
'dropdown-menu-content data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
49
51
|
props.una?.dropdownMenuContent,
|
|
50
52
|
props.class
|
|
51
53
|
)"
|
|
@@ -12,7 +12,9 @@ const props = defineProps({
|
|
|
12
12
|
forceMount: { type: Boolean, required: false },
|
|
13
13
|
loop: { type: Boolean, required: false },
|
|
14
14
|
sideOffset: { type: Number, required: false },
|
|
15
|
+
sideFlip: { type: Boolean, required: false },
|
|
15
16
|
alignOffset: { type: Number, required: false },
|
|
17
|
+
alignFlip: { type: Boolean, required: false },
|
|
16
18
|
avoidCollisions: { type: Boolean, required: false },
|
|
17
19
|
collisionBoundary: { type: null, required: false },
|
|
18
20
|
collisionPadding: { type: [Number, Object], required: false },
|
|
@@ -36,7 +38,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
36
38
|
<DropdownMenuSubContent
|
|
37
39
|
v-bind="forwarded"
|
|
38
40
|
:class="cn(
|
|
39
|
-
'dropdown-menu-sub-content data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
41
|
+
'dropdown-menu-sub-content data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
40
42
|
forwarded.una?.dropdownMenuSubContent,
|
|
41
43
|
props.class
|
|
42
44
|
)"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NDropdownMenuSubTriggerProps } from '../../../types/index.js';
|
|
2
|
-
declare var __VLS_10:
|
|
2
|
+
declare var __VLS_10: any, __VLS_11: any;
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
5
5
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { NPaginationProps } from '../../../types/index.js';
|
|
2
2
|
declare var __VLS_10: {}, __VLS_15: {}, __VLS_20: {}, __VLS_22: {
|
|
3
|
-
item:
|
|
4
|
-
|
|
5
|
-
value: number;
|
|
6
|
-
};
|
|
7
|
-
page: number;
|
|
3
|
+
item: any;
|
|
4
|
+
page: any;
|
|
8
5
|
}, __VLS_30: {}, __VLS_35: {}, __VLS_40: {};
|
|
9
6
|
type __VLS_Slots = {} & {
|
|
10
7
|
default?: (props: typeof __VLS_10) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NPaginationListItemProps } from '../../../types/index.js';
|
|
2
|
-
declare var __VLS_10:
|
|
2
|
+
declare var __VLS_10: any, __VLS_11: any;
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
[K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
|
|
5
5
|
};
|
|
@@ -13,8 +13,10 @@ const props = defineProps({
|
|
|
13
13
|
forceMount: { type: Boolean, required: false },
|
|
14
14
|
side: { type: null, required: false },
|
|
15
15
|
sideOffset: { type: Number, required: false, default: 4 },
|
|
16
|
+
sideFlip: { type: Boolean, required: false },
|
|
16
17
|
align: { type: null, required: false, default: "center" },
|
|
17
18
|
alignOffset: { type: Number, required: false },
|
|
19
|
+
alignFlip: { type: Boolean, required: false },
|
|
18
20
|
avoidCollisions: { type: Boolean, required: false },
|
|
19
21
|
collisionBoundary: { type: null, required: false },
|
|
20
22
|
collisionPadding: { type: [Number, Object], required: false },
|
|
@@ -42,6 +44,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
42
44
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
43
45
|
:class="
|
|
44
46
|
cn(
|
|
47
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
|
45
48
|
'popover-content',
|
|
46
49
|
props.class
|
|
47
50
|
)
|
|
@@ -37,6 +37,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
37
37
|
<TooltipContent
|
|
38
38
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
39
39
|
:class="cn(
|
|
40
|
+
'animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',
|
|
40
41
|
'tooltip-content',
|
|
41
42
|
props.class,
|
|
42
43
|
props.una?.tooltipContent
|
|
@@ -12,19 +12,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
12
12
|
blur: () => void | undefined;
|
|
13
13
|
select: () => void | undefined;
|
|
14
14
|
inputRef: import("vue").Ref<HTMLTextAreaElement | undefined, HTMLTextAreaElement | undefined>;
|
|
15
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
-
leading: (...args: any[]) => void;
|
|
17
|
-
trailing: (...args: any[]) => void;
|
|
18
|
-
blur: (...args: any[]) => void;
|
|
19
|
-
change: (...args: any[]) => void;
|
|
20
|
-
"update:modelValue": (...args: any[]) => void;
|
|
21
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
-
onLeading?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
onTrailing?: ((...args: any[]) => any) | undefined;
|
|
24
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
25
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
26
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
27
|
-
}>, {
|
|
15
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {
|
|
28
16
|
type: HTMLInputElement["type"] | "textarea";
|
|
29
17
|
size: string;
|
|
30
18
|
autofocusDelay: number;
|
|
@@ -8,6 +8,7 @@ import { RadioGroupRoot, useForwardPropsEmits } from "reka-ui";
|
|
|
8
8
|
import { cn } from "../../../utils";
|
|
9
9
|
import RadioGroupItem from "./RadioGroupItem.vue";
|
|
10
10
|
const props = defineProps({
|
|
11
|
+
modelValue: { type: null, required: true },
|
|
11
12
|
items: { type: Array, required: false },
|
|
12
13
|
labelKey: { type: null, required: false },
|
|
13
14
|
valueKey: { type: null, required: false },
|
|
@@ -20,7 +21,6 @@ const props = defineProps({
|
|
|
20
21
|
square: { type: null, required: false, default: "1em" },
|
|
21
22
|
rounded: { type: null, required: false },
|
|
22
23
|
icon: { type: null, required: false },
|
|
23
|
-
modelValue: { type: null, required: false },
|
|
24
24
|
defaultValue: { type: null, required: false },
|
|
25
25
|
disabled: { type: Boolean, required: false },
|
|
26
26
|
orientation: { type: String, required: false },
|
|
@@ -71,7 +71,6 @@ function getItemDescription(item) {
|
|
|
71
71
|
|
|
72
72
|
<template>
|
|
73
73
|
<RadioGroupRoot
|
|
74
|
-
v-slot="{ modelValue }"
|
|
75
74
|
:class="cn(
|
|
76
75
|
'radio-group',
|
|
77
76
|
orientation === 'horizontal' ? 'radio-group-orientation-horizontal' : 'radio-group-orientation-vertical',
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { AcceptableValue } from 'reka-ui';
|
|
2
2
|
import type { NRadioGroupItemProps, NRadioGroupProps } from '../../../types/index.js';
|
|
3
|
-
declare const _default: <T extends AcceptableValue
|
|
3
|
+
declare const _default: <T extends AcceptableValue, Item extends T | NRadioGroupItemProps<T>>(__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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:modelValue"?: ((payload: string) => any) | undefined;
|
|
6
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NRadioGroupProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
6
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NRadioGroupProps<T, Item> & Partial<{}>> & import("vue").PublicProps;
|
|
7
7
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
8
8
|
attrs: any;
|
|
9
9
|
slots: {
|
|
10
10
|
default?: (props: {
|
|
11
|
-
modelValue:
|
|
11
|
+
modelValue: any;
|
|
12
12
|
}) => any;
|
|
13
13
|
} & {
|
|
14
14
|
label?: (props: {
|
|
15
|
-
item:
|
|
15
|
+
item: any;
|
|
16
16
|
}) => any;
|
|
17
17
|
} & {
|
|
18
18
|
description?: (props: {
|
|
19
|
-
item:
|
|
19
|
+
item: any;
|
|
20
20
|
}) => any;
|
|
21
21
|
};
|
|
22
22
|
emit: (evt: "update:modelValue", payload: string) => void;
|
|
@@ -12,6 +12,7 @@ defineOptions({
|
|
|
12
12
|
inheritAttrs: false
|
|
13
13
|
});
|
|
14
14
|
const props = defineProps({
|
|
15
|
+
value: { type: null, required: true },
|
|
15
16
|
label: { type: String, required: false },
|
|
16
17
|
radioGroup: { type: null, required: false, default: "primary" },
|
|
17
18
|
description: { type: String, required: false },
|
|
@@ -22,7 +23,6 @@ const props = defineProps({
|
|
|
22
23
|
rounded: { type: null, required: false },
|
|
23
24
|
icon: { type: null, required: false, default: "radio-group-indicator-icon" },
|
|
24
25
|
id: { type: String, required: false },
|
|
25
|
-
value: { type: null, required: false },
|
|
26
26
|
disabled: { type: Boolean, required: false },
|
|
27
27
|
asChild: { type: Boolean, required: false },
|
|
28
28
|
as: { type: null, required: false },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NRadioGroupItemProps } from '../../../types/index.js';
|
|
2
|
+
type __VLS_Props = NRadioGroupItemProps;
|
|
2
3
|
declare var __VLS_9: {}, __VLS_17: {}, __VLS_19: {};
|
|
3
4
|
type __VLS_Slots = {} & {
|
|
4
5
|
icon?: (props: typeof __VLS_9) => any;
|
|
@@ -7,7 +8,7 @@ type __VLS_Slots = {} & {
|
|
|
7
8
|
} & {
|
|
8
9
|
description?: (props: typeof __VLS_19) => any;
|
|
9
10
|
};
|
|
10
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
12
|
icon: import("vue").HTMLAttributes["class"];
|
|
12
13
|
size: import("vue").HTMLAttributes["class"];
|
|
13
14
|
square: import("vue").HTMLAttributes["class"];
|
|
@@ -4,7 +4,7 @@ import { computed } from "vue";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { SelectRoot, useForwardPropsEmits } from "reka-ui";
|
|
7
|
-
import { cn
|
|
7
|
+
import { cn } from "../../../utils";
|
|
8
8
|
import SelectContent from "./SelectContent.vue";
|
|
9
9
|
import SelectGroup from "./SelectGroup.vue";
|
|
10
10
|
import SelectItem from "./SelectItem.vue";
|
|
@@ -13,11 +13,14 @@ import SelectSeparator from "./SelectSeparator.vue";
|
|
|
13
13
|
import SelectTrigger from "./SelectTrigger.vue";
|
|
14
14
|
import SelectValue from "./SelectValue.vue";
|
|
15
15
|
const props = defineProps({
|
|
16
|
-
items: { type:
|
|
16
|
+
items: { type: null, required: false },
|
|
17
17
|
itemKey: { type: null, required: false },
|
|
18
18
|
valueKey: { type: null, required: false },
|
|
19
19
|
label: { type: String, required: false },
|
|
20
20
|
groupSeparator: { type: Boolean, required: false },
|
|
21
|
+
defaultValue: { type: null, required: false },
|
|
22
|
+
modelValue: { type: null, required: false },
|
|
23
|
+
multiple: { type: null, required: false },
|
|
21
24
|
_selectScrollUpButton: { type: Object, required: false },
|
|
22
25
|
_selectItemText: { type: Object, required: false },
|
|
23
26
|
_selectScrollDownButton: { type: Object, required: false },
|
|
@@ -31,11 +34,8 @@ const props = defineProps({
|
|
|
31
34
|
una: { type: Object, required: false },
|
|
32
35
|
open: { type: Boolean, required: false },
|
|
33
36
|
defaultOpen: { type: Boolean, required: false },
|
|
34
|
-
defaultValue: { type: null, required: false },
|
|
35
|
-
modelValue: { type: null, required: false },
|
|
36
37
|
by: { type: [String, Function], required: false },
|
|
37
38
|
dir: { type: String, required: false },
|
|
38
|
-
multiple: { type: Boolean, required: false },
|
|
39
39
|
autocomplete: { type: String, required: false },
|
|
40
40
|
disabled: { type: Boolean, required: false },
|
|
41
41
|
name: { type: String, required: false },
|
|
@@ -69,25 +69,10 @@ function formatSelectedValue(value) {
|
|
|
69
69
|
}
|
|
70
70
|
return value;
|
|
71
71
|
}
|
|
72
|
-
function isItemSelected(item, modelValue) {
|
|
73
|
-
if (!modelValue)
|
|
74
|
-
return false;
|
|
75
|
-
if (props.multiple && Array.isArray(modelValue)) {
|
|
76
|
-
return modelValue.some((val) => {
|
|
77
|
-
const valObj = typeof val === "object" && val ? val : { value: val };
|
|
78
|
-
const itemObj2 = typeof item === "object" && item ? item : { value: item };
|
|
79
|
-
return isEqualObject(valObj, itemObj2);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
const modelObj = typeof modelValue === "object" && modelValue ? modelValue : { value: modelValue };
|
|
83
|
-
const itemObj = typeof item === "object" && item ? item : { value: item };
|
|
84
|
-
return isEqualObject(modelObj, itemObj);
|
|
85
|
-
}
|
|
86
72
|
</script>
|
|
87
73
|
|
|
88
74
|
<template>
|
|
89
75
|
<SelectRoot
|
|
90
|
-
v-slot="{ modelValue, open }"
|
|
91
76
|
:class="cn(
|
|
92
77
|
props.una?.select,
|
|
93
78
|
props.class
|
|
@@ -150,7 +135,6 @@ function isItemSelected(item, modelValue) {
|
|
|
150
135
|
:size
|
|
151
136
|
:select-item
|
|
152
137
|
v-bind="props._selectItem"
|
|
153
|
-
:is-selected="isItemSelected(item, modelValue)"
|
|
154
138
|
:una
|
|
155
139
|
>
|
|
156
140
|
<slot name="item" :item="item">
|
|
@@ -197,7 +181,6 @@ function isItemSelected(item, modelValue) {
|
|
|
197
181
|
:size
|
|
198
182
|
:select-item
|
|
199
183
|
v-bind="{ ..._selectItem, ...group._selectItem }"
|
|
200
|
-
:is-selected="isItemSelected(item, modelValue)"
|
|
201
184
|
:una
|
|
202
185
|
>
|
|
203
186
|
<slot name="item" :item="item">
|
|
@@ -211,7 +194,6 @@ function isItemSelected(item, modelValue) {
|
|
|
211
194
|
</slot>
|
|
212
195
|
</SelectGroup>
|
|
213
196
|
</template>
|
|
214
|
-
<slot />
|
|
215
197
|
</slot>
|
|
216
198
|
</SelectContent>
|
|
217
199
|
</slot>
|