@itilite/lumina-ui 1.1.13 → 1.1.14

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.
@@ -0,0 +1,77 @@
1
+ // src/atom/Button/Button.tsx
2
+ import { Button as AntButton } from "antd";
3
+ import clsx from "clsx";
4
+
5
+ // src/atom/Button/Button.module.scss
6
+ var Button_module_default = { "button": "Button-module__button___cLCyl", "size_large": "Button-module__size_large___S-mbU", "shape_circle": "Button-module__shape_circle___sPUS5", "size_normal": "Button-module__size_normal___qJUMj", "size_small": "Button-module__size_small___IUeei", "type_primary": "Button-module__type_primary___Tauz-", "variant_subtle": "Button-module__variant_subtle___BMbbd", "variant_text": "Button-module__variant_text___Pc5Ia", "variant_link": "Button-module__variant_link___Cj1O9", "disabled": "Button-module__disabled___nwPn4", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
7
+
8
+ // src/atom/Button/Button.tsx
9
+ import { jsx } from "react/jsx-runtime";
10
+ function Button(props) {
11
+ const {
12
+ type = "primary",
13
+ variant = "default",
14
+ size = "normal",
15
+ shape = "round",
16
+ className = "",
17
+ icon = null,
18
+ children,
19
+ onClick,
20
+ href = "",
21
+ disabled = false,
22
+ loading = false,
23
+ onHoverUnderline = false
24
+ } = props;
25
+ const buttonMap = {
26
+ default: "primary",
27
+ subtle: "default",
28
+ text: "text",
29
+ link: "link"
30
+ };
31
+ const sizeMap = {
32
+ small: "small",
33
+ normal: "middle",
34
+ // Map "default" to "middle"
35
+ large: "large"
36
+ };
37
+ return /* @__PURE__ */ jsx(
38
+ AntButton,
39
+ {
40
+ className: clsx(
41
+ Button_module_default.button,
42
+ Button_module_default[`size_${size}`],
43
+ Button_module_default[`variant_${variant}`],
44
+ Button_module_default[`shape_${shape}`],
45
+ Button_module_default[`type_${type}`],
46
+ `size_${size}`,
47
+ `variant_${variant}`,
48
+ `shape_${shape}`,
49
+ `type_${type}`,
50
+ className,
51
+ {
52
+ "tw-cursor-not-allowed": disabled,
53
+ "tw-opacity-40": disabled
54
+ },
55
+ disabled && Button_module_default.disabled,
56
+ onHoverUnderline && Button_module_default.onHoverUnderline
57
+ ),
58
+ "data-testid": "lumina-button",
59
+ disabled,
60
+ href: href || void 0,
61
+ icon,
62
+ loading,
63
+ onClick,
64
+ shape,
65
+ size: sizeMap[size],
66
+ type: buttonMap[variant],
67
+ children
68
+ }
69
+ );
70
+ }
71
+ Button.displayName = "Button";
72
+ var Button_default = Button;
73
+
74
+ export {
75
+ Button,
76
+ Button_default
77
+ };