@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.
@@ -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.borderRadiusLG, token.boxShadowTertiary),
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 { MoreOutlined } from '@ant-design/icons';
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(MoreOutlined, {}),
69
+ icon: /*#__PURE__*/_jsx(Icon, {
70
+ icon: EllipsisVertical
71
+ }),
65
72
  size: "small",
66
73
  type: "text"
67
74
  })
@@ -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.42",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",