asterui 0.12.74 → 0.12.75
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
type BaseButtonProps = {
|
|
3
|
+
/** Syntactic sugar for setting variant and color together. Will be overridden by explicit variant & color props. */
|
|
4
|
+
type?: 'primary' | 'default' | 'dashed' | 'link' | 'text';
|
|
3
5
|
/** Button color */
|
|
4
6
|
color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
7
|
/** Button style variant */
|
|
6
|
-
variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link';
|
|
8
|
+
variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link' | 'text';
|
|
7
9
|
/** Button size */
|
|
8
10
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
11
|
/** Active/pressed visual state */
|
|
@@ -12,6 +14,10 @@ type BaseButtonProps = {
|
|
|
12
14
|
loading?: boolean;
|
|
13
15
|
/** Button shape */
|
|
14
16
|
shape?: 'square' | 'circle' | 'wide' | 'block' | 'round';
|
|
17
|
+
/** Make the button full width */
|
|
18
|
+
block?: boolean;
|
|
19
|
+
/** Make background transparent and invert text and border colors */
|
|
20
|
+
ghost?: boolean;
|
|
15
21
|
/** Disable click animation */
|
|
16
22
|
noAnimation?: boolean;
|
|
17
23
|
/** Icon element to display */
|
|
@@ -24,6 +30,8 @@ type BaseButtonProps = {
|
|
|
24
30
|
danger?: boolean;
|
|
25
31
|
/** Toggle button pressed state (sets aria-pressed) */
|
|
26
32
|
pressed?: boolean;
|
|
33
|
+
/** Accessible label for icon-only buttons */
|
|
34
|
+
'aria-label'?: string;
|
|
27
35
|
/** Test ID for testing */
|
|
28
36
|
'data-testid'?: string;
|
|
29
37
|
};
|
|
@@ -1,124 +1,160 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { SizeProvider as
|
|
4
|
-
import { useConfig as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as o, jsxs as U, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Z } from "react";
|
|
3
|
+
import { SizeProvider as _ } from "../contexts/SizeContext.js";
|
|
4
|
+
import { useConfig as tt } from "../providers/ConfigProvider.js";
|
|
5
|
+
const nt = "btn", st = "btn-primary", et = "btn-secondary", at = "btn-accent", ot = "btn-info", it = "btn-success", rt = "btn-warning", ct = "btn-error", dt = "btn-neutral", lt = "btn-outline", bt = "btn-dash", mt = "btn-soft", N = "btn-ghost", ft = "btn-link", ut = "btn-xs", Bt = "btn-sm", ht = "btn-md", kt = "btn-lg", pt = "btn-xl", vt = "btn-active", yt = "btn-square", gt = "btn-circle", xt = "btn-wide", Ct = "btn-block", St = "loading", wt = "loading-spinner", Dt = Z(
|
|
6
6
|
({
|
|
7
|
-
children:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
children: i,
|
|
8
|
+
type: m,
|
|
9
|
+
color: f,
|
|
10
|
+
variant: u,
|
|
11
|
+
size: P,
|
|
12
|
+
active: l = !1,
|
|
12
13
|
loading: t = !1,
|
|
13
|
-
shape:
|
|
14
|
-
|
|
14
|
+
shape: B,
|
|
15
|
+
block: K = !1,
|
|
16
|
+
ghost: j = !1,
|
|
17
|
+
noAnimation: q = !1,
|
|
15
18
|
icon: r,
|
|
16
|
-
iconPlacement:
|
|
17
|
-
iconPosition:
|
|
18
|
-
danger:
|
|
19
|
-
pressed:
|
|
20
|
-
className:
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
iconPlacement: L,
|
|
20
|
+
iconPosition: T,
|
|
21
|
+
danger: $ = !1,
|
|
22
|
+
pressed: c,
|
|
23
|
+
className: A = "",
|
|
24
|
+
"aria-label": h,
|
|
25
|
+
"data-testid": k,
|
|
26
|
+
...d
|
|
27
|
+
}, p) => {
|
|
28
|
+
const { componentSize: E } = tt(), b = P ?? E ?? "md";
|
|
29
|
+
let n = u, v = f;
|
|
30
|
+
if (m && !u && !f)
|
|
31
|
+
switch (m) {
|
|
32
|
+
case "primary":
|
|
33
|
+
n = "solid", v = "primary";
|
|
34
|
+
break;
|
|
35
|
+
case "default":
|
|
36
|
+
n = "outline";
|
|
37
|
+
break;
|
|
38
|
+
case "dashed":
|
|
39
|
+
n = "dash";
|
|
40
|
+
break;
|
|
41
|
+
case "link":
|
|
42
|
+
n = "link";
|
|
43
|
+
break;
|
|
44
|
+
case "text":
|
|
45
|
+
n = "text";
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
const y = $ ? "error" : v, g = j && !n ? "ghost" : n, s = L ?? T ?? "start", x = K && !B ? "block" : B, I = {
|
|
49
|
+
primary: st,
|
|
50
|
+
secondary: et,
|
|
51
|
+
accent: at,
|
|
52
|
+
info: ot,
|
|
53
|
+
success: it,
|
|
54
|
+
warning: rt,
|
|
55
|
+
error: ct,
|
|
56
|
+
neutral: dt
|
|
57
|
+
}, V = {
|
|
34
58
|
solid: "",
|
|
35
59
|
// default, no extra class needed
|
|
36
|
-
outline:
|
|
37
|
-
dash:
|
|
38
|
-
soft:
|
|
39
|
-
ghost:
|
|
40
|
-
link:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
outline: lt,
|
|
61
|
+
dash: bt,
|
|
62
|
+
soft: mt,
|
|
63
|
+
ghost: N,
|
|
64
|
+
link: ft,
|
|
65
|
+
text: N
|
|
66
|
+
// text variant uses ghost styling
|
|
67
|
+
}, W = {
|
|
68
|
+
xs: ut,
|
|
69
|
+
sm: Bt,
|
|
70
|
+
md: ht,
|
|
71
|
+
lg: kt,
|
|
72
|
+
xl: pt
|
|
73
|
+
}, X = {
|
|
74
|
+
square: yt,
|
|
75
|
+
circle: gt,
|
|
76
|
+
wide: xt,
|
|
77
|
+
block: Ct,
|
|
52
78
|
round: "rounded-full"
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
].filter(Boolean).join(" "),
|
|
63
|
-
xs:
|
|
64
|
-
sm:
|
|
65
|
-
md:
|
|
66
|
-
lg:
|
|
67
|
-
xl:
|
|
68
|
-
}[
|
|
69
|
-
t && /* @__PURE__ */ o("span", { className: `${
|
|
70
|
-
!t && r &&
|
|
71
|
-
|
|
72
|
-
!t && r &&
|
|
79
|
+
}, C = [
|
|
80
|
+
nt,
|
|
81
|
+
y && I[y],
|
|
82
|
+
g && V[g],
|
|
83
|
+
W[b],
|
|
84
|
+
l && vt,
|
|
85
|
+
x && X[x],
|
|
86
|
+
q && "no-animation",
|
|
87
|
+
A
|
|
88
|
+
].filter(Boolean).join(" "), F = i != null && i !== "" ? {
|
|
89
|
+
xs: s === "start" ? "mr-1" : "ml-1",
|
|
90
|
+
sm: s === "start" ? "mr-1" : "ml-1",
|
|
91
|
+
md: s === "start" ? "mr-1.5" : "ml-1.5",
|
|
92
|
+
lg: s === "start" ? "mr-2" : "ml-2",
|
|
93
|
+
xl: s === "start" ? "mr-2" : "ml-2"
|
|
94
|
+
}[b] : "", S = r && /* @__PURE__ */ o(_, { size: b, children: /* @__PURE__ */ o("span", { className: `inline-flex items-center ${F}`, "aria-hidden": "true", children: r }) }), w = /* @__PURE__ */ U(Y, { children: [
|
|
95
|
+
t && /* @__PURE__ */ o("span", { className: `${St} ${wt}`, "aria-hidden": "true" }),
|
|
96
|
+
!t && r && s === "start" && S,
|
|
97
|
+
i,
|
|
98
|
+
!t && r && s === "end" && S
|
|
73
99
|
] });
|
|
74
|
-
if ("href" in
|
|
75
|
-
const { href:
|
|
100
|
+
if ("href" in d && d.href !== void 0) {
|
|
101
|
+
const { href: O, disabled: R, onKeyDown: H, onClick: J, ...Q } = d, a = R || t;
|
|
76
102
|
return /* @__PURE__ */ o(
|
|
77
103
|
"a",
|
|
78
104
|
{
|
|
79
|
-
ref:
|
|
80
|
-
href:
|
|
105
|
+
ref: p,
|
|
106
|
+
href: a ? void 0 : O,
|
|
81
107
|
role: "button",
|
|
82
|
-
className:
|
|
83
|
-
"aria-disabled":
|
|
108
|
+
className: C,
|
|
109
|
+
"aria-disabled": a || void 0,
|
|
84
110
|
"aria-busy": t || void 0,
|
|
85
|
-
"aria-pressed":
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
111
|
+
"aria-pressed": c,
|
|
112
|
+
"aria-label": h,
|
|
113
|
+
tabIndex: a ? -1 : 0,
|
|
114
|
+
onKeyDown: (e) => {
|
|
115
|
+
e.key === " " && !a && (e.preventDefault(), e.currentTarget.click()), H?.(e);
|
|
89
116
|
},
|
|
90
|
-
onClick: (
|
|
91
|
-
if (
|
|
92
|
-
|
|
117
|
+
onClick: (e) => {
|
|
118
|
+
if (a) {
|
|
119
|
+
e.preventDefault();
|
|
93
120
|
return;
|
|
94
121
|
}
|
|
95
|
-
|
|
122
|
+
J?.(e);
|
|
96
123
|
},
|
|
97
|
-
"data-testid":
|
|
98
|
-
|
|
99
|
-
|
|
124
|
+
"data-testid": k,
|
|
125
|
+
"data-state-loading": t || void 0,
|
|
126
|
+
"data-state-disabled": a || void 0,
|
|
127
|
+
"data-state-active": l || void 0,
|
|
128
|
+
"data-state-pressed": c,
|
|
129
|
+
...Q,
|
|
130
|
+
children: w
|
|
100
131
|
}
|
|
101
132
|
);
|
|
102
133
|
}
|
|
103
|
-
const { htmlType:
|
|
134
|
+
const { htmlType: G, ...D } = d, M = G ?? "button", z = t || D.disabled;
|
|
104
135
|
return /* @__PURE__ */ o(
|
|
105
136
|
"button",
|
|
106
137
|
{
|
|
107
|
-
ref:
|
|
108
|
-
type:
|
|
109
|
-
className:
|
|
138
|
+
ref: p,
|
|
139
|
+
type: M,
|
|
140
|
+
className: C,
|
|
110
141
|
"aria-busy": t || void 0,
|
|
111
|
-
"aria-pressed":
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
142
|
+
"aria-pressed": c,
|
|
143
|
+
"aria-label": h,
|
|
144
|
+
disabled: z,
|
|
145
|
+
"data-testid": k,
|
|
146
|
+
"data-state-loading": t || void 0,
|
|
147
|
+
"data-state-disabled": z || void 0,
|
|
148
|
+
"data-state-active": l || void 0,
|
|
149
|
+
"data-state-pressed": c,
|
|
150
|
+
...D,
|
|
151
|
+
children: w
|
|
116
152
|
}
|
|
117
153
|
);
|
|
118
154
|
}
|
|
119
155
|
);
|
|
120
|
-
|
|
156
|
+
Dt.displayName = "Button";
|
|
121
157
|
export {
|
|
122
|
-
|
|
158
|
+
Dt as Button
|
|
123
159
|
};
|
|
124
160
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { SizeProvider } from '../contexts/SizeContext'\nimport { useConfig } from '../providers/ConfigProvider'\n\n// DaisyUI classes\nconst dBtn = 'btn'\nconst dBtnPrimary = 'btn-primary'\nconst dBtnSecondary = 'btn-secondary'\nconst dBtnAccent = 'btn-accent'\nconst dBtnInfo = 'btn-info'\nconst dBtnSuccess = 'btn-success'\nconst dBtnWarning = 'btn-warning'\nconst dBtnError = 'btn-error'\nconst dBtnNeutral = 'btn-neutral'\nconst dBtnOutline = 'btn-outline'\nconst dBtnDash = 'btn-dash'\nconst dBtnSoft = 'btn-soft'\nconst dBtnGhost = 'btn-ghost'\nconst dBtnLink = 'btn-link'\nconst dBtnXs = 'btn-xs'\nconst dBtnSm = 'btn-sm'\nconst dBtnMd = 'btn-md'\nconst dBtnLg = 'btn-lg'\nconst dBtnXl = 'btn-xl'\nconst dBtnActive = 'btn-active'\nconst dBtnSquare = 'btn-square'\nconst dBtnCircle = 'btn-circle'\nconst dBtnWide = 'btn-wide'\nconst dBtnBlock = 'btn-block'\nconst dLoading = 'loading'\nconst dLoadingSpinner = 'loading-spinner'\n\ntype BaseButtonProps = {\n /** Button color */\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral'\n /** Button style variant */\n variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link'\n /** Button size */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Active/pressed visual state */\n active?: boolean\n /** Show loading spinner and disable button */\n loading?: boolean\n /** Button shape */\n shape?: 'square' | 'circle' | 'wide' | 'block' | 'round'\n /** Disable click animation */\n noAnimation?: boolean\n /** Icon element to display */\n icon?: React.ReactNode\n /** Position of the icon */\n iconPlacement?: 'start' | 'end'\n /** @deprecated Use iconPlacement instead */\n iconPosition?: 'start' | 'end'\n /** Applies error/danger styling (shorthand for color=\"error\") */\n danger?: boolean\n /** Toggle button pressed state (sets aria-pressed) */\n pressed?: boolean\n /** Test ID for testing */\n 'data-testid'?: string\n}\n\ntype ButtonAsButton = BaseButtonProps &\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & {\n href?: undefined\n htmlType?: 'button' | 'submit' | 'reset'\n }\n\ntype ButtonAsAnchor = BaseButtonProps &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {\n href: string\n htmlType?: undefined\n /** Disable the link button */\n disabled?: boolean\n }\n\nexport type ButtonProps = ButtonAsButton | ButtonAsAnchor\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (\n {\n children,\n color,\n variant,\n size,\n active = false,\n loading = false,\n shape,\n noAnimation = false,\n icon,\n iconPlacement,\n iconPosition,\n danger = false,\n pressed,\n className = '',\n 'data-testid': testId,\n ...props\n },\n ref\n ) => {\n const { componentSize } = useConfig()\n const effectiveSize = size ?? componentSize ?? 'md'\n // danger prop is a shorthand for color=\"error\"\n const effectiveColor = danger ? 'error' : color\n // iconPlacement takes precedence over deprecated iconPosition\n const effectiveIconPlacement = iconPlacement ?? iconPosition ?? 'start'\n\n const colorClasses = {\n primary: dBtnPrimary,\n secondary: dBtnSecondary,\n accent: dBtnAccent,\n info: dBtnInfo,\n success: dBtnSuccess,\n warning: dBtnWarning,\n error: dBtnError,\n neutral: dBtnNeutral,\n }\n\n const variantClasses = {\n solid: '', // default, no extra class needed\n outline: dBtnOutline,\n dash: dBtnDash,\n soft: dBtnSoft,\n ghost: dBtnGhost,\n link: dBtnLink,\n }\n\n const sizeClasses = {\n xs: dBtnXs,\n sm: dBtnSm,\n md: dBtnMd,\n lg: dBtnLg,\n xl: dBtnXl,\n }\n\n const shapeClasses = {\n square: dBtnSquare,\n circle: dBtnCircle,\n wide: dBtnWide,\n block: dBtnBlock,\n round: 'rounded-full',\n }\n\n const classes = [\n dBtn,\n effectiveColor && colorClasses[effectiveColor],\n variant && variantClasses[variant],\n sizeClasses[effectiveSize],\n active && dBtnActive,\n shape && shapeClasses[shape],\n noAnimation && 'no-animation',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Determine icon spacing based on whether there's text content and button size\n const hasChildren = children !== undefined && children !== null && children !== ''\n const spacingBySize = {\n xs: effectiveIconPlacement === 'start' ? 'mr-1' : 'ml-1',\n sm: effectiveIconPlacement === 'start' ? 'mr-1' : 'ml-1',\n md: effectiveIconPlacement === 'start' ? 'mr-1.5' : 'ml-1.5',\n lg: effectiveIconPlacement === 'start' ? 'mr-2' : 'ml-2',\n xl: effectiveIconPlacement === 'start' ? 'mr-2' : 'ml-2',\n }\n const iconSpacing = hasChildren ? spacingBySize[effectiveSize] : ''\n\n const iconElement = icon && (\n <SizeProvider size={effectiveSize}>\n <span className={`inline-flex items-center ${iconSpacing}`} aria-hidden=\"true\">\n {icon}\n </span>\n </SizeProvider>\n )\n\n const content = (\n <>\n {loading && <span className={`${dLoading} ${dLoadingSpinner}`} aria-hidden=\"true\"></span>}\n {!loading && icon && effectiveIconPlacement === 'start' && iconElement}\n {children}\n {!loading && icon && effectiveIconPlacement === 'end' && iconElement}\n </>\n )\n\n if ('href' in props && props.href !== undefined) {\n const { href, disabled, onKeyDown, onClick, ...anchorProps } = props as ButtonAsAnchor & {\n onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n }\n const isDisabled = disabled || loading\n\n // Handle Space key for anchor buttons (links only respond to Enter natively)\n const handleKeyDown = (event: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === ' ' && !isDisabled) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n // Prevent click when disabled\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n if (isDisabled) {\n event.preventDefault()\n return\n }\n onClick?.(event)\n }\n\n return (\n <a\n ref={ref as React.Ref<HTMLAnchorElement>}\n href={isDisabled ? undefined : href}\n role=\"button\"\n className={classes}\n aria-disabled={isDisabled || undefined}\n aria-busy={loading || undefined}\n aria-pressed={pressed}\n tabIndex={isDisabled ? -1 : 0}\n onKeyDown={handleKeyDown}\n onClick={handleClick}\n data-testid={testId}\n {...anchorProps}\n >\n {content}\n </a>\n )\n }\n\n const { htmlType, ...buttonProps } = props as Omit<ButtonAsButton, keyof BaseButtonProps>\n const buttonType: 'button' | 'submit' | 'reset' = htmlType ?? 'button'\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type={buttonType}\n className={classes}\n aria-busy={loading || undefined}\n aria-pressed={pressed}\n disabled={loading || buttonProps.disabled}\n data-testid={testId}\n {...buttonProps}\n >\n {content}\n </button>\n )\n }\n)\n\nButton.displayName = 'Button'\n"],"names":["dBtn","dBtnPrimary","dBtnSecondary","dBtnAccent","dBtnInfo","dBtnSuccess","dBtnWarning","dBtnError","dBtnNeutral","dBtnOutline","dBtnDash","dBtnSoft","dBtnGhost","dBtnLink","dBtnXs","dBtnSm","dBtnMd","dBtnLg","dBtnXl","dBtnActive","dBtnSquare","dBtnCircle","dBtnWide","dBtnBlock","dLoading","dLoadingSpinner","Button","forwardRef","children","color","variant","size","active","loading","shape","noAnimation","icon","iconPlacement","iconPosition","danger","pressed","className","testId","props","ref","componentSize","useConfig","effectiveSize","effectiveColor","effectiveIconPlacement","colorClasses","variantClasses","sizeClasses","shapeClasses","classes","iconSpacing","iconElement","jsx","SizeProvider","content","jsxs","Fragment","href","disabled","onKeyDown","onClick","anchorProps","isDisabled","event","htmlType","buttonProps"],"mappings":";;;;AAKA,MAAMA,IAAO,OACPC,IAAc,eACdC,IAAgB,iBAChBC,IAAa,cACbC,IAAW,YACXC,IAAc,eACdC,IAAc,eACdC,IAAY,aACZC,IAAc,eACdC,IAAc,eACdC,KAAW,YACXC,KAAW,YACXC,KAAY,aACZC,KAAW,YACXC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAa,cACbC,KAAa,cACbC,KAAa,cACbC,KAAW,YACXC,KAAY,aACZC,KAAW,WACXC,KAAkB,mBA+CXC,KAASC;AAAA,EACpB,CACE;AAAA,IACE,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,SAAAC,IAAU;AAAA,IACV,OAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,MAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,SAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,eAAeC;AAAA,IACf,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,eAAAC,EAAA,IAAkBC,EAAA,GACpB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AAAA,QACC,KAAAb;AAAA,QACA,MAJ8CyB,KAAY;AAAA,QAK1D,WAAWf;AAAA,QACX,aAAWrB,KAAW;AAAA,QACtB,gBAAcO;AAAA,QACd,UAAUP,KAAWqC,EAAY;AAAA,QACjC,eAAa5B;AAAA,QACZ,GAAG4B;AAAA,QAEH,UAAAX;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAjC,GAAO,cAAc;"}
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { SizeProvider } from '../contexts/SizeContext'\nimport { useConfig } from '../providers/ConfigProvider'\n\n// DaisyUI classes\nconst dBtn = 'btn'\nconst dBtnPrimary = 'btn-primary'\nconst dBtnSecondary = 'btn-secondary'\nconst dBtnAccent = 'btn-accent'\nconst dBtnInfo = 'btn-info'\nconst dBtnSuccess = 'btn-success'\nconst dBtnWarning = 'btn-warning'\nconst dBtnError = 'btn-error'\nconst dBtnNeutral = 'btn-neutral'\nconst dBtnOutline = 'btn-outline'\nconst dBtnDash = 'btn-dash'\nconst dBtnSoft = 'btn-soft'\nconst dBtnGhost = 'btn-ghost'\nconst dBtnLink = 'btn-link'\nconst dBtnXs = 'btn-xs'\nconst dBtnSm = 'btn-sm'\nconst dBtnMd = 'btn-md'\nconst dBtnLg = 'btn-lg'\nconst dBtnXl = 'btn-xl'\nconst dBtnActive = 'btn-active'\nconst dBtnSquare = 'btn-square'\nconst dBtnCircle = 'btn-circle'\nconst dBtnWide = 'btn-wide'\nconst dBtnBlock = 'btn-block'\nconst dLoading = 'loading'\nconst dLoadingSpinner = 'loading-spinner'\n\ntype BaseButtonProps = {\n /** Syntactic sugar for setting variant and color together. Will be overridden by explicit variant & color props. */\n type?: 'primary' | 'default' | 'dashed' | 'link' | 'text'\n /** Button color */\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral'\n /** Button style variant */\n variant?: 'solid' | 'outline' | 'dash' | 'soft' | 'ghost' | 'link' | 'text'\n /** Button size */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n /** Active/pressed visual state */\n active?: boolean\n /** Show loading spinner and disable button */\n loading?: boolean\n /** Button shape */\n shape?: 'square' | 'circle' | 'wide' | 'block' | 'round'\n /** Make the button full width */\n block?: boolean\n /** Make background transparent and invert text and border colors */\n ghost?: boolean\n /** Disable click animation */\n noAnimation?: boolean\n /** Icon element to display */\n icon?: React.ReactNode\n /** Position of the icon */\n iconPlacement?: 'start' | 'end'\n /** @deprecated Use iconPlacement instead */\n iconPosition?: 'start' | 'end'\n /** Applies error/danger styling (shorthand for color=\"error\") */\n danger?: boolean\n /** Toggle button pressed state (sets aria-pressed) */\n pressed?: boolean\n /** Accessible label for icon-only buttons */\n 'aria-label'?: string\n /** Test ID for testing */\n 'data-testid'?: string\n}\n\ntype ButtonAsButton = BaseButtonProps &\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & {\n href?: undefined\n htmlType?: 'button' | 'submit' | 'reset'\n }\n\ntype ButtonAsAnchor = BaseButtonProps &\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {\n href: string\n htmlType?: undefined\n /** Disable the link button */\n disabled?: boolean\n }\n\nexport type ButtonProps = ButtonAsButton | ButtonAsAnchor\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (\n {\n children,\n type,\n color,\n variant,\n size,\n active = false,\n loading = false,\n shape,\n block = false,\n ghost = false,\n noAnimation = false,\n icon,\n iconPlacement,\n iconPosition,\n danger = false,\n pressed,\n className = '',\n 'aria-label': ariaLabel,\n 'data-testid': testId,\n ...props\n },\n ref\n ) => {\n const { componentSize } = useConfig()\n const effectiveSize = size ?? componentSize ?? 'md'\n\n // Apply type prop (syntactic sugar) - explicit variant/color takes precedence\n let derivedVariant = variant\n let derivedColor = color\n if (type && !variant && !color) {\n switch (type) {\n case 'primary':\n derivedVariant = 'solid'\n derivedColor = 'primary'\n break\n case 'default':\n derivedVariant = 'outline'\n break\n case 'dashed':\n derivedVariant = 'dash'\n break\n case 'link':\n derivedVariant = 'link'\n break\n case 'text':\n derivedVariant = 'text'\n break\n }\n }\n\n // danger prop is a shorthand for color=\"error\"\n const effectiveColor = danger ? 'error' : derivedColor\n const effectiveVariant = ghost && !derivedVariant ? 'ghost' : derivedVariant\n // iconPlacement takes precedence over deprecated iconPosition\n const effectiveIconPlacement = iconPlacement ?? iconPosition ?? 'start'\n // block prop is a shorthand for shape=\"block\"\n const effectiveShape = block && !shape ? 'block' : shape\n\n const colorClasses = {\n primary: dBtnPrimary,\n secondary: dBtnSecondary,\n accent: dBtnAccent,\n info: dBtnInfo,\n success: dBtnSuccess,\n warning: dBtnWarning,\n error: dBtnError,\n neutral: dBtnNeutral,\n }\n\n const variantClasses = {\n solid: '', // default, no extra class needed\n outline: dBtnOutline,\n dash: dBtnDash,\n soft: dBtnSoft,\n ghost: dBtnGhost,\n link: dBtnLink,\n text: dBtnGhost, // text variant uses ghost styling\n }\n\n const sizeClasses = {\n xs: dBtnXs,\n sm: dBtnSm,\n md: dBtnMd,\n lg: dBtnLg,\n xl: dBtnXl,\n }\n\n const shapeClasses = {\n square: dBtnSquare,\n circle: dBtnCircle,\n wide: dBtnWide,\n block: dBtnBlock,\n round: 'rounded-full',\n }\n\n const classes = [\n dBtn,\n effectiveColor && colorClasses[effectiveColor],\n effectiveVariant && variantClasses[effectiveVariant],\n sizeClasses[effectiveSize],\n active && dBtnActive,\n effectiveShape && shapeClasses[effectiveShape],\n noAnimation && 'no-animation',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Determine icon spacing based on whether there's text content and button size\n const hasChildren = children !== undefined && children !== null && children !== ''\n const spacingBySize = {\n xs: effectiveIconPlacement === 'start' ? 'mr-1' : 'ml-1',\n sm: effectiveIconPlacement === 'start' ? 'mr-1' : 'ml-1',\n md: effectiveIconPlacement === 'start' ? 'mr-1.5' : 'ml-1.5',\n lg: effectiveIconPlacement === 'start' ? 'mr-2' : 'ml-2',\n xl: effectiveIconPlacement === 'start' ? 'mr-2' : 'ml-2',\n }\n const iconSpacing = hasChildren ? spacingBySize[effectiveSize] : ''\n\n const iconElement = icon && (\n <SizeProvider size={effectiveSize}>\n <span className={`inline-flex items-center ${iconSpacing}`} aria-hidden=\"true\">\n {icon}\n </span>\n </SizeProvider>\n )\n\n const content = (\n <>\n {loading && <span className={`${dLoading} ${dLoadingSpinner}`} aria-hidden=\"true\"></span>}\n {!loading && icon && effectiveIconPlacement === 'start' && iconElement}\n {children}\n {!loading && icon && effectiveIconPlacement === 'end' && iconElement}\n </>\n )\n\n if ('href' in props && props.href !== undefined) {\n const { href, disabled, onKeyDown, onClick, ...anchorProps } = props as ButtonAsAnchor & {\n onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n }\n const isDisabled = disabled || loading\n\n // Handle Space key for anchor buttons (links only respond to Enter natively)\n const handleKeyDown = (event: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === ' ' && !isDisabled) {\n event.preventDefault()\n event.currentTarget.click()\n }\n onKeyDown?.(event)\n }\n\n // Prevent click when disabled\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n if (isDisabled) {\n event.preventDefault()\n return\n }\n onClick?.(event)\n }\n\n return (\n <a\n ref={ref as React.Ref<HTMLAnchorElement>}\n href={isDisabled ? undefined : href}\n role=\"button\"\n className={classes}\n aria-disabled={isDisabled || undefined}\n aria-busy={loading || undefined}\n aria-pressed={pressed}\n aria-label={ariaLabel}\n tabIndex={isDisabled ? -1 : 0}\n onKeyDown={handleKeyDown}\n onClick={handleClick}\n data-testid={testId}\n data-state-loading={loading || undefined}\n data-state-disabled={isDisabled || undefined}\n data-state-active={active || undefined}\n data-state-pressed={pressed}\n {...anchorProps}\n >\n {content}\n </a>\n )\n }\n\n const { htmlType, ...buttonProps } = props as Omit<ButtonAsButton, keyof BaseButtonProps>\n const buttonType: 'button' | 'submit' | 'reset' = htmlType ?? 'button'\n const isDisabled = loading || buttonProps.disabled\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type={buttonType}\n className={classes}\n aria-busy={loading || undefined}\n aria-pressed={pressed}\n aria-label={ariaLabel}\n disabled={isDisabled}\n data-testid={testId}\n data-state-loading={loading || undefined}\n data-state-disabled={isDisabled || undefined}\n data-state-active={active || undefined}\n data-state-pressed={pressed}\n {...buttonProps}\n >\n {content}\n </button>\n )\n }\n)\n\nButton.displayName = 'Button'\n"],"names":["dBtn","dBtnPrimary","dBtnSecondary","dBtnAccent","dBtnInfo","dBtnSuccess","dBtnWarning","dBtnError","dBtnNeutral","dBtnOutline","dBtnDash","dBtnSoft","dBtnGhost","dBtnLink","dBtnXs","dBtnSm","dBtnMd","dBtnLg","dBtnXl","dBtnActive","dBtnSquare","dBtnCircle","dBtnWide","dBtnBlock","dLoading","dLoadingSpinner","Button","forwardRef","children","type","color","variant","size","active","loading","shape","block","ghost","noAnimation","icon","iconPlacement","iconPosition","danger","pressed","className","ariaLabel","testId","props","ref","componentSize","useConfig","effectiveSize","derivedVariant","derivedColor","effectiveColor","effectiveVariant","effectiveIconPlacement","effectiveShape","colorClasses","variantClasses","sizeClasses","shapeClasses","classes","iconSpacing","iconElement","jsx","SizeProvider","content","jsxs","Fragment","href","disabled","onKeyDown","onClick","anchorProps","isDisabled","event","htmlType","buttonProps","buttonType"],"mappings":";;;;AAKA,MAAMA,KAAO,OACPC,KAAc,eACdC,KAAgB,iBAChBC,KAAa,cACbC,KAAW,YACXC,KAAc,eACdC,KAAc,eACdC,KAAY,aACZC,KAAc,eACdC,KAAc,eACdC,KAAW,YACXC,KAAW,YACXC,IAAY,aACZC,KAAW,YACXC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAS,UACTC,KAAa,cACbC,KAAa,cACbC,KAAa,cACbC,KAAW,YACXC,KAAY,aACZC,KAAW,WAC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