@itilite/lumina-ui 1.0.0 → 1.0.1
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/Avatar.d.mts +17 -0
- package/dist/Avatar.d.ts +17 -0
- package/dist/Avatar.js +121 -0
- package/dist/Avatar.mjs +9 -0
- package/dist/chunk-2O2IH2FG.mjs +83 -0
- package/dist/chunk-X76GNSBB.mjs +87 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +85 -0
- package/dist/index.mjs +4 -0
- package/dist/styles.css +535 -1032
- package/dist/styles.d.mts +2 -0
- package/dist/styles.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface AvatarProps {
|
|
4
|
+
img?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
size?: "small" | "normal";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare function Avatar({ img, className, name, height, width, size, }: AvatarProps): React.JSX.Element;
|
|
13
|
+
declare namespace Avatar {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Avatar, Avatar as default };
|
package/dist/Avatar.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface AvatarProps {
|
|
4
|
+
img?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
size?: "small" | "normal";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare function Avatar({ img, className, name, height, width, size, }: AvatarProps): React.JSX.Element;
|
|
13
|
+
declare namespace Avatar {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Avatar, Avatar as default };
|
package/dist/Avatar.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/atom/Avatar/Avatar.tsx
|
|
31
|
+
var Avatar_exports = {};
|
|
32
|
+
__export(Avatar_exports, {
|
|
33
|
+
Avatar: () => Avatar,
|
|
34
|
+
default: () => Avatar_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Avatar_exports);
|
|
37
|
+
var import_clsx = __toESM(require("clsx"));
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var COLOR_MAP = {
|
|
40
|
+
A: "#6455BF",
|
|
41
|
+
B: "#C46273",
|
|
42
|
+
C: "#52A79E",
|
|
43
|
+
D: "#DF8654",
|
|
44
|
+
E: "#B8639F",
|
|
45
|
+
F: "#6455BF",
|
|
46
|
+
G: "#C46273",
|
|
47
|
+
H: "#52A79E",
|
|
48
|
+
I: "#DF8654",
|
|
49
|
+
J: "#B8639F",
|
|
50
|
+
K: "#6455BF",
|
|
51
|
+
L: "#C46273",
|
|
52
|
+
M: "#52A79E",
|
|
53
|
+
N: "#DF8654",
|
|
54
|
+
O: "#B8639F",
|
|
55
|
+
P: "#6455BF",
|
|
56
|
+
Q: "#C46273",
|
|
57
|
+
R: "#52A79E",
|
|
58
|
+
S: "#DF8654",
|
|
59
|
+
T: "#B8639F",
|
|
60
|
+
U: "#6455BF",
|
|
61
|
+
V: "#C46273",
|
|
62
|
+
W: "#52A79E",
|
|
63
|
+
X: "#DF8654",
|
|
64
|
+
Y: "#B8639F",
|
|
65
|
+
Z: "#6455BF",
|
|
66
|
+
0: "#6455BF",
|
|
67
|
+
1: "#C46273",
|
|
68
|
+
6: "#C46273",
|
|
69
|
+
2: "#52A79E",
|
|
70
|
+
7: "#52A79E",
|
|
71
|
+
3: "#DF8654",
|
|
72
|
+
8: "#DF8654",
|
|
73
|
+
4: "#B8639F",
|
|
74
|
+
9: "#B8639F"
|
|
75
|
+
};
|
|
76
|
+
function Avatar({
|
|
77
|
+
img,
|
|
78
|
+
className,
|
|
79
|
+
name,
|
|
80
|
+
height = 28,
|
|
81
|
+
width = 28,
|
|
82
|
+
size = "normal"
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
style: { height, width },
|
|
88
|
+
className: "tw-rounded-full tw-flex tw-items-center",
|
|
89
|
+
children: !img && name ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
style: {
|
|
93
|
+
backgroundColor: COLOR_MAP[name[0]],
|
|
94
|
+
height,
|
|
95
|
+
width
|
|
96
|
+
},
|
|
97
|
+
className: (0, import_clsx.default)(
|
|
98
|
+
{ "tw-text-font-size-10": size === "small" },
|
|
99
|
+
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
children: name[0]
|
|
103
|
+
}
|
|
104
|
+
) : img ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
+
"img",
|
|
106
|
+
{
|
|
107
|
+
src: img,
|
|
108
|
+
style: { height, width },
|
|
109
|
+
alt: name,
|
|
110
|
+
className: (0, import_clsx.default)("tw-rounded-full tw-object-cover", className)
|
|
111
|
+
}
|
|
112
|
+
) : null
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
Avatar.displayName = "Avatar";
|
|
117
|
+
var Avatar_default = Avatar;
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
Avatar
|
|
121
|
+
});
|
package/dist/Avatar.mjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
style: { height, width },
|
|
53
|
+
className: "tw-rounded-full tw-flex tw-items-center",
|
|
54
|
+
children: !img && name ? /* @__PURE__ */ jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: { backgroundColor: COLOR_MAP[name[0]] },
|
|
58
|
+
className: clsx(
|
|
59
|
+
{ "tw-text-font-size-10": size === "small" },
|
|
60
|
+
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center `,
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
children: name[0]
|
|
64
|
+
}
|
|
65
|
+
) : img ? /* @__PURE__ */ jsx(
|
|
66
|
+
"img",
|
|
67
|
+
{
|
|
68
|
+
src: img,
|
|
69
|
+
style: { height, width },
|
|
70
|
+
alt: name,
|
|
71
|
+
className: clsx("tw-rounded-full tw-object-cover", className)
|
|
72
|
+
}
|
|
73
|
+
) : null
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
Avatar.displayName = "Avatar";
|
|
78
|
+
var Avatar_default = Avatar;
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
Avatar,
|
|
82
|
+
Avatar_default
|
|
83
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
style: { height, width },
|
|
53
|
+
className: "tw-rounded-full tw-flex tw-items-center",
|
|
54
|
+
children: !img && name ? /* @__PURE__ */ jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: {
|
|
58
|
+
backgroundColor: COLOR_MAP[name[0]],
|
|
59
|
+
height,
|
|
60
|
+
width
|
|
61
|
+
},
|
|
62
|
+
className: clsx(
|
|
63
|
+
{ "tw-text-font-size-10": size === "small" },
|
|
64
|
+
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
children: name[0]
|
|
68
|
+
}
|
|
69
|
+
) : img ? /* @__PURE__ */ jsx(
|
|
70
|
+
"img",
|
|
71
|
+
{
|
|
72
|
+
src: img,
|
|
73
|
+
style: { height, width },
|
|
74
|
+
alt: name,
|
|
75
|
+
className: clsx("tw-rounded-full tw-object-cover", className)
|
|
76
|
+
}
|
|
77
|
+
) : null
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
Avatar.displayName = "Avatar";
|
|
82
|
+
var Avatar_default = Avatar;
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
Avatar,
|
|
86
|
+
Avatar_default
|
|
87
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as Modal } from './Modal.mjs';
|
|
|
4
4
|
export { default as Radio } from './Radio.mjs';
|
|
5
5
|
export { default as Switch } from './Switch.mjs';
|
|
6
6
|
export { default as Tooltip } from './Tooltip.mjs';
|
|
7
|
+
export { default as Avatar } from './Avatar.mjs';
|
|
7
8
|
import 'react';
|
|
8
9
|
import 'antd/es/checkbox';
|
|
9
10
|
import 'antd/lib/radio';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as Modal } from './Modal.js';
|
|
|
4
4
|
export { default as Radio } from './Radio.js';
|
|
5
5
|
export { default as Switch } from './Switch.js';
|
|
6
6
|
export { default as Tooltip } from './Tooltip.js';
|
|
7
|
+
export { default as Avatar } from './Avatar.js';
|
|
7
8
|
import 'react';
|
|
8
9
|
import 'antd/es/checkbox';
|
|
9
10
|
import 'antd/lib/radio';
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
59
59
|
// src/index.ts
|
|
60
60
|
var src_exports = {};
|
|
61
61
|
__export(src_exports, {
|
|
62
|
+
Avatar: () => Avatar_default,
|
|
62
63
|
Button: () => Button_default,
|
|
63
64
|
Checkbox: () => Checkbox_default,
|
|
64
65
|
Modal: () => Modal_default,
|
|
@@ -455,8 +456,92 @@ var Tooltip = (_a) => {
|
|
|
455
456
|
};
|
|
456
457
|
Tooltip.displayName = "Tooltip";
|
|
457
458
|
var Tooltip_default = Tooltip;
|
|
459
|
+
|
|
460
|
+
// src/atom/Avatar/Avatar.tsx
|
|
461
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
462
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
463
|
+
var COLOR_MAP = {
|
|
464
|
+
A: "#6455BF",
|
|
465
|
+
B: "#C46273",
|
|
466
|
+
C: "#52A79E",
|
|
467
|
+
D: "#DF8654",
|
|
468
|
+
E: "#B8639F",
|
|
469
|
+
F: "#6455BF",
|
|
470
|
+
G: "#C46273",
|
|
471
|
+
H: "#52A79E",
|
|
472
|
+
I: "#DF8654",
|
|
473
|
+
J: "#B8639F",
|
|
474
|
+
K: "#6455BF",
|
|
475
|
+
L: "#C46273",
|
|
476
|
+
M: "#52A79E",
|
|
477
|
+
N: "#DF8654",
|
|
478
|
+
O: "#B8639F",
|
|
479
|
+
P: "#6455BF",
|
|
480
|
+
Q: "#C46273",
|
|
481
|
+
R: "#52A79E",
|
|
482
|
+
S: "#DF8654",
|
|
483
|
+
T: "#B8639F",
|
|
484
|
+
U: "#6455BF",
|
|
485
|
+
V: "#C46273",
|
|
486
|
+
W: "#52A79E",
|
|
487
|
+
X: "#DF8654",
|
|
488
|
+
Y: "#B8639F",
|
|
489
|
+
Z: "#6455BF",
|
|
490
|
+
0: "#6455BF",
|
|
491
|
+
1: "#C46273",
|
|
492
|
+
6: "#C46273",
|
|
493
|
+
2: "#52A79E",
|
|
494
|
+
7: "#52A79E",
|
|
495
|
+
3: "#DF8654",
|
|
496
|
+
8: "#DF8654",
|
|
497
|
+
4: "#B8639F",
|
|
498
|
+
9: "#B8639F"
|
|
499
|
+
};
|
|
500
|
+
function Avatar({
|
|
501
|
+
img,
|
|
502
|
+
className,
|
|
503
|
+
name,
|
|
504
|
+
height = 28,
|
|
505
|
+
width = 28,
|
|
506
|
+
size = "normal"
|
|
507
|
+
}) {
|
|
508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
509
|
+
"div",
|
|
510
|
+
{
|
|
511
|
+
style: { height, width },
|
|
512
|
+
className: "tw-rounded-full tw-flex tw-items-center",
|
|
513
|
+
children: !img && name ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
514
|
+
"div",
|
|
515
|
+
{
|
|
516
|
+
style: {
|
|
517
|
+
backgroundColor: COLOR_MAP[name[0]],
|
|
518
|
+
height,
|
|
519
|
+
width
|
|
520
|
+
},
|
|
521
|
+
className: (0, import_clsx6.default)(
|
|
522
|
+
{ "tw-text-font-size-10": size === "small" },
|
|
523
|
+
`tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
|
|
524
|
+
className
|
|
525
|
+
),
|
|
526
|
+
children: name[0]
|
|
527
|
+
}
|
|
528
|
+
) : img ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
529
|
+
"img",
|
|
530
|
+
{
|
|
531
|
+
src: img,
|
|
532
|
+
style: { height, width },
|
|
533
|
+
alt: name,
|
|
534
|
+
className: (0, import_clsx6.default)("tw-rounded-full tw-object-cover", className)
|
|
535
|
+
}
|
|
536
|
+
) : null
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
Avatar.displayName = "Avatar";
|
|
541
|
+
var Avatar_default = Avatar;
|
|
458
542
|
// Annotate the CommonJS export names for ESM import in node:
|
|
459
543
|
0 && (module.exports = {
|
|
544
|
+
Avatar,
|
|
460
545
|
Button,
|
|
461
546
|
Checkbox,
|
|
462
547
|
Modal,
|
package/dist/index.mjs
CHANGED
|
@@ -16,8 +16,12 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
Tooltip_default
|
|
18
18
|
} from "./chunk-MLCMZRUC.mjs";
|
|
19
|
+
import {
|
|
20
|
+
Avatar_default
|
|
21
|
+
} from "./chunk-X76GNSBB.mjs";
|
|
19
22
|
import "./chunk-FWCSY2DS.mjs";
|
|
20
23
|
export {
|
|
24
|
+
Avatar_default as Avatar,
|
|
21
25
|
Button_default as Button,
|
|
22
26
|
Checkbox_default as Checkbox,
|
|
23
27
|
Modal_default as Modal,
|