@itilite/lumina-ui 1.1.1 → 1.1.3
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/atom/Avatar/Avatar.js +4 -2
- package/dist/atom/Avatar/Avatar.mjs +1 -1
- package/dist/atom/Button/Button.js +1 -1
- package/dist/atom/Button/Button.mjs +1 -1
- package/dist/atom/Modal/Modal.js +1 -1
- package/dist/atom/Modal/Modal.mjs +2 -2
- package/dist/chunk-AF2RKLH6.mjs +77 -0
- package/dist/chunk-IWO2Y5QX.mjs +89 -0
- package/dist/chunk-UQJ3BDM4.mjs +141 -0
- package/dist/index.js +5 -3
- package/dist/index.mjs +11 -11
- package/dist/styles.css +306 -302
- package/package.json +1 -1
- package/dist/Avatar.d.mts +0 -17
- package/dist/Avatar.d.ts +0 -17
- package/dist/Avatar.js +0 -121
- package/dist/Avatar.mjs +0 -9
- package/dist/Button.d.mts +0 -25
- package/dist/Button.d.ts +0 -25
- package/dist/Button.js +0 -111
- package/dist/Button.mjs +0 -9
- package/dist/Checkbox.d.mts +0 -20
- package/dist/Checkbox.d.ts +0 -20
- package/dist/Checkbox.js +0 -121
- package/dist/Checkbox.mjs +0 -9
- package/dist/Modal.d.mts +0 -25
- package/dist/Modal.d.ts +0 -25
- package/dist/Modal.js +0 -267
- package/dist/Modal.mjs +0 -10
- package/dist/Radio.d.mts +0 -17
- package/dist/Radio.d.ts +0 -17
- package/dist/Radio.js +0 -122
- package/dist/Radio.mjs +0 -9
- package/dist/Switch.d.mts +0 -13
- package/dist/Switch.d.ts +0 -13
- package/dist/Switch.js +0 -102
- package/dist/Switch.mjs +0 -9
- package/dist/Tag.d.mts +0 -13
- package/dist/Tag.d.ts +0 -13
- package/dist/Tag.js +0 -108
- package/dist/Tag.mjs +0 -9
- package/dist/Tooltip.d.mts +0 -12
- package/dist/Tooltip.d.ts +0 -12
- package/dist/Tooltip.js +0 -97
- package/dist/Tooltip.mjs +0 -9
|
@@ -81,6 +81,8 @@ function Avatar({
|
|
|
81
81
|
width = 28,
|
|
82
82
|
size = "normal"
|
|
83
83
|
}) {
|
|
84
|
+
var _a;
|
|
85
|
+
const firstChar = (_a = name == null ? void 0 : name[0]) == null ? void 0 : _a.toUpperCase();
|
|
84
86
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
87
|
"div",
|
|
86
88
|
{
|
|
@@ -90,7 +92,7 @@ function Avatar({
|
|
|
90
92
|
"div",
|
|
91
93
|
{
|
|
92
94
|
style: {
|
|
93
|
-
backgroundColor: COLOR_MAP[
|
|
95
|
+
backgroundColor: COLOR_MAP[firstChar],
|
|
94
96
|
height,
|
|
95
97
|
width
|
|
96
98
|
},
|
|
@@ -99,7 +101,7 @@ function Avatar({
|
|
|
99
101
|
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
100
102
|
className
|
|
101
103
|
),
|
|
102
|
-
children:
|
|
104
|
+
children: firstChar
|
|
103
105
|
}
|
|
104
106
|
) : img ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
107
|
"img",
|
|
@@ -38,7 +38,7 @@ var import_antd = require("antd");
|
|
|
38
38
|
var import_clsx = __toESM(require("clsx"));
|
|
39
39
|
|
|
40
40
|
// src/atom/Button/Button.module.scss
|
|
41
|
-
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", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
|
|
41
|
+
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" };
|
|
42
42
|
|
|
43
43
|
// src/atom/Button/Button.tsx
|
|
44
44
|
var import_jsx_runtime = require("react/jsx-runtime");
|
package/dist/atom/Modal/Modal.js
CHANGED
|
@@ -74,7 +74,7 @@ var import_antd = require("antd");
|
|
|
74
74
|
var import_clsx = __toESM(require("clsx"));
|
|
75
75
|
|
|
76
76
|
// src/atom/Button/Button.module.scss
|
|
77
|
-
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", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
|
|
77
|
+
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" };
|
|
78
78
|
|
|
79
79
|
// src/atom/Button/Button.tsx
|
|
80
80
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -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 = "default",
|
|
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
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// src/atom/Avatar/Avatar.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var COLOR_MAP = {
|
|
5
|
+
A: "#6455BF",
|
|
6
|
+
B: "#C46273",
|
|
7
|
+
C: "#52A79E",
|
|
8
|
+
D: "#DF8654",
|
|
9
|
+
E: "#B8639F",
|
|
10
|
+
F: "#6455BF",
|
|
11
|
+
G: "#C46273",
|
|
12
|
+
H: "#52A79E",
|
|
13
|
+
I: "#DF8654",
|
|
14
|
+
J: "#B8639F",
|
|
15
|
+
K: "#6455BF",
|
|
16
|
+
L: "#C46273",
|
|
17
|
+
M: "#52A79E",
|
|
18
|
+
N: "#DF8654",
|
|
19
|
+
O: "#B8639F",
|
|
20
|
+
P: "#6455BF",
|
|
21
|
+
Q: "#C46273",
|
|
22
|
+
R: "#52A79E",
|
|
23
|
+
S: "#DF8654",
|
|
24
|
+
T: "#B8639F",
|
|
25
|
+
U: "#6455BF",
|
|
26
|
+
V: "#C46273",
|
|
27
|
+
W: "#52A79E",
|
|
28
|
+
X: "#DF8654",
|
|
29
|
+
Y: "#B8639F",
|
|
30
|
+
Z: "#6455BF",
|
|
31
|
+
0: "#6455BF",
|
|
32
|
+
1: "#C46273",
|
|
33
|
+
6: "#C46273",
|
|
34
|
+
2: "#52A79E",
|
|
35
|
+
7: "#52A79E",
|
|
36
|
+
3: "#DF8654",
|
|
37
|
+
8: "#DF8654",
|
|
38
|
+
4: "#B8639F",
|
|
39
|
+
9: "#B8639F"
|
|
40
|
+
};
|
|
41
|
+
function Avatar({
|
|
42
|
+
img,
|
|
43
|
+
className,
|
|
44
|
+
name,
|
|
45
|
+
height = 28,
|
|
46
|
+
width = 28,
|
|
47
|
+
size = "normal"
|
|
48
|
+
}) {
|
|
49
|
+
var _a;
|
|
50
|
+
const firstChar = (_a = name == null ? void 0 : name[0]) == null ? void 0 : _a.toUpperCase();
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
style: { height, width },
|
|
55
|
+
className: "tw-rounded-full tw-flex tw-items-center",
|
|
56
|
+
children: !img && name ? /* @__PURE__ */ jsx(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
style: {
|
|
60
|
+
backgroundColor: COLOR_MAP[firstChar],
|
|
61
|
+
height,
|
|
62
|
+
width
|
|
63
|
+
},
|
|
64
|
+
className: clsx(
|
|
65
|
+
{ "tw-text-font-size-10": size === "small" },
|
|
66
|
+
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
children: firstChar
|
|
70
|
+
}
|
|
71
|
+
) : img ? /* @__PURE__ */ jsx(
|
|
72
|
+
"img",
|
|
73
|
+
{
|
|
74
|
+
src: img,
|
|
75
|
+
style: { height, width },
|
|
76
|
+
alt: name,
|
|
77
|
+
className: clsx("tw-rounded-full tw-object-cover", className)
|
|
78
|
+
}
|
|
79
|
+
) : null
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
Avatar.displayName = "Avatar";
|
|
84
|
+
var Avatar_default = Avatar;
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
Avatar,
|
|
88
|
+
Avatar_default
|
|
89
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-AF2RKLH6.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-FWCSY2DS.mjs";
|
|
9
|
+
|
|
10
|
+
// src/atom/Modal/Modal.tsx
|
|
11
|
+
import { Modal as AntModal } from "antd";
|
|
12
|
+
import clsx from "clsx";
|
|
13
|
+
|
|
14
|
+
// src/atom/Modal/Modal.module.scss
|
|
15
|
+
var Modal_module_default = { "modal": "Modal-module__modal___PKrAi", "footerMargintopDisable": "Modal-module__footerMargintopDisable___4B6u-", "ant-modal-footer": "Modal-module__ant-modal-footer___HKsDR", "okBtn": "Modal-module__okBtn___Ut8e5", "cancelBtn": "Modal-module__cancelBtn___i0Rm8" };
|
|
16
|
+
|
|
17
|
+
// src/atom/Modal/Modal.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var Close = (_a) => {
|
|
20
|
+
var _b = _a, { size = 14, color = "#B6BAC3" } = _b, rest = __objRest(_b, ["size", "color"]);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"svg",
|
|
23
|
+
__spreadProps(__spreadValues({
|
|
24
|
+
width: size,
|
|
25
|
+
height: size,
|
|
26
|
+
viewBox: "0 0 14 14",
|
|
27
|
+
fill: "none",
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29
|
+
}, rest), {
|
|
30
|
+
children: /* @__PURE__ */ jsx(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
d: "M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L7 5.58579L12.2929 0.292893C12.6834 -0.0976311 13.3166 -0.0976311 13.7071 0.292893C14.0976 0.683417 14.0976 1.31658 13.7071 1.70711L8.41421 7L13.7071 12.2929C14.0976 12.6834 14.0976 13.3166 13.7071 13.7071C13.3166 14.0976 12.6834 14.0976 12.2929 13.7071L7 8.41421L1.70711 13.7071C1.31658 14.0976 0.683417 14.0976 0.292893 13.7071C-0.0976311 13.3166 -0.0976311 12.6834 0.292893 12.2929L5.58579 7L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z",
|
|
34
|
+
fill: color
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
})
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
var Modal = (_a) => {
|
|
41
|
+
var _b = _a, {
|
|
42
|
+
className = "",
|
|
43
|
+
title = "",
|
|
44
|
+
children,
|
|
45
|
+
open = false,
|
|
46
|
+
handleOk,
|
|
47
|
+
handleCancel,
|
|
48
|
+
okText = "",
|
|
49
|
+
cancelText = "",
|
|
50
|
+
closeIcon = /* @__PURE__ */ jsx(Close, { color: "#6B7280" }),
|
|
51
|
+
bodyClassName = "modalBody",
|
|
52
|
+
outsideClickDisable = false,
|
|
53
|
+
hideCross = false,
|
|
54
|
+
okButtonLoading = false,
|
|
55
|
+
okButtonDisabled = false,
|
|
56
|
+
variant = "primary",
|
|
57
|
+
okBtnClasses = "",
|
|
58
|
+
cancelButtonAnalytics = {},
|
|
59
|
+
okButtonAnalytics = {},
|
|
60
|
+
footerMargintopDisable = true
|
|
61
|
+
} = _b, rest = __objRest(_b, [
|
|
62
|
+
"className",
|
|
63
|
+
"title",
|
|
64
|
+
"children",
|
|
65
|
+
"open",
|
|
66
|
+
"handleOk",
|
|
67
|
+
"handleCancel",
|
|
68
|
+
"okText",
|
|
69
|
+
"cancelText",
|
|
70
|
+
"closeIcon",
|
|
71
|
+
"bodyClassName",
|
|
72
|
+
"outsideClickDisable",
|
|
73
|
+
"hideCross",
|
|
74
|
+
"okButtonLoading",
|
|
75
|
+
"okButtonDisabled",
|
|
76
|
+
"variant",
|
|
77
|
+
"okBtnClasses",
|
|
78
|
+
"cancelButtonAnalytics",
|
|
79
|
+
"okButtonAnalytics",
|
|
80
|
+
"footerMargintopDisable"
|
|
81
|
+
]);
|
|
82
|
+
return /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
|
|
83
|
+
AntModal,
|
|
84
|
+
__spreadProps(__spreadValues({
|
|
85
|
+
title,
|
|
86
|
+
open,
|
|
87
|
+
onOk: handleOk,
|
|
88
|
+
onCancel: handleCancel,
|
|
89
|
+
className: clsx(Modal_module_default.modal, className, {
|
|
90
|
+
footerMargintopDisable
|
|
91
|
+
}),
|
|
92
|
+
okText,
|
|
93
|
+
cancelText,
|
|
94
|
+
closeIcon,
|
|
95
|
+
closable: !hideCross,
|
|
96
|
+
maskClosable: !outsideClickDisable,
|
|
97
|
+
footer: okText || cancelText ? /* @__PURE__ */ jsxs(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: clsx({
|
|
101
|
+
primaryFooter: variant === "primary",
|
|
102
|
+
secondaryFooter: variant === "secondary"
|
|
103
|
+
}),
|
|
104
|
+
children: [
|
|
105
|
+
cancelText && /* @__PURE__ */ jsx(
|
|
106
|
+
Button,
|
|
107
|
+
__spreadProps(__spreadValues({
|
|
108
|
+
onClick: handleCancel,
|
|
109
|
+
type: "secondary",
|
|
110
|
+
className: "cancelBtn",
|
|
111
|
+
variant: "subtle"
|
|
112
|
+
}, cancelButtonAnalytics), {
|
|
113
|
+
children: cancelText
|
|
114
|
+
})
|
|
115
|
+
),
|
|
116
|
+
okText && /* @__PURE__ */ jsx(
|
|
117
|
+
Button,
|
|
118
|
+
__spreadProps(__spreadValues({
|
|
119
|
+
onClick: handleOk,
|
|
120
|
+
className: clsx(okBtnClasses, "okBtn"),
|
|
121
|
+
loading: okButtonLoading,
|
|
122
|
+
disabled: okButtonDisabled
|
|
123
|
+
}, okButtonAnalytics), {
|
|
124
|
+
children: okText
|
|
125
|
+
})
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
) : null
|
|
130
|
+
}, rest), {
|
|
131
|
+
children: /* @__PURE__ */ jsx("div", { className: bodyClassName, children })
|
|
132
|
+
})
|
|
133
|
+
) });
|
|
134
|
+
};
|
|
135
|
+
Modal.displayName = "Modal";
|
|
136
|
+
var Modal_default = Modal;
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
Modal,
|
|
140
|
+
Modal_default
|
|
141
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var import_antd = require("antd");
|
|
|
75
75
|
var import_clsx = __toESM(require("clsx"));
|
|
76
76
|
|
|
77
77
|
// src/atom/Button/Button.module.scss
|
|
78
|
-
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", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
|
|
78
|
+
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" };
|
|
79
79
|
|
|
80
80
|
// src/atom/Button/Button.tsx
|
|
81
81
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -506,6 +506,8 @@ function Avatar({
|
|
|
506
506
|
width = 28,
|
|
507
507
|
size = "normal"
|
|
508
508
|
}) {
|
|
509
|
+
var _a;
|
|
510
|
+
const firstChar = (_a = name == null ? void 0 : name[0]) == null ? void 0 : _a.toUpperCase();
|
|
509
511
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
510
512
|
"div",
|
|
511
513
|
{
|
|
@@ -515,7 +517,7 @@ function Avatar({
|
|
|
515
517
|
"div",
|
|
516
518
|
{
|
|
517
519
|
style: {
|
|
518
|
-
backgroundColor: COLOR_MAP[
|
|
520
|
+
backgroundColor: COLOR_MAP[firstChar],
|
|
519
521
|
height,
|
|
520
522
|
width
|
|
521
523
|
},
|
|
@@ -524,7 +526,7 @@ function Avatar({
|
|
|
524
526
|
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
525
527
|
className
|
|
526
528
|
),
|
|
527
|
-
children:
|
|
529
|
+
children: firstChar
|
|
528
530
|
}
|
|
529
531
|
) : img ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
530
532
|
"img",
|
package/dist/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
Switch_default
|
|
3
|
+
} from "./chunk-MNARBWAJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Avatar_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IWO2Y5QX.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Radio_default
|
|
9
9
|
} from "./chunk-2EBPXGRY.mjs";
|
|
10
|
-
import {
|
|
11
|
-
Switch_default
|
|
12
|
-
} from "./chunk-MNARBWAJ.mjs";
|
|
13
|
-
import {
|
|
14
|
-
Checkbox_default
|
|
15
|
-
} from "./chunk-UQZNUEZE.mjs";
|
|
16
10
|
import {
|
|
17
11
|
Modal_default
|
|
18
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UQJ3BDM4.mjs";
|
|
19
13
|
import {
|
|
20
14
|
Button_default
|
|
21
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AF2RKLH6.mjs";
|
|
16
|
+
import {
|
|
17
|
+
Checkbox_default
|
|
18
|
+
} from "./chunk-UQZNUEZE.mjs";
|
|
22
19
|
import {
|
|
23
20
|
Tag_default
|
|
24
21
|
} from "./chunk-4VZB2KR2.mjs";
|
|
22
|
+
import {
|
|
23
|
+
Tooltip_default
|
|
24
|
+
} from "./chunk-MLCMZRUC.mjs";
|
|
25
25
|
import "./chunk-FWCSY2DS.mjs";
|
|
26
26
|
export {
|
|
27
27
|
Avatar_default as Avatar,
|