@enonic/ui 1.6.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 +10 -6
- package/dist/enonic-ui.cjs +1 -1
- package/dist/enonic-ui.es.js +135 -134
- 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 +20 -12
- 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 +1 -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 +2 -4
- 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 +1 -3
- 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/stepper.d.ts +54 -18
- package/dist/types/components/tab/tab.d.ts +93 -21
- package/dist/types/components/tag/tag.d.ts +27 -18
- 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 +28 -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 +253 -60
- package/dist/types/components/virtualized-tree-list/virtualized-tree-list.d.ts +87 -41
- 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-pointer-position.d.ts +1 -1
- 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/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-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/focus-container-provider.d.ts +1 -1
- package/dist/types/providers/menu-provider.d.ts +2 -2
- 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/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 +15 -1
- package/dist/types/utils/unwrap.d.ts +1 -1
- package/package.json +27 -32
|
@@ -77,25 +77,97 @@ export type TabListOverflowProps = {
|
|
|
77
77
|
minTabWidth?: string;
|
|
78
78
|
children?: ReactNode;
|
|
79
79
|
} & ComponentPropsWithoutRef<'div'>;
|
|
80
|
-
export declare const Tab: import('
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
80
|
+
export declare const Tab: import('react').ForwardRefExoticComponent<{
|
|
81
|
+
/** Controlled value */
|
|
82
|
+
value?: string;
|
|
83
|
+
/** Default value for uncontrolled mode */
|
|
84
|
+
defaultValue?: string;
|
|
85
|
+
/** Callback when value changes */
|
|
86
|
+
onValueChange?: (value: string) => void;
|
|
87
|
+
/** When 'automatic', tabs activate on focus. When 'manual', tabs activate on Enter/Space */
|
|
88
|
+
activationMode?: "automatic" | "manual";
|
|
89
|
+
/**
|
|
90
|
+
* Whether the selected trigger receives focus on initial mount and value changes.
|
|
91
|
+
*
|
|
92
|
+
* Set to `false` to keep focus on an external control that drives the tab selection.
|
|
93
|
+
* Keyboard navigation inside the list (arrows, Home, End) still moves focus either way.
|
|
94
|
+
*
|
|
95
|
+
* With `false`, an external value change is not announced to screen readers — focus does
|
|
96
|
+
* not move and `Tab.Content` is not a live region, so the consumer must announce it.
|
|
97
|
+
*
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
100
|
+
autoFocusTrigger?: boolean;
|
|
101
|
+
/** Content */
|
|
102
|
+
children?: ReactNode;
|
|
103
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
104
|
+
Root: import('react').ForwardRefExoticComponent<{
|
|
105
|
+
/** Controlled value */
|
|
106
|
+
value?: string;
|
|
107
|
+
/** Default value for uncontrolled mode */
|
|
108
|
+
defaultValue?: string;
|
|
109
|
+
/** Callback when value changes */
|
|
110
|
+
onValueChange?: (value: string) => void;
|
|
111
|
+
/** When 'automatic', tabs activate on focus. When 'manual', tabs activate on Enter/Space */
|
|
112
|
+
activationMode?: "automatic" | "manual";
|
|
113
|
+
/**
|
|
114
|
+
* Whether the selected trigger receives focus on initial mount and value changes.
|
|
115
|
+
*
|
|
116
|
+
* Set to `false` to keep focus on an external control that drives the tab selection.
|
|
117
|
+
* Keyboard navigation inside the list (arrows, Home, End) still moves focus either way.
|
|
118
|
+
*
|
|
119
|
+
* With `false`, an external value change is not announced to screen readers — focus does
|
|
120
|
+
* not move and `Tab.Content` is not a live region, so the consumer must announce it.
|
|
121
|
+
*
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
autoFocusTrigger?: boolean;
|
|
125
|
+
/** Content */
|
|
126
|
+
children?: ReactNode;
|
|
127
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
128
|
+
List: import('react').ForwardRefExoticComponent<{
|
|
129
|
+
/** Whether keyboard navigation loops */
|
|
130
|
+
loop?: boolean;
|
|
131
|
+
/** Content (Tab.Trigger components) */
|
|
132
|
+
children?: ReactNode;
|
|
133
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
134
|
+
ListOverflow: import('react').ForwardRefExoticComponent<{
|
|
135
|
+
/** Overrides the localized accessible name for the scroll-left button. */
|
|
136
|
+
scrollLeftLabel?: string;
|
|
137
|
+
/** Overrides the localized accessible name for the scroll-right button. */
|
|
138
|
+
scrollRightLabel?: string;
|
|
139
|
+
/** Minimum width for each tab (CSS value, e.g. '6rem', '120px'). Defaults to '6.25rem'. */
|
|
140
|
+
minTabWidth?: string;
|
|
141
|
+
children?: ReactNode;
|
|
142
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
143
|
+
Trigger: import('react').ForwardRefExoticComponent<{
|
|
144
|
+
/** Value that identifies this tab */
|
|
145
|
+
value: string;
|
|
146
|
+
/** Whether this tab is disabled */
|
|
147
|
+
disabled?: boolean;
|
|
148
|
+
/** Content */
|
|
149
|
+
children?: ReactNode;
|
|
150
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "value"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
151
|
+
DefaultTrigger: import('react').ForwardRefExoticComponent<{
|
|
152
|
+
/** Value that identifies this tab */
|
|
153
|
+
value: string;
|
|
154
|
+
/** Whether this tab is disabled */
|
|
155
|
+
disabled?: boolean;
|
|
156
|
+
/** Icon displayed on the left */
|
|
157
|
+
icon?: LucideIcon;
|
|
158
|
+
/** Count displayed as badge on the right */
|
|
159
|
+
count?: string | number;
|
|
160
|
+
/** Shows error indicator on the right (takes precedence over count) */
|
|
161
|
+
error?: boolean;
|
|
162
|
+
/** Label content */
|
|
163
|
+
children?: ReactNode;
|
|
164
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "value"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
165
|
+
Content: import('react').ForwardRefExoticComponent<{
|
|
166
|
+
/** Value that matches the corresponding Tab.Trigger */
|
|
167
|
+
value: string;
|
|
168
|
+
/** Keep content in DOM even when inactive */
|
|
169
|
+
forceMount?: boolean;
|
|
170
|
+
/** Content */
|
|
171
|
+
children?: ReactNode;
|
|
172
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
101
173
|
};
|
|
@@ -17,22 +17,31 @@ export type TagLabelProps = {
|
|
|
17
17
|
as?: 'span' | 'button';
|
|
18
18
|
} & ComponentPropsWithoutRef<'button'>;
|
|
19
19
|
export type TagRemoveProps = Omit<IconButtonProps, 'icon'>;
|
|
20
|
-
export declare const Tag: import('
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
export declare const Tag: import('react').ForwardRefExoticComponent<{
|
|
21
|
+
/** `li` inside a list of tags, `span` anywhere else. */
|
|
22
|
+
as?: "span" | "li";
|
|
23
|
+
/** Red text and border, nothing more: the message is the caller's to attach, as `title` or `aria-describedby`. */
|
|
24
|
+
error?: boolean;
|
|
25
|
+
/** Mutes the chip and disables its handle, remove button and label button. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Being dragged: a grabbing cursor and a ring; the drag itself is the caller's. */
|
|
28
|
+
dragging?: boolean;
|
|
29
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLElement>> & {
|
|
30
|
+
Root: import('react').ForwardRefExoticComponent<{
|
|
31
|
+
/** `li` inside a list of tags, `span` anywhere else. */
|
|
32
|
+
as?: "span" | "li";
|
|
33
|
+
/** Red text and border, nothing more: the message is the caller's to attach, as `title` or `aria-describedby`. */
|
|
34
|
+
error?: boolean;
|
|
35
|
+
/** Mutes the chip and disables its handle, remove button and label button. */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Being dragged: a grabbing cursor and a ring; the drag itself is the caller's. */
|
|
38
|
+
dragging?: boolean;
|
|
39
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
40
|
+
Handle: import('react').ForwardRefExoticComponent<TagHandleProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
Prefix: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
42
|
+
Label: import('react').ForwardRefExoticComponent<{
|
|
43
|
+
/** `button` for a label that does something on click — a tag edited in place. */
|
|
44
|
+
as?: "span" | "button";
|
|
45
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
46
|
+
Remove: import('react').ForwardRefExoticComponent<TagRemoveProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
38
47
|
};
|
|
@@ -33,6 +33,37 @@ export type TextAreaProps = {
|
|
|
33
33
|
autoSize?: boolean;
|
|
34
34
|
className?: string;
|
|
35
35
|
} & ComponentPropsWithoutRef<'textarea'>;
|
|
36
|
-
export declare const TextArea: import('
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
export declare const TextArea: import('react').ForwardRefExoticComponent<{
|
|
37
|
+
label?: string;
|
|
38
|
+
description?: ReactNode;
|
|
39
|
+
endAddon?: ReactNode;
|
|
40
|
+
error?: string;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Indicates an in-flight async operation on the field. Forces read-only behavior,
|
|
45
|
+
* shows a progress cursor and an animated shimmer overlay, and suppresses the error display.
|
|
46
|
+
* Takes priority over `error`.
|
|
47
|
+
*/
|
|
48
|
+
processing?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Applies a one-shot attention-blink ring around the field (not the label/error). Pair with
|
|
51
|
+
* `useBlinkAttention` for the trigger logic.
|
|
52
|
+
*/
|
|
53
|
+
highlight?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Ref to the field's container element — the one that wears the blink ring. Pass the same ref
|
|
56
|
+
* to `useBlinkAttention` so the hook can restart the CSS animation directly via the DOM. When
|
|
57
|
+
* provided, `highlight` becomes optional; the hook drives the class on its own.
|
|
58
|
+
*/
|
|
59
|
+
highlightRef?: Ref<HTMLDivElement>;
|
|
60
|
+
resizable?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Enables automatic content-based sizing.
|
|
63
|
+
* Uses CSS `field-sizing: content` when supported, with a JS fallback for browsers that lack it (e.g. Firefox).
|
|
64
|
+
* In the JS fallback, manual resizing is disabled even if `resizable` is true.
|
|
65
|
+
* @see https://caniuse.com/mdn-css_properties_field-sizing
|
|
66
|
+
*/
|
|
67
|
+
autoSize?: boolean;
|
|
68
|
+
className?: string;
|
|
69
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -24,7 +24,7 @@ export type TimePickerTriggerProps = {
|
|
|
24
24
|
} & Omit<ComponentPropsWithoutRef<'button'>, 'className' | 'children'>;
|
|
25
25
|
export type TimePickerContentProps = {
|
|
26
26
|
/** Optional reference to an anchor element for positioning (defaults to trigger) */
|
|
27
|
-
anchorRef?: RefObject<HTMLElement>;
|
|
27
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
28
28
|
className?: string;
|
|
29
29
|
children?: ReactNode;
|
|
30
30
|
} & FloatingProps & Omit<ComponentPropsWithoutRef<'div'>, 'className' | 'children'>;
|
|
@@ -57,26 +57,33 @@ export declare const TimePicker: {
|
|
|
57
57
|
({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, referenceDate: referenceDateProp, timezone, name, form, native, nativeInputProps, invalid, className, children, onKeyDown, ...props }: TimePickerRootProps): ReactElement;
|
|
58
58
|
displayName: string;
|
|
59
59
|
};
|
|
60
|
-
Trigger: import('
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
Trigger: import('react').ForwardRefExoticComponent<{
|
|
61
|
+
asChild?: boolean;
|
|
62
|
+
className?: string;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
65
|
+
Content: import('react').ForwardRefExoticComponent<{
|
|
66
|
+
/** Optional reference to an anchor element for positioning (defaults to trigger) */
|
|
67
|
+
anchorRef?: RefObject<HTMLElement | null>;
|
|
68
|
+
className?: string;
|
|
69
|
+
children?: ReactNode;
|
|
70
|
+
} & FloatingProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
71
|
+
HourSelect: import('react').ForwardRefExoticComponent<{
|
|
72
|
+
className?: string;
|
|
73
|
+
contentClassName?: string;
|
|
74
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
MinuteSelect: import('react').ForwardRefExoticComponent<{
|
|
76
|
+
className?: string;
|
|
77
|
+
contentClassName?: string;
|
|
78
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | "className"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
72
79
|
Timezone: {
|
|
73
80
|
({ className, ...props }: TimePickerTimezoneProps): ReactElement | null;
|
|
74
81
|
displayName: string;
|
|
75
82
|
};
|
|
76
|
-
NativeInput: import('
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
HiddenInput: import('
|
|
80
|
-
|
|
81
|
-
}
|
|
83
|
+
NativeInput: import('react').ForwardRefExoticComponent<{
|
|
84
|
+
className?: string;
|
|
85
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "defaultValue" | "className" | "type"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
86
|
+
HiddenInput: import('react').ForwardRefExoticComponent<{
|
|
87
|
+
className?: string;
|
|
88
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "defaultValue" | "className" | "onChange" | "type"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
82
89
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { IconButtonProps } from '../icon-button';
|
|
3
|
-
import { LinkProps } from '../link';
|
|
4
3
|
export type ToastProps = {
|
|
5
4
|
id?: string | number;
|
|
6
5
|
open?: boolean;
|
|
@@ -8,7 +7,7 @@ export type ToastProps = {
|
|
|
8
7
|
onOpenChange?: (open: boolean) => void;
|
|
9
8
|
withClose?: boolean;
|
|
10
9
|
children?: ReactNode;
|
|
11
|
-
} & ComponentPropsWithoutRef<'div'>;
|
|
10
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'id'>;
|
|
12
11
|
declare const toastTones: readonly ["success", "info", "warning", "error"];
|
|
13
12
|
export type ToastTone = (typeof toastTones)[number];
|
|
14
13
|
export type ToastIconProps = {
|
|
@@ -19,36 +18,40 @@ export type ToastIconProps = {
|
|
|
19
18
|
/** Additional CSS classes for the icon wrapper. */
|
|
20
19
|
className?: string;
|
|
21
20
|
};
|
|
22
|
-
export declare const Toast: import('
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export declare const Toast: import('react').ForwardRefExoticComponent<{
|
|
22
|
+
id?: string | number;
|
|
23
|
+
open?: boolean;
|
|
24
|
+
defaultOpen?: boolean;
|
|
25
|
+
onOpenChange?: (open: boolean) => void;
|
|
26
|
+
withClose?: boolean;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "id"> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
25
29
|
Icon: {
|
|
26
30
|
({ tone, children, className }: ToastIconProps): null;
|
|
27
31
|
displayName: string;
|
|
28
32
|
};
|
|
29
|
-
Title: import('
|
|
33
|
+
Title: import('react').ForwardRefExoticComponent<{
|
|
30
34
|
asChild?: boolean;
|
|
31
|
-
} &
|
|
32
|
-
|
|
33
|
-
}>;
|
|
34
|
-
Description: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<{
|
|
35
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
36
|
+
Description: import('react').ForwardRefExoticComponent<{
|
|
35
37
|
asChild?: boolean;
|
|
36
|
-
} &
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
39
|
+
Link: import('react').ForwardRefExoticComponent<{
|
|
40
|
+
href: string;
|
|
41
|
+
external?: boolean | "auto";
|
|
42
|
+
newTab?: boolean;
|
|
43
|
+
leftIcon?: import('../..').LucideIcon | boolean;
|
|
44
|
+
rightIcon?: import('../..').LucideIcon | boolean;
|
|
45
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
46
|
+
Button: import('react').ForwardRefExoticComponent<Omit<{
|
|
47
|
+
startIcon?: import('../..').LucideIcon;
|
|
48
|
+
endIcon?: import('../..').LucideIcon;
|
|
49
|
+
label?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
} & import('../button').ButtonVariantsProps & import('../button').ButtonIconProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "disabled"> & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
52
|
+
Close: import('react').ForwardRefExoticComponent<{
|
|
48
53
|
asChild?: boolean;
|
|
49
54
|
'aria-label'?: string;
|
|
50
|
-
} & Omit<IconButtonProps, "aria-label" | "icon"
|
|
51
|
-
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
52
|
-
}>;
|
|
55
|
+
} & Omit<IconButtonProps, "aria-label" | "icon"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
53
56
|
};
|
|
54
57
|
export {};
|
|
@@ -8,6 +8,8 @@ export type ToggleVariantsProps = ButtonVariantsProps;
|
|
|
8
8
|
export type ToggleVariant = ButtonVariant;
|
|
9
9
|
export type ToggleSize = ButtonSize;
|
|
10
10
|
export type ToggleIconProps = ButtonIconProps;
|
|
11
|
-
export declare const Toggle: import('
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export declare const Toggle: import('react').ForwardRefExoticComponent<{
|
|
12
|
+
pressed?: boolean;
|
|
13
|
+
defaultPressed?: boolean;
|
|
14
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
15
|
+
} & Omit<ButtonProps, "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -47,14 +47,11 @@ export type ToggleGroupItemProps = {
|
|
|
47
47
|
value: string;
|
|
48
48
|
asChild?: boolean;
|
|
49
49
|
} & Omit<ButtonProps, 'onClick' | 'aria-pressed' | 'aria-checked'>;
|
|
50
|
-
export declare const ToggleGroup: import('
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
Item: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ToggleGroupItemProps> & {
|
|
57
|
-
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
58
|
-
}>;
|
|
50
|
+
export declare const ToggleGroup: import('react').ForwardRefExoticComponent<ToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
51
|
+
Root: import('react').ForwardRefExoticComponent<ToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Item: import('react').ForwardRefExoticComponent<{
|
|
53
|
+
value: string;
|
|
54
|
+
asChild?: boolean;
|
|
55
|
+
} & Omit<ButtonProps, "aria-checked" | "aria-pressed" | "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
59
56
|
};
|
|
60
57
|
export {};
|
|
@@ -44,17 +44,15 @@ export type ToolbarToggleItemProps = {
|
|
|
44
44
|
value: string;
|
|
45
45
|
asChild?: boolean;
|
|
46
46
|
} & Omit<ButtonProps, 'onClick' | 'aria-pressed' | 'aria-checked'>;
|
|
47
|
-
declare const ToolbarToggleItem: import('
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
58
|
-
}>;
|
|
47
|
+
declare const ToolbarToggleItem: import('react').ForwardRefExoticComponent<{
|
|
48
|
+
value: string;
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
} & Omit<ButtonProps, "aria-checked" | "aria-pressed" | "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
export declare const ToolbarToggleGroup: import('react').ForwardRefExoticComponent<ToolbarToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
52
|
+
Root: import('react').ForwardRefExoticComponent<ToolbarToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
53
|
+
Item: import('react').ForwardRefExoticComponent<{
|
|
54
|
+
value: string;
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
} & Omit<ButtonProps, "aria-checked" | "aria-pressed" | "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
59
57
|
};
|
|
60
58
|
export { ToolbarToggleItem };
|
|
@@ -119,26 +119,34 @@ export declare const Toolbar: {
|
|
|
119
119
|
({ defaultActive, onActiveChange, id, orientation, loop, children, }: ToolbarRootProps): ReactElement;
|
|
120
120
|
displayName: string;
|
|
121
121
|
};
|
|
122
|
-
Container: import('
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
122
|
+
Container: import('react').ForwardRefExoticComponent<{
|
|
123
|
+
/** Accessible label for the toolbar (required for screen readers) */
|
|
124
|
+
'aria-label': string;
|
|
125
|
+
className?: string;
|
|
126
|
+
children?: ReactNode;
|
|
127
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
128
|
+
Item: import('react').ForwardRefExoticComponent<{
|
|
129
|
+
/** Unique ID for this item (auto-generated if not provided) */
|
|
130
|
+
id?: string;
|
|
131
|
+
/** Whether the item is disabled */
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
/** Render as a child element using Radix UI Slot */
|
|
134
|
+
asChild?: boolean;
|
|
135
|
+
className?: string;
|
|
136
|
+
children: ReactNode;
|
|
137
|
+
} & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "id"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
138
|
+
Separator: import('react').ForwardRefExoticComponent<{
|
|
139
|
+
className?: string;
|
|
140
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
141
|
+
ToggleGroup: import('react').ForwardRefExoticComponent<import('./toolbar-toggle-group').ToolbarToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
142
|
+
Root: import('react').ForwardRefExoticComponent<import('./toolbar-toggle-group').ToolbarToggleGroupRootProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
143
|
+
Item: import('react').ForwardRefExoticComponent<{
|
|
144
|
+
value: string;
|
|
145
|
+
asChild?: boolean;
|
|
146
|
+
} & Omit<import('..').ButtonProps, "aria-checked" | "aria-pressed" | "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
140
147
|
};
|
|
141
|
-
ToggleItem: import('
|
|
142
|
-
|
|
143
|
-
|
|
148
|
+
ToggleItem: import('react').ForwardRefExoticComponent<{
|
|
149
|
+
value: string;
|
|
150
|
+
asChild?: boolean;
|
|
151
|
+
} & Omit<import('..').ButtonProps, "aria-checked" | "aria-pressed" | "onClick"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
144
152
|
};
|
|
@@ -9,5 +9,17 @@ export type TooltipProps = {
|
|
|
9
9
|
asChild?: boolean;
|
|
10
10
|
delay?: number;
|
|
11
11
|
trigger?: TooltipTrigger;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the child has logical focus while DOM focus stays on a container. Opens the tooltip as soon as it is
|
|
14
|
+
* true, even on mount, so pass it only while the container itself holds DOM focus.
|
|
15
|
+
*/
|
|
16
|
+
virtualFocus?: boolean;
|
|
17
|
+
/** Keyboard opening delay in milliseconds. Hover uses delay; existing focus behavior defaults to immediate. */
|
|
18
|
+
focusDelay?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Hide the tooltip and cancel pending opening without disabling its child. Re-enabling reopens it only for a
|
|
21
|
+
* focused trigger; a hovered one needs the pointer to leave and re-enter.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
12
24
|
};
|
|
13
|
-
export declare function Tooltip({ className, children, value, side, asChild, delay, trigger, }: TooltipProps): ReactElement<TooltipProps>;
|
|
25
|
+
export declare function Tooltip({ className, children, value, side, asChild, delay, trigger, virtualFocus, focusDelay, disabled, }: TooltipProps): ReactElement<TooltipProps>;
|