@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,15 @@
|
|
|
1
|
+
import type { NStepperIndicatorProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: any;
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NStepperIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperIndicatorProps> & Readonly<{}>, {
|
|
7
|
+
stepper: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { StepperItem, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
slot: { type: String, required: false },
|
|
7
|
+
title: { type: String, required: false },
|
|
8
|
+
description: { type: String, required: false },
|
|
9
|
+
value: { type: [String, Number], required: false },
|
|
10
|
+
icon: { type: String, required: false },
|
|
11
|
+
una: { type: Object, required: false },
|
|
12
|
+
step: { type: Number, required: true },
|
|
13
|
+
disabled: { type: Boolean, required: false },
|
|
14
|
+
completed: { type: Boolean, required: false },
|
|
15
|
+
asChild: { type: Boolean, required: false },
|
|
16
|
+
as: { type: null, required: false },
|
|
17
|
+
orientation: { type: String, required: false, default: "horizontal" },
|
|
18
|
+
class: { type: null, required: false },
|
|
19
|
+
size: { type: null, required: false }
|
|
20
|
+
});
|
|
21
|
+
const delegatedProps = reactiveOmit(props, [
|
|
22
|
+
"class",
|
|
23
|
+
"una",
|
|
24
|
+
"title",
|
|
25
|
+
"description",
|
|
26
|
+
"slot"
|
|
27
|
+
]);
|
|
28
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<StepperItem
|
|
33
|
+
v-slot="slotProps"
|
|
34
|
+
v-bind="forwarded"
|
|
35
|
+
:class="cn(
|
|
36
|
+
'group stepper-item',
|
|
37
|
+
orientation === 'vertical' && 'stepper-item-vertical',
|
|
38
|
+
props.class,
|
|
39
|
+
props.una?.stepperItem
|
|
40
|
+
)"
|
|
41
|
+
>
|
|
42
|
+
<slot v-bind="slotProps" />
|
|
43
|
+
</StepperItem>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NStepperItemProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_6: any;
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_6) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NStepperItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperItemProps> & Readonly<{}>, {
|
|
7
|
+
orientation: "vertical" | "horizontal";
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { StepperSeparator, useForwardProps } from "reka-ui";
|
|
4
|
+
import { cn } from "../../utils";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
una: { type: Object, required: false },
|
|
7
|
+
orientation: { type: String, required: false, default: "horizontal" },
|
|
8
|
+
decorative: { type: Boolean, required: false },
|
|
9
|
+
asChild: { type: Boolean, required: false },
|
|
10
|
+
as: { type: null, required: false },
|
|
11
|
+
stepper: { type: String, required: false, default: "solid-primary" },
|
|
12
|
+
class: { type: null, required: false }
|
|
13
|
+
});
|
|
14
|
+
const delegatedProps = reactiveOmit(props, "class", "una");
|
|
15
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<StepperSeparator
|
|
20
|
+
v-bind="forwarded"
|
|
21
|
+
:class="cn(
|
|
22
|
+
'stepper-separator',
|
|
23
|
+
orientation === 'vertical' ? 'stepper-separator-vertical' : 'stepper-separator-horizontal',
|
|
24
|
+
props.class,
|
|
25
|
+
props.una?.stepperSeparator
|
|
26
|
+
)"
|
|
27
|
+
:stepper
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NStepperSeparatorProps } from '../../types/index.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<NStepperSeparatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperSeparatorProps> & Readonly<{}>, {
|
|
3
|
+
orientation: "vertical" | "horizontal";
|
|
4
|
+
stepper: string;
|
|
5
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { StepperTitle, 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
|
+
class: { type: null, required: false },
|
|
10
|
+
size: { type: null, required: false }
|
|
11
|
+
});
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class", "una");
|
|
13
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<StepperTitle
|
|
18
|
+
v-bind="forwarded"
|
|
19
|
+
:class="cn(
|
|
20
|
+
'stepper-title',
|
|
21
|
+
props.class,
|
|
22
|
+
props.una?.stepperTitle
|
|
23
|
+
)"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</StepperTitle>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NStepperTitleProps } from '../../types/index.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<NStepperTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { StepperTrigger, 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
|
+
stepper: { type: String, required: false, default: "solid-primary" },
|
|
10
|
+
class: { type: null, required: false },
|
|
11
|
+
size: { type: null, required: false }
|
|
12
|
+
});
|
|
13
|
+
const delegatedProps = reactiveOmit(props, "class", "una");
|
|
14
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<StepperTrigger
|
|
19
|
+
v-bind="forwarded"
|
|
20
|
+
:class="cn(
|
|
21
|
+
'stepper-trigger',
|
|
22
|
+
props.class,
|
|
23
|
+
props.una?.stepperTrigger
|
|
24
|
+
)"
|
|
25
|
+
:stepper
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</StepperTrigger>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NStepperTriggerProps } from '../../types/index.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<NStepperTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperTriggerProps> & Readonly<{}>, {
|
|
7
|
+
stepper: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
una: { type: Object, required: false },
|
|
5
|
+
class: { type: null, required: false },
|
|
6
|
+
orientation: { type: String, required: false, default: "horizontal" }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
:class="cn(
|
|
13
|
+
'stepper-wrapper',
|
|
14
|
+
orientation === 'vertical' && 'stepper-wrapper-vertical',
|
|
15
|
+
props.class,
|
|
16
|
+
props.una?.stepperWrapper
|
|
17
|
+
)"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NStepperWrapperProps } from '../../types/index.js';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NStepperWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NStepperWrapperProps> & Readonly<{}>, {
|
|
7
|
+
orientation: "vertical" | "horizontal";
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
7
|
+
import { ToggleGroupRoot, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { cn } from "../../utils";
|
|
9
|
+
import ToggleGroupItem from "./ToggleGroupItem.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
items: { type: null, required: false },
|
|
12
|
+
_toggleGroupItem: { type: Object, required: false },
|
|
13
|
+
una: { type: Object, required: false },
|
|
14
|
+
rovingFocus: { type: Boolean, required: false },
|
|
15
|
+
disabled: { type: Boolean, required: false },
|
|
16
|
+
orientation: { type: String, required: false },
|
|
17
|
+
dir: { type: String, required: false },
|
|
18
|
+
loop: { type: Boolean, required: false },
|
|
19
|
+
asChild: { type: Boolean, required: false },
|
|
20
|
+
as: { type: null, required: false },
|
|
21
|
+
name: { type: String, required: false },
|
|
22
|
+
required: { type: Boolean, required: false },
|
|
23
|
+
type: { type: String, required: false },
|
|
24
|
+
modelValue: { type: null, required: false },
|
|
25
|
+
defaultValue: { type: null, required: false },
|
|
26
|
+
toggleOff: { type: String, required: false },
|
|
27
|
+
toggleOn: { type: String, required: false },
|
|
28
|
+
class: { type: null, required: false },
|
|
29
|
+
size: { type: null, required: false }
|
|
30
|
+
});
|
|
31
|
+
const emits = defineEmits(["update:modelValue"]);
|
|
32
|
+
const rootProps = reactiveOmit(props, [
|
|
33
|
+
"class",
|
|
34
|
+
"size",
|
|
35
|
+
"toggleOff",
|
|
36
|
+
"toggleOn",
|
|
37
|
+
"una"
|
|
38
|
+
]);
|
|
39
|
+
const forwarded = useForwardPropsEmits(rootProps, emits);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<ToggleGroupRoot
|
|
44
|
+
v-slot="slotProps"
|
|
45
|
+
v-bind="forwarded"
|
|
46
|
+
data-slot="toggle-group"
|
|
47
|
+
:class="cn(
|
|
48
|
+
'toggle-group',
|
|
49
|
+
props.orientation === 'vertical' ? 'toggle-group-vertical' : 'toggle-group-horizontal',
|
|
50
|
+
props.class,
|
|
51
|
+
props.una?.toggleGroup
|
|
52
|
+
)"
|
|
53
|
+
>
|
|
54
|
+
<slot v-bind="slotProps">
|
|
55
|
+
<template v-if="items && items.length">
|
|
56
|
+
<template v-for="item in items" :key="item.value">
|
|
57
|
+
<slot :name="item.slot ?? 'item'" v-bind="{ item, value: item.value }">
|
|
58
|
+
<ToggleGroupItem
|
|
59
|
+
:una
|
|
60
|
+
:size
|
|
61
|
+
:toggle-on
|
|
62
|
+
:toggle-off
|
|
63
|
+
v-bind="{ ...item, ..._toggleGroupItem }"
|
|
64
|
+
/>
|
|
65
|
+
</slot>
|
|
66
|
+
</template>
|
|
67
|
+
</template>
|
|
68
|
+
</slot>
|
|
69
|
+
</ToggleGroupRoot>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { NToggleGroupItemProps, NToggleGroupProps } from '../../types/index.js';
|
|
2
|
+
declare const _default: <T extends NToggleGroupItemProps, U extends Array<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<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((payload: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[]) => any) | undefined;
|
|
5
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NToggleGroupProps<U> & Partial<{}>> & import("vue").PublicProps;
|
|
6
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
[x: string]: ((props: {
|
|
10
|
+
item: any;
|
|
11
|
+
value: any;
|
|
12
|
+
}) => any) | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: any) => any;
|
|
15
|
+
};
|
|
16
|
+
emit: (evt: "update:modelValue", payload: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[]) => void;
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} & {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
7
|
+
import { ToggleGroupItem, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { cn } from "../../utils";
|
|
9
|
+
import Toggle from "../elements/Toggle.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
slot: { type: String, required: false },
|
|
12
|
+
una: { type: Object, required: false },
|
|
13
|
+
value: { type: null, required: true },
|
|
14
|
+
disabled: { type: Boolean, required: false },
|
|
15
|
+
asChild: { type: Boolean, required: false },
|
|
16
|
+
as: { type: null, required: false, default: Toggle },
|
|
17
|
+
toggleOn: { type: String, required: false },
|
|
18
|
+
toggleOff: { type: String, required: false },
|
|
19
|
+
defaultValue: { type: Boolean, required: false },
|
|
20
|
+
modelValue: { type: [Boolean, null], required: false },
|
|
21
|
+
name: { type: String, required: false },
|
|
22
|
+
required: { type: Boolean, required: false },
|
|
23
|
+
type: { type: String, required: false },
|
|
24
|
+
loadingPlacement: { type: String, required: false },
|
|
25
|
+
icon: { type: Boolean, required: false, default: true },
|
|
26
|
+
reverse: { type: Boolean, required: false },
|
|
27
|
+
loading: { type: Boolean, required: false },
|
|
28
|
+
block: { type: Boolean, required: false },
|
|
29
|
+
to: { type: null, required: false },
|
|
30
|
+
label: { type: String, required: false },
|
|
31
|
+
btn: { type: String, required: false },
|
|
32
|
+
leading: { type: String, required: false },
|
|
33
|
+
trailing: { type: String, required: false },
|
|
34
|
+
size: { type: String, required: false },
|
|
35
|
+
square: { type: null, required: false, default: true },
|
|
36
|
+
rounded: { type: null, required: false },
|
|
37
|
+
class: { type: null, required: false },
|
|
38
|
+
breadcrumbActive: { type: String, required: false },
|
|
39
|
+
breadcrumbInactive: { type: String, required: false },
|
|
40
|
+
paginationSelected: { type: String, required: false },
|
|
41
|
+
paginationUnselected: { type: String, required: false },
|
|
42
|
+
dropdownMenu: { type: String, required: false },
|
|
43
|
+
tabsActive: { type: String, required: false },
|
|
44
|
+
tabsInactive: { type: String, required: false },
|
|
45
|
+
navigationMenu: { type: String, required: false },
|
|
46
|
+
navigationMenuLink: { type: String, required: false },
|
|
47
|
+
ariaLabel: { type: String, required: false }
|
|
48
|
+
});
|
|
49
|
+
const emits = defineEmits(["update:modelValue"]);
|
|
50
|
+
const delegatedProps = reactiveOmit(props, [
|
|
51
|
+
"class",
|
|
52
|
+
"toggleOff",
|
|
53
|
+
"toggleOn",
|
|
54
|
+
"una"
|
|
55
|
+
]);
|
|
56
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<ToggleGroupItem
|
|
61
|
+
v-slot="slotProps"
|
|
62
|
+
v-bind="forwarded"
|
|
63
|
+
data-slot="toggle-group-item"
|
|
64
|
+
:toggle-on
|
|
65
|
+
:toggle-off
|
|
66
|
+
:as="props.as"
|
|
67
|
+
:class="cn(
|
|
68
|
+
'toggle-group-item',
|
|
69
|
+
props.una?.toggleGroupItem,
|
|
70
|
+
props.class
|
|
71
|
+
)"
|
|
72
|
+
>
|
|
73
|
+
<slot v-bind="slotProps" />
|
|
74
|
+
</ToggleGroupItem>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NToggleGroupItemProps } from '../../types/index.js';
|
|
2
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<NToggleGroupItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
"update:modelValue": (value: boolean) => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<NToggleGroupItemProps> & Readonly<{
|
|
5
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
icon: boolean;
|
|
8
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
9
|
+
square: import("vue").HTMLAttributes["class"];
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
|
+
default?: (props: any) => any;
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { UnaSettings } from '../types/index.js';
|
|
3
3
|
export interface UseUnaSettingsReturn {
|
|
4
|
-
defaultSettings: UnaSettings
|
|
5
|
-
settings: Ref<UnaSettings
|
|
4
|
+
defaultSettings: Omit<UnaSettings, 'themes'>;
|
|
5
|
+
settings: Ref<Omit<UnaSettings, 'themes'>>;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function useUnaSettings(): UseUnaSettingsReturn;
|
|
@@ -6,14 +6,13 @@ export function useUnaSettings() {
|
|
|
6
6
|
const { una } = useAppConfig();
|
|
7
7
|
const { getPrimaryColors, getGrayColors } = useUnaThemes();
|
|
8
8
|
const defaultSettings = {
|
|
9
|
-
primaryColors: getPrimaryColors(una.primary),
|
|
10
|
-
grayColors: getGrayColors(una.gray),
|
|
9
|
+
primaryColors: una.primary ? getPrimaryColors(una.primary) : {},
|
|
10
|
+
grayColors: una.gray ? getGrayColors(una.gray) : {},
|
|
11
11
|
primary: una.primary,
|
|
12
12
|
gray: una.gray,
|
|
13
13
|
radius: una.radius,
|
|
14
14
|
fontSize: una.fontSize,
|
|
15
|
-
theme: una.theme
|
|
16
|
-
themes: una.themes
|
|
15
|
+
theme: una.theme
|
|
17
16
|
};
|
|
18
17
|
const settings = useStorage("una-settings", defaultSettings, void 0, {
|
|
19
18
|
mergeDefaults: defu
|
|
@@ -21,14 +20,16 @@ export function useUnaSettings() {
|
|
|
21
20
|
watch(
|
|
22
21
|
() => [settings.value.primary, settings.value.gray],
|
|
23
22
|
([primary, gray]) => {
|
|
24
|
-
settings.value.primaryColors = getPrimaryColors(primary
|
|
25
|
-
settings.value.grayColors = getGrayColors(gray
|
|
23
|
+
settings.value.primaryColors = primary ? getPrimaryColors(primary) : {};
|
|
24
|
+
settings.value.grayColors = gray ? getGrayColors(gray) : {};
|
|
26
25
|
},
|
|
27
26
|
{ immediate: true }
|
|
28
27
|
);
|
|
29
28
|
function reset() {
|
|
30
29
|
if (una.theme) {
|
|
31
30
|
settings.value.theme = una.theme;
|
|
31
|
+
settings.value.primary = false;
|
|
32
|
+
settings.value.gray = false;
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
35
|
settings.value.primary = defaultSettings.primary;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#app";
|
|
1
|
+
import { defineNuxtPlugin, useAppConfig } from "#app";
|
|
2
2
|
import { computed, watchEffect } from "vue";
|
|
3
3
|
import { useUnaSettings } from "../composables/useUnaSettings.js";
|
|
4
4
|
let unaUIStyle;
|
|
5
5
|
export default defineNuxtPlugin(() => {
|
|
6
|
+
const { una: { themes } } = useAppConfig();
|
|
6
7
|
const { settings } = useUnaSettings();
|
|
7
8
|
unaUIStyle = document.createElement("style");
|
|
8
9
|
unaUIStyle.id = "una-ui-theme";
|
|
@@ -10,7 +11,7 @@ export default defineNuxtPlugin(() => {
|
|
|
10
11
|
const html = document.documentElement;
|
|
11
12
|
html.removeAttribute("style");
|
|
12
13
|
const computedStyles = computed(() => {
|
|
13
|
-
const theme =
|
|
14
|
+
const theme = themes.find((t) => t.name === settings.value.theme);
|
|
14
15
|
if (settings.value.theme && theme) {
|
|
15
16
|
return `
|
|
16
17
|
:root {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { defineNuxtPlugin, useHead } from "#app";
|
|
1
|
+
import { defineNuxtPlugin, useAppConfig, useHead } from "#app";
|
|
2
2
|
import { useUnaSettings } from "../composables/useUnaSettings.js";
|
|
3
3
|
export default defineNuxtPlugin(() => {
|
|
4
|
+
const { una: { themes } } = useAppConfig();
|
|
4
5
|
const { defaultSettings } = useUnaSettings();
|
|
5
6
|
useHead({
|
|
6
7
|
script: [
|
|
7
8
|
{
|
|
8
9
|
innerHTML: `
|
|
9
10
|
;(function() {
|
|
11
|
+
const themes = ${JSON.stringify(themes)}
|
|
10
12
|
let settings = JSON.parse(localStorage.getItem('una-settings'))
|
|
11
13
|
|
|
12
14
|
if (!settings) {
|
|
@@ -17,7 +19,7 @@ export default defineNuxtPlugin(() => {
|
|
|
17
19
|
${process.dev ? "console.log({ settings })" : ""}
|
|
18
20
|
|
|
19
21
|
if (settings.theme) {
|
|
20
|
-
const theme =
|
|
22
|
+
const theme = themes.find(t => t.name === settings.theme)
|
|
21
23
|
if (theme) {
|
|
22
24
|
Object.entries(theme.cssVars.light).map(i => html.style.setProperty(i[0], i[1]))
|
|
23
25
|
Object.entries(theme.cssVars.dark).map(i => html.style.setProperty(i[0], i[1]))
|