@una-ui/nuxt 0.46.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/data/table/TableLoading.vue +2 -2
- package/dist/runtime/components/elements/dropdown-menu/DropdownMenuItem.vue +1 -0
- package/dist/runtime/types/dropdown-menu.d.ts +16 -5
- package/dist/runtime/types/index.d.ts +5 -0
- package/dist/runtime/types/table.d.ts +3 -1
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const delegatedProps = computed(() => {
|
|
|
20
20
|
<TableRow
|
|
21
21
|
:class="cn(
|
|
22
22
|
'table-loading-row',
|
|
23
|
-
props.una?.
|
|
23
|
+
props.una?.tableLoadingRow,
|
|
24
24
|
)"
|
|
25
25
|
data-loading="true"
|
|
26
26
|
v-bind="delegatedProps._tableRow"
|
|
@@ -29,7 +29,7 @@ const delegatedProps = computed(() => {
|
|
|
29
29
|
:class="
|
|
30
30
|
cn(
|
|
31
31
|
'table-loading-cell',
|
|
32
|
-
props.una?.
|
|
32
|
+
props.una?.tableLoadingCell,
|
|
33
33
|
)
|
|
34
34
|
"
|
|
35
35
|
:colspan="0"
|
|
@@ -42,6 +42,7 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
42
42
|
btnTrailing: cn('dropdown-menu-item-trailing', forwardedProps.una?.btnTrailing),
|
|
43
43
|
...forwardedProps.una,
|
|
44
44
|
}"
|
|
45
|
+
@click="forwardedProps.onSelect"
|
|
45
46
|
>
|
|
46
47
|
<template v-for="(_, name) in $slots" #[name]="slotData">
|
|
47
48
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { DropdownMenuContentProps, DropdownMenuGroupProps, DropdownMenuLabelProps, DropdownMenuRootProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps } from 'reka-ui';
|
|
1
|
+
import type { DropdownMenuContentProps, DropdownMenuGroupProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuRootProps, DropdownMenuSeparatorProps, DropdownMenuSubContentProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps } from 'reka-ui';
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import type { FocusOutsideEvent, PointerDownOutsideEvent } from './/index.js';
|
|
3
4
|
import type { NButtonProps } from './button.js';
|
|
4
5
|
import type { NSeparatorProps } from './separator.js';
|
|
5
6
|
/**
|
|
@@ -14,7 +15,7 @@ interface BaseExtensions {
|
|
|
14
15
|
/**
|
|
15
16
|
* Props for the NDropdownMenu component.
|
|
16
17
|
*/
|
|
17
|
-
export interface NDropdownMenuProps extends Omit<NDropdownMenuRootProps, 'class' | 'size'>, Omit<NDropdownMenuTriggerProps, 'una'>,
|
|
18
|
+
export interface NDropdownMenuProps extends Omit<NDropdownMenuRootProps, 'class' | 'size'>, Omit<NDropdownMenuTriggerProps, 'una'>, Omit<NDropdownMenuItemProps, 'una'> {
|
|
18
19
|
/** Label for the menu */
|
|
19
20
|
menuLabel?: string;
|
|
20
21
|
/** Items in the dropdown menu */
|
|
@@ -62,6 +63,16 @@ export interface NDropdownMenuTriggerProps extends NButtonProps, DropdownMenuTri
|
|
|
62
63
|
* Props for the NDropdownMenuContent component.
|
|
63
64
|
*/
|
|
64
65
|
export interface NDropdownMenuContentProps extends BaseExtensions, DropdownMenuContentProps {
|
|
66
|
+
/** Event handler called when auto-focusing on close. Can be prevented. */
|
|
67
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
68
|
+
/** Event handler called when the escape key is down. Can be prevented. */
|
|
69
|
+
onEscapeKeyDown?: (e: KeyboardEvent) => void;
|
|
70
|
+
/** Event handler called when the focus moves outside of the DismissableLayer. Can be prevented. */
|
|
71
|
+
onFocusOutside?: (e: FocusOutsideEvent) => void;
|
|
72
|
+
/** Event handler called when an interaction happens outside the DismissableLayer. Can be prevented. */
|
|
73
|
+
onInteractOutside?: (e: PointerDownOutsideEvent | FocusOutsideEvent) => void;
|
|
74
|
+
/** Event handler called when a pointerdown event happens outside of the DismissableLayer. Can be prevented. */
|
|
75
|
+
onPointerDownOutside?: (e: PointerDownOutsideEvent) => void;
|
|
65
76
|
/** Additional properties for the una component */
|
|
66
77
|
una?: NDropdownMenuUnaProps['dropdownMenuContent'];
|
|
67
78
|
}
|
|
@@ -100,7 +111,7 @@ export interface NDropdownMenuSubContentProps extends BaseExtensions, DropdownMe
|
|
|
100
111
|
/**
|
|
101
112
|
* Props for the NDropdownMenuItem component.
|
|
102
113
|
*/
|
|
103
|
-
export interface NDropdownMenuItemProps extends NButtonProps {
|
|
114
|
+
export interface NDropdownMenuItemProps extends DropdownMenuItemProps, NButtonProps {
|
|
104
115
|
/** Dropdown menu item */
|
|
105
116
|
dropdownMenuItem?: HTMLAttributes['class'];
|
|
106
117
|
/** Whether the item is inset */
|
|
@@ -111,8 +122,8 @@ export interface NDropdownMenuItemProps extends NButtonProps {
|
|
|
111
122
|
_dropdownMenuShortcut?: Partial<NDropdownMenuShortcutProps>;
|
|
112
123
|
/** Additional properties for the una component */
|
|
113
124
|
una?: NDropdownMenuUnaProps['dropdownMenuItem'] & NButtonProps['una'];
|
|
114
|
-
/**
|
|
115
|
-
|
|
125
|
+
/** Select event handler */
|
|
126
|
+
onSelect?: (e: Event) => void;
|
|
116
127
|
}
|
|
117
128
|
/**
|
|
118
129
|
* Props for the NDropdownMenuSubTrigger component.
|
|
@@ -59,3 +59,8 @@ export interface UnaSettings {
|
|
|
59
59
|
fontSize: number;
|
|
60
60
|
radius: number;
|
|
61
61
|
}
|
|
62
|
+
export type OutsideEvent<T extends Event> = CustomEvent<{
|
|
63
|
+
originalEvent: T;
|
|
64
|
+
}>;
|
|
65
|
+
export type PointerDownOutsideEvent = OutsideEvent<PointerEvent>;
|
|
66
|
+
export type FocusOutsideEvent = OutsideEvent<FocusEvent>;
|
|
@@ -163,7 +163,7 @@ export interface NTableLoadingProps {
|
|
|
163
163
|
_tableCell?: NTableCellProps;
|
|
164
164
|
_tableRow?: NTableRowProps;
|
|
165
165
|
_tableProgress?: NProgressProps;
|
|
166
|
-
una?: Pick<NTableUnaProps, 'tableLoading' | '
|
|
166
|
+
una?: Pick<NTableUnaProps, 'tableLoading' | 'tableLoadingCell' | 'tableLoadingRow'>;
|
|
167
167
|
}
|
|
168
168
|
export interface NTableCaptionProps {
|
|
169
169
|
class?: HTMLAttributes['class'];
|
|
@@ -181,5 +181,7 @@ interface NTableUnaProps {
|
|
|
181
181
|
tableCaption?: HTMLAttributes['class'];
|
|
182
182
|
tableEmpty?: HTMLAttributes['class'];
|
|
183
183
|
tableLoading?: HTMLAttributes['class'];
|
|
184
|
+
tableLoadingRow?: HTMLAttributes['class'];
|
|
185
|
+
tableLoadingCell?: HTMLAttributes['class'];
|
|
184
186
|
}
|
|
185
187
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.47.0",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"typescript": "5.6.3",
|
|
60
60
|
"unocss": "^66.0.0",
|
|
61
61
|
"unocss-preset-animations": "^1.1.1",
|
|
62
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
63
|
-
"@una-ui/preset": "^0.
|
|
62
|
+
"@una-ui/extractor-vue-script": "^0.47.0",
|
|
63
|
+
"@una-ui/preset": "^0.47.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@iconify-json/lucide": "^1.2.32",
|