@moontra/moonui 2.0.11 → 2.1.0
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.js +16 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/button.tsx +15 -11
package/dist/index.js
CHANGED
|
@@ -707,7 +707,7 @@ var BreadcrumbPage = t__namespace.forwardRef(
|
|
|
707
707
|
)
|
|
708
708
|
);
|
|
709
709
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
710
|
-
var
|
|
710
|
+
var moonUIButtonVariants = classVarianceAuthority.cva(
|
|
711
711
|
[
|
|
712
712
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
713
713
|
"font-medium relative",
|
|
@@ -856,7 +856,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
|
-
var
|
|
859
|
+
var MoonUIButton = t__namespace.forwardRef(
|
|
860
860
|
({
|
|
861
861
|
className,
|
|
862
862
|
variant,
|
|
@@ -875,7 +875,7 @@ var Button = t__namespace.forwardRef(
|
|
|
875
875
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
876
876
|
Comp,
|
|
877
877
|
{
|
|
878
|
-
className: cn(
|
|
878
|
+
className: cn(moonUIButtonVariants({ variant, size, rounded, fullWidth, className })),
|
|
879
879
|
ref,
|
|
880
880
|
disabled: disabled || loading,
|
|
881
881
|
"data-loading": loading ? "" : void 0,
|
|
@@ -890,7 +890,7 @@ var Button = t__namespace.forwardRef(
|
|
|
890
890
|
);
|
|
891
891
|
}
|
|
892
892
|
);
|
|
893
|
-
|
|
893
|
+
MoonUIButton.displayName = "MoonUIButton";
|
|
894
894
|
var millisecondsInWeek = 6048e5;
|
|
895
895
|
var millisecondsInDay = 864e5;
|
|
896
896
|
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
@@ -4652,7 +4652,7 @@ function DatePicker({
|
|
|
4652
4652
|
const iconElement = icon || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-4 w-4" });
|
|
4653
4653
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4654
4654
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4655
|
-
|
|
4655
|
+
MoonUIButton,
|
|
4656
4656
|
{
|
|
4657
4657
|
variant: variant === "minimal" ? "ghost" : variant || "outline",
|
|
4658
4658
|
className: cn(
|
|
@@ -4749,7 +4749,7 @@ function DatePicker({
|
|
|
4749
4749
|
}
|
|
4750
4750
|
),
|
|
4751
4751
|
showTodayButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4752
|
-
|
|
4752
|
+
MoonUIButton,
|
|
4753
4753
|
{
|
|
4754
4754
|
variant: "ghost",
|
|
4755
4755
|
size: "sm",
|
|
@@ -4799,7 +4799,7 @@ function DateRangePicker({
|
|
|
4799
4799
|
}, [internalRange, formatString, separator]);
|
|
4800
4800
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4801
4801
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4802
|
-
|
|
4802
|
+
MoonUIButton,
|
|
4803
4803
|
{
|
|
4804
4804
|
variant: props.variant === "minimal" ? "ghost" : props.variant || "outline",
|
|
4805
4805
|
className: cn(
|
|
@@ -4957,7 +4957,7 @@ function MonthPicker({
|
|
|
4957
4957
|
const displayValue = value ? format(value, formatString) : null;
|
|
4958
4958
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
4959
4959
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4960
|
-
|
|
4960
|
+
MoonUIButton,
|
|
4961
4961
|
{
|
|
4962
4962
|
variant: props.variant || "outline",
|
|
4963
4963
|
className: cn(
|
|
@@ -4979,7 +4979,7 @@ function MonthPicker({
|
|
|
4979
4979
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3", children: [
|
|
4980
4980
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
4981
4981
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4982
|
-
|
|
4982
|
+
MoonUIButton,
|
|
4983
4983
|
{
|
|
4984
4984
|
variant: "outline",
|
|
4985
4985
|
size: "icon",
|
|
@@ -4989,7 +4989,7 @@ function MonthPicker({
|
|
|
4989
4989
|
),
|
|
4990
4990
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: viewDate.getFullYear() }),
|
|
4991
4991
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4992
|
-
|
|
4992
|
+
MoonUIButton,
|
|
4993
4993
|
{
|
|
4994
4994
|
variant: "outline",
|
|
4995
4995
|
size: "icon",
|
|
@@ -4999,7 +4999,7 @@ function MonthPicker({
|
|
|
4999
4999
|
)
|
|
5000
5000
|
] }),
|
|
5001
5001
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: months.map((month, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5002
|
-
|
|
5002
|
+
MoonUIButton,
|
|
5003
5003
|
{
|
|
5004
5004
|
variant: value && value.getMonth() === index ? "default" : "outline",
|
|
5005
5005
|
size: "sm",
|
|
@@ -5328,7 +5328,7 @@ var PaginationLink = ({
|
|
|
5328
5328
|
{
|
|
5329
5329
|
"aria-current": isActive ? "page" : void 0,
|
|
5330
5330
|
className: cn(
|
|
5331
|
-
|
|
5331
|
+
moonUIButtonVariants({
|
|
5332
5332
|
variant: isActive ? "outline" : "ghost",
|
|
5333
5333
|
size
|
|
5334
5334
|
}),
|
|
@@ -7259,7 +7259,7 @@ exports.BreadcrumbLink = BreadcrumbLink;
|
|
|
7259
7259
|
exports.BreadcrumbList = BreadcrumbList;
|
|
7260
7260
|
exports.BreadcrumbPage = BreadcrumbPage;
|
|
7261
7261
|
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
7262
|
-
exports.Button =
|
|
7262
|
+
exports.Button = MoonUIButton;
|
|
7263
7263
|
exports.Calendar = Calendar;
|
|
7264
7264
|
exports.Card = Card;
|
|
7265
7265
|
exports.CardContent = CardContent;
|
|
@@ -7313,6 +7313,7 @@ exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
|
7313
7313
|
exports.Input = Input;
|
|
7314
7314
|
exports.Label = Label2;
|
|
7315
7315
|
exports.MonthPicker = MonthPicker;
|
|
7316
|
+
exports.MoonUIButton = MoonUIButton;
|
|
7316
7317
|
exports.Pagination = Pagination;
|
|
7317
7318
|
exports.PaginationContent = PaginationContent;
|
|
7318
7319
|
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -7380,7 +7381,7 @@ exports.TooltipProvider = TooltipProvider;
|
|
|
7380
7381
|
exports.TooltipTrigger = TooltipTrigger;
|
|
7381
7382
|
exports.aspectRatioVariants = aspectRatioVariants;
|
|
7382
7383
|
exports.badgeVariants = badgeVariants;
|
|
7383
|
-
exports.buttonVariants =
|
|
7384
|
+
exports.buttonVariants = moonUIButtonVariants;
|
|
7384
7385
|
exports.cn = cn;
|
|
7385
7386
|
exports.collapsibleContentVariants = collapsibleContentVariants;
|
|
7386
7387
|
exports.collapsibleTriggerVariants = collapsibleTriggerVariants;
|
|
@@ -7389,6 +7390,7 @@ exports.formatCurrency = formatCurrency;
|
|
|
7389
7390
|
exports.formatDate = formatDate;
|
|
7390
7391
|
exports.generateId = generateId;
|
|
7391
7392
|
exports.getClientIP = getClientIP;
|
|
7393
|
+
exports.moonUIButtonVariants = moonUIButtonVariants;
|
|
7392
7394
|
exports.popoverContentVariants = popoverContentVariants;
|
|
7393
7395
|
exports.progressVariants = progressVariants;
|
|
7394
7396
|
exports.separatorVariants = separatorVariants;
|