x-ui-design 0.2.18 → 0.2.20
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/esm/types/components/Button/Button.client.d.ts +2 -1
- package/dist/esm/types/index.d.ts +0 -2
- package/dist/index.d.ts +2 -50
- package/dist/index.esm.js +8 -177
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -178
- package/dist/index.js.map +1 -1
- package/lib/components/Button/Button.client.tsx +1 -1
- package/lib/components/Button/Button.tsx +1 -1
- package/lib/index.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CSSProperties, ReactNode, ButtonHTMLAttributes, ReactElement, MouseEvent, MouseEventHandler, KeyboardEventHandler } from 'react';
|
|
3
|
-
|
|
4
|
-
type RuleType = any;
|
|
5
|
-
interface DefaultProps {
|
|
6
|
-
prefixCls?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
noStyle?: boolean;
|
|
10
|
-
}
|
|
11
|
-
type TargetProps = {
|
|
12
|
-
target: {
|
|
13
|
-
value: RuleType;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type EmptyContentProps = DefaultProps & {
|
|
18
|
-
title?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
icon?: ReactNode;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
declare const EmptyContent: ({ icon, style, className, title, description, prefixCls }: EmptyContentProps) => react.JSX.Element;
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode, CSSProperties, ReactElement } from 'react';
|
|
24
2
|
|
|
25
3
|
declare const ButtonTypes: readonly ["default", "primary", "dashed", "link", "text", "ghost"];
|
|
26
4
|
declare const ButtonShapes: readonly ["default", "circle", "round"];
|
|
@@ -69,30 +47,4 @@ declare const Button: ({ type, variant, color, shape, size, htmlType, className,
|
|
|
69
47
|
isLoading?: boolean;
|
|
70
48
|
}) => ReactElement;
|
|
71
49
|
|
|
72
|
-
|
|
73
|
-
disabled?: boolean;
|
|
74
|
-
onChange?: (e: MouseEvent<HTMLInputElement> & TargetProps) => void;
|
|
75
|
-
onClick?: MouseEventHandler<HTMLElement>;
|
|
76
|
-
onMouseEnter?: MouseEventHandler<HTMLElement>;
|
|
77
|
-
onMouseLeave?: MouseEventHandler<HTMLElement>;
|
|
78
|
-
onKeyPress?: KeyboardEventHandler<HTMLElement>;
|
|
79
|
-
onKeyDown?: KeyboardEventHandler<HTMLElement>;
|
|
80
|
-
value?: boolean;
|
|
81
|
-
tabIndex?: number;
|
|
82
|
-
name?: string;
|
|
83
|
-
children?: ReactNode;
|
|
84
|
-
id?: string;
|
|
85
|
-
autoFocus?: boolean;
|
|
86
|
-
type?: string;
|
|
87
|
-
skipGroup?: boolean;
|
|
88
|
-
required?: boolean;
|
|
89
|
-
defaultChecked?: boolean;
|
|
90
|
-
checked?: boolean;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
declare const Checkbox: {
|
|
94
|
-
({ prefixCls, className, defaultChecked, checked, style, disabled, onChange, onClick, onMouseEnter, onMouseLeave, onKeyPress, onKeyDown, tabIndex, name, children, id, autoFocus, type, value, required, noStyle }: CheckboxProps): ReactElement;
|
|
95
|
-
displayName: string;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export { Button, Checkbox, EmptyContent as Empty };
|
|
50
|
+
export { Button };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
3
|
function styleInject(css, ref) {
|
|
4
4
|
if (ref === void 0) ref = {};
|
|
@@ -25,52 +25,8 @@ function styleInject(css, ref) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
var css_248z$
|
|
29
|
-
styleInject(css_248z$
|
|
30
|
-
|
|
31
|
-
const prefixClsEmpty = 'xUi-empty';
|
|
32
|
-
const prefixClsCheckbox = 'xUi-checkbox';
|
|
33
|
-
const prefixClsButton = 'xUi-button';
|
|
34
|
-
|
|
35
|
-
var css_248z$2 = ".xUi-empty{align-items:center;display:grid;gap:4px;justify-content:center;padding:14px}.xUi-empty-description{color:var(--xui-text-color);font-size:var(--xui-font-size-md);text-align:center}";
|
|
36
|
-
styleInject(css_248z$2);
|
|
37
|
-
|
|
38
|
-
const EmptyContent = ({
|
|
39
|
-
icon,
|
|
40
|
-
style = {},
|
|
41
|
-
className = '',
|
|
42
|
-
title = 'No Data',
|
|
43
|
-
description = 'No data',
|
|
44
|
-
prefixCls = prefixClsEmpty
|
|
45
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
style: style,
|
|
47
|
-
className: `${prefixCls} ${prefixCls}-normal ${prefixCls}-small ${className}`
|
|
48
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
className: `${prefixCls}-image`
|
|
50
|
-
}, icon || /*#__PURE__*/React.createElement("svg", {
|
|
51
|
-
width: "64",
|
|
52
|
-
height: "41",
|
|
53
|
-
viewBox: "0 0 64 41",
|
|
54
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
55
|
-
}, /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("g", {
|
|
56
|
-
transform: "translate(0 1)",
|
|
57
|
-
fill: "none"
|
|
58
|
-
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
59
|
-
fill: "#f5f5f5",
|
|
60
|
-
cx: "32",
|
|
61
|
-
cy: "33",
|
|
62
|
-
rx: "32",
|
|
63
|
-
ry: "7"
|
|
64
|
-
}), /*#__PURE__*/React.createElement("g", {
|
|
65
|
-
stroke: "#d9d9d9"
|
|
66
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
67
|
-
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
68
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
69
|
-
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
|
|
70
|
-
fill: "#fafafa"
|
|
71
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: `${prefixCls}-description`
|
|
73
|
-
}, description));
|
|
28
|
+
var css_248z$1 = ":root{--xui-color-hover:#f5f5f5;--xui-color-disabled:#e6e6e6;--xui-primary-color:#1677ff;--xui-primary-color-light:#40a9ff;--xui-text-color:rgba(0,0,0,.88);--xui-text-color-light:rgba(0,0,0,.5);--xui-error-color:#ff4d4f;--xui-error-color-light:#ff6668;--xui-success-color:#52c41a;--xui-background-color:#fff;--xui-font-size-xs:12px;--xui-font-size-sm:14px;--xui-font-size-md:14px;--xui-font-size-lg:16px;--xui-border-radius-sm:4px;--xui-border-radius-md:4px;--xui-border-radius-lg:6px;--xui-border-color:#d9d9d9;--xui-select-primary-color:var(--xui-primary-color);--xui-select-background-color:var(--xui-background-color)}html{font-family:sans-serif}.globalEllipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
29
|
+
styleInject(css_248z$1);
|
|
74
30
|
|
|
75
31
|
function _extends() {
|
|
76
32
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -103,8 +59,10 @@ function clsx(...args) {
|
|
|
103
59
|
}).filter(Boolean).join(' ');
|
|
104
60
|
}
|
|
105
61
|
|
|
106
|
-
|
|
107
|
-
|
|
62
|
+
const prefixClsButton = 'xUi-button';
|
|
63
|
+
|
|
64
|
+
var css_248z = ".xUi-button{border:1px solid transparent;border-radius:6px;cursor:pointer;font-weight:400;line-height:1.5715;transition:all .3s ease;user-select:none;vertical-align:middle;white-space:nowrap}.xUi-button,.xUi-button-content,.xUi-button-icon{align-items:center;display:inline-flex;justify-content:center}.xUi-button-icon{line-height:0;margin-right:.5em}.xUi-button-icon:last-child{margin-left:.5em;margin-right:0}.xUi-button-spinner{animation:xUi-spin 1s linear infinite;border:1px solid transparent;border-radius:50%;border-top:1px solid var(--xui-text-color);height:1em;width:1em}@keyframes xUi-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.xUi-button-size-small{font-size:12px;height:24px;padding:4px 12px}.xUi-button-size-middle{font-size:14px;height:32px;padding:0 16px}.xUi-button-size-large{font-size:16px;height:40px;padding:8px 20px}.xUi-button-circle{border-radius:50%;justify-content:center;padding:0}.xUi-button-circle.xUi-button-size-small{height:24px;width:24px}.xUi-button-circle.xUi-button-size-large{height:40px;width:40px}.xUi-button-round{border-radius:9999px}.xUi-button-default{background-color:#fff;border-color:var(--xui-border-color);color:rgba(0,0,0,.85)}.xUi-button-default:hover{border-color:var(--xui-primary-color);color:var(--xui-primary-color)}.xUi-button-primary{background-color:var(--xui-primary-color);border-color:var(--xui-primary-color);color:#fff}.xUi-button-primary:hover{background-color:var(--xui-primary-color-light);border-color:var(--xui-primary-color-light);color:#fff}.xUi-button-dashed{background-color:#fff;border-color:var(--xui-border-color);border-style:dashed;color:rgba(0,0,0,.85)}.xUi-button-dashed:hover{border-color:var(--xui-primary-color);color:var(--xui-primary-color)}.xUi-button-text{background-color:transparent;border-color:transparent!important;color:rgba(0,0,0,.88)}.xUi-button-text:hover{background-color:rgba(0,0,0,.04);border-color:transparent;color:rgba(0,0,0,.88)}.xUi-button-link{background-color:transparent;border-color:transparent!important;color:var(--xui-primary-color)}.xUi-button-link:hover{border-color:transparent;color:var(--xui-primary-color-light)}.xUi-button-outlined{color:#fff}.xUi-button-filled,.xUi-button-outlined{background-color:transparent;border-color:var(--xui-border-color)}.xUi-button-filled{color:var(--xui-text-color)}.xUi-button-danger{background-color:transparent;border-color:var(--xui-error-color);color:var(--xui-error-color)}.xUi-button-danger:hover{border-color:var(--xui-error-color-light);color:var(--xui-error-color-light)}.xUi-button-ghost{opacity:0}.xUi-button-ghost:hover{opacity:1}.xUi-button-block{display:flex;width:100%}.xUi-button-disabled,.xUi-button-loading{background-color:var(--xui-color-disabled);border-color:var(--xui-border-color);color:var(--xui-text-color);cursor:not-allowed;opacity:.5;pointer-events:none}.xUi-button-loading{background-color:transparent}";
|
|
65
|
+
styleInject(css_248z);
|
|
108
66
|
|
|
109
67
|
const Button = ({
|
|
110
68
|
type = 'default',
|
|
@@ -160,132 +118,5 @@ const Button = ({
|
|
|
160
118
|
}, restProps), content);
|
|
161
119
|
};
|
|
162
120
|
|
|
163
|
-
|
|
164
|
-
styleInject(css_248z);
|
|
165
|
-
|
|
166
|
-
const CheckboxClient = /*#__PURE__*/forwardRef(({
|
|
167
|
-
prefixCls,
|
|
168
|
-
className = '',
|
|
169
|
-
defaultChecked = false,
|
|
170
|
-
checked,
|
|
171
|
-
style,
|
|
172
|
-
disabled = false,
|
|
173
|
-
onChange,
|
|
174
|
-
onClick,
|
|
175
|
-
onMouseEnter,
|
|
176
|
-
onMouseLeave,
|
|
177
|
-
onKeyPress,
|
|
178
|
-
onKeyDown,
|
|
179
|
-
tabIndex,
|
|
180
|
-
name,
|
|
181
|
-
children,
|
|
182
|
-
id,
|
|
183
|
-
autoFocus,
|
|
184
|
-
type = 'checkbox',
|
|
185
|
-
value = false,
|
|
186
|
-
required = false,
|
|
187
|
-
noStyle
|
|
188
|
-
}, ref) => {
|
|
189
|
-
const isChecked = checked !== undefined ? checked : defaultChecked || value;
|
|
190
|
-
const [internalChecked, setInternalChecked] = useState(isChecked);
|
|
191
|
-
const handleClick = e => {
|
|
192
|
-
e.stopPropagation();
|
|
193
|
-
if (disabled) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
setInternalChecked(!internalChecked);
|
|
197
|
-
e.target.value = !internalChecked;
|
|
198
|
-
onClick?.(e);
|
|
199
|
-
onChange?.(e);
|
|
200
|
-
};
|
|
201
|
-
useEffect(() => {
|
|
202
|
-
if (checked !== undefined) {
|
|
203
|
-
setInternalChecked(checked);
|
|
204
|
-
}
|
|
205
|
-
}, [checked]);
|
|
206
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
207
|
-
className: `${prefixCls}-wrapper`
|
|
208
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
ref: ref,
|
|
210
|
-
style: style,
|
|
211
|
-
onClick: handleClick,
|
|
212
|
-
className: clsx([prefixCls, className, {
|
|
213
|
-
noStyle: noStyle,
|
|
214
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
215
|
-
[`${prefixCls}-checked`]: internalChecked
|
|
216
|
-
}])
|
|
217
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
218
|
-
id: id,
|
|
219
|
-
type: type,
|
|
220
|
-
name: name,
|
|
221
|
-
disabled: disabled,
|
|
222
|
-
tabIndex: tabIndex,
|
|
223
|
-
required: required,
|
|
224
|
-
autoFocus: autoFocus,
|
|
225
|
-
onKeyDown: onKeyDown,
|
|
226
|
-
onKeyPress: onKeyPress,
|
|
227
|
-
onMouseEnter: onMouseEnter,
|
|
228
|
-
onMouseLeave: onMouseLeave
|
|
229
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
230
|
-
className: `${prefixCls}-box`
|
|
231
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
232
|
-
className: `${prefixCls}-check`,
|
|
233
|
-
style: {
|
|
234
|
-
opacity: Number(internalChecked)
|
|
235
|
-
}
|
|
236
|
-
}))), children && /*#__PURE__*/React.createElement("span", {
|
|
237
|
-
className: `${prefixCls}-label`
|
|
238
|
-
}, children));
|
|
239
|
-
});
|
|
240
|
-
CheckboxClient.displayName = 'CheckboxClient';
|
|
241
|
-
|
|
242
|
-
const Checkbox = ({
|
|
243
|
-
prefixCls = prefixClsCheckbox,
|
|
244
|
-
className = '',
|
|
245
|
-
defaultChecked = false,
|
|
246
|
-
checked,
|
|
247
|
-
style,
|
|
248
|
-
disabled = false,
|
|
249
|
-
onChange,
|
|
250
|
-
onClick,
|
|
251
|
-
onMouseEnter,
|
|
252
|
-
onMouseLeave,
|
|
253
|
-
onKeyPress,
|
|
254
|
-
onKeyDown,
|
|
255
|
-
tabIndex,
|
|
256
|
-
name,
|
|
257
|
-
children,
|
|
258
|
-
id,
|
|
259
|
-
autoFocus,
|
|
260
|
-
type = 'checkbox',
|
|
261
|
-
value = false,
|
|
262
|
-
required = false,
|
|
263
|
-
noStyle
|
|
264
|
-
}) => {
|
|
265
|
-
return /*#__PURE__*/React.createElement(CheckboxClient, {
|
|
266
|
-
prefixCls: prefixCls,
|
|
267
|
-
className: className,
|
|
268
|
-
defaultChecked: defaultChecked,
|
|
269
|
-
checked: checked,
|
|
270
|
-
style: style,
|
|
271
|
-
disabled: disabled,
|
|
272
|
-
onChange: onChange,
|
|
273
|
-
onClick: onClick,
|
|
274
|
-
onMouseEnter: onMouseEnter,
|
|
275
|
-
onMouseLeave: onMouseLeave,
|
|
276
|
-
onKeyPress: onKeyPress,
|
|
277
|
-
onKeyDown: onKeyDown,
|
|
278
|
-
tabIndex: tabIndex,
|
|
279
|
-
name: name,
|
|
280
|
-
id: id,
|
|
281
|
-
autoFocus: autoFocus,
|
|
282
|
-
type: type,
|
|
283
|
-
value: value,
|
|
284
|
-
required: required,
|
|
285
|
-
noStyle: noStyle
|
|
286
|
-
}, children);
|
|
287
|
-
};
|
|
288
|
-
Checkbox.displayName = 'Checkbox';
|
|
289
|
-
|
|
290
|
-
export { Button, Checkbox, EmptyContent as Empty };
|
|
121
|
+
export { Button };
|
|
291
122
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../lib/utils/index.ts","../lib/components/Empty/Empty.tsx","../lib/helpers/index.ts","../lib/components/Button/Button.tsx","../lib/components/Checkbox/Checkbox.client.tsx","../lib/components/Checkbox/Checkbox.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","export const prefixClsForm = 'xUi-form';\nexport const prefixClsFormItem = 'xUi-form-item';\nexport const prefixClsEmpty = 'xUi-empty';\nexport const prefixClsInput = 'xUi-input';\nexport const prefixClsSelect = 'xUi-select';\nexport const prefixClsCheckbox = 'xUi-checkbox';\nexport const prefixClsRadio = 'xUi-radio';\nexport const prefixClsTextArea = 'xUi-textarea';\nexport const prefixClsUpload = 'xUi-upload';\nexport const prefixClsDatePicker = 'xUi-datepicker';\nexport const prefixClsRangePicker = 'xUi-rangepicker';\nexport const prefixClsTimePicker = 'xUi-timepicker';\nexport const prefixClsButton = 'xUi-button';\nexport const prefixClsSkeleton = 'xUi-skeleton';\n","import { EmptyContentProps } from '../../types/empty';\nimport { prefixClsEmpty } from '../../utils';\nimport './style.css';\n\nconst EmptyContent = ({\n icon,\n style = {},\n className = '',\n title = 'No Data',\n description = 'No data',\n prefixCls = prefixClsEmpty\n}: EmptyContentProps) => (\n <div\n style={style}\n className={`${prefixCls} ${prefixCls}-normal ${prefixCls}-small ${className}`}\n >\n <div className={`${prefixCls}-image`}>\n {icon || (\n <svg\n width=\"64\"\n height=\"41\"\n viewBox=\"0 0 64 41\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{title}</title>\n <g transform=\"translate(0 1)\" fill=\"none\">\n <ellipse fill=\"#f5f5f5\" cx=\"32\" cy=\"33\" rx=\"32\" ry=\"7\"></ellipse>\n <g stroke=\"#d9d9d9\">\n <path d=\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\"></path>\n <path\n d=\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\"\n fill=\"#fafafa\"\n ></path>\n </g>\n </g>\n </svg>\n )}\n </div>\n <div className={`${prefixCls}-description`}>{description}</div>\n </div>\n);\n\nexport default EmptyContent;\n","import { RuleType } from '../types';\n\nexport const parseValue = (value: RuleType): RuleType => {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (!isNaN(Number(value))) {\n return Number(value);\n }\n\n return value;\n};\n\nexport function createArray(length: number): number[] {\n return Array.from({ length }, (_, index) => index);\n}\n\nexport function clsx(...args: RuleType[]): string {\n return args\n .flatMap(arg => {\n if (!arg) {\n return [];\n }\n\n if (typeof arg === 'string') {\n return [arg];\n }\n\n if (typeof arg === 'number') {\n return [String(arg)];\n }\n\n if (Array.isArray(arg)) {\n return clsx(...arg).split(' ');\n }\n\n if (typeof arg === 'object') {\n return Object.entries(arg)\n .filter(([, value]) => Boolean(value))\n .map(([key]) => key);\n }\n\n return [];\n })\n .filter(Boolean)\n .join(' ');\n}\n","import { ReactElement, ReactNode } from 'react';\nimport { clsx } from '../../helpers';\nimport { ButtonProps } from '../../types/button';\nimport { prefixClsButton } from '../../utils';\nimport './style.css';\n\nconst Button = ({\n type = 'default',\n variant = 'solid',\n color = 'default',\n shape = 'default',\n size = 'middle',\n htmlType = 'button',\n className,\n rootClassName,\n classNames: customClassNames = {},\n styles = {},\n prefixCls = prefixClsButton,\n iconPosition = 'start',\n disabled = false,\n ghost = false,\n danger = false,\n block = false,\n children,\n href,\n iconNode,\n isLoading = false,\n ...restProps\n}: ButtonProps & {\n iconNode?: ReactNode;\n isLoading?: boolean;\n}): ReactElement => {\n const classes = clsx(\n prefixCls,\n rootClassName,\n `${prefixCls}-${type}`,\n `${prefixCls}-${variant}`,\n `${prefixCls}-${color}`,\n `${prefixCls}-${shape}`,\n `${prefixCls}-size-${size}`,\n {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-ghost`]: ghost,\n [`${prefixCls}-danger`]: danger,\n [`${prefixCls}-loading`]: isLoading,\n [`${prefixCls}-disabled`]: disabled\n },\n className\n );\n\n const mergedDisabled = disabled || isLoading;\n\n const content = (\n <>\n {iconNode && iconPosition === 'start' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n <span className={`${prefixCls}-content`}>{children}</span>\n {iconNode && iconPosition === 'end' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n className={classes}\n href={mergedDisabled ? undefined : href}\n aria-disabled={mergedDisabled}\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type={htmlType}\n className={classes}\n disabled={mergedDisabled}\n {...restProps}\n >\n {content}\n </button>\n );\n};\n\nexport default Button;\n","'use client';\n\nimport {\n ForwardedRef,\n forwardRef,\n MouseEvent,\n ReactElement,\n useEffect,\n useState\n} from 'react';\nimport { clsx } from '../../helpers';\nimport { SyntheticBaseEvent } from '../../types';\nimport { CheckboxProps } from '../../types/checkbox';\nimport './style.css';\n\nconst CheckboxClient = forwardRef<HTMLDivElement, CheckboxProps>(\n (\n {\n prefixCls,\n className = '',\n defaultChecked = false,\n checked,\n style,\n disabled = false,\n onChange,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onKeyPress,\n onKeyDown,\n tabIndex,\n name,\n children,\n id,\n autoFocus,\n type = 'checkbox',\n value = false,\n required = false,\n noStyle\n },\n ref: ForwardedRef<HTMLDivElement>\n ): ReactElement => {\n const isChecked = checked !== undefined ? checked : defaultChecked || value;\n const [internalChecked, setInternalChecked] = useState(isChecked);\n\n const handleClick = (\n e: MouseEvent<HTMLInputElement> & SyntheticBaseEvent\n ) => {\n e.stopPropagation();\n\n if (disabled) {\n return;\n }\n\n setInternalChecked(!internalChecked);\n e.target.value = !internalChecked;\n\n onClick?.(e);\n onChange?.(e);\n };\n\n useEffect(() => {\n if (checked !== undefined) {\n setInternalChecked(checked);\n }\n }, [checked]);\n\n return (\n <div className={`${prefixCls}-wrapper`}>\n <div\n ref={ref}\n style={style}\n onClick={handleClick}\n className={clsx([\n prefixCls,\n className,\n {\n noStyle: noStyle,\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-checked`]: internalChecked\n }\n ])}\n >\n <input\n id={id}\n type={type}\n name={name}\n disabled={disabled}\n tabIndex={tabIndex}\n required={required}\n autoFocus={autoFocus}\n onKeyDown={onKeyDown}\n onKeyPress={onKeyPress}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n\n <span className={`${prefixCls}-box`}>\n <span\n className={`${prefixCls}-check`}\n style={{ opacity: Number(internalChecked) }}\n />\n </span>\n </div>\n\n {children && <span className={`${prefixCls}-label`}>{children}</span>}\n </div>\n );\n }\n);\n\nCheckboxClient.displayName = 'CheckboxClient';\n\nexport default CheckboxClient;","import { ReactElement } from 'react';\nimport { CheckboxProps } from '../../types/checkbox';\nimport { prefixClsCheckbox } from '../../utils';\nimport CheckboxClient from './Checkbox.client';\n\nconst Checkbox = ({\n prefixCls = prefixClsCheckbox,\n className = '',\n defaultChecked = false,\n checked,\n style,\n disabled = false,\n onChange,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onKeyPress,\n onKeyDown,\n tabIndex,\n name,\n children,\n id,\n autoFocus,\n type = 'checkbox',\n value = false,\n required = false,\n noStyle\n}: CheckboxProps): ReactElement => {\n return (\n <CheckboxClient\n prefixCls={prefixCls}\n className={className}\n defaultChecked={defaultChecked}\n checked={checked}\n style={style}\n disabled={disabled}\n onChange={onChange}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onKeyPress={onKeyPress}\n onKeyDown={onKeyDown}\n tabIndex={tabIndex}\n name={name}\n id={id}\n autoFocus={autoFocus}\n type={type}\n value={value}\n required={required}\n noStyle={noStyle}\n >\n {children}\n </CheckboxClient>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","prefixClsEmpty","prefixClsCheckbox","prefixClsButton","EmptyContent","icon","className","title","description","prefixCls","React","width","height","viewBox","xmlns","transform","fill","cx","cy","rx","ry","stroke","d","clsx","args","flatMap","arg","String","Array","isArray","split","Object","entries","filter","value","Boolean","map","key","join","Button","variant","color","shape","size","htmlType","rootClassName","classNames","customClassNames","styles","iconPosition","disabled","ghost","danger","block","children","href","iconNode","isLoading","restProps","classes","mergedDisabled","content","Fragment","undefined","_extends","CheckboxClient","forwardRef","defaultChecked","checked","onChange","onClick","onMouseEnter","onMouseLeave","onKeyPress","onKeyDown","tabIndex","name","id","autoFocus","required","noStyle","isChecked","internalChecked","setInternalChecked","useState","handleClick","e","stopPropagation","target","useEffect","opacity","Number","displayName","Checkbox"],"mappings":";;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ,CAAA;AAE3B,EAAA,IAAI,CAACF,GAAG,IAAI,OAAOG,QAAQ,KAAK,WAAW,EAAE;AAAE,IAAA,OAAA;AAAQ,GAAA;AAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IA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AAA,EAAE,EAAEA,EAAG;AACPC,IAAAA,SAAS,EAAEA,SAAU;AACrBpF,IAAAA,IAAI,EAAEA,IAAK;AACXwC,IAAAA,KAAK,EAAEA,KAAM;AACb6C,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,EAEhB1B,QACa,CAAC,CAAA;AAErB,EAAC;AAEDuC,QAAQ,CAACD,WAAW,GAAG,UAAU;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../lib/helpers/index.ts","../lib/utils/index.ts","../lib/components/Button/Button.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { RuleType } from '../types';\n\nexport const parseValue = (value: RuleType): RuleType => {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (!isNaN(Number(value))) {\n return Number(value);\n }\n\n return value;\n};\n\nexport function createArray(length: number): number[] {\n return Array.from({ length }, (_, index) => index);\n}\n\nexport function clsx(...args: RuleType[]): string {\n return args\n .flatMap(arg => {\n if (!arg) {\n return [];\n }\n\n if (typeof arg === 'string') {\n return [arg];\n }\n\n if (typeof arg === 'number') {\n return [String(arg)];\n }\n\n if (Array.isArray(arg)) {\n return clsx(...arg).split(' ');\n }\n\n if (typeof arg === 'object') {\n return Object.entries(arg)\n .filter(([, value]) => Boolean(value))\n .map(([key]) => key);\n }\n\n return [];\n })\n .filter(Boolean)\n .join(' ');\n}\n","export const prefixClsForm = 'xUi-form';\nexport const prefixClsFormItem = 'xUi-form-item';\nexport const prefixClsEmpty = 'xUi-empty';\nexport const prefixClsInput = 'xUi-input';\nexport const prefixClsSelect = 'xUi-select';\nexport const prefixClsCheckbox = 'xUi-checkbox';\nexport const prefixClsRadio = 'xUi-radio';\nexport const prefixClsTextArea = 'xUi-textarea';\nexport const prefixClsUpload = 'xUi-upload';\nexport const prefixClsDatePicker = 'xUi-datepicker';\nexport const prefixClsRangePicker = 'xUi-rangepicker';\nexport const prefixClsTimePicker = 'xUi-timepicker';\nexport const prefixClsButton = 'xUi-button';\nexport const prefixClsSkeleton = 'xUi-skeleton';\n","import React, { ReactElement, ReactNode } from 'react';\nimport { clsx } from '../../helpers';\nimport { ButtonProps } from '../../types/button';\nimport { prefixClsButton } from '../../utils';\nimport './style.css';\n\nconst Button = ({\n type = 'default',\n variant = 'solid',\n color = 'default',\n shape = 'default',\n size = 'middle',\n htmlType = 'button',\n className,\n rootClassName,\n classNames: customClassNames = {},\n styles = {},\n prefixCls = prefixClsButton,\n iconPosition = 'start',\n disabled = false,\n ghost = false,\n danger = false,\n block = false,\n children,\n href,\n iconNode,\n isLoading = false,\n ...restProps\n}: ButtonProps & {\n iconNode?: ReactNode;\n isLoading?: boolean;\n}): ReactElement => {\n const classes = clsx(\n prefixCls,\n rootClassName,\n `${prefixCls}-${type}`,\n `${prefixCls}-${variant}`,\n `${prefixCls}-${color}`,\n `${prefixCls}-${shape}`,\n `${prefixCls}-size-${size}`,\n {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-ghost`]: ghost,\n [`${prefixCls}-danger`]: danger,\n [`${prefixCls}-loading`]: isLoading,\n [`${prefixCls}-disabled`]: disabled\n },\n className\n );\n\n const mergedDisabled = disabled || isLoading;\n\n const content = (\n <>\n {iconNode && iconPosition === 'start' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n <span className={`${prefixCls}-content`}>{children}</span>\n {iconNode && iconPosition === 'end' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n className={classes}\n href={mergedDisabled ? undefined : href}\n aria-disabled={mergedDisabled}\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type={htmlType}\n className={classes}\n disabled={mergedDisabled}\n {...restProps}\n >\n {content}\n </button>\n );\n};\n\nexport default Button;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","clsx","args","flatMap","arg","String","Array","isArray","split","Object","entries","filter","value","Boolean","map","key","join","prefixClsButton","Button","variant","color","shape","size","htmlType","className","rootClassName","classNames","customClassNames","styles","prefixCls","iconPosition","disabled","ghost","danger","block","children","href","iconNode","isLoading","restProps","classes","mergedDisabled","content","React","Fragment","icon","undefined","_extends"],"mappings":";;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ,CAAA;AAE3B,EAAA,IAAI,CAACF,GAAG,IAAI,OAAOG,QAAQ,KAAK,WAAW,EAAE;AAAE,IAAA,OAAA;AAAQ,GAAA;AAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,QAAQ,CAACE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpE,EAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAa,CAAC,OAAO,CAAC,CAAA;EAC3CD,KAAK,CAACE,IAAI,GAAG,UAAU,CAAA;EAEvB,IAAIN,QAAQ,KAAK,KAAK,EAAE;IACtB,IAAIE,IAAI,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AlD,aAAA,CAAA,GAAA,EAAA;AACE+B,MAAAA,SAAS,EAAEgB,OAAQ;AACnBJ,MAAAA,IAAI,EAAEK,cAAc,GAAGK,SAAS,GAAGV,IAAK;MACxC,eAAeK,EAAAA,cAAAA;AAAe,KAAA,EAE7BC,OACA,CAAC,CAAA;AAER,GAAA;AAEA,EAAA,oBACEC,KAAA,CAAAlD,aAAA,CAAA,QAAA,EAAAsD,QAAA,CAAA;AACErD,IAAAA,IAAI,EAAE6B,QAAS;AACfC,IAAAA,SAAS,EAAEgB,OAAQ;AACnBT,IAAAA,QAAQ,EAAEU,cAAAA;GACNF,EAAAA,SAAS,CAEZG,EAAAA,OACK,CAAC,CAAA;AAEb;;;;","x_google_ignoreList":[0]}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
|
|
5
5
|
function styleInject(css, ref) {
|
|
6
6
|
if (ref === void 0) ref = {};
|
|
@@ -27,52 +27,8 @@ function styleInject(css, ref) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var css_248z$
|
|
31
|
-
styleInject(css_248z$
|
|
32
|
-
|
|
33
|
-
const prefixClsEmpty = 'xUi-empty';
|
|
34
|
-
const prefixClsCheckbox = 'xUi-checkbox';
|
|
35
|
-
const prefixClsButton = 'xUi-button';
|
|
36
|
-
|
|
37
|
-
var css_248z$2 = ".xUi-empty{align-items:center;display:grid;gap:4px;justify-content:center;padding:14px}.xUi-empty-description{color:var(--xui-text-color);font-size:var(--xui-font-size-md);text-align:center}";
|
|
38
|
-
styleInject(css_248z$2);
|
|
39
|
-
|
|
40
|
-
const EmptyContent = ({
|
|
41
|
-
icon,
|
|
42
|
-
style = {},
|
|
43
|
-
className = '',
|
|
44
|
-
title = 'No Data',
|
|
45
|
-
description = 'No data',
|
|
46
|
-
prefixCls = prefixClsEmpty
|
|
47
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
style: style,
|
|
49
|
-
className: `${prefixCls} ${prefixCls}-normal ${prefixCls}-small ${className}`
|
|
50
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: `${prefixCls}-image`
|
|
52
|
-
}, icon || /*#__PURE__*/React.createElement("svg", {
|
|
53
|
-
width: "64",
|
|
54
|
-
height: "41",
|
|
55
|
-
viewBox: "0 0 64 41",
|
|
56
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
57
|
-
}, /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("g", {
|
|
58
|
-
transform: "translate(0 1)",
|
|
59
|
-
fill: "none"
|
|
60
|
-
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
61
|
-
fill: "#f5f5f5",
|
|
62
|
-
cx: "32",
|
|
63
|
-
cy: "33",
|
|
64
|
-
rx: "32",
|
|
65
|
-
ry: "7"
|
|
66
|
-
}), /*#__PURE__*/React.createElement("g", {
|
|
67
|
-
stroke: "#d9d9d9"
|
|
68
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
69
|
-
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
70
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
71
|
-
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
|
|
72
|
-
fill: "#fafafa"
|
|
73
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: `${prefixCls}-description`
|
|
75
|
-
}, description));
|
|
30
|
+
var css_248z$1 = ":root{--xui-color-hover:#f5f5f5;--xui-color-disabled:#e6e6e6;--xui-primary-color:#1677ff;--xui-primary-color-light:#40a9ff;--xui-text-color:rgba(0,0,0,.88);--xui-text-color-light:rgba(0,0,0,.5);--xui-error-color:#ff4d4f;--xui-error-color-light:#ff6668;--xui-success-color:#52c41a;--xui-background-color:#fff;--xui-font-size-xs:12px;--xui-font-size-sm:14px;--xui-font-size-md:14px;--xui-font-size-lg:16px;--xui-border-radius-sm:4px;--xui-border-radius-md:4px;--xui-border-radius-lg:6px;--xui-border-color:#d9d9d9;--xui-select-primary-color:var(--xui-primary-color);--xui-select-background-color:var(--xui-background-color)}html{font-family:sans-serif}.globalEllipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
31
|
+
styleInject(css_248z$1);
|
|
76
32
|
|
|
77
33
|
function _extends() {
|
|
78
34
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -105,8 +61,10 @@ function clsx(...args) {
|
|
|
105
61
|
}).filter(Boolean).join(' ');
|
|
106
62
|
}
|
|
107
63
|
|
|
108
|
-
|
|
109
|
-
|
|
64
|
+
const prefixClsButton = 'xUi-button';
|
|
65
|
+
|
|
66
|
+
var css_248z = ".xUi-button{border:1px solid transparent;border-radius:6px;cursor:pointer;font-weight:400;line-height:1.5715;transition:all .3s ease;user-select:none;vertical-align:middle;white-space:nowrap}.xUi-button,.xUi-button-content,.xUi-button-icon{align-items:center;display:inline-flex;justify-content:center}.xUi-button-icon{line-height:0;margin-right:.5em}.xUi-button-icon:last-child{margin-left:.5em;margin-right:0}.xUi-button-spinner{animation:xUi-spin 1s linear infinite;border:1px solid transparent;border-radius:50%;border-top:1px solid var(--xui-text-color);height:1em;width:1em}@keyframes xUi-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.xUi-button-size-small{font-size:12px;height:24px;padding:4px 12px}.xUi-button-size-middle{font-size:14px;height:32px;padding:0 16px}.xUi-button-size-large{font-size:16px;height:40px;padding:8px 20px}.xUi-button-circle{border-radius:50%;justify-content:center;padding:0}.xUi-button-circle.xUi-button-size-small{height:24px;width:24px}.xUi-button-circle.xUi-button-size-large{height:40px;width:40px}.xUi-button-round{border-radius:9999px}.xUi-button-default{background-color:#fff;border-color:var(--xui-border-color);color:rgba(0,0,0,.85)}.xUi-button-default:hover{border-color:var(--xui-primary-color);color:var(--xui-primary-color)}.xUi-button-primary{background-color:var(--xui-primary-color);border-color:var(--xui-primary-color);color:#fff}.xUi-button-primary:hover{background-color:var(--xui-primary-color-light);border-color:var(--xui-primary-color-light);color:#fff}.xUi-button-dashed{background-color:#fff;border-color:var(--xui-border-color);border-style:dashed;color:rgba(0,0,0,.85)}.xUi-button-dashed:hover{border-color:var(--xui-primary-color);color:var(--xui-primary-color)}.xUi-button-text{background-color:transparent;border-color:transparent!important;color:rgba(0,0,0,.88)}.xUi-button-text:hover{background-color:rgba(0,0,0,.04);border-color:transparent;color:rgba(0,0,0,.88)}.xUi-button-link{background-color:transparent;border-color:transparent!important;color:var(--xui-primary-color)}.xUi-button-link:hover{border-color:transparent;color:var(--xui-primary-color-light)}.xUi-button-outlined{color:#fff}.xUi-button-filled,.xUi-button-outlined{background-color:transparent;border-color:var(--xui-border-color)}.xUi-button-filled{color:var(--xui-text-color)}.xUi-button-danger{background-color:transparent;border-color:var(--xui-error-color);color:var(--xui-error-color)}.xUi-button-danger:hover{border-color:var(--xui-error-color-light);color:var(--xui-error-color-light)}.xUi-button-ghost{opacity:0}.xUi-button-ghost:hover{opacity:1}.xUi-button-block{display:flex;width:100%}.xUi-button-disabled,.xUi-button-loading{background-color:var(--xui-color-disabled);border-color:var(--xui-border-color);color:var(--xui-text-color);cursor:not-allowed;opacity:.5;pointer-events:none}.xUi-button-loading{background-color:transparent}";
|
|
67
|
+
styleInject(css_248z);
|
|
110
68
|
|
|
111
69
|
const Button = ({
|
|
112
70
|
type = 'default',
|
|
@@ -162,134 +120,5 @@ const Button = ({
|
|
|
162
120
|
}, restProps), content);
|
|
163
121
|
};
|
|
164
122
|
|
|
165
|
-
var css_248z = ".xUi-checkbox-wrapper{align-items:center;color:var(--xui-main-color);cursor:pointer;display:inline-flex;font-size:var(--xui-font-size-md);margin:16px 0}.xUi-checkbox{background-color:transparent;border:1px solid var(--xui-border-color);border-radius:var(--xui-border-radius-sm);display:inline-block;height:14px;position:relative;transition:all .3s;width:14px}.xUi-checkbox.xUi-checkbox-checked{background-color:#f0f5ff;border-color:var(--xui-primary-color)}.xUi-checkbox input{cursor:pointer;inset:0;opacity:0;position:absolute}.xUi-checkbox-inner{border-left:0;border-top:0;border:2px solid var(--xui-background-color);height:6px;left:50%;position:absolute;top:50%;transform:rotate(45deg) scale(0);transition:transform .2s ease-in-out;width:10px}.xUi-checkbox-check{background-color:var(--xui-primary-color);border-color:var(--xui-primary-color);display:block;height:100%;position:relative;transition:.1s ease;width:100%}.xUi-checkbox-check:after{border:solid #fff;border-width:0 2px 2px 0;content:\"\";height:8px;left:3px;position:absolute;top:1px;transform:rotate(45deg);width:5px}.xUi-checkbox-disabled,.xUi-checkbox-disabled .xUi-checkbox-check{background-color:var(--xui-color-disabled);border-color:var(--xui-border-color)!important;cursor:not-allowed;opacity:.5}.xUi-checkbox-label{font-size:14px;margin-left:8px;user-select:none}.xUi-checkbox:focus:not(.disabled),.xUi-checkbox:hover:not(.disabled){border-color:var(--xui-primary-color);cursor:pointer}.xUi-checkbox.disabled{cursor:not-allowed;opacity:.5}";
|
|
166
|
-
styleInject(css_248z);
|
|
167
|
-
|
|
168
|
-
const CheckboxClient = /*#__PURE__*/react.forwardRef(({
|
|
169
|
-
prefixCls,
|
|
170
|
-
className = '',
|
|
171
|
-
defaultChecked = false,
|
|
172
|
-
checked,
|
|
173
|
-
style,
|
|
174
|
-
disabled = false,
|
|
175
|
-
onChange,
|
|
176
|
-
onClick,
|
|
177
|
-
onMouseEnter,
|
|
178
|
-
onMouseLeave,
|
|
179
|
-
onKeyPress,
|
|
180
|
-
onKeyDown,
|
|
181
|
-
tabIndex,
|
|
182
|
-
name,
|
|
183
|
-
children,
|
|
184
|
-
id,
|
|
185
|
-
autoFocus,
|
|
186
|
-
type = 'checkbox',
|
|
187
|
-
value = false,
|
|
188
|
-
required = false,
|
|
189
|
-
noStyle
|
|
190
|
-
}, ref) => {
|
|
191
|
-
const isChecked = checked !== undefined ? checked : defaultChecked || value;
|
|
192
|
-
const [internalChecked, setInternalChecked] = react.useState(isChecked);
|
|
193
|
-
const handleClick = e => {
|
|
194
|
-
e.stopPropagation();
|
|
195
|
-
if (disabled) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
setInternalChecked(!internalChecked);
|
|
199
|
-
e.target.value = !internalChecked;
|
|
200
|
-
onClick?.(e);
|
|
201
|
-
onChange?.(e);
|
|
202
|
-
};
|
|
203
|
-
react.useEffect(() => {
|
|
204
|
-
if (checked !== undefined) {
|
|
205
|
-
setInternalChecked(checked);
|
|
206
|
-
}
|
|
207
|
-
}, [checked]);
|
|
208
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
className: `${prefixCls}-wrapper`
|
|
210
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
211
|
-
ref: ref,
|
|
212
|
-
style: style,
|
|
213
|
-
onClick: handleClick,
|
|
214
|
-
className: clsx([prefixCls, className, {
|
|
215
|
-
noStyle: noStyle,
|
|
216
|
-
[`${prefixCls}-disabled`]: disabled,
|
|
217
|
-
[`${prefixCls}-checked`]: internalChecked
|
|
218
|
-
}])
|
|
219
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
220
|
-
id: id,
|
|
221
|
-
type: type,
|
|
222
|
-
name: name,
|
|
223
|
-
disabled: disabled,
|
|
224
|
-
tabIndex: tabIndex,
|
|
225
|
-
required: required,
|
|
226
|
-
autoFocus: autoFocus,
|
|
227
|
-
onKeyDown: onKeyDown,
|
|
228
|
-
onKeyPress: onKeyPress,
|
|
229
|
-
onMouseEnter: onMouseEnter,
|
|
230
|
-
onMouseLeave: onMouseLeave
|
|
231
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
232
|
-
className: `${prefixCls}-box`
|
|
233
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
234
|
-
className: `${prefixCls}-check`,
|
|
235
|
-
style: {
|
|
236
|
-
opacity: Number(internalChecked)
|
|
237
|
-
}
|
|
238
|
-
}))), children && /*#__PURE__*/React.createElement("span", {
|
|
239
|
-
className: `${prefixCls}-label`
|
|
240
|
-
}, children));
|
|
241
|
-
});
|
|
242
|
-
CheckboxClient.displayName = 'CheckboxClient';
|
|
243
|
-
|
|
244
|
-
const Checkbox = ({
|
|
245
|
-
prefixCls = prefixClsCheckbox,
|
|
246
|
-
className = '',
|
|
247
|
-
defaultChecked = false,
|
|
248
|
-
checked,
|
|
249
|
-
style,
|
|
250
|
-
disabled = false,
|
|
251
|
-
onChange,
|
|
252
|
-
onClick,
|
|
253
|
-
onMouseEnter,
|
|
254
|
-
onMouseLeave,
|
|
255
|
-
onKeyPress,
|
|
256
|
-
onKeyDown,
|
|
257
|
-
tabIndex,
|
|
258
|
-
name,
|
|
259
|
-
children,
|
|
260
|
-
id,
|
|
261
|
-
autoFocus,
|
|
262
|
-
type = 'checkbox',
|
|
263
|
-
value = false,
|
|
264
|
-
required = false,
|
|
265
|
-
noStyle
|
|
266
|
-
}) => {
|
|
267
|
-
return /*#__PURE__*/React.createElement(CheckboxClient, {
|
|
268
|
-
prefixCls: prefixCls,
|
|
269
|
-
className: className,
|
|
270
|
-
defaultChecked: defaultChecked,
|
|
271
|
-
checked: checked,
|
|
272
|
-
style: style,
|
|
273
|
-
disabled: disabled,
|
|
274
|
-
onChange: onChange,
|
|
275
|
-
onClick: onClick,
|
|
276
|
-
onMouseEnter: onMouseEnter,
|
|
277
|
-
onMouseLeave: onMouseLeave,
|
|
278
|
-
onKeyPress: onKeyPress,
|
|
279
|
-
onKeyDown: onKeyDown,
|
|
280
|
-
tabIndex: tabIndex,
|
|
281
|
-
name: name,
|
|
282
|
-
id: id,
|
|
283
|
-
autoFocus: autoFocus,
|
|
284
|
-
type: type,
|
|
285
|
-
value: value,
|
|
286
|
-
required: required,
|
|
287
|
-
noStyle: noStyle
|
|
288
|
-
}, children);
|
|
289
|
-
};
|
|
290
|
-
Checkbox.displayName = 'Checkbox';
|
|
291
|
-
|
|
292
123
|
exports.Button = Button;
|
|
293
|
-
exports.Checkbox = Checkbox;
|
|
294
|
-
exports.Empty = EmptyContent;
|
|
295
124
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../lib/utils/index.ts","../lib/components/Empty/Empty.tsx","../lib/helpers/index.ts","../lib/components/Button/Button.tsx","../lib/components/Checkbox/Checkbox.client.tsx","../lib/components/Checkbox/Checkbox.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","export const prefixClsForm = 'xUi-form';\nexport const prefixClsFormItem = 'xUi-form-item';\nexport const prefixClsEmpty = 'xUi-empty';\nexport const prefixClsInput = 'xUi-input';\nexport const prefixClsSelect = 'xUi-select';\nexport const prefixClsCheckbox = 'xUi-checkbox';\nexport const prefixClsRadio = 'xUi-radio';\nexport const prefixClsTextArea = 'xUi-textarea';\nexport const prefixClsUpload = 'xUi-upload';\nexport const prefixClsDatePicker = 'xUi-datepicker';\nexport const prefixClsRangePicker = 'xUi-rangepicker';\nexport const prefixClsTimePicker = 'xUi-timepicker';\nexport const prefixClsButton = 'xUi-button';\nexport const prefixClsSkeleton = 'xUi-skeleton';\n","import { EmptyContentProps } from '../../types/empty';\nimport { prefixClsEmpty } from '../../utils';\nimport './style.css';\n\nconst EmptyContent = ({\n icon,\n style = {},\n className = '',\n title = 'No Data',\n description = 'No data',\n prefixCls = prefixClsEmpty\n}: EmptyContentProps) => (\n <div\n style={style}\n className={`${prefixCls} ${prefixCls}-normal ${prefixCls}-small ${className}`}\n >\n <div className={`${prefixCls}-image`}>\n {icon || (\n <svg\n width=\"64\"\n height=\"41\"\n viewBox=\"0 0 64 41\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{title}</title>\n <g transform=\"translate(0 1)\" fill=\"none\">\n <ellipse fill=\"#f5f5f5\" cx=\"32\" cy=\"33\" rx=\"32\" ry=\"7\"></ellipse>\n <g stroke=\"#d9d9d9\">\n <path d=\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\"></path>\n <path\n d=\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\"\n fill=\"#fafafa\"\n ></path>\n </g>\n </g>\n </svg>\n )}\n </div>\n <div className={`${prefixCls}-description`}>{description}</div>\n </div>\n);\n\nexport default EmptyContent;\n","import { RuleType } from '../types';\n\nexport const parseValue = (value: RuleType): RuleType => {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (!isNaN(Number(value))) {\n return Number(value);\n }\n\n return value;\n};\n\nexport function createArray(length: number): number[] {\n return Array.from({ length }, (_, index) => index);\n}\n\nexport function clsx(...args: RuleType[]): string {\n return args\n .flatMap(arg => {\n if (!arg) {\n return [];\n }\n\n if (typeof arg === 'string') {\n return [arg];\n }\n\n if (typeof arg === 'number') {\n return [String(arg)];\n }\n\n if (Array.isArray(arg)) {\n return clsx(...arg).split(' ');\n }\n\n if (typeof arg === 'object') {\n return Object.entries(arg)\n .filter(([, value]) => Boolean(value))\n .map(([key]) => key);\n }\n\n return [];\n })\n .filter(Boolean)\n .join(' ');\n}\n","import { ReactElement, ReactNode } from 'react';\nimport { clsx } from '../../helpers';\nimport { ButtonProps } from '../../types/button';\nimport { prefixClsButton } from '../../utils';\nimport './style.css';\n\nconst Button = ({\n type = 'default',\n variant = 'solid',\n color = 'default',\n shape = 'default',\n size = 'middle',\n htmlType = 'button',\n className,\n rootClassName,\n classNames: customClassNames = {},\n styles = {},\n prefixCls = prefixClsButton,\n iconPosition = 'start',\n disabled = false,\n ghost = false,\n danger = false,\n block = false,\n children,\n href,\n iconNode,\n isLoading = false,\n ...restProps\n}: ButtonProps & {\n iconNode?: ReactNode;\n isLoading?: boolean;\n}): ReactElement => {\n const classes = clsx(\n prefixCls,\n rootClassName,\n `${prefixCls}-${type}`,\n `${prefixCls}-${variant}`,\n `${prefixCls}-${color}`,\n `${prefixCls}-${shape}`,\n `${prefixCls}-size-${size}`,\n {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-ghost`]: ghost,\n [`${prefixCls}-danger`]: danger,\n [`${prefixCls}-loading`]: isLoading,\n [`${prefixCls}-disabled`]: disabled\n },\n className\n );\n\n const mergedDisabled = disabled || isLoading;\n\n const content = (\n <>\n {iconNode && iconPosition === 'start' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n <span className={`${prefixCls}-content`}>{children}</span>\n {iconNode && iconPosition === 'end' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n className={classes}\n href={mergedDisabled ? undefined : href}\n aria-disabled={mergedDisabled}\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type={htmlType}\n className={classes}\n disabled={mergedDisabled}\n {...restProps}\n >\n {content}\n </button>\n );\n};\n\nexport default Button;\n","'use client';\n\nimport {\n ForwardedRef,\n forwardRef,\n MouseEvent,\n ReactElement,\n useEffect,\n useState\n} from 'react';\nimport { clsx } from '../../helpers';\nimport { SyntheticBaseEvent } from '../../types';\nimport { CheckboxProps } from '../../types/checkbox';\nimport './style.css';\n\nconst CheckboxClient = forwardRef<HTMLDivElement, CheckboxProps>(\n (\n {\n prefixCls,\n className = '',\n defaultChecked = false,\n checked,\n style,\n disabled = false,\n onChange,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onKeyPress,\n onKeyDown,\n tabIndex,\n name,\n children,\n id,\n autoFocus,\n type = 'checkbox',\n value = false,\n required = false,\n noStyle\n },\n ref: ForwardedRef<HTMLDivElement>\n ): ReactElement => {\n const isChecked = checked !== undefined ? checked : defaultChecked || value;\n const [internalChecked, setInternalChecked] = useState(isChecked);\n\n const handleClick = (\n e: MouseEvent<HTMLInputElement> & SyntheticBaseEvent\n ) => {\n e.stopPropagation();\n\n if (disabled) {\n return;\n }\n\n setInternalChecked(!internalChecked);\n e.target.value = !internalChecked;\n\n onClick?.(e);\n onChange?.(e);\n };\n\n useEffect(() => {\n if (checked !== undefined) {\n setInternalChecked(checked);\n }\n }, [checked]);\n\n return (\n <div className={`${prefixCls}-wrapper`}>\n <div\n ref={ref}\n style={style}\n onClick={handleClick}\n className={clsx([\n prefixCls,\n className,\n {\n noStyle: noStyle,\n [`${prefixCls}-disabled`]: disabled,\n [`${prefixCls}-checked`]: internalChecked\n }\n ])}\n >\n <input\n id={id}\n type={type}\n name={name}\n disabled={disabled}\n tabIndex={tabIndex}\n required={required}\n autoFocus={autoFocus}\n onKeyDown={onKeyDown}\n onKeyPress={onKeyPress}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n />\n\n <span className={`${prefixCls}-box`}>\n <span\n className={`${prefixCls}-check`}\n style={{ opacity: Number(internalChecked) }}\n />\n </span>\n </div>\n\n {children && <span className={`${prefixCls}-label`}>{children}</span>}\n </div>\n );\n }\n);\n\nCheckboxClient.displayName = 'CheckboxClient';\n\nexport default CheckboxClient;","import { ReactElement } from 'react';\nimport { CheckboxProps } from '../../types/checkbox';\nimport { prefixClsCheckbox } from '../../utils';\nimport CheckboxClient from './Checkbox.client';\n\nconst Checkbox = ({\n prefixCls = prefixClsCheckbox,\n className = '',\n defaultChecked = false,\n checked,\n style,\n disabled = false,\n onChange,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onKeyPress,\n onKeyDown,\n tabIndex,\n name,\n children,\n id,\n autoFocus,\n type = 'checkbox',\n value = false,\n required = false,\n noStyle\n}: CheckboxProps): ReactElement => {\n return (\n <CheckboxClient\n prefixCls={prefixCls}\n className={className}\n defaultChecked={defaultChecked}\n checked={checked}\n style={style}\n disabled={disabled}\n onChange={onChange}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onKeyPress={onKeyPress}\n onKeyDown={onKeyDown}\n tabIndex={tabIndex}\n name={name}\n id={id}\n autoFocus={autoFocus}\n type={type}\n value={value}\n required={required}\n noStyle={noStyle}\n >\n {children}\n </CheckboxClient>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","prefixClsEmpty","prefixClsCheckbox","prefixClsButton","EmptyContent","icon","className","title","description","prefixCls","React","width","height","viewBox","xmlns","transform","fill","cx","cy","rx","ry","stroke","d","clsx","args","flatMap","arg","String","Array","isArray","split","Object","entries","filter","value","Boolean","map","key","join","Button","variant","color","shape","size","htmlType","rootClassName","classNames","customClassNames","styles","iconPosition","disabled","ghost","danger","block","children","href","iconNode","isLoading","restProps","classes","mergedDisabled","content","Fragment","undefined","_extends","CheckboxClient","forwardRef","defaultChecked","checked","onChange","onClick","onMouseEnter","onMouseLeave","onKeyPress","onKeyDown","tabIndex","name","id","autoFocus","required","noStyle","isChecked","internalChecked","setInternalChecked","useState","handleClick","e","stopPropagation","target","useEffect","opacity","Number","displayName","Checkbox"],"mappings":";;;;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAQ,CAAA;AAE3B,EAAA,IAAI,CAACF,GAAG,IAAI,OAAOG,QAAQ,KAAK,WAAW,EAAE;AAAE,IAAA,OAAA;AAAQ,GAAA;AAEvD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAID,QAAQ,CAACE,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpE,EAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAa,CAAC,OAAO,CAAC,CAAA;EAC3CD,KAAK,CAACE,IAAI,GAAG,UAAU,CAAA;EAEvB,IAAIN,QAAQ,KAAK,KAAK,EAAE;IACtB,IAAIE,IAAI,CAACK,UAAU,EAAE;MACnBL,IAAI,CAACM,YAAY,CAACJ,KAAK,EAAEF,IAAI,CAACK,UAAU,CAAC,CAAA;AAC3C,KAAC,MAAM;AACLL,MAAAA,IAAI,CAACO,WAAW,CAACL,KAAK,CAAC,CAAA;AACzB,KAAA;AACF,GAAC,MAAM;AACLF,IAAAA,IAAI,CAACO,WAAW,CAACL,KAAK,CAAC,CAAA;AACzB,GAAA;EAEA,IAAIA,KAAK,CAACM,UAAU,EAAE;AACpBN,IAAAA,KAAK,CAACM,UAAU,CAACC,OAAO,GAAGb,GAAG,CAAA;AAChC,GAAC,MAAM;IACLM,KAAK,CAACK,WAAW,CAACR,QAAQ,CAACW,cAAc,CAACd,GAAG,CAAC,CAAC,CAAA;AACjD,GAAA;AACF;;;;;ACvBO,MAAMe,cAAc,GAAG,WAAW,CAAA;AAGlC,M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AA,SAAS,EAAEA,SAAU;AACrB6D,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,OAAO,EAAEA,OAAQ;AACjB5E,IAAAA,KAAK,EAAEA,KAAM;AACb0D,IAAAA,QAAQ,EAAEA,QAAS;AACnBmB,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,EAAE,EAAEA,EAAG;AACPC,IAAAA,SAAS,EAAEA,SAAU;AACrBpF,IAAAA,IAAI,EAAEA,IAAK;AACXwC,IAAAA,KAAK,EAAEA,KAAM;AACb6C,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,EAEhB1B,QACa,CAAC,CAAA;AAErB,EAAC;AAEDuC,QAAQ,CAACD,WAAW,GAAG,UAAU;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../lib/helpers/index.ts","../lib/utils/index.ts","../lib/components/Button/Button.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { RuleType } from '../types';\n\nexport const parseValue = (value: RuleType): RuleType => {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (!isNaN(Number(value))) {\n return Number(value);\n }\n\n return value;\n};\n\nexport function createArray(length: number): number[] {\n return Array.from({ length }, (_, index) => index);\n}\n\nexport function clsx(...args: RuleType[]): string {\n return args\n .flatMap(arg => {\n if (!arg) {\n return [];\n }\n\n if (typeof arg === 'string') {\n return [arg];\n }\n\n if (typeof arg === 'number') {\n return [String(arg)];\n }\n\n if (Array.isArray(arg)) {\n return clsx(...arg).split(' ');\n }\n\n if (typeof arg === 'object') {\n return Object.entries(arg)\n .filter(([, value]) => Boolean(value))\n .map(([key]) => key);\n }\n\n return [];\n })\n .filter(Boolean)\n .join(' ');\n}\n","export const prefixClsForm = 'xUi-form';\nexport const prefixClsFormItem = 'xUi-form-item';\nexport const prefixClsEmpty = 'xUi-empty';\nexport const prefixClsInput = 'xUi-input';\nexport const prefixClsSelect = 'xUi-select';\nexport const prefixClsCheckbox = 'xUi-checkbox';\nexport const prefixClsRadio = 'xUi-radio';\nexport const prefixClsTextArea = 'xUi-textarea';\nexport const prefixClsUpload = 'xUi-upload';\nexport const prefixClsDatePicker = 'xUi-datepicker';\nexport const prefixClsRangePicker = 'xUi-rangepicker';\nexport const prefixClsTimePicker = 'xUi-timepicker';\nexport const prefixClsButton = 'xUi-button';\nexport const prefixClsSkeleton = 'xUi-skeleton';\n","import React, { ReactElement, ReactNode } from 'react';\nimport { clsx } from '../../helpers';\nimport { ButtonProps } from '../../types/button';\nimport { prefixClsButton } from '../../utils';\nimport './style.css';\n\nconst Button = ({\n type = 'default',\n variant = 'solid',\n color = 'default',\n shape = 'default',\n size = 'middle',\n htmlType = 'button',\n className,\n rootClassName,\n classNames: customClassNames = {},\n styles = {},\n prefixCls = prefixClsButton,\n iconPosition = 'start',\n disabled = false,\n ghost = false,\n danger = false,\n block = false,\n children,\n href,\n iconNode,\n isLoading = false,\n ...restProps\n}: ButtonProps & {\n iconNode?: ReactNode;\n isLoading?: boolean;\n}): ReactElement => {\n const classes = clsx(\n prefixCls,\n rootClassName,\n `${prefixCls}-${type}`,\n `${prefixCls}-${variant}`,\n `${prefixCls}-${color}`,\n `${prefixCls}-${shape}`,\n `${prefixCls}-size-${size}`,\n {\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-ghost`]: ghost,\n [`${prefixCls}-danger`]: danger,\n [`${prefixCls}-loading`]: isLoading,\n [`${prefixCls}-disabled`]: disabled\n },\n className\n );\n\n const mergedDisabled = disabled || isLoading;\n\n const content = (\n <>\n {iconNode && iconPosition === 'start' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n <span className={`${prefixCls}-content`}>{children}</span>\n {iconNode && iconPosition === 'end' && (\n <span\n className={clsx(`${prefixCls}-icon`, customClassNames.icon)}\n style={styles.icon}\n >\n {iconNode}\n </span>\n )}\n </>\n );\n\n if (href) {\n return (\n <a\n className={classes}\n href={mergedDisabled ? undefined : href}\n aria-disabled={mergedDisabled}\n >\n {content}\n </a>\n );\n }\n\n return (\n <button\n type={htmlType}\n className={classes}\n disabled={mergedDisabled}\n {...restProps}\n >\n {content}\n </button>\n );\n};\n\nexport default Button;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","clsx","args","flatMap","arg","String","Array","isArray","split","Object","entries","filter","value","Boolean","map","key","join","prefixClsButton","Button","variant","color","shape","size","htmlType","className","rootClassName","classNames","customClassNames","styles","prefixCls","iconPosition","disabled","ghost","danger","block","children","href","iconNode","isLoading","restProps","classes","mergedDisabled","content","React","Fragment","icon","undefined","_extends"],"mappings":";;;;AAAA,SAASA,WAAWA,CAACC,GAAG,EAAEC,GAAG,EAAE;EAC7B,IAAKA,GAAG,KAAK,KAAK,CAAC,EAAGA,GAAG,GAAG,EAAE,CAAA;AAC9B,EAAA,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ElBR,QACG,CACP,eACDM,KAAA,CAAAlD,aAAA,CAAA,MAAA,EAAA;IAAM+B,SAAS,EAAE,GAAGK,SAAS,CAAA,QAAA,CAAA;GAAaM,EAAAA,QAAe,CACzD,EAACE,QAAQ,IAAIP,YAAY,KAAK,KAAK,iBACjCa,KAAA,CAAAlD,aAAA,CAAA,MAAA,EAAA;IACE+B,SAAS,EAAEvB,IAAI,CAAC,CAAG4B,EAAAA,SAAS,OAAO,EAAEF,gBAAgB,CAACkB,IAAI,CAAE;IAC5DrD,KAAK,EAAEoC,MAAM,CAACiB,IAAAA;GAEbR,EAAAA,QACG,CAEV,CACD,CAAA;AAED,EAAA,IAAID,IAAI,EAAE;IACR,oBACEO,KAAA,CAAAlD,aAAA,CAAA,GAAA,EAAA;AACE+B,MAAAA,SAAS,EAAEgB,OAAQ;AACnBJ,MAAAA,IAAI,EAAEK,cAAc,GAAGK,SAAS,GAAGV,IAAK;MACxC,eAAeK,EAAAA,cAAAA;AAAe,KAAA,EAE7BC,OACA,CAAC,CAAA;AAER,GAAA;AAEA,EAAA,oBACEC,KAAA,CAAAlD,aAAA,CAAA,QAAA,EAAAsD,QAAA,CAAA;AACErD,IAAAA,IAAI,EAAE6B,QAAS;AACfC,IAAAA,SAAS,EAAEgB,OAAQ;AACnBT,IAAAA,QAAQ,EAAEU,cAAAA;GACNF,EAAAA,SAAS,CAEZG,EAAAA,OACK,CAAC,CAAA;AAEb;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import ButtonBase from './Button';
|
|
5
5
|
import { ButtonProps } from '../../types/button';
|
|
6
6
|
import { prefixClsButton } from '../../utils';
|
package/lib/index.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import './styles/global.css';
|
|
3
3
|
|
|
4
4
|
// Components
|
|
5
|
-
export { default as Empty } from "./components/Empty/Empty";
|
|
5
|
+
// export { default as Empty } from "./components/Empty/Empty";
|
|
6
6
|
export { default as Button } from "./components/Button/Button";
|
|
7
|
-
export { default as Checkbox } from "./components/Checkbox/Checkbox";
|
|
7
|
+
// export { default as Checkbox } from "./components/Checkbox/Checkbox";
|
|
8
8
|
|
|
9
9
|
// Hooks
|
|
10
10
|
// export { useForm } from './hooks/useForm';
|