@neynar/ui 0.1.1 → 0.1.2
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/components/ui/accordion.d.ts +1 -25
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +240 -46
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert.d.ts +73 -11
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +44 -10
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +117 -33
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +50 -71
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +231 -49
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +189 -71
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +197 -40
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +7 -22
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/carousel.d.ts +369 -99
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +110 -38
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible.d.ts +246 -61
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +207 -159
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/command.d.ts +336 -67
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/container.d.ts +159 -64
- package/dist/components/ui/container.d.ts.map +1 -1
- package/dist/components/ui/context-menu.d.ts +321 -39
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/date-picker.d.ts +113 -86
- package/dist/components/ui/date-picker.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +106 -25
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/drawer.d.ts +388 -59
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +521 -74
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/empty-state.d.ts +148 -76
- package/dist/components/ui/empty-state.d.ts.map +1 -1
- package/dist/components/ui/hover-card.d.ts +253 -34
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +143 -44
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +0 -8
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/menubar.d.ts +288 -46
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +444 -127
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +342 -66
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/popover.d.ts +0 -8
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/progress.d.ts +88 -30
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts +189 -45
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts +178 -62
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +180 -21
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +382 -60
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +52 -39
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +144 -27
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +81 -31
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +94 -32
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +37 -31
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +280 -46
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stack.d.ts +289 -148
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts +1 -2
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/container.stories.d.ts +2 -3
- package/dist/components/ui/stories/container.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/empty-state.stories.d.ts +2 -2
- package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -2
- package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/stack.stories.d.ts +1 -1
- package/dist/components/ui/stories/text-field.stories.d.ts +7 -1
- package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +44 -38
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +33 -0
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -22
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/text-field.d.ts +170 -84
- package/dist/components/ui/text-field.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +106 -29
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/theme-toggle.d.ts +190 -65
- package/dist/components/ui/theme-toggle.d.ts.map +1 -1
- package/dist/components/ui/theme.d.ts +107 -23
- package/dist/components/ui/theme.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +143 -67
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +118 -30
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +152 -28
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/typography.d.ts +452 -134
- package/dist/components/ui/typography.d.ts.map +1 -1
- package/dist/index.js +9388 -8281
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/llms.txt +173 -3
- package/package.json +5 -2
- package/src/components/ui/accordion.tsx +112 -27
- package/src/components/ui/alert-dialog.tsx +401 -46
- package/src/components/ui/alert.tsx +114 -11
- package/src/components/ui/aspect-ratio.tsx +69 -14
- package/src/components/ui/avatar.tsx +179 -33
- package/src/components/ui/badge.tsx +74 -75
- package/src/components/ui/breadcrumb.tsx +335 -50
- package/src/components/ui/button.tsx +198 -90
- package/src/components/ui/calendar.tsx +867 -43
- package/src/components/ui/card.tsx +140 -33
- package/src/components/ui/carousel.tsx +529 -98
- package/src/components/ui/chart.tsx +222 -1
- package/src/components/ui/checkbox.tsx +176 -38
- package/src/components/ui/collapsible.tsx +321 -67
- package/src/components/ui/combobox.tsx +284 -83
- package/src/components/ui/command.tsx +527 -67
- package/src/components/ui/container.tsx +217 -65
- package/src/components/ui/context-menu.tsx +716 -51
- package/src/components/ui/date-picker.tsx +228 -38
- package/src/components/ui/dialog.tsx +270 -33
- package/src/components/ui/drawer.tsx +546 -67
- package/src/components/ui/dropdown-menu.tsx +657 -74
- package/src/components/ui/empty-state.tsx +241 -82
- package/src/components/ui/hover-card.tsx +328 -39
- package/src/components/ui/input.tsx +207 -44
- package/src/components/ui/label.tsx +98 -8
- package/src/components/ui/menubar.tsx +587 -54
- package/src/components/ui/navigation-menu.tsx +557 -128
- package/src/components/ui/pagination.tsx +561 -79
- package/src/components/ui/popover.tsx +119 -8
- package/src/components/ui/progress.tsx +131 -29
- package/src/components/ui/radio-group.tsx +260 -51
- package/src/components/ui/resizable.tsx +289 -63
- package/src/components/ui/scroll-area.tsx +377 -66
- package/src/components/ui/select.tsx +545 -60
- package/src/components/ui/separator.tsx +146 -40
- package/src/components/ui/sheet.tsx +348 -31
- package/src/components/ui/sidebar.tsx +471 -29
- package/src/components/ui/skeleton.tsx +114 -32
- package/src/components/ui/slider.tsx +77 -31
- package/src/components/ui/sonner.tsx +574 -46
- package/src/components/ui/stack.tsx +423 -101
- package/src/components/ui/switch.tsx +78 -39
- package/src/components/ui/table.tsx +170 -4
- package/src/components/ui/tabs.tsx +108 -22
- package/src/components/ui/text-field.tsx +226 -81
- package/src/components/ui/textarea.tsx +180 -29
- package/src/components/ui/theme-toggle.tsx +313 -65
- package/src/components/ui/theme.tsx +117 -23
- package/src/components/ui/toggle-group.tsx +280 -69
- package/src/components/ui/toggle.tsx +124 -35
- package/src/components/ui/tooltip.tsx +239 -29
- package/src/components/ui/typography.tsx +1115 -165
|
@@ -5,9 +5,11 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
|
5
5
|
*
|
|
6
6
|
* Wraps your application or component tree to enable tooltip functionality.
|
|
7
7
|
* Controls global tooltip behavior such as delay duration before showing tooltips.
|
|
8
|
-
* Required for tooltip components to function properly.
|
|
8
|
+
* Required for tooltip components to function properly across your app.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* The provider manages global settings that affect all tooltips within its tree,
|
|
11
|
+
* including timing behavior and accessibility features. Individual tooltips can
|
|
12
|
+
* override these settings as needed.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```tsx
|
|
@@ -19,13 +21,31 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```tsx
|
|
22
|
-
* // With custom delay
|
|
23
|
-
* <TooltipProvider
|
|
24
|
+
* // With custom delay and skip behavior
|
|
25
|
+
* <TooltipProvider
|
|
26
|
+
* delayDuration={500}
|
|
27
|
+
* skipDelayDuration={200}
|
|
28
|
+
* >
|
|
24
29
|
* <MyComponent />
|
|
25
30
|
* </TooltipProvider>
|
|
26
31
|
* ```
|
|
27
32
|
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* // Disable hoverable content for stricter accessibility
|
|
36
|
+
* <TooltipProvider disableHoverableContent>
|
|
37
|
+
* <Form />
|
|
38
|
+
* </TooltipProvider>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @accessibility
|
|
42
|
+
* - Manages focus behavior and keyboard navigation globally
|
|
43
|
+
* - Controls WCAG 2.1 compliance through hoverable content settings
|
|
44
|
+
* - Provides consistent timing behavior across all tooltips
|
|
45
|
+
* - Enables skip delay optimization for tooltip-heavy interfaces
|
|
46
|
+
*
|
|
28
47
|
* @see {@link https://ui.shadcn.com/docs/components/tooltip} for design patterns
|
|
48
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/tooltip} for Radix UI documentation
|
|
29
49
|
* @since 1.0.0
|
|
30
50
|
*/
|
|
31
51
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,6 +57,11 @@ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentPro
|
|
|
37
57
|
* for displaying help text, definitions, or additional context without cluttering
|
|
38
58
|
* the interface. Automatically wraps content in a TooltipProvider for convenience.
|
|
39
59
|
*
|
|
60
|
+
* The tooltip supports both controlled and uncontrolled usage patterns, with
|
|
61
|
+
* intelligent positioning, collision detection, and smooth animations. Built
|
|
62
|
+
* with accessibility as a priority, including proper ARIA attributes and
|
|
63
|
+
* keyboard navigation support.
|
|
64
|
+
*
|
|
40
65
|
* @example
|
|
41
66
|
* ```tsx
|
|
42
67
|
* // Basic tooltip
|
|
@@ -69,10 +94,29 @@ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentPro
|
|
|
69
94
|
*
|
|
70
95
|
* @example
|
|
71
96
|
* ```tsx
|
|
72
|
-
* //
|
|
97
|
+
* // Controlled tooltip with custom delay
|
|
98
|
+
* const [open, setOpen] = useState(false)
|
|
99
|
+
*
|
|
100
|
+
* <Tooltip
|
|
101
|
+
* open={open}
|
|
102
|
+
* onOpenChange={setOpen}
|
|
103
|
+
* delayDuration={300}
|
|
104
|
+
* >
|
|
105
|
+
* <TooltipTrigger asChild>
|
|
106
|
+
* <Button onClick={() => setOpen(!open)}>Toggle</Button>
|
|
107
|
+
* </TooltipTrigger>
|
|
108
|
+
* <TooltipContent>
|
|
109
|
+
* <p>Controlled tooltip state</p>
|
|
110
|
+
* </TooltipContent>
|
|
111
|
+
* </Tooltip>
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* // Disabled element with tooltip (requires wrapper)
|
|
73
117
|
* <Tooltip>
|
|
74
118
|
* <TooltipTrigger asChild>
|
|
75
|
-
* <span>
|
|
119
|
+
* <span className="inline-block">
|
|
76
120
|
* <Button disabled>Disabled Action</Button>
|
|
77
121
|
* </span>
|
|
78
122
|
* </TooltipTrigger>
|
|
@@ -101,12 +145,15 @@ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentPro
|
|
|
101
145
|
* @accessibility
|
|
102
146
|
* - Fully keyboard accessible (shows on focus, hides on blur)
|
|
103
147
|
* - Screen reader compatible with proper ARIA attributes
|
|
104
|
-
* - Escape key dismisses tooltip
|
|
148
|
+
* - Escape key dismisses tooltip immediately
|
|
105
149
|
* - Automatic positioning with collision detection
|
|
106
150
|
* - Respects user's reduced motion preferences
|
|
107
|
-
* - Portal rendering prevents z-index issues
|
|
151
|
+
* - Portal rendering prevents z-index stacking issues
|
|
152
|
+
* - WCAG 2.1 compliant with hoverable content support
|
|
153
|
+
* - Works with assistive technologies and voice controls
|
|
108
154
|
*
|
|
109
155
|
* @see {@link https://ui.shadcn.com/docs/components/tooltip} for design patterns
|
|
156
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/tooltip} for Radix UI documentation
|
|
110
157
|
* @see {@link Popover} - For interactive floating content
|
|
111
158
|
* @see {@link HoverCard} - For rich content previews
|
|
112
159
|
* @since 1.0.0
|
|
@@ -117,13 +164,16 @@ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimit
|
|
|
117
164
|
*
|
|
118
165
|
* Wraps the element that will show the tooltip on hover or focus.
|
|
119
166
|
* Use the `asChild` prop to merge props with the child element rather
|
|
120
|
-
* than rendering an additional wrapper element.
|
|
167
|
+
* than rendering an additional wrapper element. Essential for maintaining
|
|
168
|
+
* semantic meaning and avoiding unnecessary DOM nesting.
|
|
121
169
|
*
|
|
122
|
-
*
|
|
170
|
+
* The trigger automatically handles all interaction events including mouse hover,
|
|
171
|
+
* touch interactions, keyboard focus, and blur events. It preserves the original
|
|
172
|
+
* element's accessibility properties while adding tooltip functionality.
|
|
123
173
|
*
|
|
124
174
|
* @example
|
|
125
175
|
* ```tsx
|
|
126
|
-
* // Basic trigger
|
|
176
|
+
* // Basic trigger with button
|
|
127
177
|
* <TooltipTrigger asChild>
|
|
128
178
|
* <Button>Hover me</Button>
|
|
129
179
|
* </TooltipTrigger>
|
|
@@ -131,20 +181,48 @@ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimit
|
|
|
131
181
|
*
|
|
132
182
|
* @example
|
|
133
183
|
* ```tsx
|
|
134
|
-
* // With
|
|
184
|
+
* // With icon button
|
|
185
|
+
* <TooltipTrigger asChild>
|
|
186
|
+
* <Button variant="ghost" size="icon">
|
|
187
|
+
* <Settings className="h-4 w-4" />
|
|
188
|
+
* </Button>
|
|
189
|
+
* </TooltipTrigger>
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```tsx
|
|
194
|
+
* // With disabled element (requires wrapper for pointer events)
|
|
135
195
|
* <TooltipTrigger asChild>
|
|
136
|
-
* <span>
|
|
137
|
-
* <Button disabled>Disabled</Button>
|
|
196
|
+
* <span className="inline-block cursor-not-allowed">
|
|
197
|
+
* <Button disabled>Disabled Action</Button>
|
|
138
198
|
* </span>
|
|
139
199
|
* </TooltipTrigger>
|
|
140
200
|
* ```
|
|
141
201
|
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```tsx
|
|
204
|
+
* // With custom element
|
|
205
|
+
* <TooltipTrigger asChild>
|
|
206
|
+
* <div
|
|
207
|
+
* role="button"
|
|
208
|
+
* tabIndex={0}
|
|
209
|
+
* className="cursor-pointer p-2 rounded hover:bg-gray-100"
|
|
210
|
+
* >
|
|
211
|
+
* Custom trigger element
|
|
212
|
+
* </div>
|
|
213
|
+
* </TooltipTrigger>
|
|
214
|
+
* ```
|
|
215
|
+
*
|
|
142
216
|
* @accessibility
|
|
143
217
|
* - Automatically handles hover, focus, and blur events
|
|
144
218
|
* - Preserves existing keyboard navigation patterns
|
|
145
|
-
* - Maintains semantic meaning of wrapped element
|
|
146
|
-
* - Works with disabled elements when properly wrapped
|
|
219
|
+
* - Maintains semantic meaning and ARIA attributes of wrapped element
|
|
220
|
+
* - Works with disabled elements when properly wrapped with pointer-events
|
|
221
|
+
* - Supports all standard HTML interactive elements
|
|
222
|
+
* - Respects existing tab order and focus management
|
|
223
|
+
* - Compatible with screen readers and assistive technologies
|
|
147
224
|
*
|
|
225
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/guides/composition} for asChild pattern
|
|
148
226
|
* @since 1.0.0
|
|
149
227
|
*/
|
|
150
228
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -156,10 +234,10 @@ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Toolti
|
|
|
156
234
|
* the tooltip stays within the viewport. Includes smooth animations and an arrow
|
|
157
235
|
* pointer for visual connection to the trigger.
|
|
158
236
|
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
237
|
+
* The content component handles complex positioning logic, including collision
|
|
238
|
+
* detection, viewport boundaries, and responsive positioning. It supports rich
|
|
239
|
+
* content including text, images, and interactive elements while maintaining
|
|
240
|
+
* accessibility standards.
|
|
163
241
|
*
|
|
164
242
|
* @example
|
|
165
243
|
* ```tsx
|
|
@@ -171,30 +249,76 @@ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Toolti
|
|
|
171
249
|
*
|
|
172
250
|
* @example
|
|
173
251
|
* ```tsx
|
|
174
|
-
* // Positioned tooltip with offset
|
|
175
|
-
* <TooltipContent
|
|
176
|
-
*
|
|
252
|
+
* // Positioned tooltip with custom offset
|
|
253
|
+
* <TooltipContent
|
|
254
|
+
* side="left"
|
|
255
|
+
* sideOffset={12}
|
|
256
|
+
* align="start"
|
|
257
|
+
* alignOffset={-4}
|
|
258
|
+
* >
|
|
259
|
+
* <p>Precisely positioned tooltip</p>
|
|
177
260
|
* </TooltipContent>
|
|
178
261
|
* ```
|
|
179
262
|
*
|
|
180
263
|
* @example
|
|
181
264
|
* ```tsx
|
|
182
|
-
* // Rich content with custom
|
|
183
|
-
* <TooltipContent className="max-w-[
|
|
184
|
-
* <div className="space-y-
|
|
185
|
-
* <
|
|
186
|
-
*
|
|
265
|
+
* // Rich content with custom styling
|
|
266
|
+
* <TooltipContent className="max-w-[320px] p-4">
|
|
267
|
+
* <div className="space-y-2">
|
|
268
|
+
* <div className="flex items-center gap-2">
|
|
269
|
+
* <InfoIcon className="h-4 w-4 text-blue-500" />
|
|
270
|
+
* <p className="font-semibold">Pro Feature</p>
|
|
271
|
+
* </div>
|
|
272
|
+
* <p className="text-sm text-gray-600">
|
|
273
|
+
* This feature is available in Pro plans. Upgrade to unlock
|
|
274
|
+
* advanced functionality and premium support.
|
|
275
|
+
* </p>
|
|
276
|
+
* <Button size="sm" className="mt-2">Upgrade Now</Button>
|
|
187
277
|
* </div>
|
|
188
278
|
* </TooltipContent>
|
|
189
279
|
* ```
|
|
190
280
|
*
|
|
281
|
+
* @example
|
|
282
|
+
* ```tsx
|
|
283
|
+
* // Tooltip with collision boundary
|
|
284
|
+
* <TooltipContent
|
|
285
|
+
* collisionPadding={{ top: 10, bottom: 10 }}
|
|
286
|
+
* hideWhenDetached
|
|
287
|
+
* sticky="always"
|
|
288
|
+
* >
|
|
289
|
+
* <p>Stays within safe boundaries</p>
|
|
290
|
+
* </TooltipContent>
|
|
291
|
+
* ```
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```tsx
|
|
295
|
+
* // Controlled tooltip with escape handling
|
|
296
|
+
* <TooltipContent
|
|
297
|
+
* onEscapeKeyDown={(e) => {
|
|
298
|
+
* console.log('Tooltip dismissed with Escape');
|
|
299
|
+
* // Custom handling if needed
|
|
300
|
+
* }}
|
|
301
|
+
* onPointerDownOutside={(e) => {
|
|
302
|
+
* console.log('Clicked outside tooltip');
|
|
303
|
+
* }}
|
|
304
|
+
* >
|
|
305
|
+
* <p>Interactive tooltip with event handlers</p>
|
|
306
|
+
* </TooltipContent>
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
191
309
|
* @accessibility
|
|
192
310
|
* - Rendered in a portal to avoid z-index stacking issues
|
|
193
311
|
* - Properly announced by screen readers with role="tooltip"
|
|
194
312
|
* - Smooth animations respect reduced motion preferences
|
|
195
313
|
* - Arrow provides visual connection to trigger element
|
|
196
314
|
* - Automatically dismisses when trigger loses focus
|
|
315
|
+
* - Escape key immediately closes tooltip
|
|
316
|
+
* - Supports aria-label for screen reader context
|
|
317
|
+
* - Focus is managed properly for hoverable content
|
|
318
|
+
* - Compatible with high contrast themes
|
|
197
319
|
*
|
|
320
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/tooltip#content} for positioning details
|
|
321
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/} for ARIA tooltip pattern
|
|
198
322
|
* @since 1.0.0
|
|
199
323
|
*/
|
|
200
324
|
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AA0F5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,iBAAS,eAAe,CAAC,EACvB,aAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAQxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,iBAAS,OAAO,CAAC,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAMpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,iBAAS,cAAc,CAAC,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAiBvD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
|