@itilite/lumina-ui 1.1.1 → 1.1.2
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/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-UQJ3BDM4.mjs +141 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +10 -10
- package/dist/styles.css +229 -225
- 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
package/dist/Button.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
type?: "primary" | "secondary" | "critical" | undefined;
|
|
5
|
-
variant?: "subtle" | "text" | "link";
|
|
6
|
-
size?: "large" | "small";
|
|
7
|
-
shape?: "circle" | "default" | "round";
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
iconPosition?: "start" | "end";
|
|
10
|
-
className?: string;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
-
href?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
loading?: boolean;
|
|
16
|
-
onHoverUnderline?: boolean;
|
|
17
|
-
analytics?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare function Button(props: ButtonProps): React$1.JSX.Element;
|
|
21
|
-
declare namespace Button {
|
|
22
|
-
var displayName: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { Button, Button as default };
|
package/dist/Button.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
type?: "primary" | "secondary" | "critical" | undefined;
|
|
5
|
-
variant?: "subtle" | "text" | "link";
|
|
6
|
-
size?: "large" | "small";
|
|
7
|
-
shape?: "circle" | "default" | "round";
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
iconPosition?: "start" | "end";
|
|
10
|
-
className?: string;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
-
href?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
loading?: boolean;
|
|
16
|
-
onHoverUnderline?: boolean;
|
|
17
|
-
analytics?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare function Button(props: ButtonProps): React$1.JSX.Element;
|
|
21
|
-
declare namespace Button {
|
|
22
|
-
var displayName: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { Button, Button as default };
|
package/dist/Button.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
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/Button/Button.tsx
|
|
31
|
-
var Button_exports = {};
|
|
32
|
-
__export(Button_exports, {
|
|
33
|
-
Button: () => Button,
|
|
34
|
-
default: () => Button_default
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(Button_exports);
|
|
37
|
-
var import_antd = require("antd");
|
|
38
|
-
var import_clsx = __toESM(require("clsx"));
|
|
39
|
-
|
|
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" };
|
|
42
|
-
|
|
43
|
-
// src/atom/Button/Button.tsx
|
|
44
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
-
function Button(props) {
|
|
46
|
-
const {
|
|
47
|
-
type = "primary",
|
|
48
|
-
variant = "default",
|
|
49
|
-
size = "normal",
|
|
50
|
-
shape = "default",
|
|
51
|
-
className = "",
|
|
52
|
-
icon = null,
|
|
53
|
-
children,
|
|
54
|
-
onClick,
|
|
55
|
-
href = "",
|
|
56
|
-
disabled = false,
|
|
57
|
-
loading = false,
|
|
58
|
-
onHoverUnderline = false
|
|
59
|
-
} = props;
|
|
60
|
-
const buttonMap = {
|
|
61
|
-
default: "primary",
|
|
62
|
-
subtle: "default",
|
|
63
|
-
text: "text",
|
|
64
|
-
link: "link"
|
|
65
|
-
};
|
|
66
|
-
const sizeMap = {
|
|
67
|
-
small: "small",
|
|
68
|
-
normal: "middle",
|
|
69
|
-
// Map "default" to "middle"
|
|
70
|
-
large: "large"
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
-
import_antd.Button,
|
|
74
|
-
{
|
|
75
|
-
className: (0, import_clsx.default)(
|
|
76
|
-
Button_module_default.button,
|
|
77
|
-
Button_module_default[`size_${size}`],
|
|
78
|
-
Button_module_default[`variant_${variant}`],
|
|
79
|
-
Button_module_default[`shape_${shape}`],
|
|
80
|
-
Button_module_default[`type_${type}`],
|
|
81
|
-
`size_${size}`,
|
|
82
|
-
`variant_${variant}`,
|
|
83
|
-
`shape_${shape}`,
|
|
84
|
-
`type_${type}`,
|
|
85
|
-
className,
|
|
86
|
-
{
|
|
87
|
-
"tw-cursor-not-allowed": disabled,
|
|
88
|
-
"tw-opacity-40": disabled
|
|
89
|
-
},
|
|
90
|
-
disabled && Button_module_default.disabled,
|
|
91
|
-
onHoverUnderline && Button_module_default.onHoverUnderline
|
|
92
|
-
),
|
|
93
|
-
"data-testid": "lumina-button",
|
|
94
|
-
disabled,
|
|
95
|
-
href: href || void 0,
|
|
96
|
-
icon,
|
|
97
|
-
loading,
|
|
98
|
-
onClick,
|
|
99
|
-
shape,
|
|
100
|
-
size: sizeMap[size],
|
|
101
|
-
type: buttonMap[variant],
|
|
102
|
-
children
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
Button.displayName = "Button";
|
|
107
|
-
var Button_default = Button;
|
|
108
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
-
0 && (module.exports = {
|
|
110
|
-
Button
|
|
111
|
-
});
|
package/dist/Button.mjs
DELETED
package/dist/Checkbox.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
3
|
-
|
|
4
|
-
interface CheckboxProps {
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
onChange?: (e: CheckboxChangeEvent) => void;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
size?: "large" | "small" | "medium";
|
|
10
|
-
variant?: "normal" | "emphasized";
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
indeterminate?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare function Checkbox(props: CheckboxProps): React$1.JSX.Element;
|
|
16
|
-
declare namespace Checkbox {
|
|
17
|
-
var displayName: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Checkbox, Checkbox as default };
|
package/dist/Checkbox.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
3
|
-
|
|
4
|
-
interface CheckboxProps {
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
onChange?: (e: CheckboxChangeEvent) => void;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
size?: "large" | "small" | "medium";
|
|
10
|
-
variant?: "normal" | "emphasized";
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
indeterminate?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare function Checkbox(props: CheckboxProps): React$1.JSX.Element;
|
|
16
|
-
declare namespace Checkbox {
|
|
17
|
-
var displayName: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Checkbox, Checkbox as default };
|
package/dist/Checkbox.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
var __export = (target, all) => {
|
|
38
|
-
for (var name in all)
|
|
39
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
-
};
|
|
41
|
-
var __copyProps = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
-
for (let key of __getOwnPropNames(from))
|
|
44
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
-
mod
|
|
56
|
-
));
|
|
57
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
-
|
|
59
|
-
// src/atom/Checkbox/Checkbox.tsx
|
|
60
|
-
var Checkbox_exports = {};
|
|
61
|
-
__export(Checkbox_exports, {
|
|
62
|
-
Checkbox: () => Checkbox,
|
|
63
|
-
default: () => Checkbox_default
|
|
64
|
-
});
|
|
65
|
-
module.exports = __toCommonJS(Checkbox_exports);
|
|
66
|
-
var import_antd = require("antd");
|
|
67
|
-
var import_clsx = __toESM(require("clsx"));
|
|
68
|
-
|
|
69
|
-
// src/atom/Checkbox/Checkbox.module.scss
|
|
70
|
-
var Checkbox_module_default = { "checkbox": "Checkbox-module__checkbox___xxg5L", "size_small": "Checkbox-module__size_small___Kknlo", "size_medium": "Checkbox-module__size_medium___V6Ah8", "size_large": "Checkbox-module__size_large___eWjFY", "type_checked": "Checkbox-module__type_checked___5742T", "disabled": "Checkbox-module__disabled___v-RG1", "type_unchecked": "Checkbox-module__type_unchecked___QFMpP", "variant_normal": "Checkbox-module__variant_normal___faYKo", "variant_emphasized": "Checkbox-module__variant_emphasized___-koYj", "variant_indeterminate": "Checkbox-module__variant_indeterminate___J5Xcc" };
|
|
71
|
-
|
|
72
|
-
// src/atom/Checkbox/Checkbox.tsx
|
|
73
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
-
function Checkbox(props) {
|
|
75
|
-
const _a = props, {
|
|
76
|
-
className = "",
|
|
77
|
-
children = null,
|
|
78
|
-
onChange = () => {
|
|
79
|
-
},
|
|
80
|
-
checked = false,
|
|
81
|
-
disabled = false,
|
|
82
|
-
size = "small",
|
|
83
|
-
variant = "normal",
|
|
84
|
-
indeterminate = false
|
|
85
|
-
} = _a, rest = __objRest(_a, [
|
|
86
|
-
"className",
|
|
87
|
-
"children",
|
|
88
|
-
"onChange",
|
|
89
|
-
"checked",
|
|
90
|
-
"disabled",
|
|
91
|
-
"size",
|
|
92
|
-
"variant",
|
|
93
|
-
"indeterminate"
|
|
94
|
-
]);
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
import_antd.Checkbox,
|
|
97
|
-
__spreadProps(__spreadValues({
|
|
98
|
-
checked,
|
|
99
|
-
className: (0, import_clsx.default)(
|
|
100
|
-
Checkbox_module_default.checkbox,
|
|
101
|
-
Checkbox_module_default[`size_${size}`],
|
|
102
|
-
Checkbox_module_default[`variant_${variant}`],
|
|
103
|
-
checked ? Checkbox_module_default.type_checked : Checkbox_module_default.type_unchecked,
|
|
104
|
-
disabled && Checkbox_module_default.disabled,
|
|
105
|
-
indeterminate && Checkbox_module_default[`variant_indeterminate`],
|
|
106
|
-
className
|
|
107
|
-
),
|
|
108
|
-
disabled,
|
|
109
|
-
indeterminate,
|
|
110
|
-
onChange
|
|
111
|
-
}, rest), {
|
|
112
|
-
children
|
|
113
|
-
})
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
Checkbox.displayName = "Checkbox";
|
|
117
|
-
var Checkbox_default = Checkbox;
|
|
118
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
-
0 && (module.exports = {
|
|
120
|
-
Checkbox
|
|
121
|
-
});
|
package/dist/Checkbox.mjs
DELETED
package/dist/Modal.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface ModalProps {
|
|
2
|
-
className?: string | undefined;
|
|
3
|
-
title?: string | undefined;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
open?: boolean;
|
|
6
|
-
handleOk?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
7
|
-
handleCancel?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
8
|
-
okText?: string | undefined;
|
|
9
|
-
cancelText?: string | undefined;
|
|
10
|
-
closeIcon?: React.ReactNode;
|
|
11
|
-
bodyClassName?: string | undefined;
|
|
12
|
-
outsideClickDisable?: boolean;
|
|
13
|
-
hideCross?: boolean;
|
|
14
|
-
okButtonLoading?: boolean;
|
|
15
|
-
okButtonDisabled?: boolean;
|
|
16
|
-
variant?: "primary" | "secondary";
|
|
17
|
-
okBtnClasses?: string | undefined;
|
|
18
|
-
cancelButtonAnalytics?: object | undefined;
|
|
19
|
-
okButtonAnalytics?: object | undefined;
|
|
20
|
-
footerMargintopDisable?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare const Modal: React.FC<ModalProps>;
|
|
24
|
-
|
|
25
|
-
export { Modal, Modal as default };
|
package/dist/Modal.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface ModalProps {
|
|
2
|
-
className?: string | undefined;
|
|
3
|
-
title?: string | undefined;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
open?: boolean;
|
|
6
|
-
handleOk?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
7
|
-
handleCancel?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
8
|
-
okText?: string | undefined;
|
|
9
|
-
cancelText?: string | undefined;
|
|
10
|
-
closeIcon?: React.ReactNode;
|
|
11
|
-
bodyClassName?: string | undefined;
|
|
12
|
-
outsideClickDisable?: boolean;
|
|
13
|
-
hideCross?: boolean;
|
|
14
|
-
okButtonLoading?: boolean;
|
|
15
|
-
okButtonDisabled?: boolean;
|
|
16
|
-
variant?: "primary" | "secondary";
|
|
17
|
-
okBtnClasses?: string | undefined;
|
|
18
|
-
cancelButtonAnalytics?: object | undefined;
|
|
19
|
-
okButtonAnalytics?: object | undefined;
|
|
20
|
-
footerMargintopDisable?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare const Modal: React.FC<ModalProps>;
|
|
24
|
-
|
|
25
|
-
export { Modal, Modal as default };
|
package/dist/Modal.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
var __export = (target, all) => {
|
|
38
|
-
for (var name in all)
|
|
39
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
-
};
|
|
41
|
-
var __copyProps = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
-
for (let key of __getOwnPropNames(from))
|
|
44
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
-
mod
|
|
56
|
-
));
|
|
57
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
-
|
|
59
|
-
// src/atom/Modal/Modal.tsx
|
|
60
|
-
var Modal_exports = {};
|
|
61
|
-
__export(Modal_exports, {
|
|
62
|
-
Modal: () => Modal,
|
|
63
|
-
default: () => Modal_default
|
|
64
|
-
});
|
|
65
|
-
module.exports = __toCommonJS(Modal_exports);
|
|
66
|
-
var import_antd2 = require("antd");
|
|
67
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
68
|
-
|
|
69
|
-
// src/atom/Modal/Modal.module.scss
|
|
70
|
-
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" };
|
|
71
|
-
|
|
72
|
-
// src/atom/Button/Button.tsx
|
|
73
|
-
var import_antd = require("antd");
|
|
74
|
-
var import_clsx = __toESM(require("clsx"));
|
|
75
|
-
|
|
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" };
|
|
78
|
-
|
|
79
|
-
// src/atom/Button/Button.tsx
|
|
80
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
81
|
-
function Button(props) {
|
|
82
|
-
const {
|
|
83
|
-
type = "primary",
|
|
84
|
-
variant = "default",
|
|
85
|
-
size = "normal",
|
|
86
|
-
shape = "default",
|
|
87
|
-
className = "",
|
|
88
|
-
icon = null,
|
|
89
|
-
children,
|
|
90
|
-
onClick,
|
|
91
|
-
href = "",
|
|
92
|
-
disabled = false,
|
|
93
|
-
loading = false,
|
|
94
|
-
onHoverUnderline = false
|
|
95
|
-
} = props;
|
|
96
|
-
const buttonMap = {
|
|
97
|
-
default: "primary",
|
|
98
|
-
subtle: "default",
|
|
99
|
-
text: "text",
|
|
100
|
-
link: "link"
|
|
101
|
-
};
|
|
102
|
-
const sizeMap = {
|
|
103
|
-
small: "small",
|
|
104
|
-
normal: "middle",
|
|
105
|
-
// Map "default" to "middle"
|
|
106
|
-
large: "large"
|
|
107
|
-
};
|
|
108
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
-
import_antd.Button,
|
|
110
|
-
{
|
|
111
|
-
className: (0, import_clsx.default)(
|
|
112
|
-
Button_module_default.button,
|
|
113
|
-
Button_module_default[`size_${size}`],
|
|
114
|
-
Button_module_default[`variant_${variant}`],
|
|
115
|
-
Button_module_default[`shape_${shape}`],
|
|
116
|
-
Button_module_default[`type_${type}`],
|
|
117
|
-
`size_${size}`,
|
|
118
|
-
`variant_${variant}`,
|
|
119
|
-
`shape_${shape}`,
|
|
120
|
-
`type_${type}`,
|
|
121
|
-
className,
|
|
122
|
-
{
|
|
123
|
-
"tw-cursor-not-allowed": disabled,
|
|
124
|
-
"tw-opacity-40": disabled
|
|
125
|
-
},
|
|
126
|
-
disabled && Button_module_default.disabled,
|
|
127
|
-
onHoverUnderline && Button_module_default.onHoverUnderline
|
|
128
|
-
),
|
|
129
|
-
"data-testid": "lumina-button",
|
|
130
|
-
disabled,
|
|
131
|
-
href: href || void 0,
|
|
132
|
-
icon,
|
|
133
|
-
loading,
|
|
134
|
-
onClick,
|
|
135
|
-
shape,
|
|
136
|
-
size: sizeMap[size],
|
|
137
|
-
type: buttonMap[variant],
|
|
138
|
-
children
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
Button.displayName = "Button";
|
|
143
|
-
|
|
144
|
-
// src/atom/Modal/Modal.tsx
|
|
145
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
146
|
-
var Close = (_a) => {
|
|
147
|
-
var _b = _a, { size = 14, color = "#B6BAC3" } = _b, rest = __objRest(_b, ["size", "color"]);
|
|
148
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
149
|
-
"svg",
|
|
150
|
-
__spreadProps(__spreadValues({
|
|
151
|
-
width: size,
|
|
152
|
-
height: size,
|
|
153
|
-
viewBox: "0 0 14 14",
|
|
154
|
-
fill: "none",
|
|
155
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
156
|
-
}, rest), {
|
|
157
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
158
|
-
"path",
|
|
159
|
-
{
|
|
160
|
-
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",
|
|
161
|
-
fill: color
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
})
|
|
165
|
-
);
|
|
166
|
-
};
|
|
167
|
-
var Modal = (_a) => {
|
|
168
|
-
var _b = _a, {
|
|
169
|
-
className = "",
|
|
170
|
-
title = "",
|
|
171
|
-
children,
|
|
172
|
-
open = false,
|
|
173
|
-
handleOk,
|
|
174
|
-
handleCancel,
|
|
175
|
-
okText = "",
|
|
176
|
-
cancelText = "",
|
|
177
|
-
closeIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Close, { color: "#6B7280" }),
|
|
178
|
-
bodyClassName = "modalBody",
|
|
179
|
-
outsideClickDisable = false,
|
|
180
|
-
hideCross = false,
|
|
181
|
-
okButtonLoading = false,
|
|
182
|
-
okButtonDisabled = false,
|
|
183
|
-
variant = "primary",
|
|
184
|
-
okBtnClasses = "",
|
|
185
|
-
cancelButtonAnalytics = {},
|
|
186
|
-
okButtonAnalytics = {},
|
|
187
|
-
footerMargintopDisable = true
|
|
188
|
-
} = _b, rest = __objRest(_b, [
|
|
189
|
-
"className",
|
|
190
|
-
"title",
|
|
191
|
-
"children",
|
|
192
|
-
"open",
|
|
193
|
-
"handleOk",
|
|
194
|
-
"handleCancel",
|
|
195
|
-
"okText",
|
|
196
|
-
"cancelText",
|
|
197
|
-
"closeIcon",
|
|
198
|
-
"bodyClassName",
|
|
199
|
-
"outsideClickDisable",
|
|
200
|
-
"hideCross",
|
|
201
|
-
"okButtonLoading",
|
|
202
|
-
"okButtonDisabled",
|
|
203
|
-
"variant",
|
|
204
|
-
"okBtnClasses",
|
|
205
|
-
"cancelButtonAnalytics",
|
|
206
|
-
"okButtonAnalytics",
|
|
207
|
-
"footerMargintopDisable"
|
|
208
|
-
]);
|
|
209
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
210
|
-
import_antd2.Modal,
|
|
211
|
-
__spreadProps(__spreadValues({
|
|
212
|
-
title,
|
|
213
|
-
open,
|
|
214
|
-
onOk: handleOk,
|
|
215
|
-
onCancel: handleCancel,
|
|
216
|
-
className: (0, import_clsx2.default)(Modal_module_default.modal, className, {
|
|
217
|
-
footerMargintopDisable
|
|
218
|
-
}),
|
|
219
|
-
okText,
|
|
220
|
-
cancelText,
|
|
221
|
-
closeIcon,
|
|
222
|
-
closable: !hideCross,
|
|
223
|
-
maskClosable: !outsideClickDisable,
|
|
224
|
-
footer: okText || cancelText ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
225
|
-
"div",
|
|
226
|
-
{
|
|
227
|
-
className: (0, import_clsx2.default)({
|
|
228
|
-
primaryFooter: variant === "primary",
|
|
229
|
-
secondaryFooter: variant === "secondary"
|
|
230
|
-
}),
|
|
231
|
-
children: [
|
|
232
|
-
cancelText && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
233
|
-
Button,
|
|
234
|
-
__spreadProps(__spreadValues({
|
|
235
|
-
onClick: handleCancel,
|
|
236
|
-
type: "secondary",
|
|
237
|
-
className: "cancelBtn",
|
|
238
|
-
variant: "subtle"
|
|
239
|
-
}, cancelButtonAnalytics), {
|
|
240
|
-
children: cancelText
|
|
241
|
-
})
|
|
242
|
-
),
|
|
243
|
-
okText && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
244
|
-
Button,
|
|
245
|
-
__spreadProps(__spreadValues({
|
|
246
|
-
onClick: handleOk,
|
|
247
|
-
className: (0, import_clsx2.default)(okBtnClasses, "okBtn"),
|
|
248
|
-
loading: okButtonLoading,
|
|
249
|
-
disabled: okButtonDisabled
|
|
250
|
-
}, okButtonAnalytics), {
|
|
251
|
-
children: okText
|
|
252
|
-
})
|
|
253
|
-
)
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
) : null
|
|
257
|
-
}, rest), {
|
|
258
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: bodyClassName, children })
|
|
259
|
-
})
|
|
260
|
-
) });
|
|
261
|
-
};
|
|
262
|
-
Modal.displayName = "Modal";
|
|
263
|
-
var Modal_default = Modal;
|
|
264
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
265
|
-
0 && (module.exports = {
|
|
266
|
-
Modal
|
|
267
|
-
});
|