@clasing/ui 0.1.123 → 0.1.125
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/badge-BnerQ2lF.js +85 -0
- package/dist/badge-Czof3oqL.cjs +1 -0
- package/dist/button-Cegl49Yi.cjs +1 -0
- package/dist/button-DddHyyHa.js +504 -0
- package/dist/calendar-BAQkzm4v.js +117 -0
- package/dist/calendar-DL8gqdRp.cjs +1 -0
- package/dist/card-BCgtou88.cjs +1 -0
- package/dist/card-BfBXE5Kq.js +90 -0
- package/dist/chip-A32aAc-8.cjs +1 -0
- package/dist/chip-ZZHZ8i1Q.js +127 -0
- package/dist/command-BGCSJ9vX.js +506 -0
- package/dist/command-D9M8dk1M.cjs +1 -0
- package/dist/components/accordion.cjs.js +1 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.es.js +70 -0
- package/dist/components/alert-dialog.cjs.js +1 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.es.js +146 -0
- package/dist/components/alert.cjs.js +1 -0
- package/dist/components/alert.d.ts +15 -0
- package/dist/components/alert.es.js +97 -0
- package/dist/components/avatar.cjs.js +1 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.es.js +53 -0
- package/dist/components/badge.cjs.js +1 -0
- package/dist/components/badge.d.ts +18 -0
- package/dist/components/badge.es.js +4 -0
- package/dist/components/blocks/date-picker.cjs.js +1 -0
- package/dist/components/blocks/date-picker.d.ts +30 -0
- package/dist/components/blocks/date-picker.es.js +181 -0
- package/dist/components/blocks/date-range-picker.cjs.js +1 -0
- package/dist/components/blocks/date-range-picker.d.ts +29 -0
- package/dist/components/blocks/date-range-picker.es.js +238 -0
- package/dist/components/blocks/interactive-card.cjs.js +1 -0
- package/dist/components/blocks/interactive-card.d.ts +26 -0
- package/dist/components/blocks/interactive-card.es.js +138 -0
- package/dist/components/blocks/selectable-chips.cjs.js +1 -0
- package/dist/components/blocks/selectable-chips.d.ts +16 -0
- package/dist/components/blocks/selectable-chips.es.js +57 -0
- package/dist/components/breadcrumb.cjs.js +1 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.es.js +106 -0
- package/dist/components/button.cjs.js +1 -0
- package/dist/components/button.d.ts +39 -0
- package/dist/components/button.es.js +7 -0
- package/dist/components/calendar.cjs.js +1 -0
- package/dist/components/calendar.d.ts +15 -0
- package/dist/components/calendar.es.js +4 -0
- package/dist/components/card.cjs.js +1 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.es.js +10 -0
- package/dist/components/chart.cjs.js +7 -0
- package/dist/components/chart.d.ts +43 -0
- package/dist/components/chart.es.js +213 -0
- package/dist/components/checkbox.cjs.js +1 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.es.js +31 -0
- package/dist/components/chip.cjs.js +1 -0
- package/dist/components/chip.d.ts +25 -0
- package/dist/components/chip.es.js +5 -0
- package/dist/components/collapsible.cjs.js +1 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/collapsible.es.js +34 -0
- package/dist/components/command.cjs.js +1 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.es.js +12 -0
- package/dist/components/context-menu.cjs.js +1 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.es.js +229 -0
- package/dist/components/dialog.cjs.js +1 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.es.js +13 -0
- package/dist/components/divider.cjs.js +1 -0
- package/dist/components/divider.d.ts +6 -0
- package/dist/components/divider.es.js +21 -0
- package/dist/components/drawer.cjs.js +3 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.es.js +1161 -0
- package/dist/components/dropdown-menu.cjs.js +1 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.es.js +237 -0
- package/dist/components/hover-card.cjs.js +1 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.es.js +38 -0
- package/dist/components/icon-component.cjs.js +1 -0
- package/dist/components/icon-component.d.ts +12 -0
- package/dist/components/icon-component.es.js +4 -0
- package/dist/components/input-otp.cjs.js +20 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.es.js +253 -0
- package/dist/components/input.cjs.js +1 -0
- package/dist/components/input.d.ts +32 -0
- package/dist/components/input.es.js +4 -0
- package/dist/components/label.cjs.js +1 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.es.js +4 -0
- package/dist/components/menubar.cjs.js +1 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.es.js +257 -0
- package/dist/components/multi-select.cjs.js +1 -0
- package/dist/components/multi-select.d.ts +32 -0
- package/dist/components/multi-select.es.js +233 -0
- package/dist/components/navigation-menu.cjs.js +1 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.es.js +171 -0
- package/dist/components/phone-input.cjs.js +1 -0
- package/dist/components/phone-input.d.ts +14 -0
- package/dist/components/phone-input.es.js +253 -0
- package/dist/components/popover.cjs.js +1 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.es.js +7 -0
- package/dist/components/progress.cjs.js +1 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.es.js +31 -0
- package/dist/components/resizable.cjs.js +1 -0
- package/dist/components/resizable.d.ts +8 -0
- package/dist/components/resizable.es.js +1551 -0
- package/dist/components/scroll-area.cjs.js +1 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area.es.js +5 -0
- package/dist/components/select.cjs.js +1 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.es.js +179 -0
- package/dist/components/sheet.cjs.js +1 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.es.js +126 -0
- package/dist/components/skeleton.cjs.js +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.es.js +15 -0
- package/dist/components/slider.cjs.js +1 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.es.js +63 -0
- package/dist/components/sonner.cjs.js +1 -0
- package/dist/components/sonner.d.ts +3 -0
- package/dist/components/sonner.es.js +68 -0
- package/dist/components/switch.cjs.js +1 -0
- package/dist/components/switch.d.ts +11 -0
- package/dist/components/switch.es.js +82 -0
- package/dist/components/table.cjs.js +1 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.es.js +114 -0
- package/dist/components/toggle-group.cjs.js +1 -0
- package/dist/components/toggle-group.d.ts +7 -0
- package/dist/components/toggle-group.es.js +62 -0
- package/dist/components/toggle.cjs.js +1 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.es.js +5 -0
- package/dist/components/tooltip.cjs.js +1 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.es.js +7 -0
- package/dist/dialog-BKm2PZl2.cjs +1 -0
- package/dist/dialog-DZpF7OXg.js +136 -0
- package/dist/entries/accordion.d.ts +2 -0
- package/dist/entries/alert-dialog.d.ts +2 -0
- package/dist/entries/alert.d.ts +2 -0
- package/dist/entries/avatar.d.ts +2 -0
- package/dist/entries/badge.d.ts +2 -0
- package/dist/entries/blocks/date-picker.d.ts +2 -0
- package/dist/entries/blocks/date-range-picker.d.ts +2 -0
- package/dist/entries/blocks/interactive-card.d.ts +2 -0
- package/dist/entries/blocks/selectable-chips.d.ts +2 -0
- package/dist/entries/breadcrumb.d.ts +2 -0
- package/dist/entries/button.d.ts +2 -0
- package/dist/entries/calendar.d.ts +2 -0
- package/dist/entries/card.d.ts +2 -0
- package/dist/entries/chart.d.ts +2 -0
- package/dist/entries/checkbox.d.ts +2 -0
- package/dist/entries/chip.d.ts +2 -0
- package/dist/entries/collapsible.d.ts +2 -0
- package/dist/entries/command.d.ts +2 -0
- package/dist/entries/context-menu.d.ts +2 -0
- package/dist/entries/dialog.d.ts +2 -0
- package/dist/entries/divider.d.ts +2 -0
- package/dist/entries/drawer.d.ts +2 -0
- package/dist/entries/dropdown-menu.d.ts +2 -0
- package/dist/entries/hooks/useOutsideClick.d.ts +2 -0
- package/dist/entries/hover-card.d.ts +2 -0
- package/dist/entries/icon-component.d.ts +2 -0
- package/dist/entries/input-otp.d.ts +2 -0
- package/dist/entries/input.d.ts +2 -0
- package/dist/entries/label.d.ts +2 -0
- package/dist/entries/menubar.d.ts +2 -0
- package/dist/entries/multi-select.d.ts +2 -0
- package/dist/entries/navigation-menu.d.ts +2 -0
- package/dist/entries/phone-input.d.ts +2 -0
- package/dist/entries/popover.d.ts +2 -0
- package/dist/entries/progress.d.ts +2 -0
- package/dist/entries/resizable.d.ts +2 -0
- package/dist/entries/scroll-area.d.ts +2 -0
- package/dist/entries/select.d.ts +2 -0
- package/dist/entries/sheet.d.ts +2 -0
- package/dist/entries/skeleton.d.ts +2 -0
- package/dist/entries/slider.d.ts +2 -0
- package/dist/entries/sonner.d.ts +2 -0
- package/dist/entries/switch.d.ts +2 -0
- package/dist/entries/table.d.ts +2 -0
- package/dist/entries/toggle-group.d.ts +2 -0
- package/dist/entries/toggle.d.ts +2 -0
- package/dist/entries/tooltip.d.ts +2 -0
- package/dist/entries/utils/types.d.ts +2 -0
- package/dist/hooks/useOutsideClick.cjs.js +1 -0
- package/dist/hooks/useOutsideClick.d.ts +6 -0
- package/dist/hooks/useOutsideClick.es.js +14 -0
- package/dist/icon-component-BZ-4FDV6.js +49 -0
- package/dist/icon-component-LY_vGYHZ.cjs +1 -0
- package/dist/index-BqtVL8d-.js +34 -0
- package/dist/index-C8P6Mn4U.cjs +1 -0
- package/dist/index-CRiPKpXj.js +2743 -0
- package/dist/index-DoxiiusW.cjs +1 -0
- package/dist/input-DFPJ_mtM.cjs +1 -0
- package/dist/input-DwPDvbRE.js +174 -0
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-DUiatUiq.cjs +22 -0
- package/dist/label-BpDUqtrC.js +22 -0
- package/dist/label-CbzkBbPT.cjs +1 -0
- package/dist/popover-B8wp2cHF.cjs +1 -0
- package/dist/popover-BoDRCUh2.js +44 -0
- package/dist/scroll-area-CNsThIs_.js +60 -0
- package/dist/scroll-area-Dr-7opp_.cjs +1 -0
- package/dist/style-BNIXVvBA.js +1172 -0
- package/dist/style-CA5976Oh.cjs +1 -0
- package/dist/tests/setup.d.ts +1 -0
- package/dist/toggle-Dgd7L2Mq.cjs +1 -0
- package/dist/toggle-DjbiWYXD.js +44 -0
- package/dist/tooltip-Btr9ROSo.js +55 -0
- package/dist/tooltip-W9iE1O--.cjs +1 -0
- package/dist/ui.css +427 -16
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/types/index.d.ts +36 -0
- package/dist/utils/types.cjs.js +1 -0
- package/dist/utils/types.es.js +1 -0
- package/package.json +301 -38
- package/dist/index.d.ts +0 -566
- package/dist/index.es.js +0 -7538
- package/dist/index.umd.js +0 -22
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { Slot as c } from "@radix-ui/react-slot";
|
|
3
|
+
import { c as f } from "./index-BqtVL8d-.js";
|
|
4
|
+
import { c as h } from "./index-CRiPKpXj.js";
|
|
5
|
+
import { I as o } from "./icon-component-BZ-4FDV6.js";
|
|
6
|
+
const x = f(
|
|
7
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-2 overflow-hidden border font-semibold whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-muted text-muted-foreground [a&]:hover:bg-muted/90 border-transparent",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
|
13
|
+
destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 border-transparent text-white",
|
|
14
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
15
|
+
error: "bg-error-light text-error-main [a&]:hover:bg-error-light/90 border-transparent",
|
|
16
|
+
warning: "bg-warning-light text-warning-main [a&]:hover:bg-warning-light/90 border-transparent",
|
|
17
|
+
success: "bg-success-light text-success-main [a&]:hover:bg-success-light/90 border-transparent",
|
|
18
|
+
info: "bg-info-light text-info-main [a&]:hover:bg-info-light/90 border-transparent",
|
|
19
|
+
neutral: "border-transparent bg-black text-white [a&]:hover:bg-black/90",
|
|
20
|
+
primary: "bg-primary-600 [a&]:hover:bg-primary-600/90 border-transparent text-white",
|
|
21
|
+
yellow: "border-transparent bg-yellow-600 text-white [a&]:hover:bg-yellow-600/90",
|
|
22
|
+
blue: "border-transparent bg-blue-600 text-white [a&]:hover:bg-blue-600/90",
|
|
23
|
+
violet: "border-transparent bg-violet-600 text-white [a&]:hover:bg-violet-600/90"
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
xs: "px-3 py-px text-xs [&>svg]:size-3",
|
|
27
|
+
sm: "px-4 py-1 text-xs [&>svg]:size-4",
|
|
28
|
+
md: "px-4 py-2 text-sm [&>svg]:size-4",
|
|
29
|
+
lg: "px-4 py-2 text-base [&>svg]:size-5"
|
|
30
|
+
},
|
|
31
|
+
weight: {
|
|
32
|
+
light: "font-light",
|
|
33
|
+
regular: "font-regular",
|
|
34
|
+
semibold: "font-semibold",
|
|
35
|
+
bold: "font-bold"
|
|
36
|
+
},
|
|
37
|
+
rounded: {
|
|
38
|
+
default: "rounded-2xl",
|
|
39
|
+
full: "rounded-full"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
size: "xs",
|
|
45
|
+
weight: "semibold",
|
|
46
|
+
rounded: "full"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
function z({
|
|
51
|
+
className: s,
|
|
52
|
+
variant: n,
|
|
53
|
+
size: d,
|
|
54
|
+
weight: g,
|
|
55
|
+
rounded: l,
|
|
56
|
+
iconName: e,
|
|
57
|
+
iconPosition: t = "left",
|
|
58
|
+
iconStroke: a,
|
|
59
|
+
iconOnly: i,
|
|
60
|
+
asChild: b = !1,
|
|
61
|
+
children: u,
|
|
62
|
+
...v
|
|
63
|
+
}) {
|
|
64
|
+
const p = b ? c : "span";
|
|
65
|
+
return /* @__PURE__ */ r.jsxs(
|
|
66
|
+
p,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "badge",
|
|
69
|
+
className: h(
|
|
70
|
+
x({ variant: n, size: d, weight: g, rounded: l }),
|
|
71
|
+
i && "px-2.5 py-2",
|
|
72
|
+
s
|
|
73
|
+
),
|
|
74
|
+
...v,
|
|
75
|
+
children: [
|
|
76
|
+
e && t === "left" && /* @__PURE__ */ r.jsx(o, { iconName: e, stroke: a }),
|
|
77
|
+
!i && u,
|
|
78
|
+
e && t === "right" && /* @__PURE__ */ r.jsx(o, { iconName: e, stroke: a })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
z as B
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./jsx-runtime-DUiatUiq.cjs"),x=require("@radix-ui/react-slot"),p=require("./index-C8P6Mn4U.cjs"),h=require("./index-DoxiiusW.cjs"),s=require("./icon-component-LY_vGYHZ.cjs"),f=p.cva("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-2 overflow-hidden border font-semibold whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none",{variants:{variant:{default:"bg-muted text-muted-foreground [a&]:hover:bg-muted/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",error:"bg-error-light text-error-main [a&]:hover:bg-error-light/90 border-transparent",warning:"bg-warning-light text-warning-main [a&]:hover:bg-warning-light/90 border-transparent",success:"bg-success-light text-success-main [a&]:hover:bg-success-light/90 border-transparent",info:"bg-info-light text-info-main [a&]:hover:bg-info-light/90 border-transparent",neutral:"border-transparent bg-black text-white [a&]:hover:bg-black/90",primary:"bg-primary-600 [a&]:hover:bg-primary-600/90 border-transparent text-white",yellow:"border-transparent bg-yellow-600 text-white [a&]:hover:bg-yellow-600/90",blue:"border-transparent bg-blue-600 text-white [a&]:hover:bg-blue-600/90",violet:"border-transparent bg-violet-600 text-white [a&]:hover:bg-violet-600/90"},size:{xs:"px-3 py-px text-xs [&>svg]:size-3",sm:"px-4 py-1 text-xs [&>svg]:size-4",md:"px-4 py-2 text-sm [&>svg]:size-4",lg:"px-4 py-2 text-base [&>svg]:size-5"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},rounded:{default:"rounded-2xl",full:"rounded-full"}},defaultVariants:{variant:"default",size:"xs",weight:"semibold",rounded:"full"}});function m({className:o,variant:a,size:d,weight:g,rounded:l,iconName:e,iconPosition:t="left",iconStroke:n,iconOnly:i,asChild:b=!1,children:u,...c}){const v=b?x.Slot:"span";return r.jsxRuntimeExports.jsxs(v,{"data-slot":"badge",className:h.cn(f({variant:a,size:d,weight:g,rounded:l}),i&&"px-2.5 py-2",o),...c,children:[e&&t==="left"&&r.jsxRuntimeExports.jsx(s.IconComponent,{iconName:e,stroke:n}),!i&&u,e&&t==="right"&&r.jsxRuntimeExports.jsx(s.IconComponent,{iconName:e,stroke:n})]})}exports.Badge=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-DUiatUiq.cjs"),y=require("./index-DoxiiusW.cjs"),S=require("@radix-ui/react-slot"),v=require("./index-C8P6Mn4U.cjs"),z=require("react"),l=require("./icon-component-LY_vGYHZ.cjs"),n=require("./tooltip-W9iE1O--.cjs"),f="focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]",P=v.cva(f,{variants:{variant:{primary:["bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],secondary:["bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],inverse:["lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],outline:["text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],ghost:["bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],destructive:["bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"],link:["text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"]},size:{xl:"h-12 gap-2 px-6 py-1 text-base",lg:"h-10 gap-2 px-5 py-1 text-sm",md:"h-8 gap-1.5 px-4 py-1 text-xs",sm:"h-7 gap-1 px-3 py-1 text-xs",xs:"h-6 gap-1 px-3 py-1 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"outline-neutral-050 text-primary-600 lg:hover:bg-neutral-000 bg-white"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"text-primary-600 lg:hover:bg-primary-050 bg-transparent"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-1.5"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-1.5"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1.5"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-1.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-1.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),k=v.cva(`${f} cursor-default`,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}}),R=v.cva(f,{variants:{variant:{primary:["bg-primary-800 text-white outline-transparent"],secondary:["bg-neutral-900 text-white outline-transparent"],inverse:["bg-neutral-000 text-black outline-transparent"],ghost:["bg-primary-100 text-primary-600 outline-transparent"],outline:["bg-primary-100 text-primary-600 outline-primary-600"],destructive:["bg-error-light text-error-main outline-transparent"],link:["bg-primary-050 text-primary-600"]},size:{xl:"h-12 gap-2 px-6 text-base",lg:"h-10 gap-2 px-5 text-sm",md:"h-8 gap-1.5 px-4 text-xs",sm:"h-7 gap-1 px-3 text-xs",xs:"h-6 gap-1 px-3 text-xs"},rounded:{default:"rounded-2xl",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},iconPosition:{left:"",right:"",only:"aspect-square"}},compoundVariants:[{iconPosition:"only",variant:"primary",class:"bg-neutral-000 text-primary-600 outline-neutral-050"},{iconPosition:"only",variant:"destructive",class:"bg-error-light text-error-main outline-transparent"},{iconPosition:"only",variant:"link",class:"bg-primary-050 text-primary-600"},{iconPosition:"only",size:"xl",class:"h-12 w-12 p-3"},{iconPosition:"only",size:"lg",class:"h-10 w-10 p-2"},{iconPosition:"only",size:"md",class:"h-8 w-8 p-1"},{iconPosition:"only",size:"sm",class:"h-7 w-7 p-0.5"},{iconPosition:"only",size:"xs",class:"h-6 w-6 p-0.5"},{variant:"link",size:"xl",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"lg",class:"h-auto gap-2 px-3 py-1 text-base"},{variant:"link",size:"md",class:"h-auto gap-1.5 px-3 py-1 text-sm"},{variant:"link",size:"sm",class:"h-auto gap-1 px-3 py-1 text-xs"},{variant:"link",size:"xs",class:"h-auto gap-1 px-3 py-1 text-xs"}],defaultVariants:{variant:"primary",size:"xl",weight:"semibold",rounded:"full",iconPosition:"left"}});function T({className:u,variant:c,size:s,weight:g,rounded:d,children:m,iconName:r,iconText:b,iconPosition:h="left",isLoading:a,isActive:E,disabled:j,tooltip:o,tooltipPlacement:w="top",asChild:C,...q}){const I=C?S.Slot:"button",e=z.useMemo(()=>!m&&r||h==="only"?"only":h,[m,r,h]),i=z.useMemo(()=>r?typeof r=="string"?{name:r}:r:null,[r]),x=e==="only"?{xl:"min-w-6 h-6",lg:"min-w-6 h-6",md:"min-w-5 h-5",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"}:{xl:"min-w-5 h-5",lg:"min-w-5 h-5",md:"min-w-4 h-4",sm:"min-w-4 h-4",xs:"min-w-3.5 h-3.5"},p=t.jsxRuntimeExports.jsx(I,{className:y.cn(a?k({variant:c,weight:g,size:s,rounded:d,iconPosition:e,className:u}):E?R({variant:c,weight:g,size:s,rounded:d,iconPosition:e,className:u}):P({variant:c,weight:g,size:s,rounded:d,iconPosition:e,className:u})),disabled:j||a,...q,children:e==="only"?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:a?t.jsxRuntimeExports.jsx(l.IconComponent,{iconName:"IconLoader2",className:y.cn("animate-spin",x[s||"xl"])}):i&&t.jsxRuntimeExports.jsx(l.IconComponent,{iconName:i.name,stroke:i.stroke,iconText:b,size:24})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx("span",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${a?"visible opacity-100":"invisible opacity-0"}`,children:t.jsxRuntimeExports.jsx(l.IconComponent,{iconName:"IconLoader2",className:y.cn("animate-spin",x[s||"xl"])})}),t.jsxRuntimeExports.jsxs("span",{className:`flex items-center justify-center gap-2 ${a?"invisible opacity-0":"visible opacity-100"}`,children:[i&&e==="left"&&t.jsxRuntimeExports.jsx(l.IconComponent,{iconName:i.name,iconText:b,stroke:i.stroke,className:x[s||"xl"]}),m,i&&e==="right"&&t.jsxRuntimeExports.jsx(l.IconComponent,{iconName:i.name,iconText:b,stroke:i.stroke,className:x[s||"xl"]})]})]})});return o&&(j||a)?t.jsxRuntimeExports.jsx(n.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(n.Tooltip,{children:[t.jsxRuntimeExports.jsx(n.TooltipTrigger,{asChild:e==="only",children:e==="only"?t.jsxRuntimeExports.jsx("div",{className:"inline-block","aria-disabled":"true",children:p}):p}),t.jsxRuntimeExports.jsx(n.TooltipContent,{side:w,className:"text-muted-foreground",children:o})]})}):o?t.jsxRuntimeExports.jsx(n.TooltipProvider,{children:t.jsxRuntimeExports.jsxs(n.Tooltip,{children:[t.jsxRuntimeExports.jsx(n.TooltipTrigger,{asChild:e==="only",children:p}),t.jsxRuntimeExports.jsx(n.TooltipContent,{side:w,className:"text-muted-foreground",children:o})]})}):p}exports.Button=T;exports.buttonActiveStyles=R;exports.buttonLoadingStyles=k;exports.buttonStyles=P;
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { c as h } from "./index-CRiPKpXj.js";
|
|
3
|
+
import { Slot as B } from "@radix-ui/react-slot";
|
|
4
|
+
import { c as y } from "./index-BqtVL8d-.js";
|
|
5
|
+
import z from "react";
|
|
6
|
+
import { I as s } from "./icon-component-BZ-4FDV6.js";
|
|
7
|
+
import { b as k, T as P, c as j, a as I } from "./tooltip-Btr9ROSo.js";
|
|
8
|
+
const v = "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] relative flex items-center justify-center outline-1 transition-[color,box-shadow]", T = y(v, {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
// Variantes de botón sólido
|
|
12
|
+
primary: [
|
|
13
|
+
"bg-primary-600 lg:hover:bg-primary-800 text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
14
|
+
],
|
|
15
|
+
secondary: [
|
|
16
|
+
"bg-black text-white outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 lg:hover:bg-neutral-900 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
17
|
+
],
|
|
18
|
+
inverse: [
|
|
19
|
+
"lg:hover:bg-neutral-000 bg-white text-black outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
20
|
+
],
|
|
21
|
+
outline: [
|
|
22
|
+
"text-primary-600 outline-primary-600 lg:hover:bg-primary-050 bg-white disabled:bg-neutral-100 disabled:text-neutral-700 disabled:outline-transparent disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
23
|
+
],
|
|
24
|
+
ghost: [
|
|
25
|
+
"bg-primary-050 text-primary-600 lg:hover:bg-primary-100 outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
26
|
+
],
|
|
27
|
+
destructive: [
|
|
28
|
+
"bg-error-light text-error-main outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
29
|
+
],
|
|
30
|
+
link: [
|
|
31
|
+
"text-primary-600 lg:hover:bg-primary-050 bg-transparent outline-transparent disabled:bg-neutral-100 disabled:text-neutral-700 disabled:lg:hover:bg-neutral-100 disabled:lg:hover:text-neutral-700"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
xl: "h-12 gap-2 px-6 py-1 text-base",
|
|
36
|
+
lg: "h-10 gap-2 px-5 py-1 text-sm",
|
|
37
|
+
md: "h-8 gap-1.5 px-4 py-1 text-xs",
|
|
38
|
+
sm: "h-7 gap-1 px-3 py-1 text-xs",
|
|
39
|
+
xs: "h-6 gap-1 px-3 py-1 text-xs"
|
|
40
|
+
},
|
|
41
|
+
rounded: {
|
|
42
|
+
default: "rounded-2xl",
|
|
43
|
+
full: "rounded-full"
|
|
44
|
+
},
|
|
45
|
+
weight: {
|
|
46
|
+
light: "font-light",
|
|
47
|
+
regular: "font-regular",
|
|
48
|
+
semibold: "font-semibold",
|
|
49
|
+
bold: "font-bold"
|
|
50
|
+
},
|
|
51
|
+
iconPosition: {
|
|
52
|
+
left: "",
|
|
53
|
+
right: "",
|
|
54
|
+
only: "aspect-square"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
compoundVariants: [
|
|
58
|
+
{
|
|
59
|
+
iconPosition: "only",
|
|
60
|
+
variant: "primary",
|
|
61
|
+
class: "outline-neutral-050 text-primary-600 lg:hover:bg-neutral-000 bg-white"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
iconPosition: "only",
|
|
65
|
+
variant: "destructive",
|
|
66
|
+
class: "bg-error-light text-error-main outline-transparent"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
iconPosition: "only",
|
|
70
|
+
variant: "link",
|
|
71
|
+
class: "text-primary-600 lg:hover:bg-primary-050 bg-transparent"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
iconPosition: "only",
|
|
75
|
+
size: "xl",
|
|
76
|
+
class: "h-12 w-12 p-1.5"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
iconPosition: "only",
|
|
80
|
+
size: "lg",
|
|
81
|
+
class: "h-10 w-10 p-1.5"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
iconPosition: "only",
|
|
85
|
+
size: "md",
|
|
86
|
+
class: "h-8 w-8 p-1.5"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
iconPosition: "only",
|
|
90
|
+
size: "sm",
|
|
91
|
+
class: "h-7 w-7 p-1.5"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
iconPosition: "only",
|
|
95
|
+
size: "xs",
|
|
96
|
+
class: "h-6 w-6 p-1.5"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
variant: "link",
|
|
100
|
+
size: "xl",
|
|
101
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
variant: "link",
|
|
105
|
+
size: "lg",
|
|
106
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: "link",
|
|
110
|
+
size: "md",
|
|
111
|
+
class: "h-auto gap-1.5 px-3 py-1 text-sm"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
variant: "link",
|
|
115
|
+
size: "sm",
|
|
116
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
variant: "link",
|
|
120
|
+
size: "xs",
|
|
121
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
variant: "primary",
|
|
126
|
+
size: "xl",
|
|
127
|
+
weight: "semibold",
|
|
128
|
+
rounded: "full",
|
|
129
|
+
iconPosition: "left"
|
|
130
|
+
}
|
|
131
|
+
}), q = y(`${v} cursor-default`, {
|
|
132
|
+
variants: {
|
|
133
|
+
variant: {
|
|
134
|
+
primary: ["bg-primary-800 text-white outline-transparent"],
|
|
135
|
+
secondary: ["bg-neutral-900 text-white outline-transparent"],
|
|
136
|
+
inverse: ["bg-neutral-000 text-black outline-transparent"],
|
|
137
|
+
ghost: ["bg-primary-100 text-primary-600 outline-transparent"],
|
|
138
|
+
outline: ["bg-primary-100 text-primary-600 outline-primary-600"],
|
|
139
|
+
destructive: ["bg-error-light text-error-main outline-transparent"],
|
|
140
|
+
link: ["bg-primary-050 text-primary-600"]
|
|
141
|
+
},
|
|
142
|
+
size: {
|
|
143
|
+
xl: "h-12 gap-2 px-6 text-base",
|
|
144
|
+
lg: "h-10 gap-2 px-5 text-sm",
|
|
145
|
+
md: "h-8 gap-1.5 px-4 text-xs",
|
|
146
|
+
sm: "h-7 gap-1 px-3 text-xs",
|
|
147
|
+
xs: "h-6 gap-1 px-3 text-xs"
|
|
148
|
+
},
|
|
149
|
+
rounded: {
|
|
150
|
+
default: "rounded-2xl",
|
|
151
|
+
full: "rounded-full"
|
|
152
|
+
},
|
|
153
|
+
weight: {
|
|
154
|
+
light: "font-light",
|
|
155
|
+
regular: "font-regular",
|
|
156
|
+
semibold: "font-semibold",
|
|
157
|
+
bold: "font-bold"
|
|
158
|
+
},
|
|
159
|
+
iconPosition: {
|
|
160
|
+
left: "",
|
|
161
|
+
right: "",
|
|
162
|
+
only: "aspect-square"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
compoundVariants: [
|
|
166
|
+
// Loading styles para iconPosition="only"
|
|
167
|
+
{
|
|
168
|
+
iconPosition: "only",
|
|
169
|
+
variant: "primary",
|
|
170
|
+
class: "bg-neutral-000 text-primary-600 outline-neutral-050"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
iconPosition: "only",
|
|
174
|
+
variant: "destructive",
|
|
175
|
+
class: "bg-error-light text-error-main outline-transparent"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
iconPosition: "only",
|
|
179
|
+
variant: "link",
|
|
180
|
+
class: "bg-primary-050 text-primary-600"
|
|
181
|
+
},
|
|
182
|
+
// Tamaños específicos para iconPosition="only" loading
|
|
183
|
+
{
|
|
184
|
+
iconPosition: "only",
|
|
185
|
+
size: "xl",
|
|
186
|
+
class: "h-12 w-12 p-3"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
iconPosition: "only",
|
|
190
|
+
size: "lg",
|
|
191
|
+
class: "h-10 w-10 p-2"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
iconPosition: "only",
|
|
195
|
+
size: "md",
|
|
196
|
+
class: "h-8 w-8 p-1"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
iconPosition: "only",
|
|
200
|
+
size: "sm",
|
|
201
|
+
class: "h-7 w-7 p-0.5"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
iconPosition: "only",
|
|
205
|
+
size: "xs",
|
|
206
|
+
class: "h-6 w-6 p-0.5"
|
|
207
|
+
},
|
|
208
|
+
// Link loading styles
|
|
209
|
+
{
|
|
210
|
+
variant: "link",
|
|
211
|
+
size: "xl",
|
|
212
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
variant: "link",
|
|
216
|
+
size: "lg",
|
|
217
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
variant: "link",
|
|
221
|
+
size: "md",
|
|
222
|
+
class: "h-auto gap-1.5 px-3 py-1 text-sm"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
variant: "link",
|
|
226
|
+
size: "sm",
|
|
227
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
variant: "link",
|
|
231
|
+
size: "xs",
|
|
232
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
defaultVariants: {
|
|
236
|
+
variant: "primary",
|
|
237
|
+
size: "xl",
|
|
238
|
+
weight: "semibold",
|
|
239
|
+
rounded: "full",
|
|
240
|
+
iconPosition: "left"
|
|
241
|
+
}
|
|
242
|
+
}), $ = y(v, {
|
|
243
|
+
variants: {
|
|
244
|
+
variant: {
|
|
245
|
+
primary: ["bg-primary-800 text-white outline-transparent"],
|
|
246
|
+
secondary: ["bg-neutral-900 text-white outline-transparent"],
|
|
247
|
+
inverse: ["bg-neutral-000 text-black outline-transparent"],
|
|
248
|
+
ghost: ["bg-primary-100 text-primary-600 outline-transparent"],
|
|
249
|
+
outline: ["bg-primary-100 text-primary-600 outline-primary-600"],
|
|
250
|
+
destructive: ["bg-error-light text-error-main outline-transparent"],
|
|
251
|
+
link: ["bg-primary-050 text-primary-600"]
|
|
252
|
+
},
|
|
253
|
+
size: {
|
|
254
|
+
xl: "h-12 gap-2 px-6 text-base",
|
|
255
|
+
lg: "h-10 gap-2 px-5 text-sm",
|
|
256
|
+
md: "h-8 gap-1.5 px-4 text-xs",
|
|
257
|
+
sm: "h-7 gap-1 px-3 text-xs",
|
|
258
|
+
xs: "h-6 gap-1 px-3 text-xs"
|
|
259
|
+
},
|
|
260
|
+
rounded: {
|
|
261
|
+
default: "rounded-2xl",
|
|
262
|
+
full: "rounded-full"
|
|
263
|
+
},
|
|
264
|
+
weight: {
|
|
265
|
+
light: "font-light",
|
|
266
|
+
regular: "font-regular",
|
|
267
|
+
semibold: "font-semibold",
|
|
268
|
+
bold: "font-bold"
|
|
269
|
+
},
|
|
270
|
+
iconPosition: {
|
|
271
|
+
left: "",
|
|
272
|
+
right: "",
|
|
273
|
+
only: "aspect-square"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
compoundVariants: [
|
|
277
|
+
// Active styles para iconPosition="only"
|
|
278
|
+
{
|
|
279
|
+
iconPosition: "only",
|
|
280
|
+
variant: "primary",
|
|
281
|
+
class: "bg-neutral-000 text-primary-600 outline-neutral-050"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
iconPosition: "only",
|
|
285
|
+
variant: "destructive",
|
|
286
|
+
class: "bg-error-light text-error-main outline-transparent"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
iconPosition: "only",
|
|
290
|
+
variant: "link",
|
|
291
|
+
class: "bg-primary-050 text-primary-600"
|
|
292
|
+
},
|
|
293
|
+
// Tamaños específicos para iconPosition="only" active
|
|
294
|
+
{
|
|
295
|
+
iconPosition: "only",
|
|
296
|
+
size: "xl",
|
|
297
|
+
class: "h-12 w-12 p-3"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
iconPosition: "only",
|
|
301
|
+
size: "lg",
|
|
302
|
+
class: "h-10 w-10 p-2"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
iconPosition: "only",
|
|
306
|
+
size: "md",
|
|
307
|
+
class: "h-8 w-8 p-1"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
iconPosition: "only",
|
|
311
|
+
size: "sm",
|
|
312
|
+
class: "h-7 w-7 p-0.5"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
iconPosition: "only",
|
|
316
|
+
size: "xs",
|
|
317
|
+
class: "h-6 w-6 p-0.5"
|
|
318
|
+
},
|
|
319
|
+
// Link active styles
|
|
320
|
+
{
|
|
321
|
+
variant: "link",
|
|
322
|
+
size: "xl",
|
|
323
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
variant: "link",
|
|
327
|
+
size: "lg",
|
|
328
|
+
class: "h-auto gap-2 px-3 py-1 text-base"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
variant: "link",
|
|
332
|
+
size: "md",
|
|
333
|
+
class: "h-auto gap-1.5 px-3 py-1 text-sm"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
variant: "link",
|
|
337
|
+
size: "sm",
|
|
338
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
variant: "link",
|
|
342
|
+
size: "xs",
|
|
343
|
+
class: "h-auto gap-1 px-3 py-1 text-xs"
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
defaultVariants: {
|
|
347
|
+
variant: "primary",
|
|
348
|
+
size: "xl",
|
|
349
|
+
weight: "semibold",
|
|
350
|
+
rounded: "full",
|
|
351
|
+
iconPosition: "left"
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
function G({
|
|
355
|
+
className: x,
|
|
356
|
+
variant: u,
|
|
357
|
+
size: i,
|
|
358
|
+
weight: g,
|
|
359
|
+
rounded: d,
|
|
360
|
+
children: c,
|
|
361
|
+
iconName: n,
|
|
362
|
+
iconText: m,
|
|
363
|
+
iconPosition: b = "left",
|
|
364
|
+
isLoading: r,
|
|
365
|
+
isActive: N,
|
|
366
|
+
disabled: f,
|
|
367
|
+
tooltip: l,
|
|
368
|
+
tooltipPlacement: w = "top",
|
|
369
|
+
asChild: S,
|
|
370
|
+
...V
|
|
371
|
+
}) {
|
|
372
|
+
const C = S ? B : "button", e = z.useMemo(() => !c && n || b === "only" ? "only" : b, [c, n, b]), a = z.useMemo(() => n ? typeof n == "string" ? { name: n } : n : null, [n]), o = e === "only" ? {
|
|
373
|
+
xl: "min-w-6 h-6",
|
|
374
|
+
lg: "min-w-6 h-6",
|
|
375
|
+
md: "min-w-5 h-5",
|
|
376
|
+
sm: "min-w-4 h-4",
|
|
377
|
+
xs: "min-w-3.5 h-3.5"
|
|
378
|
+
} : {
|
|
379
|
+
xl: "min-w-5 h-5",
|
|
380
|
+
lg: "min-w-5 h-5",
|
|
381
|
+
md: "min-w-4 h-4",
|
|
382
|
+
sm: "min-w-4 h-4",
|
|
383
|
+
xs: "min-w-3.5 h-3.5"
|
|
384
|
+
}, p = /* @__PURE__ */ t.jsx(
|
|
385
|
+
C,
|
|
386
|
+
{
|
|
387
|
+
className: h(
|
|
388
|
+
r ? q({
|
|
389
|
+
variant: u,
|
|
390
|
+
weight: g,
|
|
391
|
+
size: i,
|
|
392
|
+
rounded: d,
|
|
393
|
+
iconPosition: e,
|
|
394
|
+
className: x
|
|
395
|
+
}) : N ? $({
|
|
396
|
+
variant: u,
|
|
397
|
+
weight: g,
|
|
398
|
+
size: i,
|
|
399
|
+
rounded: d,
|
|
400
|
+
iconPosition: e,
|
|
401
|
+
className: x
|
|
402
|
+
}) : T({
|
|
403
|
+
variant: u,
|
|
404
|
+
weight: g,
|
|
405
|
+
size: i,
|
|
406
|
+
rounded: d,
|
|
407
|
+
iconPosition: e,
|
|
408
|
+
className: x
|
|
409
|
+
})
|
|
410
|
+
),
|
|
411
|
+
disabled: f || r,
|
|
412
|
+
...V,
|
|
413
|
+
children: e === "only" ? (
|
|
414
|
+
// Renderizado para modo icon-only
|
|
415
|
+
/* @__PURE__ */ t.jsx(t.Fragment, { children: r ? /* @__PURE__ */ t.jsx(
|
|
416
|
+
s,
|
|
417
|
+
{
|
|
418
|
+
iconName: "IconLoader2",
|
|
419
|
+
className: h("animate-spin", o[i || "xl"])
|
|
420
|
+
}
|
|
421
|
+
) : a && /* @__PURE__ */ t.jsx(
|
|
422
|
+
s,
|
|
423
|
+
{
|
|
424
|
+
iconName: a.name,
|
|
425
|
+
stroke: a.stroke,
|
|
426
|
+
iconText: m,
|
|
427
|
+
size: 24
|
|
428
|
+
}
|
|
429
|
+
) })
|
|
430
|
+
) : (
|
|
431
|
+
// Renderizado para modo botón normal con texto
|
|
432
|
+
/* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
433
|
+
/* @__PURE__ */ t.jsx(
|
|
434
|
+
"span",
|
|
435
|
+
{
|
|
436
|
+
className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${r ? "visible opacity-100" : "invisible opacity-0"}`,
|
|
437
|
+
children: /* @__PURE__ */ t.jsx(
|
|
438
|
+
s,
|
|
439
|
+
{
|
|
440
|
+
iconName: "IconLoader2",
|
|
441
|
+
className: h("animate-spin", o[i || "xl"])
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
/* @__PURE__ */ t.jsxs(
|
|
447
|
+
"span",
|
|
448
|
+
{
|
|
449
|
+
className: `flex items-center justify-center gap-2 ${r ? "invisible opacity-0" : "visible opacity-100"}`,
|
|
450
|
+
children: [
|
|
451
|
+
a && e === "left" && /* @__PURE__ */ t.jsx(
|
|
452
|
+
s,
|
|
453
|
+
{
|
|
454
|
+
iconName: a.name,
|
|
455
|
+
iconText: m,
|
|
456
|
+
stroke: a.stroke,
|
|
457
|
+
className: o[i || "xl"]
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
c,
|
|
461
|
+
a && e === "right" && /* @__PURE__ */ t.jsx(
|
|
462
|
+
s,
|
|
463
|
+
{
|
|
464
|
+
iconName: a.name,
|
|
465
|
+
iconText: m,
|
|
466
|
+
stroke: a.stroke,
|
|
467
|
+
className: o[i || "xl"]
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
)
|
|
473
|
+
] })
|
|
474
|
+
)
|
|
475
|
+
}
|
|
476
|
+
);
|
|
477
|
+
return l && (f || r) ? /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsxs(P, { children: [
|
|
478
|
+
/* @__PURE__ */ t.jsx(j, { asChild: e === "only", children: e === "only" ? /* @__PURE__ */ t.jsx("div", { className: "inline-block", "aria-disabled": "true", children: p }) : p }),
|
|
479
|
+
/* @__PURE__ */ t.jsx(
|
|
480
|
+
I,
|
|
481
|
+
{
|
|
482
|
+
side: w,
|
|
483
|
+
className: "text-muted-foreground",
|
|
484
|
+
children: l
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
] }) }) : l ? /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsxs(P, { children: [
|
|
488
|
+
/* @__PURE__ */ t.jsx(j, { asChild: e === "only", children: p }),
|
|
489
|
+
/* @__PURE__ */ t.jsx(
|
|
490
|
+
I,
|
|
491
|
+
{
|
|
492
|
+
side: w,
|
|
493
|
+
className: "text-muted-foreground",
|
|
494
|
+
children: l
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
] }) }) : p;
|
|
498
|
+
}
|
|
499
|
+
export {
|
|
500
|
+
G as B,
|
|
501
|
+
q as a,
|
|
502
|
+
$ as b,
|
|
503
|
+
T as c
|
|
504
|
+
};
|