@lobehub/ui 1.128.1 → 1.128.3
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/Image/index.js +15 -10
- package/es/Layout/style.js +2 -2
- package/es/Modal/index.js +2 -2
- package/es/ThemeProvider/GlobalStyle/global.js +1 -1
- package/es/Toc/style.js +1 -1
- package/package.json +1 -1
package/es/Image/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["wrapperClassName", "style", "preview", "isLoading", "minSize", "size", "actions", "alwaysShowActions", "objectFit", "classNames"];
|
|
3
|
+
var _excluded = ["wrapperClassName", "style", "preview", "isLoading", "minSize", "size", "actions", "alwaysShowActions", "objectFit", "classNames", "onClick"];
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
import { Image as AntImage, Skeleton } from 'antd';
|
|
@@ -28,6 +28,7 @@ var Image = /*#__PURE__*/memo(function (_ref) {
|
|
|
28
28
|
objectFit = _ref$objectFit === void 0 ? 'cover' : _ref$objectFit,
|
|
29
29
|
_ref$classNames = _ref.classNames,
|
|
30
30
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
31
|
+
onClick = _ref.onClick,
|
|
31
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
var _useResponsive = useResponsive(),
|
|
33
34
|
mobile = _useResponsive.mobile;
|
|
@@ -43,15 +44,18 @@ var Image = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
44
|
cx = _useStyles.cx,
|
|
44
45
|
theme = _useStyles.theme;
|
|
45
46
|
var mergePreivew = usePreview(preview);
|
|
46
|
-
if (isLoading) return /*#__PURE__*/_jsx(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
if (isLoading) return /*#__PURE__*/_jsx("div", {
|
|
48
|
+
onClick: onClick,
|
|
49
|
+
children: /*#__PURE__*/_jsx(Skeleton.Avatar, {
|
|
50
|
+
active: true,
|
|
51
|
+
style: {
|
|
52
|
+
borderRadius: theme.borderRadius,
|
|
53
|
+
height: size,
|
|
54
|
+
minHeight: minSize,
|
|
55
|
+
minWidth: minSize,
|
|
56
|
+
width: size
|
|
57
|
+
}
|
|
58
|
+
})
|
|
55
59
|
});
|
|
56
60
|
return /*#__PURE__*/_jsxs(Flexbox, {
|
|
57
61
|
className: cx(styles.imageWrapper, wrapperClassName),
|
|
@@ -63,6 +67,7 @@ var Image = /*#__PURE__*/memo(function (_ref) {
|
|
|
63
67
|
className: classNames.image,
|
|
64
68
|
fallback: isDarkMode ? 'https://gw.alipayobjects.com/zos/kitchen/nhzBb%24r0Cm/image_off_dark.webp' : 'https://gw.alipayobjects.com/zos/kitchen/QAvkgt30Ys/image_off_light.webp',
|
|
65
69
|
loading: 'lazy',
|
|
70
|
+
onClick: onClick,
|
|
66
71
|
preview: preview === false ? false : _objectSpread({
|
|
67
72
|
mask: mobile ? false : actions ? /*#__PURE__*/_jsx("div", {}) : /*#__PURE__*/_jsx(Icon, {
|
|
68
73
|
icon: Eye,
|
package/es/Layout/style.js
CHANGED
|
@@ -7,9 +7,9 @@ export var useStyles = createStyles(function (_ref, headerHeight) {
|
|
|
7
7
|
responsive = _ref.responsive;
|
|
8
8
|
var baseGlass = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: none;\n content: '';\n user-select: none;\n\n position: absolute;\n z-index: -1;\n inset: -1px 0 ", ";\n "])), responsive.mobile ? '-25%' : '-50%');
|
|
9
9
|
return {
|
|
10
|
-
app: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n height:
|
|
10
|
+
app: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n height: 100dvh;\n "]))),
|
|
11
11
|
aside: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n z-index: 2;\n height: 100%;\n "]))),
|
|
12
|
-
asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(
|
|
12
|
+
asideInner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: calc(100dvh - ", "px);\n "])), headerHeight),
|
|
13
13
|
content: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1;\n max-width: 100%;\n "]))),
|
|
14
14
|
footer: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
|
|
15
15
|
glass: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n z-index: 0;\n\n &::before {\n ", ";\n ", ";\n mask-image: linear-gradient(to bottom, black ", "px, transparent);\n }\n\n &::after {\n ", ";\n }\n "])), stylish.blur, baseGlass, headerHeight, baseGlass),
|
package/es/Modal/index.js
CHANGED
|
@@ -45,7 +45,7 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
45
45
|
destroyOnClose = _ref3.destroyOnClose,
|
|
46
46
|
paddings = _ref3.paddings,
|
|
47
47
|
_ref3$maxHeight = _ref3.maxHeight,
|
|
48
|
-
maxHeight = _ref3$maxHeight === void 0 ? '
|
|
48
|
+
maxHeight = _ref3$maxHeight === void 0 ? '75dvh' : _ref3$maxHeight,
|
|
49
49
|
footer = _ref3.footer,
|
|
50
50
|
_ref3$styles = _ref3.styles,
|
|
51
51
|
stylesProps = _ref3$styles === void 0 ? {} : _ref3$styles,
|
|
@@ -77,7 +77,7 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
77
77
|
}
|
|
78
78
|
}),
|
|
79
79
|
footer: footer,
|
|
80
|
-
height: fullscreen ? '
|
|
80
|
+
height: fullscreen ? '100dvh' : maxHeight || '75vh',
|
|
81
81
|
maskClassName: cx(styles.wrap, wrapClassName),
|
|
82
82
|
onClose: onCancel,
|
|
83
83
|
open: open,
|
|
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from 'antd-style';
|
|
4
4
|
export default (function (token) {
|
|
5
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n html,\n body {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n body {\n overflow-x: hidden;\n height:
|
|
5
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n html,\n body {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n margin: 0;\n padding: 0;\n\n font-family: ", ";\n font-size: ", "px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n line-height: 1;\n color: ", ";\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n vertical-align: baseline;\n\n color-scheme: dark;\n background-color: ", ";\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n body {\n overflow-x: hidden;\n height: 100dvh;\n }\n\n #root {\n min-height: 100dvh;\n }\n\n code {\n font-family: ", " !important;\n\n span {\n font-family: ", " !important;\n }\n }\n\n p {\n word-wrap: break-word;\n }\n\n ::selection {\n color: #000;\n background: ", ";\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n box-sizing: border-box;\n vertical-align: baseline;\n }\n\n @media only screen and (min-width: 574px) {\n * {\n ::-webkit-scrollbar {\n cursor: pointer;\n width: 4px;\n height: 4px;\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n cursor: pointer;\n background-color: transparent;\n border-radius: 2px;\n transition: background-color 500ms ", ";\n\n &:hover {\n background-color: ", ";\n }\n }\n\n ::-webkit-scrollbar-corner {\n display: none;\n width: 0;\n height: 0;\n }\n\n &:hover {\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n }\n }\n }\n }\n"])), token.fontFamily, token.fontSize, token.colorTextBase, token.colorBgLayout, token.fontFamilyCode, token.fontFamilyCode, token.yellow9, token.motionEaseOut, token.colorText, token.colorFill);
|
|
6
6
|
});
|
package/es/Toc/style.js
CHANGED
|
@@ -13,7 +13,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
13
13
|
headerHeight = _ref2.headerHeight;
|
|
14
14
|
var fixHeight = 36;
|
|
15
15
|
return {
|
|
16
|
-
anchor: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-height:
|
|
16
|
+
anchor: cx(stylish.blur, css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-height: 60dvh !important;\n "])))),
|
|
17
17
|
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: sticky;\n top: ", "px;\n\n overscroll-behavior: contain;\n grid-area: toc;\n\n width: ", "px;\n margin-inline-end: 24px;\n\n border-radius: 3px;\n\n -webkit-overflow-scrolling: touch;\n\n ", " {\n position: relative;\n left: 0;\n width: 100%;\n margin-top: 0;\n }\n\n > h4 {\n margin: 0 0 8px;\n font-size: 12px;\n line-height: 1;\n color: ", ";\n }\n "])), headerHeight + 64, tocWidth, responsive.mobile, token.colorTextDescription),
|
|
18
18
|
expand: cx(stylish.blur, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-radius: 0;\n box-shadow: ", ";\n\n .", "-collapse-content {\n overflow: auto;\n }\n\n .", "-collapse-header {\n z-index: 10;\n padding: 8px 16px !important;\n }\n "])), rgba(token.colorBgLayout, 0.5), token.colorSplit, token.boxShadowSecondary, prefixCls, prefixCls)),
|
|
19
19
|
mobileCtn: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n height: ", "px;\n\n .", "-collapse-expand-icon {\n color: ", ";\n }\n "])), fixHeight, prefixCls, token.colorTextQuaternary)
|