@itilite/lumina-ui 0.0.31 → 0.0.322
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/README.md +106 -0
- package/dist/{cjs/types/components/Button/types.d.ts → Button.d.mts} +10 -1
- package/dist/{esm/types/components/Button/types.d.ts → Button.d.ts} +10 -1
- package/dist/Button.js +111 -0
- package/dist/Button.mjs +9 -0
- package/dist/{esm/types/components/Checkbox/types.d.ts → Checkbox.d.mts} +10 -1
- package/dist/{types/components/Checkbox/types.d.ts → Checkbox.d.ts} +10 -1
- package/dist/Checkbox.js +121 -0
- package/dist/Checkbox.mjs +9 -0
- package/dist/chunk-FUJQIYOF.mjs +37 -0
- package/dist/chunk-ME35H7QC.mjs +77 -0
- package/dist/chunk-OMYHSSPQ.mjs +64 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +197 -0
- package/dist/index.mjs +11 -0
- package/dist/styles.css +1162 -0
- package/package.json +72 -80
- package/babel.config.js +0 -7
- package/dist/cjs/index.css +0 -1
- package/dist/cjs/index.js +0 -23219
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/components/Button/Button.d.ts +0 -4
- package/dist/cjs/types/components/Button/index.d.ts +0 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/cjs/types/components/Checkbox/index.d.ts +0 -1
- package/dist/cjs/types/components/Checkbox/types.d.ts +0 -11
- package/dist/cjs/types/components/Modal/Modal.d.ts +0 -3
- package/dist/cjs/types/components/Modal/index.d.ts +0 -1
- package/dist/cjs/types/components/Modal/types.d.ts +0 -21
- package/dist/cjs/types/components/Radio/Radio.d.ts +0 -4
- package/dist/cjs/types/components/Radio/index.d.ts +0 -1
- package/dist/cjs/types/components/Radio/types.d.ts +0 -11
- package/dist/cjs/types/components/Switch/Switch.d.ts +0 -4
- package/dist/cjs/types/components/Switch/index.d.ts +0 -1
- package/dist/cjs/types/components/Switch/types.d.ts +0 -7
- package/dist/cjs/types/components/Tag/Tag.d.ts +0 -4
- package/dist/cjs/types/components/Tag/index.d.ts +0 -1
- package/dist/cjs/types/components/Tag/type.d.ts +0 -7
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/cjs/types/components/Tooltip/index.d.ts +0 -1
- package/dist/cjs/types/components/Tooltip/types.d.ts +0 -8
- package/dist/cjs/types/components/index.d.ts +0 -7
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/esm/index.css +0 -1
- package/dist/esm/index.js +0 -23193
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/components/Button/Button.d.ts +0 -4
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +0 -3
- package/dist/esm/types/components/Modal/index.d.ts +0 -1
- package/dist/esm/types/components/Modal/types.d.ts +0 -21
- package/dist/esm/types/components/Radio/Radio.d.ts +0 -4
- package/dist/esm/types/components/Radio/index.d.ts +0 -1
- package/dist/esm/types/components/Radio/types.d.ts +0 -11
- package/dist/esm/types/components/Switch/Switch.d.ts +0 -4
- package/dist/esm/types/components/Switch/index.d.ts +0 -1
- package/dist/esm/types/components/Switch/types.d.ts +0 -7
- package/dist/esm/types/components/Tag/Tag.d.ts +0 -4
- package/dist/esm/types/components/Tag/index.d.ts +0 -1
- package/dist/esm/types/components/Tag/type.d.ts +0 -7
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/esm/types/components/Tooltip/index.d.ts +0 -1
- package/dist/esm/types/components/Tooltip/types.d.ts +0 -8
- package/dist/esm/types/components/index.d.ts +0 -7
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/types/components/Button/Button.d.ts +0 -4
- package/dist/types/components/Button/Button.test.d.ts +0 -1
- package/dist/types/components/Button/index.d.ts +0 -1
- package/dist/types/components/Button/types.d.ts +0 -16
- package/dist/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/types/components/Checkbox/index.d.ts +0 -1
- package/dist/types/components/Modal/Modal.d.ts +0 -3
- package/dist/types/components/Modal/index.d.ts +0 -1
- package/dist/types/components/Modal/types.d.ts +0 -21
- package/dist/types/components/Radio/Radio.d.ts +0 -4
- package/dist/types/components/Radio/index.d.ts +0 -1
- package/dist/types/components/Radio/types.d.ts +0 -11
- package/dist/types/components/Switch/Switch.d.ts +0 -4
- package/dist/types/components/Switch/index.d.ts +0 -1
- package/dist/types/components/Switch/types.d.ts +0 -7
- package/dist/types/components/Tag/Tag.d.ts +0 -4
- package/dist/types/components/Tag/index.d.ts +0 -1
- package/dist/types/components/Tag/type.d.ts +0 -7
- package/dist/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/types/components/Tooltip/index.d.ts +0 -1
- package/dist/types/components/Tooltip/types.d.ts +0 -8
- package/dist/types/components/index.d.ts +0 -7
- package/dist/types/index.d.ts +0 -1
- package/eslint.config.mjs +0 -55
- package/jest.config.js +0 -12
- package/rollup.config.mjs +0 -58
- package/setupTests.ts +0 -1
- package/src/components/Button/Button.module.scss +0 -199
- package/src/components/Button/Button.test.tsx +0 -90
- package/src/components/Button/Button.tsx +0 -91
- package/src/components/Button/index.ts +0 -1
- package/src/components/Button/types.ts +0 -16
- package/src/components/Checkbox/Checkbox.module.scss +0 -141
- package/src/components/Checkbox/Checkbox.tsx +0 -56
- package/src/components/Checkbox/index.ts +0 -1
- package/src/components/Checkbox/types.ts +0 -12
- package/src/components/Modal/Modal.module.scss +0 -61
- package/src/components/Modal/Modal.tsx +0 -103
- package/src/components/Modal/index.ts +0 -1
- package/src/components/Modal/types.ts +0 -21
- package/src/components/Radio/Radio.module.scss +0 -103
- package/src/components/Radio/Radio.tsx +0 -54
- package/src/components/Radio/index.ts +0 -1
- package/src/components/Radio/types.ts +0 -12
- package/src/components/Switch/Switch.module.scss +0 -17
- package/src/components/Switch/Switch.tsx +0 -37
- package/src/components/Switch/index.ts +0 -1
- package/src/components/Switch/types.ts +0 -12
- package/src/components/Tag/Tag.module.scss +0 -61
- package/src/components/Tag/Tag.tsx +0 -34
- package/src/components/Tag/index.ts +0 -1
- package/src/components/Tag/type.ts +0 -7
- package/src/components/Tooltip/Tooltip.module.scss +0 -12
- package/src/components/Tooltip/Tooltip.tsx +0 -29
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Tooltip/types.ts +0 -21
- package/src/components/index.ts +0 -8
- package/src/global.d.ts +0 -6
- package/src/index.ts +0 -1
- package/src/types/jest.d.ts +0 -10
- package/src/types/scss.d.ts +0 -1
- package/tsconfig.json +0 -41
package/dist/index.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
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/index.ts
|
|
60
|
+
var src_exports = {};
|
|
61
|
+
__export(src_exports, {
|
|
62
|
+
Button: () => Button_default,
|
|
63
|
+
Checkbox: () => Checkbox_default
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(src_exports);
|
|
66
|
+
|
|
67
|
+
// src/Button/Button.tsx
|
|
68
|
+
var import_antd = require("antd");
|
|
69
|
+
var import_clsx = __toESM(require("clsx"));
|
|
70
|
+
|
|
71
|
+
// src/Button/Button.module.scss
|
|
72
|
+
var Button_module_default = { "button": "Button-module__button___PM45p", "size_large": "Button-module__size_large___4muaQ", "shape_circle": "Button-module__shape_circle___5jh5G", "size_normal": "Button-module__size_normal___qtQjh", "size_small": "Button-module__size_small___7xabg", "type_primary": "Button-module__type_primary___-eoy3", "variant_subtle": "Button-module__variant_subtle___FojFh", "variant_text": "Button-module__variant_text___T-3KC", "variant_link": "Button-module__variant_link___dTdwy", "type_secondary": "Button-module__type_secondary___CwF0Y", "type_critical": "Button-module__type_critical___vVyiK", "onHoverUnderline": "Button-module__onHoverUnderline___wKzkT" };
|
|
73
|
+
|
|
74
|
+
// src/Button/Button.tsx
|
|
75
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
76
|
+
function Button(props) {
|
|
77
|
+
const {
|
|
78
|
+
type = "primary",
|
|
79
|
+
variant = "default",
|
|
80
|
+
size = "normal",
|
|
81
|
+
shape = "default",
|
|
82
|
+
className = "",
|
|
83
|
+
icon = null,
|
|
84
|
+
children,
|
|
85
|
+
onClick,
|
|
86
|
+
href = "",
|
|
87
|
+
disabled = false,
|
|
88
|
+
loading = false,
|
|
89
|
+
onHoverUnderline = false
|
|
90
|
+
} = props;
|
|
91
|
+
const buttonMap = {
|
|
92
|
+
default: "primary",
|
|
93
|
+
subtle: "default",
|
|
94
|
+
text: "text",
|
|
95
|
+
link: "link"
|
|
96
|
+
};
|
|
97
|
+
const sizeMap = {
|
|
98
|
+
small: "small",
|
|
99
|
+
normal: "middle",
|
|
100
|
+
// Map "default" to "middle"
|
|
101
|
+
large: "large"
|
|
102
|
+
};
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
+
import_antd.Button,
|
|
105
|
+
{
|
|
106
|
+
className: (0, import_clsx.default)(
|
|
107
|
+
Button_module_default.button,
|
|
108
|
+
Button_module_default[`size_${size}`],
|
|
109
|
+
Button_module_default[`variant_${variant}`],
|
|
110
|
+
Button_module_default[`shape_${shape}`],
|
|
111
|
+
Button_module_default[`type_${type}`],
|
|
112
|
+
`size_${size}`,
|
|
113
|
+
`variant_${variant}`,
|
|
114
|
+
`shape_${shape}`,
|
|
115
|
+
`type_${type}`,
|
|
116
|
+
className,
|
|
117
|
+
{
|
|
118
|
+
"tw-cursor-not-allowed": disabled,
|
|
119
|
+
"tw-opacity-40": disabled
|
|
120
|
+
},
|
|
121
|
+
disabled && Button_module_default.disabled,
|
|
122
|
+
onHoverUnderline && Button_module_default.onHoverUnderline
|
|
123
|
+
),
|
|
124
|
+
"data-testid": "lumina-button",
|
|
125
|
+
disabled,
|
|
126
|
+
href: href || void 0,
|
|
127
|
+
icon,
|
|
128
|
+
loading,
|
|
129
|
+
onClick,
|
|
130
|
+
shape,
|
|
131
|
+
size: sizeMap[size],
|
|
132
|
+
type: buttonMap[variant],
|
|
133
|
+
children
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
Button.displayName = "Button";
|
|
138
|
+
var Button_default = Button;
|
|
139
|
+
|
|
140
|
+
// src/Checkbox/Checkbox.tsx
|
|
141
|
+
var import_antd2 = require("antd");
|
|
142
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
143
|
+
|
|
144
|
+
// src/Checkbox/Checkbox.module.scss
|
|
145
|
+
var Checkbox_module_default = { "checkbox": "Checkbox-module__checkbox___D2qRJ", "size_small": "Checkbox-module__size_small___lgUjj", "size_medium": "Checkbox-module__size_medium___Npyaz", "size_large": "Checkbox-module__size_large___chR9U", "type_checked": "Checkbox-module__type_checked___fhhpM", "disabled": "Checkbox-module__disabled___xqtab", "type_unchecked": "Checkbox-module__type_unchecked___1zNB7", "variant_normal": "Checkbox-module__variant_normal___MbKJP", "variant_emphasized": "Checkbox-module__variant_emphasized___Yo9yv", "variant_indeterminate": "Checkbox-module__variant_indeterminate___-tnoD" };
|
|
146
|
+
|
|
147
|
+
// src/Checkbox/Checkbox.tsx
|
|
148
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
149
|
+
function Checkbox(props) {
|
|
150
|
+
const _a = props, {
|
|
151
|
+
className = "",
|
|
152
|
+
children = null,
|
|
153
|
+
onChange = () => {
|
|
154
|
+
},
|
|
155
|
+
checked = false,
|
|
156
|
+
disabled = false,
|
|
157
|
+
size = "small",
|
|
158
|
+
variant = "normal",
|
|
159
|
+
indeterminate = false
|
|
160
|
+
} = _a, rest = __objRest(_a, [
|
|
161
|
+
"className",
|
|
162
|
+
"children",
|
|
163
|
+
"onChange",
|
|
164
|
+
"checked",
|
|
165
|
+
"disabled",
|
|
166
|
+
"size",
|
|
167
|
+
"variant",
|
|
168
|
+
"indeterminate"
|
|
169
|
+
]);
|
|
170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
171
|
+
import_antd2.Checkbox,
|
|
172
|
+
__spreadProps(__spreadValues({
|
|
173
|
+
checked,
|
|
174
|
+
className: (0, import_clsx2.default)(
|
|
175
|
+
Checkbox_module_default.checkbox,
|
|
176
|
+
Checkbox_module_default[`size_${size}`],
|
|
177
|
+
Checkbox_module_default[`variant_${variant}`],
|
|
178
|
+
checked ? Checkbox_module_default.type_checked : Checkbox_module_default.type_unchecked,
|
|
179
|
+
disabled && Checkbox_module_default.disabled,
|
|
180
|
+
indeterminate && Checkbox_module_default[`variant_indeterminate`],
|
|
181
|
+
className
|
|
182
|
+
),
|
|
183
|
+
disabled,
|
|
184
|
+
indeterminate,
|
|
185
|
+
onChange
|
|
186
|
+
}, rest), {
|
|
187
|
+
children
|
|
188
|
+
})
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
Checkbox.displayName = "Checkbox";
|
|
192
|
+
var Checkbox_default = Checkbox;
|
|
193
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
194
|
+
0 && (module.exports = {
|
|
195
|
+
Button,
|
|
196
|
+
Checkbox
|
|
197
|
+
});
|
package/dist/index.mjs
ADDED