@fea-ui/react 0.1.0-alpha.6 → 0.1.0-alpha.7
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 +145 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +743 -484
- package/dist/index.d.mts +267 -8
- package/dist/index.mjs +143 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -877,6 +877,28 @@ const Form = ({ className, ...props }) => {
|
|
|
877
877
|
};
|
|
878
878
|
var form_default = Form;
|
|
879
879
|
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/components/icon-button/icon-button.variants.ts
|
|
882
|
+
const iconButtonVariants = (0, tailwind_variants.tv)({
|
|
883
|
+
base: "icon-button",
|
|
884
|
+
defaultVariants: { isIconOnly: true },
|
|
885
|
+
extend: buttonVariants
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region src/components/icon-button/icon-button.tsx
|
|
890
|
+
const IconButton = ({ className, variant, size, isIconOnly, ...props }) => {
|
|
891
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(button_default, {
|
|
892
|
+
className: (0, tailwind_variants.cn)(className, iconButtonVariants({
|
|
893
|
+
isIconOnly,
|
|
894
|
+
size,
|
|
895
|
+
variant
|
|
896
|
+
})),
|
|
897
|
+
...props
|
|
898
|
+
});
|
|
899
|
+
};
|
|
900
|
+
var icon_button_default = IconButton;
|
|
901
|
+
|
|
880
902
|
//#endregion
|
|
881
903
|
//#region src/components/input/input.variants.ts
|
|
882
904
|
const inputVariants = (0, tailwind_variants.tv)({
|
|
@@ -1362,6 +1384,125 @@ Navbar.Menu = NavbarMenu;
|
|
|
1362
1384
|
Navbar.MenuItem = NavbarMenuItem;
|
|
1363
1385
|
var navbar_default = Navbar;
|
|
1364
1386
|
|
|
1387
|
+
//#endregion
|
|
1388
|
+
//#region src/components/popover/popover.context.ts
|
|
1389
|
+
const PopoverContext = (0, react.createContext)(null);
|
|
1390
|
+
|
|
1391
|
+
//#endregion
|
|
1392
|
+
//#region src/components/popover/popover.variants.ts
|
|
1393
|
+
const popoverVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1394
|
+
arrow: "popover__arrow",
|
|
1395
|
+
backdrop: "popover__backdrop",
|
|
1396
|
+
close: "popover__close",
|
|
1397
|
+
description: "popover__description",
|
|
1398
|
+
popup: "popover__popup",
|
|
1399
|
+
portal: "popover__portal",
|
|
1400
|
+
positioner: "popover__positioner",
|
|
1401
|
+
root: "popover",
|
|
1402
|
+
title: "popover__title",
|
|
1403
|
+
trigger: "popover__trigger",
|
|
1404
|
+
viewport: "popover__viewport"
|
|
1405
|
+
} });
|
|
1406
|
+
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region src/components/popover/use-popover.ts
|
|
1409
|
+
const usePopover = () => {
|
|
1410
|
+
const context = (0, react.useContext)(PopoverContext);
|
|
1411
|
+
if (!context) throw new Error("usePopover must be used within a PopoverProvider");
|
|
1412
|
+
return context;
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
//#endregion
|
|
1416
|
+
//#region src/components/popover/popover.tsx
|
|
1417
|
+
const Popover = ({ ...props }) => {
|
|
1418
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverContext, {
|
|
1419
|
+
value: { slots: (0, react.useMemo)(() => popoverVariants(), []) },
|
|
1420
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Root, { ...props })
|
|
1421
|
+
});
|
|
1422
|
+
};
|
|
1423
|
+
const PopoverTrigger = ({ className, ...props }) => {
|
|
1424
|
+
const { slots } = usePopover();
|
|
1425
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Trigger, {
|
|
1426
|
+
className: (0, tailwind_variants.cn)(slots.trigger(), className),
|
|
1427
|
+
...props
|
|
1428
|
+
});
|
|
1429
|
+
};
|
|
1430
|
+
const PopoverPortal = ({ className, ...props }) => {
|
|
1431
|
+
const { slots } = usePopover();
|
|
1432
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Portal, {
|
|
1433
|
+
className: (0, tailwind_variants.cn)(slots.portal(), className),
|
|
1434
|
+
...props
|
|
1435
|
+
});
|
|
1436
|
+
};
|
|
1437
|
+
const PopoverBackdrop = ({ className, ...props }) => {
|
|
1438
|
+
const { slots } = usePopover();
|
|
1439
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Backdrop, {
|
|
1440
|
+
className: (0, tailwind_variants.cn)(slots.backdrop(), className),
|
|
1441
|
+
...props
|
|
1442
|
+
});
|
|
1443
|
+
};
|
|
1444
|
+
const PopoverPositioner = ({ className, ...props }) => {
|
|
1445
|
+
const { slots } = usePopover();
|
|
1446
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Positioner, {
|
|
1447
|
+
className: (0, tailwind_variants.cn)(slots.positioner(), className),
|
|
1448
|
+
...props
|
|
1449
|
+
});
|
|
1450
|
+
};
|
|
1451
|
+
const PopoverPopup = ({ className, ...props }) => {
|
|
1452
|
+
const { slots } = usePopover();
|
|
1453
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Popup, {
|
|
1454
|
+
className: (0, tailwind_variants.cn)(slots.popup(), className),
|
|
1455
|
+
...props
|
|
1456
|
+
});
|
|
1457
|
+
};
|
|
1458
|
+
const PopoverArrow = ({ className, ...props }) => {
|
|
1459
|
+
const { slots } = usePopover();
|
|
1460
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Arrow, {
|
|
1461
|
+
className: (0, tailwind_variants.cn)(slots.arrow(), className),
|
|
1462
|
+
...props
|
|
1463
|
+
});
|
|
1464
|
+
};
|
|
1465
|
+
const PopoverViewport = ({ className, ...props }) => {
|
|
1466
|
+
const { slots } = usePopover();
|
|
1467
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Viewport, {
|
|
1468
|
+
className: (0, tailwind_variants.cn)(slots.viewport(), className),
|
|
1469
|
+
...props
|
|
1470
|
+
});
|
|
1471
|
+
};
|
|
1472
|
+
const PopoverTitle = ({ className, ...props }) => {
|
|
1473
|
+
const { slots } = usePopover();
|
|
1474
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Title, {
|
|
1475
|
+
className: (0, tailwind_variants.cn)(slots.title(), className),
|
|
1476
|
+
...props
|
|
1477
|
+
});
|
|
1478
|
+
};
|
|
1479
|
+
const PopoverDescription = ({ className, ...props }) => {
|
|
1480
|
+
const { slots } = usePopover();
|
|
1481
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Description, {
|
|
1482
|
+
className: (0, tailwind_variants.cn)(slots.description(), className),
|
|
1483
|
+
...props
|
|
1484
|
+
});
|
|
1485
|
+
};
|
|
1486
|
+
const PopoverClose = ({ className, ...props }) => {
|
|
1487
|
+
const { slots } = usePopover();
|
|
1488
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Close, {
|
|
1489
|
+
className: (0, tailwind_variants.cn)(slots.close(), className),
|
|
1490
|
+
...props
|
|
1491
|
+
});
|
|
1492
|
+
};
|
|
1493
|
+
Popover.Root = Popover;
|
|
1494
|
+
Popover.Trigger = PopoverTrigger;
|
|
1495
|
+
Popover.Portal = PopoverPortal;
|
|
1496
|
+
Popover.Backdrop = PopoverBackdrop;
|
|
1497
|
+
Popover.Positioner = PopoverPositioner;
|
|
1498
|
+
Popover.Popup = PopoverPopup;
|
|
1499
|
+
Popover.Arrow = PopoverArrow;
|
|
1500
|
+
Popover.Viewport = PopoverViewport;
|
|
1501
|
+
Popover.Title = PopoverTitle;
|
|
1502
|
+
Popover.Description = PopoverDescription;
|
|
1503
|
+
Popover.Close = PopoverClose;
|
|
1504
|
+
var popover_default = Popover;
|
|
1505
|
+
|
|
1365
1506
|
//#endregion
|
|
1366
1507
|
//#region src/components/progress/progress.context.ts
|
|
1367
1508
|
const ProgressContext = (0, react.createContext)(null);
|
|
@@ -1783,6 +1924,7 @@ exports.Drawer = drawer_default;
|
|
|
1783
1924
|
exports.Field = field_default;
|
|
1784
1925
|
exports.Fieldset = fieldset_default;
|
|
1785
1926
|
exports.Form = form_default;
|
|
1927
|
+
exports.IconButton = icon_button_default;
|
|
1786
1928
|
exports.Input = input_default;
|
|
1787
1929
|
exports.Label = label_default;
|
|
1788
1930
|
exports.Link = link_default;
|
|
@@ -1790,6 +1932,7 @@ exports.List = list_default;
|
|
|
1790
1932
|
exports.Menu = menu_default;
|
|
1791
1933
|
exports.Meter = meter_default;
|
|
1792
1934
|
exports.Navbar = navbar_default;
|
|
1935
|
+
exports.Popover = popover_default;
|
|
1793
1936
|
exports.Progress = progress_default;
|
|
1794
1937
|
exports.Separator = separator_default;
|
|
1795
1938
|
exports.Slider = slider_default;
|
|
@@ -1820,6 +1963,7 @@ exports.drawerVariants = drawerVariants;
|
|
|
1820
1963
|
exports.fieldVariants = fieldVariants;
|
|
1821
1964
|
exports.fieldsetVariants = fieldsetVariants;
|
|
1822
1965
|
exports.formVariants = formVariants;
|
|
1966
|
+
exports.iconButtonVariants = iconButtonVariants;
|
|
1823
1967
|
exports.inputVariants = inputVariants;
|
|
1824
1968
|
exports.labelVariants = labelVariants;
|
|
1825
1969
|
exports.linkVariants = linkVariants;
|
|
@@ -1827,6 +1971,7 @@ exports.listVariants = listVariants;
|
|
|
1827
1971
|
exports.menuVariants = menuVariants;
|
|
1828
1972
|
exports.meterVariants = meterVariants;
|
|
1829
1973
|
exports.navbarVariants = navbarVariants;
|
|
1974
|
+
exports.popoverVariants = popoverVariants;
|
|
1830
1975
|
exports.progressVariants = progressVariants;
|
|
1831
1976
|
exports.separatorVariants = separatorVariants;
|
|
1832
1977
|
exports.sliderVariants = sliderVariants;
|