@fea-ui/react 0.0.1-canary.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +586 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1644 -1033
- package/dist/index.d.mts +1184 -573
- package/dist/index.mjs +579 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn, cn as cn$1, tv } from "tailwind-variants";
|
|
2
|
-
import { Accordion, AlertDialog, Avatar, Button, Checkbox, CheckboxGroup, Collapsible, Combobox, Dialog, Field, Fieldset, Form, Input, Menu, Meter, NavigationMenu, Popover, Progress, Radio, RadioGroup, Select, Separator, Slider, Switch, Tabs,
|
|
3
|
-
import { Check, ChevronDown, ChevronsUpDown, LucideAlertTriangle, LucideCheck, LucideCheckCircle, LucideChevronDown, LucideChevronUp, LucideInfo, LucideLoader, LucideMenu, LucidePanelLeftClose, LucidePanelLeftOpen, LucideX, LucideXCircle, X } from "lucide-react";
|
|
3
|
+
import { Accordion, AlertDialog, Autocomplete, Avatar, Button, Checkbox, CheckboxGroup, Collapsible, Combobox, ContextMenu, Dialog, Field, Fieldset, Form, Input, Menu, Meter, NavigationMenu, NumberField, Popover, PreviewCard, Progress, Radio, RadioGroup, ScrollArea, Select, Separator, Slider, Switch, Tabs, Toggle, Tooltip } from "@base-ui/react";
|
|
4
|
+
import { Check, ChevronDown, ChevronsUpDown, LucideAlertTriangle, LucideCheck, LucideCheckCircle, LucideChevronDown, LucideChevronUp, LucideChevronsLeftRight, LucideInfo, LucideLoader, LucideMenu, LucideMinus, LucidePanelLeftClose, LucidePanelLeftOpen, LucidePlus, LucideX, LucideXCircle, X } from "lucide-react";
|
|
4
5
|
import React, { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
|
|
@@ -290,6 +291,195 @@ var alert_dialog_default = Object.assign(AlertDialog$1, {
|
|
|
290
291
|
Viewport: AlertDialogViewport
|
|
291
292
|
});
|
|
292
293
|
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region src/components/autocomplete/autocomplete.context.ts
|
|
296
|
+
const AutocompleteContext = createContext(null);
|
|
297
|
+
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/components/autocomplete/autocomplete.variants.ts
|
|
300
|
+
/** biome-ignore-all assist/source/useSortedKeys: <> */
|
|
301
|
+
const autocompleteVariants = tv({ slots: {
|
|
302
|
+
root: "autcomplete",
|
|
303
|
+
input: "autocomplete__input",
|
|
304
|
+
trigger: "autocomplete__trigger",
|
|
305
|
+
icon: "autocomplete__icon",
|
|
306
|
+
clear: "autocomplete__clear",
|
|
307
|
+
value: "autocomplete__value",
|
|
308
|
+
portal: "autocomplete__portal",
|
|
309
|
+
backdrop: "autocomplete__backdrop",
|
|
310
|
+
positioner: "autocomplete__positioner",
|
|
311
|
+
popup: "autocomplete__popup",
|
|
312
|
+
arrow: "autocomplete__arrow",
|
|
313
|
+
status: "autocomplete__status",
|
|
314
|
+
empty: "autocomplete__empty",
|
|
315
|
+
list: "autocomplete__list",
|
|
316
|
+
row: "autocomplete__row",
|
|
317
|
+
item: "autocomplete__item",
|
|
318
|
+
separator: "autocomplete__separator",
|
|
319
|
+
group: "autocomplete__group",
|
|
320
|
+
groupLabel: "autocomplete__group-label"
|
|
321
|
+
} });
|
|
322
|
+
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/components/autocomplete/use-autocomplete.ts
|
|
325
|
+
const useAutocomplete = () => {
|
|
326
|
+
const context = useContext(AutocompleteContext);
|
|
327
|
+
if (!context) throw new Error("useAutocomplete must be used within a AutocompleteProvider");
|
|
328
|
+
return context;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/components/autocomplete/autocomplete.tsx
|
|
333
|
+
const Autocomplete$1 = ({ ...props }) => {
|
|
334
|
+
return /* @__PURE__ */ jsx(AutocompleteContext, {
|
|
335
|
+
value: { slots: useMemo(() => autocompleteVariants(), []) },
|
|
336
|
+
children: /* @__PURE__ */ jsx(Autocomplete.Root, { ...props })
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
const AutocompleteTrigger = ({ className, ...props }) => {
|
|
340
|
+
const { slots } = useAutocomplete();
|
|
341
|
+
return /* @__PURE__ */ jsx(Autocomplete.Trigger, {
|
|
342
|
+
className: cn$1(slots.trigger(), className),
|
|
343
|
+
...props
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
const AutocompleteInput = ({ className, ...props }) => {
|
|
347
|
+
const { slots } = useAutocomplete();
|
|
348
|
+
return /* @__PURE__ */ jsx(Autocomplete.Input, {
|
|
349
|
+
className: cn$1(slots.input(), className),
|
|
350
|
+
...props
|
|
351
|
+
});
|
|
352
|
+
};
|
|
353
|
+
const AutocompleteIcon = ({ className, ...props }) => {
|
|
354
|
+
const { slots } = useAutocomplete();
|
|
355
|
+
return /* @__PURE__ */ jsx(Autocomplete.Icon, {
|
|
356
|
+
className: cn$1(slots.icon(), className),
|
|
357
|
+
...props
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
const AutocompleteClear = ({ className, ...props }) => {
|
|
361
|
+
const { slots } = useAutocomplete();
|
|
362
|
+
return /* @__PURE__ */ jsx(Autocomplete.Clear, {
|
|
363
|
+
className: cn$1(slots.clear(), className),
|
|
364
|
+
...props
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
const AutocompleteValue = ({ ...props }) => {
|
|
368
|
+
return /* @__PURE__ */ jsx(Autocomplete.Value, { ...props });
|
|
369
|
+
};
|
|
370
|
+
const AutocompletePortal = ({ className, ...props }) => {
|
|
371
|
+
const { slots } = useAutocomplete();
|
|
372
|
+
return /* @__PURE__ */ jsx(Autocomplete.Portal, {
|
|
373
|
+
className: cn$1(slots.portal(), className),
|
|
374
|
+
...props
|
|
375
|
+
});
|
|
376
|
+
};
|
|
377
|
+
const AutocompleteBackdrop = ({ className, ...props }) => {
|
|
378
|
+
const { slots } = useAutocomplete();
|
|
379
|
+
return /* @__PURE__ */ jsx(Autocomplete.Backdrop, {
|
|
380
|
+
className: cn$1(slots.backdrop(), className),
|
|
381
|
+
...props
|
|
382
|
+
});
|
|
383
|
+
};
|
|
384
|
+
const AutocompletePositioner = ({ className, ...props }) => {
|
|
385
|
+
const { slots } = useAutocomplete();
|
|
386
|
+
return /* @__PURE__ */ jsx(Autocomplete.Positioner, {
|
|
387
|
+
className: cn$1(slots.positioner(), className),
|
|
388
|
+
...props
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
const AutocompletePopup = ({ className, ...props }) => {
|
|
392
|
+
const { slots } = useAutocomplete();
|
|
393
|
+
return /* @__PURE__ */ jsx(Autocomplete.Popup, {
|
|
394
|
+
className: cn$1(slots.popup(), className),
|
|
395
|
+
...props
|
|
396
|
+
});
|
|
397
|
+
};
|
|
398
|
+
const AutocompleteArrow = ({ className, ...props }) => {
|
|
399
|
+
const { slots } = useAutocomplete();
|
|
400
|
+
return /* @__PURE__ */ jsx(Autocomplete.Arrow, {
|
|
401
|
+
className: cn$1(slots.arrow(), className),
|
|
402
|
+
...props
|
|
403
|
+
});
|
|
404
|
+
};
|
|
405
|
+
const AutocompleteStatus = ({ className, ...props }) => {
|
|
406
|
+
const { slots } = useAutocomplete();
|
|
407
|
+
return /* @__PURE__ */ jsx(Autocomplete.Status, {
|
|
408
|
+
className: cn$1(slots.status(), className),
|
|
409
|
+
...props
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
const AutocompleteEmpty = ({ className, ...props }) => {
|
|
413
|
+
const { slots } = useAutocomplete();
|
|
414
|
+
return /* @__PURE__ */ jsx(Autocomplete.Empty, {
|
|
415
|
+
className: cn$1(slots.empty(), className),
|
|
416
|
+
...props
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
const AutocompleteList = ({ className, ...props }) => {
|
|
420
|
+
const { slots } = useAutocomplete();
|
|
421
|
+
return /* @__PURE__ */ jsx(Autocomplete.List, {
|
|
422
|
+
className: cn$1(slots.list(), className),
|
|
423
|
+
...props
|
|
424
|
+
});
|
|
425
|
+
};
|
|
426
|
+
const AutocompleteRow = ({ className, ...props }) => {
|
|
427
|
+
const { slots } = useAutocomplete();
|
|
428
|
+
return /* @__PURE__ */ jsx(Autocomplete.Row, {
|
|
429
|
+
className: cn$1(slots.row(), className),
|
|
430
|
+
...props
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
const AutocompleteItem = ({ className, ...props }) => {
|
|
434
|
+
const { slots } = useAutocomplete();
|
|
435
|
+
return /* @__PURE__ */ jsx(Autocomplete.Item, {
|
|
436
|
+
className: cn$1(slots.item(), className),
|
|
437
|
+
...props
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
const AutocompleteSeparator = ({ className, ...props }) => {
|
|
441
|
+
const { slots } = useAutocomplete();
|
|
442
|
+
return /* @__PURE__ */ jsx(Autocomplete.Separator, {
|
|
443
|
+
className: cn$1(slots.separator(), className),
|
|
444
|
+
...props
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
const AutocompleteGroup = ({ className, ...props }) => {
|
|
448
|
+
const { slots } = useAutocomplete();
|
|
449
|
+
return /* @__PURE__ */ jsx(Autocomplete.Group, {
|
|
450
|
+
className: cn$1(slots.group(), className),
|
|
451
|
+
...props
|
|
452
|
+
});
|
|
453
|
+
};
|
|
454
|
+
const AutocompleteGroupLabel = ({ className, ...props }) => {
|
|
455
|
+
const { slots } = useAutocomplete();
|
|
456
|
+
return /* @__PURE__ */ jsx(Autocomplete.GroupLabel, {
|
|
457
|
+
className: cn$1(slots.groupLabel(), className),
|
|
458
|
+
...props
|
|
459
|
+
});
|
|
460
|
+
};
|
|
461
|
+
var autocomplete_default = Object.assign(Autocomplete$1, {
|
|
462
|
+
Arrow: AutocompleteArrow,
|
|
463
|
+
Backdrop: AutocompleteBackdrop,
|
|
464
|
+
Clear: AutocompleteClear,
|
|
465
|
+
Empty: AutocompleteEmpty,
|
|
466
|
+
Group: AutocompleteGroup,
|
|
467
|
+
GroupLabel: AutocompleteGroupLabel,
|
|
468
|
+
Icon: AutocompleteIcon,
|
|
469
|
+
Input: AutocompleteInput,
|
|
470
|
+
Item: AutocompleteItem,
|
|
471
|
+
List: AutocompleteList,
|
|
472
|
+
Popup: AutocompletePopup,
|
|
473
|
+
Portal: AutocompletePortal,
|
|
474
|
+
Positioner: AutocompletePositioner,
|
|
475
|
+
Root: Autocomplete$1,
|
|
476
|
+
Row: AutocompleteRow,
|
|
477
|
+
Separator: AutocompleteSeparator,
|
|
478
|
+
Status: AutocompleteStatus,
|
|
479
|
+
Trigger: AutocompleteTrigger,
|
|
480
|
+
Value: AutocompleteValue
|
|
481
|
+
});
|
|
482
|
+
|
|
293
483
|
//#endregion
|
|
294
484
|
//#region src/components/avatar/avatar.context.ts
|
|
295
485
|
const AvatarContext = createContext(null);
|
|
@@ -819,7 +1009,7 @@ const ComboboxItemIndicator = ({ className, children, ...props }) => {
|
|
|
819
1009
|
return /* @__PURE__ */ jsx(Combobox.ItemIndicator, {
|
|
820
1010
|
className: cn$1(slots.itemIndicator(), className),
|
|
821
1011
|
...props,
|
|
822
|
-
children: children
|
|
1012
|
+
children: children ?? /* @__PURE__ */ jsx(Check, {})
|
|
823
1013
|
});
|
|
824
1014
|
};
|
|
825
1015
|
const ComboboxItem = ({ className, children, ...props }) => {
|
|
@@ -890,6 +1080,143 @@ const Container = ({ className, ...props }) => {
|
|
|
890
1080
|
};
|
|
891
1081
|
var container_default = Container;
|
|
892
1082
|
|
|
1083
|
+
//#endregion
|
|
1084
|
+
//#region src/components/context-menu/context-menu.context.ts
|
|
1085
|
+
const ContextMenuContext = createContext(null);
|
|
1086
|
+
|
|
1087
|
+
//#endregion
|
|
1088
|
+
//#region src/components/context-menu/context-menu.variants.ts
|
|
1089
|
+
/** biome-ignore-all assist/source/useSortedKeys: <> */
|
|
1090
|
+
const contextMenuVariants = tv({ slots: {
|
|
1091
|
+
root: "context-menu",
|
|
1092
|
+
trigger: "context-menu__trigger",
|
|
1093
|
+
portal: "context-menu__portal",
|
|
1094
|
+
backdrop: "context-menu__backdrop",
|
|
1095
|
+
positioner: "context-menu__positioner",
|
|
1096
|
+
popup: "context-menu__popup",
|
|
1097
|
+
arrow: "context-menu__arrow",
|
|
1098
|
+
item: "context-menu__item",
|
|
1099
|
+
separator: "context-menu__separator",
|
|
1100
|
+
group: "context-menu__group",
|
|
1101
|
+
groupLabel: "context-menu__group-label",
|
|
1102
|
+
submenu: "context-menu__submenu",
|
|
1103
|
+
submenuTrigger: "context-menu__submenu-trigger"
|
|
1104
|
+
} });
|
|
1105
|
+
|
|
1106
|
+
//#endregion
|
|
1107
|
+
//#region src/components/context-menu/use-context-menu.ts
|
|
1108
|
+
const useContextMenu = () => {
|
|
1109
|
+
const context = useContext(ContextMenuContext);
|
|
1110
|
+
if (!context) throw new Error("useContextMenu must be used within a ContextMenuProvider");
|
|
1111
|
+
return context;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
//#endregion
|
|
1115
|
+
//#region src/components/context-menu/context-menu.tsx
|
|
1116
|
+
const ContextMenu$1 = ({ ...props }) => {
|
|
1117
|
+
const slots = useMemo(() => contextMenuVariants(), []);
|
|
1118
|
+
return /* @__PURE__ */ jsx(ContextMenuContext.Provider, {
|
|
1119
|
+
value: { slots },
|
|
1120
|
+
children: /* @__PURE__ */ jsx(ContextMenu.Root, { ...props })
|
|
1121
|
+
});
|
|
1122
|
+
};
|
|
1123
|
+
const ContextMenuTrigger = ({ className, ...props }) => {
|
|
1124
|
+
const { slots } = useContextMenu();
|
|
1125
|
+
return /* @__PURE__ */ jsx(ContextMenu.Trigger, {
|
|
1126
|
+
className: cn$1(slots.trigger(), className),
|
|
1127
|
+
...props
|
|
1128
|
+
});
|
|
1129
|
+
};
|
|
1130
|
+
const ContextMenuPortal = ({ className, ...props }) => {
|
|
1131
|
+
const { slots } = useContextMenu();
|
|
1132
|
+
return /* @__PURE__ */ jsx(ContextMenu.Portal, {
|
|
1133
|
+
className: cn$1(slots.portal(), className),
|
|
1134
|
+
...props
|
|
1135
|
+
});
|
|
1136
|
+
};
|
|
1137
|
+
const ContextMenuBackdrop = ({ className, ...props }) => {
|
|
1138
|
+
const { slots } = useContextMenu();
|
|
1139
|
+
return /* @__PURE__ */ jsx(ContextMenu.Backdrop, {
|
|
1140
|
+
className: cn$1(slots.backdrop(), className),
|
|
1141
|
+
...props
|
|
1142
|
+
});
|
|
1143
|
+
};
|
|
1144
|
+
const ContextMenuPositioner = ({ className, ...props }) => {
|
|
1145
|
+
const { slots } = useContextMenu();
|
|
1146
|
+
return /* @__PURE__ */ jsx(ContextMenu.Positioner, {
|
|
1147
|
+
className: cn$1(slots.positioner(), className),
|
|
1148
|
+
...props
|
|
1149
|
+
});
|
|
1150
|
+
};
|
|
1151
|
+
const ContextMenuPopup = ({ className, ...props }) => {
|
|
1152
|
+
const { slots } = useContextMenu();
|
|
1153
|
+
return /* @__PURE__ */ jsx(ContextMenu.Popup, {
|
|
1154
|
+
className: cn$1(slots.popup(), className),
|
|
1155
|
+
...props
|
|
1156
|
+
});
|
|
1157
|
+
};
|
|
1158
|
+
const ContextMenuArrow = ({ className, ...props }) => {
|
|
1159
|
+
const { slots } = useContextMenu();
|
|
1160
|
+
return /* @__PURE__ */ jsx(ContextMenu.Arrow, {
|
|
1161
|
+
className: cn$1(slots.arrow(), className),
|
|
1162
|
+
...props
|
|
1163
|
+
});
|
|
1164
|
+
};
|
|
1165
|
+
const ContextMenuItem = ({ className, ...props }) => {
|
|
1166
|
+
const { slots } = useContextMenu();
|
|
1167
|
+
return /* @__PURE__ */ jsx(ContextMenu.Item, {
|
|
1168
|
+
className: cn$1(slots.item(), className),
|
|
1169
|
+
...props
|
|
1170
|
+
});
|
|
1171
|
+
};
|
|
1172
|
+
const ContextMenuSeparator = ({ className, ...props }) => {
|
|
1173
|
+
const { slots } = useContextMenu();
|
|
1174
|
+
return /* @__PURE__ */ jsx(ContextMenu.Separator, {
|
|
1175
|
+
className: cn$1(slots.separator(), className),
|
|
1176
|
+
...props
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
const ContextMenuGroup = ({ className, ...props }) => {
|
|
1180
|
+
const { slots } = useContextMenu();
|
|
1181
|
+
return /* @__PURE__ */ jsx(ContextMenu.Group, {
|
|
1182
|
+
className: cn$1(slots.group(), className),
|
|
1183
|
+
...props
|
|
1184
|
+
});
|
|
1185
|
+
};
|
|
1186
|
+
const ContextMenuGroupLabel = ({ className, ...props }) => {
|
|
1187
|
+
const { slots } = useContextMenu();
|
|
1188
|
+
return /* @__PURE__ */ jsx(ContextMenu.GroupLabel, {
|
|
1189
|
+
className: cn$1(slots.groupLabel(), className),
|
|
1190
|
+
...props
|
|
1191
|
+
});
|
|
1192
|
+
};
|
|
1193
|
+
const ContextMenuSubmenu = ({ ...props }) => {
|
|
1194
|
+
return /* @__PURE__ */ jsx(ContextMenu.SubmenuRoot, { ...props });
|
|
1195
|
+
};
|
|
1196
|
+
const ContextMenuSubmenuTrigger = ({ className, children, ...props }) => {
|
|
1197
|
+
const { slots } = useContextMenu();
|
|
1198
|
+
return /* @__PURE__ */ jsx(ContextMenu.SubmenuTrigger, {
|
|
1199
|
+
className: cn$1(slots.submenuTrigger(), className),
|
|
1200
|
+
...props,
|
|
1201
|
+
children
|
|
1202
|
+
});
|
|
1203
|
+
};
|
|
1204
|
+
var context_menu_default = Object.assign(ContextMenu$1, {
|
|
1205
|
+
Arrow: ContextMenuArrow,
|
|
1206
|
+
Backdrop: ContextMenuBackdrop,
|
|
1207
|
+
Group: ContextMenuGroup,
|
|
1208
|
+
GroupLabel: ContextMenuGroupLabel,
|
|
1209
|
+
Item: ContextMenuItem,
|
|
1210
|
+
Popup: ContextMenuPopup,
|
|
1211
|
+
Portal: ContextMenuPortal,
|
|
1212
|
+
Positioner: ContextMenuPositioner,
|
|
1213
|
+
Root: ContextMenu$1,
|
|
1214
|
+
Separator: ContextMenuSeparator,
|
|
1215
|
+
SubmenuRoot: ContextMenuSubmenu,
|
|
1216
|
+
SubmenuTrigger: ContextMenuSubmenuTrigger,
|
|
1217
|
+
Trigger: ContextMenuTrigger
|
|
1218
|
+
});
|
|
1219
|
+
|
|
893
1220
|
//#endregion
|
|
894
1221
|
//#region src/components/dialog/dialog.context.ts
|
|
895
1222
|
const DialogContext = createContext(null);
|
|
@@ -1887,6 +2214,97 @@ var navigation_menu_default = Object.assign(NavigationMenu$1, {
|
|
|
1887
2214
|
Viewport: NavigationMenuViewport
|
|
1888
2215
|
});
|
|
1889
2216
|
|
|
2217
|
+
//#endregion
|
|
2218
|
+
//#region src/components/number-field/number-field.context.ts
|
|
2219
|
+
const NumberFieldContext = createContext(null);
|
|
2220
|
+
|
|
2221
|
+
//#endregion
|
|
2222
|
+
//#region src/components/number-field/number-field.variants.ts
|
|
2223
|
+
const numberFieldVariants = tv({ slots: {
|
|
2224
|
+
decrement: "number-field__decrement",
|
|
2225
|
+
group: "number-field__group",
|
|
2226
|
+
increment: "number-field__increment",
|
|
2227
|
+
input: "number-field__input",
|
|
2228
|
+
root: "number-field",
|
|
2229
|
+
scrubArea: "number-field__scrub-area",
|
|
2230
|
+
scrubAreaCursor: "number-field__scrub-area-cursor"
|
|
2231
|
+
} });
|
|
2232
|
+
|
|
2233
|
+
//#endregion
|
|
2234
|
+
//#region src/components/number-field/use-number-field.ts
|
|
2235
|
+
const useNumberField = () => {
|
|
2236
|
+
const context = useContext(NumberFieldContext);
|
|
2237
|
+
if (!context) throw new Error("useNumberField must be used within a NumberFieldProvider");
|
|
2238
|
+
return context;
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
//#endregion
|
|
2242
|
+
//#region src/components/number-field/number-field.tsx
|
|
2243
|
+
const NumberField$1 = ({ className, ...props }) => {
|
|
2244
|
+
const slots = useMemo(() => numberFieldVariants(), []);
|
|
2245
|
+
return /* @__PURE__ */ jsx(NumberFieldContext, {
|
|
2246
|
+
value: { slots },
|
|
2247
|
+
children: /* @__PURE__ */ jsx(NumberField.Root, {
|
|
2248
|
+
className: cn$1(className, slots.root()),
|
|
2249
|
+
...props
|
|
2250
|
+
})
|
|
2251
|
+
});
|
|
2252
|
+
};
|
|
2253
|
+
const NumberFieldScrubArea = ({ className, ...props }) => {
|
|
2254
|
+
const { slots } = useNumberField();
|
|
2255
|
+
return /* @__PURE__ */ jsx(NumberField.ScrubArea, {
|
|
2256
|
+
className: cn$1(slots.scrubArea(), className),
|
|
2257
|
+
...props
|
|
2258
|
+
});
|
|
2259
|
+
};
|
|
2260
|
+
const NumberFieldGroup = ({ className, ...props }) => {
|
|
2261
|
+
const { slots } = useNumberField();
|
|
2262
|
+
return /* @__PURE__ */ jsx(NumberField.Group, {
|
|
2263
|
+
className: cn$1(slots.group(), className),
|
|
2264
|
+
...props
|
|
2265
|
+
});
|
|
2266
|
+
};
|
|
2267
|
+
const NumberFieldScrubAreaCursor = ({ className, children, ...props }) => {
|
|
2268
|
+
const { slots } = useNumberField();
|
|
2269
|
+
return /* @__PURE__ */ jsx(NumberField.ScrubAreaCursor, {
|
|
2270
|
+
className: cn$1(slots.scrubAreaCursor(), className),
|
|
2271
|
+
...props,
|
|
2272
|
+
children: children ?? /* @__PURE__ */ jsx(LucideChevronsLeftRight, {})
|
|
2273
|
+
});
|
|
2274
|
+
};
|
|
2275
|
+
const NumberFieldDecrement = ({ className, children, ...props }) => {
|
|
2276
|
+
const { slots } = useNumberField();
|
|
2277
|
+
return /* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
2278
|
+
className: cn$1(slots.decrement(), className),
|
|
2279
|
+
...props,
|
|
2280
|
+
children: children ?? /* @__PURE__ */ jsx(LucideMinus, {})
|
|
2281
|
+
});
|
|
2282
|
+
};
|
|
2283
|
+
const NumberFieldInput = ({ className, ...props }) => {
|
|
2284
|
+
const { slots } = useNumberField();
|
|
2285
|
+
return /* @__PURE__ */ jsx(NumberField.Input, {
|
|
2286
|
+
className: cn$1(slots.input(), className),
|
|
2287
|
+
...props
|
|
2288
|
+
});
|
|
2289
|
+
};
|
|
2290
|
+
const NumberFieldIncrement = ({ className, children, ...props }) => {
|
|
2291
|
+
const { slots } = useNumberField();
|
|
2292
|
+
return /* @__PURE__ */ jsx(NumberField.Increment, {
|
|
2293
|
+
className: cn$1(slots.increment(), className),
|
|
2294
|
+
...props,
|
|
2295
|
+
children: children ?? /* @__PURE__ */ jsx(LucidePlus, {})
|
|
2296
|
+
});
|
|
2297
|
+
};
|
|
2298
|
+
var number_field_default = Object.assign(NumberField$1, {
|
|
2299
|
+
Decrement: NumberFieldDecrement,
|
|
2300
|
+
Group: NumberFieldGroup,
|
|
2301
|
+
Increment: NumberFieldIncrement,
|
|
2302
|
+
Input: NumberFieldInput,
|
|
2303
|
+
Root: NumberField$1,
|
|
2304
|
+
ScrubArea: NumberFieldScrubArea,
|
|
2305
|
+
ScrubAreaCursor: NumberFieldScrubAreaCursor
|
|
2306
|
+
});
|
|
2307
|
+
|
|
1890
2308
|
//#endregion
|
|
1891
2309
|
//#region src/components/popover/popover.context.ts
|
|
1892
2310
|
const PopoverContext = createContext(null);
|
|
@@ -2009,6 +2427,91 @@ var popover_default = Object.assign(Popover$1, {
|
|
|
2009
2427
|
Viewport: PopoverViewport
|
|
2010
2428
|
});
|
|
2011
2429
|
|
|
2430
|
+
//#endregion
|
|
2431
|
+
//#region src/components/preview-card/preview-card.context.ts
|
|
2432
|
+
const PreviewCardContext = createContext(null);
|
|
2433
|
+
|
|
2434
|
+
//#endregion
|
|
2435
|
+
//#region src/components/preview-card/preview-card.variants.ts
|
|
2436
|
+
/** biome-ignore-all assist/source/useSortedKeys: <> */
|
|
2437
|
+
const previewCardVariants = tv({ slots: {
|
|
2438
|
+
root: "preview-card",
|
|
2439
|
+
trigger: "preview-card__trigger",
|
|
2440
|
+
portal: "preview-card__portal",
|
|
2441
|
+
backdrop: "preview-card__backdrop",
|
|
2442
|
+
positioner: "preview-card__positioner",
|
|
2443
|
+
popup: "preview-card__popup",
|
|
2444
|
+
arrow: "preview-card__arrow"
|
|
2445
|
+
} });
|
|
2446
|
+
|
|
2447
|
+
//#endregion
|
|
2448
|
+
//#region src/components/preview-card/use-preview-card.ts
|
|
2449
|
+
const usePreviewCard = () => {
|
|
2450
|
+
const context = useContext(PreviewCardContext);
|
|
2451
|
+
if (!context) throw new Error("usePreviewCard must be used within a PreviewCardProvider");
|
|
2452
|
+
return context;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
//#endregion
|
|
2456
|
+
//#region src/components/preview-card/preview-card.tsx
|
|
2457
|
+
const PreviewCard$1 = ({ ...props }) => {
|
|
2458
|
+
return /* @__PURE__ */ jsx(PreviewCardContext, {
|
|
2459
|
+
value: { slots: useMemo(() => previewCardVariants(), []) },
|
|
2460
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Root, { ...props })
|
|
2461
|
+
});
|
|
2462
|
+
};
|
|
2463
|
+
const PreviewCardTrigger = ({ className, ...props }) => {
|
|
2464
|
+
const { slots } = usePreviewCard();
|
|
2465
|
+
return /* @__PURE__ */ jsx(PreviewCard.Trigger, {
|
|
2466
|
+
className: cn$1(slots.trigger(), className),
|
|
2467
|
+
...props
|
|
2468
|
+
});
|
|
2469
|
+
};
|
|
2470
|
+
const PreviewCardPortal = ({ className, ...props }) => {
|
|
2471
|
+
const { slots } = usePreviewCard();
|
|
2472
|
+
return /* @__PURE__ */ jsx(PreviewCard.Portal, {
|
|
2473
|
+
className: cn$1(slots.portal(), className),
|
|
2474
|
+
...props
|
|
2475
|
+
});
|
|
2476
|
+
};
|
|
2477
|
+
const PreviewCardBackdrop = ({ className, ...props }) => {
|
|
2478
|
+
const { slots } = usePreviewCard();
|
|
2479
|
+
return /* @__PURE__ */ jsx(PreviewCard.Backdrop, {
|
|
2480
|
+
className: cn$1(slots.backdrop(), className),
|
|
2481
|
+
...props
|
|
2482
|
+
});
|
|
2483
|
+
};
|
|
2484
|
+
const PreviewCardPositioner = ({ className, ...props }) => {
|
|
2485
|
+
const { slots } = usePreviewCard();
|
|
2486
|
+
return /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
2487
|
+
className: cn$1(slots.positioner(), className),
|
|
2488
|
+
...props
|
|
2489
|
+
});
|
|
2490
|
+
};
|
|
2491
|
+
const PreviewCardPopup = ({ className, ...props }) => {
|
|
2492
|
+
const { slots } = usePreviewCard();
|
|
2493
|
+
return /* @__PURE__ */ jsx(PreviewCard.Popup, {
|
|
2494
|
+
className: cn$1(slots.popup(), className),
|
|
2495
|
+
...props
|
|
2496
|
+
});
|
|
2497
|
+
};
|
|
2498
|
+
const PreviewCardArrow = ({ className, ...props }) => {
|
|
2499
|
+
const { slots } = usePreviewCard();
|
|
2500
|
+
return /* @__PURE__ */ jsx(PreviewCard.Arrow, {
|
|
2501
|
+
className: cn$1(slots.arrow(), className),
|
|
2502
|
+
...props
|
|
2503
|
+
});
|
|
2504
|
+
};
|
|
2505
|
+
var preview_card_default = Object.assign(PreviewCard$1, {
|
|
2506
|
+
Arrow: PreviewCardArrow,
|
|
2507
|
+
Backdrop: PreviewCardBackdrop,
|
|
2508
|
+
Popup: PreviewCardPopup,
|
|
2509
|
+
Portal: PreviewCardPortal,
|
|
2510
|
+
Positioner: PreviewCardPositioner,
|
|
2511
|
+
Root: PreviewCard$1,
|
|
2512
|
+
Trigger: PreviewCardTrigger
|
|
2513
|
+
});
|
|
2514
|
+
|
|
2012
2515
|
//#endregion
|
|
2013
2516
|
//#region src/components/progress/progress.context.ts
|
|
2014
2517
|
const ProgressContext = createContext(null);
|
|
@@ -2158,6 +2661,78 @@ const RadioGroup$1 = ({ className, ...props }) => {
|
|
|
2158
2661
|
};
|
|
2159
2662
|
var radio_group_default = RadioGroup$1;
|
|
2160
2663
|
|
|
2664
|
+
//#endregion
|
|
2665
|
+
//#region src/components/scroll-area/scroll-area.context.ts
|
|
2666
|
+
const ScrollAreaContext = createContext(null);
|
|
2667
|
+
|
|
2668
|
+
//#endregion
|
|
2669
|
+
//#region src/components/scroll-area/scroll-area.variants.ts
|
|
2670
|
+
/** biome-ignore-all assist/source/useSortedKeys: <> */
|
|
2671
|
+
const scrollAreaVariants = tv({ slots: {
|
|
2672
|
+
root: "scroll-area",
|
|
2673
|
+
viewport: "scroll-area__viewport",
|
|
2674
|
+
content: "scroll-area__content",
|
|
2675
|
+
scrollbar: "scroll-area__scrollbar",
|
|
2676
|
+
thumb: "scroll-area__thumb",
|
|
2677
|
+
corner: "scroll-area__corner"
|
|
2678
|
+
} });
|
|
2679
|
+
|
|
2680
|
+
//#endregion
|
|
2681
|
+
//#region src/components/scroll-area/use-scroll-area.ts
|
|
2682
|
+
const useScrollArea = () => {
|
|
2683
|
+
const context = useContext(ScrollAreaContext);
|
|
2684
|
+
if (!context) throw new Error("useScrollArea must be used within a ScrollAreaProvider");
|
|
2685
|
+
return context;
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2688
|
+
//#endregion
|
|
2689
|
+
//#region src/components/scroll-area/scroll-area.tsx
|
|
2690
|
+
const ScrollArea$1 = ({ className, ...props }) => {
|
|
2691
|
+
const slots = useMemo(() => scrollAreaVariants(), []);
|
|
2692
|
+
return /* @__PURE__ */ jsx(ScrollAreaContext.Provider, {
|
|
2693
|
+
value: { slots },
|
|
2694
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Root, {
|
|
2695
|
+
className: cn$1(className, slots.root()),
|
|
2696
|
+
...props
|
|
2697
|
+
})
|
|
2698
|
+
});
|
|
2699
|
+
};
|
|
2700
|
+
const ScrollAreaViewport = ({ className, ...props }) => {
|
|
2701
|
+
const { slots } = useScrollArea();
|
|
2702
|
+
return /* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
2703
|
+
className: cn$1(slots.viewport(), className),
|
|
2704
|
+
...props
|
|
2705
|
+
});
|
|
2706
|
+
};
|
|
2707
|
+
const ScrollAreaContent = ({ className, ...props }) => {
|
|
2708
|
+
const { slots } = useScrollArea();
|
|
2709
|
+
return /* @__PURE__ */ jsx(ScrollArea.Content, {
|
|
2710
|
+
className: cn$1(slots.content(), className),
|
|
2711
|
+
...props
|
|
2712
|
+
});
|
|
2713
|
+
};
|
|
2714
|
+
const ScrollAreaScrollbar = ({ className, ...props }) => {
|
|
2715
|
+
const { slots } = useScrollArea();
|
|
2716
|
+
return /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
2717
|
+
className: cn$1(slots.scrollbar(), className),
|
|
2718
|
+
...props
|
|
2719
|
+
});
|
|
2720
|
+
};
|
|
2721
|
+
const ScrollAreaThumb = ({ className, ...props }) => {
|
|
2722
|
+
const { slots } = useScrollArea();
|
|
2723
|
+
return /* @__PURE__ */ jsx(ScrollArea.Thumb, {
|
|
2724
|
+
className: cn$1(slots.thumb(), className),
|
|
2725
|
+
...props
|
|
2726
|
+
});
|
|
2727
|
+
};
|
|
2728
|
+
var scroll_area_default = Object.assign(ScrollArea$1, {
|
|
2729
|
+
Content: ScrollAreaContent,
|
|
2730
|
+
Root: ScrollArea$1,
|
|
2731
|
+
Scrollbar: ScrollAreaScrollbar,
|
|
2732
|
+
Thumb: ScrollAreaThumb,
|
|
2733
|
+
Viewport: ScrollAreaViewport
|
|
2734
|
+
});
|
|
2735
|
+
|
|
2161
2736
|
//#endregion
|
|
2162
2737
|
//#region src/components/select/select.context.ts
|
|
2163
2738
|
const SelectContext = createContext(null);
|
|
@@ -2804,101 +3379,6 @@ var tabs_default = Object.assign(Tabs$1, {
|
|
|
2804
3379
|
Tab: TabsTab
|
|
2805
3380
|
});
|
|
2806
3381
|
|
|
2807
|
-
//#endregion
|
|
2808
|
-
//#region src/components/toast/toast.context.ts
|
|
2809
|
-
const ToastContext = createContext(null);
|
|
2810
|
-
|
|
2811
|
-
//#endregion
|
|
2812
|
-
//#region src/components/toast/toast.variants.ts
|
|
2813
|
-
const toastVariants = tv({
|
|
2814
|
-
defaultVariants: { variant: "default" },
|
|
2815
|
-
slots: {
|
|
2816
|
-
action: "toast__action",
|
|
2817
|
-
close: "toast__close",
|
|
2818
|
-
description: "toast__description",
|
|
2819
|
-
root: "toast group",
|
|
2820
|
-
title: "toast__title",
|
|
2821
|
-
viewport: "toast__viewport"
|
|
2822
|
-
},
|
|
2823
|
-
variants: { variant: {
|
|
2824
|
-
default: { root: "bg-background text-foreground" },
|
|
2825
|
-
destructive: { root: "destructive group border-danger bg-danger text-danger-foreground" }
|
|
2826
|
-
} }
|
|
2827
|
-
});
|
|
2828
|
-
|
|
2829
|
-
//#endregion
|
|
2830
|
-
//#region src/components/toast/use-toast.ts
|
|
2831
|
-
const useToast$1 = () => {
|
|
2832
|
-
const context = useContext(ToastContext);
|
|
2833
|
-
if (!context) throw new Error("useToast must be used within a ToastProvider");
|
|
2834
|
-
return context;
|
|
2835
|
-
};
|
|
2836
|
-
|
|
2837
|
-
//#endregion
|
|
2838
|
-
//#region src/components/toast/toast.tsx
|
|
2839
|
-
const Toast$1 = ({ className, variant, ...props }) => {
|
|
2840
|
-
const slots = useMemo(() => toastVariants({ variant }), [variant]);
|
|
2841
|
-
return /* @__PURE__ */ jsx(ToastContext, {
|
|
2842
|
-
value: { slots },
|
|
2843
|
-
children: /* @__PURE__ */ jsx(Toast.Root, {
|
|
2844
|
-
className: cn$1(className, slots.root()),
|
|
2845
|
-
...props
|
|
2846
|
-
})
|
|
2847
|
-
});
|
|
2848
|
-
};
|
|
2849
|
-
const ToastTitle = ({ className, ...props }) => {
|
|
2850
|
-
const { slots } = useToast$1();
|
|
2851
|
-
return /* @__PURE__ */ jsx(Toast.Title, {
|
|
2852
|
-
className: cn$1(className, slots.title()),
|
|
2853
|
-
...props
|
|
2854
|
-
});
|
|
2855
|
-
};
|
|
2856
|
-
const ToastDescription = ({ className, ...props }) => {
|
|
2857
|
-
const { slots } = useToast$1();
|
|
2858
|
-
return /* @__PURE__ */ jsx(Toast.Description, {
|
|
2859
|
-
className: cn$1(className, slots.description()),
|
|
2860
|
-
...props
|
|
2861
|
-
});
|
|
2862
|
-
};
|
|
2863
|
-
const ToastAction = ({ className, ...props }) => {
|
|
2864
|
-
const { slots } = useToast$1();
|
|
2865
|
-
return /* @__PURE__ */ jsx(Toast.Action, {
|
|
2866
|
-
className: cn$1(className, slots.action()),
|
|
2867
|
-
...props
|
|
2868
|
-
});
|
|
2869
|
-
};
|
|
2870
|
-
const ToastClose = ({ className, children, ...props }) => {
|
|
2871
|
-
const { slots } = useToast$1();
|
|
2872
|
-
return /* @__PURE__ */ jsx(Toast.Close, {
|
|
2873
|
-
className: cn$1(className, slots.close()),
|
|
2874
|
-
...props,
|
|
2875
|
-
children: children ?? /* @__PURE__ */ jsx(LucideX, { className: "size-4" })
|
|
2876
|
-
});
|
|
2877
|
-
};
|
|
2878
|
-
const ToastProvider = Toast.Provider;
|
|
2879
|
-
const ToastPortal = Toast.Portal;
|
|
2880
|
-
const ToastViewport = ({ className, ...props }) => {
|
|
2881
|
-
const { viewport } = toastVariants();
|
|
2882
|
-
return /* @__PURE__ */ jsx(Toast.Viewport, {
|
|
2883
|
-
className: cn$1(className, viewport()),
|
|
2884
|
-
...props
|
|
2885
|
-
});
|
|
2886
|
-
};
|
|
2887
|
-
var toast_default = Object.assign(Toast$1, {
|
|
2888
|
-
Action: ToastAction,
|
|
2889
|
-
Close: ToastClose,
|
|
2890
|
-
Description: ToastDescription,
|
|
2891
|
-
Portal: ToastPortal,
|
|
2892
|
-
Provider: ToastProvider,
|
|
2893
|
-
Root: Toast$1,
|
|
2894
|
-
Title: ToastTitle,
|
|
2895
|
-
Viewport: ToastViewport
|
|
2896
|
-
});
|
|
2897
|
-
|
|
2898
|
-
//#endregion
|
|
2899
|
-
//#region src/components/toast/index.ts
|
|
2900
|
-
const useToast = Toast.useToastManager;
|
|
2901
|
-
|
|
2902
3382
|
//#endregion
|
|
2903
3383
|
//#region src/components/toggle-button/toggle-button.variants.ts
|
|
2904
3384
|
const toggleButtonVariants = tv({
|
|
@@ -2996,5 +3476,5 @@ var tooltip_default = Object.assign(Tooltip$1, {
|
|
|
2996
3476
|
});
|
|
2997
3477
|
|
|
2998
3478
|
//#endregion
|
|
2999
|
-
export { accordion_default as Accordion, alert_default as Alert, alert_dialog_default as AlertDialog, avatar_default as Avatar, button_default as Button, button_group_default as ButtonGroup, card_default as Card, checkbox_default as Checkbox, checkbox_group_default as CheckboxGroup, chip_default as Chip, collapsible_default as Collapsible, combobox_default as Combobox, container_default as Container, dialog_default as Dialog, drawer_default as Drawer, field_default as Field, fieldset_default as Fieldset, form_default as Form, icon_button_default as IconButton, input_default as Input, label_default as Label, link_default as Link, list_default as List, menu_default as Menu, meter_default as Meter, navbar_default as Navbar, navigation_menu_default as NavigationMenu, popover_default as Popover, progress_default as Progress, radio_default as Radio, radio_group_default as RadioGroup, select_default as Select, separator_default as Separator, sidebar_default as Sidebar, slider_default as Slider, spinner_default as Spinner, switch_default as Switch, table_default as Table, tabs_default as Tabs,
|
|
3479
|
+
export { accordion_default as Accordion, alert_default as Alert, alert_dialog_default as AlertDialog, autocomplete_default as Autocomplete, avatar_default as Avatar, button_default as Button, button_group_default as ButtonGroup, card_default as Card, checkbox_default as Checkbox, checkbox_group_default as CheckboxGroup, chip_default as Chip, collapsible_default as Collapsible, combobox_default as Combobox, container_default as Container, context_menu_default as ContextMenu, dialog_default as Dialog, drawer_default as Drawer, field_default as Field, fieldset_default as Fieldset, form_default as Form, icon_button_default as IconButton, input_default as Input, label_default as Label, link_default as Link, list_default as List, menu_default as Menu, meter_default as Meter, navbar_default as Navbar, navigation_menu_default as NavigationMenu, number_field_default as NumberField, popover_default as Popover, preview_card_default as PreviewCard, progress_default as Progress, radio_default as Radio, radio_group_default as RadioGroup, scroll_area_default as ScrollArea, select_default as Select, separator_default as Separator, sidebar_default as Sidebar, slider_default as Slider, spinner_default as Spinner, switch_default as Switch, table_default as Table, tabs_default as Tabs, toggle_button_default as ToggleButton, tooltip_default as Tooltip, accordionVariants, alertDialogVariants, alertVariants, autocompleteVariants, avatarVariants, buttonGroupVariants, buttonVariants, cardVariants, checkboxGroupVariants, checkboxVariants, chipVariants, cn, comboboxVariants, containerVariants, contextMenuVariants, dialogVariants, drawerVariants, fieldVariants, fieldsetVariants, formVariants, iconButtonVariants, inputVariants, labelVariants, linkVariants, listVariants, menuVariants, meterVariants, navbarVariants, navigationMenuVariants, numberFieldVariants, popoverVariants, previewCardVariants, progressVariants, radioGroupVariants, radioVariants, scrollAreaVariants, selectVariants, separatorVariants, sidebarVariants, sliderVariants, spinnerVariants, switchVariants, tableVariants, tabsVariants, toggleButtonVariants };
|
|
3000
3480
|
//# sourceMappingURL=index.mjs.map
|