@lobehub/ui 1.135.4 → 1.136.1

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.
@@ -24,6 +24,7 @@ export interface AvatarProps extends AntAvatarProps {
24
24
  * @description The title text to display if avatar is not provided
25
25
  */
26
26
  title?: string;
27
+ unoptimized?: boolean;
27
28
  }
28
29
  declare const Avatar: import("react").NamedExoticComponent<AvatarProps>;
29
30
  export default Avatar;
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["className", "avatar", "title", "animation", "size", "shape", "background", "style"];
5
+ var _excluded = ["className", "avatar", "title", "animation", "size", "shape", "background", "style", "unoptimized"];
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
8
  import { Avatar as AntAvatar } from 'antd';
@@ -23,6 +23,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
23
23
  _ref$background = _ref.background,
24
24
  background = _ref$background === void 0 ? 'rgba(0,0,0,0)' : _ref$background,
25
25
  style = _ref.style,
26
+ _ref$unoptimized = _ref.unoptimized,
27
+ unoptimized = _ref$unoptimized === void 0 ? false : _ref$unoptimized,
26
28
  rest = _objectWithoutProperties(_ref, _excluded);
27
29
  var isStringAvatar = typeof avatar === 'string';
28
30
  var isDefaultAntAvatar = Boolean(avatar && (['/', 'http', 'data:'].some(function (index) {
@@ -53,7 +55,8 @@ var Avatar = /*#__PURE__*/memo(function (_ref) {
53
55
  children: emoji ? /*#__PURE__*/_jsx(FluentEmoji, {
54
56
  emoji: emoji,
55
57
  size: size * 0.8,
56
- type: animation ? 'anim' : '3d'
58
+ type: animation ? 'anim' : '3d',
59
+ unoptimized: unoptimized
57
60
  }) : text === null || text === void 0 ? void 0 : text.toUpperCase().slice(0, 2)
58
61
  }));
59
62
  });
@@ -1,14 +1,16 @@
1
- import { MenuProps } from 'antd';
1
+ import { type DrawerProps, type MenuProps } from 'antd';
2
2
  import { CSSProperties } from 'react';
3
3
  import { type ActionIconProps } from "../ActionIcon";
4
4
  export interface BurgerProps {
5
5
  className?: string;
6
+ drawerProps?: Partial<Omit<DrawerProps, 'items' | 'opened' | 'setOpened'>>;
7
+ fullscreen?: boolean;
6
8
  /**
7
9
  * @description The height of the header component
8
10
  * @default 64
9
11
  */
10
12
  headerHeight?: number;
11
- icon?: ActionIconProps;
13
+ iconProps?: Partial<ActionIconProps>;
12
14
  /**
13
15
  * @description The items to be displayed in the menu
14
16
  */
@@ -22,6 +24,7 @@ export interface BurgerProps {
22
24
  * @description Whether the menu is currently open or not
23
25
  */
24
26
  opened: boolean;
27
+ rootClassName?: string;
25
28
  /**
26
29
  * @description The keys of the currently selected menu items
27
30
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["items", "openKeys", "selectedKeys", "opened", "setOpened", "className", "headerHeight", "onClick", "icon"];
5
+ var _excluded = ["items", "openKeys", "selectedKeys", "opened", "setOpened", "className", "headerHeight", "onClick", "iconProps", "rootClassName", "fullscreen", "drawerProps"];
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
8
  import { Drawer, Menu } from 'antd';
@@ -23,10 +23,15 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
23
23
  _ref$headerHeight = _ref.headerHeight,
24
24
  headerHeight = _ref$headerHeight === void 0 ? 64 : _ref$headerHeight,
25
25
  onClick = _ref.onClick,
26
- _ref$icon = _ref.icon,
27
- icon = _ref$icon === void 0 ? {} : _ref$icon,
26
+ iconProps = _ref.iconProps,
27
+ rootClassName = _ref.rootClassName,
28
+ fullscreen = _ref.fullscreen,
29
+ drawerProps = _ref.drawerProps,
28
30
  rest = _objectWithoutProperties(_ref, _excluded);
29
- var _useStyles = useStyles(headerHeight),
31
+ var _useStyles = useStyles({
32
+ fullscreen: fullscreen,
33
+ headerHeight: headerHeight
34
+ }),
30
35
  cx = _useStyles.cx,
31
36
  styles = _useStyles.styles;
32
37
  return /*#__PURE__*/_jsxs(Center, _objectSpread(_objectSpread({
@@ -38,12 +43,14 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
38
43
  children: [/*#__PURE__*/_jsx(ActionIcon, _objectSpread({
39
44
  icon: opened ? X : MenuIcon,
40
45
  size: "site"
41
- }, icon)), /*#__PURE__*/_jsxs(Drawer, {
42
- className: styles.drawer,
46
+ }, iconProps)), /*#__PURE__*/_jsxs(Drawer, _objectSpread(_objectSpread({
43
47
  closeIcon: undefined,
44
48
  open: opened,
45
49
  placement: 'left',
46
- rootClassName: styles.drawerRoot,
50
+ width: '100vw'
51
+ }, drawerProps), {}, {
52
+ className: styles.drawer,
53
+ rootClassName: cx(styles.drawerRoot, rootClassName),
47
54
  styles: {
48
55
  body: {
49
56
  padding: 0
@@ -52,7 +59,6 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
52
59
  display: 'none'
53
60
  }
54
61
  },
55
- width: '100vw',
56
62
  children: [/*#__PURE__*/_jsx(Menu, {
57
63
  className: styles.menu,
58
64
  items: items,
@@ -63,7 +69,7 @@ var Burger = /*#__PURE__*/memo(function (_ref) {
63
69
  }), /*#__PURE__*/_jsx("div", {
64
70
  className: styles.fillRect
65
71
  })]
66
- })]
72
+ }))]
67
73
  }));
68
74
  });
69
75
  export default Burger;
@@ -1,4 +1,7 @@
1
- export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const useStyles: (props?: {
2
+ fullscreen?: boolean | undefined;
3
+ headerHeight: number;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
2
5
  container: import("antd-style").SerializedStyles;
3
6
  drawer: import("antd-style").SerializedStyles;
4
7
  drawerRoot: import("antd-style").SerializedStyles;
@@ -2,16 +2,18 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { createStyles } from 'antd-style';
4
4
  import { rgba } from 'polished';
5
- export var useStyles = createStyles(function (_ref, headerHeight) {
5
+ export var useStyles = createStyles(function (_ref, _ref2) {
6
6
  var token = _ref.token,
7
7
  css = _ref.css,
8
8
  stylish = _ref.stylish,
9
9
  prefixCls = _ref.prefixCls;
10
+ var fullscreen = _ref2.fullscreen,
11
+ headerHeight = _ref2.headerHeight;
10
12
  return {
11
13
  container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n width: ", "px;\n height: ", "px;\n border-radius: ", "px;\n "])), token.controlHeight, token.controlHeight, token.borderRadius),
12
14
  drawer: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", "-drawer-content {\n background: transparent;\n }\n\n .", "-drawer-body {\n display: flex;\n flex-direction: column;\n }\n "])), prefixCls, prefixCls),
13
- drawerRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n inset-block-start: ", "px;\n\n :focus-visible {\n outline: none;\n }\n\n .", "-drawer {\n &-mask {\n ", ";\n background-color: ", ";\n }\n\n &-content-wrapper {\n box-shadow: none;\n }\n }\n "])), headerHeight + 1, prefixCls, stylish.blur, rgba(token.colorBgLayout, 0.5)),
15
+ drawerRoot: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n inset-block-start: ", "px;\n\n :focus-visible {\n outline: none;\n }\n\n .", "-drawer {\n &-mask {\n ", ";\n background-color: ", ";\n }\n\n &-content-wrapper {\n box-shadow: none;\n }\n }\n "])), fullscreen ? 0 : headerHeight + 1, prefixCls, stylish.blur, rgba(token.colorBgLayout, 0.5)),
14
16
  fillRect: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n width: 100%;\n border-block-start: none;\n "]))),
15
- menu: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: transparent;\n border-inline-end: transparent !important;\n\n > .", "-menu-item-only-child, .", "-menu-submenu-title {\n width: 100%;\n margin: 0 !important;\n border-block-start: none;\n border-radius: 0;\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n\n .", "-menu-item-only-child:first-child {\n border-block-start: none;\n }\n\n .", "-menu-submenu-title[aria-expanded='true'] {\n a {\n font-weight: 600;\n color: ", " !important;\n }\n }\n\n .", "-menu-item-group-title {\n padding-block: 8px;\n\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n\n background: ", ";\n }\n\n .", "-menu-item {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n border-radius: ", "px;\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .", "-menu-item-active {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n background: ", ";\n border-radius: ", "px;\n }\n\n .", "-menu-item-selected {\n font-weight: 600;\n color: ", ";\n background: ", ";\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n "])), prefixCls, prefixCls, token.colorText, token.colorFill, prefixCls, prefixCls, token.colorText, prefixCls, token.colorFillSecondary, prefixCls, token.borderRadius, token.colorText, token.colorFillSecondary, prefixCls, token.colorFillSecondary, token.borderRadius, prefixCls, token.colorBgLayout, token.colorText, token.colorBgLayout, token.colorText)
17
+ menu: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-block-start: ", "px;\n background: transparent;\n border-inline-end: transparent !important;\n\n > .", "-menu-item-only-child, .", "-menu-submenu-title {\n width: 100%;\n margin: 0 !important;\n border-block-start: none;\n border-radius: 0;\n\n &:active {\n color: ", ";\n background-color: ", ";\n }\n }\n\n .", "-menu-item-only-child:first-child {\n border-block-start: none;\n }\n\n .", "-menu-submenu-title[aria-expanded='true'] {\n a {\n font-weight: 600;\n color: ", " !important;\n }\n }\n\n .", "-menu-item-group-title {\n padding-block: 8px;\n\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n\n background: ", ";\n }\n\n .", "-menu-item {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n border-radius: ", "px;\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .", "-menu-item-active {\n width: calc(100% - 16px) !important;\n margin: 8px !important;\n background: ", ";\n border-radius: ", "px;\n }\n\n .", "-menu-item-selected {\n font-weight: 600;\n color: ", ";\n background: ", ";\n\n &:hover,\n &:active {\n color: ", " !important;\n background: ", " !important;\n }\n }\n "])), fullscreen ? headerHeight : 0, prefixCls, prefixCls, token.colorText, token.colorFill, prefixCls, prefixCls, token.colorText, prefixCls, token.colorFillSecondary, prefixCls, token.borderRadius, token.colorText, token.colorFillSecondary, prefixCls, token.colorFillSecondary, token.borderRadius, prefixCls, token.colorBgLayout, token.colorText, token.colorBgLayout, token.colorText)
16
18
  };
17
19
  });
@@ -83,11 +83,12 @@ export interface DraggablePanelProps extends DivProps {
83
83
  * @default true
84
84
  */
85
85
  resize?: RndProps['enableResizing'];
86
+ showHandlerWhenUnexpand?: boolean;
86
87
  /**
87
88
  * @description Whether the panel handler should be shown when unexpanded or not
88
89
  * @default true
89
90
  */
90
- showHandlerWhenUnexpand?: boolean;
91
+ showHandlerWideArea?: boolean;
91
92
  /**
92
93
  * @description The size of the panel
93
94
  */
@@ -31,6 +31,8 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
31
31
  placement = _ref$placement === void 0 ? 'right' : _ref$placement,
32
32
  resize = _ref.resize,
33
33
  style = _ref.style,
34
+ _ref$showHandlerWideA = _ref.showHandlerWideArea,
35
+ showHandlerWideArea = _ref$showHandlerWideA === void 0 ? true : _ref$showHandlerWideA,
34
36
  size = _ref.size,
35
37
  customizeDefaultSize = _ref.defaultSize,
36
38
  minWidth = _ref.minWidth,
@@ -64,7 +66,10 @@ var DraggablePanel = /*#__PURE__*/memo(function (_ref) {
64
66
  if (direction === 'rtl' && ['left', 'right'].includes(placement)) {
65
67
  internalPlacement = internalPlacement === 'left' ? 'right' : 'left';
66
68
  }
67
- var _useStyles = useStyles(headerHeight),
69
+ var _useStyles = useStyles({
70
+ headerHeight: headerHeight,
71
+ showHandlerWideArea: showHandlerWideArea
72
+ }),
68
73
  styles = _useStyles.styles,
69
74
  cx = _useStyles.cx;
70
75
  var _useControlledState = useControlledState(defaultExpand, {
@@ -1,4 +1,7 @@
1
- export declare const useStyles: (props?: number | undefined) => import("antd-style").ReturnStyles<{
1
+ export declare const useStyles: (props?: {
2
+ headerHeight: number;
3
+ showHandlerWideArea: boolean;
4
+ } | undefined) => import("antd-style").ReturnStyles<{
2
5
  bottomFloat: string;
3
6
  bottomHandle: string;
4
7
  container: string;
@@ -5,28 +5,30 @@ var offset = 16;
5
5
  var toggleLength = 40;
6
6
  var toggleShort = 16;
7
7
  var prefix = 'draggable-panel';
8
- export var useStyles = createStyles(function (_ref, headerHeight) {
8
+ export var useStyles = createStyles(function (_ref, _ref2) {
9
9
  var token = _ref.token;
10
- var commonHandle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n z-index: 50;\n transition: all 0.2s ", ";\n }\n\n &:hover,\n &:active {\n &::before {\n background: ", " !important;\n }\n }\n "])), token.motionEaseOut, token.colorPrimary);
11
- var commonToggle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 101;\n\n opacity: 0;\n\n transition: all 0.2s ", ";\n\n &:hover {\n opacity: 1 !important;\n }\n\n &:active {\n opacity: 1 !important;\n }\n\n > div {\n pointer-events: all;\n cursor: pointer;\n\n position: absolute;\n\n color: ", ";\n\n background: ", ";\n border-color: ", ";\n border-style: solid;\n border-width: 1px;\n border-radius: 4px;\n\n transition: all 0.2s ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background: ", ";\n }\n }\n "])), token.motionEaseOut, token.colorTextTertiary, token.colorFillTertiary, token.colorBorderSecondary, token.motionEaseOut, token.colorTextSecondary, token.colorFillSecondary, token.colorText, token.colorFill);
12
- var float = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 200;\n "])));
10
+ var headerHeight = _ref2.headerHeight,
11
+ showHandlerWideArea = _ref2.showHandlerWideArea;
12
+ var commonHandle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n &::before {\n content: '';\n position: absolute;\n z-index: 50;\n transition: all 0.2s ", ";\n }\n\n &:hover,\n &:active {\n &::before {\n background: ", " !important;\n }\n }\n "])), token.motionEaseOut, token.colorPrimary);
13
+ var commonToggle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: ", ";\n\n position: absolute;\n z-index: 101;\n\n opacity: 0;\n\n transition: all 0.2s ", ";\n\n &:hover {\n opacity: 1 !important;\n }\n\n &:active {\n opacity: 1 !important;\n }\n\n > div {\n pointer-events: all;\n cursor: pointer;\n\n position: absolute;\n\n color: ", ";\n\n background: ", ";\n border-color: ", ";\n border-style: solid;\n border-width: 1px;\n border-radius: 4px;\n\n transition: all 0.2s ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:active {\n color: ", ";\n background: ", ";\n }\n }\n "])), showHandlerWideArea ? 'all' : 'none', token.motionEaseOut, token.colorTextTertiary, token.colorFillTertiary, token.colorBorderSecondary, token.motionEaseOut, token.colorTextSecondary, token.colorFillSecondary, token.colorText, token.colorFill);
14
+ var float = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 200;\n "])));
13
15
  return {
14
- bottomFloat: cx(float, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n inset-block-end: 0;\n inset-inline: 0 0;\n width: 100%;\n "])))),
15
- bottomHandle: cx("".concat(prefix, "-bottom-handle"), css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-block-end: 50%;\n width: 100%;\n height: 2px;\n }\n "])), commonHandle)),
16
- container: cx(prefix, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n border: 0 solid ", ";\n\n &:hover {\n .", "-toggle {\n opacity: 1;\n }\n }\n "])), token.colorBorderSecondary, prefix)),
17
- fixed: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n "]))),
18
- fullscreen: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: absolute;\n inset-block: ", "px 0;\n inset-inline: 0;\n\n width: 100%;\n height: calc(100% - ", "px);\n\n background: ", ";\n "])), headerHeight, headerHeight, token.colorBgLayout),
19
- handlerIcon: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ", ";\n "])), token.motionEaseOut),
20
- leftFloat: cx(float, css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n inset-block: ", "px 0;\n inset-inline-start: 0;\n height: calc(100% - ", "px);\n "])), headerHeight, headerHeight)),
21
- leftHandle: cx(css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-inline-start: 50%;\n width: 2px;\n height: 100%;\n }\n "])), commonHandle), "".concat(prefix, "-left-handle")),
22
- panel: cx("".concat(prefix, "-fixed"), css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n overflow: hidden;\n transition: all 0.2s ", ";\n "])), token.motionEaseOut)),
23
- rightFloat: cx(float, css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n inset-block: ", "px 0;\n inset-inline-end: 0;\n height: calc(100% - ", "px);\n "])), headerHeight, headerHeight)),
24
- rightHandle: cx(css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n ", ";\n &::before {\n inset-inline-end: 50%;\n width: 2px;\n height: 100%;\n }\n "])), commonHandle), "".concat(prefix, "-right-handle")),
25
- toggleBottom: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-bottom"), commonToggle, css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n inset-block-end: -", "px;\n width: 100%;\n height: ", "px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ", "px;\n height: 16px;\n margin-inline-start: -20px;\n\n border-radius: 0 0 4px 4px;\n }\n "])), offset, toggleShort, toggleLength)),
26
- toggleLeft: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-left"), commonToggle, css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n inset-inline-start: -", "px;\n width: ", "px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-block-start: -20px;\n\n border-radius: 4px 0 0 4px;\n }\n "])), offset, toggleShort, toggleShort, toggleLength)),
27
- toggleRight: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-right"), commonToggle, css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n inset-inline-end: -", "px;\n width: ", "px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-block-start: -20px;\n\n border-radius: 0 4px 4px 0;\n }\n "])), offset, toggleShort, toggleShort, toggleLength)),
28
- toggleTop: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-top"), commonToggle, css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n inset-block-start: -", "px;\n width: 100%;\n height: ", "px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-inline-start: -20px;\n\n border-radius: 4px 4px 0 0;\n }\n "])), offset, toggleShort, toggleLength, toggleShort)),
29
- topFloat: cx(float, css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n inset-block-start: ", "px;\n inset-inline: 0 0;\n width: 100%;\n "])), headerHeight)),
30
- topHandle: cx("".concat(prefix, "-top-handle"), css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-block-start: 50%;\n width: 100%;\n height: 2px;\n }\n "])), commonHandle))
16
+ bottomFloat: cx(float, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n inset-block-end: 0;\n inset-inline: 0 0;\n width: 100%;\n "])))),
17
+ bottomHandle: cx("".concat(prefix, "-bottom-handle"), css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-block-end: 50%;\n width: 100%;\n height: 2px;\n }\n "])), commonHandle)),
18
+ container: cx(prefix, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n border: 0 solid ", ";\n\n &:hover {\n .", "-toggle {\n opacity: 1;\n }\n }\n "])), token.colorBorderSecondary, prefix)),
19
+ fixed: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n "]))),
20
+ fullscreen: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: absolute;\n inset-block: ", "px 0;\n inset-inline: 0;\n\n width: 100%;\n height: calc(100% - ", "px);\n\n background: ", ";\n "])), headerHeight, headerHeight, token.colorBgLayout),
21
+ handlerIcon: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ", ";\n "])), token.motionEaseOut),
22
+ leftFloat: cx(float, css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n inset-block: ", "px 0;\n inset-inline-start: 0;\n height: calc(100% - ", "px);\n "])), headerHeight, headerHeight)),
23
+ leftHandle: cx(css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-inline-start: 50%;\n width: 2px;\n height: 100%;\n }\n "])), commonHandle), "".concat(prefix, "-left-handle")),
24
+ panel: cx("".concat(prefix, "-fixed"), css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n overflow: hidden;\n transition: all 0.2s ", ";\n "])), token.motionEaseOut)),
25
+ rightFloat: cx(float, css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n inset-block: ", "px 0;\n inset-inline-end: 0;\n height: calc(100% - ", "px);\n "])), headerHeight, headerHeight)),
26
+ rightHandle: cx(css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n ", ";\n &::before {\n inset-inline-end: 50%;\n width: 2px;\n height: 100%;\n }\n "])), commonHandle), "".concat(prefix, "-right-handle")),
27
+ toggleBottom: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-bottom"), commonToggle, css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n inset-block-end: -", "px;\n width: 100%;\n height: ", "px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ", "px;\n height: 16px;\n margin-inline-start: -20px;\n\n border-radius: 0 0 4px 4px;\n }\n "])), offset, toggleShort, toggleLength)),
28
+ toggleLeft: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-left"), commonToggle, css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n inset-inline-start: -", "px;\n width: ", "px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-block-start: -20px;\n\n border-radius: 4px 0 0 4px;\n }\n "])), offset, toggleShort, toggleShort, toggleLength)),
29
+ toggleRight: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-right"), commonToggle, css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n inset-inline-end: -", "px;\n width: ", "px;\n height: 100%;\n\n > div {\n inset-block-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-block-start: -20px;\n\n border-radius: 0 4px 4px 0;\n }\n "])), offset, toggleShort, toggleShort, toggleLength)),
30
+ toggleTop: cx("".concat(prefix, "-toggle"), "".concat(prefix, "-toggle-top"), commonToggle, css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n inset-block-start: -", "px;\n width: 100%;\n height: ", "px;\n\n > div {\n inset-inline-start: 50%;\n\n width: ", "px;\n height: ", "px;\n margin-inline-start: -20px;\n\n border-radius: 4px 4px 0 0;\n }\n "])), offset, toggleShort, toggleLength, toggleShort)),
31
+ topFloat: cx(float, css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n inset-block-start: ", "px;\n inset-inline: 0 0;\n width: 100%;\n "])), headerHeight)),
32
+ topHandle: cx("".concat(prefix, "-top-handle"), css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n ", ";\n\n &::before {\n inset-block-start: 50%;\n width: 100%;\n height: 2px;\n }\n "])), commonHandle))
31
33
  };
32
34
  });
@@ -15,6 +15,7 @@ export interface FluentEmojiProps extends DivProps {
15
15
  * @default '3d'
16
16
  */
17
17
  type?: 'modern' | 'flat' | 'high-contrast' | 'anim' | '3d' | 'pure';
18
+ unoptimized?: boolean;
18
19
  }
19
20
  declare const FluentEmoji: import("react").NamedExoticComponent<FluentEmojiProps>;
20
21
  export default FluentEmoji;
@@ -18,7 +18,9 @@ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
18
18
  _ref$type = _ref.type,
19
19
  type = _ref$type === void 0 ? '3d' : _ref$type,
20
20
  _ref$size = _ref.size,
21
- size = _ref$size === void 0 ? 40 : _ref$size;
21
+ size = _ref$size === void 0 ? 40 : _ref$size,
22
+ _ref$unoptimized = _ref.unoptimized,
23
+ unoptimized = _ref$unoptimized === void 0 ? false : _ref$unoptimized;
22
24
  var genCdnUrl = useCdnFn();
23
25
  var _useState = useState(false),
24
26
  _useState2 = _slicedToArray(_useState, 2),
@@ -82,6 +84,7 @@ var FluentEmoji = /*#__PURE__*/memo(function (_ref) {
82
84
  return setLoadingFail(true);
83
85
  },
84
86
  src: emojiUrl,
87
+ unoptimized: unoptimized,
85
88
  width: size
86
89
  })
87
90
  });
package/es/Img/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ImageProps } from 'antd';
3
3
  import { ImgProps } from "../types";
4
- declare const Img: import("react").ForwardRefExoticComponent<ImgProps & ImageProps & import("react").RefAttributes<any>>;
4
+ declare const Img: import("react").ForwardRefExoticComponent<ImgProps & ImageProps & {
5
+ unoptimized?: boolean | undefined;
6
+ } & import("react").RefAttributes<any>>;
5
7
  export default Img;
@@ -15,6 +15,7 @@ export interface TokenTagProps extends DivProps {
15
15
  remained?: string;
16
16
  used?: string;
17
17
  };
18
+ unoptimized?: boolean;
18
19
  /**
19
20
  * @description Current value of the token
20
21
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["className", "displayMode", "maxValue", "value", "text", "shape"];
5
+ var _excluded = ["className", "displayMode", "maxValue", "value", "text", "shape", "unoptimized"];
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
8
  import { useResponsive } from 'antd-style';
@@ -21,6 +21,8 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
21
  text = _ref.text,
22
22
  _ref$shape = _ref.shape,
23
23
  shape = _ref$shape === void 0 ? 'round' : _ref$shape,
24
+ _ref$unoptimized = _ref.unoptimized,
25
+ unoptimized = _ref$unoptimized === void 0 ? false : _ref$unoptimized,
24
26
  rest = _objectWithoutProperties(_ref, _excluded);
25
27
  var _useResponsive = useResponsive(),
26
28
  mobile = _useResponsive.mobile;
@@ -54,7 +56,8 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
54
56
  }, rest), {}, {
55
57
  children: [/*#__PURE__*/_jsx(FluentEmoji, {
56
58
  emoji: emoji,
57
- size: ICON_SIZE
59
+ size: ICON_SIZE,
60
+ unoptimized: unoptimized
58
61
  }), valueLeft > 0 ? [mobile ? '' : displayMode === 'remained' ? (text === null || text === void 0 ? void 0 : text.remained) || 'Remained' : (text === null || text === void 0 ? void 0 : text.used) || 'Used', displayMode === 'remained' ? valueLeft : value].join(' ') : (text === null || text === void 0 ? void 0 : text.overload) || 'Overload']
59
62
  }));
60
63
  });
@@ -1,5 +1,5 @@
1
1
  export declare const FALLBACK_LANG = "txt";
2
- export declare const useHighlight: (text: string, lang: string, isDarkMode: boolean) => import("swr").SWRResponse<string, any, {
2
+ export declare const useHighlight: (text: string, lang: string, isDarkMode: boolean) => import("swr/dist/_internal").SWRResponse<string, any, {
3
3
  revalidateOnFocus: false;
4
4
  }>;
5
5
  export { default as languageMap } from './languageMap';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.135.4",
3
+ "version": "1.136.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",