@lobehub/ui 1.19.0 → 1.20.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/es/ActionIcon/index.d.ts +5 -1
- package/es/ActionIcon/index.js +51 -28
- package/es/Avatar/index.d.ts +4 -3
- package/es/Avatar/index.js +31 -39
- package/es/Avatar/style.d.ts +5 -3
- package/es/Avatar/style.js +8 -4
- package/es/Icon/index.d.ts +9 -4
- package/es/Icon/index.js +37 -11
- package/es/Icon/style.d.ts +4 -0
- package/es/Icon/style.js +11 -0
- package/es/Input/style.js +1 -1
- package/es/SearchBar/style.js +1 -1
- package/es/Spotlight/index.d.ts +4 -0
- package/es/types/index.d.ts +6 -6
- package/package.json +1 -2
package/es/ActionIcon/index.d.ts
CHANGED
|
@@ -28,7 +28,11 @@ export interface ActionIconProps extends DivProps {
|
|
|
28
28
|
* @description The icon element to be rendered
|
|
29
29
|
* @type LucideIcon
|
|
30
30
|
*/
|
|
31
|
-
icon
|
|
31
|
+
icon?: LucideIcon;
|
|
32
|
+
/**
|
|
33
|
+
* @description Set the loading status of ActionIcon
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
32
36
|
/**
|
|
33
37
|
* @description Handle click action
|
|
34
38
|
*/
|
package/es/ActionIcon/index.js
CHANGED
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick"];
|
|
3
|
+
var _excluded = ["className", "active", "icon", "size", "style", "glass", "title", "placement", "arrow", "spotlight", "onClick", "children", "loading"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
import {
|
|
6
|
+
import { Loader2 } from 'lucide-react';
|
|
7
|
+
import { memo, useMemo } from 'react';
|
|
7
8
|
import { Icon, Spotlight, Tooltip } from "./..";
|
|
8
9
|
import { useStyles } from "./style";
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
var
|
|
12
|
-
var className = _ref.className,
|
|
13
|
-
active = _ref.active,
|
|
14
|
-
icon = _ref.icon,
|
|
15
|
-
_ref$size = _ref.size,
|
|
16
|
-
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
17
|
-
style = _ref.style,
|
|
18
|
-
glass = _ref.glass,
|
|
19
|
-
title = _ref.title,
|
|
20
|
-
placement = _ref.placement,
|
|
21
|
-
_ref$arrow = _ref.arrow,
|
|
22
|
-
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
23
|
-
spotlight = _ref.spotlight,
|
|
24
|
-
onClick = _ref.onClick,
|
|
25
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
var _useStyles = useStyles({
|
|
27
|
-
active: Boolean(active),
|
|
28
|
-
glass: Boolean(glass)
|
|
29
|
-
}),
|
|
30
|
-
styles = _useStyles.styles,
|
|
31
|
-
cx = _useStyles.cx;
|
|
13
|
+
var calcSize = function calcSize(size) {
|
|
32
14
|
var blockSize;
|
|
33
15
|
var borderRadius;
|
|
34
16
|
switch (size) {
|
|
@@ -53,19 +35,60 @@ var ActionIcon = /*#__PURE__*/memo(function (_ref) {
|
|
|
53
35
|
borderRadius = (size === null || size === void 0 ? void 0 : size.borderRadius) || 5;
|
|
54
36
|
break;
|
|
55
37
|
}
|
|
38
|
+
return {
|
|
39
|
+
blockSize: blockSize,
|
|
40
|
+
borderRadius: borderRadius
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
var ActionIcon = /*#__PURE__*/memo(function (_ref) {
|
|
44
|
+
var className = _ref.className,
|
|
45
|
+
active = _ref.active,
|
|
46
|
+
icon = _ref.icon,
|
|
47
|
+
_ref$size = _ref.size,
|
|
48
|
+
size = _ref$size === void 0 ? 'normal' : _ref$size,
|
|
49
|
+
style = _ref.style,
|
|
50
|
+
glass = _ref.glass,
|
|
51
|
+
title = _ref.title,
|
|
52
|
+
placement = _ref.placement,
|
|
53
|
+
_ref$arrow = _ref.arrow,
|
|
54
|
+
arrow = _ref$arrow === void 0 ? false : _ref$arrow,
|
|
55
|
+
spotlight = _ref.spotlight,
|
|
56
|
+
onClick = _ref.onClick,
|
|
57
|
+
children = _ref.children,
|
|
58
|
+
loading = _ref.loading,
|
|
59
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
60
|
+
var _useStyles = useStyles({
|
|
61
|
+
active: Boolean(active),
|
|
62
|
+
glass: Boolean(glass)
|
|
63
|
+
}),
|
|
64
|
+
styles = _useStyles.styles,
|
|
65
|
+
cx = _useStyles.cx;
|
|
66
|
+
var _useMemo = useMemo(function () {
|
|
67
|
+
return calcSize(size);
|
|
68
|
+
}, [size]),
|
|
69
|
+
blockSize = _useMemo.blockSize,
|
|
70
|
+
borderRadius = _useMemo.borderRadius;
|
|
71
|
+
var content = /*#__PURE__*/_jsxs(_Fragment, {
|
|
72
|
+
children: [icon && /*#__PURE__*/_jsx(Icon, {
|
|
73
|
+
icon: icon,
|
|
74
|
+
size: size === 'site' ? 'normal' : size
|
|
75
|
+
}), children]
|
|
76
|
+
});
|
|
77
|
+
var spin = /*#__PURE__*/_jsx(Icon, {
|
|
78
|
+
icon: Loader2,
|
|
79
|
+
size: size === 'site' ? 'normal' : size,
|
|
80
|
+
spin: true
|
|
81
|
+
});
|
|
56
82
|
var actionIconBlock = /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
57
83
|
className: cx(styles.block, className),
|
|
58
|
-
onClick: onClick,
|
|
84
|
+
onClick: loading ? undefined : onClick,
|
|
59
85
|
style: _objectSpread({
|
|
60
86
|
width: blockSize,
|
|
61
87
|
height: blockSize,
|
|
62
88
|
borderRadius: borderRadius
|
|
63
89
|
}, style)
|
|
64
90
|
}, props), {}, {
|
|
65
|
-
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}),
|
|
66
|
-
icon: icon,
|
|
67
|
-
size: size === 'site' ? 'normal' : size
|
|
68
|
-
})]
|
|
91
|
+
children: [spotlight && /*#__PURE__*/_jsx(Spotlight, {}), loading ? spin : content]
|
|
69
92
|
}));
|
|
70
93
|
if (!title) return actionIconBlock;
|
|
71
94
|
return /*#__PURE__*/_jsx(Tooltip, {
|
package/es/Avatar/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type AvatarProps as AntAvatarProps } from 'antd';
|
|
3
|
+
export interface AvatarProps extends AntAvatarProps {
|
|
3
4
|
/**
|
|
4
5
|
* @description The URL or base64 data of the avatar image
|
|
5
6
|
*/
|
|
@@ -23,5 +24,5 @@ export interface AvatarProps {
|
|
|
23
24
|
*/
|
|
24
25
|
title?: string;
|
|
25
26
|
}
|
|
26
|
-
declare const Avatar:
|
|
27
|
+
declare const Avatar: import("react").NamedExoticComponent<AvatarProps>;
|
|
27
28
|
export default Avatar;
|
package/es/Avatar/index.js
CHANGED
|
@@ -1,51 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className", "avatar", "title", "size", "shape", "background"];
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
import { Avatar as AntAvatar } from 'antd';
|
|
7
|
+
import { memo } from 'react';
|
|
3
8
|
import { useStyles } from "./style";
|
|
4
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
var Avatar = function
|
|
6
|
-
var
|
|
10
|
+
var Avatar = /*#__PURE__*/memo(function (_ref) {
|
|
11
|
+
var className = _ref.className,
|
|
12
|
+
avatar = _ref.avatar,
|
|
7
13
|
title = _ref.title,
|
|
8
14
|
_ref$size = _ref.size,
|
|
9
15
|
size = _ref$size === void 0 ? 40 : _ref$size,
|
|
10
16
|
_ref$shape = _ref.shape,
|
|
11
17
|
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
12
|
-
background = _ref.background
|
|
13
|
-
|
|
18
|
+
background = _ref.background,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var _useStyles = useStyles({
|
|
21
|
+
background: background,
|
|
22
|
+
size: size
|
|
23
|
+
}),
|
|
14
24
|
styles = _useStyles.styles,
|
|
15
|
-
|
|
16
|
-
var backgroundColor = background !== null && background !== void 0 ? background : theme.colorBgContainer;
|
|
25
|
+
cx = _useStyles.cx;
|
|
17
26
|
var isImage = avatar && ['/', 'http', 'data:'].some(function (i) {
|
|
18
27
|
return avatar.startsWith(i);
|
|
19
28
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className: styles.border,
|
|
35
|
-
shape: shape,
|
|
36
|
-
size: size,
|
|
37
|
-
src: avatar
|
|
38
|
-
}) : /*#__PURE__*/_jsx(Center, {
|
|
39
|
-
className: styles.border,
|
|
40
|
-
style: {
|
|
41
|
-
width: size,
|
|
42
|
-
height: size,
|
|
43
|
-
fontSize: size / 2,
|
|
44
|
-
borderRadius: shape === 'circle' ? '50%' : 6,
|
|
45
|
-
backgroundColor: backgroundColor
|
|
46
|
-
},
|
|
47
|
-
children: avatar
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
};
|
|
29
|
+
var text = isImage ? title : avatar;
|
|
30
|
+
return !isImage ? /*#__PURE__*/_jsx(AntAvatar, _objectSpread(_objectSpread({
|
|
31
|
+
className: cx(styles.avatar, className),
|
|
32
|
+
shape: shape,
|
|
33
|
+
size: size
|
|
34
|
+
}, props), {}, {
|
|
35
|
+
children: text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
|
|
36
|
+
})) : /*#__PURE__*/_jsx(AntAvatar, _objectSpread({
|
|
37
|
+
className: cx(styles.avatar, className),
|
|
38
|
+
shape: shape,
|
|
39
|
+
size: size,
|
|
40
|
+
src: avatar
|
|
41
|
+
}, props));
|
|
42
|
+
});
|
|
51
43
|
export default Avatar;
|
package/es/Avatar/style.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const useStyles: (props?:
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const useStyles: (props?: {
|
|
2
|
+
background?: string | undefined;
|
|
3
|
+
size: number;
|
|
4
|
+
} | undefined) => import("antd-style").ReturnStyles<{
|
|
5
|
+
avatar: import("antd-style").SerializedStyles;
|
|
4
6
|
}>;
|
package/es/Avatar/style.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
|
|
4
|
+
import { readableColor } from 'polished';
|
|
5
|
+
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
6
|
var css = _ref.css,
|
|
6
7
|
token = _ref.token;
|
|
8
|
+
var background = _ref2.background,
|
|
9
|
+
size = _ref2.size;
|
|
10
|
+
var backgroundColor = background !== null && background !== void 0 ? background : token.colorBgContainer;
|
|
11
|
+
var color = readableColor(backgroundColor);
|
|
7
12
|
return {
|
|
8
|
-
|
|
9
|
-
border: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n "])), token.colorSplit)
|
|
13
|
+
avatar: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n\n font-size: ", "px;\n font-weight: 700;\n line-height: 1;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n\n > * {\n cursor: pointer;\n }\n "])), size * 0.5, color, backgroundColor, background ? 'transparent' : token.colorSplit)
|
|
10
14
|
};
|
|
11
15
|
});
|
package/es/Icon/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
import {
|
|
3
|
+
import { DivProps } from "../types";
|
|
4
4
|
export declare type IconSize = 'large' | 'normal' | 'small' | {
|
|
5
5
|
fontSize?: number;
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
};
|
|
8
|
-
export interface IconProps extends
|
|
8
|
+
export interface IconProps extends DivProps {
|
|
9
9
|
/**
|
|
10
10
|
* @description The icon element to be rendered
|
|
11
11
|
* @type LucideIcon
|
|
@@ -16,6 +16,11 @@ export interface IconProps extends SvgProps {
|
|
|
16
16
|
* @default 'normal'
|
|
17
17
|
*/
|
|
18
18
|
size?: IconSize;
|
|
19
|
+
/**
|
|
20
|
+
* @description Rotate icon with animation
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
spin?: boolean;
|
|
19
24
|
}
|
|
20
|
-
declare const
|
|
21
|
-
export default
|
|
25
|
+
declare const Icon: import("react").NamedExoticComponent<IconProps>;
|
|
26
|
+
export default Icon;
|
package/es/Icon/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["icon", "size"];
|
|
3
|
+
var _excluded = ["icon", "size", "style", "className", "spin"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
import { memo } from 'react';
|
|
6
|
+
import { memo, useMemo } from 'react';
|
|
7
|
+
import { useStyles } from "./style";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
var icon = _ref.icon,
|
|
10
|
-
size = _ref.size,
|
|
11
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
+
var calcSize = function calcSize(size) {
|
|
12
10
|
var fontSize;
|
|
13
11
|
var strokeWidth;
|
|
14
|
-
var SvgIcon = icon;
|
|
15
12
|
switch (size) {
|
|
16
13
|
case 'large':
|
|
17
14
|
fontSize = 24;
|
|
@@ -35,9 +32,38 @@ var Icon = function Icon(_ref) {
|
|
|
35
32
|
}
|
|
36
33
|
break;
|
|
37
34
|
}
|
|
38
|
-
return
|
|
39
|
-
|
|
35
|
+
return {
|
|
36
|
+
fontSize: fontSize,
|
|
40
37
|
strokeWidth: strokeWidth
|
|
41
|
-
}
|
|
38
|
+
};
|
|
42
39
|
};
|
|
43
|
-
|
|
40
|
+
var Icon = /*#__PURE__*/memo(function (_ref) {
|
|
41
|
+
var icon = _ref.icon,
|
|
42
|
+
size = _ref.size,
|
|
43
|
+
style = _ref.style,
|
|
44
|
+
className = _ref.className,
|
|
45
|
+
spin = _ref.spin,
|
|
46
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
var _useStyles = useStyles(),
|
|
48
|
+
styles = _useStyles.styles,
|
|
49
|
+
cx = _useStyles.cx;
|
|
50
|
+
var SvgIcon = icon;
|
|
51
|
+
var _useMemo = useMemo(function () {
|
|
52
|
+
return calcSize(size);
|
|
53
|
+
}, [size]),
|
|
54
|
+
fontSize = _useMemo.fontSize,
|
|
55
|
+
strokeWidth = _useMemo.strokeWidth;
|
|
56
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
|
57
|
+
className: cx(styles.icon, spin && styles.spin, className),
|
|
58
|
+
style: _objectSpread({
|
|
59
|
+
width: fontSize,
|
|
60
|
+
height: fontSize
|
|
61
|
+
}, style)
|
|
62
|
+
}, props), {}, {
|
|
63
|
+
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
64
|
+
size: fontSize,
|
|
65
|
+
strokeWidth: strokeWidth
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
export default Icon;
|
package/es/Icon/style.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
+
import { createStyles, keyframes } from 'antd-style';
|
|
4
|
+
export var useStyles = createStyles(function (_ref) {
|
|
5
|
+
var css = _ref.css;
|
|
6
|
+
var spin = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n "])));
|
|
7
|
+
return {
|
|
8
|
+
icon: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n "]))),
|
|
9
|
+
spin: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n animation: ", " 1s linear infinite;\n "])), spin)
|
|
10
|
+
};
|
|
11
|
+
});
|
package/es/Input/style.js
CHANGED
|
@@ -8,7 +8,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
8
8
|
var type = _ref2.type;
|
|
9
9
|
var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n "])), type === 'block' ? token.colorFillTertiary : 'transparent', type === 'block' ? 'transparent' : token.colorBorder);
|
|
10
10
|
return {
|
|
11
|
-
input: cx(typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n max-width: 100%;\n height: 36px;\n padding: 0 12px;\n\n transition: background-color 100ms ", ";\n\n input {\n background: transparent;\n }\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n
|
|
11
|
+
input: cx(typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n max-width: 100%;\n height: 36px;\n padding: 0 12px;\n\n transition: background-color 100ms ", ",\n border-color 200ms ", ";\n\n input {\n background: transparent;\n }\n\n &:hover {\n background-color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n }\n\n &.ant-input-affix-wrapper-focused {\n border-color: ", ";\n }\n "])), token.motionEaseOut, token.motionEaseOut, token.colorFillTertiary, token.colorTextQuaternary, token.colorTextQuaternary)),
|
|
12
12
|
textarea: cx(typeStylish, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n padding: 8px 12px;\n transition: background-color 100ms ", ";\n\n textarea {\n background: transparent;\n }\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n }\n "])), token.motionEaseOut, token.colorFillTertiary, token.colorBorder, token.colorTextQuaternary))
|
|
13
13
|
};
|
|
14
14
|
});
|
package/es/SearchBar/style.js
CHANGED
|
@@ -5,7 +5,7 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
token = _ref.token;
|
|
7
7
|
return {
|
|
8
|
-
search: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n
|
|
8
|
+
search: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
|
|
9
9
|
input: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n padding: 0 8px 0 12px;\n "]))),
|
|
10
10
|
tag: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 5;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n "]))),
|
|
11
11
|
icon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextPlaceholder)
|
package/es/Spotlight/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps } from "../types";
|
|
3
3
|
export interface SpotlightProps extends DivProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description The size of the spotlight circle
|
|
6
|
+
* @default 64
|
|
7
|
+
*/
|
|
4
8
|
size?: number;
|
|
5
9
|
}
|
|
6
10
|
declare const Spotlight: import("react").NamedExoticComponent<SpotlightProps>;
|
package/es/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare type DivProps =
|
|
3
|
-
export declare type SvgProps =
|
|
4
|
-
export declare type ImgProps =
|
|
5
|
-
export declare type InputProps =
|
|
6
|
-
export declare type TextAreaProps =
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export declare type DivProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare type SvgProps = HTMLAttributes<SVGSVGElement>;
|
|
4
|
+
export declare type ImgProps = HTMLAttributes<HTMLImageElement>;
|
|
5
|
+
export declare type InputProps = HTMLAttributes<HTMLInputElement>;
|
|
6
|
+
export declare type TextAreaProps = HTMLAttributes<HTMLTextAreaElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building chatbot web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"antd": "^5",
|
|
115
115
|
"antd-style": "^3",
|
|
116
116
|
"commitlint": "^17",
|
|
117
|
-
"commitlint-config-gitmoji": "^2",
|
|
118
117
|
"concurrently": "^8",
|
|
119
118
|
"cross-env": "^7",
|
|
120
119
|
"dumi": "^2",
|