@enonic/ui 1.5.0 → 1.7.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/README.md +18 -6
- package/dist/enonic-ui.cjs +1 -1
- package/dist/enonic-ui.es.js +135 -131
- package/dist/style.cjs +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/style.css +2 -2
- package/dist/types/components/avatar/avatar.d.ts +18 -13
- package/dist/types/components/button/button.d.ts +6 -3
- package/dist/types/components/checkbox/checkbox.d.ts +25 -3
- package/dist/types/components/combobox/combobox.d.ts +23 -14
- package/dist/types/components/context-menu/context-menu.d.ts +78 -37
- package/dist/types/components/date-picker/date-picker.d.ts +36 -23
- package/dist/types/components/dialog/dialog-actions.d.ts +16 -1
- package/dist/types/components/dialog/dialog.d.ts +81 -44
- package/dist/types/components/grid-list/grid-list.d.ts +102 -12
- package/dist/types/components/icon-button/icon-button.d.ts +6 -5
- package/dist/types/components/input/input.d.ts +28 -6
- package/dist/types/components/link/link.d.ts +7 -3
- package/dist/types/components/listbox/listbox.d.ts +5 -3
- package/dist/types/components/menu/menu.d.ts +52 -25
- package/dist/types/components/menubar/menubar.d.ts +94 -33
- package/dist/types/components/radio-group/radio-group.d.ts +30 -12
- package/dist/types/components/search-field/search-field.d.ts +5 -5
- package/dist/types/components/selectable-list-item/selectable-list-item.d.ts +1 -1
- package/dist/types/components/selector/selector.d.ts +72 -36
- package/dist/types/components/stepper/index.d.ts +1 -1
- package/dist/types/components/stepper/stepper.d.ts +66 -18
- package/dist/types/components/tab/tab.d.ts +97 -21
- package/dist/types/components/tab/tab.phrases.d.ts +4 -0
- package/dist/types/components/tag/tag.d.ts +29 -24
- package/dist/types/components/textarea/textarea.d.ts +34 -3
- package/dist/types/components/time-picker/time-picker.d.ts +26 -19
- package/dist/types/components/toast/toast.d.ts +29 -25
- package/dist/types/components/toggle/toggle.d.ts +5 -3
- package/dist/types/components/toggle-group/toggle-group.d.ts +6 -9
- package/dist/types/components/toolbar/toolbar-toggle-group.d.ts +10 -12
- package/dist/types/components/toolbar/toolbar.d.ts +29 -21
- package/dist/types/components/tooltip/tooltip.d.ts +13 -1
- package/dist/types/components/tree-list/tree-list.d.ts +255 -62
- package/dist/types/components/virtualized-tree-list/virtualized-tree-list.d.ts +90 -43
- package/dist/types/hooks/use-active-item-focus.d.ts +1 -1
- package/dist/types/hooks/use-active-on-open.d.ts +1 -1
- package/dist/types/hooks/use-click-outside.d.ts +2 -2
- package/dist/types/hooks/use-floating-position.d.ts +2 -2
- package/dist/types/hooks/use-focus-outside.d.ts +9 -0
- package/dist/types/hooks/use-pointer-position.d.ts +1 -1
- package/dist/types/hooks/use-portal-focus-container.d.ts +6 -2
- package/dist/types/hooks/use-radio-navigation.d.ts +1 -1
- package/dist/types/hooks/use-scroll-active-into-view.d.ts +1 -1
- package/dist/types/hooks/use-step-navigation.d.ts +1 -1
- package/dist/types/hooks/use-submenu-safe-area.d.ts +1 -1
- package/dist/types/hooks/use-sync-value.d.ts +1 -1
- package/dist/types/i18n/phrases.d.ts +3 -0
- package/dist/types/primitives/menu-primitive/menu-primitive.d.ts +41 -20
- package/dist/types/providers/combobox-provider.d.ts +5 -5
- package/dist/types/providers/context-menu-content-provider.d.ts +1 -0
- package/dist/types/providers/context-menu-provider.d.ts +4 -5
- package/dist/types/providers/context-menu-sub-provider.d.ts +3 -3
- package/dist/types/providers/date-picker-provider.d.ts +2 -2
- package/dist/types/providers/dialog-provider.d.ts +6 -5
- package/dist/types/providers/focus-container-provider.d.ts +4 -2
- package/dist/types/providers/menu-provider.d.ts +2 -1
- package/dist/types/providers/menubar-menu-provider.d.ts +4 -4
- package/dist/types/providers/menubar-provider.d.ts +1 -1
- package/dist/types/providers/search-field-provider.d.ts +1 -1
- package/dist/types/providers/selector-provider.d.ts +1 -1
- package/dist/types/providers/stepper-provider.d.ts +2 -0
- package/dist/types/providers/time-picker-provider.d.ts +3 -3
- package/dist/types/providers/toolbar-provider.d.ts +1 -1
- package/dist/types/types/lucide.d.ts +9 -5
- package/dist/types/utils/dom.d.ts +23 -1
- package/dist/types/utils/unwrap.d.ts +1 -1
- package/package.json +32 -37
|
@@ -22,16 +22,14 @@ export type ContextMenuPortalProps = {
|
|
|
22
22
|
* The component that pops out when the context menu is open.
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
|
-
* **Focus-visible behavior**:
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* and remain visible until the menu closes. This provides a clean experience for
|
|
29
|
-
* pointer users while maintaining accessibility for keyboard users.
|
|
25
|
+
* **Focus-visible behavior**: Keyboard openings show focus rings immediately.
|
|
26
|
+
* Pointer openings hide them until the user presses a navigation key
|
|
27
|
+
* (ArrowUp, ArrowDown, Home, End). Rings then remain visible until the menu closes.
|
|
30
28
|
*/
|
|
31
29
|
export type ContextMenuContentProps = {
|
|
32
30
|
forceMount?: boolean;
|
|
33
31
|
loop?: boolean;
|
|
34
|
-
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
32
|
+
onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
35
33
|
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
36
34
|
onInteractOutside?: (event: Event) => void;
|
|
37
35
|
className?: string;
|
|
@@ -80,7 +78,7 @@ export type ContextMenuSubTriggerProps = {
|
|
|
80
78
|
export type ContextMenuSubContentProps = {
|
|
81
79
|
forceMount?: boolean;
|
|
82
80
|
loop?: boolean;
|
|
83
|
-
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
81
|
+
onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
84
82
|
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
85
83
|
onInteractOutside?: (event: Event) => void;
|
|
86
84
|
/**
|
|
@@ -100,42 +98,85 @@ export declare const ContextMenu: {
|
|
|
100
98
|
({ open: controlledOpen, defaultOpen, onOpenChange, children, }: ContextMenuRootProps): ReactElement;
|
|
101
99
|
displayName: string;
|
|
102
100
|
};
|
|
103
|
-
Trigger: import('
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
Trigger: import('react').ForwardRefExoticComponent<{
|
|
102
|
+
asChild?: boolean;
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
className?: string;
|
|
105
|
+
children: ReactNode;
|
|
106
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
106
107
|
Portal: {
|
|
107
108
|
({ container, forceMount, children }: ContextMenuPortalProps): ReactElement | null;
|
|
108
109
|
displayName: string;
|
|
109
110
|
};
|
|
110
|
-
Content: import('
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
111
|
+
Content: import('react').ForwardRefExoticComponent<{
|
|
112
|
+
forceMount?: boolean;
|
|
113
|
+
loop?: boolean;
|
|
114
|
+
onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
115
|
+
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
116
|
+
onInteractOutside?: (event: Event) => void;
|
|
117
|
+
className?: string;
|
|
118
|
+
children?: ReactNode;
|
|
119
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
120
|
+
Item: import('react').ForwardRefExoticComponent<{
|
|
121
|
+
id?: string;
|
|
122
|
+
asChild?: boolean;
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
onSelect?: (event: Event) => void;
|
|
125
|
+
className?: string;
|
|
126
|
+
children: ReactNode;
|
|
127
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
128
|
+
Label: import('react').ForwardRefExoticComponent<{
|
|
129
|
+
className?: string;
|
|
130
|
+
children: ReactNode;
|
|
131
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
132
|
+
Separator: import('react').ForwardRefExoticComponent<{
|
|
133
|
+
className?: string;
|
|
134
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
135
|
+
RadioGroup: import('react').ForwardRefExoticComponent<{
|
|
136
|
+
value?: string;
|
|
137
|
+
defaultValue?: string;
|
|
138
|
+
onValueChange?: (value: string) => void;
|
|
139
|
+
closeOnSelect?: boolean;
|
|
140
|
+
className?: string;
|
|
141
|
+
children?: ReactNode;
|
|
142
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
143
|
+
RadioItem: import('react').ForwardRefExoticComponent<{
|
|
144
|
+
id?: string;
|
|
145
|
+
value: string;
|
|
146
|
+
asChild?: boolean;
|
|
147
|
+
disabled?: boolean;
|
|
148
|
+
onSelect?: (event: Event) => void;
|
|
149
|
+
className?: string;
|
|
150
|
+
children: ReactNode;
|
|
151
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onSelect"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
152
|
+
ItemIndicator: import('react').ForwardRefExoticComponent<{
|
|
153
|
+
forceMount?: boolean;
|
|
154
|
+
className?: string;
|
|
155
|
+
children?: ReactNode;
|
|
156
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
131
157
|
Sub: {
|
|
132
158
|
({ open: controlledOpen, defaultOpen, onOpenChange, children, }: ContextMenuSubProps): ReactElement;
|
|
133
159
|
displayName: string;
|
|
134
160
|
};
|
|
135
|
-
SubTrigger: import('
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
161
|
+
SubTrigger: import('react').ForwardRefExoticComponent<{
|
|
162
|
+
id?: string;
|
|
163
|
+
disabled?: boolean;
|
|
164
|
+
className?: string;
|
|
165
|
+
children: ReactNode;
|
|
166
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "id"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
167
|
+
SubContent: import('react').ForwardRefExoticComponent<{
|
|
168
|
+
forceMount?: boolean;
|
|
169
|
+
loop?: boolean;
|
|
170
|
+
onEscapeKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
171
|
+
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
172
|
+
onInteractOutside?: (event: Event) => void;
|
|
173
|
+
/**
|
|
174
|
+
* Submenus open sideways only — the safe-area hover triangle assumes a
|
|
175
|
+
* horizontal approach, so top/bottom are not offered here.
|
|
176
|
+
* @default 'right'
|
|
177
|
+
*/
|
|
178
|
+
side?: "left" | "right";
|
|
179
|
+
className?: string;
|
|
180
|
+
children?: ReactNode;
|
|
181
|
+
} & Omit<FloatingProps, "side"> & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
141
182
|
};
|
|
@@ -28,7 +28,7 @@ export type DatePickerHeaderProps = {
|
|
|
28
28
|
} & Omit<ComponentPropsWithoutRef<'div'>, 'className' | 'children'>;
|
|
29
29
|
export type DatePickerContentProps = {
|
|
30
30
|
/** Optional reference to an anchor element for positioning (defaults to trigger) */
|
|
31
|
-
anchorRef?: RefObject<HTMLElement>;
|
|
31
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
32
32
|
forceMount?: boolean;
|
|
33
33
|
className?: string;
|
|
34
34
|
children?: ReactNode;
|
|
@@ -56,7 +56,7 @@ export type DatePickerRootProps = {
|
|
|
56
56
|
open?: boolean;
|
|
57
57
|
defaultOpen?: boolean;
|
|
58
58
|
onOpenChange?: (open: boolean) => void;
|
|
59
|
-
focusOnCloseRef?: RefObject<HTMLElement>;
|
|
59
|
+
focusOnCloseRef?: RefObject<HTMLElement | null>;
|
|
60
60
|
month?: Date;
|
|
61
61
|
defaultMonth?: Date;
|
|
62
62
|
onMonthChange?: (month: Date) => void;
|
|
@@ -83,26 +83,34 @@ export declare const DatePicker: {
|
|
|
83
83
|
({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, focusOnCloseRef, month: controlledMonth, defaultMonth, onMonthChange, minYear, maxYear, weekStartsOn, showOutsideDays, showNavigation, monthFormat, name, form, locale, native, closeOnSelect, nativeInputProps, className, children, onKeyDown, ...props }: DatePickerRootProps): ReactElement;
|
|
84
84
|
displayName: string;
|
|
85
85
|
};
|
|
86
|
-
Trigger: import('
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
Trigger: import('react').ForwardRefExoticComponent<{
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
className?: string;
|
|
89
|
+
children?: ReactNode;
|
|
90
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
89
91
|
Portal: {
|
|
90
92
|
({ container, forceMount, children }: DatePickerPortalProps): ReactElement | null;
|
|
91
93
|
displayName: string;
|
|
92
94
|
};
|
|
93
|
-
Content: import('
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
Content: import('react').ForwardRefExoticComponent<{
|
|
96
|
+
/** Optional reference to an anchor element for positioning (defaults to trigger) */
|
|
97
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
98
|
+
forceMount?: boolean;
|
|
99
|
+
className?: string;
|
|
100
|
+
children?: ReactNode;
|
|
101
|
+
} & FloatingProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
96
102
|
Header: {
|
|
97
103
|
({ showNavigation: showNavigationProp, className, ...props }: DatePickerHeaderProps): ReactElement;
|
|
98
104
|
displayName: string;
|
|
99
105
|
};
|
|
100
|
-
MonthSelect: import('
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
MonthSelect: import('react').ForwardRefExoticComponent<{
|
|
107
|
+
className?: string;
|
|
108
|
+
contentClassName?: string;
|
|
109
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
110
|
+
YearSelect: import('react').ForwardRefExoticComponent<{
|
|
111
|
+
className?: string;
|
|
112
|
+
contentClassName?: string;
|
|
113
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
106
114
|
Weekdays: {
|
|
107
115
|
({ className, ...props }: DatePickerWeekdaysProps): ReactElement;
|
|
108
116
|
displayName: string;
|
|
@@ -111,13 +119,18 @@ export declare const DatePicker: {
|
|
|
111
119
|
({ className, onKeyDown, onFocus, onBlur, tabIndex, ...props }: DatePickerGridProps): ReactElement;
|
|
112
120
|
displayName: string;
|
|
113
121
|
};
|
|
114
|
-
Day: import('
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
Day: import('react').ForwardRefExoticComponent<{
|
|
123
|
+
date: Date;
|
|
124
|
+
outside?: boolean;
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
active?: boolean;
|
|
127
|
+
selected?: boolean;
|
|
128
|
+
className?: string;
|
|
129
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className" | "type"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
130
|
+
NativeInput: import('react').ForwardRefExoticComponent<{
|
|
131
|
+
className?: string;
|
|
132
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "defaultValue" | "className" | "type"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
133
|
+
HiddenInput: import('react').ForwardRefExoticComponent<{
|
|
134
|
+
className?: string;
|
|
135
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "defaultValue" | "className" | "onChange" | "type"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
123
136
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const DIALOG_SHORTCUT_BOUNDARY_ATTRIBUTE = "data-dialog-shortcuts";
|
|
2
|
+
export declare const DIALOG_SHORTCUT_BOUNDARY_VALUE = "block";
|
|
3
|
+
/** An open popup whose Enter commits a pending choice keeps the chord. */
|
|
4
|
+
export declare const dialogShortcutBoundaryProps: (open: boolean) => {
|
|
5
|
+
[DIALOG_SHORTCUT_BOUNDARY_ATTRIBUTE]: typeof DIALOG_SHORTCUT_BOUNDARY_VALUE | undefined;
|
|
6
|
+
};
|
|
1
7
|
export type DialogShortcutType = 'primary' | 'secondary';
|
|
2
8
|
export type DialogActionRegistration = {
|
|
3
9
|
element: HTMLButtonElement | null;
|
|
@@ -11,8 +17,17 @@ export type DialogActionScope = {
|
|
|
11
17
|
getActionBoundaries: () => Element[];
|
|
12
18
|
focusContent: () => void;
|
|
13
19
|
};
|
|
14
|
-
export declare const DialogActionContext: import('
|
|
20
|
+
export declare const DialogActionContext: import('react').Context<DialogActionScope | undefined>;
|
|
15
21
|
export declare const getDialogShortcutKeys: (shortcut: DialogShortcutType, targetDocument?: Document | undefined) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the topmost dialog owns this Enter chord, including inactive or missing actions.
|
|
24
|
+
* Open widgets can keep local Enter behavior with a `data-dialog-shortcuts="block"` boundary.
|
|
25
|
+
* Widget handlers return before local side effects or event cancellation when this is true,
|
|
26
|
+
* leaving the bubbling event and native activation cancellation to the dialog dispatcher.
|
|
27
|
+
*/
|
|
28
|
+
export declare const isDialogShortcutEvent: (keyEvent: KeyboardEvent | {
|
|
29
|
+
nativeEvent: KeyboardEvent;
|
|
30
|
+
}) => boolean;
|
|
16
31
|
/** One bubbling listener per document, shared by all open dialog content scopes. */
|
|
17
32
|
export declare const activateDialogScope: (document: Document, scope: DialogActionScope) => (() => void);
|
|
18
33
|
export declare const registerDialogAction: (scope: DialogActionScope, shortcut: DialogShortcutType, action: DialogActionRegistration) => (() => void);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { IconButtonProps } from '../icon-button/icon-button';
|
|
2
3
|
import { StepperDotsProps } from '../stepper';
|
|
3
4
|
import { DialogShortcutType } from './dialog-actions';
|
|
4
5
|
export type DialogRootProps = {
|
|
@@ -39,9 +40,10 @@ export type DialogHeaderProps = {
|
|
|
39
40
|
className?: string;
|
|
40
41
|
children?: ReactNode;
|
|
41
42
|
} & ComponentPropsWithoutRef<'header'>;
|
|
42
|
-
declare const DialogHeader: import('
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
declare const DialogHeader: import('react').ForwardRefExoticComponent<{
|
|
44
|
+
className?: string;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
45
47
|
export type DialogCloseProps = {
|
|
46
48
|
asChild?: boolean;
|
|
47
49
|
} & ComponentPropsWithoutRef<'button'>;
|
|
@@ -114,51 +116,86 @@ export declare const Dialog: {
|
|
|
114
116
|
({ open: controlledOpen, defaultOpen, onOpenChange, step, defaultStep, onStepChange, children, }: DialogRootProps): ReactElement;
|
|
115
117
|
displayName: string;
|
|
116
118
|
};
|
|
117
|
-
Trigger: import('
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
Trigger: import('react').ForwardRefExoticComponent<{
|
|
120
|
+
asChild?: boolean;
|
|
121
|
+
children: ReactNode;
|
|
122
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
120
123
|
Portal: {
|
|
121
124
|
({ children, container, forceMount }: DialogPortalProps): ReactElement | null;
|
|
122
125
|
displayName: string;
|
|
123
126
|
};
|
|
124
|
-
Overlay: import('
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
127
|
+
Overlay: import('react').ForwardRefExoticComponent<{
|
|
128
|
+
className?: string;
|
|
129
|
+
forceMount?: boolean;
|
|
130
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
131
|
+
Content: import('react').ForwardRefExoticComponent<{
|
|
132
|
+
className?: string;
|
|
133
|
+
children?: ReactNode;
|
|
134
|
+
/** When false, the dialog is non-modal: no focus trap, no `aria-modal`, no scroll lock, and outside clicks pass through without dismissing it. Defaults to true. */
|
|
135
|
+
modal?: boolean;
|
|
136
|
+
forceMount?: boolean;
|
|
137
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
138
|
+
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
139
|
+
onInteractOutside?: (event: Event) => void;
|
|
140
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
141
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
142
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
143
|
+
Header: import('react').ForwardRefExoticComponent<{
|
|
144
|
+
className?: string;
|
|
145
|
+
children?: ReactNode;
|
|
146
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
147
|
+
Close: import('react').ForwardRefExoticComponent<{
|
|
148
|
+
asChild?: boolean;
|
|
149
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
150
|
+
Shortcut: import('react').ForwardRefExoticComponent<{
|
|
151
|
+
/** Register as primary (default) or secondary for this dialog. */
|
|
152
|
+
shortcut?: DialogShortcutType;
|
|
153
|
+
/** Compose with a child that forwards its ref to a native button. Defaults to false. */
|
|
154
|
+
asChild?: boolean;
|
|
155
|
+
/** Toggle shortcut registration without unmounting or disabling the button. Defaults to true. */
|
|
156
|
+
shortcutEnabled?: boolean;
|
|
157
|
+
/** Suppress shortcut activation while the action is pending. */
|
|
158
|
+
pending?: boolean;
|
|
159
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
160
|
+
Title: import('react').ForwardRefExoticComponent<{
|
|
161
|
+
id?: string;
|
|
162
|
+
asChild?: boolean;
|
|
163
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
164
|
+
Description: import('react').ForwardRefExoticComponent<{
|
|
165
|
+
id?: string;
|
|
166
|
+
asChild?: boolean;
|
|
167
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
168
|
+
Body: import('react').ForwardRefExoticComponent<{
|
|
169
|
+
className?: string;
|
|
170
|
+
children?: ReactNode;
|
|
171
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
172
|
+
Footer: import('react').ForwardRefExoticComponent<{
|
|
173
|
+
className?: string;
|
|
174
|
+
children?: ReactNode;
|
|
175
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
176
|
+
DefaultClose: import('react').ForwardRefExoticComponent<Partial<IconButtonProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
177
|
+
DefaultHeader: import('react').ForwardRefExoticComponent<{
|
|
178
|
+
title: string;
|
|
179
|
+
titleId?: string;
|
|
180
|
+
description?: ReactNode;
|
|
181
|
+
descriptionId?: string;
|
|
182
|
+
withClose?: boolean;
|
|
183
|
+
} & Omit<{
|
|
184
|
+
className?: string;
|
|
185
|
+
children?: ReactNode;
|
|
186
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
187
|
+
StepHeader: import('react').ForwardRefExoticComponent<{
|
|
188
|
+
step: string;
|
|
189
|
+
title: string;
|
|
190
|
+
titleId?: string;
|
|
191
|
+
description?: ReactNode;
|
|
192
|
+
descriptionId?: string;
|
|
193
|
+
helper?: string;
|
|
194
|
+
withClose?: boolean;
|
|
195
|
+
} & Omit<{
|
|
196
|
+
className?: string;
|
|
197
|
+
children?: ReactNode;
|
|
198
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
162
199
|
StepContent: {
|
|
163
200
|
({ step, locked, children }: DialogStepContentProps): ReactElement;
|
|
164
201
|
displayName: string;
|
|
@@ -71,18 +71,108 @@ export type GridListActionProps = {
|
|
|
71
71
|
*/
|
|
72
72
|
children: ReactElement;
|
|
73
73
|
};
|
|
74
|
-
export declare const GridList: import('
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
export declare const GridList: import('react').ForwardRefExoticComponent<{
|
|
75
|
+
baseId?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Controlled active cell (use `undefined` for no active cell, omit for uncontrolled)
|
|
78
|
+
*/
|
|
79
|
+
activeCell?: ActiveCell;
|
|
80
|
+
/**
|
|
81
|
+
* Default active cell (uncontrolled mode)
|
|
82
|
+
*/
|
|
83
|
+
defaultActiveCell?: ActiveCell;
|
|
84
|
+
/**
|
|
85
|
+
* Callback when active cell changes
|
|
86
|
+
*/
|
|
87
|
+
onActiveCellChange?: (cell: ActiveCell | undefined) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Whether the entire grid is disabled
|
|
90
|
+
*/
|
|
91
|
+
disabled?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether to loop navigation at boundaries
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
loop?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Accessible label for the grid
|
|
99
|
+
*/
|
|
100
|
+
label?: string;
|
|
101
|
+
/**
|
|
102
|
+
* ID of element that labels this grid (alternative to label)
|
|
103
|
+
*/
|
|
104
|
+
labelledBy?: string;
|
|
105
|
+
/**
|
|
106
|
+
* ID of element that describes this grid (for additional context)
|
|
107
|
+
*/
|
|
108
|
+
describedBy?: string;
|
|
109
|
+
className?: string;
|
|
110
|
+
children?: ReactNode;
|
|
111
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role"> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
112
|
+
Root: import('react').ForwardRefExoticComponent<{
|
|
113
|
+
baseId?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Controlled active cell (use `undefined` for no active cell, omit for uncontrolled)
|
|
116
|
+
*/
|
|
117
|
+
activeCell?: ActiveCell;
|
|
118
|
+
/**
|
|
119
|
+
* Default active cell (uncontrolled mode)
|
|
120
|
+
*/
|
|
121
|
+
defaultActiveCell?: ActiveCell;
|
|
122
|
+
/**
|
|
123
|
+
* Callback when active cell changes
|
|
124
|
+
*/
|
|
125
|
+
onActiveCellChange?: (cell: ActiveCell | undefined) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Whether the entire grid is disabled
|
|
128
|
+
*/
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Whether to loop navigation at boundaries
|
|
132
|
+
* @default false
|
|
133
|
+
*/
|
|
134
|
+
loop?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Accessible label for the grid
|
|
137
|
+
*/
|
|
138
|
+
label?: string;
|
|
139
|
+
/**
|
|
140
|
+
* ID of element that labels this grid (alternative to label)
|
|
141
|
+
*/
|
|
142
|
+
labelledBy?: string;
|
|
143
|
+
/**
|
|
144
|
+
* ID of element that describes this grid (for additional context)
|
|
145
|
+
*/
|
|
146
|
+
describedBy?: string;
|
|
147
|
+
className?: string;
|
|
148
|
+
children?: ReactNode;
|
|
149
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
150
|
+
Row: import('react').ForwardRefExoticComponent<{
|
|
151
|
+
/**
|
|
152
|
+
* Unique identifier for this row
|
|
153
|
+
*/
|
|
154
|
+
id: string;
|
|
155
|
+
/**
|
|
156
|
+
* Whether this row is disabled
|
|
157
|
+
*/
|
|
158
|
+
disabled?: boolean;
|
|
159
|
+
className?: string;
|
|
160
|
+
children?: ReactNode;
|
|
161
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "id" | "role"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
162
|
+
Cell: import('react').ForwardRefExoticComponent<{
|
|
163
|
+
/**
|
|
164
|
+
* Whether this cell is disabled
|
|
165
|
+
*/
|
|
166
|
+
disabled?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Whether this cell participates in keyboard navigation.
|
|
169
|
+
* Set to false for cells with static content (labels, badges).
|
|
170
|
+
* @default true
|
|
171
|
+
*/
|
|
172
|
+
interactive?: boolean;
|
|
173
|
+
className?: string;
|
|
174
|
+
children?: ReactNode;
|
|
175
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
86
176
|
Action: {
|
|
87
177
|
({ children }: GridListActionProps): ReactElement;
|
|
88
178
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { ButtonIconProps, ButtonVariantsProps } from '../button';
|
|
4
4
|
import { LucideIcon } from '../../types';
|
|
5
5
|
export type IconButtonVariantsProps = VariantProps<typeof iconButtonVariants> & ButtonVariantsProps & ButtonIconProps;
|
|
@@ -12,10 +12,11 @@ declare const iconButtonVariants: (props?: ({
|
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
13
|
export type IconButtonProps = {
|
|
14
14
|
icon: LucideIcon;
|
|
15
|
+
/** Explicit accessible action name; title and label are not naming fallbacks. */
|
|
16
|
+
'aria-label': string;
|
|
15
17
|
iconClassName?: string;
|
|
16
18
|
disabled?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}>;
|
|
19
|
+
label?: never;
|
|
20
|
+
} & IconButtonVariantsProps & Omit<ComponentPropsWithoutRef<'button'>, 'aria-label'>;
|
|
21
|
+
export declare const IconButton: ForwardRefExoticComponent<IconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
21
22
|
export {};
|
|
@@ -27,10 +27,32 @@ export type InputProps = {
|
|
|
27
27
|
highlightRef?: Ref<HTMLDivElement>;
|
|
28
28
|
className?: string;
|
|
29
29
|
} & ComponentPropsWithoutRef<'input'>;
|
|
30
|
-
export declare const Input: import('
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
export declare const Input: import('react').ForwardRefExoticComponent<{
|
|
31
|
+
label?: string;
|
|
32
|
+
description?: ReactNode;
|
|
33
|
+
error?: string;
|
|
34
|
+
startAddon?: string | ReactNode;
|
|
35
|
+
endAddon?: string | ReactNode;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
readOnly?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates an in-flight async operation on the field. Forces read-only behavior,
|
|
40
|
+
* shows a progress cursor and an animated shimmer overlay, and suppresses the error display.
|
|
41
|
+
* Takes priority over `error`.
|
|
42
|
+
*/
|
|
43
|
+
processing?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Applies a one-shot attention-blink ring around the field (not the label/error). Pair with
|
|
46
|
+
* `useBlinkAttention` for the trigger logic.
|
|
47
|
+
*/
|
|
48
|
+
highlight?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Ref to the field's container element — the one that wears the blink ring. Pass the same ref
|
|
51
|
+
* to `useBlinkAttention` so the hook can restart the CSS animation directly via the DOM. When
|
|
52
|
+
* provided, `highlight` becomes optional; the hook drives the class on its own.
|
|
53
|
+
*/
|
|
54
|
+
highlightRef?: Ref<HTMLDivElement>;
|
|
55
|
+
className?: string;
|
|
56
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import('react').RefAttributes<HTMLInputElement>> & {
|
|
57
|
+
Addon: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
36
58
|
};
|
|
@@ -7,6 +7,10 @@ export type LinkProps = {
|
|
|
7
7
|
leftIcon?: LucideIcon | boolean;
|
|
8
8
|
rightIcon?: LucideIcon | boolean;
|
|
9
9
|
} & ComponentPropsWithoutRef<'a'>;
|
|
10
|
-
export declare const Link: import('
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export declare const Link: import('react').ForwardRefExoticComponent<{
|
|
11
|
+
href: string;
|
|
12
|
+
external?: boolean | "auto";
|
|
13
|
+
newTab?: boolean;
|
|
14
|
+
leftIcon?: LucideIcon | boolean;
|
|
15
|
+
rightIcon?: LucideIcon | boolean;
|
|
16
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|