@nuxt/ui 3.3.3 → 3.3.5

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.
Files changed (81) hide show
  1. package/.nuxt/ui/progress.ts +3 -3
  2. package/README.md +11 -11
  3. package/dist/module.d.mts +6 -6
  4. package/dist/module.json +3 -3
  5. package/dist/module.mjs +3 -3
  6. package/dist/runtime/components/Accordion.d.vue.ts +77 -0
  7. package/dist/runtime/components/Alert.d.vue.ts +81 -0
  8. package/dist/runtime/components/App.d.vue.ts +24 -0
  9. package/dist/runtime/components/Avatar.d.vue.ts +41 -0
  10. package/dist/runtime/components/AvatarGroup.d.vue.ts +31 -0
  11. package/dist/runtime/components/Badge.d.vue.ts +43 -0
  12. package/dist/runtime/components/Breadcrumb.d.vue.ts +66 -0
  13. package/dist/runtime/components/Button.d.vue.ts +44 -0
  14. package/dist/runtime/components/ButtonGroup.d.vue.ts +34 -0
  15. package/dist/runtime/components/Calendar.d.vue.ts +112 -0
  16. package/dist/runtime/components/Card.d.vue.ts +29 -0
  17. package/dist/runtime/components/Carousel.d.vue.ts +127 -0
  18. package/dist/runtime/components/Checkbox.d.vue.ts +73 -0
  19. package/dist/runtime/components/CheckboxGroup.d.vue.ts +84 -0
  20. package/dist/runtime/components/Chip.d.vue.ts +57 -0
  21. package/dist/runtime/components/Collapsible.d.vue.ts +35 -0
  22. package/dist/runtime/components/ColorPicker.d.vue.ts +48 -0
  23. package/dist/runtime/components/CommandPalette.d.vue.ts +192 -0
  24. package/dist/runtime/components/Container.d.vue.ts +18 -0
  25. package/dist/runtime/components/ContextMenu.d.vue.ts +109 -0
  26. package/dist/runtime/components/ContextMenuContent.d.vue.ts +49 -0
  27. package/dist/runtime/components/Drawer.d.vue.ts +83 -0
  28. package/dist/runtime/components/DropdownMenu.d.vue.ts +119 -0
  29. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +55 -0
  30. package/dist/runtime/components/FileUpload.d.vue.ts +166 -0
  31. package/dist/runtime/components/FileUpload.vue +1 -0
  32. package/dist/runtime/components/Form.d.vue.ts +71 -0
  33. package/dist/runtime/components/Form.vue +10 -8
  34. package/dist/runtime/components/FormField.d.vue.ts +61 -0
  35. package/dist/runtime/components/Icon.d.vue.ts +8 -0
  36. package/dist/runtime/components/Input.d.vue.ts +77 -0
  37. package/dist/runtime/components/InputMenu.d.vue.ts +329 -0
  38. package/dist/runtime/components/InputMenu.vue +1 -1
  39. package/dist/runtime/components/InputNumber.d.vue.ts +186 -0
  40. package/dist/runtime/components/InputTags.d.vue.ts +185 -0
  41. package/dist/runtime/components/InputTags.vue +2 -2
  42. package/dist/runtime/components/Kbd.d.vue.ts +38 -0
  43. package/dist/runtime/components/Link.d.vue.ts +91 -0
  44. package/dist/runtime/components/LinkBase.d.vue.ts +25 -0
  45. package/dist/runtime/components/Modal.d.vue.ts +106 -0
  46. package/dist/runtime/components/NavigationMenu.d.vue.ts +170 -0
  47. package/dist/runtime/components/OverlayProvider.d.vue.ts +2 -0
  48. package/dist/runtime/components/Pagination.d.vue.ts +118 -0
  49. package/dist/runtime/components/PinInput.d.vue.ts +60 -0
  50. package/dist/runtime/components/Popover.d.vue.ts +70 -0
  51. package/dist/runtime/components/Progress.d.vue.ts +66 -0
  52. package/dist/runtime/components/Progress.vue +2 -3
  53. package/dist/runtime/components/RadioGroup.d.vue.ts +94 -0
  54. package/dist/runtime/components/Select.d.vue.ts +253 -0
  55. package/dist/runtime/components/SelectMenu.d.vue.ts +302 -0
  56. package/dist/runtime/components/Separator.d.vue.ts +54 -0
  57. package/dist/runtime/components/Skeleton.d.vue.ts +17 -0
  58. package/dist/runtime/components/Slideover.d.vue.ts +107 -0
  59. package/dist/runtime/components/Slider.d.vue.ts +57 -0
  60. package/dist/runtime/components/Stepper.d.vue.ts +85 -0
  61. package/dist/runtime/components/Switch.d.vue.ts +70 -0
  62. package/dist/runtime/components/Table.d.vue.ts +201 -0
  63. package/dist/runtime/components/Tabs.d.vue.ts +98 -0
  64. package/dist/runtime/components/Tabs.vue +2 -2
  65. package/dist/runtime/components/Textarea.d.vue.ts +79 -0
  66. package/dist/runtime/components/Timeline.d.vue.ts +70 -0
  67. package/dist/runtime/components/Toast.d.vue.ts +164 -0
  68. package/dist/runtime/components/Toaster.d.vue.ts +44 -0
  69. package/dist/runtime/components/Tooltip.d.vue.ts +56 -0
  70. package/dist/runtime/components/Tree.d.vue.ts +114 -0
  71. package/dist/runtime/inertia/components/Link.d.vue.ts +63 -0
  72. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +25 -0
  73. package/dist/runtime/locale/id.js +1 -1
  74. package/dist/runtime/types/tv.d.ts +9 -2
  75. package/dist/runtime/utils/index.js +6 -3
  76. package/dist/runtime/vue/components/Icon.d.vue.ts +5 -0
  77. package/dist/runtime/vue/components/Link.d.vue.ts +93 -0
  78. package/dist/shared/{ui.BTUFJHYJ.mjs → ui.DH9BUZkq.mjs} +12 -8
  79. package/dist/unplugin.mjs +1 -1
  80. package/dist/vite.mjs +1 -1
  81. package/package.json +21 -33
@@ -0,0 +1,79 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/textarea';
3
+ import type { UseComponentIconsProps } from '../composables/useComponentIcons';
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Textarea = ComponentConfig<typeof theme, AppConfig, 'textarea'>;
6
+ type TextareaValue = string | number | null;
7
+ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends UseComponentIconsProps {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'div'
11
+ */
12
+ as?: any;
13
+ id?: string;
14
+ name?: string;
15
+ /** The placeholder text when the textarea is empty. */
16
+ placeholder?: string;
17
+ /**
18
+ * @defaultValue 'primary'
19
+ */
20
+ color?: Textarea['variants']['color'];
21
+ /**
22
+ * @defaultValue 'outline'
23
+ */
24
+ variant?: Textarea['variants']['variant'];
25
+ /**
26
+ * @defaultValue 'md'
27
+ */
28
+ size?: Textarea['variants']['size'];
29
+ required?: boolean;
30
+ autofocus?: boolean;
31
+ autofocusDelay?: number;
32
+ autoresize?: boolean;
33
+ autoresizeDelay?: number;
34
+ disabled?: boolean;
35
+ rows?: number;
36
+ maxrows?: number;
37
+ /** Highlight the ring color like a focus state. */
38
+ highlight?: boolean;
39
+ modelValue?: T;
40
+ defaultValue?: T;
41
+ modelModifiers?: {
42
+ string?: boolean;
43
+ number?: boolean;
44
+ trim?: boolean;
45
+ lazy?: boolean;
46
+ nullify?: boolean;
47
+ };
48
+ class?: any;
49
+ ui?: Textarea['slots'];
50
+ }
51
+ export interface TextareaEmits<T extends TextareaValue = TextareaValue> {
52
+ 'update:modelValue': [value: T];
53
+ 'blur': [event: FocusEvent];
54
+ 'change': [event: Event];
55
+ }
56
+ export interface TextareaSlots {
57
+ leading(props?: {}): any;
58
+ default(props?: {}): any;
59
+ trailing(props?: {}): any;
60
+ }
61
+ declare const _default: <T extends TextareaValue>(__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<{
62
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
63
+ readonly onBlur?: ((event: FocusEvent) => any) | undefined;
64
+ readonly onChange?: ((event: Event) => any) | undefined;
65
+ readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
66
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & TextareaProps<T> & {}> & import("vue").PublicProps;
67
+ expose(exposed: import("vue").ShallowUnwrapRef<{
68
+ textareaRef: import("vue").Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
69
+ }>): void;
70
+ attrs: any;
71
+ slots: TextareaSlots;
72
+ emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void);
73
+ }>) => import("vue").VNode & {
74
+ __ctx?: Awaited<typeof __VLS_setup>;
75
+ };
76
+ export default _default;
77
+ type __VLS_PrettifyLocal<T> = {
78
+ [K in keyof T as K]: T[K];
79
+ } & {};
@@ -0,0 +1,70 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/timeline';
3
+ import type { AvatarProps } from '../types';
4
+ import type { DynamicSlots, ComponentConfig } from '../types/utils';
5
+ type Timeline = ComponentConfig<typeof theme, AppConfig, 'timeline'>;
6
+ export interface TimelineItem {
7
+ date?: string;
8
+ title?: string;
9
+ description?: string;
10
+ icon?: string;
11
+ avatar?: AvatarProps;
12
+ value?: string | number;
13
+ slot?: string;
14
+ class?: any;
15
+ ui?: Pick<Timeline['slots'], 'item' | 'container' | 'indicator' | 'separator' | 'wrapper' | 'date' | 'title' | 'description'>;
16
+ [key: string]: any;
17
+ }
18
+ export interface TimelineProps<T extends TimelineItem = TimelineItem> {
19
+ /**
20
+ * The element or component this component should render as.
21
+ * @defaultValue 'div'
22
+ */
23
+ as?: any;
24
+ items: T[];
25
+ /**
26
+ * @defaultValue 'md'
27
+ */
28
+ size?: Timeline['variants']['size'];
29
+ /**
30
+ * @defaultValue 'primary'
31
+ */
32
+ color?: Timeline['variants']['color'];
33
+ /**
34
+ * The orientation of the Timeline.
35
+ * @defaultValue 'vertical'
36
+ */
37
+ orientation?: Timeline['variants']['orientation'];
38
+ defaultValue?: string | number;
39
+ reverse?: boolean;
40
+ class?: any;
41
+ ui?: Timeline['slots'];
42
+ }
43
+ type SlotProps<T extends TimelineItem> = (props: {
44
+ item: T;
45
+ }) => any;
46
+ export type TimelineSlots<T extends TimelineItem = TimelineItem> = {
47
+ indicator: SlotProps<T>;
48
+ date: SlotProps<T>;
49
+ title: SlotProps<T>;
50
+ description: SlotProps<T>;
51
+ } & DynamicSlots<T, 'indicator' | 'date' | 'title' | 'description', {
52
+ item: T;
53
+ }>;
54
+ declare const _default: <T extends TimelineItem>(__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<{
55
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
56
+ readonly "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
57
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & (TimelineProps<T> & {
58
+ modelValue?: string | number;
59
+ }) & {}> & import("vue").PublicProps;
60
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
61
+ attrs: any;
62
+ slots: TimelineSlots<T>;
63
+ emit: (evt: "update:modelValue", value: string | number | undefined) => void;
64
+ }>) => import("vue").VNode & {
65
+ __ctx?: Awaited<typeof __VLS_setup>;
66
+ };
67
+ export default _default;
68
+ type __VLS_PrettifyLocal<T> = {
69
+ [K in keyof T as K]: T[K];
70
+ } & {};
@@ -0,0 +1,164 @@
1
+ import type { ToastRootProps, ToastRootEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/toast';
4
+ import type { AvatarProps, ButtonProps, ProgressProps } from '../types';
5
+ import type { StringOrVNode, ComponentConfig } from '../types/utils';
6
+ type Toast = ComponentConfig<typeof theme, AppConfig, 'toast'>;
7
+ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type' | 'duration'> {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'li'
11
+ */
12
+ as?: any;
13
+ title?: StringOrVNode;
14
+ description?: StringOrVNode;
15
+ /**
16
+ * @IconifyIcon
17
+ */
18
+ icon?: string;
19
+ avatar?: AvatarProps;
20
+ /**
21
+ * @defaultValue 'primary'
22
+ */
23
+ color?: Toast['variants']['color'];
24
+ /**
25
+ * The orientation between the content and the actions.
26
+ * @defaultValue 'vertical'
27
+ */
28
+ orientation?: Toast['variants']['orientation'];
29
+ /**
30
+ * Display a close button to dismiss the toast.
31
+ * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
32
+ * @defaultValue true
33
+ */
34
+ close?: boolean | Partial<ButtonProps>;
35
+ /**
36
+ * The icon displayed in the close button.
37
+ * @defaultValue appConfig.ui.icons.close
38
+ * @IconifyIcon
39
+ */
40
+ closeIcon?: string;
41
+ /**
42
+ * Display a list of actions:
43
+ * - under the title and description when orientation is `vertical`
44
+ * - next to the close button when orientation is `horizontal`
45
+ * `{ size: 'xs' }`{lang="ts-type"}
46
+ */
47
+ actions?: ButtonProps[];
48
+ /**
49
+ * Display a progress bar showing the toast's remaining duration.
50
+ * `{ size: 'sm' }`{lang="ts-type"}
51
+ * @defaultValue true
52
+ */
53
+ progress?: boolean | Pick<ProgressProps, 'color' | 'ui'>;
54
+ class?: any;
55
+ ui?: Toast['slots'];
56
+ }
57
+ export interface ToastEmits extends ToastRootEmits {
58
+ }
59
+ export interface ToastSlots {
60
+ leading(props?: {}): any;
61
+ title(props?: {}): any;
62
+ description(props?: {}): any;
63
+ actions(props?: {}): any;
64
+ close(props: {
65
+ ui: {
66
+ [K in keyof Required<Toast['slots']>]: (props?: Record<string, any>) => string;
67
+ };
68
+ }): any;
69
+ }
70
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ToastProps, {
71
+ height: import("vue").Ref<number, number>;
72
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
73
+ resume: () => any;
74
+ pause: () => any;
75
+ "update:open": (value: boolean) => any;
76
+ escapeKeyDown: (event: KeyboardEvent) => any;
77
+ swipeStart: (event: {
78
+ currentTarget: EventTarget & HTMLElement;
79
+ } & Omit<CustomEvent<{
80
+ originalEvent: PointerEvent;
81
+ delta: {
82
+ x: number;
83
+ y: number;
84
+ };
85
+ }>, "currentTarget">) => any;
86
+ swipeMove: (event: {
87
+ currentTarget: EventTarget & HTMLElement;
88
+ } & Omit<CustomEvent<{
89
+ originalEvent: PointerEvent;
90
+ delta: {
91
+ x: number;
92
+ y: number;
93
+ };
94
+ }>, "currentTarget">) => any;
95
+ swipeCancel: (event: {
96
+ currentTarget: EventTarget & HTMLElement;
97
+ } & Omit<CustomEvent<{
98
+ originalEvent: PointerEvent;
99
+ delta: {
100
+ x: number;
101
+ y: number;
102
+ };
103
+ }>, "currentTarget">) => any;
104
+ swipeEnd: (event: {
105
+ currentTarget: EventTarget & HTMLElement;
106
+ } & Omit<CustomEvent<{
107
+ originalEvent: PointerEvent;
108
+ delta: {
109
+ x: number;
110
+ y: number;
111
+ };
112
+ }>, "currentTarget">) => any;
113
+ }, string, import("vue").PublicProps, Readonly<ToastProps> & Readonly<{
114
+ onResume?: (() => any) | undefined;
115
+ onPause?: (() => any) | undefined;
116
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
117
+ onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
118
+ onSwipeStart?: ((event: {
119
+ currentTarget: EventTarget & HTMLElement;
120
+ } & Omit<CustomEvent<{
121
+ originalEvent: PointerEvent;
122
+ delta: {
123
+ x: number;
124
+ y: number;
125
+ };
126
+ }>, "currentTarget">) => any) | undefined;
127
+ onSwipeMove?: ((event: {
128
+ currentTarget: EventTarget & HTMLElement;
129
+ } & Omit<CustomEvent<{
130
+ originalEvent: PointerEvent;
131
+ delta: {
132
+ x: number;
133
+ y: number;
134
+ };
135
+ }>, "currentTarget">) => any) | undefined;
136
+ onSwipeCancel?: ((event: {
137
+ currentTarget: EventTarget & HTMLElement;
138
+ } & Omit<CustomEvent<{
139
+ originalEvent: PointerEvent;
140
+ delta: {
141
+ x: number;
142
+ y: number;
143
+ };
144
+ }>, "currentTarget">) => any) | undefined;
145
+ onSwipeEnd?: ((event: {
146
+ currentTarget: EventTarget & HTMLElement;
147
+ } & Omit<CustomEvent<{
148
+ originalEvent: PointerEvent;
149
+ delta: {
150
+ x: number;
151
+ y: number;
152
+ };
153
+ }>, "currentTarget">) => any) | undefined;
154
+ }>, {
155
+ close: boolean | Partial<ButtonProps>;
156
+ progress: boolean | Pick<ProgressProps, "color" | "ui">;
157
+ orientation: Toast["variants"]["orientation"];
158
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToastSlots>;
159
+ export default _default;
160
+ type __VLS_WithSlots<T, S> = T & {
161
+ new (): {
162
+ $slots: S;
163
+ };
164
+ };
@@ -0,0 +1,44 @@
1
+ import type { ToastProviderProps } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/toaster';
4
+ import type { ComponentConfig } from '../types/utils';
5
+ type Toaster = ComponentConfig<typeof theme, AppConfig, 'toaster'>;
6
+ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'> {
7
+ /**
8
+ * The position on the screen to display the toasts.
9
+ * @defaultValue 'bottom-right'
10
+ */
11
+ position?: Toaster['variants']['position'];
12
+ /**
13
+ * Expand the toasts to show multiple toasts at once.
14
+ * @defaultValue true
15
+ */
16
+ expand?: boolean;
17
+ /**
18
+ * Whether to show the progress bar on all toasts.
19
+ * @defaultValue true
20
+ */
21
+ progress?: boolean;
22
+ /**
23
+ * Render the toaster in a portal.
24
+ * @defaultValue true
25
+ */
26
+ portal?: boolean | string | HTMLElement;
27
+ class?: any;
28
+ ui?: Toaster['slots'];
29
+ }
30
+ export interface ToasterSlots {
31
+ default(props?: {}): any;
32
+ }
33
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ToasterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
34
+ progress: boolean;
35
+ duration: number;
36
+ expand: boolean;
37
+ portal: boolean | string | HTMLElement;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ToasterSlots>;
39
+ export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,56 @@
1
+ import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipContentEmits, TooltipArrowProps, TooltipTriggerProps } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/tooltip';
4
+ import type { KbdProps } from '../types';
5
+ import type { EmitsToProps, ComponentConfig } from '../types/utils';
6
+ type Tooltip = ComponentConfig<typeof theme, AppConfig, 'tooltip'>;
7
+ export interface TooltipProps extends TooltipRootProps {
8
+ /** The text content of the tooltip. */
9
+ text?: string;
10
+ /** The keyboard keys to display in the tooltip. */
11
+ kbds?: KbdProps['value'][] | KbdProps[];
12
+ /**
13
+ * The content of the tooltip.
14
+ * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
15
+ */
16
+ content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>;
17
+ /**
18
+ * Display an arrow alongside the tooltip.
19
+ * @defaultValue false
20
+ */
21
+ arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>;
22
+ /**
23
+ * Render the tooltip in a portal.
24
+ * @defaultValue true
25
+ */
26
+ portal?: boolean | string | HTMLElement;
27
+ /**
28
+ * The reference (or anchor) element that is being referred to for positioning.
29
+ *
30
+ * If not provided will use the current component as anchor.
31
+ */
32
+ reference?: TooltipTriggerProps['reference'];
33
+ class?: any;
34
+ ui?: Tooltip['slots'];
35
+ }
36
+ export interface TooltipEmits extends TooltipRootEmits {
37
+ }
38
+ export interface TooltipSlots {
39
+ default(props: {
40
+ open: boolean;
41
+ }): any;
42
+ content(props?: {}): any;
43
+ }
44
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ "update:open": (value: boolean) => any;
46
+ }, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{
47
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
48
+ }>, {
49
+ portal: boolean | string | HTMLElement;
50
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TooltipSlots>;
51
+ export default _default;
52
+ type __VLS_WithSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
@@ -0,0 +1,114 @@
1
+ import type { TreeRootProps, TreeRootEmits } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/tree';
4
+ import type { DynamicSlots, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, ComponentConfig } from '../types/utils';
5
+ type Tree = ComponentConfig<typeof theme, AppConfig, 'tree'>;
6
+ export type TreeItem = {
7
+ /**
8
+ * @IconifyIcon
9
+ */
10
+ icon?: string;
11
+ label?: string;
12
+ /**
13
+ * @IconifyIcon
14
+ */
15
+ trailingIcon?: string;
16
+ defaultExpanded?: boolean;
17
+ disabled?: boolean;
18
+ value?: string;
19
+ slot?: string;
20
+ children?: TreeItem[];
21
+ onToggle?(e: Event): void;
22
+ onSelect?(e?: Event): void;
23
+ class?: any;
24
+ ui?: Pick<Tree['slots'], 'item' | 'itemWithChildren' | 'link' | 'linkLeadingIcon' | 'linkLabel' | 'linkTrailing' | 'linkTrailingIcon' | 'listWithChildren'>;
25
+ [key: string]: any;
26
+ };
27
+ export interface TreeProps<T extends TreeItem[] = TreeItem[], VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Pick<TreeRootProps<T>, 'expanded' | 'defaultExpanded' | 'selectionBehavior' | 'propagateSelect' | 'disabled' | 'bubbleSelect'> {
28
+ /**
29
+ * The element or component this component should render as.
30
+ * @defaultValue 'ul'
31
+ */
32
+ as?: any;
33
+ /**
34
+ * @defaultValue 'primary'
35
+ */
36
+ color?: Tree['variants']['color'];
37
+ /**
38
+ * @defaultValue 'md'
39
+ */
40
+ size?: Tree['variants']['size'];
41
+ /**
42
+ * The key used to get the value from the item.
43
+ * @defaultValue 'value'
44
+ */
45
+ valueKey?: VK;
46
+ /**
47
+ * The key used to get the label from the item.
48
+ * @defaultValue 'label'
49
+ */
50
+ labelKey?: keyof NestedItem<T>;
51
+ /**
52
+ * The icon displayed on the right side of a parent node.
53
+ * @defaultValue appConfig.ui.icons.chevronDown
54
+ * @IconifyIcon
55
+ */
56
+ trailingIcon?: string;
57
+ /**
58
+ * The icon displayed when a parent node is expanded.
59
+ * @defaultValue appConfig.ui.icons.folderOpen
60
+ * @IconifyIcon
61
+ */
62
+ expandedIcon?: string;
63
+ /**
64
+ * The icon displayed when a parent node is collapsed.
65
+ * @defaultValue appConfig.ui.icons.folder
66
+ * @IconifyIcon
67
+ */
68
+ collapsedIcon?: string;
69
+ items?: T;
70
+ /** The controlled value of the Tree. Can be bind as `v-model`. */
71
+ modelValue?: GetModelValue<T, VK, M>;
72
+ /** The value of the Tree when initially rendered. Use when you do not need to control the state of the Tree. */
73
+ defaultValue?: GetModelValue<T, VK, M>;
74
+ /** Whether multiple options can be selected or not. */
75
+ multiple?: M & boolean;
76
+ class?: any;
77
+ ui?: Tree['slots'];
78
+ }
79
+ export type TreeEmits<A extends TreeItem[], VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<TreeRootEmits, 'update:modelValue'> & GetModelValueEmits<A, VK, M>;
80
+ type SlotProps<T extends TreeItem> = (props: {
81
+ item: T;
82
+ index: number;
83
+ level: number;
84
+ expanded: boolean;
85
+ selected: boolean;
86
+ }) => any;
87
+ export type TreeSlots<A extends TreeItem[] = TreeItem[], T extends NestedItem<A> = NestedItem<A>> = {
88
+ 'item-wrapper': SlotProps<T>;
89
+ 'item': SlotProps<T>;
90
+ 'item-leading': SlotProps<T>;
91
+ 'item-label': SlotProps<T>;
92
+ 'item-trailing': SlotProps<T>;
93
+ } & DynamicSlots<T, undefined, {
94
+ index: number;
95
+ level: number;
96
+ expanded: boolean;
97
+ selected: boolean;
98
+ }>;
99
+ declare const _default: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", 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<{
100
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
101
+ readonly "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
102
+ readonly "onUpdate:expanded"?: ((val: string[]) => any) | undefined;
103
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:expanded"> & TreeProps<T, VK, M> & {}> & import("vue").PublicProps;
104
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
105
+ attrs: any;
106
+ slots: TreeSlots<T, NestedItem<T>>;
107
+ emit: ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "update:expanded", val: string[]) => void);
108
+ }>) => import("vue").VNode & {
109
+ __ctx?: Awaited<typeof __VLS_setup>;
110
+ };
111
+ export default _default;
112
+ type __VLS_PrettifyLocal<T> = {
113
+ [K in keyof T as K]: T[K];
114
+ } & {};
@@ -0,0 +1,63 @@
1
+ import type { ButtonHTMLAttributes } from 'vue';
2
+ import type { InertiaLinkProps } from '@inertiajs/vue3';
3
+ interface NuxtLinkProps extends Omit<InertiaLinkProps, 'href' | 'onClick'> {
4
+ activeClass?: string;
5
+ /**
6
+ * Route Location the link should navigate to when clicked on.
7
+ */
8
+ to?: string;
9
+ /**
10
+ * An alias for `to`. If used with `to`, `href` will be ignored
11
+ */
12
+ href?: NuxtLinkProps['to'];
13
+ /**
14
+ * Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
15
+ */
16
+ external?: boolean;
17
+ /**
18
+ * Where to display the linked URL, as the name for a browsing context.
19
+ */
20
+ target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
21
+ ariaCurrentValue?: string;
22
+ }
23
+ export interface LinkProps extends NuxtLinkProps {
24
+ /**
25
+ * The element or component this component should render as when not a link.
26
+ * @defaultValue 'button'
27
+ */
28
+ as?: any;
29
+ /**
30
+ * The type of the button when not a link.
31
+ * @defaultValue 'button'
32
+ */
33
+ type?: ButtonHTMLAttributes['type'];
34
+ disabled?: boolean;
35
+ /** Force the link to be active independent of the current route. */
36
+ active?: boolean;
37
+ /** Will only be active if the current route is an exact match. */
38
+ exact?: boolean;
39
+ /** The class to apply when the link is inactive. */
40
+ inactiveClass?: string;
41
+ custom?: boolean;
42
+ /** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
43
+ raw?: boolean;
44
+ class?: any;
45
+ }
46
+ export interface LinkSlots {
47
+ default(props: {
48
+ active: boolean;
49
+ }): any;
50
+ }
51
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
52
+ type: "reset" | "submit" | "button";
53
+ as: any;
54
+ activeClass: string;
55
+ active: boolean;
56
+ inactiveClass: string;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
58
+ export default _default;
59
+ type __VLS_WithSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S;
62
+ };
63
+ };
@@ -0,0 +1,25 @@
1
+ import type { LinkProps } from '../../types';
2
+ export interface LinkBaseProps {
3
+ as?: string;
4
+ type?: string;
5
+ disabled?: boolean;
6
+ onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>;
7
+ href?: string;
8
+ target?: LinkProps['target'];
9
+ active?: boolean;
10
+ isExternal?: boolean;
11
+ }
12
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
13
+ type: string;
14
+ as: string;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ default?: (props: {}) => any;
17
+ } & {
18
+ default?: (props: {}) => any;
19
+ }>;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineLocale } from "../composables/defineLocale.js";
2
2
  export default defineLocale({
3
- name: "Indonesia",
3
+ name: "Bahasa Indonesia",
4
4
  code: "id",
5
5
  messages: {
6
6
  inputMenu: {
@@ -4,11 +4,18 @@ import type { ClassValue, TVVariants, TVCompoundVariants, TVDefaultVariants } fr
4
4
  */
5
5
  export type TVConfig<T extends Record<string, any>> = {
6
6
  [P in keyof T]?: {
7
- [K in keyof T[P] as K extends 'base' | 'slots' | 'variants' | 'compoundVariants' | 'defaultVariants' ? K : never]?: K extends 'base' ? ClassValue : K extends 'slots' ? {
7
+ [K in keyof T[P] as K extends 'base' | 'slots' | 'variants' | 'defaultVariants' ? K : never]?: K extends 'base' ? ClassValue : K extends 'slots' ? {
8
8
  [S in keyof T[P]['slots']]?: ClassValue;
9
- } : K extends 'variants' ? TVVariants<T[P]['slots'], ClassValue, T[P]['variants']> : K extends 'compoundVariants' ? TVCompoundVariants<T[P]['variants'], T[P]['slots'], ClassValue, object, undefined> : K extends 'defaultVariants' ? TVDefaultVariants<T[P]['variants'], T[P]['slots'], object, undefined> : never;
9
+ } : K extends 'variants' ? TVVariants<T[P]['slots'], ClassValue, WidenVariantsValues<T[P]['variants']>> : K extends 'defaultVariants' ? TVDefaultVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], object, undefined> : never;
10
+ };
11
+ } & {
12
+ [P in keyof T]?: {
13
+ compoundVariants?: TVCompoundVariants<WidenVariantsValues<T[P]['variants']>, T[P]['slots'], ClassValue, object, undefined>;
10
14
  };
11
15
  };
16
+ type WidenVariantsValues<V extends Record<string, any> | undefined> = V extends Record<string, any> ? V & {
17
+ [K in keyof V]: V[K] extends Record<string, any> ? V[K] & Record<string & {}, any> : V[K];
18
+ } : V;
12
19
  /**
13
20
  * Utility type to flatten intersection types for better IDE hover information.
14
21
  * @template T The type to flatten.
@@ -92,13 +92,16 @@ export function isEmpty(value) {
92
92
  }
93
93
  export function getDisplayValue(items, value, options = {}) {
94
94
  const { valueKey, labelKey } = options;
95
- if (isEmpty(value)) {
96
- return void 0;
97
- }
98
95
  const foundItem = items.find((item) => {
99
96
  const itemValue = typeof item === "object" && item !== null && valueKey ? get(item, valueKey) : item;
100
97
  return compare(itemValue, value);
101
98
  });
99
+ if (isEmpty(value) && foundItem) {
100
+ return labelKey ? get(foundItem, labelKey) : void 0;
101
+ }
102
+ if (isEmpty(value)) {
103
+ return void 0;
104
+ }
102
105
  const source = foundItem ?? value;
103
106
  if (source === null || source === void 0) {
104
107
  return void 0;
@@ -0,0 +1,5 @@
1
+ export interface IconProps {
2
+ name: string;
3
+ }
4
+ declare const _default: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;