@yuntijs/ui 1.0.0-beta.40 → 1.0.0-beta.42
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/ProCard/Card/style.js
CHANGED
|
@@ -6,9 +6,9 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
6
6
|
token = _ref.token,
|
|
7
7
|
prefixCls = _ref.prefixCls;
|
|
8
8
|
return {
|
|
9
|
-
root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n min-width: 320px;\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n color: ", ";\n\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n "])), token.fontFamily, token.colorText, token.colorBgContainer, token.
|
|
9
|
+
root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n min-width: 320px;\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n color: ", ";\n\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n "])), token.fontFamily, token.colorText, token.colorBgContainer, token.borderRadius * 2, token.boxShadowTertiary),
|
|
10
10
|
bordered: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n box-shadow: none;\n "])), token.colorBorder),
|
|
11
|
-
hoverable: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover {\n border-color: transparent;\n box-shadow: ", ";\n }\n "])), token.boxShadow),
|
|
11
|
+
hoverable: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n transition:\n box-shadow ", ",\n border-color ", ";\n &:hover {\n border-color: transparent;\n box-shadow: ", ";\n }\n "])), token.motionDurationMid, token.motionDurationMid, token.boxShadow),
|
|
12
12
|
text: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: inline-block;\n\n max-width: 200px;\n\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextSecondary),
|
|
13
13
|
error: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorErrorText)
|
|
14
14
|
};
|
|
@@ -5,8 +5,9 @@ var _excluded = ["className", "icon", "title", "description", "extra", "divider"
|
|
|
5
5
|
_excluded3 = ["children"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
import {
|
|
8
|
+
import { Icon } from '@lobehub/ui';
|
|
9
9
|
import { Avatar, Button, Dropdown, Flex } from 'antd';
|
|
10
|
+
import { EllipsisVertical } from 'lucide-react';
|
|
10
11
|
import React from 'react';
|
|
11
12
|
import Typography from "../../Typography";
|
|
12
13
|
import { useStyles } from "./style";
|
|
@@ -22,7 +23,8 @@ export var ProCardHeader = function ProCardHeader(props) {
|
|
|
22
23
|
divider = props.divider,
|
|
23
24
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
24
25
|
var _useStyles = useStyles({
|
|
25
|
-
divider: divider
|
|
26
|
+
divider: divider,
|
|
27
|
+
iconBg: !(icon !== null && icon !== void 0 && icon.src)
|
|
26
28
|
}),
|
|
27
29
|
styles = _useStyles.styles,
|
|
28
30
|
cx = _useStyles.cx;
|
|
@@ -59,9 +61,14 @@ export var ProCardHeader = function ProCardHeader(props) {
|
|
|
59
61
|
align: "flex-start",
|
|
60
62
|
className: styles.extra,
|
|
61
63
|
justify: "flex-end",
|
|
64
|
+
onClick: function onClick(e) {
|
|
65
|
+
return e.stopPropagation();
|
|
66
|
+
},
|
|
62
67
|
children: /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({}, otherExtraProps), {}, {
|
|
63
68
|
children: extraChildren || /*#__PURE__*/_jsx(Button, {
|
|
64
|
-
icon: /*#__PURE__*/_jsx(
|
|
69
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
70
|
+
icon: EllipsisVertical
|
|
71
|
+
}),
|
|
65
72
|
size: "small",
|
|
66
73
|
type: "text"
|
|
67
74
|
})
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
token = _ref.token,
|
|
7
7
|
prefixCls = _ref.prefixCls;
|
|
8
8
|
var _ref2$divider = _ref2.divider,
|
|
9
|
-
divider = _ref2$divider === void 0 ? true : _ref2$divider
|
|
9
|
+
divider = _ref2$divider === void 0 ? true : _ref2$divider,
|
|
10
|
+
_ref2$iconBg = _ref2.iconBg,
|
|
11
|
+
iconBg = _ref2$iconBg === void 0 ? true : _ref2$iconBg;
|
|
10
12
|
return {
|
|
11
13
|
root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 24px 20px ", "px 24px;\n ", "\n "])), divider ? 20 : 0, divider && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n "])), token.colorSplit)),
|
|
12
|
-
icon: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-avatar {\n color: ", ";\n
|
|
13
|
-
titleBox: css(
|
|
14
|
-
title: css(
|
|
15
|
-
description: css(
|
|
16
|
-
extra: css(
|
|
17
|
-
rightButtons: css(
|
|
14
|
+
icon: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-avatar {\n color: ", ";\n ", "\n &.", "-avatar-square {\n border-radius: 10px;\n }\n .anticon {\n font-size: 40px;\n }\n }\n "])), prefixCls, token.colorPrimary, iconBg && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), token.colorBgLayout), prefixCls),
|
|
15
|
+
titleBox: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: 4px;\n "]))),
|
|
16
|
+
title: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: inline-block;\n flex: 1;\n\n width: 100px;\n margin-bottom: ", "px;\n\n font-size: 16px;\n font-weight: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.marginXS, token.fontWeightStrong),
|
|
17
|
+
description: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n &.", "-typography {\n margin-bottom: 0 !important;\n font-size: 12px;\n color: ", ";\n }\n "])), prefixCls, token.colorTextSecondary),
|
|
18
|
+
extra: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: -4px;\n "]))),
|
|
19
|
+
rightButtons: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n justify-content: flex-end;\n "])))
|
|
18
20
|
};
|
|
19
21
|
}, {
|
|
20
22
|
hashPriority: 'low'
|