@refraction-ui/react 0.3.4 → 0.3.6
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/index.cjs +956 -1135
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +945 -1135
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,364 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React42 from 'react';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
13
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
14
|
-
}) : x)(function(x) {
|
|
15
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
16
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
17
|
-
});
|
|
18
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
19
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
20
|
-
};
|
|
21
|
-
var __export = (target, all) => {
|
|
22
|
-
for (var name in all)
|
|
23
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
-
};
|
|
25
|
-
var __copyProps = (to, from, except, desc) => {
|
|
26
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
-
for (let key of __getOwnPropNames(from))
|
|
28
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
-
}
|
|
31
|
-
return to;
|
|
32
|
-
};
|
|
33
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
|
|
34
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
40
|
-
mod
|
|
41
|
-
));
|
|
42
|
-
|
|
43
|
-
// ../react-file-tree/dist/index.js
|
|
44
|
-
var require_dist = __commonJS({
|
|
45
|
-
"../react-file-tree/dist/index.js"(exports$1) {
|
|
46
|
-
var jsxRuntime = __require("react/jsx-runtime");
|
|
47
|
-
var FileTree = () => {
|
|
48
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
49
|
-
};
|
|
50
|
-
exports$1.FileTree = FileTree;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// ../react-icon-system/dist/index.js
|
|
55
|
-
var require_dist2 = __commonJS({
|
|
56
|
-
"../react-icon-system/dist/index.js"(exports$1) {
|
|
57
|
-
var jsxRuntime = __require("react/jsx-runtime");
|
|
58
|
-
var IconSystem = () => {
|
|
59
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
60
|
-
};
|
|
61
|
-
exports$1.IconSystem = IconSystem;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// src/index.ts
|
|
66
|
-
var index_exports = {};
|
|
67
|
-
__export(index_exports, {
|
|
68
|
-
Accordion: () => Accordion,
|
|
69
|
-
AccordionContent: () => AccordionContent,
|
|
70
|
-
AccordionItem: () => AccordionItem,
|
|
71
|
-
AccordionTrigger: () => AccordionTrigger,
|
|
72
|
-
AnimatedText: () => AnimatedText,
|
|
73
|
-
AppShell: () => AppShell,
|
|
74
|
-
AuthGuard: () => AuthGuard,
|
|
75
|
-
AuthProvider: () => AuthProvider,
|
|
76
|
-
Avatar: () => Avatar,
|
|
77
|
-
AvatarFallback: () => AvatarFallback,
|
|
78
|
-
AvatarGroup: () => AvatarGroup,
|
|
79
|
-
AvatarImage: () => AvatarImage,
|
|
80
|
-
Badge: () => Badge,
|
|
81
|
-
BadgeDisplay: () => BadgeDisplay,
|
|
82
|
-
BottomNav: () => BottomNav,
|
|
83
|
-
Breadcrumbs: () => Breadcrumbs,
|
|
84
|
-
Button: () => Button,
|
|
85
|
-
CATEGORY_LABELS: () => CATEGORY_LABELS,
|
|
86
|
-
Calendar: () => Calendar,
|
|
87
|
-
CalendarHeader: () => CalendarHeader,
|
|
88
|
-
Callout: () => Callout,
|
|
89
|
-
Card: () => Card2,
|
|
90
|
-
CardContent: () => CardContent,
|
|
91
|
-
CardDescription: () => CardDescription,
|
|
92
|
-
CardFooter: () => CardFooter,
|
|
93
|
-
CardGrid: () => CardGrid,
|
|
94
|
-
CardHeader: () => CardHeader,
|
|
95
|
-
CardTitle: () => CardTitle,
|
|
96
|
-
Carousel: () => Carousel,
|
|
97
|
-
CarouselContent: () => CarouselContent,
|
|
98
|
-
CarouselItem: () => CarouselItem,
|
|
99
|
-
CarouselTrigger: () => CarouselTrigger,
|
|
100
|
-
Checkbox: () => Checkbox,
|
|
101
|
-
CodeBlock: () => CodeBlock,
|
|
102
|
-
CodeEditor: () => CodeEditor,
|
|
103
|
-
Collapsible: () => Collapsible,
|
|
104
|
-
CollapsibleContent: () => CollapsibleContent,
|
|
105
|
-
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
106
|
-
Command: () => Command,
|
|
107
|
-
CommandEmpty: () => CommandEmpty,
|
|
108
|
-
CommandGroup: () => CommandGroup,
|
|
109
|
-
CommandInput: () => CommandInput,
|
|
110
|
-
CommandItem: () => CommandItem,
|
|
111
|
-
CommandList: () => CommandList,
|
|
112
|
-
CommandSeparator: () => CommandSeparator,
|
|
113
|
-
ContentProtection: () => ContentProtection,
|
|
114
|
-
DataTable: () => DataTable,
|
|
115
|
-
DatePicker: () => DatePicker,
|
|
116
|
-
DeviceFrame: () => DeviceFrame,
|
|
117
|
-
Dialog: () => Dialog,
|
|
118
|
-
DialogClose: () => DialogClose,
|
|
119
|
-
DialogContent: () => DialogContent,
|
|
120
|
-
DialogDescription: () => DialogDescription,
|
|
121
|
-
DialogFooter: () => DialogFooter,
|
|
122
|
-
DialogHeader: () => DialogHeader,
|
|
123
|
-
DialogOverlay: () => DialogOverlay,
|
|
124
|
-
DialogTitle: () => DialogTitle,
|
|
125
|
-
DialogTrigger: () => DialogTrigger,
|
|
126
|
-
DropdownMenu: () => DropdownMenu,
|
|
127
|
-
DropdownMenuContent: () => DropdownMenuContent,
|
|
128
|
-
DropdownMenuItem: () => DropdownMenuItem,
|
|
129
|
-
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
130
|
-
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
131
|
-
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
132
|
-
EMOJI_CATEGORIES: () => EMOJI_CATEGORIES,
|
|
133
|
-
EMOJI_DATA: () => EMOJI_DATA,
|
|
134
|
-
EmojiPicker: () => EmojiPicker,
|
|
135
|
-
FeedbackButton: () => FeedbackButton,
|
|
136
|
-
FeedbackDialog: () => FeedbackDialog,
|
|
137
|
-
FileUpload: () => FileUpload,
|
|
138
|
-
Footer: () => Footer,
|
|
139
|
-
InlineEditor: () => InlineEditor,
|
|
140
|
-
Input: () => Input,
|
|
141
|
-
InputGroup: () => InputGroup,
|
|
142
|
-
InputGroupAddon: () => InputGroupAddon,
|
|
143
|
-
InputGroupButton: () => InputGroupButton,
|
|
144
|
-
InputGroupText: () => InputGroupText,
|
|
145
|
-
InstallPrompt: () => InstallPrompt,
|
|
146
|
-
KeyboardShortcut: () => KeyboardShortcut,
|
|
147
|
-
LanguageSelector: () => LanguageSelector,
|
|
148
|
-
LinkCard: () => LinkCard,
|
|
149
|
-
MarkdownRenderer: () => MarkdownRenderer,
|
|
150
|
-
MobileNav: () => MobileNav,
|
|
151
|
-
MobileNavContent: () => MobileNavContent,
|
|
152
|
-
MobileNavLink: () => MobileNavLink,
|
|
153
|
-
MobileNavTrigger: () => MobileNavTrigger,
|
|
154
|
-
Navbar: () => Navbar,
|
|
155
|
-
OtpInput: () => OtpInput,
|
|
156
|
-
PRESENCE_STATUS_COLORS: () => STATUS_COLORS,
|
|
157
|
-
PRESENCE_STATUS_LABELS: () => STATUS_LABELS,
|
|
158
|
-
Pagination: () => Pagination,
|
|
159
|
-
Payment: () => Payment,
|
|
160
|
-
Popover: () => Popover,
|
|
161
|
-
PopoverClose: () => PopoverClose,
|
|
162
|
-
PopoverContent: () => PopoverContent,
|
|
163
|
-
PopoverTrigger: () => PopoverTrigger,
|
|
164
|
-
PresenceIndicator: () => PresenceIndicator,
|
|
165
|
-
ProgressBar: () => ProgressBar,
|
|
166
|
-
RadioGroup: () => RadioGroup,
|
|
167
|
-
RadioItem: () => RadioItem,
|
|
168
|
-
ReactionBar: () => ReactionBar,
|
|
169
|
-
ResizableDivider: () => ResizableDivider,
|
|
170
|
-
ResizableLayout: () => ResizableLayout,
|
|
171
|
-
ResizablePane: () => ResizablePane,
|
|
172
|
-
STATUS_COLORS: () => STATUS_COLORS2,
|
|
173
|
-
STATUS_LABELS: () => STATUS_LABELS2,
|
|
174
|
-
SearchBar: () => SearchBar,
|
|
175
|
-
SearchResultItem: () => SearchResultItem,
|
|
176
|
-
SearchResults: () => SearchResults,
|
|
177
|
-
Select: () => Select,
|
|
178
|
-
SelectContent: () => SelectContent,
|
|
179
|
-
SelectItem: () => SelectItem,
|
|
180
|
-
SelectTrigger: () => SelectTrigger,
|
|
181
|
-
ShortcutBadge: () => ShortcutBadge,
|
|
182
|
-
Sidebar: () => Sidebar,
|
|
183
|
-
Skeleton: () => Skeleton,
|
|
184
|
-
SkeletonText: () => SkeletonText,
|
|
185
|
-
SkipToContent: () => SkipToContent,
|
|
186
|
-
SlideViewer: () => SlideViewer,
|
|
187
|
-
StatsGrid: () => StatsGrid,
|
|
188
|
-
StatusIndicator: () => StatusIndicator,
|
|
189
|
-
Steps: () => Steps,
|
|
190
|
-
Switch: () => Switch,
|
|
191
|
-
TableOfContents: () => TableOfContents,
|
|
192
|
-
Tabs: () => Tabs,
|
|
193
|
-
TabsContent: () => TabsContent,
|
|
194
|
-
TabsList: () => TabsList,
|
|
195
|
-
TabsTrigger: () => TabsTrigger,
|
|
196
|
-
Textarea: () => Textarea,
|
|
197
|
-
ThemeProvider: () => ThemeProvider,
|
|
198
|
-
ThemeScript: () => ThemeScript,
|
|
199
|
-
ThemeToggle: () => ThemeToggle,
|
|
200
|
-
ThreadView: () => ThreadView,
|
|
201
|
-
Toast: () => Toast,
|
|
202
|
-
ToastProvider: () => ToastProvider,
|
|
203
|
-
Toaster: () => Toaster,
|
|
204
|
-
Tooltip: () => Tooltip,
|
|
205
|
-
TooltipContent: () => TooltipContent,
|
|
206
|
-
TooltipTrigger: () => TooltipTrigger,
|
|
207
|
-
TypewriterText: () => TypewriterText,
|
|
208
|
-
VersionSelector: () => VersionSelector,
|
|
209
|
-
VideoPlayer: () => VideoPlayer,
|
|
210
|
-
animatedTextVariants: () => animatedTextVariants,
|
|
211
|
-
avatarFallbackVariants: () => avatarFallbackVariants,
|
|
212
|
-
avatarImageVariants: () => avatarImageVariants,
|
|
213
|
-
avatarTokens: () => avatarTokens,
|
|
214
|
-
avatarVariants: () => avatarVariants,
|
|
215
|
-
badgeGridVariants: () => badgeGridVariants,
|
|
216
|
-
badgeItemVariants: () => badgeItemVariants,
|
|
217
|
-
badgeVariants: () => badgeVariants,
|
|
218
|
-
bottomNavTabVariants: () => bottomNavTabVariants,
|
|
219
|
-
bottomNavVariants: () => bottomNavVariants,
|
|
220
|
-
breadcrumbItemVariants: () => breadcrumbItemVariants,
|
|
221
|
-
breadcrumbSeparatorStyles: () => breadcrumbSeparatorStyles,
|
|
222
|
-
breadcrumbsVariants: () => breadcrumbsVariants,
|
|
223
|
-
buttonTokens: () => buttonTokens,
|
|
224
|
-
buttonVariants: () => buttonVariants,
|
|
225
|
-
calendarVariants: () => calendarVariants,
|
|
226
|
-
canAccessAdmin: () => canAccessAdmin,
|
|
227
|
-
canAccessReviewer: () => canAccessReviewer,
|
|
228
|
-
cardContentVariants: () => cardContentVariants,
|
|
229
|
-
cardDescriptionVariants: () => cardDescriptionVariants,
|
|
230
|
-
cardFooterVariants: () => cardFooterVariants,
|
|
231
|
-
cardHeaderVariants: () => cardHeaderVariants,
|
|
232
|
-
cardTitleVariants: () => cardTitleVariants,
|
|
233
|
-
cardTokens: () => cardTokens,
|
|
234
|
-
cardVariants: () => cardVariants,
|
|
235
|
-
cellVariants: () => cellVariants,
|
|
236
|
-
checkIconPath: () => checkIconPath,
|
|
237
|
-
checkboxTokens: () => checkboxTokens,
|
|
238
|
-
checkboxVariants: () => checkboxVariants,
|
|
239
|
-
codeEditorTokens: () => codeEditorTokens,
|
|
240
|
-
codeEditorVariants: () => codeEditorVariants,
|
|
241
|
-
collapsibleContentVariants: () => collapsibleContentVariants,
|
|
242
|
-
commandGroupVariants: () => commandGroupVariants,
|
|
243
|
-
commandInputVariants: () => commandInputVariants,
|
|
244
|
-
commandItemVariants: () => commandItemVariants,
|
|
245
|
-
commandVariants: () => commandVariants,
|
|
246
|
-
contentProtectionVariants: () => contentProtectionVariants,
|
|
247
|
-
controlsVariants: () => controlsVariants,
|
|
248
|
-
dayVariants: () => dayVariants,
|
|
249
|
-
deviceFrameVariants: () => deviceFrameVariants,
|
|
250
|
-
dialogContentVariants: () => dialogContentVariants,
|
|
251
|
-
editorVariants: () => editorVariants,
|
|
252
|
-
emojiPickerContainerStyles: () => emojiPickerContainerStyles,
|
|
253
|
-
emojiPickerEmojiButtonStyles: () => emojiPickerEmojiButtonStyles,
|
|
254
|
-
emojiPickerGridStyles: () => emojiPickerGridStyles,
|
|
255
|
-
feedbackDialogVariants: () => feedbackDialogVariants,
|
|
256
|
-
fileUploadDropZoneVariants: () => fileUploadDropZoneVariants,
|
|
257
|
-
fileUploadFileItemStyles: () => fileUploadFileItemStyles,
|
|
258
|
-
fileUploadFileListStyles: () => fileUploadFileListStyles,
|
|
259
|
-
footerVariants: () => footerVariants,
|
|
260
|
-
formatFileSize: () => formatFileSize,
|
|
261
|
-
formatRelativeTime: () => formatRelativeTime,
|
|
262
|
-
formatShortcut: () => formatShortcut,
|
|
263
|
-
formatTimestamp: () => formatTimestamp,
|
|
264
|
-
getAssignableRoles: () => getAssignableRoles,
|
|
265
|
-
getDefaultPortal: () => getDefaultPortal,
|
|
266
|
-
getInitials: () => getInitials,
|
|
267
|
-
hasAllRoles: () => hasAllRoles,
|
|
268
|
-
hasAnyRole: () => hasAnyRole,
|
|
269
|
-
hasRole: () => hasRole,
|
|
270
|
-
headerVariants: () => headerVariants,
|
|
271
|
-
indeterminateIconPath: () => indeterminateIconPath,
|
|
272
|
-
inputGroupAddonVariants: () => inputGroupAddonVariants,
|
|
273
|
-
inputGroupButtonVariants: () => inputGroupButtonVariants,
|
|
274
|
-
inputGroupTokens: () => inputGroupTokens,
|
|
275
|
-
inputGroupVariants: () => inputGroupVariants,
|
|
276
|
-
inputVariants: () => inputVariants,
|
|
277
|
-
installPromptVariants: () => installPromptVariants,
|
|
278
|
-
latestBadgeVariants: () => latestBadgeVariants,
|
|
279
|
-
markdownRendererTokens: () => markdownRendererTokens,
|
|
280
|
-
menuContentVariants: () => menuContentVariants,
|
|
281
|
-
menuItemVariants: () => menuItemVariants,
|
|
282
|
-
mobileNavContentVariants: () => mobileNavContentVariants,
|
|
283
|
-
mobileNavLinkVariants: () => mobileNavLinkVariants,
|
|
284
|
-
mobileNavTokens: () => mobileNavTokens,
|
|
285
|
-
mobileNavTriggerVariants: () => mobileNavTriggerVariants,
|
|
286
|
-
mobileNavVariants: () => mobileNavVariants,
|
|
287
|
-
navLinkVariants: () => navLinkVariants,
|
|
288
|
-
navbarVariants: () => navbarVariants,
|
|
289
|
-
optionVariants: () => optionVariants,
|
|
290
|
-
otpInputContainerVariants: () => otpInputContainerVariants,
|
|
291
|
-
otpInputSlotVariants: () => otpInputSlotVariants,
|
|
292
|
-
otpInputTokens: () => otpInputTokens,
|
|
293
|
-
overlayStyles: () => overlayStyles,
|
|
294
|
-
overlayVariants: () => overlayVariants,
|
|
295
|
-
playerVariants: () => playerVariants,
|
|
296
|
-
popoverContentVariants: () => popoverContentVariants,
|
|
297
|
-
previewVariants: () => previewVariants,
|
|
298
|
-
progressBarVariants: () => progressBarVariants,
|
|
299
|
-
proseVariants: () => proseVariants,
|
|
300
|
-
radioCircleVariants: () => radioCircleVariants,
|
|
301
|
-
radioGroupVariants: () => radioGroupVariants,
|
|
302
|
-
radioItemVariants: () => radioItemVariants,
|
|
303
|
-
reactionAddButtonStyles: () => reactionAddButtonStyles,
|
|
304
|
-
reactionBarStyles: () => reactionBarStyles,
|
|
305
|
-
reactionCountStyles: () => reactionCountStyles,
|
|
306
|
-
reactionEmojiStyles: () => reactionEmojiStyles,
|
|
307
|
-
reactionPillVariants: () => reactionPillVariants,
|
|
308
|
-
resizableDividerVariants: () => resizableDividerVariants,
|
|
309
|
-
resizableLayoutTokens: () => resizableLayoutTokens,
|
|
310
|
-
resizableLayoutVariants: () => resizableLayoutVariants,
|
|
311
|
-
resizablePaneVariants: () => resizablePaneVariants,
|
|
312
|
-
rowVariants: () => rowVariants,
|
|
313
|
-
searchBarVariants: () => searchBarVariants,
|
|
314
|
-
searchResultVariants: () => searchResultVariants,
|
|
315
|
-
selectContentVariants: () => selectContentVariants,
|
|
316
|
-
selectItemVariants: () => selectItemVariants,
|
|
317
|
-
selectTokens: () => selectTokens,
|
|
318
|
-
selectTriggerVariants: () => selectTriggerVariants,
|
|
319
|
-
selectorVariants: () => selectorVariants,
|
|
320
|
-
shortcutBadgeStyles: () => shortcutBadgeStyles,
|
|
321
|
-
shortcutKeyStyles: () => shortcutKeyStyles,
|
|
322
|
-
shortcutSeparatorStyles: () => shortcutSeparatorStyles,
|
|
323
|
-
sidebarItemVariants: () => sidebarItemVariants,
|
|
324
|
-
sidebarVariants: () => sidebarVariants,
|
|
325
|
-
skeletonVariants: () => skeletonVariants,
|
|
326
|
-
slideTypeBadgeVariants: () => slideTypeBadgeVariants,
|
|
327
|
-
slideViewerProgressBarVariants: () => progressBarVariants2,
|
|
328
|
-
slideViewerTokens: () => slideViewerTokens,
|
|
329
|
-
slideViewerVariants: () => slideViewerVariants,
|
|
330
|
-
statCardVariants: () => statCardVariants,
|
|
331
|
-
statsGridVariants: () => statsGridVariants,
|
|
332
|
-
statusContainerStyles: () => statusContainerStyles,
|
|
333
|
-
statusDotVariants: () => statusDotVariants,
|
|
334
|
-
statusLabelStyles: () => statusLabelStyles,
|
|
335
|
-
statusPulseVariants: () => statusPulseVariants,
|
|
336
|
-
switchThumbVariants: () => switchThumbVariants,
|
|
337
|
-
switchTokens: () => switchTokens,
|
|
338
|
-
switchVariants: () => switchVariants,
|
|
339
|
-
tableVariants: () => tableVariants,
|
|
340
|
-
tabsListVariants: () => tabsListVariants,
|
|
341
|
-
tabsTriggerVariants: () => tabsTriggerVariants,
|
|
342
|
-
textareaVariants: () => textareaVariants,
|
|
343
|
-
threadAuthorStyles: () => threadAuthorStyles,
|
|
344
|
-
threadAvatarStyles: () => threadAvatarStyles,
|
|
345
|
-
threadBodyStyles: () => threadBodyStyles,
|
|
346
|
-
threadContainerStyles: () => threadContainerStyles,
|
|
347
|
-
threadContentStyles: () => threadContentStyles,
|
|
348
|
-
threadMessageStyles: () => threadMessageStyles,
|
|
349
|
-
threadReactionsStyles: () => threadReactionsStyles,
|
|
350
|
-
threadTimestampStyles: () => threadTimestampStyles,
|
|
351
|
-
toastVariants: () => toastVariants,
|
|
352
|
-
toolbarVariants: () => toolbarVariants,
|
|
353
|
-
tooltipContentVariants: () => tooltipContentVariants,
|
|
354
|
-
typewriterVariants: () => typewriterVariants,
|
|
355
|
-
useAuth: () => useAuth,
|
|
356
|
-
useTheme: () => useTheme,
|
|
357
|
-
useToast: () => useToast,
|
|
358
|
-
versionSelectorOptionVariants: () => optionVariants2,
|
|
359
|
-
versionSelectorVariants: () => versionSelectorVariants,
|
|
360
|
-
watermarkVariants: () => watermarkVariants
|
|
361
|
-
});
|
|
6
|
+
// ../react-theme/dist/index.js
|
|
362
7
|
|
|
363
8
|
// ../theme/dist/index.js
|
|
364
9
|
function resolveTheme(mode, systemPrefersDark) {
|
|
@@ -474,14 +119,14 @@ function applyThemeToDOM(resolved, attribute = "class") {
|
|
|
474
119
|
}
|
|
475
120
|
|
|
476
121
|
// ../react-theme/dist/index.js
|
|
477
|
-
var ThemeContext =
|
|
122
|
+
var ThemeContext = React42.createContext(null);
|
|
478
123
|
function ThemeProvider({
|
|
479
124
|
children,
|
|
480
125
|
defaultMode = "system",
|
|
481
126
|
storageKey = "rfr-theme",
|
|
482
127
|
attribute = "class"
|
|
483
128
|
}) {
|
|
484
|
-
const themeRef =
|
|
129
|
+
const themeRef = React42.useRef(null);
|
|
485
130
|
if (!themeRef.current) {
|
|
486
131
|
const isBrowser = typeof window !== "undefined";
|
|
487
132
|
themeRef.current = createTheme(
|
|
@@ -490,8 +135,8 @@ function ThemeProvider({
|
|
|
490
135
|
isBrowser ? createMediaQueryAdapter() : void 0
|
|
491
136
|
);
|
|
492
137
|
}
|
|
493
|
-
const [state, setState] =
|
|
494
|
-
|
|
138
|
+
const [state, setState] = React42.useState(() => themeRef.current.getState());
|
|
139
|
+
React42.useEffect(() => {
|
|
495
140
|
const theme = themeRef.current;
|
|
496
141
|
applyThemeToDOM(theme.getState().resolved, attribute);
|
|
497
142
|
const unsub = theme.subscribe((newState) => {
|
|
@@ -503,7 +148,7 @@ function ThemeProvider({
|
|
|
503
148
|
theme.destroy();
|
|
504
149
|
};
|
|
505
150
|
}, [attribute]);
|
|
506
|
-
const contextValue =
|
|
151
|
+
const contextValue = React42.useMemo(
|
|
507
152
|
() => ({
|
|
508
153
|
mode: state.mode,
|
|
509
154
|
resolved: state.resolved,
|
|
@@ -511,10 +156,10 @@ function ThemeProvider({
|
|
|
511
156
|
}),
|
|
512
157
|
[state.mode, state.resolved]
|
|
513
158
|
);
|
|
514
|
-
return
|
|
159
|
+
return React42.createElement(ThemeContext.Provider, { value: contextValue }, children);
|
|
515
160
|
}
|
|
516
161
|
function useTheme() {
|
|
517
|
-
const context =
|
|
162
|
+
const context = React42.useContext(ThemeContext);
|
|
518
163
|
if (!context) {
|
|
519
164
|
throw new Error("useTheme must be used within a <ThemeProvider>");
|
|
520
165
|
}
|
|
@@ -526,7 +171,7 @@ var modes = [
|
|
|
526
171
|
{ value: "system", label: "System", icon: "monitor" }
|
|
527
172
|
];
|
|
528
173
|
var icons = {
|
|
529
|
-
sun:
|
|
174
|
+
sun: React42.createElement(
|
|
530
175
|
"svg",
|
|
531
176
|
{
|
|
532
177
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -539,10 +184,10 @@ var icons = {
|
|
|
539
184
|
strokeLinecap: "round",
|
|
540
185
|
strokeLinejoin: "round"
|
|
541
186
|
},
|
|
542
|
-
|
|
543
|
-
|
|
187
|
+
React42.createElement("circle", { cx: 12, cy: 12, r: 5 }),
|
|
188
|
+
React42.createElement("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
|
|
544
189
|
),
|
|
545
|
-
moon:
|
|
190
|
+
moon: React42.createElement(
|
|
546
191
|
"svg",
|
|
547
192
|
{
|
|
548
193
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -555,9 +200,9 @@ var icons = {
|
|
|
555
200
|
strokeLinecap: "round",
|
|
556
201
|
strokeLinejoin: "round"
|
|
557
202
|
},
|
|
558
|
-
|
|
203
|
+
React42.createElement("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
559
204
|
),
|
|
560
|
-
monitor:
|
|
205
|
+
monitor: React42.createElement(
|
|
561
206
|
"svg",
|
|
562
207
|
{
|
|
563
208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -570,15 +215,15 @@ var icons = {
|
|
|
570
215
|
strokeLinecap: "round",
|
|
571
216
|
strokeLinejoin: "round"
|
|
572
217
|
},
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
218
|
+
React42.createElement("rect", { x: 2, y: 3, width: 20, height: 14, rx: 2, ry: 2 }),
|
|
219
|
+
React42.createElement("line", { x1: 8, y1: 21, x2: 16, y2: 21 }),
|
|
220
|
+
React42.createElement("line", { x1: 12, y1: 17, x2: 12, y2: 21 })
|
|
576
221
|
)
|
|
577
222
|
};
|
|
578
223
|
function ThemeToggle({ className, variant = "segmented" }) {
|
|
579
224
|
const { mode, setMode } = useTheme();
|
|
580
225
|
if (variant === "segmented") {
|
|
581
|
-
return
|
|
226
|
+
return React42.createElement(
|
|
582
227
|
"div",
|
|
583
228
|
{
|
|
584
229
|
className: `inline-flex items-center gap-1 rounded-lg border p-1 ${className ?? ""}`,
|
|
@@ -586,7 +231,7 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
586
231
|
"aria-label": "Theme"
|
|
587
232
|
},
|
|
588
233
|
modes.map(
|
|
589
|
-
({ value, label, icon }) =>
|
|
234
|
+
({ value, label, icon }) => React42.createElement("button", {
|
|
590
235
|
key: value,
|
|
591
236
|
type: "button",
|
|
592
237
|
role: "radio",
|
|
@@ -598,9 +243,9 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
598
243
|
)
|
|
599
244
|
);
|
|
600
245
|
}
|
|
601
|
-
const [open, setOpen] =
|
|
602
|
-
const ref =
|
|
603
|
-
|
|
246
|
+
const [open, setOpen] = React42.useState(false);
|
|
247
|
+
const ref = React42.useRef(null);
|
|
248
|
+
React42.useEffect(() => {
|
|
604
249
|
if (!open) return;
|
|
605
250
|
const handler = (e) => {
|
|
606
251
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -609,24 +254,24 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
609
254
|
return () => document.removeEventListener("mousedown", handler);
|
|
610
255
|
}, [open]);
|
|
611
256
|
const currentIcon = modes.find((m) => m.value === mode)?.icon ?? "monitor";
|
|
612
|
-
return
|
|
257
|
+
return React42.createElement(
|
|
613
258
|
"div",
|
|
614
259
|
{ ref, className: `relative ${className ?? ""}` },
|
|
615
|
-
|
|
260
|
+
React42.createElement("button", {
|
|
616
261
|
type: "button",
|
|
617
262
|
"aria-label": "Toggle theme",
|
|
618
263
|
"aria-expanded": open,
|
|
619
264
|
className: "inline-flex items-center justify-center rounded-md p-2 text-sm transition-colors hover:bg-muted",
|
|
620
265
|
onClick: () => setOpen(!open)
|
|
621
266
|
}, icons[currentIcon]),
|
|
622
|
-
open &&
|
|
267
|
+
open && React42.createElement(
|
|
623
268
|
"div",
|
|
624
269
|
{
|
|
625
270
|
className: "absolute right-0 top-full mt-1 z-50 min-w-[8rem] rounded-md border bg-popover p-1 shadow-md",
|
|
626
271
|
role: "menu"
|
|
627
272
|
},
|
|
628
273
|
modes.map(
|
|
629
|
-
({ value, label, icon }) =>
|
|
274
|
+
({ value, label, icon }) => React42.createElement("button", {
|
|
630
275
|
key: value,
|
|
631
276
|
type: "button",
|
|
632
277
|
role: "menuitem",
|
|
@@ -644,7 +289,7 @@ function ThemeScript({
|
|
|
644
289
|
storageKey = "rfr-theme",
|
|
645
290
|
attribute = "class"
|
|
646
291
|
}) {
|
|
647
|
-
return
|
|
292
|
+
return React42.createElement("script", {
|
|
648
293
|
dangerouslySetInnerHTML: {
|
|
649
294
|
__html: getThemeScript(storageKey, attribute)
|
|
650
295
|
}
|
|
@@ -762,14 +407,14 @@ function cva(config) {
|
|
|
762
407
|
return classes.filter(Boolean).join(" ");
|
|
763
408
|
};
|
|
764
409
|
}
|
|
765
|
-
var AccordionContext =
|
|
766
|
-
var Accordion =
|
|
410
|
+
var AccordionContext = React42.createContext(null);
|
|
411
|
+
var Accordion = React42.forwardRef(
|
|
767
412
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
768
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
413
|
+
const [uncontrolledValue, setUncontrolledValue] = React42.useState(
|
|
769
414
|
defaultValue ?? (type === "multiple" ? [] : "")
|
|
770
415
|
);
|
|
771
416
|
const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
772
|
-
const handleValueChange =
|
|
417
|
+
const handleValueChange = React42.useCallback(
|
|
773
418
|
(itemValue) => {
|
|
774
419
|
if (type === "single") {
|
|
775
420
|
const newValue = value === itemValue && collapsible ? "" : itemValue;
|
|
@@ -788,20 +433,20 @@ var Accordion = React41.forwardRef(
|
|
|
788
433
|
}
|
|
789
434
|
);
|
|
790
435
|
Accordion.displayName = "Accordion";
|
|
791
|
-
var AccordionItemContext =
|
|
792
|
-
var AccordionItem =
|
|
436
|
+
var AccordionItemContext = React42.createContext(null);
|
|
437
|
+
var AccordionItem = React42.forwardRef(
|
|
793
438
|
({ className, value, ...props }, ref) => {
|
|
794
|
-
const context =
|
|
439
|
+
const context = React42.useContext(AccordionContext);
|
|
795
440
|
if (!context) throw new Error("AccordionItem must be within Accordion");
|
|
796
441
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
797
442
|
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
798
443
|
}
|
|
799
444
|
);
|
|
800
445
|
AccordionItem.displayName = "AccordionItem";
|
|
801
|
-
var AccordionTrigger =
|
|
446
|
+
var AccordionTrigger = React42.forwardRef(
|
|
802
447
|
({ className, children, ...props }, ref) => {
|
|
803
|
-
const accordionContext =
|
|
804
|
-
const itemContext =
|
|
448
|
+
const accordionContext = React42.useContext(AccordionContext);
|
|
449
|
+
const itemContext = React42.useContext(AccordionItemContext);
|
|
805
450
|
if (!accordionContext || !itemContext) throw new Error("AccordionTrigger missing context");
|
|
806
451
|
return /* @__PURE__ */ jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxs(
|
|
807
452
|
"button",
|
|
@@ -840,9 +485,9 @@ var AccordionTrigger = React41.forwardRef(
|
|
|
840
485
|
}
|
|
841
486
|
);
|
|
842
487
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
843
|
-
var AccordionContent =
|
|
488
|
+
var AccordionContent = React42.forwardRef(
|
|
844
489
|
({ className, children, ...props }, ref) => {
|
|
845
|
-
const itemContext =
|
|
490
|
+
const itemContext = React42.useContext(AccordionItemContext);
|
|
846
491
|
if (!itemContext) throw new Error("AccordionContent missing context");
|
|
847
492
|
return /* @__PURE__ */ jsx(
|
|
848
493
|
"div",
|
|
@@ -924,16 +569,16 @@ var typewriterVariants = cva({
|
|
|
924
569
|
cursor: "blinking"
|
|
925
570
|
}
|
|
926
571
|
});
|
|
927
|
-
var AnimatedText =
|
|
572
|
+
var AnimatedText = React42.forwardRef(
|
|
928
573
|
({ words, interval = 2500, transitionDuration = 1e3, className, ...props }, ref) => {
|
|
929
|
-
const apiRef =
|
|
574
|
+
const apiRef = React42.useRef(
|
|
930
575
|
createAnimatedText({ words})
|
|
931
576
|
);
|
|
932
577
|
const api = apiRef.current;
|
|
933
|
-
const [currentIndex, setCurrentIndex] =
|
|
934
|
-
const [isExiting, setIsExiting] =
|
|
578
|
+
const [currentIndex, setCurrentIndex] = React42.useState(0);
|
|
579
|
+
const [isExiting, setIsExiting] = React42.useState(false);
|
|
935
580
|
const prefersReducedMotion = typeof globalThis !== "undefined" && typeof globalThis.matchMedia === "function" && globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
936
|
-
|
|
581
|
+
React42.useEffect(() => {
|
|
937
582
|
if (words.length <= 1) return;
|
|
938
583
|
const tick = setInterval(() => {
|
|
939
584
|
if (prefersReducedMotion) {
|
|
@@ -969,13 +614,13 @@ var AnimatedText = React41.forwardRef(
|
|
|
969
614
|
}
|
|
970
615
|
);
|
|
971
616
|
AnimatedText.displayName = "AnimatedText";
|
|
972
|
-
var TypewriterText =
|
|
617
|
+
var TypewriterText = React42.forwardRef(
|
|
973
618
|
({ text, speed = 50, startDelay = 0, className, ...props }, ref) => {
|
|
974
|
-
const apiRef =
|
|
619
|
+
const apiRef = React42.useRef(createTypewriter({ text}));
|
|
975
620
|
const api = apiRef.current;
|
|
976
|
-
const [currentIndex, setCurrentIndex] =
|
|
621
|
+
const [currentIndex, setCurrentIndex] = React42.useState(0);
|
|
977
622
|
const prefersReducedMotion = typeof globalThis !== "undefined" && typeof globalThis.matchMedia === "function" && globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
978
|
-
|
|
623
|
+
React42.useEffect(() => {
|
|
979
624
|
if (prefersReducedMotion) {
|
|
980
625
|
api.state.currentIndex = text.length;
|
|
981
626
|
setCurrentIndex(text.length);
|
|
@@ -1136,24 +781,24 @@ function getAssignableRoles(user) {
|
|
|
1136
781
|
}
|
|
1137
782
|
|
|
1138
783
|
// ../react-auth/dist/index.js
|
|
1139
|
-
var AuthContext =
|
|
784
|
+
var AuthContext = React42.createContext(null);
|
|
1140
785
|
function AuthProvider({ children, ...config }) {
|
|
1141
|
-
const authRef =
|
|
786
|
+
const authRef = React42.useRef(null);
|
|
1142
787
|
if (!authRef.current) {
|
|
1143
788
|
if (!config.adapter && !config.testMode) {
|
|
1144
789
|
throw new Error("[refraction-ui/react-auth] You must provide an `adapter` to AuthProvider.");
|
|
1145
790
|
}
|
|
1146
791
|
authRef.current = createAuth(config.adapter, config);
|
|
1147
792
|
}
|
|
1148
|
-
const [state, setState] =
|
|
1149
|
-
|
|
793
|
+
const [state, setState] = React42.useState(() => authRef.current.getState());
|
|
794
|
+
React42.useEffect(() => {
|
|
1150
795
|
const unsub = authRef.current.subscribe(setState);
|
|
1151
796
|
return () => {
|
|
1152
797
|
unsub();
|
|
1153
798
|
authRef.current.destroy();
|
|
1154
799
|
};
|
|
1155
800
|
}, []);
|
|
1156
|
-
const value =
|
|
801
|
+
const value = React42.useMemo(
|
|
1157
802
|
() => ({
|
|
1158
803
|
user: state.user,
|
|
1159
804
|
isLoading: state.status === "loading",
|
|
@@ -1167,10 +812,10 @@ function AuthProvider({ children, ...config }) {
|
|
|
1167
812
|
}),
|
|
1168
813
|
[state.user, state.status]
|
|
1169
814
|
);
|
|
1170
|
-
return
|
|
815
|
+
return React42.createElement(AuthContext.Provider, { value }, children);
|
|
1171
816
|
}
|
|
1172
817
|
function useAuth() {
|
|
1173
|
-
const ctx =
|
|
818
|
+
const ctx = React42.useContext(AuthContext);
|
|
1174
819
|
if (!ctx) {
|
|
1175
820
|
throw new Error("useAuth must be used within an <AuthProvider>");
|
|
1176
821
|
}
|
|
@@ -1184,15 +829,15 @@ function AuthGuard({
|
|
|
1184
829
|
}) {
|
|
1185
830
|
const { isLoading, isAuthenticated, user } = useAuth();
|
|
1186
831
|
if (isLoading) {
|
|
1187
|
-
return
|
|
832
|
+
return React42.createElement(React42.Fragment, null, fallback ?? null);
|
|
1188
833
|
}
|
|
1189
834
|
if (!isAuthenticated) {
|
|
1190
|
-
return
|
|
835
|
+
return React42.createElement(React42.Fragment, null, fallback ?? null);
|
|
1191
836
|
}
|
|
1192
837
|
if (roles && roles.length > 0 && !hasAnyRole(user, roles)) {
|
|
1193
|
-
return
|
|
838
|
+
return React42.createElement(React42.Fragment, null, unauthorized ?? null);
|
|
1194
839
|
}
|
|
1195
|
-
return
|
|
840
|
+
return React42.createElement(React42.Fragment, null, children);
|
|
1196
841
|
}
|
|
1197
842
|
|
|
1198
843
|
// ../badge/dist/index.js
|
|
@@ -1232,7 +877,7 @@ var badgeVariants = cva({
|
|
|
1232
877
|
size: "md"
|
|
1233
878
|
}
|
|
1234
879
|
});
|
|
1235
|
-
var Badge =
|
|
880
|
+
var Badge = React42.forwardRef(
|
|
1236
881
|
({ variant, size, className, children, ...props }, ref) => {
|
|
1237
882
|
const api = createBadge({ variant});
|
|
1238
883
|
const classes = cn(badgeVariants({ variant, size }), className);
|
|
@@ -1279,7 +924,7 @@ var bottomNavTabVariants = cva({
|
|
|
1279
924
|
active: "false"
|
|
1280
925
|
}
|
|
1281
926
|
});
|
|
1282
|
-
var BottomNav =
|
|
927
|
+
var BottomNav = React42.forwardRef(
|
|
1283
928
|
({ tabs = [], currentPath, className, ...props }, ref) => {
|
|
1284
929
|
const api = createBottomNav({ currentPath });
|
|
1285
930
|
const classes = cn(bottomNavVariants(), className);
|
|
@@ -1352,7 +997,7 @@ var breadcrumbItemVariants = cva({
|
|
|
1352
997
|
}
|
|
1353
998
|
});
|
|
1354
999
|
var breadcrumbSeparatorStyles = "text-muted-foreground/50 select-none";
|
|
1355
|
-
var Breadcrumbs =
|
|
1000
|
+
var Breadcrumbs = React42.forwardRef(
|
|
1356
1001
|
({
|
|
1357
1002
|
pathname,
|
|
1358
1003
|
items,
|
|
@@ -1459,31 +1104,341 @@ var buttonVariants = cva({
|
|
|
1459
1104
|
size: "default"
|
|
1460
1105
|
}
|
|
1461
1106
|
});
|
|
1462
|
-
|
|
1463
|
-
|
|
1107
|
+
|
|
1108
|
+
// ../keyboard-shortcut/dist/index.js
|
|
1109
|
+
var MODIFIER_KEYS = /* @__PURE__ */ new Set(["Ctrl", "Control", "Alt", "Shift", "Meta", "Cmd", "Command"]);
|
|
1110
|
+
var KEY_DISPLAY = {
|
|
1111
|
+
"Ctrl": "Ctrl",
|
|
1112
|
+
"Control": "Ctrl",
|
|
1113
|
+
"Alt": "Alt",
|
|
1114
|
+
"Shift": "Shift",
|
|
1115
|
+
"Meta": "Meta",
|
|
1116
|
+
"Cmd": "Cmd",
|
|
1117
|
+
"Command": "Cmd",
|
|
1118
|
+
"Enter": "\u21B5",
|
|
1119
|
+
"Backspace": "\u232B",
|
|
1120
|
+
"Delete": "Del",
|
|
1121
|
+
"Escape": "Esc",
|
|
1122
|
+
"ArrowUp": "\u2191",
|
|
1123
|
+
"ArrowDown": "\u2193",
|
|
1124
|
+
"ArrowLeft": "\u2190",
|
|
1125
|
+
"ArrowRight": "\u2192",
|
|
1126
|
+
"Tab": "Tab",
|
|
1127
|
+
" ": "Space"
|
|
1128
|
+
};
|
|
1129
|
+
var MAC_KEY_DISPLAY = {
|
|
1130
|
+
"Ctrl": "\u2303",
|
|
1131
|
+
"Control": "\u2303",
|
|
1132
|
+
"Alt": "\u2325",
|
|
1133
|
+
"Shift": "\u21E7",
|
|
1134
|
+
"Meta": "\u2318",
|
|
1135
|
+
"Cmd": "\u2318",
|
|
1136
|
+
"Command": "\u2318",
|
|
1137
|
+
"Enter": "\u21B5",
|
|
1138
|
+
"Backspace": "\u232B",
|
|
1139
|
+
"Delete": "\u2326",
|
|
1140
|
+
"Escape": "\u238B",
|
|
1141
|
+
"ArrowUp": "\u2191",
|
|
1142
|
+
"ArrowDown": "\u2193",
|
|
1143
|
+
"ArrowLeft": "\u2190",
|
|
1144
|
+
"ArrowRight": "\u2192",
|
|
1145
|
+
"Tab": "\u21E5",
|
|
1146
|
+
" ": "\u2423"
|
|
1147
|
+
};
|
|
1148
|
+
function normalizeKey(key) {
|
|
1149
|
+
if (key === "Command" || key === "Cmd") return "Meta";
|
|
1150
|
+
if (key === "Control") return "Ctrl";
|
|
1151
|
+
return key;
|
|
1152
|
+
}
|
|
1153
|
+
function isMac() {
|
|
1154
|
+
if (typeof navigator !== "undefined") {
|
|
1155
|
+
return navigator.platform?.includes("Mac") || navigator.userAgent?.includes("Mac");
|
|
1156
|
+
}
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
function formatShortcut(keys, mac) {
|
|
1160
|
+
const displayMap = mac ? MAC_KEY_DISPLAY : KEY_DISPLAY;
|
|
1161
|
+
return keys.map((key) => displayMap[key] ?? key.toUpperCase()).join(mac ? "" : "+");
|
|
1162
|
+
}
|
|
1163
|
+
function createKeyboardShortcut(props) {
|
|
1164
|
+
const {
|
|
1165
|
+
keys,
|
|
1166
|
+
onTrigger,
|
|
1167
|
+
enabled: enabledProp = true,
|
|
1168
|
+
preventDefault: preventDefaultProp = true
|
|
1169
|
+
} = props;
|
|
1170
|
+
const normalizedKeys = keys.map(normalizeKey);
|
|
1171
|
+
const modifiers = normalizedKeys.filter((k) => MODIFIER_KEYS.has(k));
|
|
1172
|
+
const regularKeys = normalizedKeys.filter((k) => !MODIFIER_KEYS.has(k));
|
|
1173
|
+
function handler(event) {
|
|
1174
|
+
if (!enabledProp) return false;
|
|
1175
|
+
const ctrlRequired = modifiers.includes("Ctrl");
|
|
1176
|
+
const altRequired = modifiers.includes("Alt");
|
|
1177
|
+
const shiftRequired = modifiers.includes("Shift");
|
|
1178
|
+
const metaRequired = modifiers.includes("Meta");
|
|
1179
|
+
if (ctrlRequired !== (event.ctrlKey || event.metaKey && !metaRequired)) ;
|
|
1180
|
+
const ctrlMatch = ctrlRequired ? event.ctrlKey : !event.ctrlKey;
|
|
1181
|
+
const altMatch = altRequired ? event.altKey : !event.altKey;
|
|
1182
|
+
const shiftMatch = shiftRequired ? event.shiftKey : !event.shiftKey;
|
|
1183
|
+
const metaMatch = metaRequired ? event.metaKey : !event.metaKey;
|
|
1184
|
+
if (!ctrlMatch || !altMatch || !shiftMatch || !metaMatch) return false;
|
|
1185
|
+
if (regularKeys.length > 0) {
|
|
1186
|
+
const eventKey = event.key.length === 1 ? event.key.toUpperCase() : event.key;
|
|
1187
|
+
const targetKey = regularKeys[0].length === 1 ? regularKeys[0].toUpperCase() : regularKeys[0];
|
|
1188
|
+
if (eventKey !== targetKey) return false;
|
|
1189
|
+
}
|
|
1190
|
+
if (preventDefaultProp) {
|
|
1191
|
+
event.preventDefault();
|
|
1192
|
+
}
|
|
1193
|
+
onTrigger();
|
|
1194
|
+
return true;
|
|
1195
|
+
}
|
|
1196
|
+
const mac = isMac();
|
|
1197
|
+
const display = formatShortcut(keys, false);
|
|
1198
|
+
const platformDisplay = formatShortcut(keys, mac);
|
|
1199
|
+
const badgeAriaProps = {
|
|
1200
|
+
"aria-hidden": true,
|
|
1201
|
+
role: "presentation"
|
|
1202
|
+
};
|
|
1203
|
+
return {
|
|
1204
|
+
handler,
|
|
1205
|
+
display,
|
|
1206
|
+
platformDisplay,
|
|
1207
|
+
enabled: enabledProp,
|
|
1208
|
+
keys,
|
|
1209
|
+
badgeAriaProps
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
var SANE_DEFAULTS = {
|
|
1213
|
+
save: ["Meta", "s"],
|
|
1214
|
+
search: ["Meta", "k"],
|
|
1215
|
+
close: ["Escape"],
|
|
1216
|
+
submit: ["Meta", "Enter"],
|
|
1217
|
+
undo: ["Meta", "z"],
|
|
1218
|
+
redo: ["Meta", "Shift", "z"],
|
|
1219
|
+
copy: ["Meta", "c"],
|
|
1220
|
+
paste: ["Meta", "v"],
|
|
1221
|
+
cut: ["Meta", "x"],
|
|
1222
|
+
new: ["Meta", "n"],
|
|
1223
|
+
print: ["Meta", "p"],
|
|
1224
|
+
help: ["?"]
|
|
1225
|
+
};
|
|
1226
|
+
var ShortcutRegistry = class {
|
|
1227
|
+
shortcuts = /* @__PURE__ */ new Map();
|
|
1228
|
+
register(keys, handler) {
|
|
1229
|
+
const keyStr = keys.map((k) => k.toLowerCase()).sort().join("+");
|
|
1230
|
+
if (this.shortcuts.has(keyStr)) {
|
|
1231
|
+
console.warn(`Shortcut ${keyStr} is already registered.`);
|
|
1232
|
+
}
|
|
1233
|
+
this.shortcuts.set(keyStr, handler);
|
|
1234
|
+
}
|
|
1235
|
+
unregister(keys) {
|
|
1236
|
+
const keyStr = keys.map((k) => k.toLowerCase()).sort().join("+");
|
|
1237
|
+
this.shortcuts.delete(keyStr);
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
var globalShortcutRegistry = new ShortcutRegistry();
|
|
1241
|
+
var AltHintState = class {
|
|
1242
|
+
showHints = false;
|
|
1243
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1244
|
+
initialized = false;
|
|
1245
|
+
init() {
|
|
1246
|
+
if (this.initialized || typeof window === "undefined") return;
|
|
1247
|
+
this.initialized = true;
|
|
1248
|
+
const handleKeyDown = (e) => {
|
|
1249
|
+
if (e.key === "Alt") {
|
|
1250
|
+
this.setShowHints(true);
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
const handleKeyUp = (e) => {
|
|
1254
|
+
if (e.key === "Alt") {
|
|
1255
|
+
this.setShowHints(false);
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
const handleBlur = () => {
|
|
1259
|
+
this.setShowHints(false);
|
|
1260
|
+
};
|
|
1261
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1262
|
+
window.addEventListener("keyup", handleKeyUp);
|
|
1263
|
+
window.addEventListener("blur", handleBlur);
|
|
1264
|
+
}
|
|
1265
|
+
setShowHints(value) {
|
|
1266
|
+
if (this.showHints !== value) {
|
|
1267
|
+
this.showHints = value;
|
|
1268
|
+
this.listeners.forEach((listener) => listener(value));
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
subscribe(listener) {
|
|
1272
|
+
this.listeners.add(listener);
|
|
1273
|
+
listener(this.showHints);
|
|
1274
|
+
return () => {
|
|
1275
|
+
this.listeners.delete(listener);
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
get snapshot() {
|
|
1279
|
+
return this.showHints;
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
var altHintState = new AltHintState();
|
|
1283
|
+
var shortcutBadgeStyles = "inline-flex items-center gap-0.5 rounded border bg-muted px-1.5 py-0.5 text-xs font-mono text-muted-foreground";
|
|
1284
|
+
var shortcutKeyStyles = "inline-flex items-center justify-center min-w-[1.25rem] rounded bg-background px-1 py-0.5 text-xs font-mono border shadow-sm";
|
|
1285
|
+
var shortcutSeparatorStyles = "text-muted-foreground text-xs";
|
|
1286
|
+
var ShortcutContext = React42.createContext(false);
|
|
1287
|
+
function ShortcutProvider({ children }) {
|
|
1288
|
+
const [showHints, setShowHints] = React42.useState(altHintState.snapshot);
|
|
1289
|
+
React42.useEffect(() => {
|
|
1290
|
+
altHintState.init();
|
|
1291
|
+
return altHintState.subscribe(setShowHints);
|
|
1292
|
+
}, []);
|
|
1293
|
+
return /* @__PURE__ */ jsx(ShortcutContext.Provider, { value: showHints, children });
|
|
1294
|
+
}
|
|
1295
|
+
function useShortcut({
|
|
1296
|
+
shortcut,
|
|
1297
|
+
action,
|
|
1298
|
+
onTrigger,
|
|
1299
|
+
enabled = true,
|
|
1300
|
+
preventDefault = true
|
|
1301
|
+
}) {
|
|
1302
|
+
const showHints = React42.useContext(ShortcutContext);
|
|
1303
|
+
const keys = React42.useMemo(() => {
|
|
1304
|
+
if (shortcut) {
|
|
1305
|
+
return shortcut.split("+").map((s) => s.trim());
|
|
1306
|
+
}
|
|
1307
|
+
if (action && SANE_DEFAULTS[action]) {
|
|
1308
|
+
return SANE_DEFAULTS[action];
|
|
1309
|
+
}
|
|
1310
|
+
return [];
|
|
1311
|
+
}, [shortcut, action]);
|
|
1312
|
+
const apiRef = React42.useRef(
|
|
1313
|
+
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
1314
|
+
);
|
|
1315
|
+
React42.useEffect(() => {
|
|
1316
|
+
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
1317
|
+
}, [keys, onTrigger, enabled, preventDefault]);
|
|
1318
|
+
React42.useEffect(() => {
|
|
1319
|
+
if (!enabled || keys.length === 0) return;
|
|
1320
|
+
const handler = () => {
|
|
1321
|
+
apiRef.current.handler(new KeyboardEvent("keydown"));
|
|
1322
|
+
};
|
|
1323
|
+
globalShortcutRegistry.register(keys, handler);
|
|
1324
|
+
const handleKeyDown = (e) => {
|
|
1325
|
+
apiRef.current.handler(e);
|
|
1326
|
+
};
|
|
1327
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1328
|
+
return () => {
|
|
1329
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1330
|
+
globalShortcutRegistry.unregister(keys);
|
|
1331
|
+
};
|
|
1332
|
+
}, [enabled, keys]);
|
|
1333
|
+
return { keys, showHints };
|
|
1334
|
+
}
|
|
1335
|
+
function ShortcutHint({ shortcut, action, className, platform = true, ...props }) {
|
|
1336
|
+
const showHints = React42.useContext(ShortcutContext);
|
|
1337
|
+
const keys = React42.useMemo(() => {
|
|
1338
|
+
if (shortcut) {
|
|
1339
|
+
return shortcut.split("+").map((s) => s.trim());
|
|
1340
|
+
}
|
|
1341
|
+
if (action && SANE_DEFAULTS[action]) {
|
|
1342
|
+
return SANE_DEFAULTS[action];
|
|
1343
|
+
}
|
|
1344
|
+
return [];
|
|
1345
|
+
}, [shortcut, action]);
|
|
1346
|
+
if (!showHints || keys.length === 0) return null;
|
|
1347
|
+
return /* @__PURE__ */ jsx("div", { className: cn("absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none z-10", className), children: /* @__PURE__ */ jsx(ShortcutBadge, { keys, platform, ...props }) });
|
|
1348
|
+
}
|
|
1349
|
+
function KeyboardShortcut({
|
|
1350
|
+
keys,
|
|
1351
|
+
onTrigger,
|
|
1352
|
+
enabled = true,
|
|
1353
|
+
preventDefault = true
|
|
1354
|
+
}) {
|
|
1355
|
+
const apiRef = React42.useRef(
|
|
1356
|
+
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
1357
|
+
);
|
|
1358
|
+
React42.useEffect(() => {
|
|
1359
|
+
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
1360
|
+
}, [keys, onTrigger, enabled, preventDefault]);
|
|
1361
|
+
React42.useEffect(() => {
|
|
1362
|
+
if (!enabled) return;
|
|
1363
|
+
const handleKeyDown = (e) => {
|
|
1364
|
+
apiRef.current.handler(e);
|
|
1365
|
+
};
|
|
1366
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1367
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
1368
|
+
}, [enabled]);
|
|
1369
|
+
return null;
|
|
1370
|
+
}
|
|
1371
|
+
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
1372
|
+
function ShortcutBadge({ keys, platform = true, className }) {
|
|
1373
|
+
const api = createKeyboardShortcut({ keys, onTrigger: () => {
|
|
1374
|
+
}, enabled: false });
|
|
1375
|
+
const displayKeys = platform ? api.platformDisplay : api.display;
|
|
1376
|
+
const isMacDisplay = platform && displayKeys !== api.display;
|
|
1377
|
+
return React42.createElement(
|
|
1378
|
+
"kbd",
|
|
1379
|
+
{ ...api.badgeAriaProps, className: cn(shortcutBadgeStyles, className) },
|
|
1380
|
+
isMacDisplay ? React42.createElement("span", null, displayKeys) : keys.map(
|
|
1381
|
+
(key, i) => React42.createElement(
|
|
1382
|
+
React42.Fragment,
|
|
1383
|
+
{ key: i },
|
|
1384
|
+
i > 0 && React42.createElement("span", { className: shortcutSeparatorStyles }, "+"),
|
|
1385
|
+
React42.createElement(
|
|
1386
|
+
"span",
|
|
1387
|
+
{ className: shortcutKeyStyles },
|
|
1388
|
+
formatShortcut([key], false)
|
|
1389
|
+
)
|
|
1390
|
+
)
|
|
1391
|
+
)
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
ShortcutBadge.displayName = "ShortcutBadge";
|
|
1395
|
+
var Button = React42.forwardRef(
|
|
1396
|
+
({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) => {
|
|
1464
1397
|
const api = createButton({ disabled, loading, type: props.type });
|
|
1465
1398
|
const classes = cn(buttonVariants({ variant, size }), className);
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1399
|
+
const internalRef = React42.useRef(null);
|
|
1400
|
+
const mergedRef = React42.useCallback(
|
|
1401
|
+
(node) => {
|
|
1402
|
+
internalRef.current = node;
|
|
1403
|
+
if (typeof ref === "function") ref(node);
|
|
1404
|
+
else if (ref) ref.current = node;
|
|
1405
|
+
},
|
|
1406
|
+
[ref]
|
|
1407
|
+
);
|
|
1408
|
+
useShortcut({
|
|
1409
|
+
shortcut,
|
|
1410
|
+
action,
|
|
1411
|
+
enabled: !disabled && !loading && (!!shortcut || !!action),
|
|
1412
|
+
onTrigger: () => {
|
|
1413
|
+
internalRef.current?.click();
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
if (asChild && React42.isValidElement(children)) {
|
|
1417
|
+
return React42.cloneElement(children, {
|
|
1418
|
+
ref: mergedRef,
|
|
1419
|
+
className: cn(classes, children.props.className, "relative"),
|
|
1470
1420
|
type: getButtonType({ type: props.type }),
|
|
1471
1421
|
...api.ariaProps,
|
|
1472
1422
|
...api.dataAttributes,
|
|
1473
|
-
...props
|
|
1423
|
+
...props,
|
|
1424
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1425
|
+
(shortcut || action) && /* @__PURE__ */ jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
1426
|
+
children.props.children
|
|
1427
|
+
] })
|
|
1474
1428
|
});
|
|
1475
1429
|
}
|
|
1476
1430
|
return /* @__PURE__ */ jsxs(
|
|
1477
1431
|
"button",
|
|
1478
1432
|
{
|
|
1479
|
-
ref,
|
|
1433
|
+
ref: mergedRef,
|
|
1480
1434
|
type: getButtonType({ type: props.type }),
|
|
1481
|
-
className: classes,
|
|
1435
|
+
className: cn(classes, "relative"),
|
|
1482
1436
|
disabled: disabled || loading,
|
|
1483
1437
|
...api.ariaProps,
|
|
1484
1438
|
...api.dataAttributes,
|
|
1485
1439
|
...props,
|
|
1486
1440
|
children: [
|
|
1441
|
+
(shortcut || action) && /* @__PURE__ */ jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
1487
1442
|
loading && /* @__PURE__ */ jsxs(
|
|
1488
1443
|
"svg",
|
|
1489
1444
|
{
|
|
@@ -1671,15 +1626,15 @@ function Calendar({
|
|
|
1671
1626
|
maxDate,
|
|
1672
1627
|
disabledDates
|
|
1673
1628
|
}) {
|
|
1674
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
1675
|
-
const [uncontrolledMonth, setUncontrolledMonth] =
|
|
1629
|
+
const [uncontrolledValue, setUncontrolledValue] = React42.useState(defaultValue);
|
|
1630
|
+
const [uncontrolledMonth, setUncontrolledMonth] = React42.useState(
|
|
1676
1631
|
() => month ?? value ?? defaultValue ?? /* @__PURE__ */ new Date()
|
|
1677
1632
|
);
|
|
1678
1633
|
const isValueControlled = value !== void 0;
|
|
1679
1634
|
const isMonthControlled = month !== void 0;
|
|
1680
1635
|
const selectedValue = isValueControlled ? value : uncontrolledValue;
|
|
1681
1636
|
const displayMonth = isMonthControlled ? month : uncontrolledMonth;
|
|
1682
|
-
const handleSelect =
|
|
1637
|
+
const handleSelect = React42.useCallback(
|
|
1683
1638
|
(date) => {
|
|
1684
1639
|
if (!isValueControlled) {
|
|
1685
1640
|
setUncontrolledValue(date);
|
|
@@ -1688,7 +1643,7 @@ function Calendar({
|
|
|
1688
1643
|
},
|
|
1689
1644
|
[isValueControlled, onSelect]
|
|
1690
1645
|
);
|
|
1691
|
-
const handleMonthChange =
|
|
1646
|
+
const handleMonthChange = React42.useCallback(
|
|
1692
1647
|
(m) => {
|
|
1693
1648
|
if (!isMonthControlled) {
|
|
1694
1649
|
setUncontrolledMonth(m);
|
|
@@ -1714,28 +1669,28 @@ function Calendar({
|
|
|
1714
1669
|
return "default";
|
|
1715
1670
|
}
|
|
1716
1671
|
const monthLabel = `${MONTH_NAMES[api.state.currentMonth.getMonth()]} ${api.state.currentMonth.getFullYear()}`;
|
|
1717
|
-
return
|
|
1672
|
+
return React42.createElement(
|
|
1718
1673
|
"div",
|
|
1719
1674
|
{
|
|
1720
1675
|
className: cn(calendarVariants(), className),
|
|
1721
1676
|
...api.ariaProps
|
|
1722
1677
|
},
|
|
1723
1678
|
// Header row: prev, month label, next
|
|
1724
|
-
|
|
1679
|
+
React42.createElement(CalendarHeader, {
|
|
1725
1680
|
label: monthLabel,
|
|
1726
1681
|
labelId: api.ids.label,
|
|
1727
1682
|
onPrevMonth: api.prevMonth,
|
|
1728
1683
|
onNextMonth: api.nextMonth
|
|
1729
1684
|
}),
|
|
1730
1685
|
// Day-of-week headers
|
|
1731
|
-
|
|
1686
|
+
React42.createElement(
|
|
1732
1687
|
"div",
|
|
1733
1688
|
{
|
|
1734
1689
|
className: "grid grid-cols-7 gap-1 mb-1",
|
|
1735
1690
|
role: "row"
|
|
1736
1691
|
},
|
|
1737
1692
|
DAY_HEADERS.map(
|
|
1738
|
-
(d) =>
|
|
1693
|
+
(d) => React42.createElement(
|
|
1739
1694
|
"div",
|
|
1740
1695
|
{
|
|
1741
1696
|
key: d,
|
|
@@ -1748,7 +1703,7 @@ function Calendar({
|
|
|
1748
1703
|
)
|
|
1749
1704
|
),
|
|
1750
1705
|
// Day grid
|
|
1751
|
-
|
|
1706
|
+
React42.createElement(
|
|
1752
1707
|
"div",
|
|
1753
1708
|
{
|
|
1754
1709
|
className: "grid grid-cols-7 gap-1",
|
|
@@ -1757,7 +1712,7 @@ function Calendar({
|
|
|
1757
1712
|
api.days.map((day, i) => {
|
|
1758
1713
|
const dayAriaProps = api.getDayAriaProps(day);
|
|
1759
1714
|
const state = getDayState(day);
|
|
1760
|
-
return
|
|
1715
|
+
return React42.createElement(
|
|
1761
1716
|
"button",
|
|
1762
1717
|
{
|
|
1763
1718
|
key: i,
|
|
@@ -1781,12 +1736,12 @@ function CalendarHeader({
|
|
|
1781
1736
|
onNextMonth,
|
|
1782
1737
|
className
|
|
1783
1738
|
}) {
|
|
1784
|
-
return
|
|
1739
|
+
return React42.createElement(
|
|
1785
1740
|
"div",
|
|
1786
1741
|
{
|
|
1787
1742
|
className: cn("flex items-center justify-between mb-2", className)
|
|
1788
1743
|
},
|
|
1789
|
-
|
|
1744
|
+
React42.createElement(
|
|
1790
1745
|
"button",
|
|
1791
1746
|
{
|
|
1792
1747
|
type: "button",
|
|
@@ -1796,7 +1751,7 @@ function CalendarHeader({
|
|
|
1796
1751
|
},
|
|
1797
1752
|
"\u2039"
|
|
1798
1753
|
),
|
|
1799
|
-
|
|
1754
|
+
React42.createElement(
|
|
1800
1755
|
"div",
|
|
1801
1756
|
{
|
|
1802
1757
|
id: labelId,
|
|
@@ -1805,7 +1760,7 @@ function CalendarHeader({
|
|
|
1805
1760
|
},
|
|
1806
1761
|
label
|
|
1807
1762
|
),
|
|
1808
|
-
|
|
1763
|
+
React42.createElement(
|
|
1809
1764
|
"button",
|
|
1810
1765
|
{
|
|
1811
1766
|
type: "button",
|
|
@@ -1938,7 +1893,7 @@ var codeEditorVariants = cva({
|
|
|
1938
1893
|
size: "default"
|
|
1939
1894
|
}
|
|
1940
1895
|
});
|
|
1941
|
-
var CodeEditor =
|
|
1896
|
+
var CodeEditor = React42.forwardRef(
|
|
1942
1897
|
({
|
|
1943
1898
|
value = "",
|
|
1944
1899
|
onChange,
|
|
@@ -2054,9 +2009,9 @@ var collapsibleContentVariants = cva({
|
|
|
2054
2009
|
});
|
|
2055
2010
|
|
|
2056
2011
|
// ../react-collapsible/dist/index.js
|
|
2057
|
-
var CollapsibleContext =
|
|
2012
|
+
var CollapsibleContext = React42.createContext(null);
|
|
2058
2013
|
function useCollapsibleContext() {
|
|
2059
|
-
const ctx =
|
|
2014
|
+
const ctx = React42.useContext(CollapsibleContext);
|
|
2060
2015
|
if (!ctx) {
|
|
2061
2016
|
throw new Error(
|
|
2062
2017
|
"Collapsible compound components must be used within <Collapsible>"
|
|
@@ -2072,10 +2027,10 @@ function Collapsible({
|
|
|
2072
2027
|
children,
|
|
2073
2028
|
className
|
|
2074
2029
|
}) {
|
|
2075
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2030
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42.useState(defaultOpen);
|
|
2076
2031
|
const isControlled = controlledOpen !== void 0;
|
|
2077
2032
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2078
|
-
const handleOpenChange =
|
|
2033
|
+
const handleOpenChange = React42.useCallback(
|
|
2079
2034
|
(next) => {
|
|
2080
2035
|
if (!isControlled) {
|
|
2081
2036
|
setUncontrolledOpen(next);
|
|
@@ -2084,12 +2039,12 @@ function Collapsible({
|
|
|
2084
2039
|
},
|
|
2085
2040
|
[isControlled, onOpenChange]
|
|
2086
2041
|
);
|
|
2087
|
-
const apiRef =
|
|
2042
|
+
const apiRef = React42.useRef(null);
|
|
2088
2043
|
if (apiRef.current === null) {
|
|
2089
2044
|
apiRef.current = createCollapsible({ open, defaultOpen, disabled });
|
|
2090
2045
|
}
|
|
2091
2046
|
const contentId = apiRef.current.contentProps.id;
|
|
2092
|
-
const ctx =
|
|
2047
|
+
const ctx = React42.useMemo(
|
|
2093
2048
|
() => ({
|
|
2094
2049
|
open,
|
|
2095
2050
|
onOpenChange: handleOpenChange,
|
|
@@ -2098,10 +2053,10 @@ function Collapsible({
|
|
|
2098
2053
|
}),
|
|
2099
2054
|
[open, handleOpenChange, disabled, contentId]
|
|
2100
2055
|
);
|
|
2101
|
-
return
|
|
2056
|
+
return React42.createElement(
|
|
2102
2057
|
CollapsibleContext.Provider,
|
|
2103
2058
|
{ value: ctx },
|
|
2104
|
-
|
|
2059
|
+
React42.createElement(
|
|
2105
2060
|
"div",
|
|
2106
2061
|
{
|
|
2107
2062
|
"data-state": open ? "open" : "closed",
|
|
@@ -2113,7 +2068,7 @@ function Collapsible({
|
|
|
2113
2068
|
);
|
|
2114
2069
|
}
|
|
2115
2070
|
Collapsible.displayName = "Collapsible";
|
|
2116
|
-
var CollapsibleTrigger =
|
|
2071
|
+
var CollapsibleTrigger = React42.forwardRef(({ onClick, disabled: disabledProp, children, ...props }, ref) => {
|
|
2117
2072
|
const { open, onOpenChange, disabled: ctxDisabled, contentId } = useCollapsibleContext();
|
|
2118
2073
|
const disabled = disabledProp ?? ctxDisabled;
|
|
2119
2074
|
const handleClick = (e) => {
|
|
@@ -2122,7 +2077,7 @@ var CollapsibleTrigger = React41.forwardRef(({ onClick, disabled: disabledProp,
|
|
|
2122
2077
|
}
|
|
2123
2078
|
onClick?.(e);
|
|
2124
2079
|
};
|
|
2125
|
-
return
|
|
2080
|
+
return React42.createElement(
|
|
2126
2081
|
"button",
|
|
2127
2082
|
{
|
|
2128
2083
|
ref,
|
|
@@ -2139,11 +2094,11 @@ var CollapsibleTrigger = React41.forwardRef(({ onClick, disabled: disabledProp,
|
|
|
2139
2094
|
);
|
|
2140
2095
|
});
|
|
2141
2096
|
CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
2142
|
-
var CollapsibleContent =
|
|
2097
|
+
var CollapsibleContent = React42.forwardRef(({ className, children, ...props }, ref) => {
|
|
2143
2098
|
const { open, contentId } = useCollapsibleContext();
|
|
2144
2099
|
const dataState = open ? "open" : "closed";
|
|
2145
2100
|
if (!open) return null;
|
|
2146
|
-
return
|
|
2101
|
+
return React42.createElement(
|
|
2147
2102
|
"div",
|
|
2148
2103
|
{
|
|
2149
2104
|
ref,
|
|
@@ -2288,9 +2243,9 @@ var commandGroupVariants = cva({
|
|
|
2288
2243
|
});
|
|
2289
2244
|
|
|
2290
2245
|
// ../react-command/dist/index.js
|
|
2291
|
-
var CommandContext =
|
|
2246
|
+
var CommandContext = React42.createContext(null);
|
|
2292
2247
|
function useCommandContext() {
|
|
2293
|
-
const ctx =
|
|
2248
|
+
const ctx = React42.useContext(CommandContext);
|
|
2294
2249
|
if (!ctx) {
|
|
2295
2250
|
throw new Error("Command compound components must be used within <Command>");
|
|
2296
2251
|
}
|
|
@@ -2303,11 +2258,11 @@ function Command({
|
|
|
2303
2258
|
className,
|
|
2304
2259
|
children
|
|
2305
2260
|
}) {
|
|
2306
|
-
const [items, setItems] =
|
|
2307
|
-
const [search, setSearch] =
|
|
2308
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2309
|
-
const apiRef =
|
|
2310
|
-
const api =
|
|
2261
|
+
const [items, setItems] = React42.useState([]);
|
|
2262
|
+
const [search, setSearch] = React42.useState("");
|
|
2263
|
+
const [selectedIndex, setSelectedIndex] = React42.useState(0);
|
|
2264
|
+
const apiRef = React42.useRef(null);
|
|
2265
|
+
const api = React42.useMemo(() => {
|
|
2311
2266
|
const instance = createCommand({ open, onOpenChange, filter }, items);
|
|
2312
2267
|
if (search) {
|
|
2313
2268
|
instance.search(search);
|
|
@@ -2316,23 +2271,23 @@ function Command({
|
|
|
2316
2271
|
return instance;
|
|
2317
2272
|
}, [open, onOpenChange, filter, items, search]);
|
|
2318
2273
|
const filteredItems = api.state.filteredItems;
|
|
2319
|
-
const handleSearch =
|
|
2274
|
+
const handleSearch = React42.useCallback((query) => {
|
|
2320
2275
|
setSearch(query);
|
|
2321
2276
|
setSelectedIndex(0);
|
|
2322
2277
|
}, []);
|
|
2323
|
-
const handleSelect =
|
|
2278
|
+
const handleSelect = React42.useCallback((index) => {
|
|
2324
2279
|
setSelectedIndex(index);
|
|
2325
2280
|
}, []);
|
|
2326
|
-
const registerItem =
|
|
2281
|
+
const registerItem = React42.useCallback((item) => {
|
|
2327
2282
|
setItems((prev) => {
|
|
2328
2283
|
if (prev.some((i) => i.id === item.id)) return prev;
|
|
2329
2284
|
return [...prev, item];
|
|
2330
2285
|
});
|
|
2331
2286
|
}, []);
|
|
2332
|
-
const unregisterItem =
|
|
2287
|
+
const unregisterItem = React42.useCallback((id) => {
|
|
2333
2288
|
setItems((prev) => prev.filter((i) => i.id !== id));
|
|
2334
2289
|
}, []);
|
|
2335
|
-
const handleKeyDown =
|
|
2290
|
+
const handleKeyDown = React42.useCallback(
|
|
2336
2291
|
(e) => {
|
|
2337
2292
|
const handler = createKeyboardHandler({
|
|
2338
2293
|
[Keys.ArrowDown]: (ev) => {
|
|
@@ -2359,7 +2314,7 @@ function Command({
|
|
|
2359
2314
|
},
|
|
2360
2315
|
[filteredItems.length, onOpenChange]
|
|
2361
2316
|
);
|
|
2362
|
-
const ctx =
|
|
2317
|
+
const ctx = React42.useMemo(
|
|
2363
2318
|
() => ({
|
|
2364
2319
|
search,
|
|
2365
2320
|
onSearch: handleSearch,
|
|
@@ -2374,10 +2329,10 @@ function Command({
|
|
|
2374
2329
|
}),
|
|
2375
2330
|
[search, handleSearch, selectedIndex, handleSelect, items, filteredItems, registerItem, unregisterItem, api.ids.list, api.ids.input]
|
|
2376
2331
|
);
|
|
2377
|
-
return
|
|
2332
|
+
return React42.createElement(
|
|
2378
2333
|
CommandContext.Provider,
|
|
2379
2334
|
{ value: ctx },
|
|
2380
|
-
|
|
2335
|
+
React42.createElement(
|
|
2381
2336
|
"div",
|
|
2382
2337
|
{
|
|
2383
2338
|
className: cn(commandVariants(), className),
|
|
@@ -2389,14 +2344,14 @@ function Command({
|
|
|
2389
2344
|
);
|
|
2390
2345
|
}
|
|
2391
2346
|
Command.displayName = "Command";
|
|
2392
|
-
var CommandInput =
|
|
2347
|
+
var CommandInput = React42.forwardRef(
|
|
2393
2348
|
({ className, onChange, ...props }, ref) => {
|
|
2394
2349
|
const { search, onSearch, inputId, listId } = useCommandContext();
|
|
2395
2350
|
const handleChange = (e) => {
|
|
2396
2351
|
onSearch(e.target.value);
|
|
2397
2352
|
onChange?.(e);
|
|
2398
2353
|
};
|
|
2399
|
-
return
|
|
2354
|
+
return React42.createElement("input", {
|
|
2400
2355
|
ref,
|
|
2401
2356
|
id: inputId,
|
|
2402
2357
|
type: "text",
|
|
@@ -2411,10 +2366,10 @@ var CommandInput = React41.forwardRef(
|
|
|
2411
2366
|
}
|
|
2412
2367
|
);
|
|
2413
2368
|
CommandInput.displayName = "CommandInput";
|
|
2414
|
-
var CommandList =
|
|
2369
|
+
var CommandList = React42.forwardRef(
|
|
2415
2370
|
({ className, children, ...props }, ref) => {
|
|
2416
2371
|
const { listId } = useCommandContext();
|
|
2417
|
-
return
|
|
2372
|
+
return React42.createElement(
|
|
2418
2373
|
"div",
|
|
2419
2374
|
{
|
|
2420
2375
|
ref,
|
|
@@ -2429,11 +2384,11 @@ var CommandList = React41.forwardRef(
|
|
|
2429
2384
|
}
|
|
2430
2385
|
);
|
|
2431
2386
|
CommandList.displayName = "CommandList";
|
|
2432
|
-
var CommandEmpty =
|
|
2387
|
+
var CommandEmpty = React42.forwardRef(
|
|
2433
2388
|
({ className, children, ...props }, ref) => {
|
|
2434
2389
|
const { filteredItems } = useCommandContext();
|
|
2435
2390
|
if (filteredItems.length > 0) return null;
|
|
2436
|
-
return
|
|
2391
|
+
return React42.createElement(
|
|
2437
2392
|
"div",
|
|
2438
2393
|
{
|
|
2439
2394
|
ref,
|
|
@@ -2446,9 +2401,9 @@ var CommandEmpty = React41.forwardRef(
|
|
|
2446
2401
|
}
|
|
2447
2402
|
);
|
|
2448
2403
|
CommandEmpty.displayName = "CommandEmpty";
|
|
2449
|
-
var CommandGroup =
|
|
2404
|
+
var CommandGroup = React42.forwardRef(
|
|
2450
2405
|
({ className, heading, children, ...props }, ref) => {
|
|
2451
|
-
return
|
|
2406
|
+
return React42.createElement(
|
|
2452
2407
|
"div",
|
|
2453
2408
|
{
|
|
2454
2409
|
ref,
|
|
@@ -2457,7 +2412,7 @@ var CommandGroup = React41.forwardRef(
|
|
|
2457
2412
|
"aria-label": heading,
|
|
2458
2413
|
...props
|
|
2459
2414
|
},
|
|
2460
|
-
heading ?
|
|
2415
|
+
heading ? React42.createElement(
|
|
2461
2416
|
"div",
|
|
2462
2417
|
{ className: "px-2 py-1.5 text-xs font-medium text-muted-foreground" },
|
|
2463
2418
|
heading
|
|
@@ -2467,10 +2422,10 @@ var CommandGroup = React41.forwardRef(
|
|
|
2467
2422
|
}
|
|
2468
2423
|
);
|
|
2469
2424
|
CommandGroup.displayName = "CommandGroup";
|
|
2470
|
-
var CommandItem =
|
|
2425
|
+
var CommandItem = React42.forwardRef(
|
|
2471
2426
|
({ className, value, disabled, onSelect: onItemSelect, children, ...props }, ref) => {
|
|
2472
2427
|
const state = disabled ? "disabled" : "default";
|
|
2473
|
-
return
|
|
2428
|
+
return React42.createElement(
|
|
2474
2429
|
"div",
|
|
2475
2430
|
{
|
|
2476
2431
|
ref,
|
|
@@ -2491,9 +2446,9 @@ var CommandItem = React41.forwardRef(
|
|
|
2491
2446
|
}
|
|
2492
2447
|
);
|
|
2493
2448
|
CommandItem.displayName = "CommandItem";
|
|
2494
|
-
var CommandSeparator =
|
|
2449
|
+
var CommandSeparator = React42.forwardRef(
|
|
2495
2450
|
({ className, ...props }, ref) => {
|
|
2496
|
-
return
|
|
2451
|
+
return React42.createElement("div", {
|
|
2497
2452
|
ref,
|
|
2498
2453
|
role: "separator",
|
|
2499
2454
|
className: cn("-mx-1 h-px bg-border", className),
|
|
@@ -2540,7 +2495,7 @@ var contentProtectionVariants = cva({
|
|
|
2540
2495
|
var watermarkVariants = cva({
|
|
2541
2496
|
base: "pointer-events-none absolute inset-0 z-50 overflow-hidden"
|
|
2542
2497
|
});
|
|
2543
|
-
var ContentProtection =
|
|
2498
|
+
var ContentProtection = React42.forwardRef(
|
|
2544
2499
|
({
|
|
2545
2500
|
enabled,
|
|
2546
2501
|
disableCopy,
|
|
@@ -2787,10 +2742,10 @@ function DataTable({
|
|
|
2787
2742
|
className,
|
|
2788
2743
|
emptyMessage = "No data available"
|
|
2789
2744
|
}) {
|
|
2790
|
-
const [sortBy, setSortBy] =
|
|
2791
|
-
const [sortDir, setSortDir] =
|
|
2792
|
-
const [filters, setFilters] =
|
|
2793
|
-
const api =
|
|
2745
|
+
const [sortBy, setSortBy] = React42.useState(controlledSortBy ?? null);
|
|
2746
|
+
const [sortDir, setSortDir] = React42.useState(controlledSortDir);
|
|
2747
|
+
const [filters, setFilters] = React42.useState(controlledFilters ?? {});
|
|
2748
|
+
const api = React42.useMemo(
|
|
2794
2749
|
() => createDataTable({
|
|
2795
2750
|
columns,
|
|
2796
2751
|
data,
|
|
@@ -2801,7 +2756,7 @@ function DataTable({
|
|
|
2801
2756
|
}),
|
|
2802
2757
|
[columns, data, sortBy, sortDir, onSort, filters]
|
|
2803
2758
|
);
|
|
2804
|
-
const handleSort =
|
|
2759
|
+
const handleSort = React42.useCallback(
|
|
2805
2760
|
(columnId) => {
|
|
2806
2761
|
const col = columns.find((c) => c.id === columnId);
|
|
2807
2762
|
if (!col?.sortable) return;
|
|
@@ -2815,7 +2770,7 @@ function DataTable({
|
|
|
2815
2770
|
},
|
|
2816
2771
|
[columns, sortBy, sortDir, onSort]
|
|
2817
2772
|
);
|
|
2818
|
-
const handleFilter =
|
|
2773
|
+
const handleFilter = React42.useCallback(
|
|
2819
2774
|
(columnId, value) => {
|
|
2820
2775
|
setFilters((prev) => ({ ...prev, [columnId]: value }));
|
|
2821
2776
|
},
|
|
@@ -2823,26 +2778,26 @@ function DataTable({
|
|
|
2823
2778
|
);
|
|
2824
2779
|
const sortedData = api.state.sortedData;
|
|
2825
2780
|
const hasFilterable = columns.some((c) => c.filterable);
|
|
2826
|
-
return
|
|
2781
|
+
return React42.createElement(
|
|
2827
2782
|
"div",
|
|
2828
2783
|
{ className: "relative w-full overflow-auto" },
|
|
2829
|
-
|
|
2784
|
+
React42.createElement(
|
|
2830
2785
|
"table",
|
|
2831
2786
|
{
|
|
2832
2787
|
className: cn(tableVariants(), className),
|
|
2833
2788
|
role: "table"
|
|
2834
2789
|
},
|
|
2835
2790
|
// thead
|
|
2836
|
-
|
|
2791
|
+
React42.createElement(
|
|
2837
2792
|
"thead",
|
|
2838
2793
|
null,
|
|
2839
2794
|
// Header row
|
|
2840
|
-
|
|
2795
|
+
React42.createElement(
|
|
2841
2796
|
"tr",
|
|
2842
2797
|
{ role: "row" },
|
|
2843
2798
|
...columns.map((col) => {
|
|
2844
2799
|
const headerProps = api.getHeaderProps(col);
|
|
2845
|
-
return
|
|
2800
|
+
return React42.createElement(
|
|
2846
2801
|
"th",
|
|
2847
2802
|
{
|
|
2848
2803
|
key: col.id,
|
|
@@ -2851,19 +2806,19 @@ function DataTable({
|
|
|
2851
2806
|
onClick: col.sortable ? () => handleSort(col.id) : void 0
|
|
2852
2807
|
},
|
|
2853
2808
|
col.header,
|
|
2854
|
-
col.sortable && sortBy === col.id ?
|
|
2809
|
+
col.sortable && sortBy === col.id ? React42.createElement("span", { "aria-hidden": true }, sortDir === "asc" ? " \u2191" : " \u2193") : null
|
|
2855
2810
|
);
|
|
2856
2811
|
})
|
|
2857
2812
|
),
|
|
2858
2813
|
// Filter row
|
|
2859
|
-
hasFilterable ?
|
|
2814
|
+
hasFilterable ? React42.createElement(
|
|
2860
2815
|
"tr",
|
|
2861
2816
|
{ role: "row", "data-filter-row": "true" },
|
|
2862
2817
|
...columns.map(
|
|
2863
|
-
(col) =>
|
|
2818
|
+
(col) => React42.createElement(
|
|
2864
2819
|
"th",
|
|
2865
2820
|
{ key: `filter-${col.id}` },
|
|
2866
|
-
col.filterable ?
|
|
2821
|
+
col.filterable ? React42.createElement("input", {
|
|
2867
2822
|
type: "text",
|
|
2868
2823
|
"aria-label": `Filter ${col.header}`,
|
|
2869
2824
|
value: filters[col.id] ?? "",
|
|
@@ -2875,13 +2830,13 @@ function DataTable({
|
|
|
2875
2830
|
) : null
|
|
2876
2831
|
),
|
|
2877
2832
|
// tbody
|
|
2878
|
-
|
|
2833
|
+
React42.createElement(
|
|
2879
2834
|
"tbody",
|
|
2880
2835
|
null,
|
|
2881
|
-
sortedData.length === 0 ?
|
|
2836
|
+
sortedData.length === 0 ? React42.createElement(
|
|
2882
2837
|
"tr",
|
|
2883
2838
|
{ role: "row" },
|
|
2884
|
-
|
|
2839
|
+
React42.createElement(
|
|
2885
2840
|
"td",
|
|
2886
2841
|
{
|
|
2887
2842
|
colSpan: columns.length,
|
|
@@ -2891,7 +2846,7 @@ function DataTable({
|
|
|
2891
2846
|
emptyMessage
|
|
2892
2847
|
)
|
|
2893
2848
|
) : sortedData.map(
|
|
2894
|
-
(row, rowIndex) =>
|
|
2849
|
+
(row, rowIndex) => React42.createElement(
|
|
2895
2850
|
"tr",
|
|
2896
2851
|
{
|
|
2897
2852
|
key: rowIndex,
|
|
@@ -2899,7 +2854,7 @@ function DataTable({
|
|
|
2899
2854
|
className: rowVariants()
|
|
2900
2855
|
},
|
|
2901
2856
|
...columns.map(
|
|
2902
|
-
(col) =>
|
|
2857
|
+
(col) => React42.createElement(
|
|
2903
2858
|
"td",
|
|
2904
2859
|
{
|
|
2905
2860
|
key: col.id,
|
|
@@ -3009,7 +2964,7 @@ function DeviceFrame({
|
|
|
3009
2964
|
children
|
|
3010
2965
|
}) {
|
|
3011
2966
|
const api = createDeviceFrame({ device, orientation });
|
|
3012
|
-
return
|
|
2967
|
+
return React42.createElement(
|
|
3013
2968
|
"div",
|
|
3014
2969
|
{
|
|
3015
2970
|
className: cn(deviceFrameVariants({ device, orientation }), className),
|
|
@@ -3021,13 +2976,13 @@ function DeviceFrame({
|
|
|
3021
2976
|
...api.dataAttributes
|
|
3022
2977
|
},
|
|
3023
2978
|
// Notch decoration
|
|
3024
|
-
api.dimensions.notch ?
|
|
2979
|
+
api.dimensions.notch ? React42.createElement("div", {
|
|
3025
2980
|
className: "absolute top-0 left-1/2 -translate-x-1/2 w-[40%] h-[30px] bg-black rounded-b-2xl z-10",
|
|
3026
2981
|
"aria-hidden": "true",
|
|
3027
2982
|
"data-part": "notch"
|
|
3028
2983
|
}) : null,
|
|
3029
2984
|
// Screen area
|
|
3030
|
-
|
|
2985
|
+
React42.createElement(
|
|
3031
2986
|
"div",
|
|
3032
2987
|
{
|
|
3033
2988
|
className: "relative w-full h-full overflow-hidden bg-white",
|
|
@@ -3036,7 +2991,7 @@ function DeviceFrame({
|
|
|
3036
2991
|
children
|
|
3037
2992
|
),
|
|
3038
2993
|
// Home indicator decoration
|
|
3039
|
-
api.dimensions.homeIndicator ?
|
|
2994
|
+
api.dimensions.homeIndicator ? React42.createElement("div", {
|
|
3040
2995
|
className: "absolute bottom-2 left-1/2 -translate-x-1/2 w-[35%] h-[5px] bg-gray-300 rounded-full z-10",
|
|
3041
2996
|
"aria-hidden": "true",
|
|
3042
2997
|
"data-part": "home-indicator"
|
|
@@ -3125,9 +3080,9 @@ var dialogContentVariants = cva({
|
|
|
3125
3080
|
});
|
|
3126
3081
|
|
|
3127
3082
|
// ../react-dialog/dist/index.js
|
|
3128
|
-
var DialogContext =
|
|
3083
|
+
var DialogContext = React42.createContext(null);
|
|
3129
3084
|
function useDialogContext() {
|
|
3130
|
-
const ctx =
|
|
3085
|
+
const ctx = React42.useContext(DialogContext);
|
|
3131
3086
|
if (!ctx) {
|
|
3132
3087
|
throw new Error("Dialog compound components must be used within <Dialog>");
|
|
3133
3088
|
}
|
|
@@ -3140,10 +3095,10 @@ function Dialog({
|
|
|
3140
3095
|
modal = true,
|
|
3141
3096
|
children
|
|
3142
3097
|
}) {
|
|
3143
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3098
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42.useState(defaultOpen);
|
|
3144
3099
|
const isControlled = controlledOpen !== void 0;
|
|
3145
3100
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
3146
|
-
const handleOpenChange =
|
|
3101
|
+
const handleOpenChange = React42.useCallback(
|
|
3147
3102
|
(next) => {
|
|
3148
3103
|
if (!isControlled) {
|
|
3149
3104
|
setUncontrolledOpen(next);
|
|
@@ -3152,12 +3107,12 @@ function Dialog({
|
|
|
3152
3107
|
},
|
|
3153
3108
|
[isControlled, onOpenChange]
|
|
3154
3109
|
);
|
|
3155
|
-
const apiRef =
|
|
3110
|
+
const apiRef = React42.useRef(null);
|
|
3156
3111
|
if (apiRef.current === null) {
|
|
3157
3112
|
apiRef.current = createDialog({ open, modal });
|
|
3158
3113
|
}
|
|
3159
3114
|
const api = apiRef.current;
|
|
3160
|
-
const ctx =
|
|
3115
|
+
const ctx = React42.useMemo(
|
|
3161
3116
|
() => ({
|
|
3162
3117
|
open,
|
|
3163
3118
|
onOpenChange: handleOpenChange,
|
|
@@ -3168,17 +3123,17 @@ function Dialog({
|
|
|
3168
3123
|
}),
|
|
3169
3124
|
[open, handleOpenChange, modal, api.ids.content, api.ids.title, api.ids.description]
|
|
3170
3125
|
);
|
|
3171
|
-
return
|
|
3126
|
+
return React42.createElement(DialogContext.Provider, { value: ctx }, children);
|
|
3172
3127
|
}
|
|
3173
3128
|
Dialog.displayName = "Dialog";
|
|
3174
|
-
var DialogTrigger =
|
|
3129
|
+
var DialogTrigger = React42.forwardRef(
|
|
3175
3130
|
({ onClick, children, ...props }, ref) => {
|
|
3176
3131
|
const { open, onOpenChange, contentId } = useDialogContext();
|
|
3177
3132
|
const handleClick = (e) => {
|
|
3178
3133
|
onOpenChange(!open);
|
|
3179
3134
|
onClick?.(e);
|
|
3180
3135
|
};
|
|
3181
|
-
return
|
|
3136
|
+
return React42.createElement(
|
|
3182
3137
|
"button",
|
|
3183
3138
|
{
|
|
3184
3139
|
ref,
|
|
@@ -3194,7 +3149,7 @@ var DialogTrigger = React41.forwardRef(
|
|
|
3194
3149
|
}
|
|
3195
3150
|
);
|
|
3196
3151
|
DialogTrigger.displayName = "DialogTrigger";
|
|
3197
|
-
var DialogOverlay =
|
|
3152
|
+
var DialogOverlay = React42.forwardRef(
|
|
3198
3153
|
({ className, onClick, ...props }, ref) => {
|
|
3199
3154
|
const { open, onOpenChange } = useDialogContext();
|
|
3200
3155
|
if (!open) return null;
|
|
@@ -3204,7 +3159,7 @@ var DialogOverlay = React41.forwardRef(
|
|
|
3204
3159
|
}
|
|
3205
3160
|
onClick?.(e);
|
|
3206
3161
|
};
|
|
3207
|
-
return
|
|
3162
|
+
return React42.createElement("div", {
|
|
3208
3163
|
ref,
|
|
3209
3164
|
className: cn(overlayStyles, className),
|
|
3210
3165
|
"data-state": open ? "open" : "closed",
|
|
@@ -3214,10 +3169,10 @@ var DialogOverlay = React41.forwardRef(
|
|
|
3214
3169
|
}
|
|
3215
3170
|
);
|
|
3216
3171
|
DialogOverlay.displayName = "DialogOverlay";
|
|
3217
|
-
var DialogContent =
|
|
3172
|
+
var DialogContent = React42.forwardRef(
|
|
3218
3173
|
({ className, children, onKeyDown, ...props }, ref) => {
|
|
3219
3174
|
const { open, onOpenChange, modal, contentId, titleId, descriptionId } = useDialogContext();
|
|
3220
|
-
|
|
3175
|
+
React42.useMemo(
|
|
3221
3176
|
() => createDialog({ open, modal }),
|
|
3222
3177
|
[open, modal]
|
|
3223
3178
|
);
|
|
@@ -3232,7 +3187,7 @@ var DialogContent = React41.forwardRef(
|
|
|
3232
3187
|
onKeyDown?.(e);
|
|
3233
3188
|
};
|
|
3234
3189
|
if (!open) return null;
|
|
3235
|
-
const content =
|
|
3190
|
+
const content = React42.createElement(
|
|
3236
3191
|
"div",
|
|
3237
3192
|
{
|
|
3238
3193
|
ref,
|
|
@@ -3255,9 +3210,9 @@ var DialogContent = React41.forwardRef(
|
|
|
3255
3210
|
}
|
|
3256
3211
|
);
|
|
3257
3212
|
DialogContent.displayName = "DialogContent";
|
|
3258
|
-
var DialogHeader =
|
|
3213
|
+
var DialogHeader = React42.forwardRef(
|
|
3259
3214
|
({ className, ...props }, ref) => {
|
|
3260
|
-
return
|
|
3215
|
+
return React42.createElement("div", {
|
|
3261
3216
|
ref,
|
|
3262
3217
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
|
|
3263
3218
|
...props
|
|
@@ -3265,9 +3220,9 @@ var DialogHeader = React41.forwardRef(
|
|
|
3265
3220
|
}
|
|
3266
3221
|
);
|
|
3267
3222
|
DialogHeader.displayName = "DialogHeader";
|
|
3268
|
-
var DialogFooter =
|
|
3223
|
+
var DialogFooter = React42.forwardRef(
|
|
3269
3224
|
({ className, ...props }, ref) => {
|
|
3270
|
-
return
|
|
3225
|
+
return React42.createElement("div", {
|
|
3271
3226
|
ref,
|
|
3272
3227
|
className: cn(
|
|
3273
3228
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
@@ -3278,10 +3233,10 @@ var DialogFooter = React41.forwardRef(
|
|
|
3278
3233
|
}
|
|
3279
3234
|
);
|
|
3280
3235
|
DialogFooter.displayName = "DialogFooter";
|
|
3281
|
-
var DialogTitle =
|
|
3236
|
+
var DialogTitle = React42.forwardRef(
|
|
3282
3237
|
({ className, ...props }, ref) => {
|
|
3283
3238
|
const { titleId } = useDialogContext();
|
|
3284
|
-
return
|
|
3239
|
+
return React42.createElement("h2", {
|
|
3285
3240
|
ref,
|
|
3286
3241
|
id: titleId,
|
|
3287
3242
|
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
@@ -3290,9 +3245,9 @@ var DialogTitle = React41.forwardRef(
|
|
|
3290
3245
|
}
|
|
3291
3246
|
);
|
|
3292
3247
|
DialogTitle.displayName = "DialogTitle";
|
|
3293
|
-
var DialogDescription =
|
|
3248
|
+
var DialogDescription = React42.forwardRef(({ className, ...props }, ref) => {
|
|
3294
3249
|
const { descriptionId } = useDialogContext();
|
|
3295
|
-
return
|
|
3250
|
+
return React42.createElement("p", {
|
|
3296
3251
|
ref,
|
|
3297
3252
|
id: descriptionId,
|
|
3298
3253
|
className: cn("text-sm text-muted-foreground", className),
|
|
@@ -3300,14 +3255,14 @@ var DialogDescription = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
3300
3255
|
});
|
|
3301
3256
|
});
|
|
3302
3257
|
DialogDescription.displayName = "DialogDescription";
|
|
3303
|
-
var DialogClose =
|
|
3258
|
+
var DialogClose = React42.forwardRef(
|
|
3304
3259
|
({ onClick, children, ...props }, ref) => {
|
|
3305
3260
|
const { onOpenChange } = useDialogContext();
|
|
3306
3261
|
const handleClick = (e) => {
|
|
3307
3262
|
onOpenChange(false);
|
|
3308
3263
|
onClick?.(e);
|
|
3309
3264
|
};
|
|
3310
|
-
return
|
|
3265
|
+
return React42.createElement(
|
|
3311
3266
|
"button",
|
|
3312
3267
|
{
|
|
3313
3268
|
ref,
|
|
@@ -3412,9 +3367,9 @@ var menuItemVariants = cva({
|
|
|
3412
3367
|
});
|
|
3413
3368
|
|
|
3414
3369
|
// ../react-dropdown-menu/dist/index.js
|
|
3415
|
-
var DropdownMenuContext =
|
|
3370
|
+
var DropdownMenuContext = React42.createContext(null);
|
|
3416
3371
|
function useDropdownMenuContext() {
|
|
3417
|
-
const ctx =
|
|
3372
|
+
const ctx = React42.useContext(DropdownMenuContext);
|
|
3418
3373
|
if (!ctx) {
|
|
3419
3374
|
throw new Error("DropdownMenu compound components must be used within <DropdownMenu>");
|
|
3420
3375
|
}
|
|
@@ -3426,10 +3381,10 @@ function DropdownMenu({
|
|
|
3426
3381
|
onOpenChange,
|
|
3427
3382
|
children
|
|
3428
3383
|
}) {
|
|
3429
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3384
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42.useState(defaultOpen);
|
|
3430
3385
|
const isControlled = controlledOpen !== void 0;
|
|
3431
3386
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
3432
|
-
const handleOpenChange =
|
|
3387
|
+
const handleOpenChange = React42.useCallback(
|
|
3433
3388
|
(next) => {
|
|
3434
3389
|
if (!isControlled) {
|
|
3435
3390
|
setUncontrolledOpen(next);
|
|
@@ -3438,12 +3393,12 @@ function DropdownMenu({
|
|
|
3438
3393
|
},
|
|
3439
3394
|
[isControlled, onOpenChange]
|
|
3440
3395
|
);
|
|
3441
|
-
const apiRef =
|
|
3396
|
+
const apiRef = React42.useRef(null);
|
|
3442
3397
|
if (apiRef.current === null) {
|
|
3443
3398
|
apiRef.current = createDropdownMenu({ open });
|
|
3444
3399
|
}
|
|
3445
3400
|
const api = apiRef.current;
|
|
3446
|
-
const ctx =
|
|
3401
|
+
const ctx = React42.useMemo(
|
|
3447
3402
|
() => ({
|
|
3448
3403
|
open,
|
|
3449
3404
|
onOpenChange: handleOpenChange,
|
|
@@ -3451,17 +3406,17 @@ function DropdownMenu({
|
|
|
3451
3406
|
}),
|
|
3452
3407
|
[open, handleOpenChange, api.ids.content]
|
|
3453
3408
|
);
|
|
3454
|
-
return
|
|
3409
|
+
return React42.createElement(DropdownMenuContext.Provider, { value: ctx }, children);
|
|
3455
3410
|
}
|
|
3456
3411
|
DropdownMenu.displayName = "DropdownMenu";
|
|
3457
|
-
var DropdownMenuTrigger =
|
|
3412
|
+
var DropdownMenuTrigger = React42.forwardRef(
|
|
3458
3413
|
({ onClick, children, ...props }, ref) => {
|
|
3459
3414
|
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
3460
3415
|
const handleClick = (e) => {
|
|
3461
3416
|
onOpenChange(!open);
|
|
3462
3417
|
onClick?.(e);
|
|
3463
3418
|
};
|
|
3464
|
-
return
|
|
3419
|
+
return React42.createElement(
|
|
3465
3420
|
"button",
|
|
3466
3421
|
{
|
|
3467
3422
|
ref,
|
|
@@ -3477,7 +3432,7 @@ var DropdownMenuTrigger = React41.forwardRef(
|
|
|
3477
3432
|
}
|
|
3478
3433
|
);
|
|
3479
3434
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
3480
|
-
var DropdownMenuContent =
|
|
3435
|
+
var DropdownMenuContent = React42.forwardRef(
|
|
3481
3436
|
({ className, children, onKeyDown, ...props }, ref) => {
|
|
3482
3437
|
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
3483
3438
|
const handleKeyDown = (e) => {
|
|
@@ -3491,7 +3446,7 @@ var DropdownMenuContent = React41.forwardRef(
|
|
|
3491
3446
|
onKeyDown?.(e);
|
|
3492
3447
|
};
|
|
3493
3448
|
if (!open) return null;
|
|
3494
|
-
const content =
|
|
3449
|
+
const content = React42.createElement(
|
|
3495
3450
|
"div",
|
|
3496
3451
|
{
|
|
3497
3452
|
ref,
|
|
@@ -3512,7 +3467,7 @@ var DropdownMenuContent = React41.forwardRef(
|
|
|
3512
3467
|
}
|
|
3513
3468
|
);
|
|
3514
3469
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
3515
|
-
var DropdownMenuItem =
|
|
3470
|
+
var DropdownMenuItem = React42.forwardRef(
|
|
3516
3471
|
({ className, disabled, onSelect, onClick, children, ...props }, ref) => {
|
|
3517
3472
|
const { onOpenChange } = useDropdownMenuContext();
|
|
3518
3473
|
const handleClick = (e) => {
|
|
@@ -3529,7 +3484,7 @@ var DropdownMenuItem = React41.forwardRef(
|
|
|
3529
3484
|
onOpenChange(false);
|
|
3530
3485
|
}
|
|
3531
3486
|
};
|
|
3532
|
-
return
|
|
3487
|
+
return React42.createElement(
|
|
3533
3488
|
"div",
|
|
3534
3489
|
{
|
|
3535
3490
|
ref,
|
|
@@ -3547,9 +3502,9 @@ var DropdownMenuItem = React41.forwardRef(
|
|
|
3547
3502
|
}
|
|
3548
3503
|
);
|
|
3549
3504
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
3550
|
-
var DropdownMenuSeparator =
|
|
3505
|
+
var DropdownMenuSeparator = React42.forwardRef(
|
|
3551
3506
|
({ className, ...props }, ref) => {
|
|
3552
|
-
return
|
|
3507
|
+
return React42.createElement("div", {
|
|
3553
3508
|
ref,
|
|
3554
3509
|
role: "separator",
|
|
3555
3510
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
@@ -3558,9 +3513,9 @@ var DropdownMenuSeparator = React41.forwardRef(
|
|
|
3558
3513
|
}
|
|
3559
3514
|
);
|
|
3560
3515
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
3561
|
-
var DropdownMenuLabel =
|
|
3516
|
+
var DropdownMenuLabel = React42.forwardRef(
|
|
3562
3517
|
({ className, ...props }, ref) => {
|
|
3563
|
-
return
|
|
3518
|
+
return React42.createElement("div", {
|
|
3564
3519
|
ref,
|
|
3565
3520
|
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
3566
3521
|
...props
|
|
@@ -3672,15 +3627,15 @@ function FeedbackDialog({
|
|
|
3672
3627
|
type = "general",
|
|
3673
3628
|
className
|
|
3674
3629
|
}) {
|
|
3675
|
-
const [open, setOpen] =
|
|
3676
|
-
const [comment, setComment] =
|
|
3677
|
-
const [email, setEmail] =
|
|
3678
|
-
const [honeypot, setHoneypot] =
|
|
3679
|
-
const [isSubmitting, setIsSubmitting] =
|
|
3680
|
-
const [isSubmitted, setIsSubmitted] =
|
|
3630
|
+
const [open, setOpen] = React42.useState(controlledOpen ?? false);
|
|
3631
|
+
const [comment, setComment] = React42.useState("");
|
|
3632
|
+
const [email, setEmail] = React42.useState("");
|
|
3633
|
+
const [honeypot, setHoneypot] = React42.useState("");
|
|
3634
|
+
const [isSubmitting, setIsSubmitting] = React42.useState(false);
|
|
3635
|
+
const [isSubmitted, setIsSubmitted] = React42.useState(false);
|
|
3681
3636
|
const isControlled = controlledOpen !== void 0;
|
|
3682
3637
|
const isOpen = isControlled ? controlledOpen : open;
|
|
3683
|
-
const handleOpenChange =
|
|
3638
|
+
const handleOpenChange = React42.useCallback(
|
|
3684
3639
|
(next) => {
|
|
3685
3640
|
if (!isControlled) {
|
|
3686
3641
|
setOpen(next);
|
|
@@ -3689,11 +3644,11 @@ function FeedbackDialog({
|
|
|
3689
3644
|
},
|
|
3690
3645
|
[isControlled, onOpenChange]
|
|
3691
3646
|
);
|
|
3692
|
-
const apiRef =
|
|
3647
|
+
const apiRef = React42.useRef(null);
|
|
3693
3648
|
if (apiRef.current === null) {
|
|
3694
3649
|
apiRef.current = createFeedbackDialog({ open: isOpen, onOpenChange: handleOpenChange, onSubmit, type });
|
|
3695
3650
|
}
|
|
3696
|
-
const handleSubmit =
|
|
3651
|
+
const handleSubmit = React42.useCallback(async () => {
|
|
3697
3652
|
if (honeypot) return;
|
|
3698
3653
|
if (!comment.trim()) return;
|
|
3699
3654
|
setIsSubmitting(true);
|
|
@@ -3710,7 +3665,7 @@ function FeedbackDialog({
|
|
|
3710
3665
|
setIsSubmitting(false);
|
|
3711
3666
|
}
|
|
3712
3667
|
}, [comment, email, honeypot, type, onSubmit]);
|
|
3713
|
-
const handleReset =
|
|
3668
|
+
const handleReset = React42.useCallback(() => {
|
|
3714
3669
|
setComment("");
|
|
3715
3670
|
setEmail("");
|
|
3716
3671
|
setHoneypot("");
|
|
@@ -3720,15 +3675,15 @@ function FeedbackDialog({
|
|
|
3720
3675
|
if (!isOpen) return null;
|
|
3721
3676
|
const api = apiRef.current;
|
|
3722
3677
|
if (isSubmitted) {
|
|
3723
|
-
return
|
|
3678
|
+
return React42.createElement(
|
|
3724
3679
|
"div",
|
|
3725
3680
|
{
|
|
3726
3681
|
className: cn(feedbackDialogVariants({ type }), className),
|
|
3727
3682
|
...api.ariaProps,
|
|
3728
3683
|
"data-state": "submitted"
|
|
3729
3684
|
},
|
|
3730
|
-
|
|
3731
|
-
|
|
3685
|
+
React42.createElement("p", { "data-testid": "success-message" }, "Thank you for your feedback!"),
|
|
3686
|
+
React42.createElement(
|
|
3732
3687
|
"button",
|
|
3733
3688
|
{
|
|
3734
3689
|
type: "button",
|
|
@@ -3741,22 +3696,22 @@ function FeedbackDialog({
|
|
|
3741
3696
|
)
|
|
3742
3697
|
);
|
|
3743
3698
|
}
|
|
3744
|
-
return
|
|
3699
|
+
return React42.createElement(
|
|
3745
3700
|
"div",
|
|
3746
3701
|
{
|
|
3747
3702
|
className: cn(feedbackDialogVariants({ type }), className),
|
|
3748
3703
|
...api.ariaProps,
|
|
3749
3704
|
"data-state": "open"
|
|
3750
3705
|
},
|
|
3751
|
-
|
|
3752
|
-
|
|
3706
|
+
React42.createElement("h2", { id: `${api.ariaProps.id}-title` }, "Send Feedback"),
|
|
3707
|
+
React42.createElement("textarea", {
|
|
3753
3708
|
"aria-label": "Feedback comment",
|
|
3754
3709
|
value: comment,
|
|
3755
3710
|
onChange: (e) => setComment(e.target.value),
|
|
3756
3711
|
placeholder: "Your feedback...",
|
|
3757
3712
|
disabled: isSubmitting
|
|
3758
3713
|
}),
|
|
3759
|
-
|
|
3714
|
+
React42.createElement("input", {
|
|
3760
3715
|
type: "email",
|
|
3761
3716
|
"aria-label": "Email",
|
|
3762
3717
|
value: email,
|
|
@@ -3765,7 +3720,7 @@ function FeedbackDialog({
|
|
|
3765
3720
|
disabled: isSubmitting
|
|
3766
3721
|
}),
|
|
3767
3722
|
// Honeypot field — hidden from real users
|
|
3768
|
-
|
|
3723
|
+
React42.createElement("input", {
|
|
3769
3724
|
type: "text",
|
|
3770
3725
|
"aria-hidden": true,
|
|
3771
3726
|
tabIndex: -1,
|
|
@@ -3775,7 +3730,7 @@ function FeedbackDialog({
|
|
|
3775
3730
|
autoComplete: "off",
|
|
3776
3731
|
name: "website"
|
|
3777
3732
|
}),
|
|
3778
|
-
|
|
3733
|
+
React42.createElement(
|
|
3779
3734
|
"button",
|
|
3780
3735
|
{
|
|
3781
3736
|
type: "button",
|
|
@@ -3787,9 +3742,9 @@ function FeedbackDialog({
|
|
|
3787
3742
|
);
|
|
3788
3743
|
}
|
|
3789
3744
|
FeedbackDialog.displayName = "FeedbackDialog";
|
|
3790
|
-
var FeedbackButton =
|
|
3745
|
+
var FeedbackButton = React42.forwardRef(
|
|
3791
3746
|
({ children, ...props }, ref) => {
|
|
3792
|
-
return
|
|
3747
|
+
return React42.createElement(
|
|
3793
3748
|
"button",
|
|
3794
3749
|
{
|
|
3795
3750
|
ref,
|
|
@@ -3816,7 +3771,7 @@ function createFooter(props = {}) {
|
|
|
3816
3771
|
var footerVariants = cva({
|
|
3817
3772
|
base: "border-t bg-background py-8"
|
|
3818
3773
|
});
|
|
3819
|
-
var Footer =
|
|
3774
|
+
var Footer = React42.forwardRef(
|
|
3820
3775
|
({
|
|
3821
3776
|
copyright,
|
|
3822
3777
|
socialLinks = [],
|
|
@@ -3954,34 +3909,34 @@ function InlineEditor({
|
|
|
3954
3909
|
onCancel,
|
|
3955
3910
|
className
|
|
3956
3911
|
}) {
|
|
3957
|
-
const [isEditing, setIsEditing] =
|
|
3958
|
-
const [editValue, setEditValue] =
|
|
3959
|
-
const apiRef =
|
|
3912
|
+
const [isEditing, setIsEditing] = React42.useState(false);
|
|
3913
|
+
const [editValue, setEditValue] = React42.useState(initialValue);
|
|
3914
|
+
const apiRef = React42.useRef(null);
|
|
3960
3915
|
if (apiRef.current === null) {
|
|
3961
3916
|
apiRef.current = createInlineEditor({ value: initialValue, onSave, onCancel });
|
|
3962
3917
|
}
|
|
3963
3918
|
const api = apiRef.current;
|
|
3964
|
-
const handleStartEditing =
|
|
3919
|
+
const handleStartEditing = React42.useCallback(() => {
|
|
3965
3920
|
setIsEditing(true);
|
|
3966
3921
|
setEditValue(initialValue);
|
|
3967
3922
|
}, [initialValue]);
|
|
3968
|
-
const handleCancel =
|
|
3923
|
+
const handleCancel = React42.useCallback(() => {
|
|
3969
3924
|
setIsEditing(false);
|
|
3970
3925
|
setEditValue(initialValue);
|
|
3971
3926
|
onCancel?.();
|
|
3972
3927
|
}, [initialValue, onCancel]);
|
|
3973
|
-
const handleSave =
|
|
3928
|
+
const handleSave = React42.useCallback(() => {
|
|
3974
3929
|
setIsEditing(false);
|
|
3975
3930
|
onSave?.(editValue);
|
|
3976
3931
|
}, [editValue, onSave]);
|
|
3977
|
-
const handleInsert =
|
|
3932
|
+
const handleInsert = React42.useCallback(
|
|
3978
3933
|
(syntax) => {
|
|
3979
3934
|
setEditValue((prev) => prev + syntax);
|
|
3980
3935
|
},
|
|
3981
3936
|
[]
|
|
3982
3937
|
);
|
|
3983
3938
|
if (!isEditing) {
|
|
3984
|
-
return
|
|
3939
|
+
return React42.createElement(
|
|
3985
3940
|
"div",
|
|
3986
3941
|
{
|
|
3987
3942
|
className: cn(editorVariants({ state: "viewing" }), className),
|
|
@@ -3996,20 +3951,20 @@ function InlineEditor({
|
|
|
3996
3951
|
}
|
|
3997
3952
|
}
|
|
3998
3953
|
},
|
|
3999
|
-
|
|
3954
|
+
React42.createElement("div", { className: previewVariants() }, editValue || initialValue)
|
|
4000
3955
|
);
|
|
4001
3956
|
}
|
|
4002
|
-
return
|
|
3957
|
+
return React42.createElement(
|
|
4003
3958
|
"div",
|
|
4004
3959
|
{
|
|
4005
3960
|
className: cn(editorVariants({ state: "editing" }), className)
|
|
4006
3961
|
},
|
|
4007
3962
|
// Toolbar
|
|
4008
|
-
|
|
3963
|
+
React42.createElement(
|
|
4009
3964
|
"div",
|
|
4010
3965
|
{ className: toolbarVariants(), role: "toolbar", "aria-label": "Formatting toolbar" },
|
|
4011
3966
|
...api.toolbarActions.map(
|
|
4012
|
-
(action) =>
|
|
3967
|
+
(action) => React42.createElement(
|
|
4013
3968
|
"button",
|
|
4014
3969
|
{
|
|
4015
3970
|
key: action.name,
|
|
@@ -4023,16 +3978,16 @@ function InlineEditor({
|
|
|
4023
3978
|
)
|
|
4024
3979
|
),
|
|
4025
3980
|
// Editor area: side-by-side textarea + preview
|
|
4026
|
-
|
|
3981
|
+
React42.createElement(
|
|
4027
3982
|
"div",
|
|
4028
3983
|
{ className: "flex gap-2 p-2" },
|
|
4029
|
-
|
|
3984
|
+
React42.createElement("textarea", {
|
|
4030
3985
|
value: editValue,
|
|
4031
3986
|
onChange: (e) => setEditValue(e.target.value),
|
|
4032
3987
|
className: "flex-1 min-h-[100px] resize-y border rounded p-2",
|
|
4033
3988
|
"aria-label": "Editor content"
|
|
4034
3989
|
}),
|
|
4035
|
-
|
|
3990
|
+
React42.createElement(
|
|
4036
3991
|
"div",
|
|
4037
3992
|
{
|
|
4038
3993
|
className: cn("flex-1", previewVariants()),
|
|
@@ -4042,15 +3997,15 @@ function InlineEditor({
|
|
|
4042
3997
|
)
|
|
4043
3998
|
),
|
|
4044
3999
|
// Action buttons
|
|
4045
|
-
|
|
4000
|
+
React42.createElement(
|
|
4046
4001
|
"div",
|
|
4047
4002
|
{ className: "flex justify-end gap-2 p-2 border-t" },
|
|
4048
|
-
|
|
4003
|
+
React42.createElement(
|
|
4049
4004
|
"button",
|
|
4050
4005
|
{ type: "button", onClick: handleCancel },
|
|
4051
4006
|
"Cancel"
|
|
4052
4007
|
),
|
|
4053
|
-
|
|
4008
|
+
React42.createElement(
|
|
4054
4009
|
"button",
|
|
4055
4010
|
{ type: "button", onClick: handleSave },
|
|
4056
4011
|
"Save"
|
|
@@ -4106,7 +4061,7 @@ var inputVariants = cva({
|
|
|
4106
4061
|
size: "default"
|
|
4107
4062
|
}
|
|
4108
4063
|
});
|
|
4109
|
-
var Input =
|
|
4064
|
+
var Input = React42.forwardRef(
|
|
4110
4065
|
({ type = "text", size, className, disabled, readOnly, required, "aria-invalid": ariaInvalid, ...props }, ref) => {
|
|
4111
4066
|
const api = createInput({
|
|
4112
4067
|
disabled,
|
|
@@ -4199,7 +4154,7 @@ var inputGroupButtonVariants = cva({
|
|
|
4199
4154
|
orientation: "horizontal"
|
|
4200
4155
|
}
|
|
4201
4156
|
});
|
|
4202
|
-
var InputGroup =
|
|
4157
|
+
var InputGroup = React42.forwardRef(
|
|
4203
4158
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4204
4159
|
const api = createInputGroup({
|
|
4205
4160
|
orientation,
|
|
@@ -4221,7 +4176,7 @@ var InputGroup = React41.forwardRef(
|
|
|
4221
4176
|
}
|
|
4222
4177
|
);
|
|
4223
4178
|
InputGroup.displayName = "InputGroup";
|
|
4224
|
-
var InputGroupAddon =
|
|
4179
|
+
var InputGroupAddon = React42.forwardRef(
|
|
4225
4180
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4226
4181
|
return /* @__PURE__ */ jsx(
|
|
4227
4182
|
"div",
|
|
@@ -4235,7 +4190,7 @@ var InputGroupAddon = React41.forwardRef(
|
|
|
4235
4190
|
}
|
|
4236
4191
|
);
|
|
4237
4192
|
InputGroupAddon.displayName = "InputGroupAddon";
|
|
4238
|
-
var InputGroupText =
|
|
4193
|
+
var InputGroupText = React42.forwardRef(
|
|
4239
4194
|
({ className, children, ...props }, ref) => {
|
|
4240
4195
|
return /* @__PURE__ */ jsx(
|
|
4241
4196
|
"span",
|
|
@@ -4249,7 +4204,7 @@ var InputGroupText = React41.forwardRef(
|
|
|
4249
4204
|
}
|
|
4250
4205
|
);
|
|
4251
4206
|
InputGroupText.displayName = "InputGroupText";
|
|
4252
|
-
var InputGroupButton =
|
|
4207
|
+
var InputGroupButton = React42.forwardRef(
|
|
4253
4208
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4254
4209
|
return /* @__PURE__ */ jsx(
|
|
4255
4210
|
"button",
|
|
@@ -4315,7 +4270,7 @@ function createLocalStorage() {
|
|
|
4315
4270
|
}
|
|
4316
4271
|
};
|
|
4317
4272
|
}
|
|
4318
|
-
var InstallPrompt =
|
|
4273
|
+
var InstallPrompt = React42.forwardRef(
|
|
4319
4274
|
({
|
|
4320
4275
|
delay = 3e3,
|
|
4321
4276
|
storageKey,
|
|
@@ -4325,14 +4280,14 @@ var InstallPrompt = React41.forwardRef(
|
|
|
4325
4280
|
className,
|
|
4326
4281
|
...props
|
|
4327
4282
|
}, ref) => {
|
|
4328
|
-
const storageRef =
|
|
4283
|
+
const storageRef = React42.useRef(void 0);
|
|
4329
4284
|
if (typeof window !== "undefined" && !storageRef.current) {
|
|
4330
4285
|
storageRef.current = createLocalStorage();
|
|
4331
4286
|
}
|
|
4332
4287
|
const api = createInstallPrompt({ storageKey }, storageRef.current);
|
|
4333
|
-
const [visible, setVisible] =
|
|
4334
|
-
const promptEventRef =
|
|
4335
|
-
|
|
4288
|
+
const [visible, setVisible] = React42.useState(false);
|
|
4289
|
+
const promptEventRef = React42.useRef(null);
|
|
4290
|
+
React42.useEffect(() => {
|
|
4336
4291
|
if (api.state.isDismissed) return;
|
|
4337
4292
|
const handleBeforeInstall = (e) => {
|
|
4338
4293
|
e.preventDefault();
|
|
@@ -4573,7 +4528,7 @@ function sanitizeHtml(html) {
|
|
|
4573
4528
|
sanitized = sanitized.replace(/(href|src)\s*=\s*["']?\s*javascript\s*:[^"'>]*/gi, '$1=""');
|
|
4574
4529
|
return sanitized;
|
|
4575
4530
|
}
|
|
4576
|
-
var MarkdownRenderer =
|
|
4531
|
+
var MarkdownRenderer = React42.forwardRef(
|
|
4577
4532
|
({ content, components, linkResolver, className, size }, ref) => {
|
|
4578
4533
|
const coreProps = { content, components, linkResolver };
|
|
4579
4534
|
const api = createMarkdownRenderer(coreProps);
|
|
@@ -4662,20 +4617,20 @@ var mobileNavLinkVariants = cva({
|
|
|
4662
4617
|
base: "block w-full px-4 py-2 text-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2",
|
|
4663
4618
|
variants: {}
|
|
4664
4619
|
});
|
|
4665
|
-
var MobileNavContext =
|
|
4620
|
+
var MobileNavContext = React42.createContext(null);
|
|
4666
4621
|
function useMobileNavContext() {
|
|
4667
|
-
const ctx =
|
|
4622
|
+
const ctx = React42.useContext(MobileNavContext);
|
|
4668
4623
|
if (!ctx) {
|
|
4669
4624
|
throw new Error("MobileNav compound components must be used within <MobileNav>");
|
|
4670
4625
|
}
|
|
4671
4626
|
return ctx;
|
|
4672
4627
|
}
|
|
4673
|
-
var MobileNav =
|
|
4628
|
+
var MobileNav = React42.forwardRef(
|
|
4674
4629
|
({ open: controlledOpen, onOpenChange, defaultOpen = false, className, children, ...props }, ref) => {
|
|
4675
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
4630
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42.useState(defaultOpen);
|
|
4676
4631
|
const isControlled = controlledOpen !== void 0;
|
|
4677
4632
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
4678
|
-
const setOpen =
|
|
4633
|
+
const setOpen = React42.useCallback(
|
|
4679
4634
|
(value) => {
|
|
4680
4635
|
if (!isControlled) {
|
|
4681
4636
|
setUncontrolledOpen(value);
|
|
@@ -4685,11 +4640,11 @@ var MobileNav = React41.forwardRef(
|
|
|
4685
4640
|
[isControlled, onOpenChange]
|
|
4686
4641
|
);
|
|
4687
4642
|
const api = createMobileNav({ open, onOpenChange: setOpen, id: props.id });
|
|
4688
|
-
const handleKeyDown =
|
|
4643
|
+
const handleKeyDown = React42.useMemo(
|
|
4689
4644
|
() => createKeyboardHandler(api.keyboardHandlers),
|
|
4690
4645
|
[open]
|
|
4691
4646
|
);
|
|
4692
|
-
const contextValue =
|
|
4647
|
+
const contextValue = React42.useMemo(
|
|
4693
4648
|
() => ({ open, setOpen, contentId: api.contentProps.id }),
|
|
4694
4649
|
[open, setOpen, api.contentProps.id]
|
|
4695
4650
|
);
|
|
@@ -4706,7 +4661,7 @@ var MobileNav = React41.forwardRef(
|
|
|
4706
4661
|
}
|
|
4707
4662
|
);
|
|
4708
4663
|
MobileNav.displayName = "MobileNav";
|
|
4709
|
-
var MobileNavTrigger =
|
|
4664
|
+
var MobileNavTrigger = React42.forwardRef(
|
|
4710
4665
|
({ className, children, ...props }, ref) => {
|
|
4711
4666
|
const { open, setOpen, contentId } = useMobileNavContext();
|
|
4712
4667
|
return /* @__PURE__ */ jsx(
|
|
@@ -4747,7 +4702,7 @@ var MobileNavTrigger = React41.forwardRef(
|
|
|
4747
4702
|
}
|
|
4748
4703
|
);
|
|
4749
4704
|
MobileNavTrigger.displayName = "MobileNavTrigger";
|
|
4750
|
-
var MobileNavContent =
|
|
4705
|
+
var MobileNavContent = React42.forwardRef(
|
|
4751
4706
|
({ className, children, ...props }, ref) => {
|
|
4752
4707
|
const { open, contentId } = useMobileNavContext();
|
|
4753
4708
|
const state = open ? "open" : "closed";
|
|
@@ -4766,7 +4721,7 @@ var MobileNavContent = React41.forwardRef(
|
|
|
4766
4721
|
}
|
|
4767
4722
|
);
|
|
4768
4723
|
MobileNavContent.displayName = "MobileNavContent";
|
|
4769
|
-
var MobileNavLink =
|
|
4724
|
+
var MobileNavLink = React42.forwardRef(
|
|
4770
4725
|
({ className, children, ...props }, ref) => {
|
|
4771
4726
|
return /* @__PURE__ */ jsx(
|
|
4772
4727
|
"a",
|
|
@@ -4825,7 +4780,7 @@ var navLinkVariants = cva({
|
|
|
4825
4780
|
active: "false"
|
|
4826
4781
|
}
|
|
4827
4782
|
});
|
|
4828
|
-
var Navbar =
|
|
4783
|
+
var Navbar = React42.forwardRef(
|
|
4829
4784
|
({
|
|
4830
4785
|
links = [],
|
|
4831
4786
|
currentPath,
|
|
@@ -4920,19 +4875,19 @@ var popoverContentVariants = cva({
|
|
|
4920
4875
|
side: "bottom"
|
|
4921
4876
|
}
|
|
4922
4877
|
});
|
|
4923
|
-
var PopoverContext =
|
|
4878
|
+
var PopoverContext = React42.createContext(null);
|
|
4924
4879
|
function usePopoverContext() {
|
|
4925
|
-
const ctx =
|
|
4880
|
+
const ctx = React42.useContext(PopoverContext);
|
|
4926
4881
|
if (!ctx) {
|
|
4927
4882
|
throw new Error("Popover compound components must be used within <Popover>");
|
|
4928
4883
|
}
|
|
4929
4884
|
return ctx;
|
|
4930
4885
|
}
|
|
4931
4886
|
function Popover({ open: controlledOpen, defaultOpen = false, onOpenChange, placement, children }) {
|
|
4932
|
-
const [internalOpen, setInternalOpen] =
|
|
4887
|
+
const [internalOpen, setInternalOpen] = React42.useState(controlledOpen ?? defaultOpen);
|
|
4933
4888
|
const isControlled = controlledOpen !== void 0;
|
|
4934
4889
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
4935
|
-
const handleOpenChange =
|
|
4890
|
+
const handleOpenChange = React42.useCallback(
|
|
4936
4891
|
(value) => {
|
|
4937
4892
|
if (!isControlled) {
|
|
4938
4893
|
setInternalOpen(value);
|
|
@@ -4941,18 +4896,18 @@ function Popover({ open: controlledOpen, defaultOpen = false, onOpenChange, plac
|
|
|
4941
4896
|
},
|
|
4942
4897
|
[isControlled, onOpenChange]
|
|
4943
4898
|
);
|
|
4944
|
-
const api =
|
|
4899
|
+
const api = React42.useMemo(
|
|
4945
4900
|
() => createPopover({ open: isOpen, onOpenChange: handleOpenChange, placement }),
|
|
4946
4901
|
[isOpen, handleOpenChange, placement]
|
|
4947
4902
|
);
|
|
4948
|
-
const ctx =
|
|
4903
|
+
const ctx = React42.useMemo(
|
|
4949
4904
|
() => ({ api, open: isOpen, setOpen: handleOpenChange }),
|
|
4950
4905
|
[api, isOpen, handleOpenChange]
|
|
4951
4906
|
);
|
|
4952
|
-
return
|
|
4907
|
+
return React42.createElement(PopoverContext.Provider, { value: ctx }, children);
|
|
4953
4908
|
}
|
|
4954
4909
|
Popover.displayName = "Popover";
|
|
4955
|
-
var PopoverTrigger =
|
|
4910
|
+
var PopoverTrigger = React42.forwardRef(
|
|
4956
4911
|
({ onClick, children, ...props }, ref) => {
|
|
4957
4912
|
const { api, setOpen, open } = usePopoverContext();
|
|
4958
4913
|
const handleClick = (e) => {
|
|
@@ -4975,7 +4930,7 @@ var PopoverTrigger = React41.forwardRef(
|
|
|
4975
4930
|
}
|
|
4976
4931
|
);
|
|
4977
4932
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
4978
|
-
var PopoverContent =
|
|
4933
|
+
var PopoverContent = React42.forwardRef(
|
|
4979
4934
|
({ side, className, children, onKeyDown, ...props }, ref) => {
|
|
4980
4935
|
const { api, open, setOpen } = usePopoverContext();
|
|
4981
4936
|
const handleKeyDown = (e) => {
|
|
@@ -5004,7 +4959,7 @@ var PopoverContent = React41.forwardRef(
|
|
|
5004
4959
|
}
|
|
5005
4960
|
);
|
|
5006
4961
|
PopoverContent.displayName = "PopoverContent";
|
|
5007
|
-
var PopoverClose =
|
|
4962
|
+
var PopoverClose = React42.forwardRef(
|
|
5008
4963
|
({ onClick, children, ...props }, ref) => {
|
|
5009
4964
|
const { setOpen } = usePopoverContext();
|
|
5010
4965
|
const handleClick = (e) => {
|
|
@@ -5125,9 +5080,9 @@ var searchResultVariants = cva({
|
|
|
5125
5080
|
});
|
|
5126
5081
|
|
|
5127
5082
|
// ../react-search-bar/dist/index.js
|
|
5128
|
-
var SearchBarContext =
|
|
5083
|
+
var SearchBarContext = React42.createContext(null);
|
|
5129
5084
|
function useSearchBarContext() {
|
|
5130
|
-
const ctx =
|
|
5085
|
+
const ctx = React42.useContext(SearchBarContext);
|
|
5131
5086
|
if (!ctx) {
|
|
5132
5087
|
throw new Error("SearchBar compound components must be used within <SearchBar>");
|
|
5133
5088
|
}
|
|
@@ -5145,11 +5100,11 @@ function SearchBar({
|
|
|
5145
5100
|
children,
|
|
5146
5101
|
...inputProps
|
|
5147
5102
|
}) {
|
|
5148
|
-
const [internalValue, setInternalValue] =
|
|
5103
|
+
const [internalValue, setInternalValue] = React42.useState(controlledValue ?? defaultValue);
|
|
5149
5104
|
const isControlled = controlledValue !== void 0;
|
|
5150
5105
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
5151
|
-
const debounceRef =
|
|
5152
|
-
const handleValueChange =
|
|
5106
|
+
const debounceRef = React42.useRef(void 0);
|
|
5107
|
+
const handleValueChange = React42.useCallback(
|
|
5153
5108
|
(val) => {
|
|
5154
5109
|
if (!isControlled) {
|
|
5155
5110
|
setInternalValue(val);
|
|
@@ -5158,8 +5113,8 @@ function SearchBar({
|
|
|
5158
5113
|
},
|
|
5159
5114
|
[isControlled, onValueChange]
|
|
5160
5115
|
);
|
|
5161
|
-
const [isSearching, setIsSearching] =
|
|
5162
|
-
const handleSearch =
|
|
5116
|
+
const [isSearching, setIsSearching] = React42.useState(loading);
|
|
5117
|
+
const handleSearch = React42.useCallback(
|
|
5163
5118
|
(val) => {
|
|
5164
5119
|
if (debounceRef.current !== void 0) {
|
|
5165
5120
|
clearTimeout(debounceRef.current);
|
|
@@ -5176,7 +5131,7 @@ function SearchBar({
|
|
|
5176
5131
|
},
|
|
5177
5132
|
[onSearch, debounceMs]
|
|
5178
5133
|
);
|
|
5179
|
-
const handleChange =
|
|
5134
|
+
const handleChange = React42.useCallback(
|
|
5180
5135
|
(e) => {
|
|
5181
5136
|
const val = e.target.value;
|
|
5182
5137
|
handleValueChange(val);
|
|
@@ -5184,14 +5139,14 @@ function SearchBar({
|
|
|
5184
5139
|
},
|
|
5185
5140
|
[handleValueChange, handleSearch]
|
|
5186
5141
|
);
|
|
5187
|
-
const clear =
|
|
5142
|
+
const clear = React42.useCallback(() => {
|
|
5188
5143
|
if (debounceRef.current !== void 0) {
|
|
5189
5144
|
clearTimeout(debounceRef.current);
|
|
5190
5145
|
}
|
|
5191
5146
|
handleValueChange("");
|
|
5192
5147
|
setIsSearching(false);
|
|
5193
5148
|
}, [handleValueChange]);
|
|
5194
|
-
const api =
|
|
5149
|
+
const api = React42.useMemo(
|
|
5195
5150
|
() => createSearchBar({
|
|
5196
5151
|
value: currentValue,
|
|
5197
5152
|
onValueChange: handleValueChange,
|
|
@@ -5202,7 +5157,7 @@ function SearchBar({
|
|
|
5202
5157
|
}),
|
|
5203
5158
|
[currentValue, handleValueChange, onSearch, debounceMs, placeholder, loading]
|
|
5204
5159
|
);
|
|
5205
|
-
const handleKeyDown =
|
|
5160
|
+
const handleKeyDown = React42.useCallback(
|
|
5206
5161
|
(e) => {
|
|
5207
5162
|
if (e.key === "Escape") {
|
|
5208
5163
|
clear();
|
|
@@ -5216,18 +5171,18 @@ function SearchBar({
|
|
|
5216
5171
|
},
|
|
5217
5172
|
[clear, onSearch, currentValue]
|
|
5218
5173
|
);
|
|
5219
|
-
const ctx =
|
|
5174
|
+
const ctx = React42.useMemo(
|
|
5220
5175
|
() => ({ api, value: currentValue, isSearching, setValue: handleValueChange, clear }),
|
|
5221
5176
|
[api, currentValue, isSearching, handleValueChange, clear]
|
|
5222
5177
|
);
|
|
5223
|
-
return
|
|
5178
|
+
return React42.createElement(
|
|
5224
5179
|
SearchBarContext.Provider,
|
|
5225
5180
|
{ value: ctx },
|
|
5226
|
-
|
|
5181
|
+
React42.createElement(
|
|
5227
5182
|
"div",
|
|
5228
5183
|
{ className: cn(searchBarVariants(), className) },
|
|
5229
|
-
|
|
5230
|
-
|
|
5184
|
+
React42.createElement("span", { className: "rfr-search-icon", "aria-hidden": "true" }, "\u{1F50D}"),
|
|
5185
|
+
React42.createElement("input", {
|
|
5231
5186
|
...inputProps,
|
|
5232
5187
|
role: api.inputProps.role,
|
|
5233
5188
|
"aria-expanded": api.inputProps["aria-expanded"],
|
|
@@ -5239,8 +5194,8 @@ function SearchBar({
|
|
|
5239
5194
|
onKeyDown: handleKeyDown,
|
|
5240
5195
|
className: "rfr-search-input flex-1 bg-transparent outline-none"
|
|
5241
5196
|
}),
|
|
5242
|
-
isSearching &&
|
|
5243
|
-
currentValue.length > 0 && !isSearching &&
|
|
5197
|
+
isSearching && React42.createElement("span", { className: "rfr-search-spinner", "aria-label": "Loading" }, "\u23F3"),
|
|
5198
|
+
currentValue.length > 0 && !isSearching && React42.createElement(
|
|
5244
5199
|
"button",
|
|
5245
5200
|
{
|
|
5246
5201
|
type: "button",
|
|
@@ -5255,11 +5210,11 @@ function SearchBar({
|
|
|
5255
5210
|
);
|
|
5256
5211
|
}
|
|
5257
5212
|
SearchBar.displayName = "SearchBar";
|
|
5258
|
-
var SearchResults =
|
|
5213
|
+
var SearchResults = React42.forwardRef(
|
|
5259
5214
|
({ className, children, ...props }, ref) => {
|
|
5260
5215
|
const { api, value } = useSearchBarContext();
|
|
5261
5216
|
if (value.length === 0) return null;
|
|
5262
|
-
return
|
|
5217
|
+
return React42.createElement(
|
|
5263
5218
|
"ul",
|
|
5264
5219
|
{
|
|
5265
5220
|
ref,
|
|
@@ -5273,9 +5228,9 @@ var SearchResults = React41.forwardRef(
|
|
|
5273
5228
|
}
|
|
5274
5229
|
);
|
|
5275
5230
|
SearchResults.displayName = "SearchResults";
|
|
5276
|
-
var SearchResultItem =
|
|
5231
|
+
var SearchResultItem = React42.forwardRef(
|
|
5277
5232
|
({ className, children, ...props }, ref) => {
|
|
5278
|
-
return
|
|
5233
|
+
return React42.createElement(
|
|
5279
5234
|
"li",
|
|
5280
5235
|
{
|
|
5281
5236
|
ref,
|
|
@@ -5336,7 +5291,7 @@ var sidebarItemVariants = cva({
|
|
|
5336
5291
|
active: "false"
|
|
5337
5292
|
}
|
|
5338
5293
|
});
|
|
5339
|
-
var Sidebar =
|
|
5294
|
+
var Sidebar = React42.forwardRef(
|
|
5340
5295
|
({
|
|
5341
5296
|
sections = [],
|
|
5342
5297
|
currentPath,
|
|
@@ -5406,7 +5361,7 @@ var skeletonVariants = cva({
|
|
|
5406
5361
|
});
|
|
5407
5362
|
|
|
5408
5363
|
// ../react-skeleton/dist/index.js
|
|
5409
|
-
var Skeleton =
|
|
5364
|
+
var Skeleton = React42.forwardRef(
|
|
5410
5365
|
({ shape, width, height, animate, className, style, ...props }, ref) => {
|
|
5411
5366
|
const api = createSkeleton({ shape, animate });
|
|
5412
5367
|
const classes = cn(skeletonVariants({ shape }), className);
|
|
@@ -5415,7 +5370,7 @@ var Skeleton = React41.forwardRef(
|
|
|
5415
5370
|
...width !== void 0 ? { width } : {},
|
|
5416
5371
|
...height !== void 0 ? { height } : {}
|
|
5417
5372
|
};
|
|
5418
|
-
return
|
|
5373
|
+
return React42.createElement("div", {
|
|
5419
5374
|
ref,
|
|
5420
5375
|
className: classes,
|
|
5421
5376
|
style: Object.keys(mergedStyle).length > 0 ? mergedStyle : void 0,
|
|
@@ -5427,13 +5382,13 @@ var Skeleton = React41.forwardRef(
|
|
|
5427
5382
|
);
|
|
5428
5383
|
Skeleton.displayName = "Skeleton";
|
|
5429
5384
|
var lineWidths = ["100%", "92%", "85%", "96%", "78%", "88%", "94%", "82%"];
|
|
5430
|
-
var SkeletonText =
|
|
5385
|
+
var SkeletonText = React42.forwardRef(
|
|
5431
5386
|
({ lines = 3, animate, className, ...props }, ref) => {
|
|
5432
5387
|
const children = [];
|
|
5433
5388
|
for (let i = 0; i < lines; i++) {
|
|
5434
5389
|
const width = lineWidths[i % lineWidths.length];
|
|
5435
5390
|
children.push(
|
|
5436
|
-
|
|
5391
|
+
React42.createElement(Skeleton, {
|
|
5437
5392
|
key: i,
|
|
5438
5393
|
shape: "text",
|
|
5439
5394
|
width,
|
|
@@ -5441,7 +5396,7 @@ var SkeletonText = React41.forwardRef(
|
|
|
5441
5396
|
})
|
|
5442
5397
|
);
|
|
5443
5398
|
}
|
|
5444
|
-
return
|
|
5399
|
+
return React42.createElement(
|
|
5445
5400
|
"div",
|
|
5446
5401
|
{
|
|
5447
5402
|
ref,
|
|
@@ -5549,9 +5504,9 @@ var tabsTriggerVariants = cva({
|
|
|
5549
5504
|
});
|
|
5550
5505
|
|
|
5551
5506
|
// ../react-tabs/dist/index.js
|
|
5552
|
-
var TabsContext =
|
|
5507
|
+
var TabsContext = React42.createContext(null);
|
|
5553
5508
|
function useTabsContext() {
|
|
5554
|
-
const ctx =
|
|
5509
|
+
const ctx = React42.useContext(TabsContext);
|
|
5555
5510
|
if (!ctx) {
|
|
5556
5511
|
throw new Error("Tabs compound components must be used within <Tabs>");
|
|
5557
5512
|
}
|
|
@@ -5565,10 +5520,10 @@ function Tabs({
|
|
|
5565
5520
|
className,
|
|
5566
5521
|
children
|
|
5567
5522
|
}) {
|
|
5568
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
5523
|
+
const [uncontrolledValue, setUncontrolledValue] = React42.useState(defaultValue);
|
|
5569
5524
|
const isControlled = controlledValue !== void 0;
|
|
5570
5525
|
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
5571
|
-
const handleValueChange =
|
|
5526
|
+
const handleValueChange = React42.useCallback(
|
|
5572
5527
|
(next) => {
|
|
5573
5528
|
if (!isControlled) {
|
|
5574
5529
|
setUncontrolledValue(next);
|
|
@@ -5577,12 +5532,12 @@ function Tabs({
|
|
|
5577
5532
|
},
|
|
5578
5533
|
[isControlled, onValueChange]
|
|
5579
5534
|
);
|
|
5580
|
-
const apiRef =
|
|
5535
|
+
const apiRef = React42.useRef(null);
|
|
5581
5536
|
if (apiRef.current === null) {
|
|
5582
5537
|
apiRef.current = createTabs({ value, orientation });
|
|
5583
5538
|
}
|
|
5584
5539
|
const api = apiRef.current;
|
|
5585
|
-
const ctx =
|
|
5540
|
+
const ctx = React42.useMemo(
|
|
5586
5541
|
() => ({
|
|
5587
5542
|
value,
|
|
5588
5543
|
onValueChange: handleValueChange,
|
|
@@ -5591,17 +5546,17 @@ function Tabs({
|
|
|
5591
5546
|
}),
|
|
5592
5547
|
[value, handleValueChange, orientation, api.idPrefix]
|
|
5593
5548
|
);
|
|
5594
|
-
return
|
|
5549
|
+
return React42.createElement(
|
|
5595
5550
|
"div",
|
|
5596
5551
|
{ className, "data-orientation": orientation },
|
|
5597
|
-
|
|
5552
|
+
React42.createElement(TabsContext.Provider, { value: ctx }, children)
|
|
5598
5553
|
);
|
|
5599
5554
|
}
|
|
5600
5555
|
Tabs.displayName = "Tabs";
|
|
5601
|
-
var TabsList =
|
|
5556
|
+
var TabsList = React42.forwardRef(
|
|
5602
5557
|
({ className, ...props }, ref) => {
|
|
5603
5558
|
const { orientation } = useTabsContext();
|
|
5604
|
-
return
|
|
5559
|
+
return React42.createElement("div", {
|
|
5605
5560
|
ref,
|
|
5606
5561
|
role: "tablist",
|
|
5607
5562
|
"aria-orientation": orientation,
|
|
@@ -5611,7 +5566,7 @@ var TabsList = React41.forwardRef(
|
|
|
5611
5566
|
}
|
|
5612
5567
|
);
|
|
5613
5568
|
TabsList.displayName = "TabsList";
|
|
5614
|
-
var TabsTrigger =
|
|
5569
|
+
var TabsTrigger = React42.forwardRef(
|
|
5615
5570
|
({ value, className, onClick, onKeyDown, children, ...props }, ref) => {
|
|
5616
5571
|
const { value: activeValue, onValueChange, orientation, idPrefix } = useTabsContext();
|
|
5617
5572
|
const isSelected = activeValue === value;
|
|
@@ -5624,7 +5579,7 @@ var TabsTrigger = React41.forwardRef(
|
|
|
5624
5579
|
const handleKeyDown = (e) => {
|
|
5625
5580
|
onKeyDown?.(e);
|
|
5626
5581
|
};
|
|
5627
|
-
return
|
|
5582
|
+
return React42.createElement(
|
|
5628
5583
|
"button",
|
|
5629
5584
|
{
|
|
5630
5585
|
ref,
|
|
@@ -5645,14 +5600,14 @@ var TabsTrigger = React41.forwardRef(
|
|
|
5645
5600
|
}
|
|
5646
5601
|
);
|
|
5647
5602
|
TabsTrigger.displayName = "TabsTrigger";
|
|
5648
|
-
var TabsContent =
|
|
5603
|
+
var TabsContent = React42.forwardRef(
|
|
5649
5604
|
({ value, className, children, ...props }, ref) => {
|
|
5650
5605
|
const { value: activeValue, idPrefix } = useTabsContext();
|
|
5651
5606
|
const isSelected = activeValue === value;
|
|
5652
5607
|
const tabId = `${idPrefix}-tab-${value}`;
|
|
5653
5608
|
const panelId = `${idPrefix}-panel-${value}`;
|
|
5654
5609
|
if (!isSelected) return null;
|
|
5655
|
-
return
|
|
5610
|
+
return React42.createElement(
|
|
5656
5611
|
"div",
|
|
5657
5612
|
{
|
|
5658
5613
|
ref,
|
|
@@ -5716,7 +5671,7 @@ var textareaVariants = cva({
|
|
|
5716
5671
|
size: "default"
|
|
5717
5672
|
}
|
|
5718
5673
|
});
|
|
5719
|
-
var Textarea =
|
|
5674
|
+
var Textarea = React42.forwardRef(
|
|
5720
5675
|
({ size, className, disabled, readOnly, required, rows, maxRows, "aria-invalid": ariaInvalid, ...props }, ref) => {
|
|
5721
5676
|
const api = createTextarea({
|
|
5722
5677
|
disabled,
|
|
@@ -5873,30 +5828,30 @@ var toastVariants = cva({
|
|
|
5873
5828
|
});
|
|
5874
5829
|
|
|
5875
5830
|
// ../react-toast/dist/index.js
|
|
5876
|
-
var ToastContext =
|
|
5831
|
+
var ToastContext = React42.createContext(null);
|
|
5877
5832
|
function useToastContext() {
|
|
5878
|
-
const ctx =
|
|
5833
|
+
const ctx = React42.useContext(ToastContext);
|
|
5879
5834
|
if (!ctx) {
|
|
5880
5835
|
throw new Error("useToast must be used within a <ToastProvider>");
|
|
5881
5836
|
}
|
|
5882
5837
|
return ctx;
|
|
5883
5838
|
}
|
|
5884
5839
|
function ToastProvider({ children }) {
|
|
5885
|
-
const managerRef =
|
|
5840
|
+
const managerRef = React42.useRef(null);
|
|
5886
5841
|
if (managerRef.current === null) {
|
|
5887
5842
|
managerRef.current = createToastManager();
|
|
5888
5843
|
}
|
|
5889
|
-
const ctx =
|
|
5844
|
+
const ctx = React42.useMemo(
|
|
5890
5845
|
() => ({ manager: managerRef.current }),
|
|
5891
5846
|
[]
|
|
5892
5847
|
);
|
|
5893
|
-
return
|
|
5848
|
+
return React42.createElement(ToastContext.Provider, { value: ctx }, children);
|
|
5894
5849
|
}
|
|
5895
5850
|
ToastProvider.displayName = "ToastProvider";
|
|
5896
5851
|
function useToast() {
|
|
5897
5852
|
const { manager } = useToastContext();
|
|
5898
|
-
const [toasts, setToasts] =
|
|
5899
|
-
|
|
5853
|
+
const [toasts, setToasts] = React42.useState(manager.toasts);
|
|
5854
|
+
React42.useEffect(() => {
|
|
5900
5855
|
setToasts(manager.toasts);
|
|
5901
5856
|
const unsub = manager.subscribe(setToasts);
|
|
5902
5857
|
return unsub;
|
|
@@ -5907,13 +5862,13 @@ function useToast() {
|
|
|
5907
5862
|
toasts
|
|
5908
5863
|
};
|
|
5909
5864
|
}
|
|
5910
|
-
var Toast =
|
|
5865
|
+
var Toast = React42.forwardRef(
|
|
5911
5866
|
({ entry, onDismiss, className, children, onMouseEnter, onMouseLeave, ...props }, ref) => {
|
|
5912
|
-
const api =
|
|
5867
|
+
const api = React42.useMemo(
|
|
5913
5868
|
() => createToast({ variant: entry.variant, duration: entry.duration }),
|
|
5914
5869
|
[entry.variant, entry.duration]
|
|
5915
5870
|
);
|
|
5916
|
-
|
|
5871
|
+
React42.useEffect(() => {
|
|
5917
5872
|
api.startTimer();
|
|
5918
5873
|
return () => api.pauseTimer();
|
|
5919
5874
|
}, [api]);
|
|
@@ -5925,7 +5880,7 @@ var Toast = React41.forwardRef(
|
|
|
5925
5880
|
api.resumeTimer();
|
|
5926
5881
|
onMouseLeave?.(e);
|
|
5927
5882
|
};
|
|
5928
|
-
return
|
|
5883
|
+
return React42.createElement(
|
|
5929
5884
|
"div",
|
|
5930
5885
|
{
|
|
5931
5886
|
ref,
|
|
@@ -5935,9 +5890,9 @@ var Toast = React41.forwardRef(
|
|
|
5935
5890
|
onMouseLeave: handleMouseLeave,
|
|
5936
5891
|
...props
|
|
5937
5892
|
},
|
|
5938
|
-
|
|
5893
|
+
React42.createElement("div", { className: "flex-1" }, entry.message),
|
|
5939
5894
|
children,
|
|
5940
|
-
onDismiss &&
|
|
5895
|
+
onDismiss && React42.createElement(
|
|
5941
5896
|
"button",
|
|
5942
5897
|
{
|
|
5943
5898
|
type: "button",
|
|
@@ -5951,10 +5906,10 @@ var Toast = React41.forwardRef(
|
|
|
5951
5906
|
}
|
|
5952
5907
|
);
|
|
5953
5908
|
Toast.displayName = "Toast";
|
|
5954
|
-
var Toaster =
|
|
5909
|
+
var Toaster = React42.forwardRef(
|
|
5955
5910
|
({ className, ...props }, ref) => {
|
|
5956
5911
|
const { toasts, dismiss } = useToast();
|
|
5957
|
-
return
|
|
5912
|
+
return React42.createElement(
|
|
5958
5913
|
"div",
|
|
5959
5914
|
{
|
|
5960
5915
|
ref,
|
|
@@ -5965,7 +5920,7 @@ var Toaster = React41.forwardRef(
|
|
|
5965
5920
|
...props
|
|
5966
5921
|
},
|
|
5967
5922
|
toasts.map(
|
|
5968
|
-
(entry) =>
|
|
5923
|
+
(entry) => React42.createElement(Toast, {
|
|
5969
5924
|
key: entry.id,
|
|
5970
5925
|
entry,
|
|
5971
5926
|
onDismiss: dismiss
|
|
@@ -6052,9 +6007,9 @@ var tooltipContentVariants = cva({
|
|
|
6052
6007
|
side: "top"
|
|
6053
6008
|
}
|
|
6054
6009
|
});
|
|
6055
|
-
var TooltipContext =
|
|
6010
|
+
var TooltipContext = React42.createContext(null);
|
|
6056
6011
|
function useTooltipContext() {
|
|
6057
|
-
const ctx =
|
|
6012
|
+
const ctx = React42.useContext(TooltipContext);
|
|
6058
6013
|
if (!ctx) {
|
|
6059
6014
|
throw new Error("Tooltip compound components must be used within <Tooltip>");
|
|
6060
6015
|
}
|
|
@@ -6068,11 +6023,11 @@ function Tooltip({
|
|
|
6068
6023
|
delayDuration = 300,
|
|
6069
6024
|
children
|
|
6070
6025
|
}) {
|
|
6071
|
-
const [internalOpen, setInternalOpen] =
|
|
6026
|
+
const [internalOpen, setInternalOpen] = React42.useState(controlledOpen ?? defaultOpen);
|
|
6072
6027
|
const isControlled = controlledOpen !== void 0;
|
|
6073
6028
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
6074
|
-
const timerRef =
|
|
6075
|
-
const handleOpenChange =
|
|
6029
|
+
const timerRef = React42.useRef(null);
|
|
6030
|
+
const handleOpenChange = React42.useCallback(
|
|
6076
6031
|
(value) => {
|
|
6077
6032
|
if (!isControlled) {
|
|
6078
6033
|
setInternalOpen(value);
|
|
@@ -6081,17 +6036,17 @@ function Tooltip({
|
|
|
6081
6036
|
},
|
|
6082
6037
|
[isControlled, onOpenChange]
|
|
6083
6038
|
);
|
|
6084
|
-
const api =
|
|
6039
|
+
const api = React42.useMemo(
|
|
6085
6040
|
() => createTooltip({ open: isOpen, onOpenChange: handleOpenChange, placement, delayDuration }),
|
|
6086
6041
|
[isOpen, handleOpenChange, placement, delayDuration]
|
|
6087
6042
|
);
|
|
6088
|
-
const cancelDelay =
|
|
6043
|
+
const cancelDelay = React42.useCallback(() => {
|
|
6089
6044
|
if (timerRef.current !== null) {
|
|
6090
6045
|
clearTimeout(timerRef.current);
|
|
6091
6046
|
timerRef.current = null;
|
|
6092
6047
|
}
|
|
6093
6048
|
}, []);
|
|
6094
|
-
const openWithDelay =
|
|
6049
|
+
const openWithDelay = React42.useCallback(() => {
|
|
6095
6050
|
cancelDelay();
|
|
6096
6051
|
if (delayDuration <= 0) {
|
|
6097
6052
|
handleOpenChange(true);
|
|
@@ -6102,21 +6057,21 @@ function Tooltip({
|
|
|
6102
6057
|
timerRef.current = null;
|
|
6103
6058
|
}, delayDuration);
|
|
6104
6059
|
}, [cancelDelay, delayDuration, handleOpenChange]);
|
|
6105
|
-
|
|
6060
|
+
React42.useEffect(() => {
|
|
6106
6061
|
return () => {
|
|
6107
6062
|
if (timerRef.current !== null) {
|
|
6108
6063
|
clearTimeout(timerRef.current);
|
|
6109
6064
|
}
|
|
6110
6065
|
};
|
|
6111
6066
|
}, []);
|
|
6112
|
-
const ctx =
|
|
6067
|
+
const ctx = React42.useMemo(
|
|
6113
6068
|
() => ({ api, open: isOpen, setOpen: handleOpenChange, openWithDelay, cancelDelay }),
|
|
6114
6069
|
[api, isOpen, handleOpenChange, openWithDelay, cancelDelay]
|
|
6115
6070
|
);
|
|
6116
|
-
return
|
|
6071
|
+
return React42.createElement(TooltipContext.Provider, { value: ctx }, children);
|
|
6117
6072
|
}
|
|
6118
6073
|
Tooltip.displayName = "Tooltip";
|
|
6119
|
-
var TooltipTrigger =
|
|
6074
|
+
var TooltipTrigger = React42.forwardRef(
|
|
6120
6075
|
({ onMouseEnter, onMouseLeave, onFocus, onBlur, children, ...props }, ref) => {
|
|
6121
6076
|
const { api, setOpen, openWithDelay, cancelDelay } = useTooltipContext();
|
|
6122
6077
|
const handleMouseEnter = (e) => {
|
|
@@ -6153,7 +6108,7 @@ var TooltipTrigger = React41.forwardRef(
|
|
|
6153
6108
|
}
|
|
6154
6109
|
);
|
|
6155
6110
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
6156
|
-
var TooltipContent =
|
|
6111
|
+
var TooltipContent = React42.forwardRef(
|
|
6157
6112
|
({ side, className, children, ...props }, ref) => {
|
|
6158
6113
|
const { api, open } = useTooltipContext();
|
|
6159
6114
|
if (!open) return null;
|
|
@@ -6273,7 +6228,7 @@ var overlayVariants = cva({
|
|
|
6273
6228
|
visibility: "visible"
|
|
6274
6229
|
}
|
|
6275
6230
|
});
|
|
6276
|
-
var VideoPlayer =
|
|
6231
|
+
var VideoPlayer = React42.forwardRef(
|
|
6277
6232
|
({
|
|
6278
6233
|
src,
|
|
6279
6234
|
poster,
|
|
@@ -6283,9 +6238,9 @@ var VideoPlayer = React41.forwardRef(
|
|
|
6283
6238
|
className,
|
|
6284
6239
|
...props
|
|
6285
6240
|
}, ref) => {
|
|
6286
|
-
const [, setTick] =
|
|
6287
|
-
const rerender =
|
|
6288
|
-
const apiRef =
|
|
6241
|
+
const [, setTick] = React42.useState(0);
|
|
6242
|
+
const rerender = React42.useCallback(() => setTick((t) => t + 1), []);
|
|
6243
|
+
const apiRef = React42.useRef(
|
|
6289
6244
|
createVideoPlayer({ muted: initialMuted})
|
|
6290
6245
|
);
|
|
6291
6246
|
const api = apiRef.current;
|
|
@@ -6452,7 +6407,7 @@ var progressBarVariants = cva({
|
|
|
6452
6407
|
size: "md"
|
|
6453
6408
|
}
|
|
6454
6409
|
});
|
|
6455
|
-
var StatsGrid =
|
|
6410
|
+
var StatsGrid = React42.forwardRef(
|
|
6456
6411
|
({ stats, badges = [], className, ...props }, ref) => {
|
|
6457
6412
|
const api = createProgressDisplay({ stats, badges });
|
|
6458
6413
|
return /* @__PURE__ */ jsx(
|
|
@@ -6481,7 +6436,7 @@ var StatsGrid = React41.forwardRef(
|
|
|
6481
6436
|
}
|
|
6482
6437
|
);
|
|
6483
6438
|
StatsGrid.displayName = "StatsGrid";
|
|
6484
|
-
var ProgressBar =
|
|
6439
|
+
var ProgressBar = React42.forwardRef(
|
|
6485
6440
|
({ value, max = 100, size, className, ...props }, ref) => {
|
|
6486
6441
|
const percent = Math.min(100, Math.max(0, value / max * 100));
|
|
6487
6442
|
return /* @__PURE__ */ jsx(
|
|
@@ -6506,7 +6461,7 @@ var ProgressBar = React41.forwardRef(
|
|
|
6506
6461
|
}
|
|
6507
6462
|
);
|
|
6508
6463
|
ProgressBar.displayName = "ProgressBar";
|
|
6509
|
-
var BadgeDisplay =
|
|
6464
|
+
var BadgeDisplay = React42.forwardRef(
|
|
6510
6465
|
({ badges, className, ...props }, ref) => {
|
|
6511
6466
|
const api = createProgressDisplay({ stats: [], badges });
|
|
6512
6467
|
return /* @__PURE__ */ jsx(
|
|
@@ -6674,7 +6629,7 @@ var slideTypeBadgeVariants = cva({
|
|
|
6674
6629
|
type: "lesson"
|
|
6675
6630
|
}
|
|
6676
6631
|
});
|
|
6677
|
-
var SlideViewer =
|
|
6632
|
+
var SlideViewer = React42.forwardRef(
|
|
6678
6633
|
({
|
|
6679
6634
|
slides,
|
|
6680
6635
|
initialSlide,
|
|
@@ -6684,9 +6639,9 @@ var SlideViewer = React41.forwardRef(
|
|
|
6684
6639
|
size,
|
|
6685
6640
|
renderSlide
|
|
6686
6641
|
}, ref) => {
|
|
6687
|
-
const [, setTick] =
|
|
6642
|
+
const [, setTick] = React42.useState(0);
|
|
6688
6643
|
const rerender = () => setTick((t) => t + 1);
|
|
6689
|
-
const apiRef =
|
|
6644
|
+
const apiRef = React42.useRef(
|
|
6690
6645
|
createSlideViewer({ slides, initialSlide, onSlideChange, onComplete })
|
|
6691
6646
|
);
|
|
6692
6647
|
const api = apiRef.current;
|
|
@@ -6888,7 +6843,7 @@ var optionVariants = cva({
|
|
|
6888
6843
|
});
|
|
6889
6844
|
|
|
6890
6845
|
// ../react-language-selector/dist/index.js
|
|
6891
|
-
var LanguageSelectorContext =
|
|
6846
|
+
var LanguageSelectorContext = React42.createContext(null);
|
|
6892
6847
|
function LanguageSelector({
|
|
6893
6848
|
value: controlledValue,
|
|
6894
6849
|
onValueChange,
|
|
@@ -6898,10 +6853,10 @@ function LanguageSelector({
|
|
|
6898
6853
|
className
|
|
6899
6854
|
}) {
|
|
6900
6855
|
const initialValues = Array.isArray(controlledValue) ? controlledValue : controlledValue ? [controlledValue] : [];
|
|
6901
|
-
const [selectedValues, setSelectedValues] =
|
|
6902
|
-
const [isOpen, setIsOpen] =
|
|
6903
|
-
const containerRef =
|
|
6904
|
-
const handleValueChange =
|
|
6856
|
+
const [selectedValues, setSelectedValues] = React42.useState(initialValues);
|
|
6857
|
+
const [isOpen, setIsOpen] = React42.useState(false);
|
|
6858
|
+
const containerRef = React42.useRef(null);
|
|
6859
|
+
const handleValueChange = React42.useCallback(
|
|
6905
6860
|
(val) => {
|
|
6906
6861
|
const arr = Array.isArray(val) ? val : [val];
|
|
6907
6862
|
setSelectedValues(arr);
|
|
@@ -6909,7 +6864,7 @@ function LanguageSelector({
|
|
|
6909
6864
|
},
|
|
6910
6865
|
[onValueChange]
|
|
6911
6866
|
);
|
|
6912
|
-
const api =
|
|
6867
|
+
const api = React42.useMemo(
|
|
6913
6868
|
() => createLanguageSelector({
|
|
6914
6869
|
value: multiple ? selectedValues : selectedValues[0],
|
|
6915
6870
|
onValueChange: handleValueChange,
|
|
@@ -6917,7 +6872,7 @@ function LanguageSelector({
|
|
|
6917
6872
|
}),
|
|
6918
6873
|
[selectedValues, handleValueChange, options, multiple]
|
|
6919
6874
|
);
|
|
6920
|
-
const handleToggle =
|
|
6875
|
+
const handleToggle = React42.useCallback(
|
|
6921
6876
|
(val) => {
|
|
6922
6877
|
if (multiple) {
|
|
6923
6878
|
const index = selectedValues.indexOf(val);
|
|
@@ -6932,10 +6887,10 @@ function LanguageSelector({
|
|
|
6932
6887
|
},
|
|
6933
6888
|
[multiple, selectedValues, onValueChange]
|
|
6934
6889
|
);
|
|
6935
|
-
const handleTriggerClick =
|
|
6890
|
+
const handleTriggerClick = React42.useCallback(() => {
|
|
6936
6891
|
setIsOpen((prev) => !prev);
|
|
6937
6892
|
}, []);
|
|
6938
|
-
const handleKeyDown =
|
|
6893
|
+
const handleKeyDown = React42.useCallback(
|
|
6939
6894
|
(e) => {
|
|
6940
6895
|
if (e.key === "Escape") {
|
|
6941
6896
|
setIsOpen(false);
|
|
@@ -6950,7 +6905,7 @@ function LanguageSelector({
|
|
|
6950
6905
|
},
|
|
6951
6906
|
[isOpen]
|
|
6952
6907
|
);
|
|
6953
|
-
|
|
6908
|
+
React42.useEffect(() => {
|
|
6954
6909
|
if (!isOpen) return;
|
|
6955
6910
|
function handleClickOutside(e) {
|
|
6956
6911
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -6960,7 +6915,7 @@ function LanguageSelector({
|
|
|
6960
6915
|
document.addEventListener("mousedown", handleClickOutside);
|
|
6961
6916
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
6962
6917
|
}, [isOpen]);
|
|
6963
|
-
const ctx =
|
|
6918
|
+
const ctx = React42.useMemo(
|
|
6964
6919
|
() => ({
|
|
6965
6920
|
api,
|
|
6966
6921
|
isOpen,
|
|
@@ -6971,7 +6926,7 @@ function LanguageSelector({
|
|
|
6971
6926
|
}),
|
|
6972
6927
|
[api, isOpen, handleToggle, options, multiple]
|
|
6973
6928
|
);
|
|
6974
|
-
const grouped =
|
|
6929
|
+
const grouped = React42.useMemo(() => {
|
|
6975
6930
|
const groups = /* @__PURE__ */ new Map();
|
|
6976
6931
|
const ungrouped = [];
|
|
6977
6932
|
for (const opt of options) {
|
|
@@ -6986,14 +6941,14 @@ function LanguageSelector({
|
|
|
6986
6941
|
return { groups, ungrouped };
|
|
6987
6942
|
}, [options]);
|
|
6988
6943
|
const displayLabel = selectedValues.length > 0 ? options.filter((o) => selectedValues.includes(o.value)).map((o) => o.label).join(", ") : placeholder;
|
|
6989
|
-
return
|
|
6944
|
+
return React42.createElement(
|
|
6990
6945
|
LanguageSelectorContext.Provider,
|
|
6991
6946
|
{ value: ctx },
|
|
6992
|
-
|
|
6947
|
+
React42.createElement(
|
|
6993
6948
|
"div",
|
|
6994
6949
|
{ ref: containerRef, className: cn("rfr-language-selector relative inline-block", className) },
|
|
6995
6950
|
// Trigger
|
|
6996
|
-
|
|
6951
|
+
React42.createElement(
|
|
6997
6952
|
"button",
|
|
6998
6953
|
{
|
|
6999
6954
|
type: "button",
|
|
@@ -7005,11 +6960,11 @@ function LanguageSelector({
|
|
|
7005
6960
|
onClick: handleTriggerClick,
|
|
7006
6961
|
onKeyDown: handleKeyDown
|
|
7007
6962
|
},
|
|
7008
|
-
|
|
7009
|
-
|
|
6963
|
+
React42.createElement("span", null, displayLabel),
|
|
6964
|
+
React42.createElement("span", { "aria-hidden": "true", className: "ml-2" }, "\u25BE")
|
|
7010
6965
|
),
|
|
7011
6966
|
// Dropdown
|
|
7012
|
-
isOpen &&
|
|
6967
|
+
isOpen && React42.createElement(
|
|
7013
6968
|
"ul",
|
|
7014
6969
|
{
|
|
7015
6970
|
role: api.contentProps.role,
|
|
@@ -7018,21 +6973,21 @@ function LanguageSelector({
|
|
|
7018
6973
|
className: "absolute top-full left-0 w-full mt-1 rounded-md border bg-popover text-popover-foreground shadow-md z-50 overflow-auto max-h-60"
|
|
7019
6974
|
},
|
|
7020
6975
|
...[...grouped.groups.entries()].map(
|
|
7021
|
-
([group, opts]) =>
|
|
6976
|
+
([group, opts]) => React42.createElement(
|
|
7022
6977
|
"li",
|
|
7023
6978
|
{ key: group, role: "presentation" },
|
|
7024
|
-
|
|
6979
|
+
React42.createElement(
|
|
7025
6980
|
"div",
|
|
7026
6981
|
{ className: "px-3 py-1 text-xs font-semibold text-muted-foreground uppercase" },
|
|
7027
6982
|
group
|
|
7028
6983
|
),
|
|
7029
|
-
|
|
6984
|
+
React42.createElement(
|
|
7030
6985
|
"ul",
|
|
7031
6986
|
{ role: "group", "aria-label": group },
|
|
7032
6987
|
...opts.map((opt) => {
|
|
7033
6988
|
const optProps = api.getOptionProps(opt.value);
|
|
7034
6989
|
const isSelected = selectedValues.includes(opt.value);
|
|
7035
|
-
return
|
|
6990
|
+
return React42.createElement(
|
|
7036
6991
|
"li",
|
|
7037
6992
|
{
|
|
7038
6993
|
key: opt.value,
|
|
@@ -7040,8 +6995,8 @@ function LanguageSelector({
|
|
|
7040
6995
|
className: optionVariants({ selected: isSelected ? "true" : "false" }),
|
|
7041
6996
|
onClick: () => handleToggle(opt.value)
|
|
7042
6997
|
},
|
|
7043
|
-
isSelected &&
|
|
7044
|
-
|
|
6998
|
+
isSelected && React42.createElement("span", { "aria-hidden": "true" }, "\u2713"),
|
|
6999
|
+
React42.createElement("span", null, opt.label)
|
|
7045
7000
|
);
|
|
7046
7001
|
})
|
|
7047
7002
|
)
|
|
@@ -7050,7 +7005,7 @@ function LanguageSelector({
|
|
|
7050
7005
|
...grouped.ungrouped.map((opt) => {
|
|
7051
7006
|
const optProps = api.getOptionProps(opt.value);
|
|
7052
7007
|
const isSelected = selectedValues.includes(opt.value);
|
|
7053
|
-
return
|
|
7008
|
+
return React42.createElement(
|
|
7054
7009
|
"li",
|
|
7055
7010
|
{
|
|
7056
7011
|
key: opt.value,
|
|
@@ -7058,8 +7013,8 @@ function LanguageSelector({
|
|
|
7058
7013
|
className: optionVariants({ selected: isSelected ? "true" : "false" }),
|
|
7059
7014
|
onClick: () => handleToggle(opt.value)
|
|
7060
7015
|
},
|
|
7061
|
-
isSelected &&
|
|
7062
|
-
|
|
7016
|
+
isSelected && React42.createElement("span", { "aria-hidden": "true" }, "\u2713"),
|
|
7017
|
+
React42.createElement("span", null, opt.label)
|
|
7063
7018
|
);
|
|
7064
7019
|
})
|
|
7065
7020
|
)
|
|
@@ -7184,7 +7139,7 @@ var latestBadgeVariants = cva({
|
|
|
7184
7139
|
});
|
|
7185
7140
|
|
|
7186
7141
|
// ../react-version-selector/dist/index.js
|
|
7187
|
-
var VersionSelectorContext =
|
|
7142
|
+
var VersionSelectorContext = React42.createContext(null);
|
|
7188
7143
|
function VersionSelector({
|
|
7189
7144
|
value: controlledValue,
|
|
7190
7145
|
onValueChange,
|
|
@@ -7192,17 +7147,17 @@ function VersionSelector({
|
|
|
7192
7147
|
placeholder = "Select version...",
|
|
7193
7148
|
className
|
|
7194
7149
|
}) {
|
|
7195
|
-
const [selectedVersion, setSelectedVersion] =
|
|
7196
|
-
const [isOpen, setIsOpen] =
|
|
7197
|
-
const containerRef =
|
|
7198
|
-
const handleValueChange =
|
|
7150
|
+
const [selectedVersion, setSelectedVersion] = React42.useState(controlledValue ?? "");
|
|
7151
|
+
const [isOpen, setIsOpen] = React42.useState(false);
|
|
7152
|
+
const containerRef = React42.useRef(null);
|
|
7153
|
+
const handleValueChange = React42.useCallback(
|
|
7199
7154
|
(val) => {
|
|
7200
7155
|
setSelectedVersion(val);
|
|
7201
7156
|
onValueChange?.(val);
|
|
7202
7157
|
},
|
|
7203
7158
|
[onValueChange]
|
|
7204
7159
|
);
|
|
7205
|
-
const api =
|
|
7160
|
+
const api = React42.useMemo(
|
|
7206
7161
|
() => createVersionSelector({
|
|
7207
7162
|
value: selectedVersion,
|
|
7208
7163
|
onValueChange: handleValueChange,
|
|
@@ -7210,7 +7165,7 @@ function VersionSelector({
|
|
|
7210
7165
|
}),
|
|
7211
7166
|
[selectedVersion, handleValueChange, versions]
|
|
7212
7167
|
);
|
|
7213
|
-
const handleSelect =
|
|
7168
|
+
const handleSelect = React42.useCallback(
|
|
7214
7169
|
(val) => {
|
|
7215
7170
|
setSelectedVersion(val);
|
|
7216
7171
|
onValueChange?.(val);
|
|
@@ -7218,10 +7173,10 @@ function VersionSelector({
|
|
|
7218
7173
|
},
|
|
7219
7174
|
[onValueChange]
|
|
7220
7175
|
);
|
|
7221
|
-
const handleTriggerClick =
|
|
7176
|
+
const handleTriggerClick = React42.useCallback(() => {
|
|
7222
7177
|
setIsOpen((prev) => !prev);
|
|
7223
7178
|
}, []);
|
|
7224
|
-
const handleKeyDown =
|
|
7179
|
+
const handleKeyDown = React42.useCallback(
|
|
7225
7180
|
(e) => {
|
|
7226
7181
|
if (e.key === "Escape") {
|
|
7227
7182
|
setIsOpen(false);
|
|
@@ -7236,7 +7191,7 @@ function VersionSelector({
|
|
|
7236
7191
|
},
|
|
7237
7192
|
[isOpen]
|
|
7238
7193
|
);
|
|
7239
|
-
|
|
7194
|
+
React42.useEffect(() => {
|
|
7240
7195
|
if (!isOpen) return;
|
|
7241
7196
|
function handleClickOutside(e) {
|
|
7242
7197
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -7246,7 +7201,7 @@ function VersionSelector({
|
|
|
7246
7201
|
document.addEventListener("mousedown", handleClickOutside);
|
|
7247
7202
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
7248
7203
|
}, [isOpen]);
|
|
7249
|
-
const ctx =
|
|
7204
|
+
const ctx = React42.useMemo(
|
|
7250
7205
|
() => ({
|
|
7251
7206
|
api,
|
|
7252
7207
|
isOpen,
|
|
@@ -7258,14 +7213,14 @@ function VersionSelector({
|
|
|
7258
7213
|
);
|
|
7259
7214
|
const selectedOpt = versions.find((v) => v.value === selectedVersion);
|
|
7260
7215
|
const displayLabel = selectedOpt ? selectedOpt.label : placeholder;
|
|
7261
|
-
return
|
|
7216
|
+
return React42.createElement(
|
|
7262
7217
|
VersionSelectorContext.Provider,
|
|
7263
7218
|
{ value: ctx },
|
|
7264
|
-
|
|
7219
|
+
React42.createElement(
|
|
7265
7220
|
"div",
|
|
7266
7221
|
{ ref: containerRef, className: cn("rfr-version-selector relative inline-block", className) },
|
|
7267
7222
|
// Trigger
|
|
7268
|
-
|
|
7223
|
+
React42.createElement(
|
|
7269
7224
|
"button",
|
|
7270
7225
|
{
|
|
7271
7226
|
type: "button",
|
|
@@ -7277,16 +7232,16 @@ function VersionSelector({
|
|
|
7277
7232
|
onClick: handleTriggerClick,
|
|
7278
7233
|
onKeyDown: handleKeyDown
|
|
7279
7234
|
},
|
|
7280
|
-
|
|
7281
|
-
selectedOpt?.isLatest &&
|
|
7235
|
+
React42.createElement("span", null, displayLabel),
|
|
7236
|
+
selectedOpt?.isLatest && React42.createElement(
|
|
7282
7237
|
"span",
|
|
7283
7238
|
{ className: cn(latestBadgeVariants(), "ml-2") },
|
|
7284
7239
|
"Latest"
|
|
7285
7240
|
),
|
|
7286
|
-
|
|
7241
|
+
React42.createElement("span", { "aria-hidden": "true", className: "ml-2" }, "\u25BE")
|
|
7287
7242
|
),
|
|
7288
7243
|
// Dropdown
|
|
7289
|
-
isOpen &&
|
|
7244
|
+
isOpen && React42.createElement(
|
|
7290
7245
|
"ul",
|
|
7291
7246
|
{
|
|
7292
7247
|
role: api.contentProps.role,
|
|
@@ -7296,7 +7251,7 @@ function VersionSelector({
|
|
|
7296
7251
|
...versions.map((ver) => {
|
|
7297
7252
|
const optProps = api.getOptionProps(ver.value);
|
|
7298
7253
|
const isSelected = selectedVersion === ver.value;
|
|
7299
|
-
return
|
|
7254
|
+
return React42.createElement(
|
|
7300
7255
|
"li",
|
|
7301
7256
|
{
|
|
7302
7257
|
key: ver.value,
|
|
@@ -7304,8 +7259,8 @@ function VersionSelector({
|
|
|
7304
7259
|
className: optionVariants2({ selected: isSelected ? "true" : "false" }),
|
|
7305
7260
|
onClick: () => handleSelect(ver.value)
|
|
7306
7261
|
},
|
|
7307
|
-
|
|
7308
|
-
ver.isLatest &&
|
|
7262
|
+
React42.createElement("span", null, ver.label),
|
|
7263
|
+
ver.isLatest && React42.createElement(
|
|
7309
7264
|
"span",
|
|
7310
7265
|
{ className: latestBadgeVariants() },
|
|
7311
7266
|
"Latest"
|
|
@@ -7448,15 +7403,15 @@ var resizablePaneVariants = cva({
|
|
|
7448
7403
|
orientation: "horizontal"
|
|
7449
7404
|
}
|
|
7450
7405
|
});
|
|
7451
|
-
var ResizableLayoutContext =
|
|
7406
|
+
var ResizableLayoutContext = React42.createContext(null);
|
|
7452
7407
|
function useResizableLayoutContext() {
|
|
7453
|
-
const ctx =
|
|
7408
|
+
const ctx = React42.useContext(ResizableLayoutContext);
|
|
7454
7409
|
if (!ctx) {
|
|
7455
7410
|
throw new Error("Resizable compound components must be used within <ResizableLayout>");
|
|
7456
7411
|
}
|
|
7457
7412
|
return ctx;
|
|
7458
7413
|
}
|
|
7459
|
-
var ResizableLayout =
|
|
7414
|
+
var ResizableLayout = React42.forwardRef(
|
|
7460
7415
|
({
|
|
7461
7416
|
orientation = "horizontal",
|
|
7462
7417
|
defaultSizes = [50, 50],
|
|
@@ -7469,7 +7424,7 @@ var ResizableLayout = React41.forwardRef(
|
|
|
7469
7424
|
children,
|
|
7470
7425
|
...props
|
|
7471
7426
|
}, ref) => {
|
|
7472
|
-
const apiRef =
|
|
7427
|
+
const apiRef = React42.useRef(null);
|
|
7473
7428
|
if (!apiRef.current) {
|
|
7474
7429
|
apiRef.current = createResizableLayout({
|
|
7475
7430
|
orientation,
|
|
@@ -7480,22 +7435,22 @@ var ResizableLayout = React41.forwardRef(
|
|
|
7480
7435
|
});
|
|
7481
7436
|
}
|
|
7482
7437
|
const api = apiRef.current;
|
|
7483
|
-
const [sizes, setSizesState] =
|
|
7484
|
-
const setSizes =
|
|
7438
|
+
const [sizes, setSizesState] = React42.useState(api.sizes);
|
|
7439
|
+
const setSizes = React42.useCallback(
|
|
7485
7440
|
(newSizes) => {
|
|
7486
7441
|
setSizesState([...newSizes]);
|
|
7487
7442
|
onSizesChange?.(newSizes);
|
|
7488
7443
|
},
|
|
7489
7444
|
[onSizesChange]
|
|
7490
7445
|
);
|
|
7491
|
-
const cssVars =
|
|
7446
|
+
const cssVars = React42.useMemo(() => {
|
|
7492
7447
|
const vars = {};
|
|
7493
7448
|
for (let i = 0; i < sizes.length; i++) {
|
|
7494
7449
|
vars[`--rfr-pane-${i}-size`] = `${sizes[i]}%`;
|
|
7495
7450
|
}
|
|
7496
7451
|
return vars;
|
|
7497
7452
|
}, [sizes]);
|
|
7498
|
-
const contextValue =
|
|
7453
|
+
const contextValue = React42.useMemo(
|
|
7499
7454
|
() => ({ api, orientation, sizes, setSizes }),
|
|
7500
7455
|
[api, orientation, sizes, setSizes]
|
|
7501
7456
|
);
|
|
@@ -7513,7 +7468,7 @@ var ResizableLayout = React41.forwardRef(
|
|
|
7513
7468
|
}
|
|
7514
7469
|
);
|
|
7515
7470
|
ResizableLayout.displayName = "ResizableLayout";
|
|
7516
|
-
var ResizablePane =
|
|
7471
|
+
var ResizablePane = React42.forwardRef(
|
|
7517
7472
|
({ index, className, style, children, ...props }, ref) => {
|
|
7518
7473
|
const { orientation, sizes } = useResizableLayoutContext();
|
|
7519
7474
|
const size = sizes[index] ?? 50;
|
|
@@ -7537,12 +7492,12 @@ var ResizablePane = React41.forwardRef(
|
|
|
7537
7492
|
}
|
|
7538
7493
|
);
|
|
7539
7494
|
ResizablePane.displayName = "ResizablePane";
|
|
7540
|
-
var ResizableDivider =
|
|
7495
|
+
var ResizableDivider = React42.forwardRef(
|
|
7541
7496
|
({ index, className, ...props }, ref) => {
|
|
7542
7497
|
const { api, orientation, setSizes } = useResizableLayoutContext();
|
|
7543
|
-
const startPosRef =
|
|
7544
|
-
const containerSizeRef =
|
|
7545
|
-
const onPointerDown =
|
|
7498
|
+
const startPosRef = React42.useRef(0);
|
|
7499
|
+
const containerSizeRef = React42.useRef(0);
|
|
7500
|
+
const onPointerDown = React42.useCallback(
|
|
7546
7501
|
(e) => {
|
|
7547
7502
|
e.preventDefault();
|
|
7548
7503
|
const target = e.currentTarget;
|
|
@@ -7556,7 +7511,7 @@ var ResizableDivider = React41.forwardRef(
|
|
|
7556
7511
|
},
|
|
7557
7512
|
[api, index, orientation]
|
|
7558
7513
|
);
|
|
7559
|
-
const onPointerMove =
|
|
7514
|
+
const onPointerMove = React42.useCallback(
|
|
7560
7515
|
(e) => {
|
|
7561
7516
|
if (containerSizeRef.current === 0) return;
|
|
7562
7517
|
const currentPos = orientation === "horizontal" ? e.clientX : e.clientY;
|
|
@@ -7567,7 +7522,7 @@ var ResizableDivider = React41.forwardRef(
|
|
|
7567
7522
|
},
|
|
7568
7523
|
[api, orientation, setSizes]
|
|
7569
7524
|
);
|
|
7570
|
-
const onPointerUp =
|
|
7525
|
+
const onPointerUp = React42.useCallback(
|
|
7571
7526
|
(e) => {
|
|
7572
7527
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7573
7528
|
containerSizeRef.current = 0;
|
|
@@ -7622,7 +7577,10 @@ function makeState(sidebarOpen, sidebarCollapsed, breakpoint) {
|
|
|
7622
7577
|
};
|
|
7623
7578
|
}
|
|
7624
7579
|
function createAppShell(config) {
|
|
7625
|
-
const resolved = {
|
|
7580
|
+
const resolved = {
|
|
7581
|
+
...DEFAULTS,
|
|
7582
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7583
|
+
};
|
|
7626
7584
|
let sidebarOpen = false;
|
|
7627
7585
|
let sidebarCollapsed = resolved.sidebarDefaultCollapsed;
|
|
7628
7586
|
let breakpoint = "desktop";
|
|
@@ -7731,7 +7689,10 @@ var BACKGROUND_CLASSES = {
|
|
|
7731
7689
|
none: ""
|
|
7732
7690
|
};
|
|
7733
7691
|
function createPageShell(config) {
|
|
7734
|
-
const resolved = {
|
|
7692
|
+
const resolved = {
|
|
7693
|
+
...DEFAULTS2,
|
|
7694
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7695
|
+
};
|
|
7735
7696
|
function getSectionClasses(sectionConfig) {
|
|
7736
7697
|
const {
|
|
7737
7698
|
fullWidth = false,
|
|
@@ -7789,7 +7750,10 @@ var MAX_WIDTH_CLASSES = {
|
|
|
7789
7750
|
md: "max-w-md"
|
|
7790
7751
|
};
|
|
7791
7752
|
function createAuthShell(config) {
|
|
7792
|
-
const resolved = {
|
|
7753
|
+
const resolved = {
|
|
7754
|
+
...DEFAULTS3,
|
|
7755
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7756
|
+
};
|
|
7793
7757
|
const containerParts = ["min-h-screen", "flex", "w-full"];
|
|
7794
7758
|
if (resolved.position === "center") {
|
|
7795
7759
|
containerParts.push("items-center", "justify-center");
|
|
@@ -7820,26 +7784,26 @@ function createAuthShell(config) {
|
|
|
7820
7784
|
}
|
|
7821
7785
|
|
|
7822
7786
|
// ../react-app-shell/dist/index.js
|
|
7823
|
-
var AppShellContext =
|
|
7787
|
+
var AppShellContext = React42.createContext(null);
|
|
7824
7788
|
function useAppShell() {
|
|
7825
|
-
const ctx =
|
|
7789
|
+
const ctx = React42.useContext(AppShellContext);
|
|
7826
7790
|
if (!ctx) {
|
|
7827
7791
|
throw new Error("useAppShell must be used within <AppShell>");
|
|
7828
7792
|
}
|
|
7829
7793
|
return ctx;
|
|
7830
7794
|
}
|
|
7831
7795
|
function AppShellRoot({ config, children, className }) {
|
|
7832
|
-
const apiRef =
|
|
7796
|
+
const apiRef = React42.useRef(null);
|
|
7833
7797
|
if (apiRef.current === null) {
|
|
7834
7798
|
apiRef.current = createAppShell(config);
|
|
7835
7799
|
}
|
|
7836
7800
|
const api = apiRef.current;
|
|
7837
|
-
const [state, setState] =
|
|
7838
|
-
|
|
7801
|
+
const [state, setState] = React42.useState(() => api.state);
|
|
7802
|
+
React42.useEffect(() => {
|
|
7839
7803
|
setState(api.state);
|
|
7840
7804
|
return api.subscribe((s) => setState(s));
|
|
7841
7805
|
}, [api]);
|
|
7842
|
-
|
|
7806
|
+
React42.useEffect(() => {
|
|
7843
7807
|
if (typeof window === "undefined") return;
|
|
7844
7808
|
const { mobileBreakpoint, tabletBreakpoint } = api.config;
|
|
7845
7809
|
const mobileQuery = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
@@ -7860,14 +7824,14 @@ function AppShellRoot({ config, children, className }) {
|
|
|
7860
7824
|
};
|
|
7861
7825
|
}, [api]);
|
|
7862
7826
|
const cssVars = api.getCSSVariables();
|
|
7863
|
-
const ctxValue =
|
|
7827
|
+
const ctxValue = React42.useMemo(
|
|
7864
7828
|
() => ({ api, state }),
|
|
7865
7829
|
[api, state]
|
|
7866
7830
|
);
|
|
7867
|
-
return
|
|
7831
|
+
return React42.createElement(
|
|
7868
7832
|
AppShellContext.Provider,
|
|
7869
7833
|
{ value: ctxValue },
|
|
7870
|
-
|
|
7834
|
+
React42.createElement(
|
|
7871
7835
|
"div",
|
|
7872
7836
|
{
|
|
7873
7837
|
className: cn("flex h-screen w-full overflow-hidden", className),
|
|
@@ -7897,7 +7861,7 @@ function Sidebar2({ children, className }) {
|
|
|
7897
7861
|
"w-[var(--shell-sidebar-full-width)]",
|
|
7898
7862
|
state.sidebarOpen ? "translate-x-0" : isRight ? "translate-x-full" : "-translate-x-full"
|
|
7899
7863
|
] : ["relative", "w-[var(--shell-sidebar-width)]"];
|
|
7900
|
-
return
|
|
7864
|
+
return React42.createElement(
|
|
7901
7865
|
"aside",
|
|
7902
7866
|
{
|
|
7903
7867
|
...api.sidebarAriaProps,
|
|
@@ -7910,7 +7874,7 @@ function Sidebar2({ children, className }) {
|
|
|
7910
7874
|
}
|
|
7911
7875
|
Sidebar2.displayName = "AppShell.Sidebar";
|
|
7912
7876
|
function Main({ children, className }) {
|
|
7913
|
-
return
|
|
7877
|
+
return React42.createElement(
|
|
7914
7878
|
"div",
|
|
7915
7879
|
{
|
|
7916
7880
|
className: cn("flex flex-1 flex-col min-w-0 h-full", className)
|
|
@@ -7921,7 +7885,7 @@ function Main({ children, className }) {
|
|
|
7921
7885
|
Main.displayName = "AppShell.Main";
|
|
7922
7886
|
function Header({ children, className }) {
|
|
7923
7887
|
const { api, state } = useAppShell();
|
|
7924
|
-
const hamburger = state.isMobile ?
|
|
7888
|
+
const hamburger = state.isMobile ? React42.createElement(
|
|
7925
7889
|
"button",
|
|
7926
7890
|
{
|
|
7927
7891
|
type: "button",
|
|
@@ -7931,7 +7895,7 @@ function Header({ children, className }) {
|
|
|
7931
7895
|
onClick: () => api.toggleSidebar(),
|
|
7932
7896
|
className: "inline-flex items-center justify-center p-2 mr-2"
|
|
7933
7897
|
},
|
|
7934
|
-
|
|
7898
|
+
React42.createElement(
|
|
7935
7899
|
"svg",
|
|
7936
7900
|
{
|
|
7937
7901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7945,12 +7909,12 @@ function Header({ children, className }) {
|
|
|
7945
7909
|
strokeLinejoin: "round",
|
|
7946
7910
|
"aria-hidden": "true"
|
|
7947
7911
|
},
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7912
|
+
React42.createElement("line", { x1: 3, y1: 6, x2: 21, y2: 6 }),
|
|
7913
|
+
React42.createElement("line", { x1: 3, y1: 12, x2: 21, y2: 12 }),
|
|
7914
|
+
React42.createElement("line", { x1: 3, y1: 18, x2: 21, y2: 18 })
|
|
7951
7915
|
)
|
|
7952
7916
|
) : null;
|
|
7953
|
-
return
|
|
7917
|
+
return React42.createElement(
|
|
7954
7918
|
"header",
|
|
7955
7919
|
{
|
|
7956
7920
|
...api.headerAriaProps,
|
|
@@ -7969,7 +7933,7 @@ Header.displayName = "AppShell.Header";
|
|
|
7969
7933
|
function Content({ children, className, maxWidth }) {
|
|
7970
7934
|
const { api } = useAppShell();
|
|
7971
7935
|
const mwClass = maxWidth ? `max-w-${maxWidth}` : "";
|
|
7972
|
-
return
|
|
7936
|
+
return React42.createElement(
|
|
7973
7937
|
"main",
|
|
7974
7938
|
{
|
|
7975
7939
|
...api.mainAriaProps,
|
|
@@ -7988,7 +7952,7 @@ function MobileNav2({ children, className }) {
|
|
|
7988
7952
|
const { api, state } = useAppShell();
|
|
7989
7953
|
if (!state.isMobile) return null;
|
|
7990
7954
|
if (api.config.mobileNavPosition === "none") return null;
|
|
7991
|
-
return
|
|
7955
|
+
return React42.createElement(
|
|
7992
7956
|
"nav",
|
|
7993
7957
|
{
|
|
7994
7958
|
...api.mobileNavAriaProps,
|
|
@@ -8007,7 +7971,7 @@ MobileNav2.displayName = "AppShell.MobileNav";
|
|
|
8007
7971
|
function Overlay({ className }) {
|
|
8008
7972
|
const { api, state } = useAppShell();
|
|
8009
7973
|
if (!state.isMobile || !state.sidebarOpen) return null;
|
|
8010
|
-
return
|
|
7974
|
+
return React42.createElement("div", {
|
|
8011
7975
|
...api.overlayAriaProps,
|
|
8012
7976
|
className: cn(
|
|
8013
7977
|
"fixed inset-0 z-30 bg-black/50 transition-opacity",
|
|
@@ -8026,29 +7990,29 @@ var AppShell = Object.assign(AppShellRoot, {
|
|
|
8026
7990
|
MobileNav: MobileNav2,
|
|
8027
7991
|
Overlay
|
|
8028
7992
|
});
|
|
8029
|
-
var PageShellContext =
|
|
7993
|
+
var PageShellContext = React42.createContext(null);
|
|
8030
7994
|
function usePageShell() {
|
|
8031
|
-
const ctx =
|
|
7995
|
+
const ctx = React42.useContext(PageShellContext);
|
|
8032
7996
|
if (!ctx) {
|
|
8033
7997
|
throw new Error("PageShell compound components must be used within <PageShell>");
|
|
8034
7998
|
}
|
|
8035
7999
|
return ctx;
|
|
8036
8000
|
}
|
|
8037
8001
|
function PageShellRoot({ config, children, className }) {
|
|
8038
|
-
const apiRef =
|
|
8002
|
+
const apiRef = React42.useRef(null);
|
|
8039
8003
|
if (apiRef.current === null) {
|
|
8040
8004
|
apiRef.current = createPageShell(config);
|
|
8041
8005
|
}
|
|
8042
8006
|
const api = apiRef.current;
|
|
8043
8007
|
const cssVars = api.getCSSVariables();
|
|
8044
|
-
const ctxValue =
|
|
8008
|
+
const ctxValue = React42.useMemo(
|
|
8045
8009
|
() => ({ api }),
|
|
8046
8010
|
[api]
|
|
8047
8011
|
);
|
|
8048
|
-
return
|
|
8012
|
+
return React42.createElement(
|
|
8049
8013
|
PageShellContext.Provider,
|
|
8050
8014
|
{ value: ctxValue },
|
|
8051
|
-
|
|
8015
|
+
React42.createElement(
|
|
8052
8016
|
"div",
|
|
8053
8017
|
{
|
|
8054
8018
|
className: cn("flex min-h-screen flex-col", className),
|
|
@@ -8064,7 +8028,7 @@ function Nav({ children, className }) {
|
|
|
8064
8028
|
const { api } = usePageShell();
|
|
8065
8029
|
const stickyClass = api.config.navSticky ? "sticky top-0 z-40" : "";
|
|
8066
8030
|
const transparentClass = api.config.navTransparent ? "bg-transparent" : "bg-background border-b";
|
|
8067
|
-
return
|
|
8031
|
+
return React42.createElement(
|
|
8068
8032
|
"nav",
|
|
8069
8033
|
{
|
|
8070
8034
|
...api.navAriaProps,
|
|
@@ -8089,7 +8053,7 @@ function Section({
|
|
|
8089
8053
|
}) {
|
|
8090
8054
|
const { api } = usePageShell();
|
|
8091
8055
|
const sectionClasses = api.getSectionClasses({ fullWidth, maxWidth, padding, background });
|
|
8092
|
-
return
|
|
8056
|
+
return React42.createElement(
|
|
8093
8057
|
"section",
|
|
8094
8058
|
{
|
|
8095
8059
|
className: cn("py-12", sectionClasses, className)
|
|
@@ -8101,7 +8065,7 @@ Section.displayName = "PageShell.Section";
|
|
|
8101
8065
|
function Footer2({ children, className, columns }) {
|
|
8102
8066
|
const { api } = usePageShell();
|
|
8103
8067
|
const cols = columns ?? api.config.footerColumns;
|
|
8104
|
-
return
|
|
8068
|
+
return React42.createElement(
|
|
8105
8069
|
"footer",
|
|
8106
8070
|
{
|
|
8107
8071
|
...api.footerAriaProps,
|
|
@@ -8110,7 +8074,7 @@ function Footer2({ children, className, columns }) {
|
|
|
8110
8074
|
className
|
|
8111
8075
|
)
|
|
8112
8076
|
},
|
|
8113
|
-
|
|
8077
|
+
React42.createElement(
|
|
8114
8078
|
"div",
|
|
8115
8079
|
{
|
|
8116
8080
|
className: `mx-auto max-w-[var(--page-max-width)] grid gap-8`,
|
|
@@ -8128,28 +8092,28 @@ Object.assign(PageShellRoot, {
|
|
|
8128
8092
|
Section,
|
|
8129
8093
|
Footer: Footer2
|
|
8130
8094
|
});
|
|
8131
|
-
var AuthShellContext =
|
|
8095
|
+
var AuthShellContext = React42.createContext(null);
|
|
8132
8096
|
function useAuthShell() {
|
|
8133
|
-
const ctx =
|
|
8097
|
+
const ctx = React42.useContext(AuthShellContext);
|
|
8134
8098
|
if (!ctx) {
|
|
8135
8099
|
throw new Error("AuthShell compound components must be used within <AuthShell>");
|
|
8136
8100
|
}
|
|
8137
8101
|
return ctx;
|
|
8138
8102
|
}
|
|
8139
8103
|
function AuthShellRoot({ config, children, className }) {
|
|
8140
|
-
const apiRef =
|
|
8104
|
+
const apiRef = React42.useRef(null);
|
|
8141
8105
|
if (apiRef.current === null) {
|
|
8142
8106
|
apiRef.current = createAuthShell(config);
|
|
8143
8107
|
}
|
|
8144
8108
|
const api = apiRef.current;
|
|
8145
|
-
const ctxValue =
|
|
8109
|
+
const ctxValue = React42.useMemo(
|
|
8146
8110
|
() => ({ api }),
|
|
8147
8111
|
[api]
|
|
8148
8112
|
);
|
|
8149
|
-
return
|
|
8113
|
+
return React42.createElement(
|
|
8150
8114
|
AuthShellContext.Provider,
|
|
8151
8115
|
{ value: ctxValue },
|
|
8152
|
-
|
|
8116
|
+
React42.createElement(
|
|
8153
8117
|
"div",
|
|
8154
8118
|
{
|
|
8155
8119
|
...api.ariaProps,
|
|
@@ -8163,7 +8127,7 @@ function AuthShellRoot({ config, children, className }) {
|
|
|
8163
8127
|
AuthShellRoot.displayName = "AuthShell";
|
|
8164
8128
|
function Card({ children, className }) {
|
|
8165
8129
|
const { api } = useAuthShell();
|
|
8166
|
-
return
|
|
8130
|
+
return React42.createElement(
|
|
8167
8131
|
"div",
|
|
8168
8132
|
{
|
|
8169
8133
|
className: cn(api.cardClasses, className),
|
|
@@ -8251,7 +8215,7 @@ var avatarFallbackVariants = cva({
|
|
|
8251
8215
|
size: "md"
|
|
8252
8216
|
}
|
|
8253
8217
|
});
|
|
8254
|
-
var AvatarContext =
|
|
8218
|
+
var AvatarContext = React42.createContext({
|
|
8255
8219
|
size: "md",
|
|
8256
8220
|
imageLoaded: false,
|
|
8257
8221
|
imageError: false,
|
|
@@ -8260,10 +8224,10 @@ var AvatarContext = React41.createContext({
|
|
|
8260
8224
|
setImageError: () => {
|
|
8261
8225
|
}
|
|
8262
8226
|
});
|
|
8263
|
-
var Avatar =
|
|
8227
|
+
var Avatar = React42.forwardRef(
|
|
8264
8228
|
({ size = "md", className, children, ...props }, ref) => {
|
|
8265
|
-
const [imageLoaded, setImageLoaded] =
|
|
8266
|
-
const [imageError, setImageError] =
|
|
8229
|
+
const [imageLoaded, setImageLoaded] = React42.useState(false);
|
|
8230
|
+
const [imageError, setImageError] = React42.useState(false);
|
|
8267
8231
|
const api = createAvatar({ size });
|
|
8268
8232
|
return /* @__PURE__ */ jsx(AvatarContext.Provider, { value: { size, imageLoaded, imageError, setImageLoaded, setImageError }, children: /* @__PURE__ */ jsx(
|
|
8269
8233
|
"span",
|
|
@@ -8279,9 +8243,9 @@ var Avatar = React41.forwardRef(
|
|
|
8279
8243
|
}
|
|
8280
8244
|
);
|
|
8281
8245
|
Avatar.displayName = "Avatar";
|
|
8282
|
-
var AvatarImage =
|
|
8246
|
+
var AvatarImage = React42.forwardRef(
|
|
8283
8247
|
({ className, src, alt = "", onLoad, onError, ...props }, ref) => {
|
|
8284
|
-
const { setImageLoaded, setImageError } =
|
|
8248
|
+
const { setImageLoaded, setImageError } = React42.useContext(AvatarContext);
|
|
8285
8249
|
const handleLoad = (e) => {
|
|
8286
8250
|
setImageLoaded(true);
|
|
8287
8251
|
onLoad?.(e);
|
|
@@ -8305,9 +8269,9 @@ var AvatarImage = React41.forwardRef(
|
|
|
8305
8269
|
}
|
|
8306
8270
|
);
|
|
8307
8271
|
AvatarImage.displayName = "AvatarImage";
|
|
8308
|
-
var AvatarFallback =
|
|
8272
|
+
var AvatarFallback = React42.forwardRef(
|
|
8309
8273
|
({ className, children, ...props }, ref) => {
|
|
8310
|
-
const { size } =
|
|
8274
|
+
const { size } = React42.useContext(AvatarContext);
|
|
8311
8275
|
return /* @__PURE__ */ jsx(
|
|
8312
8276
|
"span",
|
|
8313
8277
|
{
|
|
@@ -8424,28 +8388,28 @@ var avatarPresenceDotVariants = cva({
|
|
|
8424
8388
|
// ../react-avatar-group/dist/index.js
|
|
8425
8389
|
function AvatarGroup({ users, max, size = "md", className }) {
|
|
8426
8390
|
const api = createAvatarGroup({ users, max});
|
|
8427
|
-
return
|
|
8391
|
+
return React42.createElement(
|
|
8428
8392
|
"div",
|
|
8429
8393
|
{ ...api.ariaProps, className: cn(avatarGroupStyles, className) },
|
|
8430
8394
|
api.visibleUsers.map(
|
|
8431
|
-
(user) =>
|
|
8395
|
+
(user) => React42.createElement(
|
|
8432
8396
|
"div",
|
|
8433
8397
|
{
|
|
8434
8398
|
key: user.id,
|
|
8435
8399
|
className: avatarVariants2({ size }),
|
|
8436
8400
|
...api.getAvatarAriaProps(user)
|
|
8437
8401
|
},
|
|
8438
|
-
user.src ?
|
|
8402
|
+
user.src ? React42.createElement("img", {
|
|
8439
8403
|
src: user.src,
|
|
8440
8404
|
alt: user.name,
|
|
8441
8405
|
className: avatarImageStyles
|
|
8442
|
-
}) :
|
|
8443
|
-
user.status &&
|
|
8406
|
+
}) : React42.createElement("span", null, api.getInitials(user.name)),
|
|
8407
|
+
user.status && React42.createElement("span", {
|
|
8444
8408
|
className: avatarPresenceDotVariants({ size, status: user.status })
|
|
8445
8409
|
})
|
|
8446
8410
|
)
|
|
8447
8411
|
),
|
|
8448
|
-
api.overflowCount > 0 &&
|
|
8412
|
+
api.overflowCount > 0 && React42.createElement(
|
|
8449
8413
|
"div",
|
|
8450
8414
|
{
|
|
8451
8415
|
className: avatarOverflowBadgeVariants({ size }),
|
|
@@ -8529,7 +8493,7 @@ var cardContentVariants = cva({
|
|
|
8529
8493
|
var cardFooterVariants = cva({
|
|
8530
8494
|
base: "flex items-center p-6 pt-0"
|
|
8531
8495
|
});
|
|
8532
|
-
var Card2 =
|
|
8496
|
+
var Card2 = React42.forwardRef(
|
|
8533
8497
|
({ className, ...props }, ref) => {
|
|
8534
8498
|
const api = createCard();
|
|
8535
8499
|
return /* @__PURE__ */ jsx(
|
|
@@ -8545,7 +8509,7 @@ var Card2 = React41.forwardRef(
|
|
|
8545
8509
|
}
|
|
8546
8510
|
);
|
|
8547
8511
|
Card2.displayName = "Card";
|
|
8548
|
-
var CardHeader =
|
|
8512
|
+
var CardHeader = React42.forwardRef(
|
|
8549
8513
|
({ className, ...props }, ref) => {
|
|
8550
8514
|
const api = createCardHeader();
|
|
8551
8515
|
return /* @__PURE__ */ jsx(
|
|
@@ -8560,7 +8524,7 @@ var CardHeader = React41.forwardRef(
|
|
|
8560
8524
|
}
|
|
8561
8525
|
);
|
|
8562
8526
|
CardHeader.displayName = "CardHeader";
|
|
8563
|
-
var CardTitle =
|
|
8527
|
+
var CardTitle = React42.forwardRef(
|
|
8564
8528
|
({ className, ...props }, ref) => {
|
|
8565
8529
|
const api = createCardTitle();
|
|
8566
8530
|
return /* @__PURE__ */ jsx(
|
|
@@ -8575,7 +8539,7 @@ var CardTitle = React41.forwardRef(
|
|
|
8575
8539
|
}
|
|
8576
8540
|
);
|
|
8577
8541
|
CardTitle.displayName = "CardTitle";
|
|
8578
|
-
var CardDescription =
|
|
8542
|
+
var CardDescription = React42.forwardRef(
|
|
8579
8543
|
({ className, ...props }, ref) => {
|
|
8580
8544
|
const api = createCardDescription();
|
|
8581
8545
|
return /* @__PURE__ */ jsx(
|
|
@@ -8590,7 +8554,7 @@ var CardDescription = React41.forwardRef(
|
|
|
8590
8554
|
}
|
|
8591
8555
|
);
|
|
8592
8556
|
CardDescription.displayName = "CardDescription";
|
|
8593
|
-
var CardContent =
|
|
8557
|
+
var CardContent = React42.forwardRef(
|
|
8594
8558
|
({ className, ...props }, ref) => {
|
|
8595
8559
|
const api = createCardContent();
|
|
8596
8560
|
return /* @__PURE__ */ jsx(
|
|
@@ -8605,7 +8569,7 @@ var CardContent = React41.forwardRef(
|
|
|
8605
8569
|
}
|
|
8606
8570
|
);
|
|
8607
8571
|
CardContent.displayName = "CardContent";
|
|
8608
|
-
var CardFooter =
|
|
8572
|
+
var CardFooter = React42.forwardRef(
|
|
8609
8573
|
({ className, ...props }, ref) => {
|
|
8610
8574
|
const api = createCardFooter();
|
|
8611
8575
|
return /* @__PURE__ */ jsx(
|
|
@@ -8686,7 +8650,7 @@ var checkboxVariants = cva({
|
|
|
8686
8650
|
size: "default"
|
|
8687
8651
|
}
|
|
8688
8652
|
});
|
|
8689
|
-
var Checkbox =
|
|
8653
|
+
var Checkbox = React42.forwardRef(
|
|
8690
8654
|
({ checked = false, onCheckedChange, disabled = false, size = "default", className, ...props }, ref) => {
|
|
8691
8655
|
const api = createCheckbox({ checked, disabled });
|
|
8692
8656
|
const checkedVariant = checked === "indeterminate" ? "indeterminate" : checked ? "true" : "false";
|
|
@@ -8997,13 +8961,13 @@ function DatePicker({
|
|
|
8997
8961
|
className,
|
|
8998
8962
|
disabled = false
|
|
8999
8963
|
}) {
|
|
9000
|
-
const [open, setOpen] =
|
|
9001
|
-
const [currentMonth, setCurrentMonth] =
|
|
8964
|
+
const [open, setOpen] = React42.useState(false);
|
|
8965
|
+
const [currentMonth, setCurrentMonth] = React42.useState(
|
|
9002
8966
|
() => value ? new Date(value.getFullYear(), value.getMonth(), 1) : new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)
|
|
9003
8967
|
);
|
|
9004
|
-
const [view, setView] =
|
|
9005
|
-
const containerRef =
|
|
9006
|
-
const api =
|
|
8968
|
+
const [view, setView] = React42.useState("calendar");
|
|
8969
|
+
const containerRef = React42.useRef(null);
|
|
8970
|
+
const api = React42.useMemo(
|
|
9007
8971
|
() => createDatePicker({
|
|
9008
8972
|
value,
|
|
9009
8973
|
onChange,
|
|
@@ -9017,7 +8981,7 @@ function DatePicker({
|
|
|
9017
8981
|
}),
|
|
9018
8982
|
[value, onChange, minDate, maxDate, showTime, format, placeholder, open]
|
|
9019
8983
|
);
|
|
9020
|
-
|
|
8984
|
+
React42.useMemo(() => {
|
|
9021
8985
|
createDatePicker({
|
|
9022
8986
|
value,
|
|
9023
8987
|
minDate,
|
|
@@ -9032,7 +8996,7 @@ function DatePicker({
|
|
|
9032
8996
|
});
|
|
9033
8997
|
return tempApi.days;
|
|
9034
8998
|
}, [value, minDate, maxDate, currentMonth]);
|
|
9035
|
-
|
|
8999
|
+
React42.useEffect(() => {
|
|
9036
9000
|
if (!open) return;
|
|
9037
9001
|
function handleClick(e) {
|
|
9038
9002
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -9042,7 +9006,7 @@ function DatePicker({
|
|
|
9042
9006
|
document.addEventListener("mousedown", handleClick);
|
|
9043
9007
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
9044
9008
|
}, [open]);
|
|
9045
|
-
|
|
9009
|
+
React42.useEffect(() => {
|
|
9046
9010
|
if (!open) return;
|
|
9047
9011
|
function handleKeyDown(e) {
|
|
9048
9012
|
if (e.key === "Escape") {
|
|
@@ -9080,10 +9044,10 @@ function DatePicker({
|
|
|
9080
9044
|
onChange?.(newDate);
|
|
9081
9045
|
};
|
|
9082
9046
|
const monthLabel = currentMonth.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
9083
|
-
return
|
|
9047
|
+
return React42.createElement(
|
|
9084
9048
|
"div",
|
|
9085
9049
|
{ ref: containerRef, className: cn("relative inline-block", className) },
|
|
9086
|
-
|
|
9050
|
+
React42.createElement(
|
|
9087
9051
|
"button",
|
|
9088
9052
|
{
|
|
9089
9053
|
type: "button",
|
|
@@ -9095,17 +9059,17 @@ function DatePicker({
|
|
|
9095
9059
|
},
|
|
9096
9060
|
displayValue
|
|
9097
9061
|
),
|
|
9098
|
-
open &&
|
|
9062
|
+
open && React42.createElement(
|
|
9099
9063
|
"div",
|
|
9100
9064
|
{
|
|
9101
9065
|
className: datePickerDropdownStyles,
|
|
9102
9066
|
role: "dialog",
|
|
9103
9067
|
"aria-modal": true
|
|
9104
9068
|
},
|
|
9105
|
-
|
|
9069
|
+
React42.createElement(
|
|
9106
9070
|
"div",
|
|
9107
9071
|
{ className: "flex items-center justify-between mb-3" },
|
|
9108
|
-
|
|
9072
|
+
React42.createElement(
|
|
9109
9073
|
"button",
|
|
9110
9074
|
{
|
|
9111
9075
|
type: "button",
|
|
@@ -9115,8 +9079,8 @@ function DatePicker({
|
|
|
9115
9079
|
},
|
|
9116
9080
|
"\u2039"
|
|
9117
9081
|
),
|
|
9118
|
-
|
|
9119
|
-
|
|
9082
|
+
React42.createElement("span", { className: "text-sm font-medium" }, monthLabel),
|
|
9083
|
+
React42.createElement(
|
|
9120
9084
|
"button",
|
|
9121
9085
|
{
|
|
9122
9086
|
type: "button",
|
|
@@ -9127,11 +9091,11 @@ function DatePicker({
|
|
|
9127
9091
|
"\u203A"
|
|
9128
9092
|
)
|
|
9129
9093
|
),
|
|
9130
|
-
|
|
9094
|
+
React42.createElement(
|
|
9131
9095
|
"div",
|
|
9132
9096
|
{ className: "grid grid-cols-7 gap-0 text-center", role: "grid" },
|
|
9133
9097
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
9134
|
-
(d) =>
|
|
9098
|
+
(d) => React42.createElement("div", { key: d, className: "text-xs text-muted-foreground py-1 font-medium" }, d)
|
|
9135
9099
|
),
|
|
9136
9100
|
api.days.map((day, i) => {
|
|
9137
9101
|
let state = "default";
|
|
@@ -9139,7 +9103,7 @@ function DatePicker({
|
|
|
9139
9103
|
else if (day.isSelected) state = "selected";
|
|
9140
9104
|
else if (day.isToday) state = "today";
|
|
9141
9105
|
else if (!day.isCurrentMonth) state = "outside";
|
|
9142
|
-
return
|
|
9106
|
+
return React42.createElement(
|
|
9143
9107
|
"button",
|
|
9144
9108
|
{
|
|
9145
9109
|
key: i,
|
|
@@ -9154,11 +9118,11 @@ function DatePicker({
|
|
|
9154
9118
|
);
|
|
9155
9119
|
})
|
|
9156
9120
|
),
|
|
9157
|
-
showTime &&
|
|
9121
|
+
showTime && React42.createElement(
|
|
9158
9122
|
"div",
|
|
9159
9123
|
{ className: datePickerTimeStyles },
|
|
9160
|
-
|
|
9161
|
-
|
|
9124
|
+
React42.createElement("span", { className: "text-sm text-muted-foreground" }, "Time:"),
|
|
9125
|
+
React42.createElement("input", {
|
|
9162
9126
|
type: "number",
|
|
9163
9127
|
min: 0,
|
|
9164
9128
|
max: 23,
|
|
@@ -9167,8 +9131,8 @@ function DatePicker({
|
|
|
9167
9131
|
className: datePickerTimeInputStyles,
|
|
9168
9132
|
"aria-label": "Hours"
|
|
9169
9133
|
}),
|
|
9170
|
-
|
|
9171
|
-
|
|
9134
|
+
React42.createElement("span", { className: "text-muted-foreground" }, ":"),
|
|
9135
|
+
React42.createElement("input", {
|
|
9172
9136
|
type: "number",
|
|
9173
9137
|
min: 0,
|
|
9174
9138
|
max: 59,
|
|
@@ -9558,10 +9522,10 @@ var emojiPickerSectionLabelStyles = "px-2 py-1 text-xs font-medium text-muted-fo
|
|
|
9558
9522
|
|
|
9559
9523
|
// ../react-emoji-picker/dist/index.js
|
|
9560
9524
|
function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className }) {
|
|
9561
|
-
const [search, setSearch] =
|
|
9562
|
-
const [activeCategory, setActiveCategory] =
|
|
9563
|
-
const [recentEmojis, setRecentEmojis] =
|
|
9564
|
-
const api =
|
|
9525
|
+
const [search, setSearch] = React42.useState("");
|
|
9526
|
+
const [activeCategory, setActiveCategory] = React42.useState("smileys");
|
|
9527
|
+
const [recentEmojis, setRecentEmojis] = React42.useState(initialRecent);
|
|
9528
|
+
const api = React42.useMemo(
|
|
9565
9529
|
() => createEmojiPicker({
|
|
9566
9530
|
onSelect: void 0,
|
|
9567
9531
|
search,
|
|
@@ -9569,7 +9533,7 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9569
9533
|
}),
|
|
9570
9534
|
[search, recentEmojis]
|
|
9571
9535
|
);
|
|
9572
|
-
const filteredEmojis =
|
|
9536
|
+
const filteredEmojis = React42.useMemo(() => {
|
|
9573
9537
|
if (search.trim()) {
|
|
9574
9538
|
const query = search.toLowerCase().trim();
|
|
9575
9539
|
const allEmojis = EMOJI_CATEGORIES.flatMap((cat) => EMOJI_DATA[cat]);
|
|
@@ -9589,22 +9553,22 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9589
9553
|
setActiveCategory(cat);
|
|
9590
9554
|
setSearch("");
|
|
9591
9555
|
};
|
|
9592
|
-
return
|
|
9556
|
+
return React42.createElement(
|
|
9593
9557
|
"div",
|
|
9594
9558
|
{ className: cn(emojiPickerContainerStyles, className), ...api.ariaProps },
|
|
9595
9559
|
// Search input
|
|
9596
|
-
|
|
9560
|
+
React42.createElement("input", {
|
|
9597
9561
|
...api.searchInputProps,
|
|
9598
9562
|
className: emojiPickerSearchStyles,
|
|
9599
9563
|
value: search,
|
|
9600
9564
|
onChange: (e) => setSearch(e.target.value)
|
|
9601
9565
|
}),
|
|
9602
9566
|
// Category tabs
|
|
9603
|
-
!search &&
|
|
9567
|
+
!search && React42.createElement(
|
|
9604
9568
|
"div",
|
|
9605
9569
|
{ className: emojiPickerCategoryBarStyles },
|
|
9606
9570
|
api.categoryTabs.map(
|
|
9607
|
-
(tab) =>
|
|
9571
|
+
(tab) => React42.createElement(
|
|
9608
9572
|
"button",
|
|
9609
9573
|
{
|
|
9610
9574
|
key: tab.category,
|
|
@@ -9621,15 +9585,15 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9621
9585
|
)
|
|
9622
9586
|
),
|
|
9623
9587
|
// Recent emojis section
|
|
9624
|
-
!search && recentEmojis.length > 0 &&
|
|
9588
|
+
!search && recentEmojis.length > 0 && React42.createElement(
|
|
9625
9589
|
"div",
|
|
9626
9590
|
null,
|
|
9627
|
-
|
|
9628
|
-
|
|
9591
|
+
React42.createElement("div", { className: emojiPickerSectionLabelStyles }, "Recent"),
|
|
9592
|
+
React42.createElement(
|
|
9629
9593
|
"div",
|
|
9630
9594
|
{ className: emojiPickerGridStyles },
|
|
9631
9595
|
recentEmojis.map(
|
|
9632
|
-
(emoji, i) =>
|
|
9596
|
+
(emoji, i) => React42.createElement(
|
|
9633
9597
|
"button",
|
|
9634
9598
|
{
|
|
9635
9599
|
key: `recent-${emoji.emoji}-${i}`,
|
|
@@ -9644,19 +9608,19 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9644
9608
|
)
|
|
9645
9609
|
),
|
|
9646
9610
|
// Emoji grid
|
|
9647
|
-
|
|
9611
|
+
React42.createElement(
|
|
9648
9612
|
"div",
|
|
9649
9613
|
null,
|
|
9650
|
-
!search &&
|
|
9614
|
+
!search && React42.createElement(
|
|
9651
9615
|
"div",
|
|
9652
9616
|
{ className: emojiPickerSectionLabelStyles },
|
|
9653
9617
|
CATEGORY_LABELS[activeCategory]
|
|
9654
9618
|
),
|
|
9655
|
-
|
|
9619
|
+
React42.createElement(
|
|
9656
9620
|
"div",
|
|
9657
9621
|
{ className: emojiPickerGridStyles },
|
|
9658
9622
|
filteredEmojis.map(
|
|
9659
|
-
(emoji, i) =>
|
|
9623
|
+
(emoji, i) => React42.createElement(
|
|
9660
9624
|
"button",
|
|
9661
9625
|
{
|
|
9662
9626
|
key: `${emoji.emoji}-${i}`,
|
|
@@ -9668,7 +9632,7 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9668
9632
|
emoji.emoji
|
|
9669
9633
|
)
|
|
9670
9634
|
),
|
|
9671
|
-
filteredEmojis.length === 0 &&
|
|
9635
|
+
filteredEmojis.length === 0 && React42.createElement(
|
|
9672
9636
|
"div",
|
|
9673
9637
|
{ className: "col-span-8 text-center text-sm text-muted-foreground py-4" },
|
|
9674
9638
|
"No emojis found"
|
|
@@ -9868,10 +9832,10 @@ function FileUpload({
|
|
|
9868
9832
|
className,
|
|
9869
9833
|
children
|
|
9870
9834
|
}) {
|
|
9871
|
-
const [files, setFiles] =
|
|
9872
|
-
const [isDragging, setIsDragging] =
|
|
9873
|
-
const inputRef =
|
|
9874
|
-
const api =
|
|
9835
|
+
const [files, setFiles] = React42.useState([]);
|
|
9836
|
+
const [isDragging, setIsDragging] = React42.useState(false);
|
|
9837
|
+
const inputRef = React42.useRef(null);
|
|
9838
|
+
const api = React42.useMemo(
|
|
9875
9839
|
() => createFileUpload({
|
|
9876
9840
|
accept,
|
|
9877
9841
|
maxSize,
|
|
@@ -9936,17 +9900,17 @@ function FileUpload({
|
|
|
9936
9900
|
handleClick();
|
|
9937
9901
|
}
|
|
9938
9902
|
};
|
|
9939
|
-
return
|
|
9903
|
+
return React42.createElement(
|
|
9940
9904
|
"div",
|
|
9941
9905
|
{ className },
|
|
9942
9906
|
// Hidden file input
|
|
9943
|
-
|
|
9907
|
+
React42.createElement("input", {
|
|
9944
9908
|
ref: inputRef,
|
|
9945
9909
|
...api.inputProps,
|
|
9946
9910
|
onChange: handleInputChange
|
|
9947
9911
|
}),
|
|
9948
9912
|
// Drop zone
|
|
9949
|
-
|
|
9913
|
+
React42.createElement(
|
|
9950
9914
|
"div",
|
|
9951
9915
|
{
|
|
9952
9916
|
...api.dropZoneProps,
|
|
@@ -9960,21 +9924,21 @@ function FileUpload({
|
|
|
9960
9924
|
onDragOver: handleDragOver,
|
|
9961
9925
|
onDrop: handleDrop
|
|
9962
9926
|
},
|
|
9963
|
-
children ??
|
|
9964
|
-
|
|
9927
|
+
children ?? React42.createElement(
|
|
9928
|
+
React42.Fragment,
|
|
9965
9929
|
null,
|
|
9966
|
-
|
|
9967
|
-
|
|
9930
|
+
React42.createElement("div", { className: "text-2xl mb-2" }, "\u{1F4C1}"),
|
|
9931
|
+
React42.createElement(
|
|
9968
9932
|
"p",
|
|
9969
9933
|
{ className: "text-sm text-muted-foreground" },
|
|
9970
9934
|
"Drag & drop files here, or click to select"
|
|
9971
9935
|
),
|
|
9972
|
-
accept &&
|
|
9936
|
+
accept && React42.createElement(
|
|
9973
9937
|
"p",
|
|
9974
9938
|
{ className: "text-xs text-muted-foreground mt-1" },
|
|
9975
9939
|
`Accepted: ${accept}`
|
|
9976
9940
|
),
|
|
9977
|
-
maxSize &&
|
|
9941
|
+
maxSize && React42.createElement(
|
|
9978
9942
|
"p",
|
|
9979
9943
|
{ className: "text-xs text-muted-foreground" },
|
|
9980
9944
|
`Max size: ${formatFileSize(maxSize)}`
|
|
@@ -9982,37 +9946,37 @@ function FileUpload({
|
|
|
9982
9946
|
)
|
|
9983
9947
|
),
|
|
9984
9948
|
// File list
|
|
9985
|
-
files.length > 0 &&
|
|
9949
|
+
files.length > 0 && React42.createElement(
|
|
9986
9950
|
"div",
|
|
9987
9951
|
{ className: fileUploadFileListStyles },
|
|
9988
9952
|
files.map(
|
|
9989
|
-
(file) =>
|
|
9953
|
+
(file) => React42.createElement(
|
|
9990
9954
|
"div",
|
|
9991
9955
|
{ key: file.id, className: fileUploadFileItemStyles },
|
|
9992
|
-
|
|
9956
|
+
React42.createElement(
|
|
9993
9957
|
"div",
|
|
9994
9958
|
{ className: "flex-1 min-w-0" },
|
|
9995
|
-
|
|
9996
|
-
|
|
9959
|
+
React42.createElement("div", { className: "font-medium truncate" }, file.name),
|
|
9960
|
+
React42.createElement(
|
|
9997
9961
|
"div",
|
|
9998
9962
|
{ className: "text-xs text-muted-foreground" },
|
|
9999
9963
|
formatFileSize(file.size)
|
|
10000
9964
|
),
|
|
10001
|
-
file.status === "uploading" &&
|
|
9965
|
+
file.status === "uploading" && React42.createElement(
|
|
10002
9966
|
"div",
|
|
10003
9967
|
{ className: cn(fileUploadProgressStyles, "mt-1") },
|
|
10004
|
-
|
|
9968
|
+
React42.createElement("div", {
|
|
10005
9969
|
className: fileUploadProgressBarStyles,
|
|
10006
9970
|
style: { width: `${file.progress}%` }
|
|
10007
9971
|
})
|
|
10008
9972
|
),
|
|
10009
|
-
file.error &&
|
|
9973
|
+
file.error && React42.createElement(
|
|
10010
9974
|
"div",
|
|
10011
9975
|
{ className: "text-xs text-destructive mt-0.5" },
|
|
10012
9976
|
file.error
|
|
10013
9977
|
)
|
|
10014
9978
|
),
|
|
10015
|
-
|
|
9979
|
+
React42.createElement(
|
|
10016
9980
|
"button",
|
|
10017
9981
|
{
|
|
10018
9982
|
type: "button",
|
|
@@ -10032,162 +9996,6 @@ function FileUpload({
|
|
|
10032
9996
|
}
|
|
10033
9997
|
FileUpload.displayName = "FileUpload";
|
|
10034
9998
|
|
|
10035
|
-
// ../keyboard-shortcut/dist/index.js
|
|
10036
|
-
var MODIFIER_KEYS = /* @__PURE__ */ new Set(["Ctrl", "Control", "Alt", "Shift", "Meta", "Cmd", "Command"]);
|
|
10037
|
-
var KEY_DISPLAY = {
|
|
10038
|
-
"Ctrl": "Ctrl",
|
|
10039
|
-
"Control": "Ctrl",
|
|
10040
|
-
"Alt": "Alt",
|
|
10041
|
-
"Shift": "Shift",
|
|
10042
|
-
"Meta": "Meta",
|
|
10043
|
-
"Cmd": "Cmd",
|
|
10044
|
-
"Command": "Cmd",
|
|
10045
|
-
"Enter": "\u21B5",
|
|
10046
|
-
"Backspace": "\u232B",
|
|
10047
|
-
"Delete": "Del",
|
|
10048
|
-
"Escape": "Esc",
|
|
10049
|
-
"ArrowUp": "\u2191",
|
|
10050
|
-
"ArrowDown": "\u2193",
|
|
10051
|
-
"ArrowLeft": "\u2190",
|
|
10052
|
-
"ArrowRight": "\u2192",
|
|
10053
|
-
"Tab": "Tab",
|
|
10054
|
-
" ": "Space"
|
|
10055
|
-
};
|
|
10056
|
-
var MAC_KEY_DISPLAY = {
|
|
10057
|
-
"Ctrl": "\u2303",
|
|
10058
|
-
"Control": "\u2303",
|
|
10059
|
-
"Alt": "\u2325",
|
|
10060
|
-
"Shift": "\u21E7",
|
|
10061
|
-
"Meta": "\u2318",
|
|
10062
|
-
"Cmd": "\u2318",
|
|
10063
|
-
"Command": "\u2318",
|
|
10064
|
-
"Enter": "\u21B5",
|
|
10065
|
-
"Backspace": "\u232B",
|
|
10066
|
-
"Delete": "\u2326",
|
|
10067
|
-
"Escape": "\u238B",
|
|
10068
|
-
"ArrowUp": "\u2191",
|
|
10069
|
-
"ArrowDown": "\u2193",
|
|
10070
|
-
"ArrowLeft": "\u2190",
|
|
10071
|
-
"ArrowRight": "\u2192",
|
|
10072
|
-
"Tab": "\u21E5",
|
|
10073
|
-
" ": "\u2423"
|
|
10074
|
-
};
|
|
10075
|
-
function normalizeKey(key) {
|
|
10076
|
-
if (key === "Command" || key === "Cmd") return "Meta";
|
|
10077
|
-
if (key === "Control") return "Ctrl";
|
|
10078
|
-
return key;
|
|
10079
|
-
}
|
|
10080
|
-
function isMac() {
|
|
10081
|
-
if (typeof navigator !== "undefined") {
|
|
10082
|
-
return navigator.platform?.includes("Mac") || navigator.userAgent?.includes("Mac");
|
|
10083
|
-
}
|
|
10084
|
-
return false;
|
|
10085
|
-
}
|
|
10086
|
-
function formatShortcut(keys, mac) {
|
|
10087
|
-
const displayMap = mac ? MAC_KEY_DISPLAY : KEY_DISPLAY;
|
|
10088
|
-
return keys.map((key) => displayMap[key] ?? key.toUpperCase()).join(mac ? "" : "+");
|
|
10089
|
-
}
|
|
10090
|
-
function createKeyboardShortcut(props) {
|
|
10091
|
-
const {
|
|
10092
|
-
keys,
|
|
10093
|
-
onTrigger,
|
|
10094
|
-
enabled: enabledProp = true,
|
|
10095
|
-
preventDefault: preventDefaultProp = true
|
|
10096
|
-
} = props;
|
|
10097
|
-
const normalizedKeys = keys.map(normalizeKey);
|
|
10098
|
-
const modifiers = normalizedKeys.filter((k) => MODIFIER_KEYS.has(k));
|
|
10099
|
-
const regularKeys = normalizedKeys.filter((k) => !MODIFIER_KEYS.has(k));
|
|
10100
|
-
function handler(event) {
|
|
10101
|
-
if (!enabledProp) return false;
|
|
10102
|
-
const ctrlRequired = modifiers.includes("Ctrl");
|
|
10103
|
-
const altRequired = modifiers.includes("Alt");
|
|
10104
|
-
const shiftRequired = modifiers.includes("Shift");
|
|
10105
|
-
const metaRequired = modifiers.includes("Meta");
|
|
10106
|
-
if (ctrlRequired !== (event.ctrlKey || event.metaKey && !metaRequired)) ;
|
|
10107
|
-
const ctrlMatch = ctrlRequired ? event.ctrlKey : !event.ctrlKey;
|
|
10108
|
-
const altMatch = altRequired ? event.altKey : !event.altKey;
|
|
10109
|
-
const shiftMatch = shiftRequired ? event.shiftKey : !event.shiftKey;
|
|
10110
|
-
const metaMatch = metaRequired ? event.metaKey : !event.metaKey;
|
|
10111
|
-
if (!ctrlMatch || !altMatch || !shiftMatch || !metaMatch) return false;
|
|
10112
|
-
if (regularKeys.length > 0) {
|
|
10113
|
-
const eventKey = event.key.length === 1 ? event.key.toUpperCase() : event.key;
|
|
10114
|
-
const targetKey = regularKeys[0].length === 1 ? regularKeys[0].toUpperCase() : regularKeys[0];
|
|
10115
|
-
if (eventKey !== targetKey) return false;
|
|
10116
|
-
}
|
|
10117
|
-
if (preventDefaultProp) {
|
|
10118
|
-
event.preventDefault();
|
|
10119
|
-
}
|
|
10120
|
-
onTrigger();
|
|
10121
|
-
return true;
|
|
10122
|
-
}
|
|
10123
|
-
const mac = isMac();
|
|
10124
|
-
const display = formatShortcut(keys, false);
|
|
10125
|
-
const platformDisplay = formatShortcut(keys, mac);
|
|
10126
|
-
const badgeAriaProps = {
|
|
10127
|
-
"aria-hidden": true,
|
|
10128
|
-
role: "presentation"
|
|
10129
|
-
};
|
|
10130
|
-
return {
|
|
10131
|
-
handler,
|
|
10132
|
-
display,
|
|
10133
|
-
platformDisplay,
|
|
10134
|
-
enabled: enabledProp,
|
|
10135
|
-
keys,
|
|
10136
|
-
badgeAriaProps
|
|
10137
|
-
};
|
|
10138
|
-
}
|
|
10139
|
-
var shortcutBadgeStyles = "inline-flex items-center gap-0.5 rounded border bg-muted px-1.5 py-0.5 text-xs font-mono text-muted-foreground";
|
|
10140
|
-
var shortcutKeyStyles = "inline-flex items-center justify-center min-w-[1.25rem] rounded bg-background px-1 py-0.5 text-xs font-mono border shadow-sm";
|
|
10141
|
-
var shortcutSeparatorStyles = "text-muted-foreground text-xs";
|
|
10142
|
-
|
|
10143
|
-
// ../react-keyboard-shortcut/dist/index.js
|
|
10144
|
-
function KeyboardShortcut({
|
|
10145
|
-
keys,
|
|
10146
|
-
onTrigger,
|
|
10147
|
-
enabled = true,
|
|
10148
|
-
preventDefault = true
|
|
10149
|
-
}) {
|
|
10150
|
-
const apiRef = React41.useRef(
|
|
10151
|
-
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
10152
|
-
);
|
|
10153
|
-
React41.useEffect(() => {
|
|
10154
|
-
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
10155
|
-
}, [keys, onTrigger, enabled, preventDefault]);
|
|
10156
|
-
React41.useEffect(() => {
|
|
10157
|
-
if (!enabled) return;
|
|
10158
|
-
const handleKeyDown = (e) => {
|
|
10159
|
-
apiRef.current.handler(e);
|
|
10160
|
-
};
|
|
10161
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
10162
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
10163
|
-
}, [enabled]);
|
|
10164
|
-
return null;
|
|
10165
|
-
}
|
|
10166
|
-
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
10167
|
-
function ShortcutBadge({ keys, platform = true, className }) {
|
|
10168
|
-
const api = createKeyboardShortcut({ keys, onTrigger: () => {
|
|
10169
|
-
}, enabled: false });
|
|
10170
|
-
const displayKeys = platform ? api.platformDisplay : api.display;
|
|
10171
|
-
const isMacDisplay = platform && displayKeys !== api.display;
|
|
10172
|
-
return React41.createElement(
|
|
10173
|
-
"kbd",
|
|
10174
|
-
{ ...api.badgeAriaProps, className: cn(shortcutBadgeStyles, className) },
|
|
10175
|
-
isMacDisplay ? React41.createElement("span", null, displayKeys) : keys.map(
|
|
10176
|
-
(key, i) => React41.createElement(
|
|
10177
|
-
React41.Fragment,
|
|
10178
|
-
{ key: i },
|
|
10179
|
-
i > 0 && React41.createElement("span", { className: shortcutSeparatorStyles }, "+"),
|
|
10180
|
-
React41.createElement(
|
|
10181
|
-
"span",
|
|
10182
|
-
{ className: shortcutKeyStyles },
|
|
10183
|
-
formatShortcut([key], false)
|
|
10184
|
-
)
|
|
10185
|
-
)
|
|
10186
|
-
)
|
|
10187
|
-
);
|
|
10188
|
-
}
|
|
10189
|
-
ShortcutBadge.displayName = "ShortcutBadge";
|
|
10190
|
-
|
|
10191
9999
|
// ../otp-input/dist/index.js
|
|
10192
10000
|
function createOtpInput(props = {}) {
|
|
10193
10001
|
const {
|
|
@@ -10353,7 +10161,7 @@ var otpInputSlotVariants = cva({
|
|
|
10353
10161
|
filled: "false"
|
|
10354
10162
|
}
|
|
10355
10163
|
});
|
|
10356
|
-
var OtpInput =
|
|
10164
|
+
var OtpInput = React42.forwardRef(
|
|
10357
10165
|
({
|
|
10358
10166
|
length = 6,
|
|
10359
10167
|
value = "",
|
|
@@ -10365,15 +10173,15 @@ var OtpInput = React41.forwardRef(
|
|
|
10365
10173
|
className,
|
|
10366
10174
|
...props
|
|
10367
10175
|
}, ref) => {
|
|
10368
|
-
const inputRefs =
|
|
10369
|
-
const [focusedIndex, setFocusedIndex] =
|
|
10370
|
-
const [values, setValues] =
|
|
10176
|
+
const inputRefs = React42.useRef([]);
|
|
10177
|
+
const [focusedIndex, setFocusedIndex] = React42.useState(autoFocus ? 0 : -1);
|
|
10178
|
+
const [values, setValues] = React42.useState(
|
|
10371
10179
|
() => Array.from({ length }, (_, i) => value.charAt(i) || "")
|
|
10372
10180
|
);
|
|
10373
|
-
|
|
10181
|
+
React42.useEffect(() => {
|
|
10374
10182
|
setValues(Array.from({ length }, (_, i) => value.charAt(i) || ""));
|
|
10375
10183
|
}, [value, length]);
|
|
10376
|
-
|
|
10184
|
+
React42.useEffect(() => {
|
|
10377
10185
|
if (autoFocus && inputRefs.current[0]) {
|
|
10378
10186
|
inputRefs.current[0].focus();
|
|
10379
10187
|
}
|
|
@@ -10553,13 +10361,13 @@ function PresenceIndicator({
|
|
|
10553
10361
|
className
|
|
10554
10362
|
}) {
|
|
10555
10363
|
const api = createPresence({ status, showLabel, label });
|
|
10556
|
-
return
|
|
10364
|
+
return React42.createElement(
|
|
10557
10365
|
"span",
|
|
10558
10366
|
{ ...api.ariaProps, className: cn(presenceContainerStyles, className) },
|
|
10559
|
-
|
|
10367
|
+
React42.createElement("span", {
|
|
10560
10368
|
className: presenceDotVariants({ status, size })
|
|
10561
10369
|
}),
|
|
10562
|
-
api.showLabel &&
|
|
10370
|
+
api.showLabel && React42.createElement("span", { className: presenceLabelStyles }, api.label)
|
|
10563
10371
|
);
|
|
10564
10372
|
}
|
|
10565
10373
|
PresenceIndicator.displayName = "PresenceIndicator";
|
|
@@ -10647,7 +10455,7 @@ var radioCircleVariants = cva({
|
|
|
10647
10455
|
});
|
|
10648
10456
|
|
|
10649
10457
|
// ../react-radio/dist/index.js
|
|
10650
|
-
var RadioContext =
|
|
10458
|
+
var RadioContext = React42.createContext(null);
|
|
10651
10459
|
function RadioGroup({
|
|
10652
10460
|
children,
|
|
10653
10461
|
className,
|
|
@@ -10658,25 +10466,25 @@ function RadioGroup({
|
|
|
10658
10466
|
disabled = false,
|
|
10659
10467
|
orientation = "vertical"
|
|
10660
10468
|
}) {
|
|
10661
|
-
const [internalValue, setInternalValue] =
|
|
10469
|
+
const [internalValue, setInternalValue] = React42.useState(defaultValue);
|
|
10662
10470
|
const isControlled = controlledValue !== void 0;
|
|
10663
10471
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
10664
10472
|
const api = createRadioGroup({ value: currentValue, name, disabled, orientation });
|
|
10665
|
-
const handleChange =
|
|
10473
|
+
const handleChange = React42.useCallback(
|
|
10666
10474
|
(val) => {
|
|
10667
10475
|
if (!isControlled) setInternalValue(val);
|
|
10668
10476
|
onValueChange?.(val);
|
|
10669
10477
|
},
|
|
10670
10478
|
[isControlled, onValueChange]
|
|
10671
10479
|
);
|
|
10672
|
-
const ctx =
|
|
10480
|
+
const ctx = React42.useMemo(
|
|
10673
10481
|
() => ({ value: currentValue, onValueChange: handleChange, name, disabled }),
|
|
10674
10482
|
[currentValue, handleChange, name, disabled]
|
|
10675
10483
|
);
|
|
10676
|
-
return
|
|
10484
|
+
return React42.createElement(
|
|
10677
10485
|
RadioContext.Provider,
|
|
10678
10486
|
{ value: ctx },
|
|
10679
|
-
|
|
10487
|
+
React42.createElement(
|
|
10680
10488
|
"div",
|
|
10681
10489
|
{ ...api.groupProps, className: cn(radioGroupVariants({ orientation }), className) },
|
|
10682
10490
|
children
|
|
@@ -10684,17 +10492,17 @@ function RadioGroup({
|
|
|
10684
10492
|
);
|
|
10685
10493
|
}
|
|
10686
10494
|
function RadioItem({ value, children, disabled = false, className }) {
|
|
10687
|
-
const ctx =
|
|
10495
|
+
const ctx = React42.useContext(RadioContext);
|
|
10688
10496
|
if (!ctx) throw new Error("RadioItem must be used within RadioGroup");
|
|
10689
10497
|
const isChecked = ctx.value === value;
|
|
10690
10498
|
const isDisabled = ctx.disabled || disabled;
|
|
10691
|
-
return
|
|
10499
|
+
return React42.createElement(
|
|
10692
10500
|
"label",
|
|
10693
10501
|
{
|
|
10694
10502
|
className: cn(radioItemVariants({ disabled: isDisabled ? "true" : "false" }), className),
|
|
10695
10503
|
"data-state": isChecked ? "checked" : "unchecked"
|
|
10696
10504
|
},
|
|
10697
|
-
|
|
10505
|
+
React42.createElement(
|
|
10698
10506
|
"button",
|
|
10699
10507
|
{
|
|
10700
10508
|
type: "button",
|
|
@@ -10706,12 +10514,12 @@ function RadioItem({ value, children, disabled = false, className }) {
|
|
|
10706
10514
|
className: cn(radioCircleVariants({ checked: isChecked ? "true" : "false" })),
|
|
10707
10515
|
onClick: () => !isDisabled && ctx.onValueChange(value)
|
|
10708
10516
|
},
|
|
10709
|
-
isChecked &&
|
|
10517
|
+
isChecked && React42.createElement(
|
|
10710
10518
|
"span",
|
|
10711
10519
|
{ className: "block h-2 w-2 rounded-full bg-primary-foreground mx-auto" }
|
|
10712
10520
|
)
|
|
10713
10521
|
),
|
|
10714
|
-
children &&
|
|
10522
|
+
children && React42.createElement("span", { className: "text-sm" }, children)
|
|
10715
10523
|
);
|
|
10716
10524
|
}
|
|
10717
10525
|
RadioGroup.displayName = "RadioGroup";
|
|
@@ -10783,11 +10591,11 @@ function ReactionBar({
|
|
|
10783
10591
|
className
|
|
10784
10592
|
}) {
|
|
10785
10593
|
const api = createReactionBar({ reactions, onToggle, onAdd });
|
|
10786
|
-
return
|
|
10594
|
+
return React42.createElement(
|
|
10787
10595
|
"div",
|
|
10788
10596
|
{ ...api.ariaProps, className: cn(reactionBarStyles, className) },
|
|
10789
10597
|
api.reactions.map(
|
|
10790
|
-
(reaction, i) =>
|
|
10598
|
+
(reaction, i) => React42.createElement(
|
|
10791
10599
|
"button",
|
|
10792
10600
|
{
|
|
10793
10601
|
key: `${reaction.emoji}-${i}`,
|
|
@@ -10798,11 +10606,11 @@ function ReactionBar({
|
|
|
10798
10606
|
onClick: () => api.toggle(reaction.emoji),
|
|
10799
10607
|
...api.getReactionAriaProps(reaction)
|
|
10800
10608
|
},
|
|
10801
|
-
|
|
10802
|
-
|
|
10609
|
+
React42.createElement("span", { className: reactionEmojiStyles }, reaction.emoji),
|
|
10610
|
+
React42.createElement("span", { className: reactionCountStyles }, reaction.count)
|
|
10803
10611
|
)
|
|
10804
10612
|
),
|
|
10805
|
-
showAddButton &&
|
|
10613
|
+
showAddButton && React42.createElement(
|
|
10806
10614
|
"button",
|
|
10807
10615
|
{
|
|
10808
10616
|
type: "button",
|
|
@@ -10951,7 +10759,7 @@ var selectItemVariants = cva({
|
|
|
10951
10759
|
selected: "false"
|
|
10952
10760
|
}
|
|
10953
10761
|
});
|
|
10954
|
-
var SelectContext =
|
|
10762
|
+
var SelectContext = React42.createContext({
|
|
10955
10763
|
value: void 0,
|
|
10956
10764
|
onValueChange: () => {
|
|
10957
10765
|
},
|
|
@@ -10971,7 +10779,7 @@ function Select({
|
|
|
10971
10779
|
children,
|
|
10972
10780
|
placeholder = "Select an option"
|
|
10973
10781
|
}) {
|
|
10974
|
-
const [open, setOpen] =
|
|
10782
|
+
const [open, setOpen] = React42.useState(false);
|
|
10975
10783
|
const api = createSelect({ value, disabled, open, placeholder });
|
|
10976
10784
|
return /* @__PURE__ */ jsx(
|
|
10977
10785
|
SelectContext.Provider,
|
|
@@ -10994,9 +10802,9 @@ function Select({
|
|
|
10994
10802
|
}
|
|
10995
10803
|
);
|
|
10996
10804
|
}
|
|
10997
|
-
var SelectTrigger =
|
|
10805
|
+
var SelectTrigger = React42.forwardRef(
|
|
10998
10806
|
({ className, children, size = "default", ...props }, ref) => {
|
|
10999
|
-
const { open, setOpen, disabled, triggerId, contentId } =
|
|
10807
|
+
const { open, setOpen, disabled, triggerId, contentId } = React42.useContext(SelectContext);
|
|
11000
10808
|
const api = createSelect({ disabled, open });
|
|
11001
10809
|
const handleClick = () => {
|
|
11002
10810
|
if (!disabled) {
|
|
@@ -11053,11 +10861,11 @@ var SelectTrigger = React41.forwardRef(
|
|
|
11053
10861
|
}
|
|
11054
10862
|
);
|
|
11055
10863
|
SelectTrigger.displayName = "SelectTrigger";
|
|
11056
|
-
var SelectContent =
|
|
10864
|
+
var SelectContent = React42.forwardRef(
|
|
11057
10865
|
({ className, children, ...props }, forwardedRef) => {
|
|
11058
|
-
const { open, contentId, triggerId, setOpen } =
|
|
11059
|
-
const containerRef =
|
|
11060
|
-
const ref =
|
|
10866
|
+
const { open, contentId, triggerId, setOpen } = React42.useContext(SelectContext);
|
|
10867
|
+
const containerRef = React42.useRef(null);
|
|
10868
|
+
const ref = React42.useCallback(
|
|
11061
10869
|
(node) => {
|
|
11062
10870
|
containerRef.current = node;
|
|
11063
10871
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -11065,7 +10873,7 @@ var SelectContent = React41.forwardRef(
|
|
|
11065
10873
|
},
|
|
11066
10874
|
[forwardedRef]
|
|
11067
10875
|
);
|
|
11068
|
-
|
|
10876
|
+
React42.useEffect(() => {
|
|
11069
10877
|
if (open && containerRef.current) {
|
|
11070
10878
|
const firstOption = containerRef.current.querySelector('[role="option"]:not([aria-disabled="true"])');
|
|
11071
10879
|
if (firstOption) {
|
|
@@ -11114,9 +10922,9 @@ var SelectContent = React41.forwardRef(
|
|
|
11114
10922
|
}
|
|
11115
10923
|
);
|
|
11116
10924
|
SelectContent.displayName = "SelectContent";
|
|
11117
|
-
var SelectItem =
|
|
10925
|
+
var SelectItem = React42.forwardRef(
|
|
11118
10926
|
({ className, children, value: itemValue, disabled: itemDisabled = false, ...props }, ref) => {
|
|
11119
|
-
const { value, onValueChange, setOpen, triggerId } =
|
|
10927
|
+
const { value, onValueChange, setOpen, triggerId } = React42.useContext(SelectContext);
|
|
11120
10928
|
const isSelected = value === itemValue;
|
|
11121
10929
|
const handleClick = () => {
|
|
11122
10930
|
if (!itemDisabled) {
|
|
@@ -11252,11 +11060,11 @@ function StatusIndicator({
|
|
|
11252
11060
|
}) {
|
|
11253
11061
|
const api = createStatusIndicator({ type, label, pulse });
|
|
11254
11062
|
const dotClassName = api.pulse ? statusPulseVariants({ type }) : statusDotVariants({ type });
|
|
11255
|
-
return
|
|
11063
|
+
return React42.createElement(
|
|
11256
11064
|
"span",
|
|
11257
11065
|
{ ...api.ariaProps, className: cn(statusContainerStyles, className) },
|
|
11258
|
-
|
|
11259
|
-
showLabel &&
|
|
11066
|
+
React42.createElement("span", { className: dotClassName }),
|
|
11067
|
+
showLabel && React42.createElement("span", { className: statusLabelStyles }, api.label)
|
|
11260
11068
|
);
|
|
11261
11069
|
}
|
|
11262
11070
|
StatusIndicator.displayName = "StatusIndicator";
|
|
@@ -11343,7 +11151,7 @@ var switchThumbVariants = cva({
|
|
|
11343
11151
|
{ checked: "true", size: "lg", class: "translate-x-5" }
|
|
11344
11152
|
]
|
|
11345
11153
|
});
|
|
11346
|
-
var Switch =
|
|
11154
|
+
var Switch = React42.forwardRef(
|
|
11347
11155
|
({ checked = false, onCheckedChange, disabled = false, size = "default", className, ...props }, ref) => {
|
|
11348
11156
|
const api = createSwitch({ checked, disabled });
|
|
11349
11157
|
const handleClick = () => {
|
|
@@ -11482,41 +11290,41 @@ function MessageComponent({
|
|
|
11482
11290
|
message,
|
|
11483
11291
|
api
|
|
11484
11292
|
}) {
|
|
11485
|
-
return
|
|
11293
|
+
return React42.createElement(
|
|
11486
11294
|
"div",
|
|
11487
11295
|
{ className: threadMessageStyles, ...api.getMessageAriaProps(message) },
|
|
11488
11296
|
// Avatar
|
|
11489
|
-
|
|
11297
|
+
React42.createElement(
|
|
11490
11298
|
"div",
|
|
11491
11299
|
{ className: threadAvatarStyles },
|
|
11492
|
-
message.author.avatarUrl ?
|
|
11300
|
+
message.author.avatarUrl ? React42.createElement("img", {
|
|
11493
11301
|
src: message.author.avatarUrl,
|
|
11494
11302
|
alt: message.author.name,
|
|
11495
11303
|
className: "h-full w-full object-cover"
|
|
11496
11304
|
}) : message.author.name.charAt(0).toUpperCase()
|
|
11497
11305
|
),
|
|
11498
11306
|
// Content
|
|
11499
|
-
|
|
11307
|
+
React42.createElement(
|
|
11500
11308
|
"div",
|
|
11501
11309
|
{ className: threadContentStyles },
|
|
11502
|
-
|
|
11310
|
+
React42.createElement(
|
|
11503
11311
|
"div",
|
|
11504
11312
|
{ className: "flex items-baseline" },
|
|
11505
|
-
|
|
11506
|
-
|
|
11313
|
+
React42.createElement("span", { className: threadAuthorStyles }, message.author.name),
|
|
11314
|
+
React42.createElement(
|
|
11507
11315
|
"span",
|
|
11508
11316
|
{ className: threadTimestampStyles },
|
|
11509
11317
|
api.formatTimestamp(message.timestamp)
|
|
11510
11318
|
),
|
|
11511
|
-
message.edited &&
|
|
11319
|
+
message.edited && React42.createElement("span", { className: threadEditedStyles }, "(edited)")
|
|
11512
11320
|
),
|
|
11513
|
-
|
|
11321
|
+
React42.createElement("div", { className: threadBodyStyles }, message.content),
|
|
11514
11322
|
// Reactions
|
|
11515
|
-
message.reactions && message.reactions.length > 0 &&
|
|
11323
|
+
message.reactions && message.reactions.length > 0 && React42.createElement(
|
|
11516
11324
|
"div",
|
|
11517
11325
|
{ className: threadReactionsStyles },
|
|
11518
11326
|
message.reactions.map(
|
|
11519
|
-
(reaction, i) =>
|
|
11327
|
+
(reaction, i) => React42.createElement(
|
|
11520
11328
|
"button",
|
|
11521
11329
|
{
|
|
11522
11330
|
key: `${reaction.emoji}-${i}`,
|
|
@@ -11532,25 +11340,25 @@ function MessageComponent({
|
|
|
11532
11340
|
)
|
|
11533
11341
|
),
|
|
11534
11342
|
// Reply indicator
|
|
11535
|
-
message.replies && message.replies.length > 0 &&
|
|
11343
|
+
message.replies && message.replies.length > 0 && React42.createElement(
|
|
11536
11344
|
"div",
|
|
11537
11345
|
{ className: threadReplyIndicatorStyles },
|
|
11538
11346
|
`${message.replies.length} ${message.replies.length === 1 ? "reply" : "replies"}`
|
|
11539
11347
|
),
|
|
11540
11348
|
// Attachments
|
|
11541
11349
|
message.attachments && message.attachments.map(
|
|
11542
|
-
(attachment) =>
|
|
11350
|
+
(attachment) => React42.createElement(
|
|
11543
11351
|
"div",
|
|
11544
11352
|
{ key: attachment.id, className: threadAttachmentStyles },
|
|
11545
|
-
|
|
11546
|
-
|
|
11353
|
+
React42.createElement("span", null, "\u{1F4CE}"),
|
|
11354
|
+
React42.createElement("span", { className: "truncate" }, attachment.name)
|
|
11547
11355
|
)
|
|
11548
11356
|
),
|
|
11549
11357
|
// Actions (reply button)
|
|
11550
|
-
|
|
11358
|
+
React42.createElement(
|
|
11551
11359
|
"div",
|
|
11552
11360
|
{ className: threadActionsStyles },
|
|
11553
|
-
|
|
11361
|
+
React42.createElement(
|
|
11554
11362
|
"button",
|
|
11555
11363
|
{
|
|
11556
11364
|
type: "button",
|
|
@@ -11572,11 +11380,11 @@ function ThreadView({
|
|
|
11572
11380
|
className
|
|
11573
11381
|
}) {
|
|
11574
11382
|
const api = createThreadView({ messages, onReply, onReact, currentUserId });
|
|
11575
|
-
return
|
|
11383
|
+
return React42.createElement(
|
|
11576
11384
|
"div",
|
|
11577
11385
|
{ ...api.ariaProps, className: cn(threadContainerStyles, className) },
|
|
11578
11386
|
messages.map(
|
|
11579
|
-
(message) =>
|
|
11387
|
+
(message) => React42.createElement(MessageComponent, {
|
|
11580
11388
|
key: message.id,
|
|
11581
11389
|
message,
|
|
11582
11390
|
api
|
|
@@ -11610,11 +11418,11 @@ function observeHeadings(headingIds, callback, options) {
|
|
|
11610
11418
|
});
|
|
11611
11419
|
return () => observer.disconnect();
|
|
11612
11420
|
}
|
|
11613
|
-
var TableOfContents =
|
|
11421
|
+
var TableOfContents = React42.forwardRef(
|
|
11614
11422
|
({ className, containerRef, selectors = "h2, h3, h4", onActiveIdChange, ...props }, ref) => {
|
|
11615
|
-
const [headings, setHeadings] =
|
|
11616
|
-
const [activeId, setActiveId] =
|
|
11617
|
-
|
|
11423
|
+
const [headings, setHeadings] = React42.useState([]);
|
|
11424
|
+
const [activeId, setActiveId] = React42.useState("");
|
|
11425
|
+
React42.useEffect(() => {
|
|
11618
11426
|
const container = containerRef?.current || document.body;
|
|
11619
11427
|
if (!container) return;
|
|
11620
11428
|
const parsedHeadings = parseHeadings(container, selectors);
|
|
@@ -11653,14 +11461,14 @@ var TableOfContents = React41.forwardRef(
|
|
|
11653
11461
|
}
|
|
11654
11462
|
);
|
|
11655
11463
|
TableOfContents.displayName = "TableOfContents";
|
|
11656
|
-
var CarouselContext =
|
|
11657
|
-
var Carousel =
|
|
11464
|
+
var CarouselContext = React42.createContext(null);
|
|
11465
|
+
var Carousel = React42.forwardRef(
|
|
11658
11466
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
11659
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
11467
|
+
const [uncontrolledValue, setUncontrolledValue] = React42.useState(
|
|
11660
11468
|
defaultValue ?? (type === "multiple" ? [] : "")
|
|
11661
11469
|
);
|
|
11662
11470
|
const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
11663
|
-
const handleValueChange =
|
|
11471
|
+
const handleValueChange = React42.useCallback(
|
|
11664
11472
|
(itemValue) => {
|
|
11665
11473
|
if (type === "single") {
|
|
11666
11474
|
const newValue = value === itemValue && collapsible ? "" : itemValue;
|
|
@@ -11679,20 +11487,20 @@ var Carousel = React41.forwardRef(
|
|
|
11679
11487
|
}
|
|
11680
11488
|
);
|
|
11681
11489
|
Carousel.displayName = "Carousel";
|
|
11682
|
-
var CarouselItemContext =
|
|
11683
|
-
var CarouselItem =
|
|
11490
|
+
var CarouselItemContext = React42.createContext(null);
|
|
11491
|
+
var CarouselItem = React42.forwardRef(
|
|
11684
11492
|
({ className, value, ...props }, ref) => {
|
|
11685
|
-
const context =
|
|
11493
|
+
const context = React42.useContext(CarouselContext);
|
|
11686
11494
|
if (!context) throw new Error("CarouselItem must be within Carousel");
|
|
11687
11495
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
11688
11496
|
return /* @__PURE__ */ jsx(CarouselItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
11689
11497
|
}
|
|
11690
11498
|
);
|
|
11691
11499
|
CarouselItem.displayName = "CarouselItem";
|
|
11692
|
-
var CarouselTrigger =
|
|
11500
|
+
var CarouselTrigger = React42.forwardRef(
|
|
11693
11501
|
({ className, children, ...props }, ref) => {
|
|
11694
|
-
const carouselContext =
|
|
11695
|
-
const itemContext =
|
|
11502
|
+
const carouselContext = React42.useContext(CarouselContext);
|
|
11503
|
+
const itemContext = React42.useContext(CarouselItemContext);
|
|
11696
11504
|
if (!carouselContext || !itemContext) throw new Error("CarouselTrigger missing context");
|
|
11697
11505
|
return /* @__PURE__ */ jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxs(
|
|
11698
11506
|
"button",
|
|
@@ -11731,9 +11539,9 @@ var CarouselTrigger = React41.forwardRef(
|
|
|
11731
11539
|
}
|
|
11732
11540
|
);
|
|
11733
11541
|
CarouselTrigger.displayName = "CarouselTrigger";
|
|
11734
|
-
var CarouselContent =
|
|
11542
|
+
var CarouselContent = React42.forwardRef(
|
|
11735
11543
|
({ className, children, ...props }, ref) => {
|
|
11736
|
-
const itemContext =
|
|
11544
|
+
const itemContext = React42.useContext(CarouselItemContext);
|
|
11737
11545
|
if (!itemContext) throw new Error("CarouselContent missing context");
|
|
11738
11546
|
return /* @__PURE__ */ jsx(
|
|
11739
11547
|
"div",
|
|
@@ -11752,7 +11560,7 @@ var CarouselContent = React41.forwardRef(
|
|
|
11752
11560
|
}
|
|
11753
11561
|
);
|
|
11754
11562
|
CarouselContent.displayName = "CarouselContent";
|
|
11755
|
-
var Pagination =
|
|
11563
|
+
var Pagination = React42.forwardRef(
|
|
11756
11564
|
({ className, ...props }, ref) => {
|
|
11757
11565
|
return /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props });
|
|
11758
11566
|
}
|
|
@@ -11760,10 +11568,12 @@ var Pagination = React41.forwardRef(
|
|
|
11760
11568
|
Pagination.displayName = "Pagination";
|
|
11761
11569
|
var Callout = () => /* @__PURE__ */ jsx("div", {});
|
|
11762
11570
|
var Steps = () => /* @__PURE__ */ jsx("div", {});
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11571
|
+
var FileTree = () => {
|
|
11572
|
+
return /* @__PURE__ */ jsx("div", {});
|
|
11573
|
+
};
|
|
11574
|
+
var IconSystem = () => {
|
|
11575
|
+
return /* @__PURE__ */ jsx("div", {});
|
|
11576
|
+
};
|
|
11767
11577
|
|
|
11768
11578
|
// ../react-skip-to-content/dist/index.js
|
|
11769
11579
|
var SkipToContent = () => {
|
|
@@ -11781,7 +11591,7 @@ function createLinkCard(_props = {}) {
|
|
|
11781
11591
|
dataAttributes: { "data-slot": "link-card" }
|
|
11782
11592
|
};
|
|
11783
11593
|
}
|
|
11784
|
-
var LinkCard =
|
|
11594
|
+
var LinkCard = React42.forwardRef(
|
|
11785
11595
|
({ className, ...props }, ref) => {
|
|
11786
11596
|
const api = createLinkCard(props);
|
|
11787
11597
|
return /* @__PURE__ */ jsx(
|
|
@@ -11803,7 +11613,7 @@ function createCardGrid(_props = {}) {
|
|
|
11803
11613
|
dataAttributes: { "data-slot": "card-grid" }
|
|
11804
11614
|
};
|
|
11805
11615
|
}
|
|
11806
|
-
var CardGrid =
|
|
11616
|
+
var CardGrid = React42.forwardRef(
|
|
11807
11617
|
({ className, columns = 3, ...props }, ref) => {
|
|
11808
11618
|
const api = createCardGrid({ });
|
|
11809
11619
|
return /* @__PURE__ */ jsx(
|
|
@@ -11828,7 +11638,7 @@ function createPayment(props = {}) {
|
|
|
11828
11638
|
}
|
|
11829
11639
|
};
|
|
11830
11640
|
}
|
|
11831
|
-
var Payment =
|
|
11641
|
+
var Payment = React42.forwardRef(
|
|
11832
11642
|
({ className, disabled, ...props }, ref) => {
|
|
11833
11643
|
const api = createPayment({ disabled });
|
|
11834
11644
|
return /* @__PURE__ */ jsx(
|
|
@@ -11847,27 +11657,27 @@ var Payment = React41.forwardRef(
|
|
|
11847
11657
|
}
|
|
11848
11658
|
);
|
|
11849
11659
|
Payment.displayName = "Payment";
|
|
11850
|
-
var PaymentHeader =
|
|
11660
|
+
var PaymentHeader = React42.forwardRef(
|
|
11851
11661
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-6 flex flex-col gap-1.5", className), ...props })
|
|
11852
11662
|
);
|
|
11853
11663
|
PaymentHeader.displayName = "PaymentHeader";
|
|
11854
|
-
var PaymentTitle =
|
|
11664
|
+
var PaymentTitle = React42.forwardRef(
|
|
11855
11665
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("text-xl font-semibold leading-none tracking-tight", className), ...props })
|
|
11856
11666
|
);
|
|
11857
11667
|
PaymentTitle.displayName = "PaymentTitle";
|
|
11858
|
-
var PaymentDescription =
|
|
11668
|
+
var PaymentDescription = React42.forwardRef(
|
|
11859
11669
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
11860
11670
|
);
|
|
11861
11671
|
PaymentDescription.displayName = "PaymentDescription";
|
|
11862
|
-
var PaymentContent =
|
|
11672
|
+
var PaymentContent = React42.forwardRef(
|
|
11863
11673
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-4", className), ...props })
|
|
11864
11674
|
);
|
|
11865
11675
|
PaymentContent.displayName = "PaymentContent";
|
|
11866
|
-
var PaymentFooter =
|
|
11676
|
+
var PaymentFooter = React42.forwardRef(
|
|
11867
11677
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mt-6 flex flex-col gap-3", className), ...props })
|
|
11868
11678
|
);
|
|
11869
11679
|
PaymentFooter.displayName = "PaymentFooter";
|
|
11870
|
-
var PaymentButton =
|
|
11680
|
+
var PaymentButton = React42.forwardRef(
|
|
11871
11681
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
11872
11682
|
"button",
|
|
11873
11683
|
{
|
|
@@ -11882,6 +11692,6 @@ var PaymentButton = React41.forwardRef(
|
|
|
11882
11692
|
);
|
|
11883
11693
|
PaymentButton.displayName = "PaymentButton";
|
|
11884
11694
|
|
|
11885
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AnimatedText, AppShell, AuthGuard, AuthProvider, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, Breadcrumbs, Button, CATEGORY_LABELS, Calendar, CalendarHeader, Callout, Card2 as Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Checkbox, CodeBlock, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ContentProtection, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EmojiPicker, FeedbackButton, FeedbackDialog, FileUpload, Footer, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, MarkdownRenderer, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PresenceIndicator, ProgressBar, RadioGroup, RadioItem, ReactionBar, ResizableDivider, ResizableLayout, ResizablePane, STATUS_COLORS2 as STATUS_COLORS, STATUS_LABELS2 as STATUS_LABELS, SearchBar, SearchResultItem, SearchResults, Select, SelectContent, SelectItem, SelectTrigger, ShortcutBadge, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, StatsGrid, StatusIndicator, Steps, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeScript, ThemeToggle, ThreadView, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoPlayer, animatedTextVariants, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, dayVariants, deviceFrameVariants, dialogContentVariants, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rowVariants, searchBarVariants, searchResultVariants, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants, selectorVariants, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, progressBarVariants2 as slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, statCardVariants, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAuth, useTheme, useToast, optionVariants2 as versionSelectorOptionVariants, versionSelectorVariants, watermarkVariants };
|
|
11695
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnimatedText, AppShell, AuthGuard, AuthProvider, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, Breadcrumbs, Button, CATEGORY_LABELS, Calendar, CalendarHeader, Callout, Card2 as Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Checkbox, CodeBlock, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, ContentProtection, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EmojiPicker, FeedbackButton, FeedbackDialog, FileTree, FileUpload, Footer, IconSystem, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, MarkdownRenderer, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PresenceIndicator, ProgressBar, RadioGroup, RadioItem, ReactionBar, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_COLORS2 as STATUS_COLORS, STATUS_LABELS2 as STATUS_LABELS, SearchBar, SearchResultItem, SearchResults, Select, SelectContent, SelectItem, SelectTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, StatsGrid, StatusIndicator, Steps, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeScript, ThemeToggle, ThreadView, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoPlayer, altHintState, animatedTextVariants, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, dayVariants, deviceFrameVariants, dialogContentVariants, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rowVariants, searchBarVariants, searchResultVariants, selectContentVariants, selectItemVariants, selectTokens, selectTriggerVariants, selectorVariants, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, progressBarVariants2 as slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, statCardVariants, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAuth, useShortcut, useTheme, useToast, optionVariants2 as versionSelectorOptionVariants, versionSelectorVariants, watermarkVariants };
|
|
11886
11696
|
//# sourceMappingURL=index.js.map
|
|
11887
11697
|
//# sourceMappingURL=index.js.map
|