@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
|
@@ -1,66 +1,64 @@
|
|
|
1
1
|
import type { AcceptableValue } from 'reka-ui';
|
|
2
2
|
import type { NSelectProps, SelectGroup as SelectGroupType } from '../../../types/index.js';
|
|
3
|
-
declare const _default: <T extends AcceptableValue>(__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
|
+
declare const _default: <T extends AcceptableValue, I extends Array<T | SelectGroupType<T>>, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
6
6
|
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
7
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open"> & NSelectProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:open"> & NSelectProps<T, I, M> & Partial<{}>> & import("vue").PublicProps;
|
|
8
8
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: {
|
|
11
11
|
default?: (props: {
|
|
12
|
-
modelValue:
|
|
13
|
-
open:
|
|
12
|
+
modelValue: any;
|
|
13
|
+
open: any;
|
|
14
14
|
}) => any;
|
|
15
15
|
} & {
|
|
16
16
|
'trigger-wrapper'?: (props: {
|
|
17
|
-
modelValue:
|
|
18
|
-
open:
|
|
17
|
+
modelValue: any;
|
|
18
|
+
open: any;
|
|
19
19
|
}) => any;
|
|
20
20
|
} & {
|
|
21
21
|
trigger?: (props: {
|
|
22
|
-
modelValue:
|
|
23
|
-
open:
|
|
22
|
+
modelValue: any;
|
|
23
|
+
open: any;
|
|
24
24
|
}) => any;
|
|
25
25
|
} & {
|
|
26
26
|
value?: (props: {
|
|
27
|
-
modelValue:
|
|
28
|
-
open:
|
|
27
|
+
modelValue: any;
|
|
28
|
+
open: any;
|
|
29
29
|
}) => any;
|
|
30
30
|
} & {
|
|
31
31
|
content?: (props: {
|
|
32
|
-
items:
|
|
32
|
+
items: any;
|
|
33
33
|
}) => any;
|
|
34
34
|
} & {
|
|
35
35
|
label?: (props: {
|
|
36
|
-
label:
|
|
36
|
+
label: any;
|
|
37
37
|
}) => any;
|
|
38
38
|
} & {
|
|
39
39
|
item?: (props: {
|
|
40
|
-
item:
|
|
40
|
+
item: any;
|
|
41
41
|
}) => any;
|
|
42
42
|
} & {
|
|
43
43
|
indicator?: (props: {
|
|
44
|
-
item:
|
|
44
|
+
item: any;
|
|
45
45
|
}) => any;
|
|
46
46
|
} & {
|
|
47
47
|
group?: (props: {
|
|
48
|
-
items:
|
|
48
|
+
items: any;
|
|
49
49
|
}) => any;
|
|
50
50
|
} & {
|
|
51
51
|
label?: (props: {
|
|
52
|
-
label:
|
|
52
|
+
label: any;
|
|
53
53
|
}) => any;
|
|
54
54
|
} & {
|
|
55
55
|
item?: (props: {
|
|
56
|
-
item:
|
|
56
|
+
item: any;
|
|
57
57
|
}) => any;
|
|
58
58
|
} & {
|
|
59
59
|
indicator?: (props: {
|
|
60
|
-
item:
|
|
60
|
+
item: any;
|
|
61
61
|
}) => any;
|
|
62
|
-
} & {
|
|
63
|
-
default?: (props: {}) => any;
|
|
64
62
|
};
|
|
65
63
|
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "update:open", value: boolean) => void);
|
|
66
64
|
}>) => import("vue").VNode & {
|
|
@@ -22,8 +22,10 @@ const props = defineProps({
|
|
|
22
22
|
bodyLock: { type: Boolean, required: false },
|
|
23
23
|
side: { type: null, required: false },
|
|
24
24
|
sideOffset: { type: Number, required: false },
|
|
25
|
+
sideFlip: { type: Boolean, required: false },
|
|
25
26
|
align: { type: null, required: false },
|
|
26
27
|
alignOffset: { type: Number, required: false },
|
|
28
|
+
alignFlip: { type: Boolean, required: false },
|
|
27
29
|
avoidCollisions: { type: Boolean, required: false },
|
|
28
30
|
collisionBoundary: { type: null, required: false },
|
|
29
31
|
collisionPadding: { type: [Number, Object], required: false },
|
|
@@ -51,6 +53,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
51
53
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
52
54
|
:class="
|
|
53
55
|
cn(
|
|
56
|
+
'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',
|
|
54
57
|
'select-content',
|
|
55
58
|
position === 'popper' && 'select-content-popper',
|
|
56
59
|
props.class
|
|
@@ -9,7 +9,6 @@ import SelectItemIndicator from "./SelectItemIndicator.vue";
|
|
|
9
9
|
import SelectItemText from "./SelectItemText.vue";
|
|
10
10
|
const props = defineProps({
|
|
11
11
|
selectItem: { type: null, required: false, default: "gray" },
|
|
12
|
-
isSelected: { type: Boolean, required: false },
|
|
13
12
|
_selectItemText: { type: Object, required: false },
|
|
14
13
|
_selectItemIndicator: { type: Object, required: false },
|
|
15
14
|
una: { type: Object, required: false },
|
|
@@ -38,7 +37,6 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
38
37
|
:select-item
|
|
39
38
|
>
|
|
40
39
|
<SelectItemIndicator
|
|
41
|
-
v-if="isSelected"
|
|
42
40
|
:una
|
|
43
41
|
v-bind="props._selectItemIndicator"
|
|
44
42
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
+
import { SelectItemIndicator, useForwardProps } from "reka-ui";
|
|
3
4
|
import { cn } from "../../../utils";
|
|
4
5
|
import Icon from "../../elements/Icon.vue";
|
|
5
6
|
const props = defineProps({
|
|
@@ -7,14 +8,14 @@ const props = defineProps({
|
|
|
7
8
|
class: { type: null, required: false },
|
|
8
9
|
una: { type: Object, required: false },
|
|
9
10
|
asChild: { type: Boolean, required: false },
|
|
10
|
-
as: { type: null, required: false
|
|
11
|
+
as: { type: null, required: false }
|
|
11
12
|
});
|
|
13
|
+
const forwardProps = useForwardProps(reactiveOmit(props, ["icon", "una"]));
|
|
12
14
|
</script>
|
|
13
15
|
|
|
14
16
|
<template>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
v-bind="props"
|
|
17
|
+
<SelectItemIndicator
|
|
18
|
+
v-bind="forwardProps"
|
|
18
19
|
:class="cn(
|
|
19
20
|
'select-item-indicator',
|
|
20
21
|
props.una?.selectItemIndicator,
|
|
@@ -29,5 +30,5 @@ const props = defineProps({
|
|
|
29
30
|
)"
|
|
30
31
|
/>
|
|
31
32
|
</slot>
|
|
32
|
-
</
|
|
33
|
+
</SelectItemIndicator>
|
|
33
34
|
</template>
|
|
@@ -3,9 +3,7 @@ declare var __VLS_6: {};
|
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
default?: (props: typeof __VLS_6) => any;
|
|
5
5
|
};
|
|
6
|
-
declare const __VLS_component: import("vue").DefineComponent<NSelectItemIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NSelectItemIndicatorProps> & Readonly<{}>, {
|
|
7
|
-
as: import("reka-ui").AsTag | import("vue").Component;
|
|
8
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<NSelectItemIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NSelectItemIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
8
|
export default _default;
|
|
11
9
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -14,8 +14,10 @@ const props = defineProps({
|
|
|
14
14
|
forceMount: { type: Boolean, required: false },
|
|
15
15
|
side: { type: null, required: false },
|
|
16
16
|
sideOffset: { type: Number, required: false, default: 4 },
|
|
17
|
+
sideFlip: { type: Boolean, required: false },
|
|
17
18
|
align: { type: null, required: false },
|
|
18
19
|
alignOffset: { type: Number, required: false },
|
|
20
|
+
alignFlip: { type: Boolean, required: false },
|
|
19
21
|
avoidCollisions: { type: Boolean, required: false },
|
|
20
22
|
collisionBoundary: { type: null, required: false },
|
|
21
23
|
collisionPadding: { type: [Number, Object], required: false },
|
|
@@ -44,6 +46,7 @@ const forwarded = useForwardProps(delegatedProps);
|
|
|
44
46
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
45
47
|
:class="
|
|
46
48
|
cn(
|
|
49
|
+
'data-[state=hidden]:opacity-0 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',
|
|
47
50
|
'hover-card-content',
|
|
48
51
|
props.una?.hoverCardContent,
|
|
49
52
|
props.class
|
|
@@ -25,23 +25,23 @@ const currentPrimaryThemeName = computed(() => {
|
|
|
25
25
|
});
|
|
26
26
|
const currentGrayThemeHex = computed(() => settings.value.grayColors?.["--una-gray-hex"]);
|
|
27
27
|
const currentGrayThemeName = computed(() => {
|
|
28
|
-
if (settings.value.theme
|
|
29
|
-
return
|
|
28
|
+
if (settings.value.theme) {
|
|
29
|
+
return settings.value.theme;
|
|
30
30
|
}
|
|
31
31
|
const theme = grayThemes.find(([, theme2]) => theme2["--una-gray-hex"] === currentGrayThemeHex.value);
|
|
32
32
|
return theme ? theme[0] : "";
|
|
33
33
|
});
|
|
34
|
-
function
|
|
34
|
+
function updateTheme(theme) {
|
|
35
35
|
settings.value.theme = theme;
|
|
36
|
-
settings.value.primary =
|
|
37
|
-
settings.value.gray =
|
|
36
|
+
settings.value.primary = false;
|
|
37
|
+
settings.value.gray = false;
|
|
38
38
|
}
|
|
39
39
|
function updatePrimaryTheme(theme) {
|
|
40
|
-
settings.value.theme =
|
|
40
|
+
settings.value.theme = false;
|
|
41
41
|
settings.value.primary = theme;
|
|
42
42
|
}
|
|
43
43
|
function updateGrayTheme(theme) {
|
|
44
|
-
settings.value.theme =
|
|
44
|
+
settings.value.theme = false;
|
|
45
45
|
settings.value.gray = theme;
|
|
46
46
|
}
|
|
47
47
|
function shuffleTheme() {
|
|
@@ -114,7 +114,7 @@ function shuffleTheme() {
|
|
|
114
114
|
class="justify-start gap-2 ring-primary"
|
|
115
115
|
:aria-label="`Theme: ${theme.name}`"
|
|
116
116
|
:class="currentPrimaryThemeName === theme?.name && 'ring-2'"
|
|
117
|
-
@click="
|
|
117
|
+
@click="updateTheme(theme.name)"
|
|
118
118
|
>
|
|
119
119
|
<template #leading>
|
|
120
120
|
<Icon
|
|
@@ -169,19 +169,25 @@ function shuffleTheme() {
|
|
|
169
169
|
<div class="space-y-2">
|
|
170
170
|
<Label for="color" class="text-xs"> Gray Color </Label>
|
|
171
171
|
<div class="grid grid-cols-7 gap-3">
|
|
172
|
-
<
|
|
172
|
+
<template
|
|
173
173
|
v-for="[key, theme] in grayThemes"
|
|
174
174
|
:key="key"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
175
|
+
>
|
|
176
|
+
<button
|
|
177
|
+
:title="capitalize(key)"
|
|
178
|
+
:style="{
|
|
179
|
+
'--c-gray': `oklch(${theme['--una-gray-600']})`,
|
|
180
|
+
'--c-gray-foreground': `oklch(${theme['--una-gray-500']})`
|
|
181
|
+
}"
|
|
182
|
+
class="bg-$c-gray transition-all dark:bg-$c-gray-foreground"
|
|
183
|
+
rounded="full"
|
|
184
|
+
square="6.5"
|
|
185
|
+
:class="[currentGrayThemeName === key ? 'ring-2' : 'scale-93']"
|
|
186
|
+
ring="gray offset-4 offset-background"
|
|
187
|
+
:aria-label="`Gray Color: ${key}`"
|
|
188
|
+
@click="updateGrayTheme(key)"
|
|
189
|
+
/>
|
|
190
|
+
</template>
|
|
185
191
|
</div>
|
|
186
192
|
</div>
|
|
187
193
|
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
import type { NBreadcrumbProps } from '../../../types/index.js';
|
|
2
2
|
declare var __VLS_5: {
|
|
3
|
-
items:
|
|
4
|
-
children?: import("../../../types/index.js").NButtonProps[];
|
|
5
|
-
}>[];
|
|
3
|
+
items: any;
|
|
6
4
|
}, __VLS_10: {
|
|
7
|
-
item:
|
|
8
|
-
children?: import("../../../types/index.js").NButtonProps[];
|
|
9
|
-
}>;
|
|
5
|
+
item: any;
|
|
10
6
|
}, __VLS_15: {
|
|
11
|
-
item:
|
|
12
|
-
children?: import("../../../types/index.js").NButtonProps[];
|
|
13
|
-
}>;
|
|
7
|
+
item: any;
|
|
14
8
|
}, __VLS_20: {
|
|
15
|
-
item:
|
|
16
|
-
|
|
17
|
-
}>;
|
|
18
|
-
index: number;
|
|
9
|
+
item: any;
|
|
10
|
+
index: any;
|
|
19
11
|
isActive: boolean;
|
|
20
12
|
}, __VLS_22: {
|
|
21
|
-
item:
|
|
22
|
-
children?: import("../../../types/index.js").NButtonProps[];
|
|
23
|
-
}>;
|
|
13
|
+
item: any;
|
|
24
14
|
}, __VLS_33: {};
|
|
25
15
|
type __VLS_Slots = {} & {
|
|
26
16
|
root?: (props: typeof __VLS_5) => any;
|
|
@@ -7,31 +7,31 @@ declare const _default: <T extends U[], U extends NNavigationMenuItemProps>(__VL
|
|
|
7
7
|
attrs: any;
|
|
8
8
|
slots: {
|
|
9
9
|
[x: string]: ((props: {
|
|
10
|
-
item:
|
|
11
|
-
active:
|
|
10
|
+
item: any;
|
|
11
|
+
active: any;
|
|
12
12
|
}) => any) | undefined;
|
|
13
13
|
} & {
|
|
14
|
-
[x:
|
|
15
|
-
items:
|
|
16
|
-
item:
|
|
14
|
+
[x: string]: ((props: {
|
|
15
|
+
items: any;
|
|
16
|
+
item: any;
|
|
17
17
|
}) => any) | undefined;
|
|
18
18
|
} & {
|
|
19
19
|
[x: string]: ((props: {
|
|
20
|
-
item:
|
|
20
|
+
item: any;
|
|
21
21
|
}) => any) | undefined;
|
|
22
22
|
} & {
|
|
23
23
|
default?: (props: {
|
|
24
|
-
items:
|
|
24
|
+
items: any;
|
|
25
25
|
}) => any;
|
|
26
26
|
} & {
|
|
27
27
|
list?: (props: {
|
|
28
|
-
items:
|
|
28
|
+
items: any;
|
|
29
29
|
}) => any;
|
|
30
30
|
} & {
|
|
31
31
|
trigger?: (props: {
|
|
32
|
-
modelValue:
|
|
33
|
-
item:
|
|
34
|
-
index:
|
|
32
|
+
modelValue: any;
|
|
33
|
+
item: any;
|
|
34
|
+
index: any;
|
|
35
35
|
}) => any;
|
|
36
36
|
} & {
|
|
37
37
|
viewport?: (props: {}) => any;
|
|
@@ -18,6 +18,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
18
18
|
<NavigationMenuIndicator
|
|
19
19
|
v-bind="forwardedProps"
|
|
20
20
|
:class="cn(
|
|
21
|
+
'data-[state=hidden]:opacity-0 data-[state=visible]:animate-fadeIn data-[state=hidden]:animate-fadeOut',
|
|
21
22
|
'navigation-menu-indicator',
|
|
22
23
|
props.una?.navigationMenuIndicator,
|
|
23
24
|
props.class
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NNavigationMenuLinkProps } from '../../types/index.js';
|
|
2
2
|
declare var __VLS_6: {
|
|
3
|
-
active:
|
|
3
|
+
active: any;
|
|
4
4
|
};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
6
|
default?: (props: typeof __VLS_6) => any;
|
|
@@ -15,8 +15,8 @@ declare const __VLS_component: import("vue").DefineComponent<NNavigationMenuLink
|
|
|
15
15
|
}>) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
btn: string;
|
|
18
|
-
navigationMenuLink: string;
|
|
19
18
|
as: import("reka-ui").AsTag | import("vue").Component;
|
|
19
|
+
navigationMenuLink: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
22
|
export default _default;
|
|
@@ -6,8 +6,8 @@ type __VLS_Slots = {} & {
|
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<NNavigationMenuTriggerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NNavigationMenuTriggerProps> & Readonly<{}>, {
|
|
7
7
|
btn: string;
|
|
8
8
|
trailing: string;
|
|
9
|
-
navigationMenu: string;
|
|
10
9
|
as: import("reka-ui").AsTag | import("vue").Component;
|
|
10
|
+
navigationMenu: string;
|
|
11
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
13
|
export default _default;
|
|
@@ -34,6 +34,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
34
34
|
cn(
|
|
35
35
|
'navigation-menu-viewport',
|
|
36
36
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90',
|
|
37
|
+
'data-[state=closed]:fade-out data-[state=open]:fade-in',
|
|
37
38
|
props.una?.navigationMenuViewport
|
|
38
39
|
)
|
|
39
40
|
"
|
|
@@ -19,6 +19,7 @@ const props = defineProps({
|
|
|
19
19
|
formatOptions: { type: null, required: false },
|
|
20
20
|
locale: { type: String, required: false },
|
|
21
21
|
disabled: { type: Boolean, required: false },
|
|
22
|
+
readonly: { type: Boolean, required: false },
|
|
22
23
|
disableWheelChange: { type: Boolean, required: false },
|
|
23
24
|
invertWheelChange: { type: Boolean, required: false },
|
|
24
25
|
id: { type: String, required: false },
|
|
@@ -13,6 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
label: { type: String, required: false },
|
|
15
15
|
duration: { type: Number, required: false },
|
|
16
|
+
disableSwipe: { type: Boolean, required: false },
|
|
16
17
|
swipeDirection: { type: String, required: false },
|
|
17
18
|
swipeThreshold: { type: Number, required: false }
|
|
18
19
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NToastProps } from '../../../types/index.js';
|
|
2
2
|
declare var __VLS_10: {}, __VLS_15: {}, __VLS_20: {}, __VLS_25: {}, __VLS_30: {}, __VLS_32: {
|
|
3
|
-
actions:
|
|
3
|
+
actions: any;
|
|
4
4
|
}, __VLS_40: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
6
|
leading?: (props: typeof __VLS_10) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NToastActionProps } 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
|
};
|
|
@@ -3,6 +3,7 @@ import { ToastProvider } from "reka-ui";
|
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
label: { type: String, required: false },
|
|
5
5
|
duration: { type: Number, required: false, default: 5e3 },
|
|
6
|
+
disableSwipe: { type: Boolean, required: false },
|
|
6
7
|
swipeDirection: { type: String, required: false },
|
|
7
8
|
swipeThreshold: { type: Number, required: false }
|
|
8
9
|
});
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { reactivePick } from "@vueuse/core";
|
|
7
|
+
import { PinInputRoot, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { cn, randomId } from "../../utils";
|
|
10
|
+
import PinInputGroup from "./PinInputGroup.vue";
|
|
11
|
+
import PinInputSeparator from "./PinInputSeparator.vue";
|
|
12
|
+
import PinInputSlot from "./PinInputSlot.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
defaultValue: { type: Array, required: false },
|
|
15
|
+
maxLength: { type: Number, required: false },
|
|
16
|
+
separator: { type: [Boolean, String], required: false, default: false },
|
|
17
|
+
groupBy: { type: Number, required: false, default: 0 },
|
|
18
|
+
_pinInputGroup: { type: Object, required: false },
|
|
19
|
+
_pinInputSeparator: { type: Object, required: false },
|
|
20
|
+
_pinInputSlot: { type: Object, required: false },
|
|
21
|
+
una: { type: Object, required: false },
|
|
22
|
+
modelValue: { type: null, required: false },
|
|
23
|
+
placeholder: { type: String, required: false },
|
|
24
|
+
mask: { type: Boolean, required: false },
|
|
25
|
+
otp: { type: Boolean, required: false },
|
|
26
|
+
type: { type: null, required: false, default: "text" },
|
|
27
|
+
dir: { type: String, required: false },
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
id: { type: String, required: false },
|
|
30
|
+
asChild: { type: Boolean, required: false },
|
|
31
|
+
as: { type: null, required: false },
|
|
32
|
+
name: { type: String, required: false },
|
|
33
|
+
required: { type: Boolean, required: false },
|
|
34
|
+
pinInput: { type: null, required: false, default: "outline-primary" },
|
|
35
|
+
status: { type: String, required: false },
|
|
36
|
+
class: { type: null, required: false },
|
|
37
|
+
size: { type: null, required: false, default: "md" }
|
|
38
|
+
});
|
|
39
|
+
const emits = defineEmits(["update:modelValue", "complete"]);
|
|
40
|
+
const rootProps = reactivePick(props, [
|
|
41
|
+
"as",
|
|
42
|
+
"asChild",
|
|
43
|
+
"dir",
|
|
44
|
+
"defaultValue",
|
|
45
|
+
"disabled",
|
|
46
|
+
"id",
|
|
47
|
+
"mask",
|
|
48
|
+
"modelValue",
|
|
49
|
+
"name",
|
|
50
|
+
"otp",
|
|
51
|
+
"placeholder",
|
|
52
|
+
"type",
|
|
53
|
+
"required"
|
|
54
|
+
]);
|
|
55
|
+
const forwarded = useForwardPropsEmits(rootProps, emits);
|
|
56
|
+
const id = computed(() => props.id ?? randomId("pin-input"));
|
|
57
|
+
const separator = computed(() => {
|
|
58
|
+
if (props.separator === true) {
|
|
59
|
+
return "pin-input-separator-icon";
|
|
60
|
+
}
|
|
61
|
+
return props.separator;
|
|
62
|
+
});
|
|
63
|
+
const maxLength = computed(() => {
|
|
64
|
+
if (typeof props.maxLength !== "number") {
|
|
65
|
+
return props.modelValue?.length ?? 0;
|
|
66
|
+
}
|
|
67
|
+
return props.maxLength;
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<PinInputRoot
|
|
73
|
+
v-bind="forwarded"
|
|
74
|
+
:id
|
|
75
|
+
data-slot="pin-input"
|
|
76
|
+
:class="cn(
|
|
77
|
+
'pin-input',
|
|
78
|
+
props.una?.pinInput,
|
|
79
|
+
props.class
|
|
80
|
+
)"
|
|
81
|
+
:size
|
|
82
|
+
>
|
|
83
|
+
<slot>
|
|
84
|
+
<template v-if="groupBy === 0">
|
|
85
|
+
<PinInputGroup
|
|
86
|
+
v-bind="_pinInputGroup"
|
|
87
|
+
:una
|
|
88
|
+
>
|
|
89
|
+
<slot name="group">
|
|
90
|
+
<template v-for="index in maxLength" :key="index">
|
|
91
|
+
<slot name="slot" :index="index - 1">
|
|
92
|
+
<PinInputSlot
|
|
93
|
+
:index="index - 1"
|
|
94
|
+
:una
|
|
95
|
+
:status
|
|
96
|
+
:pin-input
|
|
97
|
+
v-bind="_pinInputSlot"
|
|
98
|
+
/>
|
|
99
|
+
</slot>
|
|
100
|
+
</template>
|
|
101
|
+
</slot>
|
|
102
|
+
</PinInputGroup>
|
|
103
|
+
</template>
|
|
104
|
+
|
|
105
|
+
<template v-else>
|
|
106
|
+
<template v-for="(groupIndex) in Math.ceil(maxLength / groupBy)" :key="groupIndex">
|
|
107
|
+
<PinInputGroup
|
|
108
|
+
v-bind="_pinInputGroup"
|
|
109
|
+
:una
|
|
110
|
+
>
|
|
111
|
+
<slot name="group">
|
|
112
|
+
<template v-for="slotInGroup in Math.min(groupBy, maxLength - (groupIndex - 1) * groupBy)" :key="slotInGroup">
|
|
113
|
+
<slot name="slot" :index="(groupIndex - 1) * groupBy + slotInGroup - 1">
|
|
114
|
+
<PinInputSlot
|
|
115
|
+
:index="(groupIndex - 1) * groupBy + slotInGroup - 1"
|
|
116
|
+
:una
|
|
117
|
+
:pin-input
|
|
118
|
+
:status
|
|
119
|
+
v-bind="_pinInputSlot"
|
|
120
|
+
/>
|
|
121
|
+
</slot>
|
|
122
|
+
</template>
|
|
123
|
+
</slot>
|
|
124
|
+
</PinInputGroup>
|
|
125
|
+
|
|
126
|
+
<template v-if="separator !== false && (separator || $slots.separator) && groupIndex < Math.ceil(maxLength / groupBy)">
|
|
127
|
+
<PinInputSeparator
|
|
128
|
+
:icon="separator"
|
|
129
|
+
:una
|
|
130
|
+
v-bind="_pinInputSeparator"
|
|
131
|
+
>
|
|
132
|
+
<slot name="separator" />
|
|
133
|
+
</PinInputSeparator>
|
|
134
|
+
</template>
|
|
135
|
+
</template>
|
|
136
|
+
</template>
|
|
137
|
+
</slot>
|
|
138
|
+
</PinInputRoot>
|
|
139
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NPinInputProps, PinInputType } from '../../types/index.js';
|
|
2
|
+
declare const _default: <T extends PinInputType = "text">(__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"?: ((value: string[]) => any) | undefined;
|
|
5
|
+
readonly onComplete?: ((value: string[]) => any) | undefined;
|
|
6
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onComplete"> & NPinInputProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
7
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: {
|
|
10
|
+
default?: (props: {}) => any;
|
|
11
|
+
} & {
|
|
12
|
+
group?: (props: {}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
slot?: (props: {
|
|
15
|
+
index: number;
|
|
16
|
+
}) => any;
|
|
17
|
+
} & {
|
|
18
|
+
group?: (props: {}) => any;
|
|
19
|
+
} & {
|
|
20
|
+
slot?: (props: {
|
|
21
|
+
index: number;
|
|
22
|
+
}) => any;
|
|
23
|
+
} & {
|
|
24
|
+
separator?: (props: {}) => any;
|
|
25
|
+
};
|
|
26
|
+
emit: ((evt: "update:modelValue", value: string[]) => void) & ((evt: "complete", value: string[]) => void);
|
|
27
|
+
}>) => import("vue").VNode & {
|
|
28
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_PrettifyLocal<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|