@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.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React42 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
6
|
|
|
@@ -22,365 +22,10 @@ function _interopNamespace(e) {
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var React42__namespace = /*#__PURE__*/_interopNamespace(React42);
|
|
26
26
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
var __defProp = Object.defineProperty;
|
|
30
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
31
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
32
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
33
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
34
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
35
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
36
|
-
}) : x)(function(x) {
|
|
37
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
38
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
39
|
-
});
|
|
40
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
41
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
42
|
-
};
|
|
43
|
-
var __export = (target, all) => {
|
|
44
|
-
for (var name in all)
|
|
45
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
46
|
-
};
|
|
47
|
-
var __copyProps = (to, from, except, desc) => {
|
|
48
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
49
|
-
for (let key of __getOwnPropNames(from))
|
|
50
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
51
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
52
|
-
}
|
|
53
|
-
return to;
|
|
54
|
-
};
|
|
55
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
|
|
56
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
57
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
58
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
59
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
60
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
61
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
62
|
-
mod
|
|
63
|
-
));
|
|
64
|
-
|
|
65
|
-
// ../react-file-tree/dist/index.js
|
|
66
|
-
var require_dist = __commonJS({
|
|
67
|
-
"../react-file-tree/dist/index.js"(exports$1) {
|
|
68
|
-
var jsxRuntime = __require("react/jsx-runtime");
|
|
69
|
-
var FileTree = () => {
|
|
70
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
71
|
-
};
|
|
72
|
-
exports$1.FileTree = FileTree;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// ../react-icon-system/dist/index.js
|
|
77
|
-
var require_dist2 = __commonJS({
|
|
78
|
-
"../react-icon-system/dist/index.js"(exports$1) {
|
|
79
|
-
var jsxRuntime = __require("react/jsx-runtime");
|
|
80
|
-
var IconSystem = () => {
|
|
81
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
82
|
-
};
|
|
83
|
-
exports$1.IconSystem = IconSystem;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// src/index.ts
|
|
88
|
-
var index_exports = {};
|
|
89
|
-
__export(index_exports, {
|
|
90
|
-
Accordion: () => Accordion,
|
|
91
|
-
AccordionContent: () => AccordionContent,
|
|
92
|
-
AccordionItem: () => AccordionItem,
|
|
93
|
-
AccordionTrigger: () => AccordionTrigger,
|
|
94
|
-
AnimatedText: () => AnimatedText,
|
|
95
|
-
AppShell: () => AppShell,
|
|
96
|
-
AuthGuard: () => AuthGuard,
|
|
97
|
-
AuthProvider: () => AuthProvider,
|
|
98
|
-
Avatar: () => Avatar,
|
|
99
|
-
AvatarFallback: () => AvatarFallback,
|
|
100
|
-
AvatarGroup: () => AvatarGroup,
|
|
101
|
-
AvatarImage: () => AvatarImage,
|
|
102
|
-
Badge: () => Badge,
|
|
103
|
-
BadgeDisplay: () => BadgeDisplay,
|
|
104
|
-
BottomNav: () => BottomNav,
|
|
105
|
-
Breadcrumbs: () => Breadcrumbs,
|
|
106
|
-
Button: () => Button,
|
|
107
|
-
CATEGORY_LABELS: () => CATEGORY_LABELS,
|
|
108
|
-
Calendar: () => Calendar,
|
|
109
|
-
CalendarHeader: () => CalendarHeader,
|
|
110
|
-
Callout: () => Callout,
|
|
111
|
-
Card: () => Card2,
|
|
112
|
-
CardContent: () => CardContent,
|
|
113
|
-
CardDescription: () => CardDescription,
|
|
114
|
-
CardFooter: () => CardFooter,
|
|
115
|
-
CardGrid: () => CardGrid,
|
|
116
|
-
CardHeader: () => CardHeader,
|
|
117
|
-
CardTitle: () => CardTitle,
|
|
118
|
-
Carousel: () => Carousel,
|
|
119
|
-
CarouselContent: () => CarouselContent,
|
|
120
|
-
CarouselItem: () => CarouselItem,
|
|
121
|
-
CarouselTrigger: () => CarouselTrigger,
|
|
122
|
-
Checkbox: () => Checkbox,
|
|
123
|
-
CodeBlock: () => CodeBlock,
|
|
124
|
-
CodeEditor: () => CodeEditor,
|
|
125
|
-
Collapsible: () => Collapsible,
|
|
126
|
-
CollapsibleContent: () => CollapsibleContent,
|
|
127
|
-
CollapsibleTrigger: () => CollapsibleTrigger,
|
|
128
|
-
Command: () => Command,
|
|
129
|
-
CommandEmpty: () => CommandEmpty,
|
|
130
|
-
CommandGroup: () => CommandGroup,
|
|
131
|
-
CommandInput: () => CommandInput,
|
|
132
|
-
CommandItem: () => CommandItem,
|
|
133
|
-
CommandList: () => CommandList,
|
|
134
|
-
CommandSeparator: () => CommandSeparator,
|
|
135
|
-
ContentProtection: () => ContentProtection,
|
|
136
|
-
DataTable: () => DataTable,
|
|
137
|
-
DatePicker: () => DatePicker,
|
|
138
|
-
DeviceFrame: () => DeviceFrame,
|
|
139
|
-
Dialog: () => Dialog,
|
|
140
|
-
DialogClose: () => DialogClose,
|
|
141
|
-
DialogContent: () => DialogContent,
|
|
142
|
-
DialogDescription: () => DialogDescription,
|
|
143
|
-
DialogFooter: () => DialogFooter,
|
|
144
|
-
DialogHeader: () => DialogHeader,
|
|
145
|
-
DialogOverlay: () => DialogOverlay,
|
|
146
|
-
DialogTitle: () => DialogTitle,
|
|
147
|
-
DialogTrigger: () => DialogTrigger,
|
|
148
|
-
DropdownMenu: () => DropdownMenu,
|
|
149
|
-
DropdownMenuContent: () => DropdownMenuContent,
|
|
150
|
-
DropdownMenuItem: () => DropdownMenuItem,
|
|
151
|
-
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
152
|
-
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
153
|
-
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
154
|
-
EMOJI_CATEGORIES: () => EMOJI_CATEGORIES,
|
|
155
|
-
EMOJI_DATA: () => EMOJI_DATA,
|
|
156
|
-
EmojiPicker: () => EmojiPicker,
|
|
157
|
-
FeedbackButton: () => FeedbackButton,
|
|
158
|
-
FeedbackDialog: () => FeedbackDialog,
|
|
159
|
-
FileUpload: () => FileUpload,
|
|
160
|
-
Footer: () => Footer,
|
|
161
|
-
InlineEditor: () => InlineEditor,
|
|
162
|
-
Input: () => Input,
|
|
163
|
-
InputGroup: () => InputGroup,
|
|
164
|
-
InputGroupAddon: () => InputGroupAddon,
|
|
165
|
-
InputGroupButton: () => InputGroupButton,
|
|
166
|
-
InputGroupText: () => InputGroupText,
|
|
167
|
-
InstallPrompt: () => InstallPrompt,
|
|
168
|
-
KeyboardShortcut: () => KeyboardShortcut,
|
|
169
|
-
LanguageSelector: () => LanguageSelector,
|
|
170
|
-
LinkCard: () => LinkCard,
|
|
171
|
-
MarkdownRenderer: () => MarkdownRenderer,
|
|
172
|
-
MobileNav: () => MobileNav,
|
|
173
|
-
MobileNavContent: () => MobileNavContent,
|
|
174
|
-
MobileNavLink: () => MobileNavLink,
|
|
175
|
-
MobileNavTrigger: () => MobileNavTrigger,
|
|
176
|
-
Navbar: () => Navbar,
|
|
177
|
-
OtpInput: () => OtpInput,
|
|
178
|
-
PRESENCE_STATUS_COLORS: () => STATUS_COLORS,
|
|
179
|
-
PRESENCE_STATUS_LABELS: () => STATUS_LABELS,
|
|
180
|
-
Pagination: () => Pagination,
|
|
181
|
-
Payment: () => Payment,
|
|
182
|
-
Popover: () => Popover,
|
|
183
|
-
PopoverClose: () => PopoverClose,
|
|
184
|
-
PopoverContent: () => PopoverContent,
|
|
185
|
-
PopoverTrigger: () => PopoverTrigger,
|
|
186
|
-
PresenceIndicator: () => PresenceIndicator,
|
|
187
|
-
ProgressBar: () => ProgressBar,
|
|
188
|
-
RadioGroup: () => RadioGroup,
|
|
189
|
-
RadioItem: () => RadioItem,
|
|
190
|
-
ReactionBar: () => ReactionBar,
|
|
191
|
-
ResizableDivider: () => ResizableDivider,
|
|
192
|
-
ResizableLayout: () => ResizableLayout,
|
|
193
|
-
ResizablePane: () => ResizablePane,
|
|
194
|
-
STATUS_COLORS: () => STATUS_COLORS2,
|
|
195
|
-
STATUS_LABELS: () => STATUS_LABELS2,
|
|
196
|
-
SearchBar: () => SearchBar,
|
|
197
|
-
SearchResultItem: () => SearchResultItem,
|
|
198
|
-
SearchResults: () => SearchResults,
|
|
199
|
-
Select: () => Select,
|
|
200
|
-
SelectContent: () => SelectContent,
|
|
201
|
-
SelectItem: () => SelectItem,
|
|
202
|
-
SelectTrigger: () => SelectTrigger,
|
|
203
|
-
ShortcutBadge: () => ShortcutBadge,
|
|
204
|
-
Sidebar: () => Sidebar,
|
|
205
|
-
Skeleton: () => Skeleton,
|
|
206
|
-
SkeletonText: () => SkeletonText,
|
|
207
|
-
SkipToContent: () => SkipToContent,
|
|
208
|
-
SlideViewer: () => SlideViewer,
|
|
209
|
-
StatsGrid: () => StatsGrid,
|
|
210
|
-
StatusIndicator: () => StatusIndicator,
|
|
211
|
-
Steps: () => Steps,
|
|
212
|
-
Switch: () => Switch,
|
|
213
|
-
TableOfContents: () => TableOfContents,
|
|
214
|
-
Tabs: () => Tabs,
|
|
215
|
-
TabsContent: () => TabsContent,
|
|
216
|
-
TabsList: () => TabsList,
|
|
217
|
-
TabsTrigger: () => TabsTrigger,
|
|
218
|
-
Textarea: () => Textarea,
|
|
219
|
-
ThemeProvider: () => ThemeProvider,
|
|
220
|
-
ThemeScript: () => ThemeScript,
|
|
221
|
-
ThemeToggle: () => ThemeToggle,
|
|
222
|
-
ThreadView: () => ThreadView,
|
|
223
|
-
Toast: () => Toast,
|
|
224
|
-
ToastProvider: () => ToastProvider,
|
|
225
|
-
Toaster: () => Toaster,
|
|
226
|
-
Tooltip: () => Tooltip,
|
|
227
|
-
TooltipContent: () => TooltipContent,
|
|
228
|
-
TooltipTrigger: () => TooltipTrigger,
|
|
229
|
-
TypewriterText: () => TypewriterText,
|
|
230
|
-
VersionSelector: () => VersionSelector,
|
|
231
|
-
VideoPlayer: () => VideoPlayer,
|
|
232
|
-
animatedTextVariants: () => animatedTextVariants,
|
|
233
|
-
avatarFallbackVariants: () => avatarFallbackVariants,
|
|
234
|
-
avatarImageVariants: () => avatarImageVariants,
|
|
235
|
-
avatarTokens: () => avatarTokens,
|
|
236
|
-
avatarVariants: () => avatarVariants,
|
|
237
|
-
badgeGridVariants: () => badgeGridVariants,
|
|
238
|
-
badgeItemVariants: () => badgeItemVariants,
|
|
239
|
-
badgeVariants: () => badgeVariants,
|
|
240
|
-
bottomNavTabVariants: () => bottomNavTabVariants,
|
|
241
|
-
bottomNavVariants: () => bottomNavVariants,
|
|
242
|
-
breadcrumbItemVariants: () => breadcrumbItemVariants,
|
|
243
|
-
breadcrumbSeparatorStyles: () => breadcrumbSeparatorStyles,
|
|
244
|
-
breadcrumbsVariants: () => breadcrumbsVariants,
|
|
245
|
-
buttonTokens: () => buttonTokens,
|
|
246
|
-
buttonVariants: () => buttonVariants,
|
|
247
|
-
calendarVariants: () => calendarVariants,
|
|
248
|
-
canAccessAdmin: () => canAccessAdmin,
|
|
249
|
-
canAccessReviewer: () => canAccessReviewer,
|
|
250
|
-
cardContentVariants: () => cardContentVariants,
|
|
251
|
-
cardDescriptionVariants: () => cardDescriptionVariants,
|
|
252
|
-
cardFooterVariants: () => cardFooterVariants,
|
|
253
|
-
cardHeaderVariants: () => cardHeaderVariants,
|
|
254
|
-
cardTitleVariants: () => cardTitleVariants,
|
|
255
|
-
cardTokens: () => cardTokens,
|
|
256
|
-
cardVariants: () => cardVariants,
|
|
257
|
-
cellVariants: () => cellVariants,
|
|
258
|
-
checkIconPath: () => checkIconPath,
|
|
259
|
-
checkboxTokens: () => checkboxTokens,
|
|
260
|
-
checkboxVariants: () => checkboxVariants,
|
|
261
|
-
codeEditorTokens: () => codeEditorTokens,
|
|
262
|
-
codeEditorVariants: () => codeEditorVariants,
|
|
263
|
-
collapsibleContentVariants: () => collapsibleContentVariants,
|
|
264
|
-
commandGroupVariants: () => commandGroupVariants,
|
|
265
|
-
commandInputVariants: () => commandInputVariants,
|
|
266
|
-
commandItemVariants: () => commandItemVariants,
|
|
267
|
-
commandVariants: () => commandVariants,
|
|
268
|
-
contentProtectionVariants: () => contentProtectionVariants,
|
|
269
|
-
controlsVariants: () => controlsVariants,
|
|
270
|
-
dayVariants: () => dayVariants,
|
|
271
|
-
deviceFrameVariants: () => deviceFrameVariants,
|
|
272
|
-
dialogContentVariants: () => dialogContentVariants,
|
|
273
|
-
editorVariants: () => editorVariants,
|
|
274
|
-
emojiPickerContainerStyles: () => emojiPickerContainerStyles,
|
|
275
|
-
emojiPickerEmojiButtonStyles: () => emojiPickerEmojiButtonStyles,
|
|
276
|
-
emojiPickerGridStyles: () => emojiPickerGridStyles,
|
|
277
|
-
feedbackDialogVariants: () => feedbackDialogVariants,
|
|
278
|
-
fileUploadDropZoneVariants: () => fileUploadDropZoneVariants,
|
|
279
|
-
fileUploadFileItemStyles: () => fileUploadFileItemStyles,
|
|
280
|
-
fileUploadFileListStyles: () => fileUploadFileListStyles,
|
|
281
|
-
footerVariants: () => footerVariants,
|
|
282
|
-
formatFileSize: () => formatFileSize,
|
|
283
|
-
formatRelativeTime: () => formatRelativeTime,
|
|
284
|
-
formatShortcut: () => formatShortcut,
|
|
285
|
-
formatTimestamp: () => formatTimestamp,
|
|
286
|
-
getAssignableRoles: () => getAssignableRoles,
|
|
287
|
-
getDefaultPortal: () => getDefaultPortal,
|
|
288
|
-
getInitials: () => getInitials,
|
|
289
|
-
hasAllRoles: () => hasAllRoles,
|
|
290
|
-
hasAnyRole: () => hasAnyRole,
|
|
291
|
-
hasRole: () => hasRole,
|
|
292
|
-
headerVariants: () => headerVariants,
|
|
293
|
-
indeterminateIconPath: () => indeterminateIconPath,
|
|
294
|
-
inputGroupAddonVariants: () => inputGroupAddonVariants,
|
|
295
|
-
inputGroupButtonVariants: () => inputGroupButtonVariants,
|
|
296
|
-
inputGroupTokens: () => inputGroupTokens,
|
|
297
|
-
inputGroupVariants: () => inputGroupVariants,
|
|
298
|
-
inputVariants: () => inputVariants,
|
|
299
|
-
installPromptVariants: () => installPromptVariants,
|
|
300
|
-
latestBadgeVariants: () => latestBadgeVariants,
|
|
301
|
-
markdownRendererTokens: () => markdownRendererTokens,
|
|
302
|
-
menuContentVariants: () => menuContentVariants,
|
|
303
|
-
menuItemVariants: () => menuItemVariants,
|
|
304
|
-
mobileNavContentVariants: () => mobileNavContentVariants,
|
|
305
|
-
mobileNavLinkVariants: () => mobileNavLinkVariants,
|
|
306
|
-
mobileNavTokens: () => mobileNavTokens,
|
|
307
|
-
mobileNavTriggerVariants: () => mobileNavTriggerVariants,
|
|
308
|
-
mobileNavVariants: () => mobileNavVariants,
|
|
309
|
-
navLinkVariants: () => navLinkVariants,
|
|
310
|
-
navbarVariants: () => navbarVariants,
|
|
311
|
-
optionVariants: () => optionVariants,
|
|
312
|
-
otpInputContainerVariants: () => otpInputContainerVariants,
|
|
313
|
-
otpInputSlotVariants: () => otpInputSlotVariants,
|
|
314
|
-
otpInputTokens: () => otpInputTokens,
|
|
315
|
-
overlayStyles: () => overlayStyles,
|
|
316
|
-
overlayVariants: () => overlayVariants,
|
|
317
|
-
playerVariants: () => playerVariants,
|
|
318
|
-
popoverContentVariants: () => popoverContentVariants,
|
|
319
|
-
previewVariants: () => previewVariants,
|
|
320
|
-
progressBarVariants: () => progressBarVariants,
|
|
321
|
-
proseVariants: () => proseVariants,
|
|
322
|
-
radioCircleVariants: () => radioCircleVariants,
|
|
323
|
-
radioGroupVariants: () => radioGroupVariants,
|
|
324
|
-
radioItemVariants: () => radioItemVariants,
|
|
325
|
-
reactionAddButtonStyles: () => reactionAddButtonStyles,
|
|
326
|
-
reactionBarStyles: () => reactionBarStyles,
|
|
327
|
-
reactionCountStyles: () => reactionCountStyles,
|
|
328
|
-
reactionEmojiStyles: () => reactionEmojiStyles,
|
|
329
|
-
reactionPillVariants: () => reactionPillVariants,
|
|
330
|
-
resizableDividerVariants: () => resizableDividerVariants,
|
|
331
|
-
resizableLayoutTokens: () => resizableLayoutTokens,
|
|
332
|
-
resizableLayoutVariants: () => resizableLayoutVariants,
|
|
333
|
-
resizablePaneVariants: () => resizablePaneVariants,
|
|
334
|
-
rowVariants: () => rowVariants,
|
|
335
|
-
searchBarVariants: () => searchBarVariants,
|
|
336
|
-
searchResultVariants: () => searchResultVariants,
|
|
337
|
-
selectContentVariants: () => selectContentVariants,
|
|
338
|
-
selectItemVariants: () => selectItemVariants,
|
|
339
|
-
selectTokens: () => selectTokens,
|
|
340
|
-
selectTriggerVariants: () => selectTriggerVariants,
|
|
341
|
-
selectorVariants: () => selectorVariants,
|
|
342
|
-
shortcutBadgeStyles: () => shortcutBadgeStyles,
|
|
343
|
-
shortcutKeyStyles: () => shortcutKeyStyles,
|
|
344
|
-
shortcutSeparatorStyles: () => shortcutSeparatorStyles,
|
|
345
|
-
sidebarItemVariants: () => sidebarItemVariants,
|
|
346
|
-
sidebarVariants: () => sidebarVariants,
|
|
347
|
-
skeletonVariants: () => skeletonVariants,
|
|
348
|
-
slideTypeBadgeVariants: () => slideTypeBadgeVariants,
|
|
349
|
-
slideViewerProgressBarVariants: () => progressBarVariants2,
|
|
350
|
-
slideViewerTokens: () => slideViewerTokens,
|
|
351
|
-
slideViewerVariants: () => slideViewerVariants,
|
|
352
|
-
statCardVariants: () => statCardVariants,
|
|
353
|
-
statsGridVariants: () => statsGridVariants,
|
|
354
|
-
statusContainerStyles: () => statusContainerStyles,
|
|
355
|
-
statusDotVariants: () => statusDotVariants,
|
|
356
|
-
statusLabelStyles: () => statusLabelStyles,
|
|
357
|
-
statusPulseVariants: () => statusPulseVariants,
|
|
358
|
-
switchThumbVariants: () => switchThumbVariants,
|
|
359
|
-
switchTokens: () => switchTokens,
|
|
360
|
-
switchVariants: () => switchVariants,
|
|
361
|
-
tableVariants: () => tableVariants,
|
|
362
|
-
tabsListVariants: () => tabsListVariants,
|
|
363
|
-
tabsTriggerVariants: () => tabsTriggerVariants,
|
|
364
|
-
textareaVariants: () => textareaVariants,
|
|
365
|
-
threadAuthorStyles: () => threadAuthorStyles,
|
|
366
|
-
threadAvatarStyles: () => threadAvatarStyles,
|
|
367
|
-
threadBodyStyles: () => threadBodyStyles,
|
|
368
|
-
threadContainerStyles: () => threadContainerStyles,
|
|
369
|
-
threadContentStyles: () => threadContentStyles,
|
|
370
|
-
threadMessageStyles: () => threadMessageStyles,
|
|
371
|
-
threadReactionsStyles: () => threadReactionsStyles,
|
|
372
|
-
threadTimestampStyles: () => threadTimestampStyles,
|
|
373
|
-
toastVariants: () => toastVariants,
|
|
374
|
-
toolbarVariants: () => toolbarVariants,
|
|
375
|
-
tooltipContentVariants: () => tooltipContentVariants,
|
|
376
|
-
typewriterVariants: () => typewriterVariants,
|
|
377
|
-
useAuth: () => useAuth,
|
|
378
|
-
useTheme: () => useTheme,
|
|
379
|
-
useToast: () => useToast,
|
|
380
|
-
versionSelectorOptionVariants: () => optionVariants2,
|
|
381
|
-
versionSelectorVariants: () => versionSelectorVariants,
|
|
382
|
-
watermarkVariants: () => watermarkVariants
|
|
383
|
-
});
|
|
28
|
+
// ../react-theme/dist/index.js
|
|
384
29
|
|
|
385
30
|
// ../theme/dist/index.js
|
|
386
31
|
function resolveTheme(mode, systemPrefersDark) {
|
|
@@ -496,14 +141,14 @@ function applyThemeToDOM(resolved, attribute = "class") {
|
|
|
496
141
|
}
|
|
497
142
|
|
|
498
143
|
// ../react-theme/dist/index.js
|
|
499
|
-
var ThemeContext =
|
|
144
|
+
var ThemeContext = React42__namespace.createContext(null);
|
|
500
145
|
function ThemeProvider({
|
|
501
146
|
children,
|
|
502
147
|
defaultMode = "system",
|
|
503
148
|
storageKey = "rfr-theme",
|
|
504
149
|
attribute = "class"
|
|
505
150
|
}) {
|
|
506
|
-
const themeRef =
|
|
151
|
+
const themeRef = React42__namespace.useRef(null);
|
|
507
152
|
if (!themeRef.current) {
|
|
508
153
|
const isBrowser = typeof window !== "undefined";
|
|
509
154
|
themeRef.current = createTheme(
|
|
@@ -512,8 +157,8 @@ function ThemeProvider({
|
|
|
512
157
|
isBrowser ? createMediaQueryAdapter() : void 0
|
|
513
158
|
);
|
|
514
159
|
}
|
|
515
|
-
const [state, setState] =
|
|
516
|
-
|
|
160
|
+
const [state, setState] = React42__namespace.useState(() => themeRef.current.getState());
|
|
161
|
+
React42__namespace.useEffect(() => {
|
|
517
162
|
const theme = themeRef.current;
|
|
518
163
|
applyThemeToDOM(theme.getState().resolved, attribute);
|
|
519
164
|
const unsub = theme.subscribe((newState) => {
|
|
@@ -525,7 +170,7 @@ function ThemeProvider({
|
|
|
525
170
|
theme.destroy();
|
|
526
171
|
};
|
|
527
172
|
}, [attribute]);
|
|
528
|
-
const contextValue =
|
|
173
|
+
const contextValue = React42__namespace.useMemo(
|
|
529
174
|
() => ({
|
|
530
175
|
mode: state.mode,
|
|
531
176
|
resolved: state.resolved,
|
|
@@ -533,10 +178,10 @@ function ThemeProvider({
|
|
|
533
178
|
}),
|
|
534
179
|
[state.mode, state.resolved]
|
|
535
180
|
);
|
|
536
|
-
return
|
|
181
|
+
return React42__namespace.createElement(ThemeContext.Provider, { value: contextValue }, children);
|
|
537
182
|
}
|
|
538
183
|
function useTheme() {
|
|
539
|
-
const context =
|
|
184
|
+
const context = React42__namespace.useContext(ThemeContext);
|
|
540
185
|
if (!context) {
|
|
541
186
|
throw new Error("useTheme must be used within a <ThemeProvider>");
|
|
542
187
|
}
|
|
@@ -548,7 +193,7 @@ var modes = [
|
|
|
548
193
|
{ value: "system", label: "System", icon: "monitor" }
|
|
549
194
|
];
|
|
550
195
|
var icons = {
|
|
551
|
-
sun:
|
|
196
|
+
sun: React42__namespace.createElement(
|
|
552
197
|
"svg",
|
|
553
198
|
{
|
|
554
199
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -561,10 +206,10 @@ var icons = {
|
|
|
561
206
|
strokeLinecap: "round",
|
|
562
207
|
strokeLinejoin: "round"
|
|
563
208
|
},
|
|
564
|
-
|
|
565
|
-
|
|
209
|
+
React42__namespace.createElement("circle", { cx: 12, cy: 12, r: 5 }),
|
|
210
|
+
React42__namespace.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" })
|
|
566
211
|
),
|
|
567
|
-
moon:
|
|
212
|
+
moon: React42__namespace.createElement(
|
|
568
213
|
"svg",
|
|
569
214
|
{
|
|
570
215
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -577,9 +222,9 @@ var icons = {
|
|
|
577
222
|
strokeLinecap: "round",
|
|
578
223
|
strokeLinejoin: "round"
|
|
579
224
|
},
|
|
580
|
-
|
|
225
|
+
React42__namespace.createElement("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
581
226
|
),
|
|
582
|
-
monitor:
|
|
227
|
+
monitor: React42__namespace.createElement(
|
|
583
228
|
"svg",
|
|
584
229
|
{
|
|
585
230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -592,15 +237,15 @@ var icons = {
|
|
|
592
237
|
strokeLinecap: "round",
|
|
593
238
|
strokeLinejoin: "round"
|
|
594
239
|
},
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
240
|
+
React42__namespace.createElement("rect", { x: 2, y: 3, width: 20, height: 14, rx: 2, ry: 2 }),
|
|
241
|
+
React42__namespace.createElement("line", { x1: 8, y1: 21, x2: 16, y2: 21 }),
|
|
242
|
+
React42__namespace.createElement("line", { x1: 12, y1: 17, x2: 12, y2: 21 })
|
|
598
243
|
)
|
|
599
244
|
};
|
|
600
245
|
function ThemeToggle({ className, variant = "segmented" }) {
|
|
601
246
|
const { mode, setMode } = useTheme();
|
|
602
247
|
if (variant === "segmented") {
|
|
603
|
-
return
|
|
248
|
+
return React42__namespace.createElement(
|
|
604
249
|
"div",
|
|
605
250
|
{
|
|
606
251
|
className: `inline-flex items-center gap-1 rounded-lg border p-1 ${className ?? ""}`,
|
|
@@ -608,7 +253,7 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
608
253
|
"aria-label": "Theme"
|
|
609
254
|
},
|
|
610
255
|
modes.map(
|
|
611
|
-
({ value, label, icon }) =>
|
|
256
|
+
({ value, label, icon }) => React42__namespace.createElement("button", {
|
|
612
257
|
key: value,
|
|
613
258
|
type: "button",
|
|
614
259
|
role: "radio",
|
|
@@ -620,9 +265,9 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
620
265
|
)
|
|
621
266
|
);
|
|
622
267
|
}
|
|
623
|
-
const [open, setOpen] =
|
|
624
|
-
const ref =
|
|
625
|
-
|
|
268
|
+
const [open, setOpen] = React42__namespace.useState(false);
|
|
269
|
+
const ref = React42__namespace.useRef(null);
|
|
270
|
+
React42__namespace.useEffect(() => {
|
|
626
271
|
if (!open) return;
|
|
627
272
|
const handler = (e) => {
|
|
628
273
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
@@ -631,24 +276,24 @@ function ThemeToggle({ className, variant = "segmented" }) {
|
|
|
631
276
|
return () => document.removeEventListener("mousedown", handler);
|
|
632
277
|
}, [open]);
|
|
633
278
|
const currentIcon = modes.find((m) => m.value === mode)?.icon ?? "monitor";
|
|
634
|
-
return
|
|
279
|
+
return React42__namespace.createElement(
|
|
635
280
|
"div",
|
|
636
281
|
{ ref, className: `relative ${className ?? ""}` },
|
|
637
|
-
|
|
282
|
+
React42__namespace.createElement("button", {
|
|
638
283
|
type: "button",
|
|
639
284
|
"aria-label": "Toggle theme",
|
|
640
285
|
"aria-expanded": open,
|
|
641
286
|
className: "inline-flex items-center justify-center rounded-md p-2 text-sm transition-colors hover:bg-muted",
|
|
642
287
|
onClick: () => setOpen(!open)
|
|
643
288
|
}, icons[currentIcon]),
|
|
644
|
-
open &&
|
|
289
|
+
open && React42__namespace.createElement(
|
|
645
290
|
"div",
|
|
646
291
|
{
|
|
647
292
|
className: "absolute right-0 top-full mt-1 z-50 min-w-[8rem] rounded-md border bg-popover p-1 shadow-md",
|
|
648
293
|
role: "menu"
|
|
649
294
|
},
|
|
650
295
|
modes.map(
|
|
651
|
-
({ value, label, icon }) =>
|
|
296
|
+
({ value, label, icon }) => React42__namespace.createElement("button", {
|
|
652
297
|
key: value,
|
|
653
298
|
type: "button",
|
|
654
299
|
role: "menuitem",
|
|
@@ -666,7 +311,7 @@ function ThemeScript({
|
|
|
666
311
|
storageKey = "rfr-theme",
|
|
667
312
|
attribute = "class"
|
|
668
313
|
}) {
|
|
669
|
-
return
|
|
314
|
+
return React42__namespace.createElement("script", {
|
|
670
315
|
dangerouslySetInnerHTML: {
|
|
671
316
|
__html: getThemeScript(storageKey, attribute)
|
|
672
317
|
}
|
|
@@ -784,14 +429,14 @@ function cva(config) {
|
|
|
784
429
|
return classes.filter(Boolean).join(" ");
|
|
785
430
|
};
|
|
786
431
|
}
|
|
787
|
-
var AccordionContext =
|
|
788
|
-
var Accordion =
|
|
432
|
+
var AccordionContext = React42__namespace.createContext(null);
|
|
433
|
+
var Accordion = React42__namespace.forwardRef(
|
|
789
434
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
790
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
435
|
+
const [uncontrolledValue, setUncontrolledValue] = React42__namespace.useState(
|
|
791
436
|
defaultValue ?? (type === "multiple" ? [] : "")
|
|
792
437
|
);
|
|
793
438
|
const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
794
|
-
const handleValueChange =
|
|
439
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
795
440
|
(itemValue) => {
|
|
796
441
|
if (type === "single") {
|
|
797
442
|
const newValue = value === itemValue && collapsible ? "" : itemValue;
|
|
@@ -810,20 +455,20 @@ var Accordion = React41__namespace.forwardRef(
|
|
|
810
455
|
}
|
|
811
456
|
);
|
|
812
457
|
Accordion.displayName = "Accordion";
|
|
813
|
-
var AccordionItemContext =
|
|
814
|
-
var AccordionItem =
|
|
458
|
+
var AccordionItemContext = React42__namespace.createContext(null);
|
|
459
|
+
var AccordionItem = React42__namespace.forwardRef(
|
|
815
460
|
({ className, value, ...props }, ref) => {
|
|
816
|
-
const context =
|
|
461
|
+
const context = React42__namespace.useContext(AccordionContext);
|
|
817
462
|
if (!context) throw new Error("AccordionItem must be within Accordion");
|
|
818
463
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
819
464
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
820
465
|
}
|
|
821
466
|
);
|
|
822
467
|
AccordionItem.displayName = "AccordionItem";
|
|
823
|
-
var AccordionTrigger =
|
|
468
|
+
var AccordionTrigger = React42__namespace.forwardRef(
|
|
824
469
|
({ className, children, ...props }, ref) => {
|
|
825
|
-
const accordionContext =
|
|
826
|
-
const itemContext =
|
|
470
|
+
const accordionContext = React42__namespace.useContext(AccordionContext);
|
|
471
|
+
const itemContext = React42__namespace.useContext(AccordionItemContext);
|
|
827
472
|
if (!accordionContext || !itemContext) throw new Error("AccordionTrigger missing context");
|
|
828
473
|
return /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
829
474
|
"button",
|
|
@@ -862,9 +507,9 @@ var AccordionTrigger = React41__namespace.forwardRef(
|
|
|
862
507
|
}
|
|
863
508
|
);
|
|
864
509
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
865
|
-
var AccordionContent =
|
|
510
|
+
var AccordionContent = React42__namespace.forwardRef(
|
|
866
511
|
({ className, children, ...props }, ref) => {
|
|
867
|
-
const itemContext =
|
|
512
|
+
const itemContext = React42__namespace.useContext(AccordionItemContext);
|
|
868
513
|
if (!itemContext) throw new Error("AccordionContent missing context");
|
|
869
514
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
870
515
|
"div",
|
|
@@ -946,16 +591,16 @@ var typewriterVariants = cva({
|
|
|
946
591
|
cursor: "blinking"
|
|
947
592
|
}
|
|
948
593
|
});
|
|
949
|
-
var AnimatedText =
|
|
594
|
+
var AnimatedText = React42__namespace.forwardRef(
|
|
950
595
|
({ words, interval = 2500, transitionDuration = 1e3, className, ...props }, ref) => {
|
|
951
|
-
const apiRef =
|
|
596
|
+
const apiRef = React42__namespace.useRef(
|
|
952
597
|
createAnimatedText({ words})
|
|
953
598
|
);
|
|
954
599
|
const api = apiRef.current;
|
|
955
|
-
const [currentIndex, setCurrentIndex] =
|
|
956
|
-
const [isExiting, setIsExiting] =
|
|
600
|
+
const [currentIndex, setCurrentIndex] = React42__namespace.useState(0);
|
|
601
|
+
const [isExiting, setIsExiting] = React42__namespace.useState(false);
|
|
957
602
|
const prefersReducedMotion = typeof globalThis !== "undefined" && typeof globalThis.matchMedia === "function" && globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
958
|
-
|
|
603
|
+
React42__namespace.useEffect(() => {
|
|
959
604
|
if (words.length <= 1) return;
|
|
960
605
|
const tick = setInterval(() => {
|
|
961
606
|
if (prefersReducedMotion) {
|
|
@@ -991,13 +636,13 @@ var AnimatedText = React41__namespace.forwardRef(
|
|
|
991
636
|
}
|
|
992
637
|
);
|
|
993
638
|
AnimatedText.displayName = "AnimatedText";
|
|
994
|
-
var TypewriterText =
|
|
639
|
+
var TypewriterText = React42__namespace.forwardRef(
|
|
995
640
|
({ text, speed = 50, startDelay = 0, className, ...props }, ref) => {
|
|
996
|
-
const apiRef =
|
|
641
|
+
const apiRef = React42__namespace.useRef(createTypewriter({ text}));
|
|
997
642
|
const api = apiRef.current;
|
|
998
|
-
const [currentIndex, setCurrentIndex] =
|
|
643
|
+
const [currentIndex, setCurrentIndex] = React42__namespace.useState(0);
|
|
999
644
|
const prefersReducedMotion = typeof globalThis !== "undefined" && typeof globalThis.matchMedia === "function" && globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1000
|
-
|
|
645
|
+
React42__namespace.useEffect(() => {
|
|
1001
646
|
if (prefersReducedMotion) {
|
|
1002
647
|
api.state.currentIndex = text.length;
|
|
1003
648
|
setCurrentIndex(text.length);
|
|
@@ -1158,24 +803,24 @@ function getAssignableRoles(user) {
|
|
|
1158
803
|
}
|
|
1159
804
|
|
|
1160
805
|
// ../react-auth/dist/index.js
|
|
1161
|
-
var AuthContext =
|
|
806
|
+
var AuthContext = React42__namespace.createContext(null);
|
|
1162
807
|
function AuthProvider({ children, ...config }) {
|
|
1163
|
-
const authRef =
|
|
808
|
+
const authRef = React42__namespace.useRef(null);
|
|
1164
809
|
if (!authRef.current) {
|
|
1165
810
|
if (!config.adapter && !config.testMode) {
|
|
1166
811
|
throw new Error("[refraction-ui/react-auth] You must provide an `adapter` to AuthProvider.");
|
|
1167
812
|
}
|
|
1168
813
|
authRef.current = createAuth(config.adapter, config);
|
|
1169
814
|
}
|
|
1170
|
-
const [state, setState] =
|
|
1171
|
-
|
|
815
|
+
const [state, setState] = React42__namespace.useState(() => authRef.current.getState());
|
|
816
|
+
React42__namespace.useEffect(() => {
|
|
1172
817
|
const unsub = authRef.current.subscribe(setState);
|
|
1173
818
|
return () => {
|
|
1174
819
|
unsub();
|
|
1175
820
|
authRef.current.destroy();
|
|
1176
821
|
};
|
|
1177
822
|
}, []);
|
|
1178
|
-
const value =
|
|
823
|
+
const value = React42__namespace.useMemo(
|
|
1179
824
|
() => ({
|
|
1180
825
|
user: state.user,
|
|
1181
826
|
isLoading: state.status === "loading",
|
|
@@ -1189,10 +834,10 @@ function AuthProvider({ children, ...config }) {
|
|
|
1189
834
|
}),
|
|
1190
835
|
[state.user, state.status]
|
|
1191
836
|
);
|
|
1192
|
-
return
|
|
837
|
+
return React42__namespace.createElement(AuthContext.Provider, { value }, children);
|
|
1193
838
|
}
|
|
1194
839
|
function useAuth() {
|
|
1195
|
-
const ctx =
|
|
840
|
+
const ctx = React42__namespace.useContext(AuthContext);
|
|
1196
841
|
if (!ctx) {
|
|
1197
842
|
throw new Error("useAuth must be used within an <AuthProvider>");
|
|
1198
843
|
}
|
|
@@ -1206,15 +851,15 @@ function AuthGuard({
|
|
|
1206
851
|
}) {
|
|
1207
852
|
const { isLoading, isAuthenticated, user } = useAuth();
|
|
1208
853
|
if (isLoading) {
|
|
1209
|
-
return
|
|
854
|
+
return React42__namespace.createElement(React42__namespace.Fragment, null, fallback ?? null);
|
|
1210
855
|
}
|
|
1211
856
|
if (!isAuthenticated) {
|
|
1212
|
-
return
|
|
857
|
+
return React42__namespace.createElement(React42__namespace.Fragment, null, fallback ?? null);
|
|
1213
858
|
}
|
|
1214
859
|
if (roles && roles.length > 0 && !hasAnyRole(user, roles)) {
|
|
1215
|
-
return
|
|
860
|
+
return React42__namespace.createElement(React42__namespace.Fragment, null, unauthorized ?? null);
|
|
1216
861
|
}
|
|
1217
|
-
return
|
|
862
|
+
return React42__namespace.createElement(React42__namespace.Fragment, null, children);
|
|
1218
863
|
}
|
|
1219
864
|
|
|
1220
865
|
// ../badge/dist/index.js
|
|
@@ -1254,7 +899,7 @@ var badgeVariants = cva({
|
|
|
1254
899
|
size: "md"
|
|
1255
900
|
}
|
|
1256
901
|
});
|
|
1257
|
-
var Badge =
|
|
902
|
+
var Badge = React42__namespace.forwardRef(
|
|
1258
903
|
({ variant, size, className, children, ...props }, ref) => {
|
|
1259
904
|
const api = createBadge({ variant});
|
|
1260
905
|
const classes = cn(badgeVariants({ variant, size }), className);
|
|
@@ -1301,7 +946,7 @@ var bottomNavTabVariants = cva({
|
|
|
1301
946
|
active: "false"
|
|
1302
947
|
}
|
|
1303
948
|
});
|
|
1304
|
-
var BottomNav =
|
|
949
|
+
var BottomNav = React42__namespace.forwardRef(
|
|
1305
950
|
({ tabs = [], currentPath, className, ...props }, ref) => {
|
|
1306
951
|
const api = createBottomNav({ currentPath });
|
|
1307
952
|
const classes = cn(bottomNavVariants(), className);
|
|
@@ -1374,7 +1019,7 @@ var breadcrumbItemVariants = cva({
|
|
|
1374
1019
|
}
|
|
1375
1020
|
});
|
|
1376
1021
|
var breadcrumbSeparatorStyles = "text-muted-foreground/50 select-none";
|
|
1377
|
-
var Breadcrumbs =
|
|
1022
|
+
var Breadcrumbs = React42__namespace.forwardRef(
|
|
1378
1023
|
({
|
|
1379
1024
|
pathname,
|
|
1380
1025
|
items,
|
|
@@ -1481,31 +1126,341 @@ var buttonVariants = cva({
|
|
|
1481
1126
|
size: "default"
|
|
1482
1127
|
}
|
|
1483
1128
|
});
|
|
1484
|
-
|
|
1485
|
-
|
|
1129
|
+
|
|
1130
|
+
// ../keyboard-shortcut/dist/index.js
|
|
1131
|
+
var MODIFIER_KEYS = /* @__PURE__ */ new Set(["Ctrl", "Control", "Alt", "Shift", "Meta", "Cmd", "Command"]);
|
|
1132
|
+
var KEY_DISPLAY = {
|
|
1133
|
+
"Ctrl": "Ctrl",
|
|
1134
|
+
"Control": "Ctrl",
|
|
1135
|
+
"Alt": "Alt",
|
|
1136
|
+
"Shift": "Shift",
|
|
1137
|
+
"Meta": "Meta",
|
|
1138
|
+
"Cmd": "Cmd",
|
|
1139
|
+
"Command": "Cmd",
|
|
1140
|
+
"Enter": "\u21B5",
|
|
1141
|
+
"Backspace": "\u232B",
|
|
1142
|
+
"Delete": "Del",
|
|
1143
|
+
"Escape": "Esc",
|
|
1144
|
+
"ArrowUp": "\u2191",
|
|
1145
|
+
"ArrowDown": "\u2193",
|
|
1146
|
+
"ArrowLeft": "\u2190",
|
|
1147
|
+
"ArrowRight": "\u2192",
|
|
1148
|
+
"Tab": "Tab",
|
|
1149
|
+
" ": "Space"
|
|
1150
|
+
};
|
|
1151
|
+
var MAC_KEY_DISPLAY = {
|
|
1152
|
+
"Ctrl": "\u2303",
|
|
1153
|
+
"Control": "\u2303",
|
|
1154
|
+
"Alt": "\u2325",
|
|
1155
|
+
"Shift": "\u21E7",
|
|
1156
|
+
"Meta": "\u2318",
|
|
1157
|
+
"Cmd": "\u2318",
|
|
1158
|
+
"Command": "\u2318",
|
|
1159
|
+
"Enter": "\u21B5",
|
|
1160
|
+
"Backspace": "\u232B",
|
|
1161
|
+
"Delete": "\u2326",
|
|
1162
|
+
"Escape": "\u238B",
|
|
1163
|
+
"ArrowUp": "\u2191",
|
|
1164
|
+
"ArrowDown": "\u2193",
|
|
1165
|
+
"ArrowLeft": "\u2190",
|
|
1166
|
+
"ArrowRight": "\u2192",
|
|
1167
|
+
"Tab": "\u21E5",
|
|
1168
|
+
" ": "\u2423"
|
|
1169
|
+
};
|
|
1170
|
+
function normalizeKey(key) {
|
|
1171
|
+
if (key === "Command" || key === "Cmd") return "Meta";
|
|
1172
|
+
if (key === "Control") return "Ctrl";
|
|
1173
|
+
return key;
|
|
1174
|
+
}
|
|
1175
|
+
function isMac() {
|
|
1176
|
+
if (typeof navigator !== "undefined") {
|
|
1177
|
+
return navigator.platform?.includes("Mac") || navigator.userAgent?.includes("Mac");
|
|
1178
|
+
}
|
|
1179
|
+
return false;
|
|
1180
|
+
}
|
|
1181
|
+
function formatShortcut(keys, mac) {
|
|
1182
|
+
const displayMap = mac ? MAC_KEY_DISPLAY : KEY_DISPLAY;
|
|
1183
|
+
return keys.map((key) => displayMap[key] ?? key.toUpperCase()).join(mac ? "" : "+");
|
|
1184
|
+
}
|
|
1185
|
+
function createKeyboardShortcut(props) {
|
|
1186
|
+
const {
|
|
1187
|
+
keys,
|
|
1188
|
+
onTrigger,
|
|
1189
|
+
enabled: enabledProp = true,
|
|
1190
|
+
preventDefault: preventDefaultProp = true
|
|
1191
|
+
} = props;
|
|
1192
|
+
const normalizedKeys = keys.map(normalizeKey);
|
|
1193
|
+
const modifiers = normalizedKeys.filter((k) => MODIFIER_KEYS.has(k));
|
|
1194
|
+
const regularKeys = normalizedKeys.filter((k) => !MODIFIER_KEYS.has(k));
|
|
1195
|
+
function handler(event) {
|
|
1196
|
+
if (!enabledProp) return false;
|
|
1197
|
+
const ctrlRequired = modifiers.includes("Ctrl");
|
|
1198
|
+
const altRequired = modifiers.includes("Alt");
|
|
1199
|
+
const shiftRequired = modifiers.includes("Shift");
|
|
1200
|
+
const metaRequired = modifiers.includes("Meta");
|
|
1201
|
+
if (ctrlRequired !== (event.ctrlKey || event.metaKey && !metaRequired)) ;
|
|
1202
|
+
const ctrlMatch = ctrlRequired ? event.ctrlKey : !event.ctrlKey;
|
|
1203
|
+
const altMatch = altRequired ? event.altKey : !event.altKey;
|
|
1204
|
+
const shiftMatch = shiftRequired ? event.shiftKey : !event.shiftKey;
|
|
1205
|
+
const metaMatch = metaRequired ? event.metaKey : !event.metaKey;
|
|
1206
|
+
if (!ctrlMatch || !altMatch || !shiftMatch || !metaMatch) return false;
|
|
1207
|
+
if (regularKeys.length > 0) {
|
|
1208
|
+
const eventKey = event.key.length === 1 ? event.key.toUpperCase() : event.key;
|
|
1209
|
+
const targetKey = regularKeys[0].length === 1 ? regularKeys[0].toUpperCase() : regularKeys[0];
|
|
1210
|
+
if (eventKey !== targetKey) return false;
|
|
1211
|
+
}
|
|
1212
|
+
if (preventDefaultProp) {
|
|
1213
|
+
event.preventDefault();
|
|
1214
|
+
}
|
|
1215
|
+
onTrigger();
|
|
1216
|
+
return true;
|
|
1217
|
+
}
|
|
1218
|
+
const mac = isMac();
|
|
1219
|
+
const display = formatShortcut(keys, false);
|
|
1220
|
+
const platformDisplay = formatShortcut(keys, mac);
|
|
1221
|
+
const badgeAriaProps = {
|
|
1222
|
+
"aria-hidden": true,
|
|
1223
|
+
role: "presentation"
|
|
1224
|
+
};
|
|
1225
|
+
return {
|
|
1226
|
+
handler,
|
|
1227
|
+
display,
|
|
1228
|
+
platformDisplay,
|
|
1229
|
+
enabled: enabledProp,
|
|
1230
|
+
keys,
|
|
1231
|
+
badgeAriaProps
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
var SANE_DEFAULTS = {
|
|
1235
|
+
save: ["Meta", "s"],
|
|
1236
|
+
search: ["Meta", "k"],
|
|
1237
|
+
close: ["Escape"],
|
|
1238
|
+
submit: ["Meta", "Enter"],
|
|
1239
|
+
undo: ["Meta", "z"],
|
|
1240
|
+
redo: ["Meta", "Shift", "z"],
|
|
1241
|
+
copy: ["Meta", "c"],
|
|
1242
|
+
paste: ["Meta", "v"],
|
|
1243
|
+
cut: ["Meta", "x"],
|
|
1244
|
+
new: ["Meta", "n"],
|
|
1245
|
+
print: ["Meta", "p"],
|
|
1246
|
+
help: ["?"]
|
|
1247
|
+
};
|
|
1248
|
+
var ShortcutRegistry = class {
|
|
1249
|
+
shortcuts = /* @__PURE__ */ new Map();
|
|
1250
|
+
register(keys, handler) {
|
|
1251
|
+
const keyStr = keys.map((k) => k.toLowerCase()).sort().join("+");
|
|
1252
|
+
if (this.shortcuts.has(keyStr)) {
|
|
1253
|
+
console.warn(`Shortcut ${keyStr} is already registered.`);
|
|
1254
|
+
}
|
|
1255
|
+
this.shortcuts.set(keyStr, handler);
|
|
1256
|
+
}
|
|
1257
|
+
unregister(keys) {
|
|
1258
|
+
const keyStr = keys.map((k) => k.toLowerCase()).sort().join("+");
|
|
1259
|
+
this.shortcuts.delete(keyStr);
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
var globalShortcutRegistry = new ShortcutRegistry();
|
|
1263
|
+
var AltHintState = class {
|
|
1264
|
+
showHints = false;
|
|
1265
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1266
|
+
initialized = false;
|
|
1267
|
+
init() {
|
|
1268
|
+
if (this.initialized || typeof window === "undefined") return;
|
|
1269
|
+
this.initialized = true;
|
|
1270
|
+
const handleKeyDown = (e) => {
|
|
1271
|
+
if (e.key === "Alt") {
|
|
1272
|
+
this.setShowHints(true);
|
|
1273
|
+
}
|
|
1274
|
+
};
|
|
1275
|
+
const handleKeyUp = (e) => {
|
|
1276
|
+
if (e.key === "Alt") {
|
|
1277
|
+
this.setShowHints(false);
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1280
|
+
const handleBlur = () => {
|
|
1281
|
+
this.setShowHints(false);
|
|
1282
|
+
};
|
|
1283
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1284
|
+
window.addEventListener("keyup", handleKeyUp);
|
|
1285
|
+
window.addEventListener("blur", handleBlur);
|
|
1286
|
+
}
|
|
1287
|
+
setShowHints(value) {
|
|
1288
|
+
if (this.showHints !== value) {
|
|
1289
|
+
this.showHints = value;
|
|
1290
|
+
this.listeners.forEach((listener) => listener(value));
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
subscribe(listener) {
|
|
1294
|
+
this.listeners.add(listener);
|
|
1295
|
+
listener(this.showHints);
|
|
1296
|
+
return () => {
|
|
1297
|
+
this.listeners.delete(listener);
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
get snapshot() {
|
|
1301
|
+
return this.showHints;
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
var altHintState = new AltHintState();
|
|
1305
|
+
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";
|
|
1306
|
+
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";
|
|
1307
|
+
var shortcutSeparatorStyles = "text-muted-foreground text-xs";
|
|
1308
|
+
var ShortcutContext = React42__namespace.createContext(false);
|
|
1309
|
+
function ShortcutProvider({ children }) {
|
|
1310
|
+
const [showHints, setShowHints] = React42__namespace.useState(altHintState.snapshot);
|
|
1311
|
+
React42__namespace.useEffect(() => {
|
|
1312
|
+
altHintState.init();
|
|
1313
|
+
return altHintState.subscribe(setShowHints);
|
|
1314
|
+
}, []);
|
|
1315
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ShortcutContext.Provider, { value: showHints, children });
|
|
1316
|
+
}
|
|
1317
|
+
function useShortcut({
|
|
1318
|
+
shortcut,
|
|
1319
|
+
action,
|
|
1320
|
+
onTrigger,
|
|
1321
|
+
enabled = true,
|
|
1322
|
+
preventDefault = true
|
|
1323
|
+
}) {
|
|
1324
|
+
const showHints = React42__namespace.useContext(ShortcutContext);
|
|
1325
|
+
const keys = React42__namespace.useMemo(() => {
|
|
1326
|
+
if (shortcut) {
|
|
1327
|
+
return shortcut.split("+").map((s) => s.trim());
|
|
1328
|
+
}
|
|
1329
|
+
if (action && SANE_DEFAULTS[action]) {
|
|
1330
|
+
return SANE_DEFAULTS[action];
|
|
1331
|
+
}
|
|
1332
|
+
return [];
|
|
1333
|
+
}, [shortcut, action]);
|
|
1334
|
+
const apiRef = React42__namespace.useRef(
|
|
1335
|
+
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
1336
|
+
);
|
|
1337
|
+
React42__namespace.useEffect(() => {
|
|
1338
|
+
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
1339
|
+
}, [keys, onTrigger, enabled, preventDefault]);
|
|
1340
|
+
React42__namespace.useEffect(() => {
|
|
1341
|
+
if (!enabled || keys.length === 0) return;
|
|
1342
|
+
const handler = () => {
|
|
1343
|
+
apiRef.current.handler(new KeyboardEvent("keydown"));
|
|
1344
|
+
};
|
|
1345
|
+
globalShortcutRegistry.register(keys, handler);
|
|
1346
|
+
const handleKeyDown = (e) => {
|
|
1347
|
+
apiRef.current.handler(e);
|
|
1348
|
+
};
|
|
1349
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1350
|
+
return () => {
|
|
1351
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1352
|
+
globalShortcutRegistry.unregister(keys);
|
|
1353
|
+
};
|
|
1354
|
+
}, [enabled, keys]);
|
|
1355
|
+
return { keys, showHints };
|
|
1356
|
+
}
|
|
1357
|
+
function ShortcutHint({ shortcut, action, className, platform = true, ...props }) {
|
|
1358
|
+
const showHints = React42__namespace.useContext(ShortcutContext);
|
|
1359
|
+
const keys = React42__namespace.useMemo(() => {
|
|
1360
|
+
if (shortcut) {
|
|
1361
|
+
return shortcut.split("+").map((s) => s.trim());
|
|
1362
|
+
}
|
|
1363
|
+
if (action && SANE_DEFAULTS[action]) {
|
|
1364
|
+
return SANE_DEFAULTS[action];
|
|
1365
|
+
}
|
|
1366
|
+
return [];
|
|
1367
|
+
}, [shortcut, action]);
|
|
1368
|
+
if (!showHints || keys.length === 0) return null;
|
|
1369
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none z-10", className), children: /* @__PURE__ */ jsxRuntime.jsx(ShortcutBadge, { keys, platform, ...props }) });
|
|
1370
|
+
}
|
|
1371
|
+
function KeyboardShortcut({
|
|
1372
|
+
keys,
|
|
1373
|
+
onTrigger,
|
|
1374
|
+
enabled = true,
|
|
1375
|
+
preventDefault = true
|
|
1376
|
+
}) {
|
|
1377
|
+
const apiRef = React42__namespace.useRef(
|
|
1378
|
+
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
1379
|
+
);
|
|
1380
|
+
React42__namespace.useEffect(() => {
|
|
1381
|
+
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
1382
|
+
}, [keys, onTrigger, enabled, preventDefault]);
|
|
1383
|
+
React42__namespace.useEffect(() => {
|
|
1384
|
+
if (!enabled) return;
|
|
1385
|
+
const handleKeyDown = (e) => {
|
|
1386
|
+
apiRef.current.handler(e);
|
|
1387
|
+
};
|
|
1388
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1389
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
1390
|
+
}, [enabled]);
|
|
1391
|
+
return null;
|
|
1392
|
+
}
|
|
1393
|
+
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
1394
|
+
function ShortcutBadge({ keys, platform = true, className }) {
|
|
1395
|
+
const api = createKeyboardShortcut({ keys, onTrigger: () => {
|
|
1396
|
+
}, enabled: false });
|
|
1397
|
+
const displayKeys = platform ? api.platformDisplay : api.display;
|
|
1398
|
+
const isMacDisplay = platform && displayKeys !== api.display;
|
|
1399
|
+
return React42__namespace.createElement(
|
|
1400
|
+
"kbd",
|
|
1401
|
+
{ ...api.badgeAriaProps, className: cn(shortcutBadgeStyles, className) },
|
|
1402
|
+
isMacDisplay ? React42__namespace.createElement("span", null, displayKeys) : keys.map(
|
|
1403
|
+
(key, i) => React42__namespace.createElement(
|
|
1404
|
+
React42__namespace.Fragment,
|
|
1405
|
+
{ key: i },
|
|
1406
|
+
i > 0 && React42__namespace.createElement("span", { className: shortcutSeparatorStyles }, "+"),
|
|
1407
|
+
React42__namespace.createElement(
|
|
1408
|
+
"span",
|
|
1409
|
+
{ className: shortcutKeyStyles },
|
|
1410
|
+
formatShortcut([key], false)
|
|
1411
|
+
)
|
|
1412
|
+
)
|
|
1413
|
+
)
|
|
1414
|
+
);
|
|
1415
|
+
}
|
|
1416
|
+
ShortcutBadge.displayName = "ShortcutBadge";
|
|
1417
|
+
var Button = React42__namespace.forwardRef(
|
|
1418
|
+
({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) => {
|
|
1486
1419
|
const api = createButton({ disabled, loading, type: props.type });
|
|
1487
1420
|
const classes = cn(buttonVariants({ variant, size }), className);
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1421
|
+
const internalRef = React42__namespace.useRef(null);
|
|
1422
|
+
const mergedRef = React42__namespace.useCallback(
|
|
1423
|
+
(node) => {
|
|
1424
|
+
internalRef.current = node;
|
|
1425
|
+
if (typeof ref === "function") ref(node);
|
|
1426
|
+
else if (ref) ref.current = node;
|
|
1427
|
+
},
|
|
1428
|
+
[ref]
|
|
1429
|
+
);
|
|
1430
|
+
useShortcut({
|
|
1431
|
+
shortcut,
|
|
1432
|
+
action,
|
|
1433
|
+
enabled: !disabled && !loading && (!!shortcut || !!action),
|
|
1434
|
+
onTrigger: () => {
|
|
1435
|
+
internalRef.current?.click();
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
if (asChild && React42__namespace.isValidElement(children)) {
|
|
1439
|
+
return React42__namespace.cloneElement(children, {
|
|
1440
|
+
ref: mergedRef,
|
|
1441
|
+
className: cn(classes, children.props.className, "relative"),
|
|
1492
1442
|
type: getButtonType({ type: props.type }),
|
|
1493
1443
|
...api.ariaProps,
|
|
1494
1444
|
...api.dataAttributes,
|
|
1495
|
-
...props
|
|
1445
|
+
...props,
|
|
1446
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1447
|
+
(shortcut || action) && /* @__PURE__ */ jsxRuntime.jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
1448
|
+
children.props.children
|
|
1449
|
+
] })
|
|
1496
1450
|
});
|
|
1497
1451
|
}
|
|
1498
1452
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1499
1453
|
"button",
|
|
1500
1454
|
{
|
|
1501
|
-
ref,
|
|
1455
|
+
ref: mergedRef,
|
|
1502
1456
|
type: getButtonType({ type: props.type }),
|
|
1503
|
-
className: classes,
|
|
1457
|
+
className: cn(classes, "relative"),
|
|
1504
1458
|
disabled: disabled || loading,
|
|
1505
1459
|
...api.ariaProps,
|
|
1506
1460
|
...api.dataAttributes,
|
|
1507
1461
|
...props,
|
|
1508
1462
|
children: [
|
|
1463
|
+
(shortcut || action) && /* @__PURE__ */ jsxRuntime.jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
1509
1464
|
loading && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1510
1465
|
"svg",
|
|
1511
1466
|
{
|
|
@@ -1693,15 +1648,15 @@ function Calendar({
|
|
|
1693
1648
|
maxDate,
|
|
1694
1649
|
disabledDates
|
|
1695
1650
|
}) {
|
|
1696
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
1697
|
-
const [uncontrolledMonth, setUncontrolledMonth] =
|
|
1651
|
+
const [uncontrolledValue, setUncontrolledValue] = React42__namespace.useState(defaultValue);
|
|
1652
|
+
const [uncontrolledMonth, setUncontrolledMonth] = React42__namespace.useState(
|
|
1698
1653
|
() => month ?? value ?? defaultValue ?? /* @__PURE__ */ new Date()
|
|
1699
1654
|
);
|
|
1700
1655
|
const isValueControlled = value !== void 0;
|
|
1701
1656
|
const isMonthControlled = month !== void 0;
|
|
1702
1657
|
const selectedValue = isValueControlled ? value : uncontrolledValue;
|
|
1703
1658
|
const displayMonth = isMonthControlled ? month : uncontrolledMonth;
|
|
1704
|
-
const handleSelect =
|
|
1659
|
+
const handleSelect = React42__namespace.useCallback(
|
|
1705
1660
|
(date) => {
|
|
1706
1661
|
if (!isValueControlled) {
|
|
1707
1662
|
setUncontrolledValue(date);
|
|
@@ -1710,7 +1665,7 @@ function Calendar({
|
|
|
1710
1665
|
},
|
|
1711
1666
|
[isValueControlled, onSelect]
|
|
1712
1667
|
);
|
|
1713
|
-
const handleMonthChange =
|
|
1668
|
+
const handleMonthChange = React42__namespace.useCallback(
|
|
1714
1669
|
(m) => {
|
|
1715
1670
|
if (!isMonthControlled) {
|
|
1716
1671
|
setUncontrolledMonth(m);
|
|
@@ -1736,28 +1691,28 @@ function Calendar({
|
|
|
1736
1691
|
return "default";
|
|
1737
1692
|
}
|
|
1738
1693
|
const monthLabel = `${MONTH_NAMES[api.state.currentMonth.getMonth()]} ${api.state.currentMonth.getFullYear()}`;
|
|
1739
|
-
return
|
|
1694
|
+
return React42__namespace.createElement(
|
|
1740
1695
|
"div",
|
|
1741
1696
|
{
|
|
1742
1697
|
className: cn(calendarVariants(), className),
|
|
1743
1698
|
...api.ariaProps
|
|
1744
1699
|
},
|
|
1745
1700
|
// Header row: prev, month label, next
|
|
1746
|
-
|
|
1701
|
+
React42__namespace.createElement(CalendarHeader, {
|
|
1747
1702
|
label: monthLabel,
|
|
1748
1703
|
labelId: api.ids.label,
|
|
1749
1704
|
onPrevMonth: api.prevMonth,
|
|
1750
1705
|
onNextMonth: api.nextMonth
|
|
1751
1706
|
}),
|
|
1752
1707
|
// Day-of-week headers
|
|
1753
|
-
|
|
1708
|
+
React42__namespace.createElement(
|
|
1754
1709
|
"div",
|
|
1755
1710
|
{
|
|
1756
1711
|
className: "grid grid-cols-7 gap-1 mb-1",
|
|
1757
1712
|
role: "row"
|
|
1758
1713
|
},
|
|
1759
1714
|
DAY_HEADERS.map(
|
|
1760
|
-
(d) =>
|
|
1715
|
+
(d) => React42__namespace.createElement(
|
|
1761
1716
|
"div",
|
|
1762
1717
|
{
|
|
1763
1718
|
key: d,
|
|
@@ -1770,7 +1725,7 @@ function Calendar({
|
|
|
1770
1725
|
)
|
|
1771
1726
|
),
|
|
1772
1727
|
// Day grid
|
|
1773
|
-
|
|
1728
|
+
React42__namespace.createElement(
|
|
1774
1729
|
"div",
|
|
1775
1730
|
{
|
|
1776
1731
|
className: "grid grid-cols-7 gap-1",
|
|
@@ -1779,7 +1734,7 @@ function Calendar({
|
|
|
1779
1734
|
api.days.map((day, i) => {
|
|
1780
1735
|
const dayAriaProps = api.getDayAriaProps(day);
|
|
1781
1736
|
const state = getDayState(day);
|
|
1782
|
-
return
|
|
1737
|
+
return React42__namespace.createElement(
|
|
1783
1738
|
"button",
|
|
1784
1739
|
{
|
|
1785
1740
|
key: i,
|
|
@@ -1803,12 +1758,12 @@ function CalendarHeader({
|
|
|
1803
1758
|
onNextMonth,
|
|
1804
1759
|
className
|
|
1805
1760
|
}) {
|
|
1806
|
-
return
|
|
1761
|
+
return React42__namespace.createElement(
|
|
1807
1762
|
"div",
|
|
1808
1763
|
{
|
|
1809
1764
|
className: cn("flex items-center justify-between mb-2", className)
|
|
1810
1765
|
},
|
|
1811
|
-
|
|
1766
|
+
React42__namespace.createElement(
|
|
1812
1767
|
"button",
|
|
1813
1768
|
{
|
|
1814
1769
|
type: "button",
|
|
@@ -1818,7 +1773,7 @@ function CalendarHeader({
|
|
|
1818
1773
|
},
|
|
1819
1774
|
"\u2039"
|
|
1820
1775
|
),
|
|
1821
|
-
|
|
1776
|
+
React42__namespace.createElement(
|
|
1822
1777
|
"div",
|
|
1823
1778
|
{
|
|
1824
1779
|
id: labelId,
|
|
@@ -1827,7 +1782,7 @@ function CalendarHeader({
|
|
|
1827
1782
|
},
|
|
1828
1783
|
label
|
|
1829
1784
|
),
|
|
1830
|
-
|
|
1785
|
+
React42__namespace.createElement(
|
|
1831
1786
|
"button",
|
|
1832
1787
|
{
|
|
1833
1788
|
type: "button",
|
|
@@ -1960,7 +1915,7 @@ var codeEditorVariants = cva({
|
|
|
1960
1915
|
size: "default"
|
|
1961
1916
|
}
|
|
1962
1917
|
});
|
|
1963
|
-
var CodeEditor =
|
|
1918
|
+
var CodeEditor = React42__namespace.forwardRef(
|
|
1964
1919
|
({
|
|
1965
1920
|
value = "",
|
|
1966
1921
|
onChange,
|
|
@@ -2076,9 +2031,9 @@ var collapsibleContentVariants = cva({
|
|
|
2076
2031
|
});
|
|
2077
2032
|
|
|
2078
2033
|
// ../react-collapsible/dist/index.js
|
|
2079
|
-
var CollapsibleContext =
|
|
2034
|
+
var CollapsibleContext = React42__namespace.createContext(null);
|
|
2080
2035
|
function useCollapsibleContext() {
|
|
2081
|
-
const ctx =
|
|
2036
|
+
const ctx = React42__namespace.useContext(CollapsibleContext);
|
|
2082
2037
|
if (!ctx) {
|
|
2083
2038
|
throw new Error(
|
|
2084
2039
|
"Collapsible compound components must be used within <Collapsible>"
|
|
@@ -2094,10 +2049,10 @@ function Collapsible({
|
|
|
2094
2049
|
children,
|
|
2095
2050
|
className
|
|
2096
2051
|
}) {
|
|
2097
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2052
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42__namespace.useState(defaultOpen);
|
|
2098
2053
|
const isControlled = controlledOpen !== void 0;
|
|
2099
2054
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
2100
|
-
const handleOpenChange =
|
|
2055
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
2101
2056
|
(next) => {
|
|
2102
2057
|
if (!isControlled) {
|
|
2103
2058
|
setUncontrolledOpen(next);
|
|
@@ -2106,12 +2061,12 @@ function Collapsible({
|
|
|
2106
2061
|
},
|
|
2107
2062
|
[isControlled, onOpenChange]
|
|
2108
2063
|
);
|
|
2109
|
-
const apiRef =
|
|
2064
|
+
const apiRef = React42__namespace.useRef(null);
|
|
2110
2065
|
if (apiRef.current === null) {
|
|
2111
2066
|
apiRef.current = createCollapsible({ open, defaultOpen, disabled });
|
|
2112
2067
|
}
|
|
2113
2068
|
const contentId = apiRef.current.contentProps.id;
|
|
2114
|
-
const ctx =
|
|
2069
|
+
const ctx = React42__namespace.useMemo(
|
|
2115
2070
|
() => ({
|
|
2116
2071
|
open,
|
|
2117
2072
|
onOpenChange: handleOpenChange,
|
|
@@ -2120,10 +2075,10 @@ function Collapsible({
|
|
|
2120
2075
|
}),
|
|
2121
2076
|
[open, handleOpenChange, disabled, contentId]
|
|
2122
2077
|
);
|
|
2123
|
-
return
|
|
2078
|
+
return React42__namespace.createElement(
|
|
2124
2079
|
CollapsibleContext.Provider,
|
|
2125
2080
|
{ value: ctx },
|
|
2126
|
-
|
|
2081
|
+
React42__namespace.createElement(
|
|
2127
2082
|
"div",
|
|
2128
2083
|
{
|
|
2129
2084
|
"data-state": open ? "open" : "closed",
|
|
@@ -2135,7 +2090,7 @@ function Collapsible({
|
|
|
2135
2090
|
);
|
|
2136
2091
|
}
|
|
2137
2092
|
Collapsible.displayName = "Collapsible";
|
|
2138
|
-
var CollapsibleTrigger =
|
|
2093
|
+
var CollapsibleTrigger = React42__namespace.forwardRef(({ onClick, disabled: disabledProp, children, ...props }, ref) => {
|
|
2139
2094
|
const { open, onOpenChange, disabled: ctxDisabled, contentId } = useCollapsibleContext();
|
|
2140
2095
|
const disabled = disabledProp ?? ctxDisabled;
|
|
2141
2096
|
const handleClick = (e) => {
|
|
@@ -2144,7 +2099,7 @@ var CollapsibleTrigger = React41__namespace.forwardRef(({ onClick, disabled: dis
|
|
|
2144
2099
|
}
|
|
2145
2100
|
onClick?.(e);
|
|
2146
2101
|
};
|
|
2147
|
-
return
|
|
2102
|
+
return React42__namespace.createElement(
|
|
2148
2103
|
"button",
|
|
2149
2104
|
{
|
|
2150
2105
|
ref,
|
|
@@ -2161,11 +2116,11 @@ var CollapsibleTrigger = React41__namespace.forwardRef(({ onClick, disabled: dis
|
|
|
2161
2116
|
);
|
|
2162
2117
|
});
|
|
2163
2118
|
CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
2164
|
-
var CollapsibleContent =
|
|
2119
|
+
var CollapsibleContent = React42__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
2165
2120
|
const { open, contentId } = useCollapsibleContext();
|
|
2166
2121
|
const dataState = open ? "open" : "closed";
|
|
2167
2122
|
if (!open) return null;
|
|
2168
|
-
return
|
|
2123
|
+
return React42__namespace.createElement(
|
|
2169
2124
|
"div",
|
|
2170
2125
|
{
|
|
2171
2126
|
ref,
|
|
@@ -2310,9 +2265,9 @@ var commandGroupVariants = cva({
|
|
|
2310
2265
|
});
|
|
2311
2266
|
|
|
2312
2267
|
// ../react-command/dist/index.js
|
|
2313
|
-
var CommandContext =
|
|
2268
|
+
var CommandContext = React42__namespace.createContext(null);
|
|
2314
2269
|
function useCommandContext() {
|
|
2315
|
-
const ctx =
|
|
2270
|
+
const ctx = React42__namespace.useContext(CommandContext);
|
|
2316
2271
|
if (!ctx) {
|
|
2317
2272
|
throw new Error("Command compound components must be used within <Command>");
|
|
2318
2273
|
}
|
|
@@ -2325,11 +2280,11 @@ function Command({
|
|
|
2325
2280
|
className,
|
|
2326
2281
|
children
|
|
2327
2282
|
}) {
|
|
2328
|
-
const [items, setItems] =
|
|
2329
|
-
const [search, setSearch] =
|
|
2330
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2331
|
-
const apiRef =
|
|
2332
|
-
const api =
|
|
2283
|
+
const [items, setItems] = React42__namespace.useState([]);
|
|
2284
|
+
const [search, setSearch] = React42__namespace.useState("");
|
|
2285
|
+
const [selectedIndex, setSelectedIndex] = React42__namespace.useState(0);
|
|
2286
|
+
const apiRef = React42__namespace.useRef(null);
|
|
2287
|
+
const api = React42__namespace.useMemo(() => {
|
|
2333
2288
|
const instance = createCommand({ open, onOpenChange, filter }, items);
|
|
2334
2289
|
if (search) {
|
|
2335
2290
|
instance.search(search);
|
|
@@ -2338,23 +2293,23 @@ function Command({
|
|
|
2338
2293
|
return instance;
|
|
2339
2294
|
}, [open, onOpenChange, filter, items, search]);
|
|
2340
2295
|
const filteredItems = api.state.filteredItems;
|
|
2341
|
-
const handleSearch =
|
|
2296
|
+
const handleSearch = React42__namespace.useCallback((query) => {
|
|
2342
2297
|
setSearch(query);
|
|
2343
2298
|
setSelectedIndex(0);
|
|
2344
2299
|
}, []);
|
|
2345
|
-
const handleSelect =
|
|
2300
|
+
const handleSelect = React42__namespace.useCallback((index) => {
|
|
2346
2301
|
setSelectedIndex(index);
|
|
2347
2302
|
}, []);
|
|
2348
|
-
const registerItem =
|
|
2303
|
+
const registerItem = React42__namespace.useCallback((item) => {
|
|
2349
2304
|
setItems((prev) => {
|
|
2350
2305
|
if (prev.some((i) => i.id === item.id)) return prev;
|
|
2351
2306
|
return [...prev, item];
|
|
2352
2307
|
});
|
|
2353
2308
|
}, []);
|
|
2354
|
-
const unregisterItem =
|
|
2309
|
+
const unregisterItem = React42__namespace.useCallback((id) => {
|
|
2355
2310
|
setItems((prev) => prev.filter((i) => i.id !== id));
|
|
2356
2311
|
}, []);
|
|
2357
|
-
const handleKeyDown =
|
|
2312
|
+
const handleKeyDown = React42__namespace.useCallback(
|
|
2358
2313
|
(e) => {
|
|
2359
2314
|
const handler = createKeyboardHandler({
|
|
2360
2315
|
[Keys.ArrowDown]: (ev) => {
|
|
@@ -2381,7 +2336,7 @@ function Command({
|
|
|
2381
2336
|
},
|
|
2382
2337
|
[filteredItems.length, onOpenChange]
|
|
2383
2338
|
);
|
|
2384
|
-
const ctx =
|
|
2339
|
+
const ctx = React42__namespace.useMemo(
|
|
2385
2340
|
() => ({
|
|
2386
2341
|
search,
|
|
2387
2342
|
onSearch: handleSearch,
|
|
@@ -2396,10 +2351,10 @@ function Command({
|
|
|
2396
2351
|
}),
|
|
2397
2352
|
[search, handleSearch, selectedIndex, handleSelect, items, filteredItems, registerItem, unregisterItem, api.ids.list, api.ids.input]
|
|
2398
2353
|
);
|
|
2399
|
-
return
|
|
2354
|
+
return React42__namespace.createElement(
|
|
2400
2355
|
CommandContext.Provider,
|
|
2401
2356
|
{ value: ctx },
|
|
2402
|
-
|
|
2357
|
+
React42__namespace.createElement(
|
|
2403
2358
|
"div",
|
|
2404
2359
|
{
|
|
2405
2360
|
className: cn(commandVariants(), className),
|
|
@@ -2411,14 +2366,14 @@ function Command({
|
|
|
2411
2366
|
);
|
|
2412
2367
|
}
|
|
2413
2368
|
Command.displayName = "Command";
|
|
2414
|
-
var CommandInput =
|
|
2369
|
+
var CommandInput = React42__namespace.forwardRef(
|
|
2415
2370
|
({ className, onChange, ...props }, ref) => {
|
|
2416
2371
|
const { search, onSearch, inputId, listId } = useCommandContext();
|
|
2417
2372
|
const handleChange = (e) => {
|
|
2418
2373
|
onSearch(e.target.value);
|
|
2419
2374
|
onChange?.(e);
|
|
2420
2375
|
};
|
|
2421
|
-
return
|
|
2376
|
+
return React42__namespace.createElement("input", {
|
|
2422
2377
|
ref,
|
|
2423
2378
|
id: inputId,
|
|
2424
2379
|
type: "text",
|
|
@@ -2433,10 +2388,10 @@ var CommandInput = React41__namespace.forwardRef(
|
|
|
2433
2388
|
}
|
|
2434
2389
|
);
|
|
2435
2390
|
CommandInput.displayName = "CommandInput";
|
|
2436
|
-
var CommandList =
|
|
2391
|
+
var CommandList = React42__namespace.forwardRef(
|
|
2437
2392
|
({ className, children, ...props }, ref) => {
|
|
2438
2393
|
const { listId } = useCommandContext();
|
|
2439
|
-
return
|
|
2394
|
+
return React42__namespace.createElement(
|
|
2440
2395
|
"div",
|
|
2441
2396
|
{
|
|
2442
2397
|
ref,
|
|
@@ -2451,11 +2406,11 @@ var CommandList = React41__namespace.forwardRef(
|
|
|
2451
2406
|
}
|
|
2452
2407
|
);
|
|
2453
2408
|
CommandList.displayName = "CommandList";
|
|
2454
|
-
var CommandEmpty =
|
|
2409
|
+
var CommandEmpty = React42__namespace.forwardRef(
|
|
2455
2410
|
({ className, children, ...props }, ref) => {
|
|
2456
2411
|
const { filteredItems } = useCommandContext();
|
|
2457
2412
|
if (filteredItems.length > 0) return null;
|
|
2458
|
-
return
|
|
2413
|
+
return React42__namespace.createElement(
|
|
2459
2414
|
"div",
|
|
2460
2415
|
{
|
|
2461
2416
|
ref,
|
|
@@ -2468,9 +2423,9 @@ var CommandEmpty = React41__namespace.forwardRef(
|
|
|
2468
2423
|
}
|
|
2469
2424
|
);
|
|
2470
2425
|
CommandEmpty.displayName = "CommandEmpty";
|
|
2471
|
-
var CommandGroup =
|
|
2426
|
+
var CommandGroup = React42__namespace.forwardRef(
|
|
2472
2427
|
({ className, heading, children, ...props }, ref) => {
|
|
2473
|
-
return
|
|
2428
|
+
return React42__namespace.createElement(
|
|
2474
2429
|
"div",
|
|
2475
2430
|
{
|
|
2476
2431
|
ref,
|
|
@@ -2479,7 +2434,7 @@ var CommandGroup = React41__namespace.forwardRef(
|
|
|
2479
2434
|
"aria-label": heading,
|
|
2480
2435
|
...props
|
|
2481
2436
|
},
|
|
2482
|
-
heading ?
|
|
2437
|
+
heading ? React42__namespace.createElement(
|
|
2483
2438
|
"div",
|
|
2484
2439
|
{ className: "px-2 py-1.5 text-xs font-medium text-muted-foreground" },
|
|
2485
2440
|
heading
|
|
@@ -2489,10 +2444,10 @@ var CommandGroup = React41__namespace.forwardRef(
|
|
|
2489
2444
|
}
|
|
2490
2445
|
);
|
|
2491
2446
|
CommandGroup.displayName = "CommandGroup";
|
|
2492
|
-
var CommandItem =
|
|
2447
|
+
var CommandItem = React42__namespace.forwardRef(
|
|
2493
2448
|
({ className, value, disabled, onSelect: onItemSelect, children, ...props }, ref) => {
|
|
2494
2449
|
const state = disabled ? "disabled" : "default";
|
|
2495
|
-
return
|
|
2450
|
+
return React42__namespace.createElement(
|
|
2496
2451
|
"div",
|
|
2497
2452
|
{
|
|
2498
2453
|
ref,
|
|
@@ -2513,9 +2468,9 @@ var CommandItem = React41__namespace.forwardRef(
|
|
|
2513
2468
|
}
|
|
2514
2469
|
);
|
|
2515
2470
|
CommandItem.displayName = "CommandItem";
|
|
2516
|
-
var CommandSeparator =
|
|
2471
|
+
var CommandSeparator = React42__namespace.forwardRef(
|
|
2517
2472
|
({ className, ...props }, ref) => {
|
|
2518
|
-
return
|
|
2473
|
+
return React42__namespace.createElement("div", {
|
|
2519
2474
|
ref,
|
|
2520
2475
|
role: "separator",
|
|
2521
2476
|
className: cn("-mx-1 h-px bg-border", className),
|
|
@@ -2562,7 +2517,7 @@ var contentProtectionVariants = cva({
|
|
|
2562
2517
|
var watermarkVariants = cva({
|
|
2563
2518
|
base: "pointer-events-none absolute inset-0 z-50 overflow-hidden"
|
|
2564
2519
|
});
|
|
2565
|
-
var ContentProtection =
|
|
2520
|
+
var ContentProtection = React42__namespace.forwardRef(
|
|
2566
2521
|
({
|
|
2567
2522
|
enabled,
|
|
2568
2523
|
disableCopy,
|
|
@@ -2809,10 +2764,10 @@ function DataTable({
|
|
|
2809
2764
|
className,
|
|
2810
2765
|
emptyMessage = "No data available"
|
|
2811
2766
|
}) {
|
|
2812
|
-
const [sortBy, setSortBy] =
|
|
2813
|
-
const [sortDir, setSortDir] =
|
|
2814
|
-
const [filters, setFilters] =
|
|
2815
|
-
const api =
|
|
2767
|
+
const [sortBy, setSortBy] = React42__namespace.useState(controlledSortBy ?? null);
|
|
2768
|
+
const [sortDir, setSortDir] = React42__namespace.useState(controlledSortDir);
|
|
2769
|
+
const [filters, setFilters] = React42__namespace.useState(controlledFilters ?? {});
|
|
2770
|
+
const api = React42__namespace.useMemo(
|
|
2816
2771
|
() => createDataTable({
|
|
2817
2772
|
columns,
|
|
2818
2773
|
data,
|
|
@@ -2823,7 +2778,7 @@ function DataTable({
|
|
|
2823
2778
|
}),
|
|
2824
2779
|
[columns, data, sortBy, sortDir, onSort, filters]
|
|
2825
2780
|
);
|
|
2826
|
-
const handleSort =
|
|
2781
|
+
const handleSort = React42__namespace.useCallback(
|
|
2827
2782
|
(columnId) => {
|
|
2828
2783
|
const col = columns.find((c) => c.id === columnId);
|
|
2829
2784
|
if (!col?.sortable) return;
|
|
@@ -2837,7 +2792,7 @@ function DataTable({
|
|
|
2837
2792
|
},
|
|
2838
2793
|
[columns, sortBy, sortDir, onSort]
|
|
2839
2794
|
);
|
|
2840
|
-
const handleFilter =
|
|
2795
|
+
const handleFilter = React42__namespace.useCallback(
|
|
2841
2796
|
(columnId, value) => {
|
|
2842
2797
|
setFilters((prev) => ({ ...prev, [columnId]: value }));
|
|
2843
2798
|
},
|
|
@@ -2845,26 +2800,26 @@ function DataTable({
|
|
|
2845
2800
|
);
|
|
2846
2801
|
const sortedData = api.state.sortedData;
|
|
2847
2802
|
const hasFilterable = columns.some((c) => c.filterable);
|
|
2848
|
-
return
|
|
2803
|
+
return React42__namespace.createElement(
|
|
2849
2804
|
"div",
|
|
2850
2805
|
{ className: "relative w-full overflow-auto" },
|
|
2851
|
-
|
|
2806
|
+
React42__namespace.createElement(
|
|
2852
2807
|
"table",
|
|
2853
2808
|
{
|
|
2854
2809
|
className: cn(tableVariants(), className),
|
|
2855
2810
|
role: "table"
|
|
2856
2811
|
},
|
|
2857
2812
|
// thead
|
|
2858
|
-
|
|
2813
|
+
React42__namespace.createElement(
|
|
2859
2814
|
"thead",
|
|
2860
2815
|
null,
|
|
2861
2816
|
// Header row
|
|
2862
|
-
|
|
2817
|
+
React42__namespace.createElement(
|
|
2863
2818
|
"tr",
|
|
2864
2819
|
{ role: "row" },
|
|
2865
2820
|
...columns.map((col) => {
|
|
2866
2821
|
const headerProps = api.getHeaderProps(col);
|
|
2867
|
-
return
|
|
2822
|
+
return React42__namespace.createElement(
|
|
2868
2823
|
"th",
|
|
2869
2824
|
{
|
|
2870
2825
|
key: col.id,
|
|
@@ -2873,19 +2828,19 @@ function DataTable({
|
|
|
2873
2828
|
onClick: col.sortable ? () => handleSort(col.id) : void 0
|
|
2874
2829
|
},
|
|
2875
2830
|
col.header,
|
|
2876
|
-
col.sortable && sortBy === col.id ?
|
|
2831
|
+
col.sortable && sortBy === col.id ? React42__namespace.createElement("span", { "aria-hidden": true }, sortDir === "asc" ? " \u2191" : " \u2193") : null
|
|
2877
2832
|
);
|
|
2878
2833
|
})
|
|
2879
2834
|
),
|
|
2880
2835
|
// Filter row
|
|
2881
|
-
hasFilterable ?
|
|
2836
|
+
hasFilterable ? React42__namespace.createElement(
|
|
2882
2837
|
"tr",
|
|
2883
2838
|
{ role: "row", "data-filter-row": "true" },
|
|
2884
2839
|
...columns.map(
|
|
2885
|
-
(col) =>
|
|
2840
|
+
(col) => React42__namespace.createElement(
|
|
2886
2841
|
"th",
|
|
2887
2842
|
{ key: `filter-${col.id}` },
|
|
2888
|
-
col.filterable ?
|
|
2843
|
+
col.filterable ? React42__namespace.createElement("input", {
|
|
2889
2844
|
type: "text",
|
|
2890
2845
|
"aria-label": `Filter ${col.header}`,
|
|
2891
2846
|
value: filters[col.id] ?? "",
|
|
@@ -2897,13 +2852,13 @@ function DataTable({
|
|
|
2897
2852
|
) : null
|
|
2898
2853
|
),
|
|
2899
2854
|
// tbody
|
|
2900
|
-
|
|
2855
|
+
React42__namespace.createElement(
|
|
2901
2856
|
"tbody",
|
|
2902
2857
|
null,
|
|
2903
|
-
sortedData.length === 0 ?
|
|
2858
|
+
sortedData.length === 0 ? React42__namespace.createElement(
|
|
2904
2859
|
"tr",
|
|
2905
2860
|
{ role: "row" },
|
|
2906
|
-
|
|
2861
|
+
React42__namespace.createElement(
|
|
2907
2862
|
"td",
|
|
2908
2863
|
{
|
|
2909
2864
|
colSpan: columns.length,
|
|
@@ -2913,7 +2868,7 @@ function DataTable({
|
|
|
2913
2868
|
emptyMessage
|
|
2914
2869
|
)
|
|
2915
2870
|
) : sortedData.map(
|
|
2916
|
-
(row, rowIndex) =>
|
|
2871
|
+
(row, rowIndex) => React42__namespace.createElement(
|
|
2917
2872
|
"tr",
|
|
2918
2873
|
{
|
|
2919
2874
|
key: rowIndex,
|
|
@@ -2921,7 +2876,7 @@ function DataTable({
|
|
|
2921
2876
|
className: rowVariants()
|
|
2922
2877
|
},
|
|
2923
2878
|
...columns.map(
|
|
2924
|
-
(col) =>
|
|
2879
|
+
(col) => React42__namespace.createElement(
|
|
2925
2880
|
"td",
|
|
2926
2881
|
{
|
|
2927
2882
|
key: col.id,
|
|
@@ -3031,7 +2986,7 @@ function DeviceFrame({
|
|
|
3031
2986
|
children
|
|
3032
2987
|
}) {
|
|
3033
2988
|
const api = createDeviceFrame({ device, orientation });
|
|
3034
|
-
return
|
|
2989
|
+
return React42__namespace.createElement(
|
|
3035
2990
|
"div",
|
|
3036
2991
|
{
|
|
3037
2992
|
className: cn(deviceFrameVariants({ device, orientation }), className),
|
|
@@ -3043,13 +2998,13 @@ function DeviceFrame({
|
|
|
3043
2998
|
...api.dataAttributes
|
|
3044
2999
|
},
|
|
3045
3000
|
// Notch decoration
|
|
3046
|
-
api.dimensions.notch ?
|
|
3001
|
+
api.dimensions.notch ? React42__namespace.createElement("div", {
|
|
3047
3002
|
className: "absolute top-0 left-1/2 -translate-x-1/2 w-[40%] h-[30px] bg-black rounded-b-2xl z-10",
|
|
3048
3003
|
"aria-hidden": "true",
|
|
3049
3004
|
"data-part": "notch"
|
|
3050
3005
|
}) : null,
|
|
3051
3006
|
// Screen area
|
|
3052
|
-
|
|
3007
|
+
React42__namespace.createElement(
|
|
3053
3008
|
"div",
|
|
3054
3009
|
{
|
|
3055
3010
|
className: "relative w-full h-full overflow-hidden bg-white",
|
|
@@ -3058,7 +3013,7 @@ function DeviceFrame({
|
|
|
3058
3013
|
children
|
|
3059
3014
|
),
|
|
3060
3015
|
// Home indicator decoration
|
|
3061
|
-
api.dimensions.homeIndicator ?
|
|
3016
|
+
api.dimensions.homeIndicator ? React42__namespace.createElement("div", {
|
|
3062
3017
|
className: "absolute bottom-2 left-1/2 -translate-x-1/2 w-[35%] h-[5px] bg-gray-300 rounded-full z-10",
|
|
3063
3018
|
"aria-hidden": "true",
|
|
3064
3019
|
"data-part": "home-indicator"
|
|
@@ -3147,9 +3102,9 @@ var dialogContentVariants = cva({
|
|
|
3147
3102
|
});
|
|
3148
3103
|
|
|
3149
3104
|
// ../react-dialog/dist/index.js
|
|
3150
|
-
var DialogContext =
|
|
3105
|
+
var DialogContext = React42__namespace.createContext(null);
|
|
3151
3106
|
function useDialogContext() {
|
|
3152
|
-
const ctx =
|
|
3107
|
+
const ctx = React42__namespace.useContext(DialogContext);
|
|
3153
3108
|
if (!ctx) {
|
|
3154
3109
|
throw new Error("Dialog compound components must be used within <Dialog>");
|
|
3155
3110
|
}
|
|
@@ -3162,10 +3117,10 @@ function Dialog({
|
|
|
3162
3117
|
modal = true,
|
|
3163
3118
|
children
|
|
3164
3119
|
}) {
|
|
3165
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3120
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42__namespace.useState(defaultOpen);
|
|
3166
3121
|
const isControlled = controlledOpen !== void 0;
|
|
3167
3122
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
3168
|
-
const handleOpenChange =
|
|
3123
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
3169
3124
|
(next) => {
|
|
3170
3125
|
if (!isControlled) {
|
|
3171
3126
|
setUncontrolledOpen(next);
|
|
@@ -3174,12 +3129,12 @@ function Dialog({
|
|
|
3174
3129
|
},
|
|
3175
3130
|
[isControlled, onOpenChange]
|
|
3176
3131
|
);
|
|
3177
|
-
const apiRef =
|
|
3132
|
+
const apiRef = React42__namespace.useRef(null);
|
|
3178
3133
|
if (apiRef.current === null) {
|
|
3179
3134
|
apiRef.current = createDialog({ open, modal });
|
|
3180
3135
|
}
|
|
3181
3136
|
const api = apiRef.current;
|
|
3182
|
-
const ctx =
|
|
3137
|
+
const ctx = React42__namespace.useMemo(
|
|
3183
3138
|
() => ({
|
|
3184
3139
|
open,
|
|
3185
3140
|
onOpenChange: handleOpenChange,
|
|
@@ -3190,17 +3145,17 @@ function Dialog({
|
|
|
3190
3145
|
}),
|
|
3191
3146
|
[open, handleOpenChange, modal, api.ids.content, api.ids.title, api.ids.description]
|
|
3192
3147
|
);
|
|
3193
|
-
return
|
|
3148
|
+
return React42__namespace.createElement(DialogContext.Provider, { value: ctx }, children);
|
|
3194
3149
|
}
|
|
3195
3150
|
Dialog.displayName = "Dialog";
|
|
3196
|
-
var DialogTrigger =
|
|
3151
|
+
var DialogTrigger = React42__namespace.forwardRef(
|
|
3197
3152
|
({ onClick, children, ...props }, ref) => {
|
|
3198
3153
|
const { open, onOpenChange, contentId } = useDialogContext();
|
|
3199
3154
|
const handleClick = (e) => {
|
|
3200
3155
|
onOpenChange(!open);
|
|
3201
3156
|
onClick?.(e);
|
|
3202
3157
|
};
|
|
3203
|
-
return
|
|
3158
|
+
return React42__namespace.createElement(
|
|
3204
3159
|
"button",
|
|
3205
3160
|
{
|
|
3206
3161
|
ref,
|
|
@@ -3216,7 +3171,7 @@ var DialogTrigger = React41__namespace.forwardRef(
|
|
|
3216
3171
|
}
|
|
3217
3172
|
);
|
|
3218
3173
|
DialogTrigger.displayName = "DialogTrigger";
|
|
3219
|
-
var DialogOverlay =
|
|
3174
|
+
var DialogOverlay = React42__namespace.forwardRef(
|
|
3220
3175
|
({ className, onClick, ...props }, ref) => {
|
|
3221
3176
|
const { open, onOpenChange } = useDialogContext();
|
|
3222
3177
|
if (!open) return null;
|
|
@@ -3226,7 +3181,7 @@ var DialogOverlay = React41__namespace.forwardRef(
|
|
|
3226
3181
|
}
|
|
3227
3182
|
onClick?.(e);
|
|
3228
3183
|
};
|
|
3229
|
-
return
|
|
3184
|
+
return React42__namespace.createElement("div", {
|
|
3230
3185
|
ref,
|
|
3231
3186
|
className: cn(overlayStyles, className),
|
|
3232
3187
|
"data-state": open ? "open" : "closed",
|
|
@@ -3236,10 +3191,10 @@ var DialogOverlay = React41__namespace.forwardRef(
|
|
|
3236
3191
|
}
|
|
3237
3192
|
);
|
|
3238
3193
|
DialogOverlay.displayName = "DialogOverlay";
|
|
3239
|
-
var DialogContent =
|
|
3194
|
+
var DialogContent = React42__namespace.forwardRef(
|
|
3240
3195
|
({ className, children, onKeyDown, ...props }, ref) => {
|
|
3241
3196
|
const { open, onOpenChange, modal, contentId, titleId, descriptionId } = useDialogContext();
|
|
3242
|
-
|
|
3197
|
+
React42__namespace.useMemo(
|
|
3243
3198
|
() => createDialog({ open, modal }),
|
|
3244
3199
|
[open, modal]
|
|
3245
3200
|
);
|
|
@@ -3254,7 +3209,7 @@ var DialogContent = React41__namespace.forwardRef(
|
|
|
3254
3209
|
onKeyDown?.(e);
|
|
3255
3210
|
};
|
|
3256
3211
|
if (!open) return null;
|
|
3257
|
-
const content =
|
|
3212
|
+
const content = React42__namespace.createElement(
|
|
3258
3213
|
"div",
|
|
3259
3214
|
{
|
|
3260
3215
|
ref,
|
|
@@ -3277,9 +3232,9 @@ var DialogContent = React41__namespace.forwardRef(
|
|
|
3277
3232
|
}
|
|
3278
3233
|
);
|
|
3279
3234
|
DialogContent.displayName = "DialogContent";
|
|
3280
|
-
var DialogHeader =
|
|
3235
|
+
var DialogHeader = React42__namespace.forwardRef(
|
|
3281
3236
|
({ className, ...props }, ref) => {
|
|
3282
|
-
return
|
|
3237
|
+
return React42__namespace.createElement("div", {
|
|
3283
3238
|
ref,
|
|
3284
3239
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
|
|
3285
3240
|
...props
|
|
@@ -3287,9 +3242,9 @@ var DialogHeader = React41__namespace.forwardRef(
|
|
|
3287
3242
|
}
|
|
3288
3243
|
);
|
|
3289
3244
|
DialogHeader.displayName = "DialogHeader";
|
|
3290
|
-
var DialogFooter =
|
|
3245
|
+
var DialogFooter = React42__namespace.forwardRef(
|
|
3291
3246
|
({ className, ...props }, ref) => {
|
|
3292
|
-
return
|
|
3247
|
+
return React42__namespace.createElement("div", {
|
|
3293
3248
|
ref,
|
|
3294
3249
|
className: cn(
|
|
3295
3250
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
@@ -3300,10 +3255,10 @@ var DialogFooter = React41__namespace.forwardRef(
|
|
|
3300
3255
|
}
|
|
3301
3256
|
);
|
|
3302
3257
|
DialogFooter.displayName = "DialogFooter";
|
|
3303
|
-
var DialogTitle =
|
|
3258
|
+
var DialogTitle = React42__namespace.forwardRef(
|
|
3304
3259
|
({ className, ...props }, ref) => {
|
|
3305
3260
|
const { titleId } = useDialogContext();
|
|
3306
|
-
return
|
|
3261
|
+
return React42__namespace.createElement("h2", {
|
|
3307
3262
|
ref,
|
|
3308
3263
|
id: titleId,
|
|
3309
3264
|
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
@@ -3312,9 +3267,9 @@ var DialogTitle = React41__namespace.forwardRef(
|
|
|
3312
3267
|
}
|
|
3313
3268
|
);
|
|
3314
3269
|
DialogTitle.displayName = "DialogTitle";
|
|
3315
|
-
var DialogDescription =
|
|
3270
|
+
var DialogDescription = React42__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
3316
3271
|
const { descriptionId } = useDialogContext();
|
|
3317
|
-
return
|
|
3272
|
+
return React42__namespace.createElement("p", {
|
|
3318
3273
|
ref,
|
|
3319
3274
|
id: descriptionId,
|
|
3320
3275
|
className: cn("text-sm text-muted-foreground", className),
|
|
@@ -3322,14 +3277,14 @@ var DialogDescription = React41__namespace.forwardRef(({ className, ...props },
|
|
|
3322
3277
|
});
|
|
3323
3278
|
});
|
|
3324
3279
|
DialogDescription.displayName = "DialogDescription";
|
|
3325
|
-
var DialogClose =
|
|
3280
|
+
var DialogClose = React42__namespace.forwardRef(
|
|
3326
3281
|
({ onClick, children, ...props }, ref) => {
|
|
3327
3282
|
const { onOpenChange } = useDialogContext();
|
|
3328
3283
|
const handleClick = (e) => {
|
|
3329
3284
|
onOpenChange(false);
|
|
3330
3285
|
onClick?.(e);
|
|
3331
3286
|
};
|
|
3332
|
-
return
|
|
3287
|
+
return React42__namespace.createElement(
|
|
3333
3288
|
"button",
|
|
3334
3289
|
{
|
|
3335
3290
|
ref,
|
|
@@ -3434,9 +3389,9 @@ var menuItemVariants = cva({
|
|
|
3434
3389
|
});
|
|
3435
3390
|
|
|
3436
3391
|
// ../react-dropdown-menu/dist/index.js
|
|
3437
|
-
var DropdownMenuContext =
|
|
3392
|
+
var DropdownMenuContext = React42__namespace.createContext(null);
|
|
3438
3393
|
function useDropdownMenuContext() {
|
|
3439
|
-
const ctx =
|
|
3394
|
+
const ctx = React42__namespace.useContext(DropdownMenuContext);
|
|
3440
3395
|
if (!ctx) {
|
|
3441
3396
|
throw new Error("DropdownMenu compound components must be used within <DropdownMenu>");
|
|
3442
3397
|
}
|
|
@@ -3448,10 +3403,10 @@ function DropdownMenu({
|
|
|
3448
3403
|
onOpenChange,
|
|
3449
3404
|
children
|
|
3450
3405
|
}) {
|
|
3451
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
3406
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42__namespace.useState(defaultOpen);
|
|
3452
3407
|
const isControlled = controlledOpen !== void 0;
|
|
3453
3408
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
3454
|
-
const handleOpenChange =
|
|
3409
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
3455
3410
|
(next) => {
|
|
3456
3411
|
if (!isControlled) {
|
|
3457
3412
|
setUncontrolledOpen(next);
|
|
@@ -3460,12 +3415,12 @@ function DropdownMenu({
|
|
|
3460
3415
|
},
|
|
3461
3416
|
[isControlled, onOpenChange]
|
|
3462
3417
|
);
|
|
3463
|
-
const apiRef =
|
|
3418
|
+
const apiRef = React42__namespace.useRef(null);
|
|
3464
3419
|
if (apiRef.current === null) {
|
|
3465
3420
|
apiRef.current = createDropdownMenu({ open });
|
|
3466
3421
|
}
|
|
3467
3422
|
const api = apiRef.current;
|
|
3468
|
-
const ctx =
|
|
3423
|
+
const ctx = React42__namespace.useMemo(
|
|
3469
3424
|
() => ({
|
|
3470
3425
|
open,
|
|
3471
3426
|
onOpenChange: handleOpenChange,
|
|
@@ -3473,17 +3428,17 @@ function DropdownMenu({
|
|
|
3473
3428
|
}),
|
|
3474
3429
|
[open, handleOpenChange, api.ids.content]
|
|
3475
3430
|
);
|
|
3476
|
-
return
|
|
3431
|
+
return React42__namespace.createElement(DropdownMenuContext.Provider, { value: ctx }, children);
|
|
3477
3432
|
}
|
|
3478
3433
|
DropdownMenu.displayName = "DropdownMenu";
|
|
3479
|
-
var DropdownMenuTrigger =
|
|
3434
|
+
var DropdownMenuTrigger = React42__namespace.forwardRef(
|
|
3480
3435
|
({ onClick, children, ...props }, ref) => {
|
|
3481
3436
|
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
3482
3437
|
const handleClick = (e) => {
|
|
3483
3438
|
onOpenChange(!open);
|
|
3484
3439
|
onClick?.(e);
|
|
3485
3440
|
};
|
|
3486
|
-
return
|
|
3441
|
+
return React42__namespace.createElement(
|
|
3487
3442
|
"button",
|
|
3488
3443
|
{
|
|
3489
3444
|
ref,
|
|
@@ -3499,7 +3454,7 @@ var DropdownMenuTrigger = React41__namespace.forwardRef(
|
|
|
3499
3454
|
}
|
|
3500
3455
|
);
|
|
3501
3456
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
3502
|
-
var DropdownMenuContent =
|
|
3457
|
+
var DropdownMenuContent = React42__namespace.forwardRef(
|
|
3503
3458
|
({ className, children, onKeyDown, ...props }, ref) => {
|
|
3504
3459
|
const { open, onOpenChange, contentId } = useDropdownMenuContext();
|
|
3505
3460
|
const handleKeyDown = (e) => {
|
|
@@ -3513,7 +3468,7 @@ var DropdownMenuContent = React41__namespace.forwardRef(
|
|
|
3513
3468
|
onKeyDown?.(e);
|
|
3514
3469
|
};
|
|
3515
3470
|
if (!open) return null;
|
|
3516
|
-
const content =
|
|
3471
|
+
const content = React42__namespace.createElement(
|
|
3517
3472
|
"div",
|
|
3518
3473
|
{
|
|
3519
3474
|
ref,
|
|
@@ -3534,7 +3489,7 @@ var DropdownMenuContent = React41__namespace.forwardRef(
|
|
|
3534
3489
|
}
|
|
3535
3490
|
);
|
|
3536
3491
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
3537
|
-
var DropdownMenuItem =
|
|
3492
|
+
var DropdownMenuItem = React42__namespace.forwardRef(
|
|
3538
3493
|
({ className, disabled, onSelect, onClick, children, ...props }, ref) => {
|
|
3539
3494
|
const { onOpenChange } = useDropdownMenuContext();
|
|
3540
3495
|
const handleClick = (e) => {
|
|
@@ -3551,7 +3506,7 @@ var DropdownMenuItem = React41__namespace.forwardRef(
|
|
|
3551
3506
|
onOpenChange(false);
|
|
3552
3507
|
}
|
|
3553
3508
|
};
|
|
3554
|
-
return
|
|
3509
|
+
return React42__namespace.createElement(
|
|
3555
3510
|
"div",
|
|
3556
3511
|
{
|
|
3557
3512
|
ref,
|
|
@@ -3569,9 +3524,9 @@ var DropdownMenuItem = React41__namespace.forwardRef(
|
|
|
3569
3524
|
}
|
|
3570
3525
|
);
|
|
3571
3526
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
3572
|
-
var DropdownMenuSeparator =
|
|
3527
|
+
var DropdownMenuSeparator = React42__namespace.forwardRef(
|
|
3573
3528
|
({ className, ...props }, ref) => {
|
|
3574
|
-
return
|
|
3529
|
+
return React42__namespace.createElement("div", {
|
|
3575
3530
|
ref,
|
|
3576
3531
|
role: "separator",
|
|
3577
3532
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
@@ -3580,9 +3535,9 @@ var DropdownMenuSeparator = React41__namespace.forwardRef(
|
|
|
3580
3535
|
}
|
|
3581
3536
|
);
|
|
3582
3537
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
3583
|
-
var DropdownMenuLabel =
|
|
3538
|
+
var DropdownMenuLabel = React42__namespace.forwardRef(
|
|
3584
3539
|
({ className, ...props }, ref) => {
|
|
3585
|
-
return
|
|
3540
|
+
return React42__namespace.createElement("div", {
|
|
3586
3541
|
ref,
|
|
3587
3542
|
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
3588
3543
|
...props
|
|
@@ -3694,15 +3649,15 @@ function FeedbackDialog({
|
|
|
3694
3649
|
type = "general",
|
|
3695
3650
|
className
|
|
3696
3651
|
}) {
|
|
3697
|
-
const [open, setOpen] =
|
|
3698
|
-
const [comment, setComment] =
|
|
3699
|
-
const [email, setEmail] =
|
|
3700
|
-
const [honeypot, setHoneypot] =
|
|
3701
|
-
const [isSubmitting, setIsSubmitting] =
|
|
3702
|
-
const [isSubmitted, setIsSubmitted] =
|
|
3652
|
+
const [open, setOpen] = React42__namespace.useState(controlledOpen ?? false);
|
|
3653
|
+
const [comment, setComment] = React42__namespace.useState("");
|
|
3654
|
+
const [email, setEmail] = React42__namespace.useState("");
|
|
3655
|
+
const [honeypot, setHoneypot] = React42__namespace.useState("");
|
|
3656
|
+
const [isSubmitting, setIsSubmitting] = React42__namespace.useState(false);
|
|
3657
|
+
const [isSubmitted, setIsSubmitted] = React42__namespace.useState(false);
|
|
3703
3658
|
const isControlled = controlledOpen !== void 0;
|
|
3704
3659
|
const isOpen = isControlled ? controlledOpen : open;
|
|
3705
|
-
const handleOpenChange =
|
|
3660
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
3706
3661
|
(next) => {
|
|
3707
3662
|
if (!isControlled) {
|
|
3708
3663
|
setOpen(next);
|
|
@@ -3711,11 +3666,11 @@ function FeedbackDialog({
|
|
|
3711
3666
|
},
|
|
3712
3667
|
[isControlled, onOpenChange]
|
|
3713
3668
|
);
|
|
3714
|
-
const apiRef =
|
|
3669
|
+
const apiRef = React42__namespace.useRef(null);
|
|
3715
3670
|
if (apiRef.current === null) {
|
|
3716
3671
|
apiRef.current = createFeedbackDialog({ open: isOpen, onOpenChange: handleOpenChange, onSubmit, type });
|
|
3717
3672
|
}
|
|
3718
|
-
const handleSubmit =
|
|
3673
|
+
const handleSubmit = React42__namespace.useCallback(async () => {
|
|
3719
3674
|
if (honeypot) return;
|
|
3720
3675
|
if (!comment.trim()) return;
|
|
3721
3676
|
setIsSubmitting(true);
|
|
@@ -3732,7 +3687,7 @@ function FeedbackDialog({
|
|
|
3732
3687
|
setIsSubmitting(false);
|
|
3733
3688
|
}
|
|
3734
3689
|
}, [comment, email, honeypot, type, onSubmit]);
|
|
3735
|
-
const handleReset =
|
|
3690
|
+
const handleReset = React42__namespace.useCallback(() => {
|
|
3736
3691
|
setComment("");
|
|
3737
3692
|
setEmail("");
|
|
3738
3693
|
setHoneypot("");
|
|
@@ -3742,15 +3697,15 @@ function FeedbackDialog({
|
|
|
3742
3697
|
if (!isOpen) return null;
|
|
3743
3698
|
const api = apiRef.current;
|
|
3744
3699
|
if (isSubmitted) {
|
|
3745
|
-
return
|
|
3700
|
+
return React42__namespace.createElement(
|
|
3746
3701
|
"div",
|
|
3747
3702
|
{
|
|
3748
3703
|
className: cn(feedbackDialogVariants({ type }), className),
|
|
3749
3704
|
...api.ariaProps,
|
|
3750
3705
|
"data-state": "submitted"
|
|
3751
3706
|
},
|
|
3752
|
-
|
|
3753
|
-
|
|
3707
|
+
React42__namespace.createElement("p", { "data-testid": "success-message" }, "Thank you for your feedback!"),
|
|
3708
|
+
React42__namespace.createElement(
|
|
3754
3709
|
"button",
|
|
3755
3710
|
{
|
|
3756
3711
|
type: "button",
|
|
@@ -3763,22 +3718,22 @@ function FeedbackDialog({
|
|
|
3763
3718
|
)
|
|
3764
3719
|
);
|
|
3765
3720
|
}
|
|
3766
|
-
return
|
|
3721
|
+
return React42__namespace.createElement(
|
|
3767
3722
|
"div",
|
|
3768
3723
|
{
|
|
3769
3724
|
className: cn(feedbackDialogVariants({ type }), className),
|
|
3770
3725
|
...api.ariaProps,
|
|
3771
3726
|
"data-state": "open"
|
|
3772
3727
|
},
|
|
3773
|
-
|
|
3774
|
-
|
|
3728
|
+
React42__namespace.createElement("h2", { id: `${api.ariaProps.id}-title` }, "Send Feedback"),
|
|
3729
|
+
React42__namespace.createElement("textarea", {
|
|
3775
3730
|
"aria-label": "Feedback comment",
|
|
3776
3731
|
value: comment,
|
|
3777
3732
|
onChange: (e) => setComment(e.target.value),
|
|
3778
3733
|
placeholder: "Your feedback...",
|
|
3779
3734
|
disabled: isSubmitting
|
|
3780
3735
|
}),
|
|
3781
|
-
|
|
3736
|
+
React42__namespace.createElement("input", {
|
|
3782
3737
|
type: "email",
|
|
3783
3738
|
"aria-label": "Email",
|
|
3784
3739
|
value: email,
|
|
@@ -3787,7 +3742,7 @@ function FeedbackDialog({
|
|
|
3787
3742
|
disabled: isSubmitting
|
|
3788
3743
|
}),
|
|
3789
3744
|
// Honeypot field — hidden from real users
|
|
3790
|
-
|
|
3745
|
+
React42__namespace.createElement("input", {
|
|
3791
3746
|
type: "text",
|
|
3792
3747
|
"aria-hidden": true,
|
|
3793
3748
|
tabIndex: -1,
|
|
@@ -3797,7 +3752,7 @@ function FeedbackDialog({
|
|
|
3797
3752
|
autoComplete: "off",
|
|
3798
3753
|
name: "website"
|
|
3799
3754
|
}),
|
|
3800
|
-
|
|
3755
|
+
React42__namespace.createElement(
|
|
3801
3756
|
"button",
|
|
3802
3757
|
{
|
|
3803
3758
|
type: "button",
|
|
@@ -3809,9 +3764,9 @@ function FeedbackDialog({
|
|
|
3809
3764
|
);
|
|
3810
3765
|
}
|
|
3811
3766
|
FeedbackDialog.displayName = "FeedbackDialog";
|
|
3812
|
-
var FeedbackButton =
|
|
3767
|
+
var FeedbackButton = React42__namespace.forwardRef(
|
|
3813
3768
|
({ children, ...props }, ref) => {
|
|
3814
|
-
return
|
|
3769
|
+
return React42__namespace.createElement(
|
|
3815
3770
|
"button",
|
|
3816
3771
|
{
|
|
3817
3772
|
ref,
|
|
@@ -3838,7 +3793,7 @@ function createFooter(props = {}) {
|
|
|
3838
3793
|
var footerVariants = cva({
|
|
3839
3794
|
base: "border-t bg-background py-8"
|
|
3840
3795
|
});
|
|
3841
|
-
var Footer =
|
|
3796
|
+
var Footer = React42__namespace.forwardRef(
|
|
3842
3797
|
({
|
|
3843
3798
|
copyright,
|
|
3844
3799
|
socialLinks = [],
|
|
@@ -3976,34 +3931,34 @@ function InlineEditor({
|
|
|
3976
3931
|
onCancel,
|
|
3977
3932
|
className
|
|
3978
3933
|
}) {
|
|
3979
|
-
const [isEditing, setIsEditing] =
|
|
3980
|
-
const [editValue, setEditValue] =
|
|
3981
|
-
const apiRef =
|
|
3934
|
+
const [isEditing, setIsEditing] = React42__namespace.useState(false);
|
|
3935
|
+
const [editValue, setEditValue] = React42__namespace.useState(initialValue);
|
|
3936
|
+
const apiRef = React42__namespace.useRef(null);
|
|
3982
3937
|
if (apiRef.current === null) {
|
|
3983
3938
|
apiRef.current = createInlineEditor({ value: initialValue, onSave, onCancel });
|
|
3984
3939
|
}
|
|
3985
3940
|
const api = apiRef.current;
|
|
3986
|
-
const handleStartEditing =
|
|
3941
|
+
const handleStartEditing = React42__namespace.useCallback(() => {
|
|
3987
3942
|
setIsEditing(true);
|
|
3988
3943
|
setEditValue(initialValue);
|
|
3989
3944
|
}, [initialValue]);
|
|
3990
|
-
const handleCancel =
|
|
3945
|
+
const handleCancel = React42__namespace.useCallback(() => {
|
|
3991
3946
|
setIsEditing(false);
|
|
3992
3947
|
setEditValue(initialValue);
|
|
3993
3948
|
onCancel?.();
|
|
3994
3949
|
}, [initialValue, onCancel]);
|
|
3995
|
-
const handleSave =
|
|
3950
|
+
const handleSave = React42__namespace.useCallback(() => {
|
|
3996
3951
|
setIsEditing(false);
|
|
3997
3952
|
onSave?.(editValue);
|
|
3998
3953
|
}, [editValue, onSave]);
|
|
3999
|
-
const handleInsert =
|
|
3954
|
+
const handleInsert = React42__namespace.useCallback(
|
|
4000
3955
|
(syntax) => {
|
|
4001
3956
|
setEditValue((prev) => prev + syntax);
|
|
4002
3957
|
},
|
|
4003
3958
|
[]
|
|
4004
3959
|
);
|
|
4005
3960
|
if (!isEditing) {
|
|
4006
|
-
return
|
|
3961
|
+
return React42__namespace.createElement(
|
|
4007
3962
|
"div",
|
|
4008
3963
|
{
|
|
4009
3964
|
className: cn(editorVariants({ state: "viewing" }), className),
|
|
@@ -4018,20 +3973,20 @@ function InlineEditor({
|
|
|
4018
3973
|
}
|
|
4019
3974
|
}
|
|
4020
3975
|
},
|
|
4021
|
-
|
|
3976
|
+
React42__namespace.createElement("div", { className: previewVariants() }, editValue || initialValue)
|
|
4022
3977
|
);
|
|
4023
3978
|
}
|
|
4024
|
-
return
|
|
3979
|
+
return React42__namespace.createElement(
|
|
4025
3980
|
"div",
|
|
4026
3981
|
{
|
|
4027
3982
|
className: cn(editorVariants({ state: "editing" }), className)
|
|
4028
3983
|
},
|
|
4029
3984
|
// Toolbar
|
|
4030
|
-
|
|
3985
|
+
React42__namespace.createElement(
|
|
4031
3986
|
"div",
|
|
4032
3987
|
{ className: toolbarVariants(), role: "toolbar", "aria-label": "Formatting toolbar" },
|
|
4033
3988
|
...api.toolbarActions.map(
|
|
4034
|
-
(action) =>
|
|
3989
|
+
(action) => React42__namespace.createElement(
|
|
4035
3990
|
"button",
|
|
4036
3991
|
{
|
|
4037
3992
|
key: action.name,
|
|
@@ -4045,16 +4000,16 @@ function InlineEditor({
|
|
|
4045
4000
|
)
|
|
4046
4001
|
),
|
|
4047
4002
|
// Editor area: side-by-side textarea + preview
|
|
4048
|
-
|
|
4003
|
+
React42__namespace.createElement(
|
|
4049
4004
|
"div",
|
|
4050
4005
|
{ className: "flex gap-2 p-2" },
|
|
4051
|
-
|
|
4006
|
+
React42__namespace.createElement("textarea", {
|
|
4052
4007
|
value: editValue,
|
|
4053
4008
|
onChange: (e) => setEditValue(e.target.value),
|
|
4054
4009
|
className: "flex-1 min-h-[100px] resize-y border rounded p-2",
|
|
4055
4010
|
"aria-label": "Editor content"
|
|
4056
4011
|
}),
|
|
4057
|
-
|
|
4012
|
+
React42__namespace.createElement(
|
|
4058
4013
|
"div",
|
|
4059
4014
|
{
|
|
4060
4015
|
className: cn("flex-1", previewVariants()),
|
|
@@ -4064,15 +4019,15 @@ function InlineEditor({
|
|
|
4064
4019
|
)
|
|
4065
4020
|
),
|
|
4066
4021
|
// Action buttons
|
|
4067
|
-
|
|
4022
|
+
React42__namespace.createElement(
|
|
4068
4023
|
"div",
|
|
4069
4024
|
{ className: "flex justify-end gap-2 p-2 border-t" },
|
|
4070
|
-
|
|
4025
|
+
React42__namespace.createElement(
|
|
4071
4026
|
"button",
|
|
4072
4027
|
{ type: "button", onClick: handleCancel },
|
|
4073
4028
|
"Cancel"
|
|
4074
4029
|
),
|
|
4075
|
-
|
|
4030
|
+
React42__namespace.createElement(
|
|
4076
4031
|
"button",
|
|
4077
4032
|
{ type: "button", onClick: handleSave },
|
|
4078
4033
|
"Save"
|
|
@@ -4128,7 +4083,7 @@ var inputVariants = cva({
|
|
|
4128
4083
|
size: "default"
|
|
4129
4084
|
}
|
|
4130
4085
|
});
|
|
4131
|
-
var Input =
|
|
4086
|
+
var Input = React42__namespace.forwardRef(
|
|
4132
4087
|
({ type = "text", size, className, disabled, readOnly, required, "aria-invalid": ariaInvalid, ...props }, ref) => {
|
|
4133
4088
|
const api = createInput({
|
|
4134
4089
|
disabled,
|
|
@@ -4221,7 +4176,7 @@ var inputGroupButtonVariants = cva({
|
|
|
4221
4176
|
orientation: "horizontal"
|
|
4222
4177
|
}
|
|
4223
4178
|
});
|
|
4224
|
-
var InputGroup =
|
|
4179
|
+
var InputGroup = React42__namespace.forwardRef(
|
|
4225
4180
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4226
4181
|
const api = createInputGroup({
|
|
4227
4182
|
orientation,
|
|
@@ -4243,7 +4198,7 @@ var InputGroup = React41__namespace.forwardRef(
|
|
|
4243
4198
|
}
|
|
4244
4199
|
);
|
|
4245
4200
|
InputGroup.displayName = "InputGroup";
|
|
4246
|
-
var InputGroupAddon =
|
|
4201
|
+
var InputGroupAddon = React42__namespace.forwardRef(
|
|
4247
4202
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4248
4203
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4249
4204
|
"div",
|
|
@@ -4257,7 +4212,7 @@ var InputGroupAddon = React41__namespace.forwardRef(
|
|
|
4257
4212
|
}
|
|
4258
4213
|
);
|
|
4259
4214
|
InputGroupAddon.displayName = "InputGroupAddon";
|
|
4260
|
-
var InputGroupText =
|
|
4215
|
+
var InputGroupText = React42__namespace.forwardRef(
|
|
4261
4216
|
({ className, children, ...props }, ref) => {
|
|
4262
4217
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4263
4218
|
"span",
|
|
@@ -4271,7 +4226,7 @@ var InputGroupText = React41__namespace.forwardRef(
|
|
|
4271
4226
|
}
|
|
4272
4227
|
);
|
|
4273
4228
|
InputGroupText.displayName = "InputGroupText";
|
|
4274
|
-
var InputGroupButton =
|
|
4229
|
+
var InputGroupButton = React42__namespace.forwardRef(
|
|
4275
4230
|
({ orientation = "horizontal", className, children, ...props }, ref) => {
|
|
4276
4231
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4277
4232
|
"button",
|
|
@@ -4337,7 +4292,7 @@ function createLocalStorage() {
|
|
|
4337
4292
|
}
|
|
4338
4293
|
};
|
|
4339
4294
|
}
|
|
4340
|
-
var InstallPrompt =
|
|
4295
|
+
var InstallPrompt = React42__namespace.forwardRef(
|
|
4341
4296
|
({
|
|
4342
4297
|
delay = 3e3,
|
|
4343
4298
|
storageKey,
|
|
@@ -4347,14 +4302,14 @@ var InstallPrompt = React41__namespace.forwardRef(
|
|
|
4347
4302
|
className,
|
|
4348
4303
|
...props
|
|
4349
4304
|
}, ref) => {
|
|
4350
|
-
const storageRef =
|
|
4305
|
+
const storageRef = React42__namespace.useRef(void 0);
|
|
4351
4306
|
if (typeof window !== "undefined" && !storageRef.current) {
|
|
4352
4307
|
storageRef.current = createLocalStorage();
|
|
4353
4308
|
}
|
|
4354
4309
|
const api = createInstallPrompt({ storageKey }, storageRef.current);
|
|
4355
|
-
const [visible, setVisible] =
|
|
4356
|
-
const promptEventRef =
|
|
4357
|
-
|
|
4310
|
+
const [visible, setVisible] = React42__namespace.useState(false);
|
|
4311
|
+
const promptEventRef = React42__namespace.useRef(null);
|
|
4312
|
+
React42__namespace.useEffect(() => {
|
|
4358
4313
|
if (api.state.isDismissed) return;
|
|
4359
4314
|
const handleBeforeInstall = (e) => {
|
|
4360
4315
|
e.preventDefault();
|
|
@@ -4595,7 +4550,7 @@ function sanitizeHtml(html) {
|
|
|
4595
4550
|
sanitized = sanitized.replace(/(href|src)\s*=\s*["']?\s*javascript\s*:[^"'>]*/gi, '$1=""');
|
|
4596
4551
|
return sanitized;
|
|
4597
4552
|
}
|
|
4598
|
-
var MarkdownRenderer =
|
|
4553
|
+
var MarkdownRenderer = React42__namespace.forwardRef(
|
|
4599
4554
|
({ content, components, linkResolver, className, size }, ref) => {
|
|
4600
4555
|
const coreProps = { content, components, linkResolver };
|
|
4601
4556
|
const api = createMarkdownRenderer(coreProps);
|
|
@@ -4684,20 +4639,20 @@ var mobileNavLinkVariants = cva({
|
|
|
4684
4639
|
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",
|
|
4685
4640
|
variants: {}
|
|
4686
4641
|
});
|
|
4687
|
-
var MobileNavContext =
|
|
4642
|
+
var MobileNavContext = React42__namespace.createContext(null);
|
|
4688
4643
|
function useMobileNavContext() {
|
|
4689
|
-
const ctx =
|
|
4644
|
+
const ctx = React42__namespace.useContext(MobileNavContext);
|
|
4690
4645
|
if (!ctx) {
|
|
4691
4646
|
throw new Error("MobileNav compound components must be used within <MobileNav>");
|
|
4692
4647
|
}
|
|
4693
4648
|
return ctx;
|
|
4694
4649
|
}
|
|
4695
|
-
var MobileNav =
|
|
4650
|
+
var MobileNav = React42__namespace.forwardRef(
|
|
4696
4651
|
({ open: controlledOpen, onOpenChange, defaultOpen = false, className, children, ...props }, ref) => {
|
|
4697
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
4652
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React42__namespace.useState(defaultOpen);
|
|
4698
4653
|
const isControlled = controlledOpen !== void 0;
|
|
4699
4654
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
4700
|
-
const setOpen =
|
|
4655
|
+
const setOpen = React42__namespace.useCallback(
|
|
4701
4656
|
(value) => {
|
|
4702
4657
|
if (!isControlled) {
|
|
4703
4658
|
setUncontrolledOpen(value);
|
|
@@ -4707,11 +4662,11 @@ var MobileNav = React41__namespace.forwardRef(
|
|
|
4707
4662
|
[isControlled, onOpenChange]
|
|
4708
4663
|
);
|
|
4709
4664
|
const api = createMobileNav({ open, onOpenChange: setOpen, id: props.id });
|
|
4710
|
-
const handleKeyDown =
|
|
4665
|
+
const handleKeyDown = React42__namespace.useMemo(
|
|
4711
4666
|
() => createKeyboardHandler(api.keyboardHandlers),
|
|
4712
4667
|
[open]
|
|
4713
4668
|
);
|
|
4714
|
-
const contextValue =
|
|
4669
|
+
const contextValue = React42__namespace.useMemo(
|
|
4715
4670
|
() => ({ open, setOpen, contentId: api.contentProps.id }),
|
|
4716
4671
|
[open, setOpen, api.contentProps.id]
|
|
4717
4672
|
);
|
|
@@ -4728,7 +4683,7 @@ var MobileNav = React41__namespace.forwardRef(
|
|
|
4728
4683
|
}
|
|
4729
4684
|
);
|
|
4730
4685
|
MobileNav.displayName = "MobileNav";
|
|
4731
|
-
var MobileNavTrigger =
|
|
4686
|
+
var MobileNavTrigger = React42__namespace.forwardRef(
|
|
4732
4687
|
({ className, children, ...props }, ref) => {
|
|
4733
4688
|
const { open, setOpen, contentId } = useMobileNavContext();
|
|
4734
4689
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4769,7 +4724,7 @@ var MobileNavTrigger = React41__namespace.forwardRef(
|
|
|
4769
4724
|
}
|
|
4770
4725
|
);
|
|
4771
4726
|
MobileNavTrigger.displayName = "MobileNavTrigger";
|
|
4772
|
-
var MobileNavContent =
|
|
4727
|
+
var MobileNavContent = React42__namespace.forwardRef(
|
|
4773
4728
|
({ className, children, ...props }, ref) => {
|
|
4774
4729
|
const { open, contentId } = useMobileNavContext();
|
|
4775
4730
|
const state = open ? "open" : "closed";
|
|
@@ -4788,7 +4743,7 @@ var MobileNavContent = React41__namespace.forwardRef(
|
|
|
4788
4743
|
}
|
|
4789
4744
|
);
|
|
4790
4745
|
MobileNavContent.displayName = "MobileNavContent";
|
|
4791
|
-
var MobileNavLink =
|
|
4746
|
+
var MobileNavLink = React42__namespace.forwardRef(
|
|
4792
4747
|
({ className, children, ...props }, ref) => {
|
|
4793
4748
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4794
4749
|
"a",
|
|
@@ -4847,7 +4802,7 @@ var navLinkVariants = cva({
|
|
|
4847
4802
|
active: "false"
|
|
4848
4803
|
}
|
|
4849
4804
|
});
|
|
4850
|
-
var Navbar =
|
|
4805
|
+
var Navbar = React42__namespace.forwardRef(
|
|
4851
4806
|
({
|
|
4852
4807
|
links = [],
|
|
4853
4808
|
currentPath,
|
|
@@ -4942,19 +4897,19 @@ var popoverContentVariants = cva({
|
|
|
4942
4897
|
side: "bottom"
|
|
4943
4898
|
}
|
|
4944
4899
|
});
|
|
4945
|
-
var PopoverContext =
|
|
4900
|
+
var PopoverContext = React42__namespace.createContext(null);
|
|
4946
4901
|
function usePopoverContext() {
|
|
4947
|
-
const ctx =
|
|
4902
|
+
const ctx = React42__namespace.useContext(PopoverContext);
|
|
4948
4903
|
if (!ctx) {
|
|
4949
4904
|
throw new Error("Popover compound components must be used within <Popover>");
|
|
4950
4905
|
}
|
|
4951
4906
|
return ctx;
|
|
4952
4907
|
}
|
|
4953
4908
|
function Popover({ open: controlledOpen, defaultOpen = false, onOpenChange, placement, children }) {
|
|
4954
|
-
const [internalOpen, setInternalOpen] =
|
|
4909
|
+
const [internalOpen, setInternalOpen] = React42__namespace.useState(controlledOpen ?? defaultOpen);
|
|
4955
4910
|
const isControlled = controlledOpen !== void 0;
|
|
4956
4911
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
4957
|
-
const handleOpenChange =
|
|
4912
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
4958
4913
|
(value) => {
|
|
4959
4914
|
if (!isControlled) {
|
|
4960
4915
|
setInternalOpen(value);
|
|
@@ -4963,18 +4918,18 @@ function Popover({ open: controlledOpen, defaultOpen = false, onOpenChange, plac
|
|
|
4963
4918
|
},
|
|
4964
4919
|
[isControlled, onOpenChange]
|
|
4965
4920
|
);
|
|
4966
|
-
const api =
|
|
4921
|
+
const api = React42__namespace.useMemo(
|
|
4967
4922
|
() => createPopover({ open: isOpen, onOpenChange: handleOpenChange, placement }),
|
|
4968
4923
|
[isOpen, handleOpenChange, placement]
|
|
4969
4924
|
);
|
|
4970
|
-
const ctx =
|
|
4925
|
+
const ctx = React42__namespace.useMemo(
|
|
4971
4926
|
() => ({ api, open: isOpen, setOpen: handleOpenChange }),
|
|
4972
4927
|
[api, isOpen, handleOpenChange]
|
|
4973
4928
|
);
|
|
4974
|
-
return
|
|
4929
|
+
return React42__namespace.createElement(PopoverContext.Provider, { value: ctx }, children);
|
|
4975
4930
|
}
|
|
4976
4931
|
Popover.displayName = "Popover";
|
|
4977
|
-
var PopoverTrigger =
|
|
4932
|
+
var PopoverTrigger = React42__namespace.forwardRef(
|
|
4978
4933
|
({ onClick, children, ...props }, ref) => {
|
|
4979
4934
|
const { api, setOpen, open } = usePopoverContext();
|
|
4980
4935
|
const handleClick = (e) => {
|
|
@@ -4997,7 +4952,7 @@ var PopoverTrigger = React41__namespace.forwardRef(
|
|
|
4997
4952
|
}
|
|
4998
4953
|
);
|
|
4999
4954
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
5000
|
-
var PopoverContent =
|
|
4955
|
+
var PopoverContent = React42__namespace.forwardRef(
|
|
5001
4956
|
({ side, className, children, onKeyDown, ...props }, ref) => {
|
|
5002
4957
|
const { api, open, setOpen } = usePopoverContext();
|
|
5003
4958
|
const handleKeyDown = (e) => {
|
|
@@ -5026,7 +4981,7 @@ var PopoverContent = React41__namespace.forwardRef(
|
|
|
5026
4981
|
}
|
|
5027
4982
|
);
|
|
5028
4983
|
PopoverContent.displayName = "PopoverContent";
|
|
5029
|
-
var PopoverClose =
|
|
4984
|
+
var PopoverClose = React42__namespace.forwardRef(
|
|
5030
4985
|
({ onClick, children, ...props }, ref) => {
|
|
5031
4986
|
const { setOpen } = usePopoverContext();
|
|
5032
4987
|
const handleClick = (e) => {
|
|
@@ -5147,9 +5102,9 @@ var searchResultVariants = cva({
|
|
|
5147
5102
|
});
|
|
5148
5103
|
|
|
5149
5104
|
// ../react-search-bar/dist/index.js
|
|
5150
|
-
var SearchBarContext =
|
|
5105
|
+
var SearchBarContext = React42__namespace.createContext(null);
|
|
5151
5106
|
function useSearchBarContext() {
|
|
5152
|
-
const ctx =
|
|
5107
|
+
const ctx = React42__namespace.useContext(SearchBarContext);
|
|
5153
5108
|
if (!ctx) {
|
|
5154
5109
|
throw new Error("SearchBar compound components must be used within <SearchBar>");
|
|
5155
5110
|
}
|
|
@@ -5167,11 +5122,11 @@ function SearchBar({
|
|
|
5167
5122
|
children,
|
|
5168
5123
|
...inputProps
|
|
5169
5124
|
}) {
|
|
5170
|
-
const [internalValue, setInternalValue] =
|
|
5125
|
+
const [internalValue, setInternalValue] = React42__namespace.useState(controlledValue ?? defaultValue);
|
|
5171
5126
|
const isControlled = controlledValue !== void 0;
|
|
5172
5127
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
5173
|
-
const debounceRef =
|
|
5174
|
-
const handleValueChange =
|
|
5128
|
+
const debounceRef = React42__namespace.useRef(void 0);
|
|
5129
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
5175
5130
|
(val) => {
|
|
5176
5131
|
if (!isControlled) {
|
|
5177
5132
|
setInternalValue(val);
|
|
@@ -5180,8 +5135,8 @@ function SearchBar({
|
|
|
5180
5135
|
},
|
|
5181
5136
|
[isControlled, onValueChange]
|
|
5182
5137
|
);
|
|
5183
|
-
const [isSearching, setIsSearching] =
|
|
5184
|
-
const handleSearch =
|
|
5138
|
+
const [isSearching, setIsSearching] = React42__namespace.useState(loading);
|
|
5139
|
+
const handleSearch = React42__namespace.useCallback(
|
|
5185
5140
|
(val) => {
|
|
5186
5141
|
if (debounceRef.current !== void 0) {
|
|
5187
5142
|
clearTimeout(debounceRef.current);
|
|
@@ -5198,7 +5153,7 @@ function SearchBar({
|
|
|
5198
5153
|
},
|
|
5199
5154
|
[onSearch, debounceMs]
|
|
5200
5155
|
);
|
|
5201
|
-
const handleChange =
|
|
5156
|
+
const handleChange = React42__namespace.useCallback(
|
|
5202
5157
|
(e) => {
|
|
5203
5158
|
const val = e.target.value;
|
|
5204
5159
|
handleValueChange(val);
|
|
@@ -5206,14 +5161,14 @@ function SearchBar({
|
|
|
5206
5161
|
},
|
|
5207
5162
|
[handleValueChange, handleSearch]
|
|
5208
5163
|
);
|
|
5209
|
-
const clear =
|
|
5164
|
+
const clear = React42__namespace.useCallback(() => {
|
|
5210
5165
|
if (debounceRef.current !== void 0) {
|
|
5211
5166
|
clearTimeout(debounceRef.current);
|
|
5212
5167
|
}
|
|
5213
5168
|
handleValueChange("");
|
|
5214
5169
|
setIsSearching(false);
|
|
5215
5170
|
}, [handleValueChange]);
|
|
5216
|
-
const api =
|
|
5171
|
+
const api = React42__namespace.useMemo(
|
|
5217
5172
|
() => createSearchBar({
|
|
5218
5173
|
value: currentValue,
|
|
5219
5174
|
onValueChange: handleValueChange,
|
|
@@ -5224,7 +5179,7 @@ function SearchBar({
|
|
|
5224
5179
|
}),
|
|
5225
5180
|
[currentValue, handleValueChange, onSearch, debounceMs, placeholder, loading]
|
|
5226
5181
|
);
|
|
5227
|
-
const handleKeyDown =
|
|
5182
|
+
const handleKeyDown = React42__namespace.useCallback(
|
|
5228
5183
|
(e) => {
|
|
5229
5184
|
if (e.key === "Escape") {
|
|
5230
5185
|
clear();
|
|
@@ -5238,18 +5193,18 @@ function SearchBar({
|
|
|
5238
5193
|
},
|
|
5239
5194
|
[clear, onSearch, currentValue]
|
|
5240
5195
|
);
|
|
5241
|
-
const ctx =
|
|
5196
|
+
const ctx = React42__namespace.useMemo(
|
|
5242
5197
|
() => ({ api, value: currentValue, isSearching, setValue: handleValueChange, clear }),
|
|
5243
5198
|
[api, currentValue, isSearching, handleValueChange, clear]
|
|
5244
5199
|
);
|
|
5245
|
-
return
|
|
5200
|
+
return React42__namespace.createElement(
|
|
5246
5201
|
SearchBarContext.Provider,
|
|
5247
5202
|
{ value: ctx },
|
|
5248
|
-
|
|
5203
|
+
React42__namespace.createElement(
|
|
5249
5204
|
"div",
|
|
5250
5205
|
{ className: cn(searchBarVariants(), className) },
|
|
5251
|
-
|
|
5252
|
-
|
|
5206
|
+
React42__namespace.createElement("span", { className: "rfr-search-icon", "aria-hidden": "true" }, "\u{1F50D}"),
|
|
5207
|
+
React42__namespace.createElement("input", {
|
|
5253
5208
|
...inputProps,
|
|
5254
5209
|
role: api.inputProps.role,
|
|
5255
5210
|
"aria-expanded": api.inputProps["aria-expanded"],
|
|
@@ -5261,8 +5216,8 @@ function SearchBar({
|
|
|
5261
5216
|
onKeyDown: handleKeyDown,
|
|
5262
5217
|
className: "rfr-search-input flex-1 bg-transparent outline-none"
|
|
5263
5218
|
}),
|
|
5264
|
-
isSearching &&
|
|
5265
|
-
currentValue.length > 0 && !isSearching &&
|
|
5219
|
+
isSearching && React42__namespace.createElement("span", { className: "rfr-search-spinner", "aria-label": "Loading" }, "\u23F3"),
|
|
5220
|
+
currentValue.length > 0 && !isSearching && React42__namespace.createElement(
|
|
5266
5221
|
"button",
|
|
5267
5222
|
{
|
|
5268
5223
|
type: "button",
|
|
@@ -5277,11 +5232,11 @@ function SearchBar({
|
|
|
5277
5232
|
);
|
|
5278
5233
|
}
|
|
5279
5234
|
SearchBar.displayName = "SearchBar";
|
|
5280
|
-
var SearchResults =
|
|
5235
|
+
var SearchResults = React42__namespace.forwardRef(
|
|
5281
5236
|
({ className, children, ...props }, ref) => {
|
|
5282
5237
|
const { api, value } = useSearchBarContext();
|
|
5283
5238
|
if (value.length === 0) return null;
|
|
5284
|
-
return
|
|
5239
|
+
return React42__namespace.createElement(
|
|
5285
5240
|
"ul",
|
|
5286
5241
|
{
|
|
5287
5242
|
ref,
|
|
@@ -5295,9 +5250,9 @@ var SearchResults = React41__namespace.forwardRef(
|
|
|
5295
5250
|
}
|
|
5296
5251
|
);
|
|
5297
5252
|
SearchResults.displayName = "SearchResults";
|
|
5298
|
-
var SearchResultItem =
|
|
5253
|
+
var SearchResultItem = React42__namespace.forwardRef(
|
|
5299
5254
|
({ className, children, ...props }, ref) => {
|
|
5300
|
-
return
|
|
5255
|
+
return React42__namespace.createElement(
|
|
5301
5256
|
"li",
|
|
5302
5257
|
{
|
|
5303
5258
|
ref,
|
|
@@ -5358,7 +5313,7 @@ var sidebarItemVariants = cva({
|
|
|
5358
5313
|
active: "false"
|
|
5359
5314
|
}
|
|
5360
5315
|
});
|
|
5361
|
-
var Sidebar =
|
|
5316
|
+
var Sidebar = React42__namespace.forwardRef(
|
|
5362
5317
|
({
|
|
5363
5318
|
sections = [],
|
|
5364
5319
|
currentPath,
|
|
@@ -5428,7 +5383,7 @@ var skeletonVariants = cva({
|
|
|
5428
5383
|
});
|
|
5429
5384
|
|
|
5430
5385
|
// ../react-skeleton/dist/index.js
|
|
5431
|
-
var Skeleton =
|
|
5386
|
+
var Skeleton = React42__namespace.forwardRef(
|
|
5432
5387
|
({ shape, width, height, animate, className, style, ...props }, ref) => {
|
|
5433
5388
|
const api = createSkeleton({ shape, animate });
|
|
5434
5389
|
const classes = cn(skeletonVariants({ shape }), className);
|
|
@@ -5437,7 +5392,7 @@ var Skeleton = React41__namespace.forwardRef(
|
|
|
5437
5392
|
...width !== void 0 ? { width } : {},
|
|
5438
5393
|
...height !== void 0 ? { height } : {}
|
|
5439
5394
|
};
|
|
5440
|
-
return
|
|
5395
|
+
return React42__namespace.createElement("div", {
|
|
5441
5396
|
ref,
|
|
5442
5397
|
className: classes,
|
|
5443
5398
|
style: Object.keys(mergedStyle).length > 0 ? mergedStyle : void 0,
|
|
@@ -5449,13 +5404,13 @@ var Skeleton = React41__namespace.forwardRef(
|
|
|
5449
5404
|
);
|
|
5450
5405
|
Skeleton.displayName = "Skeleton";
|
|
5451
5406
|
var lineWidths = ["100%", "92%", "85%", "96%", "78%", "88%", "94%", "82%"];
|
|
5452
|
-
var SkeletonText =
|
|
5407
|
+
var SkeletonText = React42__namespace.forwardRef(
|
|
5453
5408
|
({ lines = 3, animate, className, ...props }, ref) => {
|
|
5454
5409
|
const children = [];
|
|
5455
5410
|
for (let i = 0; i < lines; i++) {
|
|
5456
5411
|
const width = lineWidths[i % lineWidths.length];
|
|
5457
5412
|
children.push(
|
|
5458
|
-
|
|
5413
|
+
React42__namespace.createElement(Skeleton, {
|
|
5459
5414
|
key: i,
|
|
5460
5415
|
shape: "text",
|
|
5461
5416
|
width,
|
|
@@ -5463,7 +5418,7 @@ var SkeletonText = React41__namespace.forwardRef(
|
|
|
5463
5418
|
})
|
|
5464
5419
|
);
|
|
5465
5420
|
}
|
|
5466
|
-
return
|
|
5421
|
+
return React42__namespace.createElement(
|
|
5467
5422
|
"div",
|
|
5468
5423
|
{
|
|
5469
5424
|
ref,
|
|
@@ -5571,9 +5526,9 @@ var tabsTriggerVariants = cva({
|
|
|
5571
5526
|
});
|
|
5572
5527
|
|
|
5573
5528
|
// ../react-tabs/dist/index.js
|
|
5574
|
-
var TabsContext =
|
|
5529
|
+
var TabsContext = React42__namespace.createContext(null);
|
|
5575
5530
|
function useTabsContext() {
|
|
5576
|
-
const ctx =
|
|
5531
|
+
const ctx = React42__namespace.useContext(TabsContext);
|
|
5577
5532
|
if (!ctx) {
|
|
5578
5533
|
throw new Error("Tabs compound components must be used within <Tabs>");
|
|
5579
5534
|
}
|
|
@@ -5587,10 +5542,10 @@ function Tabs({
|
|
|
5587
5542
|
className,
|
|
5588
5543
|
children
|
|
5589
5544
|
}) {
|
|
5590
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
5545
|
+
const [uncontrolledValue, setUncontrolledValue] = React42__namespace.useState(defaultValue);
|
|
5591
5546
|
const isControlled = controlledValue !== void 0;
|
|
5592
5547
|
const value = isControlled ? controlledValue : uncontrolledValue;
|
|
5593
|
-
const handleValueChange =
|
|
5548
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
5594
5549
|
(next) => {
|
|
5595
5550
|
if (!isControlled) {
|
|
5596
5551
|
setUncontrolledValue(next);
|
|
@@ -5599,12 +5554,12 @@ function Tabs({
|
|
|
5599
5554
|
},
|
|
5600
5555
|
[isControlled, onValueChange]
|
|
5601
5556
|
);
|
|
5602
|
-
const apiRef =
|
|
5557
|
+
const apiRef = React42__namespace.useRef(null);
|
|
5603
5558
|
if (apiRef.current === null) {
|
|
5604
5559
|
apiRef.current = createTabs({ value, orientation });
|
|
5605
5560
|
}
|
|
5606
5561
|
const api = apiRef.current;
|
|
5607
|
-
const ctx =
|
|
5562
|
+
const ctx = React42__namespace.useMemo(
|
|
5608
5563
|
() => ({
|
|
5609
5564
|
value,
|
|
5610
5565
|
onValueChange: handleValueChange,
|
|
@@ -5613,17 +5568,17 @@ function Tabs({
|
|
|
5613
5568
|
}),
|
|
5614
5569
|
[value, handleValueChange, orientation, api.idPrefix]
|
|
5615
5570
|
);
|
|
5616
|
-
return
|
|
5571
|
+
return React42__namespace.createElement(
|
|
5617
5572
|
"div",
|
|
5618
5573
|
{ className, "data-orientation": orientation },
|
|
5619
|
-
|
|
5574
|
+
React42__namespace.createElement(TabsContext.Provider, { value: ctx }, children)
|
|
5620
5575
|
);
|
|
5621
5576
|
}
|
|
5622
5577
|
Tabs.displayName = "Tabs";
|
|
5623
|
-
var TabsList =
|
|
5578
|
+
var TabsList = React42__namespace.forwardRef(
|
|
5624
5579
|
({ className, ...props }, ref) => {
|
|
5625
5580
|
const { orientation } = useTabsContext();
|
|
5626
|
-
return
|
|
5581
|
+
return React42__namespace.createElement("div", {
|
|
5627
5582
|
ref,
|
|
5628
5583
|
role: "tablist",
|
|
5629
5584
|
"aria-orientation": orientation,
|
|
@@ -5633,7 +5588,7 @@ var TabsList = React41__namespace.forwardRef(
|
|
|
5633
5588
|
}
|
|
5634
5589
|
);
|
|
5635
5590
|
TabsList.displayName = "TabsList";
|
|
5636
|
-
var TabsTrigger =
|
|
5591
|
+
var TabsTrigger = React42__namespace.forwardRef(
|
|
5637
5592
|
({ value, className, onClick, onKeyDown, children, ...props }, ref) => {
|
|
5638
5593
|
const { value: activeValue, onValueChange, orientation, idPrefix } = useTabsContext();
|
|
5639
5594
|
const isSelected = activeValue === value;
|
|
@@ -5646,7 +5601,7 @@ var TabsTrigger = React41__namespace.forwardRef(
|
|
|
5646
5601
|
const handleKeyDown = (e) => {
|
|
5647
5602
|
onKeyDown?.(e);
|
|
5648
5603
|
};
|
|
5649
|
-
return
|
|
5604
|
+
return React42__namespace.createElement(
|
|
5650
5605
|
"button",
|
|
5651
5606
|
{
|
|
5652
5607
|
ref,
|
|
@@ -5667,14 +5622,14 @@ var TabsTrigger = React41__namespace.forwardRef(
|
|
|
5667
5622
|
}
|
|
5668
5623
|
);
|
|
5669
5624
|
TabsTrigger.displayName = "TabsTrigger";
|
|
5670
|
-
var TabsContent =
|
|
5625
|
+
var TabsContent = React42__namespace.forwardRef(
|
|
5671
5626
|
({ value, className, children, ...props }, ref) => {
|
|
5672
5627
|
const { value: activeValue, idPrefix } = useTabsContext();
|
|
5673
5628
|
const isSelected = activeValue === value;
|
|
5674
5629
|
const tabId = `${idPrefix}-tab-${value}`;
|
|
5675
5630
|
const panelId = `${idPrefix}-panel-${value}`;
|
|
5676
5631
|
if (!isSelected) return null;
|
|
5677
|
-
return
|
|
5632
|
+
return React42__namespace.createElement(
|
|
5678
5633
|
"div",
|
|
5679
5634
|
{
|
|
5680
5635
|
ref,
|
|
@@ -5738,7 +5693,7 @@ var textareaVariants = cva({
|
|
|
5738
5693
|
size: "default"
|
|
5739
5694
|
}
|
|
5740
5695
|
});
|
|
5741
|
-
var Textarea =
|
|
5696
|
+
var Textarea = React42__namespace.forwardRef(
|
|
5742
5697
|
({ size, className, disabled, readOnly, required, rows, maxRows, "aria-invalid": ariaInvalid, ...props }, ref) => {
|
|
5743
5698
|
const api = createTextarea({
|
|
5744
5699
|
disabled,
|
|
@@ -5895,30 +5850,30 @@ var toastVariants = cva({
|
|
|
5895
5850
|
});
|
|
5896
5851
|
|
|
5897
5852
|
// ../react-toast/dist/index.js
|
|
5898
|
-
var ToastContext =
|
|
5853
|
+
var ToastContext = React42__namespace.createContext(null);
|
|
5899
5854
|
function useToastContext() {
|
|
5900
|
-
const ctx =
|
|
5855
|
+
const ctx = React42__namespace.useContext(ToastContext);
|
|
5901
5856
|
if (!ctx) {
|
|
5902
5857
|
throw new Error("useToast must be used within a <ToastProvider>");
|
|
5903
5858
|
}
|
|
5904
5859
|
return ctx;
|
|
5905
5860
|
}
|
|
5906
5861
|
function ToastProvider({ children }) {
|
|
5907
|
-
const managerRef =
|
|
5862
|
+
const managerRef = React42__namespace.useRef(null);
|
|
5908
5863
|
if (managerRef.current === null) {
|
|
5909
5864
|
managerRef.current = createToastManager();
|
|
5910
5865
|
}
|
|
5911
|
-
const ctx =
|
|
5866
|
+
const ctx = React42__namespace.useMemo(
|
|
5912
5867
|
() => ({ manager: managerRef.current }),
|
|
5913
5868
|
[]
|
|
5914
5869
|
);
|
|
5915
|
-
return
|
|
5870
|
+
return React42__namespace.createElement(ToastContext.Provider, { value: ctx }, children);
|
|
5916
5871
|
}
|
|
5917
5872
|
ToastProvider.displayName = "ToastProvider";
|
|
5918
5873
|
function useToast() {
|
|
5919
5874
|
const { manager } = useToastContext();
|
|
5920
|
-
const [toasts, setToasts] =
|
|
5921
|
-
|
|
5875
|
+
const [toasts, setToasts] = React42__namespace.useState(manager.toasts);
|
|
5876
|
+
React42__namespace.useEffect(() => {
|
|
5922
5877
|
setToasts(manager.toasts);
|
|
5923
5878
|
const unsub = manager.subscribe(setToasts);
|
|
5924
5879
|
return unsub;
|
|
@@ -5929,13 +5884,13 @@ function useToast() {
|
|
|
5929
5884
|
toasts
|
|
5930
5885
|
};
|
|
5931
5886
|
}
|
|
5932
|
-
var Toast =
|
|
5887
|
+
var Toast = React42__namespace.forwardRef(
|
|
5933
5888
|
({ entry, onDismiss, className, children, onMouseEnter, onMouseLeave, ...props }, ref) => {
|
|
5934
|
-
const api =
|
|
5889
|
+
const api = React42__namespace.useMemo(
|
|
5935
5890
|
() => createToast({ variant: entry.variant, duration: entry.duration }),
|
|
5936
5891
|
[entry.variant, entry.duration]
|
|
5937
5892
|
);
|
|
5938
|
-
|
|
5893
|
+
React42__namespace.useEffect(() => {
|
|
5939
5894
|
api.startTimer();
|
|
5940
5895
|
return () => api.pauseTimer();
|
|
5941
5896
|
}, [api]);
|
|
@@ -5947,7 +5902,7 @@ var Toast = React41__namespace.forwardRef(
|
|
|
5947
5902
|
api.resumeTimer();
|
|
5948
5903
|
onMouseLeave?.(e);
|
|
5949
5904
|
};
|
|
5950
|
-
return
|
|
5905
|
+
return React42__namespace.createElement(
|
|
5951
5906
|
"div",
|
|
5952
5907
|
{
|
|
5953
5908
|
ref,
|
|
@@ -5957,9 +5912,9 @@ var Toast = React41__namespace.forwardRef(
|
|
|
5957
5912
|
onMouseLeave: handleMouseLeave,
|
|
5958
5913
|
...props
|
|
5959
5914
|
},
|
|
5960
|
-
|
|
5915
|
+
React42__namespace.createElement("div", { className: "flex-1" }, entry.message),
|
|
5961
5916
|
children,
|
|
5962
|
-
onDismiss &&
|
|
5917
|
+
onDismiss && React42__namespace.createElement(
|
|
5963
5918
|
"button",
|
|
5964
5919
|
{
|
|
5965
5920
|
type: "button",
|
|
@@ -5973,10 +5928,10 @@ var Toast = React41__namespace.forwardRef(
|
|
|
5973
5928
|
}
|
|
5974
5929
|
);
|
|
5975
5930
|
Toast.displayName = "Toast";
|
|
5976
|
-
var Toaster =
|
|
5931
|
+
var Toaster = React42__namespace.forwardRef(
|
|
5977
5932
|
({ className, ...props }, ref) => {
|
|
5978
5933
|
const { toasts, dismiss } = useToast();
|
|
5979
|
-
return
|
|
5934
|
+
return React42__namespace.createElement(
|
|
5980
5935
|
"div",
|
|
5981
5936
|
{
|
|
5982
5937
|
ref,
|
|
@@ -5987,7 +5942,7 @@ var Toaster = React41__namespace.forwardRef(
|
|
|
5987
5942
|
...props
|
|
5988
5943
|
},
|
|
5989
5944
|
toasts.map(
|
|
5990
|
-
(entry) =>
|
|
5945
|
+
(entry) => React42__namespace.createElement(Toast, {
|
|
5991
5946
|
key: entry.id,
|
|
5992
5947
|
entry,
|
|
5993
5948
|
onDismiss: dismiss
|
|
@@ -6074,9 +6029,9 @@ var tooltipContentVariants = cva({
|
|
|
6074
6029
|
side: "top"
|
|
6075
6030
|
}
|
|
6076
6031
|
});
|
|
6077
|
-
var TooltipContext =
|
|
6032
|
+
var TooltipContext = React42__namespace.createContext(null);
|
|
6078
6033
|
function useTooltipContext() {
|
|
6079
|
-
const ctx =
|
|
6034
|
+
const ctx = React42__namespace.useContext(TooltipContext);
|
|
6080
6035
|
if (!ctx) {
|
|
6081
6036
|
throw new Error("Tooltip compound components must be used within <Tooltip>");
|
|
6082
6037
|
}
|
|
@@ -6090,11 +6045,11 @@ function Tooltip({
|
|
|
6090
6045
|
delayDuration = 300,
|
|
6091
6046
|
children
|
|
6092
6047
|
}) {
|
|
6093
|
-
const [internalOpen, setInternalOpen] =
|
|
6048
|
+
const [internalOpen, setInternalOpen] = React42__namespace.useState(controlledOpen ?? defaultOpen);
|
|
6094
6049
|
const isControlled = controlledOpen !== void 0;
|
|
6095
6050
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
6096
|
-
const timerRef =
|
|
6097
|
-
const handleOpenChange =
|
|
6051
|
+
const timerRef = React42__namespace.useRef(null);
|
|
6052
|
+
const handleOpenChange = React42__namespace.useCallback(
|
|
6098
6053
|
(value) => {
|
|
6099
6054
|
if (!isControlled) {
|
|
6100
6055
|
setInternalOpen(value);
|
|
@@ -6103,17 +6058,17 @@ function Tooltip({
|
|
|
6103
6058
|
},
|
|
6104
6059
|
[isControlled, onOpenChange]
|
|
6105
6060
|
);
|
|
6106
|
-
const api =
|
|
6061
|
+
const api = React42__namespace.useMemo(
|
|
6107
6062
|
() => createTooltip({ open: isOpen, onOpenChange: handleOpenChange, placement, delayDuration }),
|
|
6108
6063
|
[isOpen, handleOpenChange, placement, delayDuration]
|
|
6109
6064
|
);
|
|
6110
|
-
const cancelDelay =
|
|
6065
|
+
const cancelDelay = React42__namespace.useCallback(() => {
|
|
6111
6066
|
if (timerRef.current !== null) {
|
|
6112
6067
|
clearTimeout(timerRef.current);
|
|
6113
6068
|
timerRef.current = null;
|
|
6114
6069
|
}
|
|
6115
6070
|
}, []);
|
|
6116
|
-
const openWithDelay =
|
|
6071
|
+
const openWithDelay = React42__namespace.useCallback(() => {
|
|
6117
6072
|
cancelDelay();
|
|
6118
6073
|
if (delayDuration <= 0) {
|
|
6119
6074
|
handleOpenChange(true);
|
|
@@ -6124,21 +6079,21 @@ function Tooltip({
|
|
|
6124
6079
|
timerRef.current = null;
|
|
6125
6080
|
}, delayDuration);
|
|
6126
6081
|
}, [cancelDelay, delayDuration, handleOpenChange]);
|
|
6127
|
-
|
|
6082
|
+
React42__namespace.useEffect(() => {
|
|
6128
6083
|
return () => {
|
|
6129
6084
|
if (timerRef.current !== null) {
|
|
6130
6085
|
clearTimeout(timerRef.current);
|
|
6131
6086
|
}
|
|
6132
6087
|
};
|
|
6133
6088
|
}, []);
|
|
6134
|
-
const ctx =
|
|
6089
|
+
const ctx = React42__namespace.useMemo(
|
|
6135
6090
|
() => ({ api, open: isOpen, setOpen: handleOpenChange, openWithDelay, cancelDelay }),
|
|
6136
6091
|
[api, isOpen, handleOpenChange, openWithDelay, cancelDelay]
|
|
6137
6092
|
);
|
|
6138
|
-
return
|
|
6093
|
+
return React42__namespace.createElement(TooltipContext.Provider, { value: ctx }, children);
|
|
6139
6094
|
}
|
|
6140
6095
|
Tooltip.displayName = "Tooltip";
|
|
6141
|
-
var TooltipTrigger =
|
|
6096
|
+
var TooltipTrigger = React42__namespace.forwardRef(
|
|
6142
6097
|
({ onMouseEnter, onMouseLeave, onFocus, onBlur, children, ...props }, ref) => {
|
|
6143
6098
|
const { api, setOpen, openWithDelay, cancelDelay } = useTooltipContext();
|
|
6144
6099
|
const handleMouseEnter = (e) => {
|
|
@@ -6175,7 +6130,7 @@ var TooltipTrigger = React41__namespace.forwardRef(
|
|
|
6175
6130
|
}
|
|
6176
6131
|
);
|
|
6177
6132
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
6178
|
-
var TooltipContent =
|
|
6133
|
+
var TooltipContent = React42__namespace.forwardRef(
|
|
6179
6134
|
({ side, className, children, ...props }, ref) => {
|
|
6180
6135
|
const { api, open } = useTooltipContext();
|
|
6181
6136
|
if (!open) return null;
|
|
@@ -6295,7 +6250,7 @@ var overlayVariants = cva({
|
|
|
6295
6250
|
visibility: "visible"
|
|
6296
6251
|
}
|
|
6297
6252
|
});
|
|
6298
|
-
var VideoPlayer =
|
|
6253
|
+
var VideoPlayer = React42__namespace.forwardRef(
|
|
6299
6254
|
({
|
|
6300
6255
|
src,
|
|
6301
6256
|
poster,
|
|
@@ -6305,9 +6260,9 @@ var VideoPlayer = React41__namespace.forwardRef(
|
|
|
6305
6260
|
className,
|
|
6306
6261
|
...props
|
|
6307
6262
|
}, ref) => {
|
|
6308
|
-
const [, setTick] =
|
|
6309
|
-
const rerender =
|
|
6310
|
-
const apiRef =
|
|
6263
|
+
const [, setTick] = React42__namespace.useState(0);
|
|
6264
|
+
const rerender = React42__namespace.useCallback(() => setTick((t) => t + 1), []);
|
|
6265
|
+
const apiRef = React42__namespace.useRef(
|
|
6311
6266
|
createVideoPlayer({ muted: initialMuted})
|
|
6312
6267
|
);
|
|
6313
6268
|
const api = apiRef.current;
|
|
@@ -6474,7 +6429,7 @@ var progressBarVariants = cva({
|
|
|
6474
6429
|
size: "md"
|
|
6475
6430
|
}
|
|
6476
6431
|
});
|
|
6477
|
-
var StatsGrid =
|
|
6432
|
+
var StatsGrid = React42__namespace.forwardRef(
|
|
6478
6433
|
({ stats, badges = [], className, ...props }, ref) => {
|
|
6479
6434
|
const api = createProgressDisplay({ stats, badges });
|
|
6480
6435
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6503,7 +6458,7 @@ var StatsGrid = React41__namespace.forwardRef(
|
|
|
6503
6458
|
}
|
|
6504
6459
|
);
|
|
6505
6460
|
StatsGrid.displayName = "StatsGrid";
|
|
6506
|
-
var ProgressBar =
|
|
6461
|
+
var ProgressBar = React42__namespace.forwardRef(
|
|
6507
6462
|
({ value, max = 100, size, className, ...props }, ref) => {
|
|
6508
6463
|
const percent = Math.min(100, Math.max(0, value / max * 100));
|
|
6509
6464
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6528,7 +6483,7 @@ var ProgressBar = React41__namespace.forwardRef(
|
|
|
6528
6483
|
}
|
|
6529
6484
|
);
|
|
6530
6485
|
ProgressBar.displayName = "ProgressBar";
|
|
6531
|
-
var BadgeDisplay =
|
|
6486
|
+
var BadgeDisplay = React42__namespace.forwardRef(
|
|
6532
6487
|
({ badges, className, ...props }, ref) => {
|
|
6533
6488
|
const api = createProgressDisplay({ stats: [], badges });
|
|
6534
6489
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6696,7 +6651,7 @@ var slideTypeBadgeVariants = cva({
|
|
|
6696
6651
|
type: "lesson"
|
|
6697
6652
|
}
|
|
6698
6653
|
});
|
|
6699
|
-
var SlideViewer =
|
|
6654
|
+
var SlideViewer = React42__namespace.forwardRef(
|
|
6700
6655
|
({
|
|
6701
6656
|
slides,
|
|
6702
6657
|
initialSlide,
|
|
@@ -6706,9 +6661,9 @@ var SlideViewer = React41__namespace.forwardRef(
|
|
|
6706
6661
|
size,
|
|
6707
6662
|
renderSlide
|
|
6708
6663
|
}, ref) => {
|
|
6709
|
-
const [, setTick] =
|
|
6664
|
+
const [, setTick] = React42__namespace.useState(0);
|
|
6710
6665
|
const rerender = () => setTick((t) => t + 1);
|
|
6711
|
-
const apiRef =
|
|
6666
|
+
const apiRef = React42__namespace.useRef(
|
|
6712
6667
|
createSlideViewer({ slides, initialSlide, onSlideChange, onComplete })
|
|
6713
6668
|
);
|
|
6714
6669
|
const api = apiRef.current;
|
|
@@ -6910,7 +6865,7 @@ var optionVariants = cva({
|
|
|
6910
6865
|
});
|
|
6911
6866
|
|
|
6912
6867
|
// ../react-language-selector/dist/index.js
|
|
6913
|
-
var LanguageSelectorContext =
|
|
6868
|
+
var LanguageSelectorContext = React42__namespace.createContext(null);
|
|
6914
6869
|
function LanguageSelector({
|
|
6915
6870
|
value: controlledValue,
|
|
6916
6871
|
onValueChange,
|
|
@@ -6920,10 +6875,10 @@ function LanguageSelector({
|
|
|
6920
6875
|
className
|
|
6921
6876
|
}) {
|
|
6922
6877
|
const initialValues = Array.isArray(controlledValue) ? controlledValue : controlledValue ? [controlledValue] : [];
|
|
6923
|
-
const [selectedValues, setSelectedValues] =
|
|
6924
|
-
const [isOpen, setIsOpen] =
|
|
6925
|
-
const containerRef =
|
|
6926
|
-
const handleValueChange =
|
|
6878
|
+
const [selectedValues, setSelectedValues] = React42__namespace.useState(initialValues);
|
|
6879
|
+
const [isOpen, setIsOpen] = React42__namespace.useState(false);
|
|
6880
|
+
const containerRef = React42__namespace.useRef(null);
|
|
6881
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
6927
6882
|
(val) => {
|
|
6928
6883
|
const arr = Array.isArray(val) ? val : [val];
|
|
6929
6884
|
setSelectedValues(arr);
|
|
@@ -6931,7 +6886,7 @@ function LanguageSelector({
|
|
|
6931
6886
|
},
|
|
6932
6887
|
[onValueChange]
|
|
6933
6888
|
);
|
|
6934
|
-
const api =
|
|
6889
|
+
const api = React42__namespace.useMemo(
|
|
6935
6890
|
() => createLanguageSelector({
|
|
6936
6891
|
value: multiple ? selectedValues : selectedValues[0],
|
|
6937
6892
|
onValueChange: handleValueChange,
|
|
@@ -6939,7 +6894,7 @@ function LanguageSelector({
|
|
|
6939
6894
|
}),
|
|
6940
6895
|
[selectedValues, handleValueChange, options, multiple]
|
|
6941
6896
|
);
|
|
6942
|
-
const handleToggle =
|
|
6897
|
+
const handleToggle = React42__namespace.useCallback(
|
|
6943
6898
|
(val) => {
|
|
6944
6899
|
if (multiple) {
|
|
6945
6900
|
const index = selectedValues.indexOf(val);
|
|
@@ -6954,10 +6909,10 @@ function LanguageSelector({
|
|
|
6954
6909
|
},
|
|
6955
6910
|
[multiple, selectedValues, onValueChange]
|
|
6956
6911
|
);
|
|
6957
|
-
const handleTriggerClick =
|
|
6912
|
+
const handleTriggerClick = React42__namespace.useCallback(() => {
|
|
6958
6913
|
setIsOpen((prev) => !prev);
|
|
6959
6914
|
}, []);
|
|
6960
|
-
const handleKeyDown =
|
|
6915
|
+
const handleKeyDown = React42__namespace.useCallback(
|
|
6961
6916
|
(e) => {
|
|
6962
6917
|
if (e.key === "Escape") {
|
|
6963
6918
|
setIsOpen(false);
|
|
@@ -6972,7 +6927,7 @@ function LanguageSelector({
|
|
|
6972
6927
|
},
|
|
6973
6928
|
[isOpen]
|
|
6974
6929
|
);
|
|
6975
|
-
|
|
6930
|
+
React42__namespace.useEffect(() => {
|
|
6976
6931
|
if (!isOpen) return;
|
|
6977
6932
|
function handleClickOutside(e) {
|
|
6978
6933
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -6982,7 +6937,7 @@ function LanguageSelector({
|
|
|
6982
6937
|
document.addEventListener("mousedown", handleClickOutside);
|
|
6983
6938
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
6984
6939
|
}, [isOpen]);
|
|
6985
|
-
const ctx =
|
|
6940
|
+
const ctx = React42__namespace.useMemo(
|
|
6986
6941
|
() => ({
|
|
6987
6942
|
api,
|
|
6988
6943
|
isOpen,
|
|
@@ -6993,7 +6948,7 @@ function LanguageSelector({
|
|
|
6993
6948
|
}),
|
|
6994
6949
|
[api, isOpen, handleToggle, options, multiple]
|
|
6995
6950
|
);
|
|
6996
|
-
const grouped =
|
|
6951
|
+
const grouped = React42__namespace.useMemo(() => {
|
|
6997
6952
|
const groups = /* @__PURE__ */ new Map();
|
|
6998
6953
|
const ungrouped = [];
|
|
6999
6954
|
for (const opt of options) {
|
|
@@ -7008,14 +6963,14 @@ function LanguageSelector({
|
|
|
7008
6963
|
return { groups, ungrouped };
|
|
7009
6964
|
}, [options]);
|
|
7010
6965
|
const displayLabel = selectedValues.length > 0 ? options.filter((o) => selectedValues.includes(o.value)).map((o) => o.label).join(", ") : placeholder;
|
|
7011
|
-
return
|
|
6966
|
+
return React42__namespace.createElement(
|
|
7012
6967
|
LanguageSelectorContext.Provider,
|
|
7013
6968
|
{ value: ctx },
|
|
7014
|
-
|
|
6969
|
+
React42__namespace.createElement(
|
|
7015
6970
|
"div",
|
|
7016
6971
|
{ ref: containerRef, className: cn("rfr-language-selector relative inline-block", className) },
|
|
7017
6972
|
// Trigger
|
|
7018
|
-
|
|
6973
|
+
React42__namespace.createElement(
|
|
7019
6974
|
"button",
|
|
7020
6975
|
{
|
|
7021
6976
|
type: "button",
|
|
@@ -7027,11 +6982,11 @@ function LanguageSelector({
|
|
|
7027
6982
|
onClick: handleTriggerClick,
|
|
7028
6983
|
onKeyDown: handleKeyDown
|
|
7029
6984
|
},
|
|
7030
|
-
|
|
7031
|
-
|
|
6985
|
+
React42__namespace.createElement("span", null, displayLabel),
|
|
6986
|
+
React42__namespace.createElement("span", { "aria-hidden": "true", className: "ml-2" }, "\u25BE")
|
|
7032
6987
|
),
|
|
7033
6988
|
// Dropdown
|
|
7034
|
-
isOpen &&
|
|
6989
|
+
isOpen && React42__namespace.createElement(
|
|
7035
6990
|
"ul",
|
|
7036
6991
|
{
|
|
7037
6992
|
role: api.contentProps.role,
|
|
@@ -7040,21 +6995,21 @@ function LanguageSelector({
|
|
|
7040
6995
|
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"
|
|
7041
6996
|
},
|
|
7042
6997
|
...[...grouped.groups.entries()].map(
|
|
7043
|
-
([group, opts]) =>
|
|
6998
|
+
([group, opts]) => React42__namespace.createElement(
|
|
7044
6999
|
"li",
|
|
7045
7000
|
{ key: group, role: "presentation" },
|
|
7046
|
-
|
|
7001
|
+
React42__namespace.createElement(
|
|
7047
7002
|
"div",
|
|
7048
7003
|
{ className: "px-3 py-1 text-xs font-semibold text-muted-foreground uppercase" },
|
|
7049
7004
|
group
|
|
7050
7005
|
),
|
|
7051
|
-
|
|
7006
|
+
React42__namespace.createElement(
|
|
7052
7007
|
"ul",
|
|
7053
7008
|
{ role: "group", "aria-label": group },
|
|
7054
7009
|
...opts.map((opt) => {
|
|
7055
7010
|
const optProps = api.getOptionProps(opt.value);
|
|
7056
7011
|
const isSelected = selectedValues.includes(opt.value);
|
|
7057
|
-
return
|
|
7012
|
+
return React42__namespace.createElement(
|
|
7058
7013
|
"li",
|
|
7059
7014
|
{
|
|
7060
7015
|
key: opt.value,
|
|
@@ -7062,8 +7017,8 @@ function LanguageSelector({
|
|
|
7062
7017
|
className: optionVariants({ selected: isSelected ? "true" : "false" }),
|
|
7063
7018
|
onClick: () => handleToggle(opt.value)
|
|
7064
7019
|
},
|
|
7065
|
-
isSelected &&
|
|
7066
|
-
|
|
7020
|
+
isSelected && React42__namespace.createElement("span", { "aria-hidden": "true" }, "\u2713"),
|
|
7021
|
+
React42__namespace.createElement("span", null, opt.label)
|
|
7067
7022
|
);
|
|
7068
7023
|
})
|
|
7069
7024
|
)
|
|
@@ -7072,7 +7027,7 @@ function LanguageSelector({
|
|
|
7072
7027
|
...grouped.ungrouped.map((opt) => {
|
|
7073
7028
|
const optProps = api.getOptionProps(opt.value);
|
|
7074
7029
|
const isSelected = selectedValues.includes(opt.value);
|
|
7075
|
-
return
|
|
7030
|
+
return React42__namespace.createElement(
|
|
7076
7031
|
"li",
|
|
7077
7032
|
{
|
|
7078
7033
|
key: opt.value,
|
|
@@ -7080,8 +7035,8 @@ function LanguageSelector({
|
|
|
7080
7035
|
className: optionVariants({ selected: isSelected ? "true" : "false" }),
|
|
7081
7036
|
onClick: () => handleToggle(opt.value)
|
|
7082
7037
|
},
|
|
7083
|
-
isSelected &&
|
|
7084
|
-
|
|
7038
|
+
isSelected && React42__namespace.createElement("span", { "aria-hidden": "true" }, "\u2713"),
|
|
7039
|
+
React42__namespace.createElement("span", null, opt.label)
|
|
7085
7040
|
);
|
|
7086
7041
|
})
|
|
7087
7042
|
)
|
|
@@ -7206,7 +7161,7 @@ var latestBadgeVariants = cva({
|
|
|
7206
7161
|
});
|
|
7207
7162
|
|
|
7208
7163
|
// ../react-version-selector/dist/index.js
|
|
7209
|
-
var VersionSelectorContext =
|
|
7164
|
+
var VersionSelectorContext = React42__namespace.createContext(null);
|
|
7210
7165
|
function VersionSelector({
|
|
7211
7166
|
value: controlledValue,
|
|
7212
7167
|
onValueChange,
|
|
@@ -7214,17 +7169,17 @@ function VersionSelector({
|
|
|
7214
7169
|
placeholder = "Select version...",
|
|
7215
7170
|
className
|
|
7216
7171
|
}) {
|
|
7217
|
-
const [selectedVersion, setSelectedVersion] =
|
|
7218
|
-
const [isOpen, setIsOpen] =
|
|
7219
|
-
const containerRef =
|
|
7220
|
-
const handleValueChange =
|
|
7172
|
+
const [selectedVersion, setSelectedVersion] = React42__namespace.useState(controlledValue ?? "");
|
|
7173
|
+
const [isOpen, setIsOpen] = React42__namespace.useState(false);
|
|
7174
|
+
const containerRef = React42__namespace.useRef(null);
|
|
7175
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
7221
7176
|
(val) => {
|
|
7222
7177
|
setSelectedVersion(val);
|
|
7223
7178
|
onValueChange?.(val);
|
|
7224
7179
|
},
|
|
7225
7180
|
[onValueChange]
|
|
7226
7181
|
);
|
|
7227
|
-
const api =
|
|
7182
|
+
const api = React42__namespace.useMemo(
|
|
7228
7183
|
() => createVersionSelector({
|
|
7229
7184
|
value: selectedVersion,
|
|
7230
7185
|
onValueChange: handleValueChange,
|
|
@@ -7232,7 +7187,7 @@ function VersionSelector({
|
|
|
7232
7187
|
}),
|
|
7233
7188
|
[selectedVersion, handleValueChange, versions]
|
|
7234
7189
|
);
|
|
7235
|
-
const handleSelect =
|
|
7190
|
+
const handleSelect = React42__namespace.useCallback(
|
|
7236
7191
|
(val) => {
|
|
7237
7192
|
setSelectedVersion(val);
|
|
7238
7193
|
onValueChange?.(val);
|
|
@@ -7240,10 +7195,10 @@ function VersionSelector({
|
|
|
7240
7195
|
},
|
|
7241
7196
|
[onValueChange]
|
|
7242
7197
|
);
|
|
7243
|
-
const handleTriggerClick =
|
|
7198
|
+
const handleTriggerClick = React42__namespace.useCallback(() => {
|
|
7244
7199
|
setIsOpen((prev) => !prev);
|
|
7245
7200
|
}, []);
|
|
7246
|
-
const handleKeyDown =
|
|
7201
|
+
const handleKeyDown = React42__namespace.useCallback(
|
|
7247
7202
|
(e) => {
|
|
7248
7203
|
if (e.key === "Escape") {
|
|
7249
7204
|
setIsOpen(false);
|
|
@@ -7258,7 +7213,7 @@ function VersionSelector({
|
|
|
7258
7213
|
},
|
|
7259
7214
|
[isOpen]
|
|
7260
7215
|
);
|
|
7261
|
-
|
|
7216
|
+
React42__namespace.useEffect(() => {
|
|
7262
7217
|
if (!isOpen) return;
|
|
7263
7218
|
function handleClickOutside(e) {
|
|
7264
7219
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -7268,7 +7223,7 @@ function VersionSelector({
|
|
|
7268
7223
|
document.addEventListener("mousedown", handleClickOutside);
|
|
7269
7224
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
7270
7225
|
}, [isOpen]);
|
|
7271
|
-
const ctx =
|
|
7226
|
+
const ctx = React42__namespace.useMemo(
|
|
7272
7227
|
() => ({
|
|
7273
7228
|
api,
|
|
7274
7229
|
isOpen,
|
|
@@ -7280,14 +7235,14 @@ function VersionSelector({
|
|
|
7280
7235
|
);
|
|
7281
7236
|
const selectedOpt = versions.find((v) => v.value === selectedVersion);
|
|
7282
7237
|
const displayLabel = selectedOpt ? selectedOpt.label : placeholder;
|
|
7283
|
-
return
|
|
7238
|
+
return React42__namespace.createElement(
|
|
7284
7239
|
VersionSelectorContext.Provider,
|
|
7285
7240
|
{ value: ctx },
|
|
7286
|
-
|
|
7241
|
+
React42__namespace.createElement(
|
|
7287
7242
|
"div",
|
|
7288
7243
|
{ ref: containerRef, className: cn("rfr-version-selector relative inline-block", className) },
|
|
7289
7244
|
// Trigger
|
|
7290
|
-
|
|
7245
|
+
React42__namespace.createElement(
|
|
7291
7246
|
"button",
|
|
7292
7247
|
{
|
|
7293
7248
|
type: "button",
|
|
@@ -7299,16 +7254,16 @@ function VersionSelector({
|
|
|
7299
7254
|
onClick: handleTriggerClick,
|
|
7300
7255
|
onKeyDown: handleKeyDown
|
|
7301
7256
|
},
|
|
7302
|
-
|
|
7303
|
-
selectedOpt?.isLatest &&
|
|
7257
|
+
React42__namespace.createElement("span", null, displayLabel),
|
|
7258
|
+
selectedOpt?.isLatest && React42__namespace.createElement(
|
|
7304
7259
|
"span",
|
|
7305
7260
|
{ className: cn(latestBadgeVariants(), "ml-2") },
|
|
7306
7261
|
"Latest"
|
|
7307
7262
|
),
|
|
7308
|
-
|
|
7263
|
+
React42__namespace.createElement("span", { "aria-hidden": "true", className: "ml-2" }, "\u25BE")
|
|
7309
7264
|
),
|
|
7310
7265
|
// Dropdown
|
|
7311
|
-
isOpen &&
|
|
7266
|
+
isOpen && React42__namespace.createElement(
|
|
7312
7267
|
"ul",
|
|
7313
7268
|
{
|
|
7314
7269
|
role: api.contentProps.role,
|
|
@@ -7318,7 +7273,7 @@ function VersionSelector({
|
|
|
7318
7273
|
...versions.map((ver) => {
|
|
7319
7274
|
const optProps = api.getOptionProps(ver.value);
|
|
7320
7275
|
const isSelected = selectedVersion === ver.value;
|
|
7321
|
-
return
|
|
7276
|
+
return React42__namespace.createElement(
|
|
7322
7277
|
"li",
|
|
7323
7278
|
{
|
|
7324
7279
|
key: ver.value,
|
|
@@ -7326,8 +7281,8 @@ function VersionSelector({
|
|
|
7326
7281
|
className: optionVariants2({ selected: isSelected ? "true" : "false" }),
|
|
7327
7282
|
onClick: () => handleSelect(ver.value)
|
|
7328
7283
|
},
|
|
7329
|
-
|
|
7330
|
-
ver.isLatest &&
|
|
7284
|
+
React42__namespace.createElement("span", null, ver.label),
|
|
7285
|
+
ver.isLatest && React42__namespace.createElement(
|
|
7331
7286
|
"span",
|
|
7332
7287
|
{ className: latestBadgeVariants() },
|
|
7333
7288
|
"Latest"
|
|
@@ -7470,15 +7425,15 @@ var resizablePaneVariants = cva({
|
|
|
7470
7425
|
orientation: "horizontal"
|
|
7471
7426
|
}
|
|
7472
7427
|
});
|
|
7473
|
-
var ResizableLayoutContext =
|
|
7428
|
+
var ResizableLayoutContext = React42__namespace.createContext(null);
|
|
7474
7429
|
function useResizableLayoutContext() {
|
|
7475
|
-
const ctx =
|
|
7430
|
+
const ctx = React42__namespace.useContext(ResizableLayoutContext);
|
|
7476
7431
|
if (!ctx) {
|
|
7477
7432
|
throw new Error("Resizable compound components must be used within <ResizableLayout>");
|
|
7478
7433
|
}
|
|
7479
7434
|
return ctx;
|
|
7480
7435
|
}
|
|
7481
|
-
var ResizableLayout =
|
|
7436
|
+
var ResizableLayout = React42__namespace.forwardRef(
|
|
7482
7437
|
({
|
|
7483
7438
|
orientation = "horizontal",
|
|
7484
7439
|
defaultSizes = [50, 50],
|
|
@@ -7491,7 +7446,7 @@ var ResizableLayout = React41__namespace.forwardRef(
|
|
|
7491
7446
|
children,
|
|
7492
7447
|
...props
|
|
7493
7448
|
}, ref) => {
|
|
7494
|
-
const apiRef =
|
|
7449
|
+
const apiRef = React42__namespace.useRef(null);
|
|
7495
7450
|
if (!apiRef.current) {
|
|
7496
7451
|
apiRef.current = createResizableLayout({
|
|
7497
7452
|
orientation,
|
|
@@ -7502,22 +7457,22 @@ var ResizableLayout = React41__namespace.forwardRef(
|
|
|
7502
7457
|
});
|
|
7503
7458
|
}
|
|
7504
7459
|
const api = apiRef.current;
|
|
7505
|
-
const [sizes, setSizesState] =
|
|
7506
|
-
const setSizes =
|
|
7460
|
+
const [sizes, setSizesState] = React42__namespace.useState(api.sizes);
|
|
7461
|
+
const setSizes = React42__namespace.useCallback(
|
|
7507
7462
|
(newSizes) => {
|
|
7508
7463
|
setSizesState([...newSizes]);
|
|
7509
7464
|
onSizesChange?.(newSizes);
|
|
7510
7465
|
},
|
|
7511
7466
|
[onSizesChange]
|
|
7512
7467
|
);
|
|
7513
|
-
const cssVars =
|
|
7468
|
+
const cssVars = React42__namespace.useMemo(() => {
|
|
7514
7469
|
const vars = {};
|
|
7515
7470
|
for (let i = 0; i < sizes.length; i++) {
|
|
7516
7471
|
vars[`--rfr-pane-${i}-size`] = `${sizes[i]}%`;
|
|
7517
7472
|
}
|
|
7518
7473
|
return vars;
|
|
7519
7474
|
}, [sizes]);
|
|
7520
|
-
const contextValue =
|
|
7475
|
+
const contextValue = React42__namespace.useMemo(
|
|
7521
7476
|
() => ({ api, orientation, sizes, setSizes }),
|
|
7522
7477
|
[api, orientation, sizes, setSizes]
|
|
7523
7478
|
);
|
|
@@ -7535,7 +7490,7 @@ var ResizableLayout = React41__namespace.forwardRef(
|
|
|
7535
7490
|
}
|
|
7536
7491
|
);
|
|
7537
7492
|
ResizableLayout.displayName = "ResizableLayout";
|
|
7538
|
-
var ResizablePane =
|
|
7493
|
+
var ResizablePane = React42__namespace.forwardRef(
|
|
7539
7494
|
({ index, className, style, children, ...props }, ref) => {
|
|
7540
7495
|
const { orientation, sizes } = useResizableLayoutContext();
|
|
7541
7496
|
const size = sizes[index] ?? 50;
|
|
@@ -7559,12 +7514,12 @@ var ResizablePane = React41__namespace.forwardRef(
|
|
|
7559
7514
|
}
|
|
7560
7515
|
);
|
|
7561
7516
|
ResizablePane.displayName = "ResizablePane";
|
|
7562
|
-
var ResizableDivider =
|
|
7517
|
+
var ResizableDivider = React42__namespace.forwardRef(
|
|
7563
7518
|
({ index, className, ...props }, ref) => {
|
|
7564
7519
|
const { api, orientation, setSizes } = useResizableLayoutContext();
|
|
7565
|
-
const startPosRef =
|
|
7566
|
-
const containerSizeRef =
|
|
7567
|
-
const onPointerDown =
|
|
7520
|
+
const startPosRef = React42__namespace.useRef(0);
|
|
7521
|
+
const containerSizeRef = React42__namespace.useRef(0);
|
|
7522
|
+
const onPointerDown = React42__namespace.useCallback(
|
|
7568
7523
|
(e) => {
|
|
7569
7524
|
e.preventDefault();
|
|
7570
7525
|
const target = e.currentTarget;
|
|
@@ -7578,7 +7533,7 @@ var ResizableDivider = React41__namespace.forwardRef(
|
|
|
7578
7533
|
},
|
|
7579
7534
|
[api, index, orientation]
|
|
7580
7535
|
);
|
|
7581
|
-
const onPointerMove =
|
|
7536
|
+
const onPointerMove = React42__namespace.useCallback(
|
|
7582
7537
|
(e) => {
|
|
7583
7538
|
if (containerSizeRef.current === 0) return;
|
|
7584
7539
|
const currentPos = orientation === "horizontal" ? e.clientX : e.clientY;
|
|
@@ -7589,7 +7544,7 @@ var ResizableDivider = React41__namespace.forwardRef(
|
|
|
7589
7544
|
},
|
|
7590
7545
|
[api, orientation, setSizes]
|
|
7591
7546
|
);
|
|
7592
|
-
const onPointerUp =
|
|
7547
|
+
const onPointerUp = React42__namespace.useCallback(
|
|
7593
7548
|
(e) => {
|
|
7594
7549
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
7595
7550
|
containerSizeRef.current = 0;
|
|
@@ -7644,7 +7599,10 @@ function makeState(sidebarOpen, sidebarCollapsed, breakpoint) {
|
|
|
7644
7599
|
};
|
|
7645
7600
|
}
|
|
7646
7601
|
function createAppShell(config) {
|
|
7647
|
-
const resolved = {
|
|
7602
|
+
const resolved = {
|
|
7603
|
+
...DEFAULTS,
|
|
7604
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7605
|
+
};
|
|
7648
7606
|
let sidebarOpen = false;
|
|
7649
7607
|
let sidebarCollapsed = resolved.sidebarDefaultCollapsed;
|
|
7650
7608
|
let breakpoint = "desktop";
|
|
@@ -7753,7 +7711,10 @@ var BACKGROUND_CLASSES = {
|
|
|
7753
7711
|
none: ""
|
|
7754
7712
|
};
|
|
7755
7713
|
function createPageShell(config) {
|
|
7756
|
-
const resolved = {
|
|
7714
|
+
const resolved = {
|
|
7715
|
+
...DEFAULTS2,
|
|
7716
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7717
|
+
};
|
|
7757
7718
|
function getSectionClasses(sectionConfig) {
|
|
7758
7719
|
const {
|
|
7759
7720
|
fullWidth = false,
|
|
@@ -7811,7 +7772,10 @@ var MAX_WIDTH_CLASSES = {
|
|
|
7811
7772
|
md: "max-w-md"
|
|
7812
7773
|
};
|
|
7813
7774
|
function createAuthShell(config) {
|
|
7814
|
-
const resolved = {
|
|
7775
|
+
const resolved = {
|
|
7776
|
+
...DEFAULTS3,
|
|
7777
|
+
...config ? Object.fromEntries(Object.entries(config).filter(([_, v]) => v !== void 0)) : {}
|
|
7778
|
+
};
|
|
7815
7779
|
const containerParts = ["min-h-screen", "flex", "w-full"];
|
|
7816
7780
|
if (resolved.position === "center") {
|
|
7817
7781
|
containerParts.push("items-center", "justify-center");
|
|
@@ -7842,26 +7806,26 @@ function createAuthShell(config) {
|
|
|
7842
7806
|
}
|
|
7843
7807
|
|
|
7844
7808
|
// ../react-app-shell/dist/index.js
|
|
7845
|
-
var AppShellContext =
|
|
7809
|
+
var AppShellContext = React42__namespace.createContext(null);
|
|
7846
7810
|
function useAppShell() {
|
|
7847
|
-
const ctx =
|
|
7811
|
+
const ctx = React42__namespace.useContext(AppShellContext);
|
|
7848
7812
|
if (!ctx) {
|
|
7849
7813
|
throw new Error("useAppShell must be used within <AppShell>");
|
|
7850
7814
|
}
|
|
7851
7815
|
return ctx;
|
|
7852
7816
|
}
|
|
7853
7817
|
function AppShellRoot({ config, children, className }) {
|
|
7854
|
-
const apiRef =
|
|
7818
|
+
const apiRef = React42__namespace.useRef(null);
|
|
7855
7819
|
if (apiRef.current === null) {
|
|
7856
7820
|
apiRef.current = createAppShell(config);
|
|
7857
7821
|
}
|
|
7858
7822
|
const api = apiRef.current;
|
|
7859
|
-
const [state, setState] =
|
|
7860
|
-
|
|
7823
|
+
const [state, setState] = React42__namespace.useState(() => api.state);
|
|
7824
|
+
React42__namespace.useEffect(() => {
|
|
7861
7825
|
setState(api.state);
|
|
7862
7826
|
return api.subscribe((s) => setState(s));
|
|
7863
7827
|
}, [api]);
|
|
7864
|
-
|
|
7828
|
+
React42__namespace.useEffect(() => {
|
|
7865
7829
|
if (typeof window === "undefined") return;
|
|
7866
7830
|
const { mobileBreakpoint, tabletBreakpoint } = api.config;
|
|
7867
7831
|
const mobileQuery = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
@@ -7882,14 +7846,14 @@ function AppShellRoot({ config, children, className }) {
|
|
|
7882
7846
|
};
|
|
7883
7847
|
}, [api]);
|
|
7884
7848
|
const cssVars = api.getCSSVariables();
|
|
7885
|
-
const ctxValue =
|
|
7849
|
+
const ctxValue = React42__namespace.useMemo(
|
|
7886
7850
|
() => ({ api, state }),
|
|
7887
7851
|
[api, state]
|
|
7888
7852
|
);
|
|
7889
|
-
return
|
|
7853
|
+
return React42__namespace.createElement(
|
|
7890
7854
|
AppShellContext.Provider,
|
|
7891
7855
|
{ value: ctxValue },
|
|
7892
|
-
|
|
7856
|
+
React42__namespace.createElement(
|
|
7893
7857
|
"div",
|
|
7894
7858
|
{
|
|
7895
7859
|
className: cn("flex h-screen w-full overflow-hidden", className),
|
|
@@ -7919,7 +7883,7 @@ function Sidebar2({ children, className }) {
|
|
|
7919
7883
|
"w-[var(--shell-sidebar-full-width)]",
|
|
7920
7884
|
state.sidebarOpen ? "translate-x-0" : isRight ? "translate-x-full" : "-translate-x-full"
|
|
7921
7885
|
] : ["relative", "w-[var(--shell-sidebar-width)]"];
|
|
7922
|
-
return
|
|
7886
|
+
return React42__namespace.createElement(
|
|
7923
7887
|
"aside",
|
|
7924
7888
|
{
|
|
7925
7889
|
...api.sidebarAriaProps,
|
|
@@ -7932,7 +7896,7 @@ function Sidebar2({ children, className }) {
|
|
|
7932
7896
|
}
|
|
7933
7897
|
Sidebar2.displayName = "AppShell.Sidebar";
|
|
7934
7898
|
function Main({ children, className }) {
|
|
7935
|
-
return
|
|
7899
|
+
return React42__namespace.createElement(
|
|
7936
7900
|
"div",
|
|
7937
7901
|
{
|
|
7938
7902
|
className: cn("flex flex-1 flex-col min-w-0 h-full", className)
|
|
@@ -7943,7 +7907,7 @@ function Main({ children, className }) {
|
|
|
7943
7907
|
Main.displayName = "AppShell.Main";
|
|
7944
7908
|
function Header({ children, className }) {
|
|
7945
7909
|
const { api, state } = useAppShell();
|
|
7946
|
-
const hamburger = state.isMobile ?
|
|
7910
|
+
const hamburger = state.isMobile ? React42__namespace.createElement(
|
|
7947
7911
|
"button",
|
|
7948
7912
|
{
|
|
7949
7913
|
type: "button",
|
|
@@ -7953,7 +7917,7 @@ function Header({ children, className }) {
|
|
|
7953
7917
|
onClick: () => api.toggleSidebar(),
|
|
7954
7918
|
className: "inline-flex items-center justify-center p-2 mr-2"
|
|
7955
7919
|
},
|
|
7956
|
-
|
|
7920
|
+
React42__namespace.createElement(
|
|
7957
7921
|
"svg",
|
|
7958
7922
|
{
|
|
7959
7923
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7967,12 +7931,12 @@ function Header({ children, className }) {
|
|
|
7967
7931
|
strokeLinejoin: "round",
|
|
7968
7932
|
"aria-hidden": "true"
|
|
7969
7933
|
},
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7934
|
+
React42__namespace.createElement("line", { x1: 3, y1: 6, x2: 21, y2: 6 }),
|
|
7935
|
+
React42__namespace.createElement("line", { x1: 3, y1: 12, x2: 21, y2: 12 }),
|
|
7936
|
+
React42__namespace.createElement("line", { x1: 3, y1: 18, x2: 21, y2: 18 })
|
|
7973
7937
|
)
|
|
7974
7938
|
) : null;
|
|
7975
|
-
return
|
|
7939
|
+
return React42__namespace.createElement(
|
|
7976
7940
|
"header",
|
|
7977
7941
|
{
|
|
7978
7942
|
...api.headerAriaProps,
|
|
@@ -7991,7 +7955,7 @@ Header.displayName = "AppShell.Header";
|
|
|
7991
7955
|
function Content({ children, className, maxWidth }) {
|
|
7992
7956
|
const { api } = useAppShell();
|
|
7993
7957
|
const mwClass = maxWidth ? `max-w-${maxWidth}` : "";
|
|
7994
|
-
return
|
|
7958
|
+
return React42__namespace.createElement(
|
|
7995
7959
|
"main",
|
|
7996
7960
|
{
|
|
7997
7961
|
...api.mainAriaProps,
|
|
@@ -8010,7 +7974,7 @@ function MobileNav2({ children, className }) {
|
|
|
8010
7974
|
const { api, state } = useAppShell();
|
|
8011
7975
|
if (!state.isMobile) return null;
|
|
8012
7976
|
if (api.config.mobileNavPosition === "none") return null;
|
|
8013
|
-
return
|
|
7977
|
+
return React42__namespace.createElement(
|
|
8014
7978
|
"nav",
|
|
8015
7979
|
{
|
|
8016
7980
|
...api.mobileNavAriaProps,
|
|
@@ -8029,7 +7993,7 @@ MobileNav2.displayName = "AppShell.MobileNav";
|
|
|
8029
7993
|
function Overlay({ className }) {
|
|
8030
7994
|
const { api, state } = useAppShell();
|
|
8031
7995
|
if (!state.isMobile || !state.sidebarOpen) return null;
|
|
8032
|
-
return
|
|
7996
|
+
return React42__namespace.createElement("div", {
|
|
8033
7997
|
...api.overlayAriaProps,
|
|
8034
7998
|
className: cn(
|
|
8035
7999
|
"fixed inset-0 z-30 bg-black/50 transition-opacity",
|
|
@@ -8048,29 +8012,29 @@ var AppShell = Object.assign(AppShellRoot, {
|
|
|
8048
8012
|
MobileNav: MobileNav2,
|
|
8049
8013
|
Overlay
|
|
8050
8014
|
});
|
|
8051
|
-
var PageShellContext =
|
|
8015
|
+
var PageShellContext = React42__namespace.createContext(null);
|
|
8052
8016
|
function usePageShell() {
|
|
8053
|
-
const ctx =
|
|
8017
|
+
const ctx = React42__namespace.useContext(PageShellContext);
|
|
8054
8018
|
if (!ctx) {
|
|
8055
8019
|
throw new Error("PageShell compound components must be used within <PageShell>");
|
|
8056
8020
|
}
|
|
8057
8021
|
return ctx;
|
|
8058
8022
|
}
|
|
8059
8023
|
function PageShellRoot({ config, children, className }) {
|
|
8060
|
-
const apiRef =
|
|
8024
|
+
const apiRef = React42__namespace.useRef(null);
|
|
8061
8025
|
if (apiRef.current === null) {
|
|
8062
8026
|
apiRef.current = createPageShell(config);
|
|
8063
8027
|
}
|
|
8064
8028
|
const api = apiRef.current;
|
|
8065
8029
|
const cssVars = api.getCSSVariables();
|
|
8066
|
-
const ctxValue =
|
|
8030
|
+
const ctxValue = React42__namespace.useMemo(
|
|
8067
8031
|
() => ({ api }),
|
|
8068
8032
|
[api]
|
|
8069
8033
|
);
|
|
8070
|
-
return
|
|
8034
|
+
return React42__namespace.createElement(
|
|
8071
8035
|
PageShellContext.Provider,
|
|
8072
8036
|
{ value: ctxValue },
|
|
8073
|
-
|
|
8037
|
+
React42__namespace.createElement(
|
|
8074
8038
|
"div",
|
|
8075
8039
|
{
|
|
8076
8040
|
className: cn("flex min-h-screen flex-col", className),
|
|
@@ -8086,7 +8050,7 @@ function Nav({ children, className }) {
|
|
|
8086
8050
|
const { api } = usePageShell();
|
|
8087
8051
|
const stickyClass = api.config.navSticky ? "sticky top-0 z-40" : "";
|
|
8088
8052
|
const transparentClass = api.config.navTransparent ? "bg-transparent" : "bg-background border-b";
|
|
8089
|
-
return
|
|
8053
|
+
return React42__namespace.createElement(
|
|
8090
8054
|
"nav",
|
|
8091
8055
|
{
|
|
8092
8056
|
...api.navAriaProps,
|
|
@@ -8111,7 +8075,7 @@ function Section({
|
|
|
8111
8075
|
}) {
|
|
8112
8076
|
const { api } = usePageShell();
|
|
8113
8077
|
const sectionClasses = api.getSectionClasses({ fullWidth, maxWidth, padding, background });
|
|
8114
|
-
return
|
|
8078
|
+
return React42__namespace.createElement(
|
|
8115
8079
|
"section",
|
|
8116
8080
|
{
|
|
8117
8081
|
className: cn("py-12", sectionClasses, className)
|
|
@@ -8123,7 +8087,7 @@ Section.displayName = "PageShell.Section";
|
|
|
8123
8087
|
function Footer2({ children, className, columns }) {
|
|
8124
8088
|
const { api } = usePageShell();
|
|
8125
8089
|
const cols = columns ?? api.config.footerColumns;
|
|
8126
|
-
return
|
|
8090
|
+
return React42__namespace.createElement(
|
|
8127
8091
|
"footer",
|
|
8128
8092
|
{
|
|
8129
8093
|
...api.footerAriaProps,
|
|
@@ -8132,7 +8096,7 @@ function Footer2({ children, className, columns }) {
|
|
|
8132
8096
|
className
|
|
8133
8097
|
)
|
|
8134
8098
|
},
|
|
8135
|
-
|
|
8099
|
+
React42__namespace.createElement(
|
|
8136
8100
|
"div",
|
|
8137
8101
|
{
|
|
8138
8102
|
className: `mx-auto max-w-[var(--page-max-width)] grid gap-8`,
|
|
@@ -8150,28 +8114,28 @@ Object.assign(PageShellRoot, {
|
|
|
8150
8114
|
Section,
|
|
8151
8115
|
Footer: Footer2
|
|
8152
8116
|
});
|
|
8153
|
-
var AuthShellContext =
|
|
8117
|
+
var AuthShellContext = React42__namespace.createContext(null);
|
|
8154
8118
|
function useAuthShell() {
|
|
8155
|
-
const ctx =
|
|
8119
|
+
const ctx = React42__namespace.useContext(AuthShellContext);
|
|
8156
8120
|
if (!ctx) {
|
|
8157
8121
|
throw new Error("AuthShell compound components must be used within <AuthShell>");
|
|
8158
8122
|
}
|
|
8159
8123
|
return ctx;
|
|
8160
8124
|
}
|
|
8161
8125
|
function AuthShellRoot({ config, children, className }) {
|
|
8162
|
-
const apiRef =
|
|
8126
|
+
const apiRef = React42__namespace.useRef(null);
|
|
8163
8127
|
if (apiRef.current === null) {
|
|
8164
8128
|
apiRef.current = createAuthShell(config);
|
|
8165
8129
|
}
|
|
8166
8130
|
const api = apiRef.current;
|
|
8167
|
-
const ctxValue =
|
|
8131
|
+
const ctxValue = React42__namespace.useMemo(
|
|
8168
8132
|
() => ({ api }),
|
|
8169
8133
|
[api]
|
|
8170
8134
|
);
|
|
8171
|
-
return
|
|
8135
|
+
return React42__namespace.createElement(
|
|
8172
8136
|
AuthShellContext.Provider,
|
|
8173
8137
|
{ value: ctxValue },
|
|
8174
|
-
|
|
8138
|
+
React42__namespace.createElement(
|
|
8175
8139
|
"div",
|
|
8176
8140
|
{
|
|
8177
8141
|
...api.ariaProps,
|
|
@@ -8185,7 +8149,7 @@ function AuthShellRoot({ config, children, className }) {
|
|
|
8185
8149
|
AuthShellRoot.displayName = "AuthShell";
|
|
8186
8150
|
function Card({ children, className }) {
|
|
8187
8151
|
const { api } = useAuthShell();
|
|
8188
|
-
return
|
|
8152
|
+
return React42__namespace.createElement(
|
|
8189
8153
|
"div",
|
|
8190
8154
|
{
|
|
8191
8155
|
className: cn(api.cardClasses, className),
|
|
@@ -8273,7 +8237,7 @@ var avatarFallbackVariants = cva({
|
|
|
8273
8237
|
size: "md"
|
|
8274
8238
|
}
|
|
8275
8239
|
});
|
|
8276
|
-
var AvatarContext =
|
|
8240
|
+
var AvatarContext = React42__namespace.createContext({
|
|
8277
8241
|
size: "md",
|
|
8278
8242
|
imageLoaded: false,
|
|
8279
8243
|
imageError: false,
|
|
@@ -8282,10 +8246,10 @@ var AvatarContext = React41__namespace.createContext({
|
|
|
8282
8246
|
setImageError: () => {
|
|
8283
8247
|
}
|
|
8284
8248
|
});
|
|
8285
|
-
var Avatar =
|
|
8249
|
+
var Avatar = React42__namespace.forwardRef(
|
|
8286
8250
|
({ size = "md", className, children, ...props }, ref) => {
|
|
8287
|
-
const [imageLoaded, setImageLoaded] =
|
|
8288
|
-
const [imageError, setImageError] =
|
|
8251
|
+
const [imageLoaded, setImageLoaded] = React42__namespace.useState(false);
|
|
8252
|
+
const [imageError, setImageError] = React42__namespace.useState(false);
|
|
8289
8253
|
const api = createAvatar({ size });
|
|
8290
8254
|
return /* @__PURE__ */ jsxRuntime.jsx(AvatarContext.Provider, { value: { size, imageLoaded, imageError, setImageLoaded, setImageError }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8291
8255
|
"span",
|
|
@@ -8301,9 +8265,9 @@ var Avatar = React41__namespace.forwardRef(
|
|
|
8301
8265
|
}
|
|
8302
8266
|
);
|
|
8303
8267
|
Avatar.displayName = "Avatar";
|
|
8304
|
-
var AvatarImage =
|
|
8268
|
+
var AvatarImage = React42__namespace.forwardRef(
|
|
8305
8269
|
({ className, src, alt = "", onLoad, onError, ...props }, ref) => {
|
|
8306
|
-
const { setImageLoaded, setImageError } =
|
|
8270
|
+
const { setImageLoaded, setImageError } = React42__namespace.useContext(AvatarContext);
|
|
8307
8271
|
const handleLoad = (e) => {
|
|
8308
8272
|
setImageLoaded(true);
|
|
8309
8273
|
onLoad?.(e);
|
|
@@ -8327,9 +8291,9 @@ var AvatarImage = React41__namespace.forwardRef(
|
|
|
8327
8291
|
}
|
|
8328
8292
|
);
|
|
8329
8293
|
AvatarImage.displayName = "AvatarImage";
|
|
8330
|
-
var AvatarFallback =
|
|
8294
|
+
var AvatarFallback = React42__namespace.forwardRef(
|
|
8331
8295
|
({ className, children, ...props }, ref) => {
|
|
8332
|
-
const { size } =
|
|
8296
|
+
const { size } = React42__namespace.useContext(AvatarContext);
|
|
8333
8297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8334
8298
|
"span",
|
|
8335
8299
|
{
|
|
@@ -8446,28 +8410,28 @@ var avatarPresenceDotVariants = cva({
|
|
|
8446
8410
|
// ../react-avatar-group/dist/index.js
|
|
8447
8411
|
function AvatarGroup({ users, max, size = "md", className }) {
|
|
8448
8412
|
const api = createAvatarGroup({ users, max});
|
|
8449
|
-
return
|
|
8413
|
+
return React42__namespace.createElement(
|
|
8450
8414
|
"div",
|
|
8451
8415
|
{ ...api.ariaProps, className: cn(avatarGroupStyles, className) },
|
|
8452
8416
|
api.visibleUsers.map(
|
|
8453
|
-
(user) =>
|
|
8417
|
+
(user) => React42__namespace.createElement(
|
|
8454
8418
|
"div",
|
|
8455
8419
|
{
|
|
8456
8420
|
key: user.id,
|
|
8457
8421
|
className: avatarVariants2({ size }),
|
|
8458
8422
|
...api.getAvatarAriaProps(user)
|
|
8459
8423
|
},
|
|
8460
|
-
user.src ?
|
|
8424
|
+
user.src ? React42__namespace.createElement("img", {
|
|
8461
8425
|
src: user.src,
|
|
8462
8426
|
alt: user.name,
|
|
8463
8427
|
className: avatarImageStyles
|
|
8464
|
-
}) :
|
|
8465
|
-
user.status &&
|
|
8428
|
+
}) : React42__namespace.createElement("span", null, api.getInitials(user.name)),
|
|
8429
|
+
user.status && React42__namespace.createElement("span", {
|
|
8466
8430
|
className: avatarPresenceDotVariants({ size, status: user.status })
|
|
8467
8431
|
})
|
|
8468
8432
|
)
|
|
8469
8433
|
),
|
|
8470
|
-
api.overflowCount > 0 &&
|
|
8434
|
+
api.overflowCount > 0 && React42__namespace.createElement(
|
|
8471
8435
|
"div",
|
|
8472
8436
|
{
|
|
8473
8437
|
className: avatarOverflowBadgeVariants({ size }),
|
|
@@ -8551,7 +8515,7 @@ var cardContentVariants = cva({
|
|
|
8551
8515
|
var cardFooterVariants = cva({
|
|
8552
8516
|
base: "flex items-center p-6 pt-0"
|
|
8553
8517
|
});
|
|
8554
|
-
var Card2 =
|
|
8518
|
+
var Card2 = React42__namespace.forwardRef(
|
|
8555
8519
|
({ className, ...props }, ref) => {
|
|
8556
8520
|
const api = createCard();
|
|
8557
8521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8567,7 +8531,7 @@ var Card2 = React41__namespace.forwardRef(
|
|
|
8567
8531
|
}
|
|
8568
8532
|
);
|
|
8569
8533
|
Card2.displayName = "Card";
|
|
8570
|
-
var CardHeader =
|
|
8534
|
+
var CardHeader = React42__namespace.forwardRef(
|
|
8571
8535
|
({ className, ...props }, ref) => {
|
|
8572
8536
|
const api = createCardHeader();
|
|
8573
8537
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8582,7 +8546,7 @@ var CardHeader = React41__namespace.forwardRef(
|
|
|
8582
8546
|
}
|
|
8583
8547
|
);
|
|
8584
8548
|
CardHeader.displayName = "CardHeader";
|
|
8585
|
-
var CardTitle =
|
|
8549
|
+
var CardTitle = React42__namespace.forwardRef(
|
|
8586
8550
|
({ className, ...props }, ref) => {
|
|
8587
8551
|
const api = createCardTitle();
|
|
8588
8552
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8597,7 +8561,7 @@ var CardTitle = React41__namespace.forwardRef(
|
|
|
8597
8561
|
}
|
|
8598
8562
|
);
|
|
8599
8563
|
CardTitle.displayName = "CardTitle";
|
|
8600
|
-
var CardDescription =
|
|
8564
|
+
var CardDescription = React42__namespace.forwardRef(
|
|
8601
8565
|
({ className, ...props }, ref) => {
|
|
8602
8566
|
const api = createCardDescription();
|
|
8603
8567
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8612,7 +8576,7 @@ var CardDescription = React41__namespace.forwardRef(
|
|
|
8612
8576
|
}
|
|
8613
8577
|
);
|
|
8614
8578
|
CardDescription.displayName = "CardDescription";
|
|
8615
|
-
var CardContent =
|
|
8579
|
+
var CardContent = React42__namespace.forwardRef(
|
|
8616
8580
|
({ className, ...props }, ref) => {
|
|
8617
8581
|
const api = createCardContent();
|
|
8618
8582
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8627,7 +8591,7 @@ var CardContent = React41__namespace.forwardRef(
|
|
|
8627
8591
|
}
|
|
8628
8592
|
);
|
|
8629
8593
|
CardContent.displayName = "CardContent";
|
|
8630
|
-
var CardFooter =
|
|
8594
|
+
var CardFooter = React42__namespace.forwardRef(
|
|
8631
8595
|
({ className, ...props }, ref) => {
|
|
8632
8596
|
const api = createCardFooter();
|
|
8633
8597
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8708,7 +8672,7 @@ var checkboxVariants = cva({
|
|
|
8708
8672
|
size: "default"
|
|
8709
8673
|
}
|
|
8710
8674
|
});
|
|
8711
|
-
var Checkbox =
|
|
8675
|
+
var Checkbox = React42__namespace.forwardRef(
|
|
8712
8676
|
({ checked = false, onCheckedChange, disabled = false, size = "default", className, ...props }, ref) => {
|
|
8713
8677
|
const api = createCheckbox({ checked, disabled });
|
|
8714
8678
|
const checkedVariant = checked === "indeterminate" ? "indeterminate" : checked ? "true" : "false";
|
|
@@ -9019,13 +8983,13 @@ function DatePicker({
|
|
|
9019
8983
|
className,
|
|
9020
8984
|
disabled = false
|
|
9021
8985
|
}) {
|
|
9022
|
-
const [open, setOpen] =
|
|
9023
|
-
const [currentMonth, setCurrentMonth] =
|
|
8986
|
+
const [open, setOpen] = React42__namespace.useState(false);
|
|
8987
|
+
const [currentMonth, setCurrentMonth] = React42__namespace.useState(
|
|
9024
8988
|
() => value ? new Date(value.getFullYear(), value.getMonth(), 1) : new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)
|
|
9025
8989
|
);
|
|
9026
|
-
const [view, setView] =
|
|
9027
|
-
const containerRef =
|
|
9028
|
-
const api =
|
|
8990
|
+
const [view, setView] = React42__namespace.useState("calendar");
|
|
8991
|
+
const containerRef = React42__namespace.useRef(null);
|
|
8992
|
+
const api = React42__namespace.useMemo(
|
|
9029
8993
|
() => createDatePicker({
|
|
9030
8994
|
value,
|
|
9031
8995
|
onChange,
|
|
@@ -9039,7 +9003,7 @@ function DatePicker({
|
|
|
9039
9003
|
}),
|
|
9040
9004
|
[value, onChange, minDate, maxDate, showTime, format, placeholder, open]
|
|
9041
9005
|
);
|
|
9042
|
-
|
|
9006
|
+
React42__namespace.useMemo(() => {
|
|
9043
9007
|
createDatePicker({
|
|
9044
9008
|
value,
|
|
9045
9009
|
minDate,
|
|
@@ -9054,7 +9018,7 @@ function DatePicker({
|
|
|
9054
9018
|
});
|
|
9055
9019
|
return tempApi.days;
|
|
9056
9020
|
}, [value, minDate, maxDate, currentMonth]);
|
|
9057
|
-
|
|
9021
|
+
React42__namespace.useEffect(() => {
|
|
9058
9022
|
if (!open) return;
|
|
9059
9023
|
function handleClick(e) {
|
|
9060
9024
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -9064,7 +9028,7 @@ function DatePicker({
|
|
|
9064
9028
|
document.addEventListener("mousedown", handleClick);
|
|
9065
9029
|
return () => document.removeEventListener("mousedown", handleClick);
|
|
9066
9030
|
}, [open]);
|
|
9067
|
-
|
|
9031
|
+
React42__namespace.useEffect(() => {
|
|
9068
9032
|
if (!open) return;
|
|
9069
9033
|
function handleKeyDown(e) {
|
|
9070
9034
|
if (e.key === "Escape") {
|
|
@@ -9102,10 +9066,10 @@ function DatePicker({
|
|
|
9102
9066
|
onChange?.(newDate);
|
|
9103
9067
|
};
|
|
9104
9068
|
const monthLabel = currentMonth.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
9105
|
-
return
|
|
9069
|
+
return React42__namespace.createElement(
|
|
9106
9070
|
"div",
|
|
9107
9071
|
{ ref: containerRef, className: cn("relative inline-block", className) },
|
|
9108
|
-
|
|
9072
|
+
React42__namespace.createElement(
|
|
9109
9073
|
"button",
|
|
9110
9074
|
{
|
|
9111
9075
|
type: "button",
|
|
@@ -9117,17 +9081,17 @@ function DatePicker({
|
|
|
9117
9081
|
},
|
|
9118
9082
|
displayValue
|
|
9119
9083
|
),
|
|
9120
|
-
open &&
|
|
9084
|
+
open && React42__namespace.createElement(
|
|
9121
9085
|
"div",
|
|
9122
9086
|
{
|
|
9123
9087
|
className: datePickerDropdownStyles,
|
|
9124
9088
|
role: "dialog",
|
|
9125
9089
|
"aria-modal": true
|
|
9126
9090
|
},
|
|
9127
|
-
|
|
9091
|
+
React42__namespace.createElement(
|
|
9128
9092
|
"div",
|
|
9129
9093
|
{ className: "flex items-center justify-between mb-3" },
|
|
9130
|
-
|
|
9094
|
+
React42__namespace.createElement(
|
|
9131
9095
|
"button",
|
|
9132
9096
|
{
|
|
9133
9097
|
type: "button",
|
|
@@ -9137,8 +9101,8 @@ function DatePicker({
|
|
|
9137
9101
|
},
|
|
9138
9102
|
"\u2039"
|
|
9139
9103
|
),
|
|
9140
|
-
|
|
9141
|
-
|
|
9104
|
+
React42__namespace.createElement("span", { className: "text-sm font-medium" }, monthLabel),
|
|
9105
|
+
React42__namespace.createElement(
|
|
9142
9106
|
"button",
|
|
9143
9107
|
{
|
|
9144
9108
|
type: "button",
|
|
@@ -9149,11 +9113,11 @@ function DatePicker({
|
|
|
9149
9113
|
"\u203A"
|
|
9150
9114
|
)
|
|
9151
9115
|
),
|
|
9152
|
-
|
|
9116
|
+
React42__namespace.createElement(
|
|
9153
9117
|
"div",
|
|
9154
9118
|
{ className: "grid grid-cols-7 gap-0 text-center", role: "grid" },
|
|
9155
9119
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
9156
|
-
(d) =>
|
|
9120
|
+
(d) => React42__namespace.createElement("div", { key: d, className: "text-xs text-muted-foreground py-1 font-medium" }, d)
|
|
9157
9121
|
),
|
|
9158
9122
|
api.days.map((day, i) => {
|
|
9159
9123
|
let state = "default";
|
|
@@ -9161,7 +9125,7 @@ function DatePicker({
|
|
|
9161
9125
|
else if (day.isSelected) state = "selected";
|
|
9162
9126
|
else if (day.isToday) state = "today";
|
|
9163
9127
|
else if (!day.isCurrentMonth) state = "outside";
|
|
9164
|
-
return
|
|
9128
|
+
return React42__namespace.createElement(
|
|
9165
9129
|
"button",
|
|
9166
9130
|
{
|
|
9167
9131
|
key: i,
|
|
@@ -9176,11 +9140,11 @@ function DatePicker({
|
|
|
9176
9140
|
);
|
|
9177
9141
|
})
|
|
9178
9142
|
),
|
|
9179
|
-
showTime &&
|
|
9143
|
+
showTime && React42__namespace.createElement(
|
|
9180
9144
|
"div",
|
|
9181
9145
|
{ className: datePickerTimeStyles },
|
|
9182
|
-
|
|
9183
|
-
|
|
9146
|
+
React42__namespace.createElement("span", { className: "text-sm text-muted-foreground" }, "Time:"),
|
|
9147
|
+
React42__namespace.createElement("input", {
|
|
9184
9148
|
type: "number",
|
|
9185
9149
|
min: 0,
|
|
9186
9150
|
max: 23,
|
|
@@ -9189,8 +9153,8 @@ function DatePicker({
|
|
|
9189
9153
|
className: datePickerTimeInputStyles,
|
|
9190
9154
|
"aria-label": "Hours"
|
|
9191
9155
|
}),
|
|
9192
|
-
|
|
9193
|
-
|
|
9156
|
+
React42__namespace.createElement("span", { className: "text-muted-foreground" }, ":"),
|
|
9157
|
+
React42__namespace.createElement("input", {
|
|
9194
9158
|
type: "number",
|
|
9195
9159
|
min: 0,
|
|
9196
9160
|
max: 59,
|
|
@@ -9580,10 +9544,10 @@ var emojiPickerSectionLabelStyles = "px-2 py-1 text-xs font-medium text-muted-fo
|
|
|
9580
9544
|
|
|
9581
9545
|
// ../react-emoji-picker/dist/index.js
|
|
9582
9546
|
function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className }) {
|
|
9583
|
-
const [search, setSearch] =
|
|
9584
|
-
const [activeCategory, setActiveCategory] =
|
|
9585
|
-
const [recentEmojis, setRecentEmojis] =
|
|
9586
|
-
const api =
|
|
9547
|
+
const [search, setSearch] = React42__namespace.useState("");
|
|
9548
|
+
const [activeCategory, setActiveCategory] = React42__namespace.useState("smileys");
|
|
9549
|
+
const [recentEmojis, setRecentEmojis] = React42__namespace.useState(initialRecent);
|
|
9550
|
+
const api = React42__namespace.useMemo(
|
|
9587
9551
|
() => createEmojiPicker({
|
|
9588
9552
|
onSelect: void 0,
|
|
9589
9553
|
search,
|
|
@@ -9591,7 +9555,7 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9591
9555
|
}),
|
|
9592
9556
|
[search, recentEmojis]
|
|
9593
9557
|
);
|
|
9594
|
-
const filteredEmojis =
|
|
9558
|
+
const filteredEmojis = React42__namespace.useMemo(() => {
|
|
9595
9559
|
if (search.trim()) {
|
|
9596
9560
|
const query = search.toLowerCase().trim();
|
|
9597
9561
|
const allEmojis = EMOJI_CATEGORIES.flatMap((cat) => EMOJI_DATA[cat]);
|
|
@@ -9611,22 +9575,22 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9611
9575
|
setActiveCategory(cat);
|
|
9612
9576
|
setSearch("");
|
|
9613
9577
|
};
|
|
9614
|
-
return
|
|
9578
|
+
return React42__namespace.createElement(
|
|
9615
9579
|
"div",
|
|
9616
9580
|
{ className: cn(emojiPickerContainerStyles, className), ...api.ariaProps },
|
|
9617
9581
|
// Search input
|
|
9618
|
-
|
|
9582
|
+
React42__namespace.createElement("input", {
|
|
9619
9583
|
...api.searchInputProps,
|
|
9620
9584
|
className: emojiPickerSearchStyles,
|
|
9621
9585
|
value: search,
|
|
9622
9586
|
onChange: (e) => setSearch(e.target.value)
|
|
9623
9587
|
}),
|
|
9624
9588
|
// Category tabs
|
|
9625
|
-
!search &&
|
|
9589
|
+
!search && React42__namespace.createElement(
|
|
9626
9590
|
"div",
|
|
9627
9591
|
{ className: emojiPickerCategoryBarStyles },
|
|
9628
9592
|
api.categoryTabs.map(
|
|
9629
|
-
(tab) =>
|
|
9593
|
+
(tab) => React42__namespace.createElement(
|
|
9630
9594
|
"button",
|
|
9631
9595
|
{
|
|
9632
9596
|
key: tab.category,
|
|
@@ -9643,15 +9607,15 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9643
9607
|
)
|
|
9644
9608
|
),
|
|
9645
9609
|
// Recent emojis section
|
|
9646
|
-
!search && recentEmojis.length > 0 &&
|
|
9610
|
+
!search && recentEmojis.length > 0 && React42__namespace.createElement(
|
|
9647
9611
|
"div",
|
|
9648
9612
|
null,
|
|
9649
|
-
|
|
9650
|
-
|
|
9613
|
+
React42__namespace.createElement("div", { className: emojiPickerSectionLabelStyles }, "Recent"),
|
|
9614
|
+
React42__namespace.createElement(
|
|
9651
9615
|
"div",
|
|
9652
9616
|
{ className: emojiPickerGridStyles },
|
|
9653
9617
|
recentEmojis.map(
|
|
9654
|
-
(emoji, i) =>
|
|
9618
|
+
(emoji, i) => React42__namespace.createElement(
|
|
9655
9619
|
"button",
|
|
9656
9620
|
{
|
|
9657
9621
|
key: `recent-${emoji.emoji}-${i}`,
|
|
@@ -9666,19 +9630,19 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9666
9630
|
)
|
|
9667
9631
|
),
|
|
9668
9632
|
// Emoji grid
|
|
9669
|
-
|
|
9633
|
+
React42__namespace.createElement(
|
|
9670
9634
|
"div",
|
|
9671
9635
|
null,
|
|
9672
|
-
!search &&
|
|
9636
|
+
!search && React42__namespace.createElement(
|
|
9673
9637
|
"div",
|
|
9674
9638
|
{ className: emojiPickerSectionLabelStyles },
|
|
9675
9639
|
CATEGORY_LABELS[activeCategory]
|
|
9676
9640
|
),
|
|
9677
|
-
|
|
9641
|
+
React42__namespace.createElement(
|
|
9678
9642
|
"div",
|
|
9679
9643
|
{ className: emojiPickerGridStyles },
|
|
9680
9644
|
filteredEmojis.map(
|
|
9681
|
-
(emoji, i) =>
|
|
9645
|
+
(emoji, i) => React42__namespace.createElement(
|
|
9682
9646
|
"button",
|
|
9683
9647
|
{
|
|
9684
9648
|
key: `${emoji.emoji}-${i}`,
|
|
@@ -9690,7 +9654,7 @@ function EmojiPicker({ onSelect, recentEmojis: initialRecent = [], className })
|
|
|
9690
9654
|
emoji.emoji
|
|
9691
9655
|
)
|
|
9692
9656
|
),
|
|
9693
|
-
filteredEmojis.length === 0 &&
|
|
9657
|
+
filteredEmojis.length === 0 && React42__namespace.createElement(
|
|
9694
9658
|
"div",
|
|
9695
9659
|
{ className: "col-span-8 text-center text-sm text-muted-foreground py-4" },
|
|
9696
9660
|
"No emojis found"
|
|
@@ -9890,10 +9854,10 @@ function FileUpload({
|
|
|
9890
9854
|
className,
|
|
9891
9855
|
children
|
|
9892
9856
|
}) {
|
|
9893
|
-
const [files, setFiles] =
|
|
9894
|
-
const [isDragging, setIsDragging] =
|
|
9895
|
-
const inputRef =
|
|
9896
|
-
const api =
|
|
9857
|
+
const [files, setFiles] = React42__namespace.useState([]);
|
|
9858
|
+
const [isDragging, setIsDragging] = React42__namespace.useState(false);
|
|
9859
|
+
const inputRef = React42__namespace.useRef(null);
|
|
9860
|
+
const api = React42__namespace.useMemo(
|
|
9897
9861
|
() => createFileUpload({
|
|
9898
9862
|
accept,
|
|
9899
9863
|
maxSize,
|
|
@@ -9958,17 +9922,17 @@ function FileUpload({
|
|
|
9958
9922
|
handleClick();
|
|
9959
9923
|
}
|
|
9960
9924
|
};
|
|
9961
|
-
return
|
|
9925
|
+
return React42__namespace.createElement(
|
|
9962
9926
|
"div",
|
|
9963
9927
|
{ className },
|
|
9964
9928
|
// Hidden file input
|
|
9965
|
-
|
|
9929
|
+
React42__namespace.createElement("input", {
|
|
9966
9930
|
ref: inputRef,
|
|
9967
9931
|
...api.inputProps,
|
|
9968
9932
|
onChange: handleInputChange
|
|
9969
9933
|
}),
|
|
9970
9934
|
// Drop zone
|
|
9971
|
-
|
|
9935
|
+
React42__namespace.createElement(
|
|
9972
9936
|
"div",
|
|
9973
9937
|
{
|
|
9974
9938
|
...api.dropZoneProps,
|
|
@@ -9982,21 +9946,21 @@ function FileUpload({
|
|
|
9982
9946
|
onDragOver: handleDragOver,
|
|
9983
9947
|
onDrop: handleDrop
|
|
9984
9948
|
},
|
|
9985
|
-
children ??
|
|
9986
|
-
|
|
9949
|
+
children ?? React42__namespace.createElement(
|
|
9950
|
+
React42__namespace.Fragment,
|
|
9987
9951
|
null,
|
|
9988
|
-
|
|
9989
|
-
|
|
9952
|
+
React42__namespace.createElement("div", { className: "text-2xl mb-2" }, "\u{1F4C1}"),
|
|
9953
|
+
React42__namespace.createElement(
|
|
9990
9954
|
"p",
|
|
9991
9955
|
{ className: "text-sm text-muted-foreground" },
|
|
9992
9956
|
"Drag & drop files here, or click to select"
|
|
9993
9957
|
),
|
|
9994
|
-
accept &&
|
|
9958
|
+
accept && React42__namespace.createElement(
|
|
9995
9959
|
"p",
|
|
9996
9960
|
{ className: "text-xs text-muted-foreground mt-1" },
|
|
9997
9961
|
`Accepted: ${accept}`
|
|
9998
9962
|
),
|
|
9999
|
-
maxSize &&
|
|
9963
|
+
maxSize && React42__namespace.createElement(
|
|
10000
9964
|
"p",
|
|
10001
9965
|
{ className: "text-xs text-muted-foreground" },
|
|
10002
9966
|
`Max size: ${formatFileSize(maxSize)}`
|
|
@@ -10004,37 +9968,37 @@ function FileUpload({
|
|
|
10004
9968
|
)
|
|
10005
9969
|
),
|
|
10006
9970
|
// File list
|
|
10007
|
-
files.length > 0 &&
|
|
9971
|
+
files.length > 0 && React42__namespace.createElement(
|
|
10008
9972
|
"div",
|
|
10009
9973
|
{ className: fileUploadFileListStyles },
|
|
10010
9974
|
files.map(
|
|
10011
|
-
(file) =>
|
|
9975
|
+
(file) => React42__namespace.createElement(
|
|
10012
9976
|
"div",
|
|
10013
9977
|
{ key: file.id, className: fileUploadFileItemStyles },
|
|
10014
|
-
|
|
9978
|
+
React42__namespace.createElement(
|
|
10015
9979
|
"div",
|
|
10016
9980
|
{ className: "flex-1 min-w-0" },
|
|
10017
|
-
|
|
10018
|
-
|
|
9981
|
+
React42__namespace.createElement("div", { className: "font-medium truncate" }, file.name),
|
|
9982
|
+
React42__namespace.createElement(
|
|
10019
9983
|
"div",
|
|
10020
9984
|
{ className: "text-xs text-muted-foreground" },
|
|
10021
9985
|
formatFileSize(file.size)
|
|
10022
9986
|
),
|
|
10023
|
-
file.status === "uploading" &&
|
|
9987
|
+
file.status === "uploading" && React42__namespace.createElement(
|
|
10024
9988
|
"div",
|
|
10025
9989
|
{ className: cn(fileUploadProgressStyles, "mt-1") },
|
|
10026
|
-
|
|
9990
|
+
React42__namespace.createElement("div", {
|
|
10027
9991
|
className: fileUploadProgressBarStyles,
|
|
10028
9992
|
style: { width: `${file.progress}%` }
|
|
10029
9993
|
})
|
|
10030
9994
|
),
|
|
10031
|
-
file.error &&
|
|
9995
|
+
file.error && React42__namespace.createElement(
|
|
10032
9996
|
"div",
|
|
10033
9997
|
{ className: "text-xs text-destructive mt-0.5" },
|
|
10034
9998
|
file.error
|
|
10035
9999
|
)
|
|
10036
10000
|
),
|
|
10037
|
-
|
|
10001
|
+
React42__namespace.createElement(
|
|
10038
10002
|
"button",
|
|
10039
10003
|
{
|
|
10040
10004
|
type: "button",
|
|
@@ -10054,162 +10018,6 @@ function FileUpload({
|
|
|
10054
10018
|
}
|
|
10055
10019
|
FileUpload.displayName = "FileUpload";
|
|
10056
10020
|
|
|
10057
|
-
// ../keyboard-shortcut/dist/index.js
|
|
10058
|
-
var MODIFIER_KEYS = /* @__PURE__ */ new Set(["Ctrl", "Control", "Alt", "Shift", "Meta", "Cmd", "Command"]);
|
|
10059
|
-
var KEY_DISPLAY = {
|
|
10060
|
-
"Ctrl": "Ctrl",
|
|
10061
|
-
"Control": "Ctrl",
|
|
10062
|
-
"Alt": "Alt",
|
|
10063
|
-
"Shift": "Shift",
|
|
10064
|
-
"Meta": "Meta",
|
|
10065
|
-
"Cmd": "Cmd",
|
|
10066
|
-
"Command": "Cmd",
|
|
10067
|
-
"Enter": "\u21B5",
|
|
10068
|
-
"Backspace": "\u232B",
|
|
10069
|
-
"Delete": "Del",
|
|
10070
|
-
"Escape": "Esc",
|
|
10071
|
-
"ArrowUp": "\u2191",
|
|
10072
|
-
"ArrowDown": "\u2193",
|
|
10073
|
-
"ArrowLeft": "\u2190",
|
|
10074
|
-
"ArrowRight": "\u2192",
|
|
10075
|
-
"Tab": "Tab",
|
|
10076
|
-
" ": "Space"
|
|
10077
|
-
};
|
|
10078
|
-
var MAC_KEY_DISPLAY = {
|
|
10079
|
-
"Ctrl": "\u2303",
|
|
10080
|
-
"Control": "\u2303",
|
|
10081
|
-
"Alt": "\u2325",
|
|
10082
|
-
"Shift": "\u21E7",
|
|
10083
|
-
"Meta": "\u2318",
|
|
10084
|
-
"Cmd": "\u2318",
|
|
10085
|
-
"Command": "\u2318",
|
|
10086
|
-
"Enter": "\u21B5",
|
|
10087
|
-
"Backspace": "\u232B",
|
|
10088
|
-
"Delete": "\u2326",
|
|
10089
|
-
"Escape": "\u238B",
|
|
10090
|
-
"ArrowUp": "\u2191",
|
|
10091
|
-
"ArrowDown": "\u2193",
|
|
10092
|
-
"ArrowLeft": "\u2190",
|
|
10093
|
-
"ArrowRight": "\u2192",
|
|
10094
|
-
"Tab": "\u21E5",
|
|
10095
|
-
" ": "\u2423"
|
|
10096
|
-
};
|
|
10097
|
-
function normalizeKey(key) {
|
|
10098
|
-
if (key === "Command" || key === "Cmd") return "Meta";
|
|
10099
|
-
if (key === "Control") return "Ctrl";
|
|
10100
|
-
return key;
|
|
10101
|
-
}
|
|
10102
|
-
function isMac() {
|
|
10103
|
-
if (typeof navigator !== "undefined") {
|
|
10104
|
-
return navigator.platform?.includes("Mac") || navigator.userAgent?.includes("Mac");
|
|
10105
|
-
}
|
|
10106
|
-
return false;
|
|
10107
|
-
}
|
|
10108
|
-
function formatShortcut(keys, mac) {
|
|
10109
|
-
const displayMap = mac ? MAC_KEY_DISPLAY : KEY_DISPLAY;
|
|
10110
|
-
return keys.map((key) => displayMap[key] ?? key.toUpperCase()).join(mac ? "" : "+");
|
|
10111
|
-
}
|
|
10112
|
-
function createKeyboardShortcut(props) {
|
|
10113
|
-
const {
|
|
10114
|
-
keys,
|
|
10115
|
-
onTrigger,
|
|
10116
|
-
enabled: enabledProp = true,
|
|
10117
|
-
preventDefault: preventDefaultProp = true
|
|
10118
|
-
} = props;
|
|
10119
|
-
const normalizedKeys = keys.map(normalizeKey);
|
|
10120
|
-
const modifiers = normalizedKeys.filter((k) => MODIFIER_KEYS.has(k));
|
|
10121
|
-
const regularKeys = normalizedKeys.filter((k) => !MODIFIER_KEYS.has(k));
|
|
10122
|
-
function handler(event) {
|
|
10123
|
-
if (!enabledProp) return false;
|
|
10124
|
-
const ctrlRequired = modifiers.includes("Ctrl");
|
|
10125
|
-
const altRequired = modifiers.includes("Alt");
|
|
10126
|
-
const shiftRequired = modifiers.includes("Shift");
|
|
10127
|
-
const metaRequired = modifiers.includes("Meta");
|
|
10128
|
-
if (ctrlRequired !== (event.ctrlKey || event.metaKey && !metaRequired)) ;
|
|
10129
|
-
const ctrlMatch = ctrlRequired ? event.ctrlKey : !event.ctrlKey;
|
|
10130
|
-
const altMatch = altRequired ? event.altKey : !event.altKey;
|
|
10131
|
-
const shiftMatch = shiftRequired ? event.shiftKey : !event.shiftKey;
|
|
10132
|
-
const metaMatch = metaRequired ? event.metaKey : !event.metaKey;
|
|
10133
|
-
if (!ctrlMatch || !altMatch || !shiftMatch || !metaMatch) return false;
|
|
10134
|
-
if (regularKeys.length > 0) {
|
|
10135
|
-
const eventKey = event.key.length === 1 ? event.key.toUpperCase() : event.key;
|
|
10136
|
-
const targetKey = regularKeys[0].length === 1 ? regularKeys[0].toUpperCase() : regularKeys[0];
|
|
10137
|
-
if (eventKey !== targetKey) return false;
|
|
10138
|
-
}
|
|
10139
|
-
if (preventDefaultProp) {
|
|
10140
|
-
event.preventDefault();
|
|
10141
|
-
}
|
|
10142
|
-
onTrigger();
|
|
10143
|
-
return true;
|
|
10144
|
-
}
|
|
10145
|
-
const mac = isMac();
|
|
10146
|
-
const display = formatShortcut(keys, false);
|
|
10147
|
-
const platformDisplay = formatShortcut(keys, mac);
|
|
10148
|
-
const badgeAriaProps = {
|
|
10149
|
-
"aria-hidden": true,
|
|
10150
|
-
role: "presentation"
|
|
10151
|
-
};
|
|
10152
|
-
return {
|
|
10153
|
-
handler,
|
|
10154
|
-
display,
|
|
10155
|
-
platformDisplay,
|
|
10156
|
-
enabled: enabledProp,
|
|
10157
|
-
keys,
|
|
10158
|
-
badgeAriaProps
|
|
10159
|
-
};
|
|
10160
|
-
}
|
|
10161
|
-
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";
|
|
10162
|
-
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";
|
|
10163
|
-
var shortcutSeparatorStyles = "text-muted-foreground text-xs";
|
|
10164
|
-
|
|
10165
|
-
// ../react-keyboard-shortcut/dist/index.js
|
|
10166
|
-
function KeyboardShortcut({
|
|
10167
|
-
keys,
|
|
10168
|
-
onTrigger,
|
|
10169
|
-
enabled = true,
|
|
10170
|
-
preventDefault = true
|
|
10171
|
-
}) {
|
|
10172
|
-
const apiRef = React41__namespace.useRef(
|
|
10173
|
-
createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault })
|
|
10174
|
-
);
|
|
10175
|
-
React41__namespace.useEffect(() => {
|
|
10176
|
-
apiRef.current = createKeyboardShortcut({ keys, onTrigger, enabled, preventDefault });
|
|
10177
|
-
}, [keys, onTrigger, enabled, preventDefault]);
|
|
10178
|
-
React41__namespace.useEffect(() => {
|
|
10179
|
-
if (!enabled) return;
|
|
10180
|
-
const handleKeyDown = (e) => {
|
|
10181
|
-
apiRef.current.handler(e);
|
|
10182
|
-
};
|
|
10183
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
10184
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
10185
|
-
}, [enabled]);
|
|
10186
|
-
return null;
|
|
10187
|
-
}
|
|
10188
|
-
KeyboardShortcut.displayName = "KeyboardShortcut";
|
|
10189
|
-
function ShortcutBadge({ keys, platform = true, className }) {
|
|
10190
|
-
const api = createKeyboardShortcut({ keys, onTrigger: () => {
|
|
10191
|
-
}, enabled: false });
|
|
10192
|
-
const displayKeys = platform ? api.platformDisplay : api.display;
|
|
10193
|
-
const isMacDisplay = platform && displayKeys !== api.display;
|
|
10194
|
-
return React41__namespace.createElement(
|
|
10195
|
-
"kbd",
|
|
10196
|
-
{ ...api.badgeAriaProps, className: cn(shortcutBadgeStyles, className) },
|
|
10197
|
-
isMacDisplay ? React41__namespace.createElement("span", null, displayKeys) : keys.map(
|
|
10198
|
-
(key, i) => React41__namespace.createElement(
|
|
10199
|
-
React41__namespace.Fragment,
|
|
10200
|
-
{ key: i },
|
|
10201
|
-
i > 0 && React41__namespace.createElement("span", { className: shortcutSeparatorStyles }, "+"),
|
|
10202
|
-
React41__namespace.createElement(
|
|
10203
|
-
"span",
|
|
10204
|
-
{ className: shortcutKeyStyles },
|
|
10205
|
-
formatShortcut([key], false)
|
|
10206
|
-
)
|
|
10207
|
-
)
|
|
10208
|
-
)
|
|
10209
|
-
);
|
|
10210
|
-
}
|
|
10211
|
-
ShortcutBadge.displayName = "ShortcutBadge";
|
|
10212
|
-
|
|
10213
10021
|
// ../otp-input/dist/index.js
|
|
10214
10022
|
function createOtpInput(props = {}) {
|
|
10215
10023
|
const {
|
|
@@ -10375,7 +10183,7 @@ var otpInputSlotVariants = cva({
|
|
|
10375
10183
|
filled: "false"
|
|
10376
10184
|
}
|
|
10377
10185
|
});
|
|
10378
|
-
var OtpInput =
|
|
10186
|
+
var OtpInput = React42__namespace.forwardRef(
|
|
10379
10187
|
({
|
|
10380
10188
|
length = 6,
|
|
10381
10189
|
value = "",
|
|
@@ -10387,15 +10195,15 @@ var OtpInput = React41__namespace.forwardRef(
|
|
|
10387
10195
|
className,
|
|
10388
10196
|
...props
|
|
10389
10197
|
}, ref) => {
|
|
10390
|
-
const inputRefs =
|
|
10391
|
-
const [focusedIndex, setFocusedIndex] =
|
|
10392
|
-
const [values, setValues] =
|
|
10198
|
+
const inputRefs = React42__namespace.useRef([]);
|
|
10199
|
+
const [focusedIndex, setFocusedIndex] = React42__namespace.useState(autoFocus ? 0 : -1);
|
|
10200
|
+
const [values, setValues] = React42__namespace.useState(
|
|
10393
10201
|
() => Array.from({ length }, (_, i) => value.charAt(i) || "")
|
|
10394
10202
|
);
|
|
10395
|
-
|
|
10203
|
+
React42__namespace.useEffect(() => {
|
|
10396
10204
|
setValues(Array.from({ length }, (_, i) => value.charAt(i) || ""));
|
|
10397
10205
|
}, [value, length]);
|
|
10398
|
-
|
|
10206
|
+
React42__namespace.useEffect(() => {
|
|
10399
10207
|
if (autoFocus && inputRefs.current[0]) {
|
|
10400
10208
|
inputRefs.current[0].focus();
|
|
10401
10209
|
}
|
|
@@ -10575,13 +10383,13 @@ function PresenceIndicator({
|
|
|
10575
10383
|
className
|
|
10576
10384
|
}) {
|
|
10577
10385
|
const api = createPresence({ status, showLabel, label });
|
|
10578
|
-
return
|
|
10386
|
+
return React42__namespace.createElement(
|
|
10579
10387
|
"span",
|
|
10580
10388
|
{ ...api.ariaProps, className: cn(presenceContainerStyles, className) },
|
|
10581
|
-
|
|
10389
|
+
React42__namespace.createElement("span", {
|
|
10582
10390
|
className: presenceDotVariants({ status, size })
|
|
10583
10391
|
}),
|
|
10584
|
-
api.showLabel &&
|
|
10392
|
+
api.showLabel && React42__namespace.createElement("span", { className: presenceLabelStyles }, api.label)
|
|
10585
10393
|
);
|
|
10586
10394
|
}
|
|
10587
10395
|
PresenceIndicator.displayName = "PresenceIndicator";
|
|
@@ -10669,7 +10477,7 @@ var radioCircleVariants = cva({
|
|
|
10669
10477
|
});
|
|
10670
10478
|
|
|
10671
10479
|
// ../react-radio/dist/index.js
|
|
10672
|
-
var RadioContext =
|
|
10480
|
+
var RadioContext = React42__namespace.createContext(null);
|
|
10673
10481
|
function RadioGroup({
|
|
10674
10482
|
children,
|
|
10675
10483
|
className,
|
|
@@ -10680,25 +10488,25 @@ function RadioGroup({
|
|
|
10680
10488
|
disabled = false,
|
|
10681
10489
|
orientation = "vertical"
|
|
10682
10490
|
}) {
|
|
10683
|
-
const [internalValue, setInternalValue] =
|
|
10491
|
+
const [internalValue, setInternalValue] = React42__namespace.useState(defaultValue);
|
|
10684
10492
|
const isControlled = controlledValue !== void 0;
|
|
10685
10493
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
10686
10494
|
const api = createRadioGroup({ value: currentValue, name, disabled, orientation });
|
|
10687
|
-
const handleChange =
|
|
10495
|
+
const handleChange = React42__namespace.useCallback(
|
|
10688
10496
|
(val) => {
|
|
10689
10497
|
if (!isControlled) setInternalValue(val);
|
|
10690
10498
|
onValueChange?.(val);
|
|
10691
10499
|
},
|
|
10692
10500
|
[isControlled, onValueChange]
|
|
10693
10501
|
);
|
|
10694
|
-
const ctx =
|
|
10502
|
+
const ctx = React42__namespace.useMemo(
|
|
10695
10503
|
() => ({ value: currentValue, onValueChange: handleChange, name, disabled }),
|
|
10696
10504
|
[currentValue, handleChange, name, disabled]
|
|
10697
10505
|
);
|
|
10698
|
-
return
|
|
10506
|
+
return React42__namespace.createElement(
|
|
10699
10507
|
RadioContext.Provider,
|
|
10700
10508
|
{ value: ctx },
|
|
10701
|
-
|
|
10509
|
+
React42__namespace.createElement(
|
|
10702
10510
|
"div",
|
|
10703
10511
|
{ ...api.groupProps, className: cn(radioGroupVariants({ orientation }), className) },
|
|
10704
10512
|
children
|
|
@@ -10706,17 +10514,17 @@ function RadioGroup({
|
|
|
10706
10514
|
);
|
|
10707
10515
|
}
|
|
10708
10516
|
function RadioItem({ value, children, disabled = false, className }) {
|
|
10709
|
-
const ctx =
|
|
10517
|
+
const ctx = React42__namespace.useContext(RadioContext);
|
|
10710
10518
|
if (!ctx) throw new Error("RadioItem must be used within RadioGroup");
|
|
10711
10519
|
const isChecked = ctx.value === value;
|
|
10712
10520
|
const isDisabled = ctx.disabled || disabled;
|
|
10713
|
-
return
|
|
10521
|
+
return React42__namespace.createElement(
|
|
10714
10522
|
"label",
|
|
10715
10523
|
{
|
|
10716
10524
|
className: cn(radioItemVariants({ disabled: isDisabled ? "true" : "false" }), className),
|
|
10717
10525
|
"data-state": isChecked ? "checked" : "unchecked"
|
|
10718
10526
|
},
|
|
10719
|
-
|
|
10527
|
+
React42__namespace.createElement(
|
|
10720
10528
|
"button",
|
|
10721
10529
|
{
|
|
10722
10530
|
type: "button",
|
|
@@ -10728,12 +10536,12 @@ function RadioItem({ value, children, disabled = false, className }) {
|
|
|
10728
10536
|
className: cn(radioCircleVariants({ checked: isChecked ? "true" : "false" })),
|
|
10729
10537
|
onClick: () => !isDisabled && ctx.onValueChange(value)
|
|
10730
10538
|
},
|
|
10731
|
-
isChecked &&
|
|
10539
|
+
isChecked && React42__namespace.createElement(
|
|
10732
10540
|
"span",
|
|
10733
10541
|
{ className: "block h-2 w-2 rounded-full bg-primary-foreground mx-auto" }
|
|
10734
10542
|
)
|
|
10735
10543
|
),
|
|
10736
|
-
children &&
|
|
10544
|
+
children && React42__namespace.createElement("span", { className: "text-sm" }, children)
|
|
10737
10545
|
);
|
|
10738
10546
|
}
|
|
10739
10547
|
RadioGroup.displayName = "RadioGroup";
|
|
@@ -10805,11 +10613,11 @@ function ReactionBar({
|
|
|
10805
10613
|
className
|
|
10806
10614
|
}) {
|
|
10807
10615
|
const api = createReactionBar({ reactions, onToggle, onAdd });
|
|
10808
|
-
return
|
|
10616
|
+
return React42__namespace.createElement(
|
|
10809
10617
|
"div",
|
|
10810
10618
|
{ ...api.ariaProps, className: cn(reactionBarStyles, className) },
|
|
10811
10619
|
api.reactions.map(
|
|
10812
|
-
(reaction, i) =>
|
|
10620
|
+
(reaction, i) => React42__namespace.createElement(
|
|
10813
10621
|
"button",
|
|
10814
10622
|
{
|
|
10815
10623
|
key: `${reaction.emoji}-${i}`,
|
|
@@ -10820,11 +10628,11 @@ function ReactionBar({
|
|
|
10820
10628
|
onClick: () => api.toggle(reaction.emoji),
|
|
10821
10629
|
...api.getReactionAriaProps(reaction)
|
|
10822
10630
|
},
|
|
10823
|
-
|
|
10824
|
-
|
|
10631
|
+
React42__namespace.createElement("span", { className: reactionEmojiStyles }, reaction.emoji),
|
|
10632
|
+
React42__namespace.createElement("span", { className: reactionCountStyles }, reaction.count)
|
|
10825
10633
|
)
|
|
10826
10634
|
),
|
|
10827
|
-
showAddButton &&
|
|
10635
|
+
showAddButton && React42__namespace.createElement(
|
|
10828
10636
|
"button",
|
|
10829
10637
|
{
|
|
10830
10638
|
type: "button",
|
|
@@ -10973,7 +10781,7 @@ var selectItemVariants = cva({
|
|
|
10973
10781
|
selected: "false"
|
|
10974
10782
|
}
|
|
10975
10783
|
});
|
|
10976
|
-
var SelectContext =
|
|
10784
|
+
var SelectContext = React42__namespace.createContext({
|
|
10977
10785
|
value: void 0,
|
|
10978
10786
|
onValueChange: () => {
|
|
10979
10787
|
},
|
|
@@ -10993,7 +10801,7 @@ function Select({
|
|
|
10993
10801
|
children,
|
|
10994
10802
|
placeholder = "Select an option"
|
|
10995
10803
|
}) {
|
|
10996
|
-
const [open, setOpen] =
|
|
10804
|
+
const [open, setOpen] = React42__namespace.useState(false);
|
|
10997
10805
|
const api = createSelect({ value, disabled, open, placeholder });
|
|
10998
10806
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10999
10807
|
SelectContext.Provider,
|
|
@@ -11016,9 +10824,9 @@ function Select({
|
|
|
11016
10824
|
}
|
|
11017
10825
|
);
|
|
11018
10826
|
}
|
|
11019
|
-
var SelectTrigger =
|
|
10827
|
+
var SelectTrigger = React42__namespace.forwardRef(
|
|
11020
10828
|
({ className, children, size = "default", ...props }, ref) => {
|
|
11021
|
-
const { open, setOpen, disabled, triggerId, contentId } =
|
|
10829
|
+
const { open, setOpen, disabled, triggerId, contentId } = React42__namespace.useContext(SelectContext);
|
|
11022
10830
|
const api = createSelect({ disabled, open });
|
|
11023
10831
|
const handleClick = () => {
|
|
11024
10832
|
if (!disabled) {
|
|
@@ -11075,11 +10883,11 @@ var SelectTrigger = React41__namespace.forwardRef(
|
|
|
11075
10883
|
}
|
|
11076
10884
|
);
|
|
11077
10885
|
SelectTrigger.displayName = "SelectTrigger";
|
|
11078
|
-
var SelectContent =
|
|
10886
|
+
var SelectContent = React42__namespace.forwardRef(
|
|
11079
10887
|
({ className, children, ...props }, forwardedRef) => {
|
|
11080
|
-
const { open, contentId, triggerId, setOpen } =
|
|
11081
|
-
const containerRef =
|
|
11082
|
-
const ref =
|
|
10888
|
+
const { open, contentId, triggerId, setOpen } = React42__namespace.useContext(SelectContext);
|
|
10889
|
+
const containerRef = React42__namespace.useRef(null);
|
|
10890
|
+
const ref = React42__namespace.useCallback(
|
|
11083
10891
|
(node) => {
|
|
11084
10892
|
containerRef.current = node;
|
|
11085
10893
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -11087,7 +10895,7 @@ var SelectContent = React41__namespace.forwardRef(
|
|
|
11087
10895
|
},
|
|
11088
10896
|
[forwardedRef]
|
|
11089
10897
|
);
|
|
11090
|
-
|
|
10898
|
+
React42__namespace.useEffect(() => {
|
|
11091
10899
|
if (open && containerRef.current) {
|
|
11092
10900
|
const firstOption = containerRef.current.querySelector('[role="option"]:not([aria-disabled="true"])');
|
|
11093
10901
|
if (firstOption) {
|
|
@@ -11136,9 +10944,9 @@ var SelectContent = React41__namespace.forwardRef(
|
|
|
11136
10944
|
}
|
|
11137
10945
|
);
|
|
11138
10946
|
SelectContent.displayName = "SelectContent";
|
|
11139
|
-
var SelectItem =
|
|
10947
|
+
var SelectItem = React42__namespace.forwardRef(
|
|
11140
10948
|
({ className, children, value: itemValue, disabled: itemDisabled = false, ...props }, ref) => {
|
|
11141
|
-
const { value, onValueChange, setOpen, triggerId } =
|
|
10949
|
+
const { value, onValueChange, setOpen, triggerId } = React42__namespace.useContext(SelectContext);
|
|
11142
10950
|
const isSelected = value === itemValue;
|
|
11143
10951
|
const handleClick = () => {
|
|
11144
10952
|
if (!itemDisabled) {
|
|
@@ -11274,11 +11082,11 @@ function StatusIndicator({
|
|
|
11274
11082
|
}) {
|
|
11275
11083
|
const api = createStatusIndicator({ type, label, pulse });
|
|
11276
11084
|
const dotClassName = api.pulse ? statusPulseVariants({ type }) : statusDotVariants({ type });
|
|
11277
|
-
return
|
|
11085
|
+
return React42__namespace.createElement(
|
|
11278
11086
|
"span",
|
|
11279
11087
|
{ ...api.ariaProps, className: cn(statusContainerStyles, className) },
|
|
11280
|
-
|
|
11281
|
-
showLabel &&
|
|
11088
|
+
React42__namespace.createElement("span", { className: dotClassName }),
|
|
11089
|
+
showLabel && React42__namespace.createElement("span", { className: statusLabelStyles }, api.label)
|
|
11282
11090
|
);
|
|
11283
11091
|
}
|
|
11284
11092
|
StatusIndicator.displayName = "StatusIndicator";
|
|
@@ -11365,7 +11173,7 @@ var switchThumbVariants = cva({
|
|
|
11365
11173
|
{ checked: "true", size: "lg", class: "translate-x-5" }
|
|
11366
11174
|
]
|
|
11367
11175
|
});
|
|
11368
|
-
var Switch =
|
|
11176
|
+
var Switch = React42__namespace.forwardRef(
|
|
11369
11177
|
({ checked = false, onCheckedChange, disabled = false, size = "default", className, ...props }, ref) => {
|
|
11370
11178
|
const api = createSwitch({ checked, disabled });
|
|
11371
11179
|
const handleClick = () => {
|
|
@@ -11504,41 +11312,41 @@ function MessageComponent({
|
|
|
11504
11312
|
message,
|
|
11505
11313
|
api
|
|
11506
11314
|
}) {
|
|
11507
|
-
return
|
|
11315
|
+
return React42__namespace.createElement(
|
|
11508
11316
|
"div",
|
|
11509
11317
|
{ className: threadMessageStyles, ...api.getMessageAriaProps(message) },
|
|
11510
11318
|
// Avatar
|
|
11511
|
-
|
|
11319
|
+
React42__namespace.createElement(
|
|
11512
11320
|
"div",
|
|
11513
11321
|
{ className: threadAvatarStyles },
|
|
11514
|
-
message.author.avatarUrl ?
|
|
11322
|
+
message.author.avatarUrl ? React42__namespace.createElement("img", {
|
|
11515
11323
|
src: message.author.avatarUrl,
|
|
11516
11324
|
alt: message.author.name,
|
|
11517
11325
|
className: "h-full w-full object-cover"
|
|
11518
11326
|
}) : message.author.name.charAt(0).toUpperCase()
|
|
11519
11327
|
),
|
|
11520
11328
|
// Content
|
|
11521
|
-
|
|
11329
|
+
React42__namespace.createElement(
|
|
11522
11330
|
"div",
|
|
11523
11331
|
{ className: threadContentStyles },
|
|
11524
|
-
|
|
11332
|
+
React42__namespace.createElement(
|
|
11525
11333
|
"div",
|
|
11526
11334
|
{ className: "flex items-baseline" },
|
|
11527
|
-
|
|
11528
|
-
|
|
11335
|
+
React42__namespace.createElement("span", { className: threadAuthorStyles }, message.author.name),
|
|
11336
|
+
React42__namespace.createElement(
|
|
11529
11337
|
"span",
|
|
11530
11338
|
{ className: threadTimestampStyles },
|
|
11531
11339
|
api.formatTimestamp(message.timestamp)
|
|
11532
11340
|
),
|
|
11533
|
-
message.edited &&
|
|
11341
|
+
message.edited && React42__namespace.createElement("span", { className: threadEditedStyles }, "(edited)")
|
|
11534
11342
|
),
|
|
11535
|
-
|
|
11343
|
+
React42__namespace.createElement("div", { className: threadBodyStyles }, message.content),
|
|
11536
11344
|
// Reactions
|
|
11537
|
-
message.reactions && message.reactions.length > 0 &&
|
|
11345
|
+
message.reactions && message.reactions.length > 0 && React42__namespace.createElement(
|
|
11538
11346
|
"div",
|
|
11539
11347
|
{ className: threadReactionsStyles },
|
|
11540
11348
|
message.reactions.map(
|
|
11541
|
-
(reaction, i) =>
|
|
11349
|
+
(reaction, i) => React42__namespace.createElement(
|
|
11542
11350
|
"button",
|
|
11543
11351
|
{
|
|
11544
11352
|
key: `${reaction.emoji}-${i}`,
|
|
@@ -11554,25 +11362,25 @@ function MessageComponent({
|
|
|
11554
11362
|
)
|
|
11555
11363
|
),
|
|
11556
11364
|
// Reply indicator
|
|
11557
|
-
message.replies && message.replies.length > 0 &&
|
|
11365
|
+
message.replies && message.replies.length > 0 && React42__namespace.createElement(
|
|
11558
11366
|
"div",
|
|
11559
11367
|
{ className: threadReplyIndicatorStyles },
|
|
11560
11368
|
`${message.replies.length} ${message.replies.length === 1 ? "reply" : "replies"}`
|
|
11561
11369
|
),
|
|
11562
11370
|
// Attachments
|
|
11563
11371
|
message.attachments && message.attachments.map(
|
|
11564
|
-
(attachment) =>
|
|
11372
|
+
(attachment) => React42__namespace.createElement(
|
|
11565
11373
|
"div",
|
|
11566
11374
|
{ key: attachment.id, className: threadAttachmentStyles },
|
|
11567
|
-
|
|
11568
|
-
|
|
11375
|
+
React42__namespace.createElement("span", null, "\u{1F4CE}"),
|
|
11376
|
+
React42__namespace.createElement("span", { className: "truncate" }, attachment.name)
|
|
11569
11377
|
)
|
|
11570
11378
|
),
|
|
11571
11379
|
// Actions (reply button)
|
|
11572
|
-
|
|
11380
|
+
React42__namespace.createElement(
|
|
11573
11381
|
"div",
|
|
11574
11382
|
{ className: threadActionsStyles },
|
|
11575
|
-
|
|
11383
|
+
React42__namespace.createElement(
|
|
11576
11384
|
"button",
|
|
11577
11385
|
{
|
|
11578
11386
|
type: "button",
|
|
@@ -11594,11 +11402,11 @@ function ThreadView({
|
|
|
11594
11402
|
className
|
|
11595
11403
|
}) {
|
|
11596
11404
|
const api = createThreadView({ messages, onReply, onReact, currentUserId });
|
|
11597
|
-
return
|
|
11405
|
+
return React42__namespace.createElement(
|
|
11598
11406
|
"div",
|
|
11599
11407
|
{ ...api.ariaProps, className: cn(threadContainerStyles, className) },
|
|
11600
11408
|
messages.map(
|
|
11601
|
-
(message) =>
|
|
11409
|
+
(message) => React42__namespace.createElement(MessageComponent, {
|
|
11602
11410
|
key: message.id,
|
|
11603
11411
|
message,
|
|
11604
11412
|
api
|
|
@@ -11632,11 +11440,11 @@ function observeHeadings(headingIds, callback, options) {
|
|
|
11632
11440
|
});
|
|
11633
11441
|
return () => observer.disconnect();
|
|
11634
11442
|
}
|
|
11635
|
-
var TableOfContents =
|
|
11443
|
+
var TableOfContents = React42__namespace.forwardRef(
|
|
11636
11444
|
({ className, containerRef, selectors = "h2, h3, h4", onActiveIdChange, ...props }, ref) => {
|
|
11637
|
-
const [headings, setHeadings] =
|
|
11638
|
-
const [activeId, setActiveId] =
|
|
11639
|
-
|
|
11445
|
+
const [headings, setHeadings] = React42__namespace.useState([]);
|
|
11446
|
+
const [activeId, setActiveId] = React42__namespace.useState("");
|
|
11447
|
+
React42__namespace.useEffect(() => {
|
|
11640
11448
|
const container = containerRef?.current || document.body;
|
|
11641
11449
|
if (!container) return;
|
|
11642
11450
|
const parsedHeadings = parseHeadings(container, selectors);
|
|
@@ -11675,14 +11483,14 @@ var TableOfContents = React41__namespace.forwardRef(
|
|
|
11675
11483
|
}
|
|
11676
11484
|
);
|
|
11677
11485
|
TableOfContents.displayName = "TableOfContents";
|
|
11678
|
-
var CarouselContext =
|
|
11679
|
-
var Carousel =
|
|
11486
|
+
var CarouselContext = React42__namespace.createContext(null);
|
|
11487
|
+
var Carousel = React42__namespace.forwardRef(
|
|
11680
11488
|
({ className, type = "single", collapsible, value: controlledValue, defaultValue, onValueChange, ...props }, ref) => {
|
|
11681
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
11489
|
+
const [uncontrolledValue, setUncontrolledValue] = React42__namespace.useState(
|
|
11682
11490
|
defaultValue ?? (type === "multiple" ? [] : "")
|
|
11683
11491
|
);
|
|
11684
11492
|
const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
11685
|
-
const handleValueChange =
|
|
11493
|
+
const handleValueChange = React42__namespace.useCallback(
|
|
11686
11494
|
(itemValue) => {
|
|
11687
11495
|
if (type === "single") {
|
|
11688
11496
|
const newValue = value === itemValue && collapsible ? "" : itemValue;
|
|
@@ -11701,20 +11509,20 @@ var Carousel = React41__namespace.forwardRef(
|
|
|
11701
11509
|
}
|
|
11702
11510
|
);
|
|
11703
11511
|
Carousel.displayName = "Carousel";
|
|
11704
|
-
var CarouselItemContext =
|
|
11705
|
-
var CarouselItem =
|
|
11512
|
+
var CarouselItemContext = React42__namespace.createContext(null);
|
|
11513
|
+
var CarouselItem = React42__namespace.forwardRef(
|
|
11706
11514
|
({ className, value, ...props }, ref) => {
|
|
11707
|
-
const context =
|
|
11515
|
+
const context = React42__namespace.useContext(CarouselContext);
|
|
11708
11516
|
if (!context) throw new Error("CarouselItem must be within Carousel");
|
|
11709
11517
|
const isOpen = context.type === "single" ? context.value === value : Array.isArray(context.value) && context.value.includes(value);
|
|
11710
11518
|
return /* @__PURE__ */ jsxRuntime.jsx(CarouselItemContext.Provider, { value: { value, isOpen }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("border-b border-border", className), "data-state": isOpen ? "open" : "closed", ...props }) });
|
|
11711
11519
|
}
|
|
11712
11520
|
);
|
|
11713
11521
|
CarouselItem.displayName = "CarouselItem";
|
|
11714
|
-
var CarouselTrigger =
|
|
11522
|
+
var CarouselTrigger = React42__namespace.forwardRef(
|
|
11715
11523
|
({ className, children, ...props }, ref) => {
|
|
11716
|
-
const carouselContext =
|
|
11717
|
-
const itemContext =
|
|
11524
|
+
const carouselContext = React42__namespace.useContext(CarouselContext);
|
|
11525
|
+
const itemContext = React42__namespace.useContext(CarouselItemContext);
|
|
11718
11526
|
if (!carouselContext || !itemContext) throw new Error("CarouselTrigger missing context");
|
|
11719
11527
|
return /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "flex m-0 p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11720
11528
|
"button",
|
|
@@ -11753,9 +11561,9 @@ var CarouselTrigger = React41__namespace.forwardRef(
|
|
|
11753
11561
|
}
|
|
11754
11562
|
);
|
|
11755
11563
|
CarouselTrigger.displayName = "CarouselTrigger";
|
|
11756
|
-
var CarouselContent =
|
|
11564
|
+
var CarouselContent = React42__namespace.forwardRef(
|
|
11757
11565
|
({ className, children, ...props }, ref) => {
|
|
11758
|
-
const itemContext =
|
|
11566
|
+
const itemContext = React42__namespace.useContext(CarouselItemContext);
|
|
11759
11567
|
if (!itemContext) throw new Error("CarouselContent missing context");
|
|
11760
11568
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11761
11569
|
"div",
|
|
@@ -11774,7 +11582,7 @@ var CarouselContent = React41__namespace.forwardRef(
|
|
|
11774
11582
|
}
|
|
11775
11583
|
);
|
|
11776
11584
|
CarouselContent.displayName = "CarouselContent";
|
|
11777
|
-
var Pagination =
|
|
11585
|
+
var Pagination = React42__namespace.forwardRef(
|
|
11778
11586
|
({ className, ...props }, ref) => {
|
|
11779
11587
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props });
|
|
11780
11588
|
}
|
|
@@ -11782,10 +11590,12 @@ var Pagination = React41__namespace.forwardRef(
|
|
|
11782
11590
|
Pagination.displayName = "Pagination";
|
|
11783
11591
|
var Callout = () => /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11784
11592
|
var Steps = () => /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11593
|
+
var FileTree = () => {
|
|
11594
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11595
|
+
};
|
|
11596
|
+
var IconSystem = () => {
|
|
11597
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
11598
|
+
};
|
|
11789
11599
|
|
|
11790
11600
|
// ../react-skip-to-content/dist/index.js
|
|
11791
11601
|
var SkipToContent = () => {
|
|
@@ -11803,7 +11613,7 @@ function createLinkCard(_props = {}) {
|
|
|
11803
11613
|
dataAttributes: { "data-slot": "link-card" }
|
|
11804
11614
|
};
|
|
11805
11615
|
}
|
|
11806
|
-
var LinkCard =
|
|
11616
|
+
var LinkCard = React42__namespace.forwardRef(
|
|
11807
11617
|
({ className, ...props }, ref) => {
|
|
11808
11618
|
const api = createLinkCard(props);
|
|
11809
11619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11825,7 +11635,7 @@ function createCardGrid(_props = {}) {
|
|
|
11825
11635
|
dataAttributes: { "data-slot": "card-grid" }
|
|
11826
11636
|
};
|
|
11827
11637
|
}
|
|
11828
|
-
var CardGrid =
|
|
11638
|
+
var CardGrid = React42__namespace.forwardRef(
|
|
11829
11639
|
({ className, columns = 3, ...props }, ref) => {
|
|
11830
11640
|
const api = createCardGrid({ });
|
|
11831
11641
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11850,7 +11660,7 @@ function createPayment(props = {}) {
|
|
|
11850
11660
|
}
|
|
11851
11661
|
};
|
|
11852
11662
|
}
|
|
11853
|
-
var Payment =
|
|
11663
|
+
var Payment = React42__namespace.forwardRef(
|
|
11854
11664
|
({ className, disabled, ...props }, ref) => {
|
|
11855
11665
|
const api = createPayment({ disabled });
|
|
11856
11666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11869,27 +11679,27 @@ var Payment = React41__namespace.forwardRef(
|
|
|
11869
11679
|
}
|
|
11870
11680
|
);
|
|
11871
11681
|
Payment.displayName = "Payment";
|
|
11872
|
-
var PaymentHeader =
|
|
11682
|
+
var PaymentHeader = React42__namespace.forwardRef(
|
|
11873
11683
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-6 flex flex-col gap-1.5", className), ...props })
|
|
11874
11684
|
);
|
|
11875
11685
|
PaymentHeader.displayName = "PaymentHeader";
|
|
11876
|
-
var PaymentTitle =
|
|
11686
|
+
var PaymentTitle = React42__namespace.forwardRef(
|
|
11877
11687
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("text-xl font-semibold leading-none tracking-tight", className), ...props })
|
|
11878
11688
|
);
|
|
11879
11689
|
PaymentTitle.displayName = "PaymentTitle";
|
|
11880
|
-
var PaymentDescription =
|
|
11690
|
+
var PaymentDescription = React42__namespace.forwardRef(
|
|
11881
11691
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
11882
11692
|
);
|
|
11883
11693
|
PaymentDescription.displayName = "PaymentDescription";
|
|
11884
|
-
var PaymentContent =
|
|
11694
|
+
var PaymentContent = React42__namespace.forwardRef(
|
|
11885
11695
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col gap-4", className), ...props })
|
|
11886
11696
|
);
|
|
11887
11697
|
PaymentContent.displayName = "PaymentContent";
|
|
11888
|
-
var PaymentFooter =
|
|
11698
|
+
var PaymentFooter = React42__namespace.forwardRef(
|
|
11889
11699
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mt-6 flex flex-col gap-3", className), ...props })
|
|
11890
11700
|
);
|
|
11891
11701
|
PaymentFooter.displayName = "PaymentFooter";
|
|
11892
|
-
var PaymentButton =
|
|
11702
|
+
var PaymentButton = React42__namespace.forwardRef(
|
|
11893
11703
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11894
11704
|
"button",
|
|
11895
11705
|
{
|
|
@@ -11908,6 +11718,7 @@ exports.Accordion = Accordion;
|
|
|
11908
11718
|
exports.AccordionContent = AccordionContent;
|
|
11909
11719
|
exports.AccordionItem = AccordionItem;
|
|
11910
11720
|
exports.AccordionTrigger = AccordionTrigger;
|
|
11721
|
+
exports.AltHintState = AltHintState;
|
|
11911
11722
|
exports.AnimatedText = AnimatedText;
|
|
11912
11723
|
exports.AppShell = AppShell;
|
|
11913
11724
|
exports.AuthGuard = AuthGuard;
|
|
@@ -11973,8 +11784,10 @@ exports.EMOJI_DATA = EMOJI_DATA;
|
|
|
11973
11784
|
exports.EmojiPicker = EmojiPicker;
|
|
11974
11785
|
exports.FeedbackButton = FeedbackButton;
|
|
11975
11786
|
exports.FeedbackDialog = FeedbackDialog;
|
|
11787
|
+
exports.FileTree = FileTree;
|
|
11976
11788
|
exports.FileUpload = FileUpload;
|
|
11977
11789
|
exports.Footer = Footer;
|
|
11790
|
+
exports.IconSystem = IconSystem;
|
|
11978
11791
|
exports.InlineEditor = InlineEditor;
|
|
11979
11792
|
exports.Input = Input;
|
|
11980
11793
|
exports.InputGroup = InputGroup;
|
|
@@ -12008,6 +11821,7 @@ exports.ReactionBar = ReactionBar;
|
|
|
12008
11821
|
exports.ResizableDivider = ResizableDivider;
|
|
12009
11822
|
exports.ResizableLayout = ResizableLayout;
|
|
12010
11823
|
exports.ResizablePane = ResizablePane;
|
|
11824
|
+
exports.SANE_DEFAULTS = SANE_DEFAULTS;
|
|
12011
11825
|
exports.STATUS_COLORS = STATUS_COLORS2;
|
|
12012
11826
|
exports.STATUS_LABELS = STATUS_LABELS2;
|
|
12013
11827
|
exports.SearchBar = SearchBar;
|
|
@@ -12018,6 +11832,10 @@ exports.SelectContent = SelectContent;
|
|
|
12018
11832
|
exports.SelectItem = SelectItem;
|
|
12019
11833
|
exports.SelectTrigger = SelectTrigger;
|
|
12020
11834
|
exports.ShortcutBadge = ShortcutBadge;
|
|
11835
|
+
exports.ShortcutContext = ShortcutContext;
|
|
11836
|
+
exports.ShortcutHint = ShortcutHint;
|
|
11837
|
+
exports.ShortcutProvider = ShortcutProvider;
|
|
11838
|
+
exports.ShortcutRegistry = ShortcutRegistry;
|
|
12021
11839
|
exports.Sidebar = Sidebar;
|
|
12022
11840
|
exports.Skeleton = Skeleton;
|
|
12023
11841
|
exports.SkeletonText = SkeletonText;
|
|
@@ -12046,6 +11864,7 @@ exports.TooltipTrigger = TooltipTrigger;
|
|
|
12046
11864
|
exports.TypewriterText = TypewriterText;
|
|
12047
11865
|
exports.VersionSelector = VersionSelector;
|
|
12048
11866
|
exports.VideoPlayer = VideoPlayer;
|
|
11867
|
+
exports.altHintState = altHintState;
|
|
12049
11868
|
exports.animatedTextVariants = animatedTextVariants;
|
|
12050
11869
|
exports.avatarFallbackVariants = avatarFallbackVariants;
|
|
12051
11870
|
exports.avatarImageVariants = avatarImageVariants;
|
|
@@ -12103,6 +11922,7 @@ exports.formatTimestamp = formatTimestamp;
|
|
|
12103
11922
|
exports.getAssignableRoles = getAssignableRoles;
|
|
12104
11923
|
exports.getDefaultPortal = getDefaultPortal;
|
|
12105
11924
|
exports.getInitials = getInitials;
|
|
11925
|
+
exports.globalShortcutRegistry = globalShortcutRegistry;
|
|
12106
11926
|
exports.hasAllRoles = hasAllRoles;
|
|
12107
11927
|
exports.hasAnyRole = hasAnyRole;
|
|
12108
11928
|
exports.hasRole = hasRole;
|
|
@@ -12192,6 +12012,7 @@ exports.toolbarVariants = toolbarVariants;
|
|
|
12192
12012
|
exports.tooltipContentVariants = tooltipContentVariants;
|
|
12193
12013
|
exports.typewriterVariants = typewriterVariants;
|
|
12194
12014
|
exports.useAuth = useAuth;
|
|
12015
|
+
exports.useShortcut = useShortcut;
|
|
12195
12016
|
exports.useTheme = useTheme;
|
|
12196
12017
|
exports.useToast = useToast;
|
|
12197
12018
|
exports.versionSelectorOptionVariants = optionVariants2;
|