asterui 0.12.41 → 0.12.43
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/components/Button.d.ts +1 -0
- package/dist/components/Button.js +60 -52
- package/dist/components/Button.js.map +1 -1
- package/dist/components/QRCode.js +44 -55
- package/dist/components/QRCode.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +185 -184
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
export declare const IconSizeContext: React.Context<"xs" | "sm" | "md" | "lg" | "xl" | undefined>;
|
|
2
3
|
type BaseButtonProps = {
|
|
3
4
|
/** Button color */
|
|
4
5
|
color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as r, jsxs as I, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as F } from "react";
|
|
3
|
+
const $ = F(void 0), Q = ({
|
|
4
|
+
children: a,
|
|
5
|
+
color: p,
|
|
6
|
+
variant: i,
|
|
7
|
+
size: c = "md",
|
|
8
|
+
active: x = !1,
|
|
9
|
+
loading: t = !1,
|
|
10
|
+
shape: d,
|
|
11
|
+
noAnimation: C = !1,
|
|
12
|
+
icon: l,
|
|
13
|
+
iconPosition: n = "start",
|
|
14
|
+
danger: k = !1,
|
|
14
15
|
pressed: b,
|
|
15
|
-
className:
|
|
16
|
-
...
|
|
16
|
+
className: v = "",
|
|
17
|
+
...o
|
|
17
18
|
}) => {
|
|
18
|
-
const
|
|
19
|
+
const m = k ? "error" : p, g = {
|
|
19
20
|
primary: "btn-primary",
|
|
20
21
|
secondary: "btn-secondary",
|
|
21
22
|
accent: "btn-accent",
|
|
@@ -24,7 +25,7 @@ const J = ({
|
|
|
24
25
|
warning: "btn-warning",
|
|
25
26
|
error: "btn-error",
|
|
26
27
|
neutral: "btn-neutral"
|
|
27
|
-
},
|
|
28
|
+
}, w = {
|
|
28
29
|
solid: "",
|
|
29
30
|
// default, no extra class needed
|
|
30
31
|
outline: "btn-outline",
|
|
@@ -32,13 +33,13 @@ const J = ({
|
|
|
32
33
|
soft: "btn-soft",
|
|
33
34
|
ghost: "btn-ghost",
|
|
34
35
|
link: "btn-link"
|
|
35
|
-
},
|
|
36
|
+
}, D = {
|
|
36
37
|
xs: "btn-xs",
|
|
37
38
|
sm: "btn-sm",
|
|
38
39
|
md: "",
|
|
39
40
|
lg: "btn-lg",
|
|
40
41
|
xl: "btn-xl"
|
|
41
|
-
},
|
|
42
|
+
}, B = {
|
|
42
43
|
square: "btn-square",
|
|
43
44
|
circle: "btn-circle",
|
|
44
45
|
wide: "btn-wide",
|
|
@@ -46,61 +47,68 @@ const J = ({
|
|
|
46
47
|
round: "rounded-full"
|
|
47
48
|
}, u = [
|
|
48
49
|
"btn",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
].filter(Boolean).join(" "),
|
|
57
|
-
n
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
m && g[m],
|
|
51
|
+
i && w[i],
|
|
52
|
+
D[c],
|
|
53
|
+
x && "btn-active",
|
|
54
|
+
d && B[d],
|
|
55
|
+
C && "no-animation",
|
|
56
|
+
v
|
|
57
|
+
].filter(Boolean).join(" "), K = a != null && a !== "" ? {
|
|
58
|
+
xs: n === "start" ? "mr-1" : "ml-1",
|
|
59
|
+
sm: n === "start" ? "mr-1" : "ml-1",
|
|
60
|
+
md: n === "start" ? "mr-1.5" : "ml-1.5",
|
|
61
|
+
lg: n === "start" ? "mr-2" : "ml-2",
|
|
62
|
+
xl: n === "start" ? "mr-2" : "ml-2"
|
|
63
|
+
}[c] : "", f = l && /* @__PURE__ */ r($.Provider, { value: c, children: /* @__PURE__ */ r("span", { className: `inline-flex items-center ${K}`, "aria-hidden": "true", children: l }) }), h = /* @__PURE__ */ I(E, { children: [
|
|
64
|
+
t && /* @__PURE__ */ r("span", { className: "loading loading-spinner", "aria-hidden": "true" }),
|
|
65
|
+
!t && l && n === "start" && f,
|
|
66
|
+
a,
|
|
67
|
+
!t && l && n === "end" && f
|
|
61
68
|
] });
|
|
62
|
-
if ("href" in
|
|
63
|
-
const { href:
|
|
64
|
-
return /* @__PURE__ */
|
|
69
|
+
if ("href" in o && o.href !== void 0) {
|
|
70
|
+
const { href: S, disabled: T, onKeyDown: j, onClick: q, ...z } = o, s = T || t;
|
|
71
|
+
return /* @__PURE__ */ r(
|
|
65
72
|
"a",
|
|
66
73
|
{
|
|
67
|
-
href:
|
|
74
|
+
href: s ? void 0 : S,
|
|
68
75
|
role: "button",
|
|
69
76
|
className: u,
|
|
70
|
-
"aria-disabled":
|
|
71
|
-
"aria-busy":
|
|
77
|
+
"aria-disabled": s || void 0,
|
|
78
|
+
"aria-busy": t || void 0,
|
|
72
79
|
"aria-pressed": b,
|
|
73
|
-
tabIndex:
|
|
74
|
-
onKeyDown: (
|
|
75
|
-
|
|
80
|
+
tabIndex: s ? -1 : 0,
|
|
81
|
+
onKeyDown: (e) => {
|
|
82
|
+
e.key === " " && !s && (e.preventDefault(), e.currentTarget.click()), j?.(e);
|
|
76
83
|
},
|
|
77
|
-
onClick: (
|
|
78
|
-
if (
|
|
79
|
-
|
|
84
|
+
onClick: (e) => {
|
|
85
|
+
if (s) {
|
|
86
|
+
e.preventDefault();
|
|
80
87
|
return;
|
|
81
88
|
}
|
|
82
|
-
|
|
89
|
+
q?.(e);
|
|
83
90
|
},
|
|
84
|
-
...
|
|
91
|
+
...z,
|
|
85
92
|
children: h
|
|
86
93
|
}
|
|
87
94
|
);
|
|
88
95
|
}
|
|
89
|
-
const { htmlType:
|
|
90
|
-
return /* @__PURE__ */
|
|
96
|
+
const { htmlType: N, ...y } = o;
|
|
97
|
+
return /* @__PURE__ */ r(
|
|
91
98
|
"button",
|
|
92
99
|
{
|
|
93
|
-
type:
|
|
100
|
+
type: N ?? "button",
|
|
94
101
|
className: u,
|
|
95
|
-
"aria-busy":
|
|
102
|
+
"aria-busy": t || void 0,
|
|
96
103
|
"aria-pressed": b,
|
|
97
|
-
disabled:
|
|
98
|
-
...
|
|
104
|
+
disabled: t || y.disabled,
|
|
105
|
+
...y,
|
|
99
106
|
children: h
|
|
100
107
|
}
|
|
101
108
|
);
|
|
102
109
|
};
|
|
103
110
|
export {
|
|
104
|
-
|
|
111
|
+
Q as Button,
|
|
112
|
+
$ as IconSizeContext
|
|
105
113
|
};
|
|
106
114
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React from 'react'\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 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}\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: React.FC<ButtonProps> = ({\n children,\n color,\n variant,\n size = 'md',\n active = false,\n loading = false,\n shape,\n noAnimation = false,\n icon,\n iconPosition = 'start',\n danger = false,\n pressed,\n className = '',\n ...props\n}) => {\n // danger prop is a shorthand for color=\"error\"\n const effectiveColor = danger ? 'error' : color\n\n const colorClasses = {\n primary: 'btn-primary',\n secondary: 'btn-secondary',\n accent: 'btn-accent',\n info: 'btn-info',\n success: 'btn-success',\n warning: 'btn-warning',\n error: 'btn-error',\n neutral: 'btn-neutral',\n }\n\n const variantClasses = {\n solid: '', // default, no extra class needed\n outline: 'btn-outline',\n dash: 'btn-dash',\n soft: 'btn-soft',\n ghost: 'btn-ghost',\n link: 'btn-link',\n }\n\n const sizeClasses = {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: '',\n lg: 'btn-lg',\n xl: 'btn-xl',\n }\n\n const shapeClasses = {\n square: 'btn-square',\n circle: 'btn-circle',\n wide: 'btn-wide',\n block: 'btn-block',\n round: 'rounded-full',\n }\n\n const classes = [\n 'btn',\n effectiveColor && colorClasses[effectiveColor],\n variant && variantClasses[variant],\n sizeClasses[size],\n active && 'btn-active',\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\n const hasChildren = children !== undefined && children !== null && children !== ''\n const
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React, { createContext } from 'react'\n\nexport const IconSizeContext = createContext<'xs' | 'sm' | 'md' | 'lg' | 'xl' | undefined>(undefined)\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 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}\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: React.FC<ButtonProps> = ({\n children,\n color,\n variant,\n size = 'md',\n active = false,\n loading = false,\n shape,\n noAnimation = false,\n icon,\n iconPosition = 'start',\n danger = false,\n pressed,\n className = '',\n ...props\n}) => {\n // danger prop is a shorthand for color=\"error\"\n const effectiveColor = danger ? 'error' : color\n\n const colorClasses = {\n primary: 'btn-primary',\n secondary: 'btn-secondary',\n accent: 'btn-accent',\n info: 'btn-info',\n success: 'btn-success',\n warning: 'btn-warning',\n error: 'btn-error',\n neutral: 'btn-neutral',\n }\n\n const variantClasses = {\n solid: '', // default, no extra class needed\n outline: 'btn-outline',\n dash: 'btn-dash',\n soft: 'btn-soft',\n ghost: 'btn-ghost',\n link: 'btn-link',\n }\n\n const sizeClasses = {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: '',\n lg: 'btn-lg',\n xl: 'btn-xl',\n }\n\n const shapeClasses = {\n square: 'btn-square',\n circle: 'btn-circle',\n wide: 'btn-wide',\n block: 'btn-block',\n round: 'rounded-full',\n }\n\n const classes = [\n 'btn',\n effectiveColor && colorClasses[effectiveColor],\n variant && variantClasses[variant],\n sizeClasses[size],\n active && 'btn-active',\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: iconPosition === 'start' ? 'mr-1' : 'ml-1',\n sm: iconPosition === 'start' ? 'mr-1' : 'ml-1',\n md: iconPosition === 'start' ? 'mr-1.5' : 'ml-1.5',\n lg: iconPosition === 'start' ? 'mr-2' : 'ml-2',\n xl: iconPosition === 'start' ? 'mr-2' : 'ml-2',\n }\n const iconSpacing = hasChildren ? spacingBySize[size] : ''\n\n const iconElement = icon && (\n <IconSizeContext.Provider value={size}>\n <span className={`inline-flex items-center ${iconSpacing}`} aria-hidden=\"true\">\n {icon}\n </span>\n </IconSizeContext.Provider>\n )\n\n const content = (\n <>\n {loading && <span className=\"loading loading-spinner\" aria-hidden=\"true\"></span>}\n {!loading && icon && iconPosition === 'start' && iconElement}\n {children}\n {!loading && icon && iconPosition === '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 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 {...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 type={buttonType}\n className={classes}\n aria-busy={loading || undefined}\n aria-pressed={pressed}\n disabled={loading || buttonProps.disabled}\n {...buttonProps}\n >\n {content}\n </button>\n )\n}\n"],"names":["IconSizeContext","createContext","Button","children","color","variant","size","active","loading","shape","noAnimation","icon","iconPosition","danger","pressed","className","props","effectiveColor","colorClasses","variantClasses","sizeClasses","shapeClasses","classes","iconSpacing","iconElement","jsx","content","jsxs","Fragment","href","disabled","onKeyDown","onClick","anchorProps","isDisabled","event","htmlType","buttonProps"],"mappings":";;AAEO,MAAMA,IAAkBC,EAA4D,MAAS,GA2CvFC,IAAgC,CAAC;AAAA,EAC5C,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,MAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,QAAAC,IAAS;AAAA,EACT,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAAM;AAEJ,QAAMC,IAAiBJ,IAAS,UAAUT,GAEpCc,IAAe;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OA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|
1
|
+
import { jsx as e, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Q, useState as j, useEffect as R } from "react";
|
|
3
|
+
import F from "qrcode";
|
|
4
|
+
const k = ({
|
|
5
|
+
value: m,
|
|
6
|
+
size: a = 160,
|
|
6
7
|
errorLevel: v = "M",
|
|
7
8
|
icon: f,
|
|
8
|
-
iconSize:
|
|
9
|
-
type:
|
|
10
|
-
color:
|
|
11
|
-
bgColor:
|
|
12
|
-
bordered:
|
|
13
|
-
status:
|
|
14
|
-
onRefresh:
|
|
15
|
-
className:
|
|
9
|
+
iconSize: t = 40,
|
|
10
|
+
type: h = "canvas",
|
|
11
|
+
color: x = "#000000",
|
|
12
|
+
bgColor: g = "#FFFFFF",
|
|
13
|
+
bordered: l = !0,
|
|
14
|
+
status: n = "active",
|
|
15
|
+
onRefresh: p,
|
|
16
|
+
className: C = "",
|
|
16
17
|
...c
|
|
17
18
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, [
|
|
22
|
-
if (
|
|
19
|
+
const s = Q(null), [w, i] = j(n === "loading");
|
|
20
|
+
R(() => {
|
|
21
|
+
i(n === "loading");
|
|
22
|
+
}, [n]), R(() => {
|
|
23
|
+
if (n !== "active" || !m) return;
|
|
23
24
|
(async () => {
|
|
24
25
|
try {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
o = await import("qrcode");
|
|
29
|
-
} catch {
|
|
30
|
-
L(!0), l(!1);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (g === "canvas" && r.current && (await o.toCanvas(r.current, h, {
|
|
34
|
-
width: t,
|
|
26
|
+
if (i(!0), h === "canvas" && s.current && (await F.toCanvas(s.current, m, {
|
|
27
|
+
width: a,
|
|
35
28
|
margin: 1,
|
|
36
29
|
color: {
|
|
37
|
-
dark:
|
|
38
|
-
light:
|
|
30
|
+
dark: x,
|
|
31
|
+
light: g
|
|
39
32
|
},
|
|
40
33
|
errorCorrectionLevel: v
|
|
41
34
|
}), f)) {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
},
|
|
35
|
+
const o = s.current.getContext("2d");
|
|
36
|
+
if (o) {
|
|
37
|
+
const d = new Image();
|
|
38
|
+
d.crossOrigin = "anonymous", d.onload = () => {
|
|
39
|
+
const u = (a - t) / 2, b = (a - t) / 2;
|
|
40
|
+
o.fillStyle = g, o.fillRect(u - 4, b - 4, t + 8, t + 8), o.drawImage(d, u, b, t, t);
|
|
41
|
+
}, d.src = f;
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
|
-
|
|
52
|
-
} catch (
|
|
53
|
-
console.error("QR Code generation error:",
|
|
44
|
+
i(!1);
|
|
45
|
+
} catch (N) {
|
|
46
|
+
console.error("QR Code generation error:", N), i(!1);
|
|
54
47
|
}
|
|
55
48
|
})();
|
|
56
|
-
}, [
|
|
57
|
-
const
|
|
49
|
+
}, [m, a, v, f, t, h, x, g, n]);
|
|
50
|
+
const r = [
|
|
58
51
|
"inline-flex items-center justify-center",
|
|
59
|
-
|
|
52
|
+
l && "border border-base-content/20 p-3",
|
|
60
53
|
"bg-base-100",
|
|
61
|
-
|
|
54
|
+
C
|
|
62
55
|
].filter(Boolean).join(" ");
|
|
63
|
-
return
|
|
64
|
-
/* @__PURE__ */ e("svg", { className: "w-6 h-6 text-warning", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
|
|
65
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-base-content/70 whitespace-nowrap", children: "Missing dependency" }),
|
|
66
|
-
/* @__PURE__ */ e("code", { className: "text-xs bg-base-200 px-1 py-0.5 rounded whitespace-nowrap", children: "npm install qrcode" })
|
|
67
|
-
] }) }) : s === "loading" || k ? /* @__PURE__ */ e("div", { className: i, style: { width: t + (n ? 24 : 0), height: t + (n ? 24 : 0) }, "data-state": "loading", ...c, children: /* @__PURE__ */ x("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
56
|
+
return n === "loading" || w ? /* @__PURE__ */ e("div", { className: r, style: { width: a + (l ? 24 : 0), height: a + (l ? 24 : 0) }, "data-state": "loading", ...c, children: /* @__PURE__ */ y("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
68
57
|
/* @__PURE__ */ e("span", { className: "loading loading-spinner loading-lg" }),
|
|
69
58
|
/* @__PURE__ */ e("span", { className: "text-sm text-base-content/70", children: "Loading..." })
|
|
70
|
-
] }) }) :
|
|
59
|
+
] }) }) : n === "expired" ? /* @__PURE__ */ e("div", { className: r, style: { width: a + (l ? 24 : 0), height: a + (l ? 24 : 0) }, "data-state": "expired", ...c, children: /* @__PURE__ */ y("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
71
60
|
/* @__PURE__ */ e("svg", { className: "w-12 h-12 text-base-content/30", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
|
|
72
61
|
"path",
|
|
73
62
|
{
|
|
@@ -77,12 +66,12 @@ const F = ({
|
|
|
77
66
|
}
|
|
78
67
|
) }),
|
|
79
68
|
/* @__PURE__ */ e("span", { className: "text-sm text-base-content/70", children: "QR Code Expired" }),
|
|
80
|
-
|
|
81
|
-
] }) }) :
|
|
69
|
+
p && /* @__PURE__ */ e("button", { className: "btn btn-sm btn-primary", onClick: p, children: "Refresh" })
|
|
70
|
+
] }) }) : h === "canvas" ? /* @__PURE__ */ e("div", { className: "inline-block", "data-state": "active", ...c, children: /* @__PURE__ */ e("div", { className: r, children: /* @__PURE__ */ e("canvas", { ref: s, style: { display: "block" } }) }) }) : /* @__PURE__ */ e("div", { className: "inline-block", "data-state": "active", ...c, children: /* @__PURE__ */ e("div", { className: r, children: /* @__PURE__ */ e("div", { style: { width: a, height: a }, className: "bg-base-content/5", children: /* @__PURE__ */ e("span", { className: "text-xs text-base-content/50", children: "SVG mode placeholder" }) }) }) });
|
|
82
71
|
};
|
|
83
|
-
|
|
72
|
+
k.displayName = "QRCode";
|
|
84
73
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
k as QRCode,
|
|
75
|
+
k as default
|
|
87
76
|
};
|
|
88
77
|
//# sourceMappingURL=QRCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QRCode.js","sources":["../../src/components/QRCode.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\n\nexport type QRCodeErrorLevel = 'L' | 'M' | 'Q' | 'H'\nexport type QRCodeType = 'canvas' | 'svg'\nexport type QRCodeStatus = 'active' | 'loading' | 'expired'\n\nexport interface QRCodeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {\n value: string\n size?: number\n errorLevel?: QRCodeErrorLevel\n icon?: string\n iconSize?: number\n type?: QRCodeType\n color?: string\n bgColor?: string\n bordered?: boolean\n status?: QRCodeStatus\n onRefresh?: () => void\n}\n\nexport const QRCode: React.FC<QRCodeProps> = ({\n value,\n size = 160,\n errorLevel = 'M',\n icon,\n iconSize = 40,\n type = 'canvas',\n color = '#000000',\n bgColor = '#FFFFFF',\n bordered = true,\n status = 'active',\n onRefresh,\n className = '',\n ...rest\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null)\n const [loading, setLoading] = useState(status === 'loading')\n
|
|
1
|
+
{"version":3,"file":"QRCode.js","sources":["../../src/components/QRCode.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react'\nimport QRCodeLib from 'qrcode'\n\nexport type QRCodeErrorLevel = 'L' | 'M' | 'Q' | 'H'\nexport type QRCodeType = 'canvas' | 'svg'\nexport type QRCodeStatus = 'active' | 'loading' | 'expired'\n\nexport interface QRCodeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> {\n value: string\n size?: number\n errorLevel?: QRCodeErrorLevel\n icon?: string\n iconSize?: number\n type?: QRCodeType\n color?: string\n bgColor?: string\n bordered?: boolean\n status?: QRCodeStatus\n onRefresh?: () => void\n}\n\nexport const QRCode: React.FC<QRCodeProps> = ({\n value,\n size = 160,\n errorLevel = 'M',\n icon,\n iconSize = 40,\n type = 'canvas',\n color = '#000000',\n bgColor = '#FFFFFF',\n bordered = true,\n status = 'active',\n onRefresh,\n className = '',\n ...rest\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null)\n const [loading, setLoading] = useState(status === 'loading')\n\n useEffect(() => {\n setLoading(status === 'loading')\n }, [status])\n\n useEffect(() => {\n if (status !== 'active' || !value) return\n\n const generateQRCode = async () => {\n try {\n setLoading(true)\n\n if (type === 'canvas' && canvasRef.current) {\n await QRCodeLib.toCanvas(canvasRef.current, value, {\n width: size,\n margin: 1,\n color: {\n dark: color,\n light: bgColor,\n },\n errorCorrectionLevel: errorLevel,\n })\n\n if (icon) {\n const canvas = canvasRef.current\n const ctx = canvas.getContext('2d')\n if (ctx) {\n const img = new Image()\n img.crossOrigin = 'anonymous'\n img.onload = () => {\n const iconX = (size - iconSize) / 2\n const iconY = (size - iconSize) / 2\n ctx.fillStyle = bgColor\n ctx.fillRect(iconX - 4, iconY - 4, iconSize + 8, iconSize + 8)\n ctx.drawImage(img, iconX, iconY, iconSize, iconSize)\n }\n img.src = icon\n }\n }\n }\n\n setLoading(false)\n } catch (error) {\n console.error('QR Code generation error:', error)\n setLoading(false)\n }\n }\n\n generateQRCode()\n }, [value, size, errorLevel, icon, iconSize, type, color, bgColor, status])\n\n // Download functionality can be implemented by consumers\n // by accessing the canvas ref and converting to data URL\n\n const containerClasses = [\n 'inline-flex items-center justify-center',\n bordered && 'border border-base-content/20 p-3',\n 'bg-base-100',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n if (status === 'loading' || loading) {\n return (\n <div className={containerClasses} style={{ width: size + (bordered ? 24 : 0), height: size + (bordered ? 24 : 0) }} data-state=\"loading\" {...rest}>\n <div className=\"flex flex-col items-center justify-center gap-2\">\n <span className=\"loading loading-spinner loading-lg\"></span>\n <span className=\"text-sm text-base-content/70\">Loading...</span>\n </div>\n </div>\n )\n }\n\n if (status === 'expired') {\n return (\n <div className={containerClasses} style={{ width: size + (bordered ? 24 : 0), height: size + (bordered ? 24 : 0) }} data-state=\"expired\" {...rest}>\n <div className=\"flex flex-col items-center justify-center gap-2\">\n <svg className=\"w-12 h-12 text-base-content/30\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n <span className=\"text-sm text-base-content/70\">QR Code Expired</span>\n {onRefresh && (\n <button className=\"btn btn-sm btn-primary\" onClick={onRefresh}>\n Refresh\n </button>\n )}\n </div>\n </div>\n )\n }\n\n if (type === 'canvas') {\n return (\n <div className=\"inline-block\" data-state=\"active\" {...rest}>\n <div className={containerClasses}>\n <canvas ref={canvasRef} style={{ display: 'block' }} />\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"inline-block\" data-state=\"active\" {...rest}>\n <div className={containerClasses}>\n <div style={{ width: size, height: size }} className=\"bg-base-content/5\">\n <span className=\"text-xs text-base-content/50\">SVG mode placeholder</span>\n </div>\n </div>\n </div>\n )\n}\n\nQRCode.displayName = 'QRCode'\n\nexport default QRCode\n"],"names":["QRCode","value","size","errorLevel","icon","iconSize","type","color","bgColor","bordered","status","onRefresh","className","rest","canvasRef","useRef","loading","setLoading","useState","useEffect","QRCodeLib","ctx","img","iconX","iconY","error","containerClasses","jsx","jsxs"],"mappings":";;;AAqBO,MAAMA,IAAgC,CAAC;AAAA,EAC5C,OAA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BAAe;AAAA,IAC7DhB,KACC,gBAAAgB,EAAC,UAAA,EAAO,WAAU,0BAAyB,SAAShB,GAAW,UAAA,UAAA,CAE/D;AAAA,EAAA,EAAA,CAEJ,EAAA,CACF,IAIAL,MAAS,WAET,gBAAAqB,EAAC,SAAI,WAAU,gBAAe,cAAW,UAAU,GAAGd,GACpD,UAAA,gBAAAc,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA,gBAAAC,EAAC,UAAA,EAAO,KAAKb,GAAW,OAAO,EAAE,SAAS,QAAA,GAAW,EAAA,CACvD,EAAA,CACF,IAKF,gBAAAa,EAAC,OAAA,EAAI,WAAU,gBAAe,cAAW,UAAU,GAAGd,GACpD,UAAA,gBAAAc,EAAC,OAAA,EAAI,WAAWD,GACd,4BAAC,OAAA,EAAI,OAAO,EAAE,OAAOxB,GAAM,QAAQA,EAAA,GAAQ,WAAU,qBACnD,UAAA,gBAAAyB,EAAC,QAAA,EAAK,WAAU,gCAA+B,UAAA,uBAAA,CAAoB,EAAA,CACrE,GACF,GACF;AAEJ;AAEA3B,EAAO,cAAc;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { Badge } from './components/Badge';
|
|
|
12
12
|
export type { BadgeProps, BadgeRibbonProps, BadgePosition, BadgeStatus, BadgeType, BadgeVariant, BadgeSize } from './components/Badge';
|
|
13
13
|
export { Breadcrumb } from './components/Breadcrumb';
|
|
14
14
|
export type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb';
|
|
15
|
-
export { Button } from './components/Button';
|
|
15
|
+
export { Button, IconSizeContext } from './components/Button';
|
|
16
16
|
export type { ButtonProps } from './components/Button';
|
|
17
17
|
export { CopyButton } from './components/CopyButton';
|
|
18
18
|
export type { CopyButtonProps } from './components/CopyButton';
|
package/dist/index.js
CHANGED
|
@@ -1,219 +1,220 @@
|
|
|
1
1
|
import { Affix as e } from "./components/Affix.js";
|
|
2
2
|
import { Anchor as p } from "./components/Anchor.js";
|
|
3
|
-
import { Alert as
|
|
3
|
+
import { Alert as x } from "./components/Alert.js";
|
|
4
4
|
import { Autocomplete as a } from "./components/Autocomplete.js";
|
|
5
|
-
import { Avatar as
|
|
5
|
+
import { Avatar as i, AvatarGroup as s } from "./components/Avatar.js";
|
|
6
6
|
import { Badge as u } from "./components/Badge.js";
|
|
7
7
|
import { Breadcrumb as d } from "./components/Breadcrumb.js";
|
|
8
|
-
import { Button as T } from "./components/Button.js";
|
|
9
|
-
import { CopyButton as
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Chat as
|
|
12
|
-
import { ColorPicker as
|
|
13
|
-
import { Card as
|
|
14
|
-
import { Cascader as
|
|
8
|
+
import { Button as T, IconSizeContext as g } from "./components/Button.js";
|
|
9
|
+
import { CopyButton as P } from "./components/CopyButton.js";
|
|
10
|
+
import { Checkbox as b } from "./components/Checkbox.js";
|
|
11
|
+
import { Chat as D } from "./components/Chat.js";
|
|
12
|
+
import { ColorPicker as y } from "./components/ColorPicker.js";
|
|
13
|
+
import { Card as h } from "./components/Card.js";
|
|
14
|
+
import { Cascader as B } from "./components/Cascader.js";
|
|
15
15
|
import { Carousel as A } from "./components/Carousel.js";
|
|
16
|
-
import { Collapse as
|
|
17
|
-
import { Container as
|
|
18
|
-
import { ContextMenu as
|
|
16
|
+
import { Collapse as L } from "./components/Collapse.js";
|
|
17
|
+
import { Container as G } from "./components/Container.js";
|
|
18
|
+
import { ContextMenu as W } from "./components/ContextMenu.js";
|
|
19
19
|
import { Countdown as N } from "./components/Countdown.js";
|
|
20
|
-
import { DatePicker as
|
|
21
|
-
import { Descriptions as
|
|
22
|
-
import { Diff as
|
|
23
|
-
import { Dock as
|
|
24
|
-
import { Divider as
|
|
25
|
-
import { Drawer as
|
|
26
|
-
import { ResponsiveDrawer as
|
|
27
|
-
import { Fieldset as
|
|
28
|
-
import { FileInput as
|
|
29
|
-
import { Filter as
|
|
30
|
-
import { Flex as
|
|
20
|
+
import { DatePicker as E } from "./components/DatePicker.js";
|
|
21
|
+
import { Descriptions as U } from "./components/Descriptions.js";
|
|
22
|
+
import { Diff as q } from "./components/Diff.js";
|
|
23
|
+
import { Dock as V } from "./components/Dock.js";
|
|
24
|
+
import { Divider as Y } from "./components/Divider.js";
|
|
25
|
+
import { Drawer as _ } from "./components/Drawer.js";
|
|
26
|
+
import { ResponsiveDrawer as oo } from "./components/ResponsiveDrawer.js";
|
|
27
|
+
import { Fieldset as eo } from "./components/Fieldset.js";
|
|
28
|
+
import { FileInput as po } from "./components/FileInput.js";
|
|
29
|
+
import { Filter as xo } from "./components/Filter.js";
|
|
30
|
+
import { Flex as ao } from "./components/Flex.js";
|
|
31
31
|
import { FloatButton as io } from "./components/FloatButton.js";
|
|
32
|
-
import { Footer as
|
|
33
|
-
import { Form as
|
|
34
|
-
import { Col as
|
|
35
|
-
import { Hero as
|
|
36
|
-
import { HoverGallery as
|
|
37
|
-
import { Image as
|
|
38
|
-
import { Dropdown as
|
|
39
|
-
import { Empty as
|
|
32
|
+
import { Footer as lo } from "./components/Footer.js";
|
|
33
|
+
import { Form as co, useFormInstance as Co } from "./components/Form.js";
|
|
34
|
+
import { Col as go, Grid as So, Row as Po } from "./components/Grid.js";
|
|
35
|
+
import { Hero as bo } from "./components/Hero.js";
|
|
36
|
+
import { HoverGallery as Do } from "./components/HoverGallery.js";
|
|
37
|
+
import { Image as yo } from "./components/Image.js";
|
|
38
|
+
import { Dropdown as ho } from "./components/Dropdown.js";
|
|
39
|
+
import { Empty as Bo } from "./components/Empty.js";
|
|
40
40
|
import { Input as Ao } from "./components/Input.js";
|
|
41
|
-
import { InputNumber as
|
|
42
|
-
import { Join as
|
|
43
|
-
import { Kbd as
|
|
41
|
+
import { InputNumber as Lo } from "./components/InputNumber.js";
|
|
42
|
+
import { Join as Go } from "./components/Join.js";
|
|
43
|
+
import { Kbd as Wo } from "./components/Kbd.js";
|
|
44
44
|
import { Layout as No, useSiderContext as Oo } from "./components/Layout.js";
|
|
45
|
-
import { List as
|
|
46
|
-
import { Loading as
|
|
47
|
-
import { Mask as
|
|
48
|
-
import { Masonry as
|
|
49
|
-
import { Mention as
|
|
50
|
-
import { Menu as
|
|
51
|
-
import { Browser as
|
|
52
|
-
import { Code as
|
|
53
|
-
import { Phone as
|
|
45
|
+
import { List as Jo } from "./components/List.js";
|
|
46
|
+
import { Loading as jo } from "./components/Loading.js";
|
|
47
|
+
import { Mask as Qo } from "./components/Mask.js";
|
|
48
|
+
import { Masonry as Xo } from "./components/Masonry.js";
|
|
49
|
+
import { Mention as Zo } from "./components/Mention.js";
|
|
50
|
+
import { Menu as $o } from "./components/Menu.js";
|
|
51
|
+
import { Browser as rr } from "./components/Browser.js";
|
|
52
|
+
import { Code as tr } from "./components/Code.js";
|
|
53
|
+
import { Phone as mr } from "./components/Phone.js";
|
|
54
54
|
import { Window as fr } from "./components/Window.js";
|
|
55
|
-
import { Modal as
|
|
56
|
-
import { Navbar as
|
|
57
|
-
import { notification as
|
|
58
|
-
import { OTPInput as
|
|
59
|
-
import { Pagination as
|
|
60
|
-
import { Popconfirm as
|
|
61
|
-
import { Popover as
|
|
62
|
-
import { Progress as
|
|
63
|
-
import { Radio as
|
|
64
|
-
import { RadialProgress as
|
|
65
|
-
import { Range as
|
|
66
|
-
import { Rating as
|
|
67
|
-
import { Result as
|
|
68
|
-
import { Select as
|
|
69
|
-
import { Segmented as
|
|
70
|
-
import { Skeleton as
|
|
55
|
+
import { Modal as nr } from "./components/Modal.js";
|
|
56
|
+
import { Navbar as sr } from "./components/Navbar.js";
|
|
57
|
+
import { notification as ur } from "./components/Notification.js";
|
|
58
|
+
import { OTPInput as dr } from "./components/OTPInput.js";
|
|
59
|
+
import { Pagination as Tr } from "./components/Pagination.js";
|
|
60
|
+
import { Popconfirm as Sr } from "./components/Popconfirm.js";
|
|
61
|
+
import { Popover as kr } from "./components/Popover.js";
|
|
62
|
+
import { Progress as vr } from "./components/Progress.js";
|
|
63
|
+
import { Radio as wr } from "./components/Radio.js";
|
|
64
|
+
import { RadialProgress as Rr } from "./components/RadialProgress.js";
|
|
65
|
+
import { Range as Fr } from "./components/Range.js";
|
|
66
|
+
import { Rating as Ir } from "./components/Rating.js";
|
|
67
|
+
import { Result as Mr } from "./components/Result.js";
|
|
68
|
+
import { Select as Hr } from "./components/Select.js";
|
|
69
|
+
import { Segmented as Kr } from "./components/Segmented.js";
|
|
70
|
+
import { Skeleton as zr } from "./components/Skeleton.js";
|
|
71
71
|
import { Space as Or } from "./components/Space.js";
|
|
72
|
-
import { Splitter as
|
|
73
|
-
import { Stats as
|
|
74
|
-
import { Status as
|
|
75
|
-
import { Steps as
|
|
76
|
-
import { Table as
|
|
77
|
-
import { Tabs as
|
|
78
|
-
import { Textarea as
|
|
79
|
-
import { TextRotate as
|
|
80
|
-
import { CheckableTag as
|
|
81
|
-
import { ThemeController as
|
|
82
|
-
import { TimePicker as
|
|
83
|
-
import { Timeline as
|
|
84
|
-
import { Toggle as
|
|
85
|
-
import { Tour as
|
|
86
|
-
import { Tooltip as
|
|
87
|
-
import { Transfer as
|
|
88
|
-
import { Tree as
|
|
89
|
-
import { TreeSelect as
|
|
90
|
-
import { Typography as
|
|
91
|
-
import { Upload as
|
|
72
|
+
import { Splitter as Jr } from "./components/Splitter.js";
|
|
73
|
+
import { Stats as jr } from "./components/Stat.js";
|
|
74
|
+
import { Status as Qr } from "./components/Status.js";
|
|
75
|
+
import { Steps as Xr } from "./components/Steps.js";
|
|
76
|
+
import { Table as Zr } from "./components/Table.js";
|
|
77
|
+
import { Tabs as $r } from "./components/Tabs.js";
|
|
78
|
+
import { Textarea as re } from "./components/Textarea.js";
|
|
79
|
+
import { TextRotate as te } from "./components/TextRotate.js";
|
|
80
|
+
import { CheckableTag as me, Tag as xe, TagLiveRegion as fe } from "./components/Tag.js";
|
|
81
|
+
import { ThemeController as ne } from "./components/ThemeController.js";
|
|
82
|
+
import { TimePicker as se } from "./components/TimePicker.js";
|
|
83
|
+
import { Timeline as ue } from "./components/Timeline.js";
|
|
84
|
+
import { Toggle as de } from "./components/Toggle.js";
|
|
85
|
+
import { Tour as Te } from "./components/Tour.js";
|
|
86
|
+
import { Tooltip as Se } from "./components/Tooltip.js";
|
|
87
|
+
import { Transfer as ke } from "./components/Transfer.js";
|
|
88
|
+
import { Tree as ve } from "./components/Tree.js";
|
|
89
|
+
import { TreeSelect as we, TreeSelectComponent as ye } from "./components/TreeSelect.js";
|
|
90
|
+
import { Typography as he } from "./components/Typography.js";
|
|
91
|
+
import { Upload as Be } from "./components/Upload.js";
|
|
92
92
|
import { Watermark as Ae } from "./components/Watermark.js";
|
|
93
|
-
import { Hide as
|
|
94
|
-
import { useBreakpoint as
|
|
95
|
-
import { useDisclosure as
|
|
93
|
+
import { Hide as Le, Show as He } from "./components/Responsive.js";
|
|
94
|
+
import { useBreakpoint as Ke } from "./hooks/useBreakpoint.js";
|
|
95
|
+
import { useDisclosure as ze } from "./hooks/useDisclosure.js";
|
|
96
96
|
import { useClipboard as Oe } from "./hooks/useClipboard.js";
|
|
97
|
-
import { useLocalStorage as
|
|
98
|
-
import { useDebounce as
|
|
99
|
-
import { useClickOutside as
|
|
100
|
-
import { usePrevious as
|
|
101
|
-
import { useHover as
|
|
102
|
-
import { useKeyPress as
|
|
103
|
-
import { useWindowSize as
|
|
97
|
+
import { useLocalStorage as Je } from "./hooks/useLocalStorage.js";
|
|
98
|
+
import { useDebounce as je } from "./hooks/useDebounce.js";
|
|
99
|
+
import { useClickOutside as Qe } from "./hooks/useClickOutside.js";
|
|
100
|
+
import { usePrevious as Xe } from "./hooks/usePrevious.js";
|
|
101
|
+
import { useHover as Ze } from "./hooks/useHover.js";
|
|
102
|
+
import { useKeyPress as $e, useKeyPressCallback as ot } from "./hooks/useKeyPress.js";
|
|
103
|
+
import { useWindowSize as et } from "./hooks/useWindowSize.js";
|
|
104
104
|
export {
|
|
105
105
|
e as Affix,
|
|
106
|
-
|
|
106
|
+
x as Alert,
|
|
107
107
|
p as Anchor,
|
|
108
108
|
a as Autocomplete,
|
|
109
|
-
|
|
109
|
+
i as Avatar,
|
|
110
110
|
s as AvatarGroup,
|
|
111
111
|
u as Badge,
|
|
112
112
|
d as Breadcrumb,
|
|
113
|
-
|
|
113
|
+
rr as Browser,
|
|
114
114
|
T as Button,
|
|
115
|
-
|
|
115
|
+
h as Card,
|
|
116
116
|
A as Carousel,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
B as Cascader,
|
|
118
|
+
D as Chat,
|
|
119
|
+
me as CheckableTag,
|
|
120
|
+
b as Checkbox,
|
|
121
|
+
tr as Code,
|
|
122
|
+
go as Col,
|
|
123
|
+
L as Collapse,
|
|
124
|
+
y as ColorPicker,
|
|
125
|
+
G as Container,
|
|
126
|
+
W as ContextMenu,
|
|
127
|
+
P as CopyButton,
|
|
128
128
|
N as Countdown,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
E as DatePicker,
|
|
130
|
+
U as Descriptions,
|
|
131
|
+
q as Diff,
|
|
132
|
+
Y as Divider,
|
|
133
|
+
V as Dock,
|
|
134
|
+
_ as Drawer,
|
|
135
|
+
ho as Dropdown,
|
|
136
|
+
Bo as Empty,
|
|
137
|
+
eo as Fieldset,
|
|
138
|
+
po as FileInput,
|
|
139
|
+
xo as Filter,
|
|
140
|
+
ao as Flex,
|
|
141
141
|
io as FloatButton,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
lo as Footer,
|
|
143
|
+
co as Form,
|
|
144
|
+
So as Grid,
|
|
145
|
+
bo as Hero,
|
|
146
|
+
Le as Hide,
|
|
147
|
+
Do as HoverGallery,
|
|
148
|
+
g as IconSizeContext,
|
|
149
|
+
yo as Image,
|
|
149
150
|
Ao as Input,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
Lo as InputNumber,
|
|
152
|
+
Go as Join,
|
|
153
|
+
Wo as Kbd,
|
|
153
154
|
No as Layout,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
155
|
+
Jo as List,
|
|
156
|
+
jo as Loading,
|
|
157
|
+
Qo as Mask,
|
|
158
|
+
Xo as Masonry,
|
|
159
|
+
Zo as Mention,
|
|
160
|
+
$o as Menu,
|
|
161
|
+
nr as Modal,
|
|
162
|
+
sr as Navbar,
|
|
163
|
+
dr as OTPInput,
|
|
164
|
+
Tr as Pagination,
|
|
165
|
+
mr as Phone,
|
|
166
|
+
Sr as Popconfirm,
|
|
167
|
+
kr as Popover,
|
|
168
|
+
vr as Progress,
|
|
169
|
+
Rr as RadialProgress,
|
|
170
|
+
wr as Radio,
|
|
171
|
+
Fr as Range,
|
|
172
|
+
Ir as Rating,
|
|
173
|
+
oo as ResponsiveDrawer,
|
|
174
|
+
Mr as Result,
|
|
175
|
+
Po as Row,
|
|
176
|
+
Kr as Segmented,
|
|
177
|
+
Hr as Select,
|
|
178
|
+
He as Show,
|
|
179
|
+
zr as Skeleton,
|
|
179
180
|
Or as Space,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
Jr as Splitter,
|
|
182
|
+
jr as Stats,
|
|
183
|
+
Qr as Status,
|
|
184
|
+
Xr as Steps,
|
|
185
|
+
Zr as Table,
|
|
186
|
+
$r as Tabs,
|
|
187
|
+
xe as Tag,
|
|
187
188
|
fe as TagLiveRegion,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
189
|
+
te as TextRotate,
|
|
190
|
+
re as Textarea,
|
|
191
|
+
ne as ThemeController,
|
|
192
|
+
se as TimePicker,
|
|
193
|
+
ue as Timeline,
|
|
194
|
+
de as Toggle,
|
|
195
|
+
Se as Tooltip,
|
|
196
|
+
Te as Tour,
|
|
197
|
+
ke as Transfer,
|
|
198
|
+
ve as Tree,
|
|
199
|
+
we as TreeSelect,
|
|
200
|
+
ye as TreeSelectComponent,
|
|
201
|
+
he as Typography,
|
|
202
|
+
Be as Upload,
|
|
202
203
|
Ae as Watermark,
|
|
203
204
|
fr as Window,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
ur as notification,
|
|
206
|
+
Ke as useBreakpoint,
|
|
207
|
+
Qe as useClickOutside,
|
|
207
208
|
Oe as useClipboard,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
je as useDebounce,
|
|
210
|
+
ze as useDisclosure,
|
|
211
|
+
Co as useFormInstance,
|
|
212
|
+
Ze as useHover,
|
|
213
|
+
$e as useKeyPress,
|
|
214
|
+
ot as useKeyPressCallback,
|
|
215
|
+
Je as useLocalStorage,
|
|
216
|
+
Xe as usePrevious,
|
|
216
217
|
Oo as useSiderContext,
|
|
217
|
-
|
|
218
|
+
et as useWindowSize
|
|
218
219
|
};
|
|
219
220
|
//# sourceMappingURL=index.js.map
|