@yuntijs/ui 1.0.0-beta.26 → 1.0.0-beta.28

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,8 @@ import fullScreenIcon from "./assets/img/full-screen-icon.png";
8
8
  * styles from https://github.com/alibaba/lowcode-plugins/blob/main/packages/base-monaco-editor/src/index.scss
9
9
  */
10
10
  export var useStyles = createStyles(function (_ref, _ref2) {
11
- var css = _ref.css;
11
+ var css = _ref.css,
12
+ token = _ref.token;
12
13
  var _ref2$minimapEnabled = _ref2.minimapEnabled,
13
14
  minimapEnabled = _ref2$minimapEnabled === void 0 ? false : _ref2$minimapEnabled,
14
15
  _ref2$isFullScreen = _ref2.isFullScreen,
@@ -16,7 +17,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
16
17
  var dots = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { content: '.'; }\n 20% { content: '..'; }\n 40% { content: '...'; }\n 60% { content: '....'; }\n 80% { content: '.....'; }\n "])));
17
18
  var fullScreenStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .base-monaco-full-screen-icon,\n .base-monaco-full-screen-icon-cancel {\n cursor: pointer;\n\n position: absolute;\n\n width: 20px;\n height: 20px;\n\n background-size: 20px 20px;\n }\n\n .base-monaco-full-screen-icon {\n top: 40px;\n right: ", ";\n background-image: url(", ");\n }\n\n .base-monaco-full-screen-icon-cancel {\n z-index: 9999;\n top: 10px;\n right: 138px;\n background-image: url(", ");\n }\n "])), minimapEnabled ? '64px' : '20px', fullScreenIcon, fullScreenCancelIcon);
18
19
  return {
19
- base: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n box-sizing: content-box;\n min-height: 100px;\n\n border: 1px solid transparent;\n border-radius: 3px;\n &:hover {\n border-color: var(--color-field-border-hover, rgba(31, 56, 88, 0.1));\n }\n &.ve-focused {\n border-color: var(--color-field-border-active, rgba(31, 56, 88, 0.15));\n }\n &.ve-outline {\n border: 1px solid var(--color-field-border, rgba(31, 56, 88, 0.05)) !important;\n }\n\n .react-monaco-editor-container {\n width: 100%;\n height: 100%;\n min-height: 100px;\n background: transparent;\n }\n\n ", "\n\n .loading {\n position: absolute;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: var(--color-text, rgba(0, 0, 0, 0.3));\n\n background-color: transparent;\n\n &::after {\n content: '';\n display: inline;\n animation: ", " steps(3) 1s infinite;\n }\n }\n\n .syntaxTips {\n position: absolute;\n bottom: 0;\n left: 0;\n\n box-sizing: border-box;\n width: 100%;\n max-height: 0;\n margin: 0;\n padding: 10px 30px;\n\n color: red;\n\n background: rgba(255, 234, 234, 0.8);\n\n transition: 0.2s ease max-height;\n }\n\n .syntaxTips:hover {\n overflow: auto;\n max-height: 50%;\n }\n\n .syntaxTips .infoIcon {\n position: absolute;\n top: 2px;\n right: 5px;\n transform: rotateY(180deg);\n\n width: 20px;\n height: 16px;\n }\n "])), fullScreenStyle, dots),
20
+ base: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n\n box-sizing: content-box;\n min-height: 100px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n &:hover {\n border-color: var(--color-field-border-hover, rgba(31, 56, 88, 0.1));\n }\n &.ve-focused {\n border-color: var(--color-field-border-active, rgba(31, 56, 88, 0.15));\n }\n &.ve-outline {\n border: 1px solid var(--color-field-border, rgba(31, 56, 88, 0.05)) !important;\n }\n\n .react-monaco-editor-container {\n width: 100%;\n height: 100%;\n min-height: 100px;\n background: transparent;\n & > .monaco-editor {\n border-radius: ", "px;\n .overflow-guard,\n .margin {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n .monaco-scrollable-element {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n .monaco-diff-editor {\n border-radius: ", "px;\n & > .original > .monaco-editor {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n .overflow-guard,\n .margin {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n }\n .diffViewport {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n\n ", "\n\n .loading {\n position: absolute;\n inset: 0;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: var(--color-text, rgba(0, 0, 0, 0.3));\n\n background-color: transparent;\n\n &::after {\n content: '';\n display: inline;\n animation: ", " steps(3) 1s infinite;\n }\n }\n\n .syntaxTips {\n position: absolute;\n bottom: 0;\n left: 0;\n\n box-sizing: border-box;\n width: 100%;\n max-height: 0;\n margin: 0;\n padding: 10px 30px;\n\n color: red;\n\n background: rgba(255, 234, 234, 0.8);\n\n transition: 0.2s ease max-height;\n }\n\n .syntaxTips:hover {\n overflow: auto;\n max-height: 50%;\n }\n\n .syntaxTips .infoIcon {\n position: absolute;\n top: 2px;\n right: 5px;\n transform: rotateY(180deg);\n\n width: 20px;\n height: 16px;\n }\n "])), token.colorBorder, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius - 1, token.borderRadius - 1, fullScreenStyle, dots),
20
21
  diff: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n box-sizing: content-box;\n\n .react-monaco-editor-container {\n ", "\n }\n\n ", "\n\n .base-monaco-full-screen-icon {\n right: 64px;\n }\n\n .base-monaco-full-screen-icon-cancel {\n position: fixed;\n right: 64px;\n }\n "])), isFullScreen && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: fixed;\n z-index: 9998;\n inset: 0;\n\n width: auto;\n height: auto;\n "]))), fullScreenStyle)
21
22
  };
22
23
  }, {
@@ -17,7 +17,7 @@ export var getIconSize = function getIconSize(size) {
17
17
  }
18
18
  case 'large':
19
19
  {
20
- return 104;
20
+ return 88;
21
21
  }
22
22
  default:
23
23
  {
@@ -14,7 +14,7 @@ export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElemen
14
14
  /** 图标 src 路径或者详细配置 */
15
15
  icon?: string | HeaderIconProps;
16
16
  /** 标题 */
17
- title: React.ReactNode;
17
+ title?: React.ReactNode;
18
18
  /** 标题自定义渲染 */
19
19
  titleRender?: (titleElement: React.ReactNode) => React.ReactNode;
20
20
  /** 副标题:例如描述等 */
@@ -46,7 +46,8 @@ export var PageHeader = function PageHeader(props) {
46
46
  }
47
47
  if (typeof icon === 'string') {
48
48
  return {
49
- src: icon
49
+ src: icon,
50
+ size: subTitle ? 'large' : 'default'
50
51
  };
51
52
  }
52
53
  if (subTitle && icon.size === undefined) {
@@ -120,10 +121,13 @@ export var PageHeader = function PageHeader(props) {
120
121
  return /*#__PURE__*/_jsxs(Flex, {
121
122
  className: cx(styles.root, className),
122
123
  gap: 20,
123
- children: [/*#__PURE__*/_jsx(Skeleton.Avatar, {
124
- active: true,
125
- shape: iconProps === null || iconProps === void 0 ? void 0 : iconProps.shape,
126
- size: getIconSize(iconProps === null || iconProps === void 0 ? void 0 : iconProps.size)
124
+ children: [/*#__PURE__*/_jsx(Flex, {
125
+ children: /*#__PURE__*/_jsx(Skeleton.Avatar, {
126
+ active: true,
127
+ className: styles.icon,
128
+ shape: iconProps === null || iconProps === void 0 ? void 0 : iconProps.shape,
129
+ size: getIconSize(iconProps === null || iconProps === void 0 ? void 0 : iconProps.size)
130
+ })
127
131
  }), /*#__PURE__*/_jsxs(Flex, {
128
132
  flex: "2",
129
133
  justify: "space-between",
@@ -11,8 +11,8 @@ export var useStyles = createStyles(function (_ref, _ref2) {
11
11
  divider = _ref2$divider === void 0 ? true : _ref2$divider;
12
12
  return {
13
13
  root: bordered ? css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", "px;\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n "])), token.padding, token.colorBgBase, token.borderRadius, token.boxShadowTertiary) : css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-top: ", "px;\n ", "\n "])), token.paddingXS, divider && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-bottom: ", "px;\n border-bottom: 1px solid ", ";\n "])), token.paddingLG, token.colorSplit)),
14
- icon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-avatar.", "-avatar-square {\n border-radius: 10px;\n }\n "])), prefixCls, prefixCls),
15
- titleBox: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n "])), token.marginXXS, token.marginSM),
14
+ icon: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-avatar.", "-avatar-square {\n border-radius: 10px;\n }\n .", "-skeleton-avatar {\n border-radius: 10px;\n }\n "])), prefixCls, prefixCls, prefixCls),
15
+ titleBox: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n "])), token.marginSM),
16
16
  subTitle: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n &.", "-typography {\n margin-bottom: 0 !important;\n font-size: ", "px;\n color: ", ";\n }\n "])), token.marginXXS, prefixCls, token.fontSize, token.colorTextSecondary),
17
17
  title: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 700;\n "])), token.fontSizeHeading5),
18
18
  descriptions: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n font-size: ", "px;\n color: ", ";\n .", "-badge.", "-badge-status {\n font-size: ", "px;\n & > .", "-badge-status-text {\n font-size: ", "px;\n color: ", ";\n }\n }\n "])), token.marginXXS, token.fontSize, token.colorTextSecondary, prefixCls, prefixCls, token.fontSize, prefixCls, token.fontSize, token.colorTextSecondary),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuntijs/ui",
3
- "version": "1.0.0-beta.26",
3
+ "version": "1.0.0-beta.28",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",