@yuntijs/ui 1.0.0-beta.40 → 1.0.0-beta.41

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.
@@ -8,7 +8,7 @@ export var useStyles = createStyles(function (_ref) {
8
8
  return {
9
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.borderRadiusLG, 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
  };
@@ -22,7 +22,8 @@ export var ProCardHeader = function ProCardHeader(props) {
22
22
  divider = props.divider,
23
23
  otherProps = _objectWithoutProperties(props, _excluded);
24
24
  var _useStyles = useStyles({
25
- divider: divider
25
+ divider: divider,
26
+ iconBg: !(icon !== null && icon !== void 0 && icon.src)
26
27
  }),
27
28
  styles = _useStyles.styles,
28
29
  cx = _useStyles.cx;
@@ -59,6 +60,9 @@ export var ProCardHeader = function ProCardHeader(props) {
59
60
  align: "flex-start",
60
61
  className: styles.extra,
61
62
  justify: "flex-end",
63
+ onClick: function onClick(e) {
64
+ return e.stopPropagation();
65
+ },
62
66
  children: /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({}, otherExtraProps), {}, {
63
67
  children: extraChildren || /*#__PURE__*/_jsx(Button, {
64
68
  icon: /*#__PURE__*/_jsx(MoreOutlined, {}),
@@ -1,5 +1,6 @@
1
1
  export declare const useStyles: (props?: {
2
2
  divider?: boolean | undefined;
3
+ iconBg?: boolean | undefined;
3
4
  } | undefined) => import("antd-style").ReturnStyles<{
4
5
  root: import("antd-style").SerializedStyles;
5
6
  icon: import("antd-style").SerializedStyles;
@@ -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 background-color: ", ";\n .anticon {\n font-size: 40px;\n }\n }\n "])), prefixCls, token.colorPrimary, token.colorPrimaryBgHover),
13
- titleBox: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-right: 4px;\n "]))),
14
- title: css(_templateObject5 || (_templateObject5 = _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),
15
- description: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n &.", "-typography {\n margin-bottom: 0 !important;\n font-size: 12px;\n color: ", ";\n }\n "])), prefixCls, token.colorTextSecondary),
16
- extra: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-top: -4px;\n "]))),
17
- rightButtons: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n justify-content: flex-end;\n "])))
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'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuntijs/ui",
3
- "version": "1.0.0-beta.40",
3
+ "version": "1.0.0-beta.41",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",