x-ui-design 1.0.30 → 1.0.31-gamma.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -22
- package/dist/{esm/types/components → components}/DatePicker/DatePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/DatePicker/RangePicker/RangePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/Dropdown/Dropdown.d.ts +1 -2
- package/dist/{esm/types/components → components}/Empty/Empty.d.ts +1 -2
- package/dist/{esm/types/components → components}/Form/Item/Item.d.ts +1 -2
- package/dist/components/Icons/Icons.d.ts +18 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/{esm/types/components → components}/Input/Textarea/Textarea.d.ts +1 -2
- package/dist/{esm/types/components → components}/Popover/Popover.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Button/Button.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Group/Group.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Radio.d.ts +1 -2
- package/dist/{esm/types/components → components}/Result/Result.d.ts +1 -2
- package/dist/{esm/types/components → components}/Switch/Switch.d.ts +1 -2
- package/dist/{esm/types/components → components}/Upload/Upload.d.ts +1 -2
- package/dist/esm/types/index.d.ts +0 -56
- package/dist/index.d.ts +1 -150
- package/dist/index.esm.js +3433 -3863
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3395 -3825
- package/dist/index.js.map +1 -1
- package/package.json +22 -20
- package/.github/workflows/x-ui-design.yml +0 -14
- package/compile.sh +0 -15
- package/dist/esm/types/components/Icons/Icons.d.ts +0 -19
- package/dist/esm/types/components/Input/Input.d.ts +0 -16
- package/eslint.config.mjs +0 -16
- package/lib/components/Button/Button.tsx +0 -136
- package/lib/components/Button/index.ts +0 -1
- package/lib/components/Button/style.css +0 -197
- package/lib/components/Checkbox/Checkbox.tsx +0 -131
- package/lib/components/Checkbox/index.ts +0 -1
- package/lib/components/Checkbox/style.css +0 -95
- package/lib/components/ConditionalWrapper/index.tsx +0 -12
- package/lib/components/DatePicker/DatePicker.tsx +0 -526
- package/lib/components/DatePicker/RangePicker/RangePicker.tsx +0 -500
- package/lib/components/DatePicker/RangePicker/index.ts +0 -1
- package/lib/components/DatePicker/RangePicker/style.css +0 -434
- package/lib/components/DatePicker/TimePicker/TimePicker.tsx +0 -497
- package/lib/components/DatePicker/TimePicker/index.ts +0 -1
- package/lib/components/DatePicker/TimePicker/style.css +0 -197
- package/lib/components/DatePicker/index.ts +0 -1
- package/lib/components/DatePicker/style.css +0 -318
- package/lib/components/Dropdown/Dropdown.tsx +0 -234
- package/lib/components/Dropdown/index.ts +0 -1
- package/lib/components/Dropdown/style.css +0 -124
- package/lib/components/Empty/Empty.tsx +0 -45
- package/lib/components/Empty/index.ts +0 -1
- package/lib/components/Empty/style.css +0 -13
- package/lib/components/Form/Form.tsx +0 -130
- package/lib/components/Form/Item/Item.tsx +0 -294
- package/lib/components/Form/Item/index.ts +0 -1
- package/lib/components/Form/Item/style.css +0 -61
- package/lib/components/Form/index.ts +0 -1
- package/lib/components/Icons/Icons.tsx +0 -433
- package/lib/components/Icons/index.ts +0 -15
- package/lib/components/Input/Input.tsx +0 -228
- package/lib/components/Input/Textarea/Textarea.tsx +0 -110
- package/lib/components/Input/Textarea/index.ts +0 -1
- package/lib/components/Input/Textarea/style.css +0 -104
- package/lib/components/Input/index.ts +0 -1
- package/lib/components/Input/style.css +0 -137
- package/lib/components/Menu/Item/Item.tsx +0 -65
- package/lib/components/Menu/Menu.tsx +0 -261
- package/lib/components/Menu/SubMenu/SubMenu.tsx +0 -68
- package/lib/components/Menu/index.css +0 -145
- package/lib/components/Menu/index.ts +0 -1
- package/lib/components/Popover/Popover.tsx +0 -135
- package/lib/components/Popover/index.ts +0 -1
- package/lib/components/Popover/style.css +0 -82
- package/lib/components/Radio/Button/Button.tsx +0 -42
- package/lib/components/Radio/Button/index.ts +0 -1
- package/lib/components/Radio/Button/style.css +0 -43
- package/lib/components/Radio/Group/Group.tsx +0 -105
- package/lib/components/Radio/Group/index.ts +0 -1
- package/lib/components/Radio/Group/style.css +0 -53
- package/lib/components/Radio/Radio.tsx +0 -83
- package/lib/components/Radio/index.ts +0 -1
- package/lib/components/Radio/style.css +0 -73
- package/lib/components/Result/Result.tsx +0 -39
- package/lib/components/Result/index.ts +0 -1
- package/lib/components/Result/style.css +0 -173
- package/lib/components/Select/Option/Option.tsx +0 -49
- package/lib/components/Select/Option/index.ts +0 -1
- package/lib/components/Select/Option/style.css +0 -50
- package/lib/components/Select/Select.tsx +0 -935
- package/lib/components/Select/Tag/Tag.tsx +0 -43
- package/lib/components/Select/Tag/index.ts +0 -1
- package/lib/components/Select/Tag/style.css +0 -87
- package/lib/components/Select/index.ts +0 -1
- package/lib/components/Select/style.css +0 -186
- package/lib/components/Skeleton/Avatar/Avatar.tsx +0 -61
- package/lib/components/Skeleton/Avatar/index.ts +0 -1
- package/lib/components/Skeleton/Avatar/style.css +0 -27
- package/lib/components/Skeleton/Button/Button.tsx +0 -44
- package/lib/components/Skeleton/Button/index.ts +0 -1
- package/lib/components/Skeleton/Button/style.css +0 -50
- package/lib/components/Skeleton/Image/Image.tsx +0 -45
- package/lib/components/Skeleton/Image/index.ts +0 -1
- package/lib/components/Skeleton/Image/style.css +0 -23
- package/lib/components/Skeleton/Input/Input.tsx +0 -42
- package/lib/components/Skeleton/Input/index.ts +0 -1
- package/lib/components/Skeleton/Input/style.css +0 -56
- package/lib/components/Skeleton/Skeleton.tsx +0 -97
- package/lib/components/Skeleton/index.ts +0 -1
- package/lib/components/Skeleton/style.css +0 -84
- package/lib/components/Switch/Switch.tsx +0 -68
- package/lib/components/Switch/index.css +0 -50
- package/lib/components/Switch/index.ts +0 -1
- package/lib/components/Upload/Upload.tsx +0 -291
- package/lib/components/Upload/index.ts +0 -1
- package/lib/components/Upload/style.css +0 -151
- package/lib/global.d.ts +0 -1
- package/lib/helpers/flatten.ts +0 -26
- package/lib/helpers/index.ts +0 -52
- package/lib/helpers/mask.ts +0 -52
- package/lib/hooks/useForm.ts +0 -548
- package/lib/hooks/usePosition.ts +0 -206
- package/lib/hooks/useWatch.ts +0 -41
- package/lib/hooks/useWatchError.ts +0 -20
- package/lib/index.ts +0 -184
- package/lib/styles/global.css +0 -57
- package/lib/types/button.ts +0 -83
- package/lib/types/checkbox.ts +0 -32
- package/lib/types/datepicker.ts +0 -165
- package/lib/types/dropdown.ts +0 -41
- package/lib/types/empty.ts +0 -8
- package/lib/types/form.ts +0 -179
- package/lib/types/index.ts +0 -38
- package/lib/types/input.ts +0 -72
- package/lib/types/menu.ts +0 -55
- package/lib/types/popover.ts +0 -16
- package/lib/types/radio.ts +0 -69
- package/lib/types/result.ts +0 -22
- package/lib/types/select.ts +0 -126
- package/lib/types/skeleton.ts +0 -62
- package/lib/types/switch.ts +0 -22
- package/lib/types/upload.ts +0 -67
- package/lib/utils/index.ts +0 -37
- package/lib/utils/lazy.ts +0 -17
- package/next.config.ts +0 -7
- package/rollup.config.js +0 -71
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -48
- package/src/app/layout.d.ts +0 -5
- package/src/app/layout.tsx +0 -16
- package/src/app/page.d.ts +0 -1
- package/src/app/page.tsx +0 -21
- package/tsconfig.json +0 -46
- /package/dist/{esm/types/components → components}/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/ConditionalWrapper/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/RangePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/TimePicker.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Dropdown/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Empty/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Form.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Item/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Icons/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/Textarea/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Item/Item.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Menu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/SubMenu/SubMenu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Popover/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Group/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Result/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/Option.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Select.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/Tag.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/Avatar.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/Image.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/Input.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Switch/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Upload/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/flatten.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/mask.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useForm.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/usePosition.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatch.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatchError.d.ts +0 -0
- /package/dist/{esm/types/types → types}/button.d.ts +0 -0
- /package/dist/{esm/types/types → types}/checkbox.d.ts +0 -0
- /package/dist/{esm/types/types → types}/datepicker.d.ts +0 -0
- /package/dist/{esm/types/types → types}/dropdown.d.ts +0 -0
- /package/dist/{esm/types/types → types}/empty.d.ts +0 -0
- /package/dist/{esm/types/types → types}/form.d.ts +0 -0
- /package/dist/{esm/types/types → types}/index.d.ts +0 -0
- /package/dist/{esm/types/types → types}/input.d.ts +0 -0
- /package/dist/{esm/types/types → types}/menu.d.ts +0 -0
- /package/dist/{esm/types/types → types}/popover.d.ts +0 -0
- /package/dist/{esm/types/types → types}/radio.d.ts +0 -0
- /package/dist/{esm/types/types → types}/result.d.ts +0 -0
- /package/dist/{esm/types/types → types}/select.d.ts +0 -0
- /package/dist/{esm/types/types → types}/skeleton.d.ts +0 -0
- /package/dist/{esm/types/types → types}/switch.d.ts +0 -0
- /package/dist/{esm/types/types → types}/upload.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/index.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/lazy.d.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, { FC, MouseEvent } from 'react';
|
|
2
|
-
import { TargetProps } from '../../../types';
|
|
3
|
-
import { CustomTagProps } from '../../../types/select';
|
|
4
|
-
import { prefixClsSelect } from '../../../utils';
|
|
5
|
-
import './style.css';
|
|
6
|
-
|
|
7
|
-
const Tag: FC<CustomTagProps> = ({
|
|
8
|
-
prefixCls = prefixClsSelect,
|
|
9
|
-
style = {},
|
|
10
|
-
onClose,
|
|
11
|
-
value,
|
|
12
|
-
label,
|
|
13
|
-
closable,
|
|
14
|
-
color,
|
|
15
|
-
icon,
|
|
16
|
-
className = ''
|
|
17
|
-
}) => {
|
|
18
|
-
const handleOnClick = (e: MouseEvent<HTMLSpanElement> & TargetProps) => {
|
|
19
|
-
e.preventDefault();
|
|
20
|
-
e.stopPropagation();
|
|
21
|
-
|
|
22
|
-
e.target.value = value;
|
|
23
|
-
|
|
24
|
-
onClose?.(e);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<div
|
|
29
|
-
style={{ ...style, backgroundColor: color }}
|
|
30
|
-
className={`${prefixCls}-tag ${className}`}
|
|
31
|
-
>
|
|
32
|
-
<span>{label !== undefined ? label : value}</span>
|
|
33
|
-
|
|
34
|
-
{closable && (
|
|
35
|
-
<span className={`${prefixCls}-tag-close-icon`} onClick={handleOnClick}>
|
|
36
|
-
{icon || <>✕</>}
|
|
37
|
-
</span>
|
|
38
|
-
)}
|
|
39
|
-
</div>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default Tag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Tag } from '../../Select/Tag/Tag'
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
.xUi-select .xUi-select-tag-container {
|
|
2
|
-
gap: 4px;
|
|
3
|
-
flex: auto;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-wrap: wrap;
|
|
6
|
-
line-height: 12px;
|
|
7
|
-
position: relative;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.xUi-select .xUi-select-tag-container-fixHeight {
|
|
11
|
-
max-height: 32px !important;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.xUi-select.middle .xUi-select-tag-container,
|
|
16
|
-
.xUi-select.large .xUi-select-tag-container {
|
|
17
|
-
line-height: 22px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.xUi-select .xUi-select-tag {
|
|
21
|
-
background: rgba(0, 0, 0, 0.06);
|
|
22
|
-
border: 1px solid transparent;
|
|
23
|
-
align-items: center;
|
|
24
|
-
align-self: center;
|
|
25
|
-
flex: none;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
max-width: 100%;
|
|
28
|
-
border-radius: var(--xui-border-radius-sm);
|
|
29
|
-
cursor: default;
|
|
30
|
-
padding: 2px;
|
|
31
|
-
text-overflow: ellipsis;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
transition:
|
|
37
|
-
font-size 0.3s,
|
|
38
|
-
line-height 0.3s,
|
|
39
|
-
height 0.3s;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.xUi-select.middle .xUi-select-tag {
|
|
43
|
-
padding: 4px 8px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.xUi-select.large .xUi-select-tag {
|
|
47
|
-
padding: 4px 8px;
|
|
48
|
-
font-size: var(--xui-font-size-lg);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.xUi-select .xUi-select-tag span {
|
|
52
|
-
margin: 0 2px;
|
|
53
|
-
font-size: var(--xui-font-size-sm);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.xUi-select .xUi-select-tag .xUi-select-tag-close-icon {
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
font-size: var(--xui-font-size-xs);
|
|
59
|
-
color: rgba(0, 0, 0, 0.5);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.xUi-select .xUi-select-tag .xUi-select-tag-close-icon:hover {
|
|
63
|
-
color: var(--xui-text-color);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.xUi-select .xUi-select-tag:has([class="xUi-select-tag-input"]) {
|
|
67
|
-
padding: 0;
|
|
68
|
-
border: none;
|
|
69
|
-
outline: none;
|
|
70
|
-
color: var(--xui-text-color);
|
|
71
|
-
font-size: var(--xui-font-size-md);
|
|
72
|
-
background: transparent;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.xUi-select .xUi-select-tag:has([class="xUi-select-tag-input"]) input {
|
|
76
|
-
padding: 0;
|
|
77
|
-
border: none;
|
|
78
|
-
height: -webkit-fill-available;
|
|
79
|
-
background-color: transparent;
|
|
80
|
-
font-size: var(--xui-font-size-md);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.xUi-select .xUi-select-tag-input:focus {
|
|
84
|
-
border: none;
|
|
85
|
-
outline: none;
|
|
86
|
-
box-shadow: none;
|
|
87
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Select } from '../Select/Select'
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
@keyframes spin {
|
|
2
|
-
0% {
|
|
3
|
-
transform: rotate(0deg);
|
|
4
|
-
}
|
|
5
|
-
100% {
|
|
6
|
-
transform: rotate(360deg);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.xUi-select {
|
|
11
|
-
width: 100%;
|
|
12
|
-
position: relative;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
flex-direction: row-reverse;
|
|
15
|
-
color: var(--xui-text-color);
|
|
16
|
-
min-height: 24px;
|
|
17
|
-
background-color: transparent;
|
|
18
|
-
border-radius: var(--xui-border-radius-sm);
|
|
19
|
-
border: 1px solid var(--xui-border-color);
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
padding: 2px 8px;
|
|
22
|
-
|
|
23
|
-
&:has([tabindex="0"]:focus-visible) {
|
|
24
|
-
border-color: var(--xui-primary-color);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.xUi-select-disabled {
|
|
29
|
-
background: rgba(0, 0, 0, 0.04);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.xUi-select-arrow {
|
|
33
|
-
margin: 0 4px;
|
|
34
|
-
display: flex;
|
|
35
|
-
gap: 6px;
|
|
36
|
-
align-items: center;
|
|
37
|
-
pointer-events: all !important;
|
|
38
|
-
color: var(--xui-text-color-light);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.xUi-select-arrow svg {
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.xUi-select-loading {
|
|
48
|
-
margin: 0 8px;
|
|
49
|
-
animation: spin 1s linear infinite;
|
|
50
|
-
display: inline-block;
|
|
51
|
-
color: var(--xui-text-color-light);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.xUi-select .xUi-select-trigger {
|
|
55
|
-
display: flex;
|
|
56
|
-
width: 100%;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
align-items: center;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
border-radius: var(--xui-border-radius-sm);
|
|
61
|
-
background: transparent;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.xUi-select .xUi-select-clear-btn {
|
|
65
|
-
margin: 0 8px;
|
|
66
|
-
background: none;
|
|
67
|
-
border: none;
|
|
68
|
-
color: #999;
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
padding: 0;
|
|
71
|
-
line-height: 1;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.xUi-select .xUi-select-clear-btn {
|
|
75
|
-
font-size: var(--xui-font-size-lg);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.xUi-select .xUi-select-clear-btn:hover {
|
|
79
|
-
color: var(--xui-primary-color);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.xUi-select-dropdown {
|
|
83
|
-
top: 100%;
|
|
84
|
-
left: 0;
|
|
85
|
-
right: unset;
|
|
86
|
-
width: inherit;
|
|
87
|
-
z-index: 10;
|
|
88
|
-
margin-top: 5px;
|
|
89
|
-
overflow-y: auto;
|
|
90
|
-
max-height: 350px;
|
|
91
|
-
position: absolute;
|
|
92
|
-
border-radius: var(--xui-border-radius-sm);
|
|
93
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
94
|
-
background-color: var(--xui-select-background-color);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.xUi-select-dropdown.topRight,
|
|
98
|
-
.xUi-select-dropdown.bottomRight {
|
|
99
|
-
right: 0;
|
|
100
|
-
left: unset;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.xUi-select .xUi-select-loading-spinner {
|
|
104
|
-
padding: 10px;
|
|
105
|
-
text-align: center;
|
|
106
|
-
color: #999;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.xUi-select:focus-within {
|
|
110
|
-
border-color: var(--xui-primary-color-light);
|
|
111
|
-
box-shadow: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.xUi-select:hover:not(.xUi-select-disabled) {
|
|
115
|
-
border-color: var(--xui-primary-color);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.xUi-select-disabled .xUi-select-input,
|
|
119
|
-
.xUi-select-disabled .xUi-select-trigger,
|
|
120
|
-
.xUi-select-disabled {
|
|
121
|
-
cursor: not-allowed !important;
|
|
122
|
-
opacity: 0.6 !important;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.xUi-select-selected-icon {
|
|
126
|
-
color: var(--xui-primary-color-light);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.xUi-select-error {
|
|
130
|
-
border-color: var(--xui-error-color);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.xUi-select-arrow .error-svg-icon,
|
|
134
|
-
.xUi-select-error .error-svg-icon {
|
|
135
|
-
color: var(--xui-error-color);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.xUi-select .xUi-select-input {
|
|
139
|
-
width: 100%;
|
|
140
|
-
padding: 0;
|
|
141
|
-
height: auto;
|
|
142
|
-
height: -webkit-fit-content;
|
|
143
|
-
border: none;
|
|
144
|
-
outline: none;
|
|
145
|
-
background: transparent;
|
|
146
|
-
font-size: var(--xui-font-size-md);
|
|
147
|
-
color: var(--xui-text-color);
|
|
148
|
-
user-select: none;
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
align-items: center;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.xUi-select .xUi-select-input:focus {
|
|
155
|
-
border: none;
|
|
156
|
-
outline: none;
|
|
157
|
-
box-shadow: none;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.xUi-select.middle {
|
|
161
|
-
font-size: var(--xui-font-size-md);
|
|
162
|
-
min-height: 30px;
|
|
163
|
-
border-radius: var(--xui-border-radius-md);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.xUi-select.middle input {
|
|
167
|
-
font-size: var(--xui-font-size-md);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.xUi-select.middle .xUi-select-trigger {
|
|
171
|
-
border-radius: var(--xui-border-radius-md);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.xUi-select.large {
|
|
175
|
-
font-size: var(--xui-font-size-lg);
|
|
176
|
-
min-height: 44px;
|
|
177
|
-
border-radius: var(--xui-border-radius-lg);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.xUi-select.large .xUi-select-trigger {
|
|
181
|
-
border-radius: var(--xui-border-radius-lg);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.xUi-select input {
|
|
185
|
-
font-size: var(--xui-font-size-lg);
|
|
186
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactElement } from 'react';
|
|
2
|
-
import { clsx } from '../../../helpers';
|
|
3
|
-
import { SkeletonAvatarProps } from '../../../types/skeleton';
|
|
4
|
-
import { prefixClsSkeleton } from '../../../utils';
|
|
5
|
-
import './style.css';
|
|
6
|
-
|
|
7
|
-
export const AVATAR_DEFAULT_SIZE = 32;
|
|
8
|
-
export const AVATAR_GLOBAL_SIZE = 40;
|
|
9
|
-
|
|
10
|
-
export const GET_AVATAR_SKELETON_PROPS = (
|
|
11
|
-
avatar: SkeletonAvatarProps | boolean
|
|
12
|
-
): SkeletonAvatarProps => {
|
|
13
|
-
return typeof avatar !== 'boolean'
|
|
14
|
-
? {
|
|
15
|
-
shape: avatar?.shape || 'circle',
|
|
16
|
-
size: avatar?.size || AVATAR_GLOBAL_SIZE,
|
|
17
|
-
style: avatar?.style || {},
|
|
18
|
-
className: avatar?.className || ''
|
|
19
|
-
}
|
|
20
|
-
: {
|
|
21
|
-
shape: 'circle',
|
|
22
|
-
size: AVATAR_GLOBAL_SIZE
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const SkeletonAvatar: FC<SkeletonAvatarProps> = ({
|
|
27
|
-
prefixCls = prefixClsSkeleton,
|
|
28
|
-
className,
|
|
29
|
-
shape = 'circle',
|
|
30
|
-
style,
|
|
31
|
-
wrapperStyle,
|
|
32
|
-
size = AVATAR_DEFAULT_SIZE,
|
|
33
|
-
active,
|
|
34
|
-
applyElementStyle = true,
|
|
35
|
-
...props
|
|
36
|
-
}): ReactElement => {
|
|
37
|
-
return (
|
|
38
|
-
<div
|
|
39
|
-
className={clsx([
|
|
40
|
-
`${prefixCls}`,
|
|
41
|
-
{
|
|
42
|
-
[`${prefixCls}-element`]: applyElementStyle,
|
|
43
|
-
[`${prefixCls}-active`]: active
|
|
44
|
-
},
|
|
45
|
-
className
|
|
46
|
-
])}
|
|
47
|
-
style={wrapperStyle}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
<span
|
|
51
|
-
className={clsx([`${prefixCls}-avatar ${prefixCls}-avatar-${shape}`])}
|
|
52
|
-
style={{
|
|
53
|
-
...(size ? { width: size, height: size, lineHeight: size } : {}),
|
|
54
|
-
...(style || {})
|
|
55
|
-
}}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default SkeletonAvatar
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonAvatar } from './Avatar'
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@keyframes xUi-skeleton-loading {
|
|
2
|
-
0% {
|
|
3
|
-
background-position: 100% 50%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
100% {
|
|
7
|
-
background-position: 0 50%;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.xUi-skeleton-avatar {
|
|
12
|
-
width: 40px;
|
|
13
|
-
height: 40px;
|
|
14
|
-
display: block;
|
|
15
|
-
line-height: 40px;
|
|
16
|
-
background: linear-gradient(90deg, rgba(190, 190, 190, 0.2) 25%, rgba(129, 129, 129, 0.24) 37%, rgba(190, 190, 190, 0.2) 63%);
|
|
17
|
-
background-size: 400% 100%;
|
|
18
|
-
animation: xUi-skeleton-loading 1.4s ease infinite;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.xUi-skeleton-avatar-circle {
|
|
22
|
-
border-radius: 50%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.xUi-skeleton-avatar-square {
|
|
26
|
-
border-radius: 4px;
|
|
27
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactElement } from 'react';
|
|
2
|
-
import { clsx } from '../../../helpers';
|
|
3
|
-
import { SkeletonButtonProps } from '../../../types/skeleton';
|
|
4
|
-
import { prefixClsSkeleton } from '../../../utils';
|
|
5
|
-
import './style.css';
|
|
6
|
-
|
|
7
|
-
const BUTTON_SKELETON_SIZE = {
|
|
8
|
-
small: `${prefixClsSkeleton}-button-sm`,
|
|
9
|
-
large: `${prefixClsSkeleton}-button-lg`,
|
|
10
|
-
default: ''
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const SkeletonButton: FC<SkeletonButtonProps> = ({
|
|
14
|
-
prefixCls = prefixClsSkeleton,
|
|
15
|
-
style = {},
|
|
16
|
-
active,
|
|
17
|
-
className,
|
|
18
|
-
size = 'default',
|
|
19
|
-
applyElementStyle = true
|
|
20
|
-
}): ReactElement => {
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className={clsx([
|
|
24
|
-
`${prefixCls}`,
|
|
25
|
-
{
|
|
26
|
-
[`${prefixCls}-element`]: applyElementStyle,
|
|
27
|
-
[`${prefixCls}-active`]: active
|
|
28
|
-
},
|
|
29
|
-
className
|
|
30
|
-
])}
|
|
31
|
-
>
|
|
32
|
-
<span
|
|
33
|
-
className={clsx([
|
|
34
|
-
`${prefixCls}-button `,
|
|
35
|
-
BUTTON_SKELETON_SIZE[size],
|
|
36
|
-
className
|
|
37
|
-
])}
|
|
38
|
-
style={style}
|
|
39
|
-
></span>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default SkeletonButton
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonButton } from './Button'
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
@keyframes xUi-skeleton-loading {
|
|
2
|
-
0% {
|
|
3
|
-
background-position: 100% 50%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
100% {
|
|
7
|
-
background-position: 0 50%;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.xUi-skeleton-element {
|
|
12
|
-
display: inline-block !important;
|
|
13
|
-
width: auto !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.xUi-skeleton-button {
|
|
17
|
-
display: inline-block;
|
|
18
|
-
vertical-align: top;
|
|
19
|
-
background: rgba(190, 190, 190, 0.2);
|
|
20
|
-
border-radius: 4px;
|
|
21
|
-
width: 64px;
|
|
22
|
-
min-width: 64px;
|
|
23
|
-
height: 32px;
|
|
24
|
-
line-height: 32px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.xUi-skeleton-button-sm {
|
|
28
|
-
width: 48px;
|
|
29
|
-
min-width: 48px;
|
|
30
|
-
height: 24px;
|
|
31
|
-
line-height: 24px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.xUi-skeleton-button-lg {
|
|
35
|
-
width: 80px;
|
|
36
|
-
min-width: 80px;
|
|
37
|
-
height: 44px;
|
|
38
|
-
line-height: 44px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.xUi-skeleton-active .xUi-skeleton-button {
|
|
42
|
-
background: linear-gradient(
|
|
43
|
-
90deg,
|
|
44
|
-
rgba(190, 190, 190, 0.2) 25%,
|
|
45
|
-
rgba(129, 129, 129, 0.24) 37%,
|
|
46
|
-
rgba(190, 190, 190, 0.2) 63%
|
|
47
|
-
);
|
|
48
|
-
background-size: 400% 100%;
|
|
49
|
-
animation: xUi-skeleton-loading 1.4s ease infinite;
|
|
50
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactElement } from 'react';
|
|
2
|
-
import { SkeletonImageProps } from '../../../types/skeleton';
|
|
3
|
-
import { prefixClsSkeleton } from '../../../utils';
|
|
4
|
-
import './style.css';
|
|
5
|
-
|
|
6
|
-
const CUSTOm_ICON_SIZE = 48;
|
|
7
|
-
|
|
8
|
-
const SkeletonImage: FC<SkeletonImageProps> = ({
|
|
9
|
-
prefixCls = prefixClsSkeleton,
|
|
10
|
-
className,
|
|
11
|
-
style = {}
|
|
12
|
-
}): ReactElement => {
|
|
13
|
-
return (
|
|
14
|
-
<div className={`${prefixCls}-image ${className || ''}`} style={style}>
|
|
15
|
-
<span
|
|
16
|
-
className={`${prefixCls}-icon`}
|
|
17
|
-
style={{
|
|
18
|
-
fontSize: `${style?.width || CUSTOm_ICON_SIZE}px`,
|
|
19
|
-
color: '#bfbfbf',
|
|
20
|
-
position: 'relative',
|
|
21
|
-
width: '100%',
|
|
22
|
-
height: '100%',
|
|
23
|
-
...(style?.backgroundColor
|
|
24
|
-
? { backgroundColor: style?.backgroundColor }
|
|
25
|
-
: {})
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<svg
|
|
29
|
-
viewBox="0 0 1098 1024"
|
|
30
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
-
width="1em"
|
|
32
|
-
height="1em"
|
|
33
|
-
fill="currentColor"
|
|
34
|
-
>
|
|
35
|
-
<path
|
|
36
|
-
d="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z"
|
|
37
|
-
className={`${prefixCls}-image-path`}
|
|
38
|
-
></path>
|
|
39
|
-
</svg>
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default SkeletonImage
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonImage } from './Image'
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.xUi-skeleton-image {
|
|
2
|
-
width: 96px;
|
|
3
|
-
height: 96px;
|
|
4
|
-
line-height: 96px;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
vertical-align: top;
|
|
9
|
-
background: rgba(190, 190, 190, 0.2);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.xUi-skeleton-image .xUi-skeleton-icon {
|
|
13
|
-
font-size: inherit !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.xUi-skeleton-image svg {
|
|
17
|
-
width: 48px;
|
|
18
|
-
height: 100%;
|
|
19
|
-
max-width: 192px;
|
|
20
|
-
line-height: 48px;
|
|
21
|
-
display: flex;
|
|
22
|
-
margin: 0 auto;
|
|
23
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactElement } from 'react';
|
|
2
|
-
import { clsx } from '../../../helpers';
|
|
3
|
-
import { SkeletonInputProps } from '../../../types/skeleton';
|
|
4
|
-
import { prefixClsSkeleton } from '../../../utils';
|
|
5
|
-
import './style.css';
|
|
6
|
-
|
|
7
|
-
const INPUT_SKELETON_SIZE = {
|
|
8
|
-
small: `${prefixClsSkeleton}-input-sm`,
|
|
9
|
-
large: `${prefixClsSkeleton}-input-lg`,
|
|
10
|
-
default: ''
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const SkeletonInput: FC<SkeletonInputProps> = ({
|
|
14
|
-
prefixCls = prefixClsSkeleton,
|
|
15
|
-
style,
|
|
16
|
-
block,
|
|
17
|
-
active,
|
|
18
|
-
className,
|
|
19
|
-
size = 'default'
|
|
20
|
-
}): ReactElement => {
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className={clsx([
|
|
24
|
-
`${prefixCls}-element`,
|
|
25
|
-
{
|
|
26
|
-
[`${prefixCls}-active`]: active,
|
|
27
|
-
[`${prefixCls}-block`]: block
|
|
28
|
-
},
|
|
29
|
-
className
|
|
30
|
-
])}
|
|
31
|
-
>
|
|
32
|
-
<span
|
|
33
|
-
className={`${prefixCls}-input ${INPUT_SKELETON_SIZE[size]} ${
|
|
34
|
-
className || ''
|
|
35
|
-
}`}
|
|
36
|
-
style={style}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default SkeletonInput
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SkeletonInput } from './Input'
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
@keyframes xUi-skeleton-loading {
|
|
2
|
-
0% {
|
|
3
|
-
background-position: 100% 50%;
|
|
4
|
-
}
|
|
5
|
-
100% {
|
|
6
|
-
background-position: 0 50%;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.xUi-skeleton-element {
|
|
11
|
-
display: inline-block !important;
|
|
12
|
-
width: auto !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.xUi-skeleton-input {
|
|
16
|
-
display: inline-block;
|
|
17
|
-
vertical-align: top;
|
|
18
|
-
background: rgba(190, 190, 190, 0.2);
|
|
19
|
-
width: 160px;
|
|
20
|
-
min-width: 160px;
|
|
21
|
-
height: 32px;
|
|
22
|
-
line-height: 32px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.xUi-skeleton-input-sm {
|
|
26
|
-
width: 120px;
|
|
27
|
-
min-width: 120px;
|
|
28
|
-
height: 24px;
|
|
29
|
-
line-height: 24px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.xUi-skeleton-input-lg {
|
|
33
|
-
width: 200px;
|
|
34
|
-
min-width: 200px;
|
|
35
|
-
height: 44px;
|
|
36
|
-
line-height: 44px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.xUi-skeleton-active .xUi-skeleton-input {
|
|
40
|
-
background: linear-gradient(
|
|
41
|
-
90deg,
|
|
42
|
-
rgba(190, 190, 190, 0.2) 25%,
|
|
43
|
-
rgba(129, 129, 129, 0.24) 37%,
|
|
44
|
-
rgba(190, 190, 190, 0.2) 63%
|
|
45
|
-
);
|
|
46
|
-
background-size: 400% 100%;
|
|
47
|
-
animation: xUi-skeleton-loading 1.4s ease infinite;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.xUi-skeleton-block {
|
|
51
|
-
width: 100%;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.xUi-skeleton-block .xUi-skeleton-input {
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|