@lobehub/ui 1.98.4 → 1.99.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.
@@ -6,8 +6,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
6
6
  css = _ref.css,
7
7
  token = _ref.token,
8
8
  isDarkMode = _ref.isDarkMode,
9
- responsive = _ref.responsive,
10
- prefixCls = _ref.prefixCls;
9
+ responsive = _ref.responsive;
11
10
  var placement = _ref2.placement,
12
11
  type = _ref2.type,
13
12
  title = _ref2.title,
@@ -22,7 +21,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
22
21
  var editingStylish = editing && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
23
22
  return {
24
23
  actions: cx(css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n align-self: ", ";\n justify-content: ", ";\n "])), type === 'block' ? 'flex-end' : placement === 'left' ? 'flex-start' : 'flex-end', placement === 'left' ? 'flex-end' : 'flex-start'), editing && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n pointer-events: none !important;\n opacity: 0 !important;\n "])))),
25
- alert: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n span[role='img'] {\n align-self: flex-start;\n width: 16px;\n height: 16px;\n margin-top: 3px;\n }\n\n .", "-alert-description {\n text-align: justify;\n word-break: break-all;\n word-wrap: break-word;\n }\n\n &.", "-alert-with-description {\n padding-block: 12px;\n padding-inline: 12px;\n\n .", "-alert-message {\n font-size: 14px;\n font-weight: 600;\n text-align: justify;\n word-break: break-all;\n word-wrap: break-word;\n }\n }\n "])), prefixCls, prefixCls, prefixCls),
24
+ alert: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""]))),
26
25
  avatarContainer: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n position: relative;\n flex: none;\n width: ", "px;\n height: ", "px;\n "])), avatarSize, avatarSize),
27
26
  avatarGroupContainer: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: ", "px;\n "])), avatarSize),
28
27
  container: cx(type === 'pure' && pureContainerStylish, css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n max-width: 100vw;\n padding: 12px 16px;\n\n time {\n display: inline-block;\n white-space: nowrap;\n }\n\n div[role='chat-item-actions'] {\n display: flex;\n }\n\n time,\n div[role='chat-item-actions'] {\n pointer-events: none;\n opacity: 0;\n transition: opacity 200ms ", ";\n }\n\n &:hover {\n time,\n div[role='chat-item-actions'] {\n pointer-events: unset;\n opacity: 1;\n }\n }\n\n ", " {\n padding: 4px 16px;\n }\n "])), token.motionEaseOut, responsive.mobile)),
@@ -10,7 +10,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
10
10
  var typeStylish = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 8px 12px;\n\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n transition:\n background-color 100ms ", ",\n border-color 200ms ", ";\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n "])), type === 'block' ? token.colorFillTertiary : 'transparent', type === 'block' ? 'transparent' : token.colorBorderSecondary, token.borderRadius, token.motionEaseOut, token.motionEaseOut, type === 'block' ? token.colorFillSecondary : token.colorFillQuaternary, token.colorBorder);
11
11
  return {
12
12
  container: cx(type !== 'pure' && typeStylish, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n width: 100%;\n height: fit-content;\n "])))),
13
- editor: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n resize: ", ";\n height: fit-content;\n min-height: 100%;\n font-family: ", " !important;\n\n textarea {\n min-height: 36px !important;\n }\n\n pre {\n min-height: 36px !important;\n\n text-align: justify;\n word-break: break-all;\n word-wrap: break-word;\n white-space: pre-wrap;\n\n &.shiki {\n margin: 0;\n }\n }\n "])), resize ? 'vertical' : 'none', token.fontFamilyCode),
14
- textarea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n\n height: 100% !important;\n\n color: transparent !important;\n text-align: justify !important;\n word-break: break-all !important;\n word-wrap: break-word !important;\n\n caret-color: ", ";\n\n -webkit-text-fill-color: unset !important;\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n }\n "])), token.colorText, token.colorTextQuaternary)
13
+ editor: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n resize: ", ";\n height: fit-content;\n min-height: 100%;\n font-family: ", " !important;\n\n textarea {\n min-height: 36px !important;\n }\n\n pre {\n min-height: 36px !important;\n word-break: break-all;\n word-wrap: break-word;\n white-space: pre-wrap;\n\n &.shiki {\n margin: 0;\n }\n }\n "])), resize ? 'vertical' : 'none', token.fontFamilyCode),
14
+ textarea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n\n height: 100% !important;\n\n color: transparent !important;\n word-break: break-all !important;\n word-wrap: break-word !important;\n\n caret-color: ", ";\n\n -webkit-text-fill-color: unset !important;\n\n &::placeholder {\n color: ", ";\n }\n\n &:focus {\n border: none !important;\n outline: none !important;\n box-shadow: none !important;\n }\n "])), token.colorText, token.colorTextQuaternary)
15
15
  };
16
16
  });
@@ -5,8 +5,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  import { Icon } from "../..";
7
7
  import { Collapse } from 'antd';
8
+ import { useResponsive } from 'antd-style';
8
9
  import { ChevronDown } from 'lucide-react';
9
10
  import { memo } from 'react';
11
+ import { Flexbox } from 'react-layout-kit';
10
12
  import { useStyles } from "./style";
11
13
  import { jsx as _jsx } from "react/jsx-runtime";
12
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -17,9 +19,29 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
17
19
  children = _ref.children,
18
20
  extra = _ref.extra,
19
21
  props = _objectWithoutProperties(_ref, _excluded);
22
+ var _useResponsive = useResponsive(),
23
+ mobile = _useResponsive.mobile;
20
24
  var _useStyles = useStyles(),
21
25
  cx = _useStyles.cx,
22
26
  styles = _useStyles.styles;
27
+ var titleContent = /*#__PURE__*/_jsxs("div", {
28
+ className: styles.title,
29
+ children: [icon && /*#__PURE__*/_jsx(Icon, {
30
+ icon: icon
31
+ }), title]
32
+ });
33
+ if (mobile) return /*#__PURE__*/_jsxs(Flexbox, {
34
+ className: className,
35
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
36
+ className: styles.mobileGroupHeader,
37
+ horizontal: true,
38
+ justify: 'space-between',
39
+ children: [titleContent, extra]
40
+ }), /*#__PURE__*/_jsx("div", {
41
+ className: styles.mobileGroupBody,
42
+ children: children
43
+ })]
44
+ });
23
45
  return /*#__PURE__*/_jsx(Collapse, _objectSpread({
24
46
  className: cx(styles.group, className),
25
47
  defaultActiveKey: [1],
@@ -40,12 +62,7 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
40
62
  children: children,
41
63
  extra: extra,
42
64
  key: 1,
43
- label: /*#__PURE__*/_jsxs("div", {
44
- className: styles.title,
45
- children: [icon && /*#__PURE__*/_jsx(Icon, {
46
- icon: icon
47
- }), title]
48
- })
65
+ label: titleContent
49
66
  }]
50
67
  }, props), 1);
51
68
  });
@@ -27,7 +27,7 @@ var FormItem = /*#__PURE__*/memo(function (_ref) {
27
27
  styles = _useStyles.styles;
28
28
  return /*#__PURE__*/_jsxs(_Fragment, {
29
29
  children: [divider && /*#__PURE__*/_jsx(FormDivider, {}), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({
30
- className: cx(styles.item, className),
30
+ className: cx(styles.item, !divider && styles.itemNoDivider, className),
31
31
  label: /*#__PURE__*/_jsx(FormTitle, {
32
32
  avatar: avatar,
33
33
  desc: desc,
@@ -4,5 +4,8 @@ export declare const useStyles: (props?: string | number | undefined) => import(
4
4
  group: string;
5
5
  icon: import("antd-style").SerializedStyles;
6
6
  item: import("antd-style").SerializedStyles;
7
+ itemNoDivider: import("antd-style").SerializedStyles;
8
+ mobileGroupBody: import("antd-style").SerializedStyles;
9
+ mobileGroupHeader: import("antd-style").SerializedStyles;
7
10
  title: import("antd-style").SerializedStyles;
8
11
  }>;
@@ -1,7 +1,8 @@
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, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
3
3
  import { createStyles } from 'antd-style';
4
4
  import { isNumber } from 'lodash-es';
5
+ import { rgba } from 'polished';
5
6
  export var useStyles = createStyles(function (_ref, itemMinWidth) {
6
7
  var css = _ref.css,
7
8
  cx = _ref.cx,
@@ -14,7 +15,10 @@ export var useStyles = createStyles(function (_ref, itemMinWidth) {
14
15
  formTitle: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: column;\n gap: 6px;\n\n text-align: left;\n\n > div {\n font-weight: 500;\n line-height: 1;\n }\n\n > small {\n display: block;\n\n line-height: 1;\n color: ", ";\n word-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .", "-tag {\n font-family: ", ";\n }\n "])), token.colorTextDescription, prefixCls, token.fontFamilyCode),
15
16
  group: cx(isDarkMode && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", "-collapse-content {\n background: transparent;\n }\n\n .", "-collapse-header {\n background: ", ";\n }\n "])), prefixCls, prefixCls, token.colorFillTertiary), css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .", "-collapse-header {\n align-items: center !important;\n border-radius: 0 !important;\n }\n\n .", "-collapse-content-box {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .", "-form-item-label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n "])), prefixCls, prefixCls, prefixCls)),
16
17
  icon: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n transition: all 100ms ", ";\n "])), token.motionEaseOut),
17
- item: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 8px 0;\n\n .", "-row {\n justify-content: space-between;\n\n > div {\n flex: unset !important;\n flex-grow: unset !important;\n }\n }\n\n .", "-form-item-required::before {\n align-self: flex-start;\n }\n\n ", "\n\n ", " {\n padding: 16px 0;\n\n .", "-row {\n flex-direction: column;\n gap: 4px;\n }\n\n .", "-form-item-control {\n flex: 1;\n width: 100%;\n }\n }\n "])), prefixCls, prefixCls, itemMinWidth && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", "-form-item-control {\n width: ", ";\n }\n "])), prefixCls, isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth), responsive.mobile, prefixCls, prefixCls),
18
- title: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n align-items: center;\n\n font-size: 16px;\n font-weight: 600;\n\n .anticon {\n color: ", ";\n }\n "])), token.colorPrimary)
18
+ item: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 16px 0;\n\n .", "-row {\n justify-content: space-between;\n\n > div {\n flex: unset !important;\n flex-grow: unset !important;\n }\n }\n\n .", "-form-item-required::before {\n align-self: flex-start;\n }\n\n ", "\n\n ", " {\n padding: 16px 0;\n\n ", "\n }\n "])), prefixCls, prefixCls, itemMinWidth && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", "-form-item-control {\n width: ", ";\n }\n "])), prefixCls, isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth), responsive.mobile, itemMinWidth ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n .", "-row {\n flex-direction: column;\n gap: 4px;\n }\n\n .", "-form-item-control {\n flex: 1;\n width: 100%;\n }\n "])), prefixCls, prefixCls) : css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n .", "-row {\n flex-wrap: wrap;\n gap: 4px;\n }\n "])), prefixCls)),
19
+ itemNoDivider: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n &:not(:first-child) {\n padding-top: 0;\n }\n "]))),
20
+ mobileGroupBody: css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n padding: 0 16px;\n background: ", ";\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n "])), token.colorFillQuaternary, rgba(token.colorBorderSecondary, 0.5), rgba(token.colorBorderSecondary, 0.5)),
21
+ mobileGroupHeader: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n padding: 16px;\n "]))),
22
+ title: css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n align-items: center;\n\n font-size: 16px;\n font-weight: 600;\n\n .anticon {\n color: ", ";\n }\n\n ", " {\n font-size: 14px;\n font-weight: 400;\n opacity: 0.5;\n }\n "])), token.colorPrimary, responsive.mobile)
19
23
  };
20
24
  });
@@ -10,7 +10,7 @@ export var useStyles = createStyles(function (_ref) {
10
10
  isDarkMode = _ref.isDarkMode;
11
11
  return {
12
12
  active: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorPrimary),
13
- container: cx(stylish.blur, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n flex: none;\n width: 100vw;\n background: ", ";\n "])), rgba(isDarkMode ? token.colorBgLayout : token.colorBgContainer, 0.5))),
13
+ container: cx(stylish.blur, css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n flex: none;\n\n width: 100vw;\n padding-bottom: 12px;\n\n background: ", ";\n "])), rgba(isDarkMode ? token.colorBgLayout : token.colorBgContainer, 0.5))),
14
14
  icon: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 24px;\n height: 24px;\n font-size: 24px;\n "]))),
15
15
  inner: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n height: 48px;\n "]))),
16
16
  tab: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n width: 48px;\n height: 48px;\n color: ", ";\n "])), token.colorTextSecondary),
package/es/Modal/index.js CHANGED
@@ -1,17 +1,20 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
- var _excluded = ["children", "title", "className", "wrapClassName", "width"];
4
+ var _excluded = ["children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose"];
5
5
  var _templateObject, _templateObject2;
6
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
- import { Modal as AntModal, ConfigProvider } from 'antd';
9
- import { createStyles } from 'antd-style';
8
+ import { Modal as AntModal } from 'antd';
9
+ import { Drawer } from 'antd';
10
+ import { createStyles, useResponsive } from 'antd-style';
10
11
  import { X } from 'lucide-react';
11
- import { lighten } from 'polished';
12
12
  import { memo } from 'react';
13
+ import ActionIcon from "../ActionIcon";
13
14
  import Icon from "../Icon";
15
+ import MobileSafeArea from "../MobileSafeArea";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
18
  var useStyles = createStyles(function (_ref) {
16
19
  var css = _ref.css,
17
20
  token = _ref.token,
@@ -28,34 +31,62 @@ var Modal = /*#__PURE__*/memo(function (_ref2) {
28
31
  wrapClassName = _ref2.wrapClassName,
29
32
  _ref2$width = _ref2.width,
30
33
  width = _ref2$width === void 0 ? 700 : _ref2$width,
34
+ onCancel = _ref2.onCancel,
35
+ open = _ref2.open,
36
+ destroyOnClose = _ref2.destroyOnClose,
31
37
  props = _objectWithoutProperties(_ref2, _excluded);
38
+ var _useResponsive = useResponsive(),
39
+ mobile = _useResponsive.mobile;
32
40
  var _useStyles = useStyles(),
33
41
  styles = _useStyles.styles,
34
42
  cx = _useStyles.cx,
35
43
  theme = _useStyles.theme;
36
- return /*#__PURE__*/_jsx(ConfigProvider, {
37
- theme: {
38
- token: {
39
- colorBgElevated: lighten(0.005, theme.colorBgContainer)
44
+ if (mobile) return /*#__PURE__*/_jsxs(Drawer, {
45
+ bodyStyle: {
46
+ padding: 0
47
+ },
48
+ closeIcon: /*#__PURE__*/_jsx(ActionIcon, {
49
+ icon: X,
50
+ size: {
51
+ blockSize: 32,
52
+ fontSize: 20
40
53
  }
54
+ }),
55
+ destroyOnClose: destroyOnClose,
56
+ drawerStyle: {
57
+ background: theme.colorBgContainer
58
+ },
59
+ headerStyle: {
60
+ padding: '8px 4px'
41
61
  },
42
- children: /*#__PURE__*/_jsx(AntModal, _objectSpread(_objectSpread({
43
- centered: true,
44
- className: cx(styles.content, className),
45
- closable: true,
46
- closeIcon: /*#__PURE__*/_jsx(Icon, {
47
- icon: X,
48
- size: {
49
- fontSize: 20
50
- }
51
- }),
52
- maskClosable: true,
53
- title: title,
54
- width: width,
55
- wrapClassName: cx(styles.wrap, wrapClassName)
56
- }, props), {}, {
57
- children: children
58
- }))
62
+ height: '75vh',
63
+ maskClassName: cx(styles.wrap, wrapClassName),
64
+ onClose: onCancel,
65
+ open: open,
66
+ placement: 'bottom',
67
+ title: title,
68
+ children: [children, /*#__PURE__*/_jsx(MobileSafeArea, {
69
+ position: 'bottom'
70
+ })]
59
71
  });
72
+ return /*#__PURE__*/_jsx(AntModal, _objectSpread(_objectSpread({
73
+ className: cx(styles.content, className),
74
+ closable: true,
75
+ closeIcon: /*#__PURE__*/_jsx(Icon, {
76
+ icon: X,
77
+ size: {
78
+ fontSize: 20
79
+ }
80
+ }),
81
+ destroyOnClose: destroyOnClose,
82
+ maskClosable: true,
83
+ onCancel: onCancel,
84
+ open: open,
85
+ title: title,
86
+ width: width,
87
+ wrapClassName: cx(styles.wrap, wrapClassName)
88
+ }, props), {}, {
89
+ children: children
90
+ }));
60
91
  });
61
92
  export default Modal;
@@ -2,5 +2,5 @@ export declare const useStyles: (props?: unknown) => import("antd-style").Return
2
2
  icon: import("antd-style").SerializedStyles;
3
3
  input: import("antd-style").SerializedStyles;
4
4
  search: import("antd-style").SerializedStyles;
5
- tag: import("antd-style").SerializedStyles;
5
+ tag: string;
6
6
  }>;
@@ -3,11 +3,13 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
5
  var css = _ref.css,
6
- token = _ref.token;
6
+ token = _ref.token,
7
+ stylish = _ref.stylish,
8
+ cx = _ref.cx;
7
9
  return {
8
10
  icon: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextPlaceholder),
9
11
  input: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n padding: 0 8px 0 12px;\n "]))),
10
12
  search: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n max-width: 100%;\n "]))),
11
- tag: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 5;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n\n color: ", ";\n "])), token.colorTextDescription)
13
+ tag: cx(stylish.blur, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: none;\n\n position: absolute;\n z-index: 5;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n\n color: ", ";\n "])), token.colorTextDescription))
12
14
  };
13
15
  });
@@ -3,5 +3,5 @@ var _templateObject;
3
3
  import { css } from 'antd-style';
4
4
  import { readableColor } from 'polished';
5
5
  export default (function (token) {
6
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-btn-primary {\n color: ", " !important;\n }\n\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", " !important;\n\n background-color: ", " !important;\n border-radius: ", "px !important;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", " !important;\n }\n }\n\n .", "-switch-handle::before {\n background: ", " !important;\n }\n"])), token.prefixCls, readableColor(token.colorPrimary), token.prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, token.prefixCls, token.colorText, token.prefixCls, token.colorBgContainer);
6
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", "-btn {\n box-shadow: none;\n }\n\n .", "-btn-primary {\n color: ", " !important;\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n }\n\n .", "-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", " !important;\n\n background-color: ", " !important;\n border-radius: ", "px !important;\n }\n\n .", "-tooltip-arrow {\n &::before,\n &::after {\n background: ", " !important;\n }\n }\n\n .", "-switch-handle::before {\n background: ", " !important;\n }\n\n .", "-alert {\n span[role='img'] {\n align-self: flex-start;\n width: 16px;\n height: 16px;\n margin-top: 3px;\n }\n\n .", "-alert-description {\n word-break: break-all;\n word-wrap: break-word;\n }\n\n &.", "-alert-with-description {\n padding-block: 12px;\n padding-inline: 12px;\n\n .", "-alert-message {\n font-size: 14px;\n font-weight: 600;\n word-break: break-all;\n word-wrap: break-word;\n }\n }\n }\n\n @media (max-width: 575px) {\n .", "-tooltip {\n display: none !important;\n }\n }\n"])), token.prefixCls, token.prefixCls, readableColor(token.colorPrimary), readableColor(token.colorPrimary), readableColor(token.colorPrimaryActive), token.prefixCls, token.colorBgLayout, token.colorText, token.borderRadiusSM, token.prefixCls, token.colorText, token.prefixCls, token.colorBgContainer, token.prefixCls, token.prefixCls, token.prefixCls, token.prefixCls, token.prefixCls);
7
7
  });
@@ -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: 100vh;\n }\n\n #root {\n min-height: 100vh;\n }\n\n code {\n font-family: ", " !important;\n\n span {\n font-family: ", " !important;\n }\n }\n\n p {\n text-align: justify;\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);
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: 100vh;\n }\n\n #root {\n min-height: 100vh;\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
  });
@@ -13,7 +13,7 @@ export var generateCustomStylish = function generateCustomStylish(_ref) {
13
13
  blurStrong: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n backdrop-filter: blur(36px);\n "]))),
14
14
  bottomScrollbar: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: 0;\n height: 4px;\n background-color: transparent;\n\n &-thumb {\n background-color: ", ";\n border-radius: 4px;\n transition: background-color 500ms ", ";\n }\n\n &-corner {\n display: none;\n width: 0;\n height: 0;\n }\n }\n "])), token.colorFill, token.motionEaseOut),
15
15
  gradientAnimation: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n -45deg,\n ", ",\n ", ",\n ", ",\n ", "\n );\n background-size: 400% 400%;\n border-radius: inherit;\n animation: 5s ", " 5s ease infinite;\n "])), token.gold, token.magenta, token.geekblue, token.cyan, gradient),
16
- markdown: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin-block-start: 0;\n margin-block-end: 0;\n\n font-size: 14px;\n line-height: 1.8;\n color: ", ";\n text-align: justify;\n word-break: break-all;\n word-wrap: break-word;\n\n + * {\n margin-block-end: 0.5em;\n }\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n p:not(:last-child) {\n margin-bottom: 1em;\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n pre,\n [data-code-type='highlighter'] {\n border: none;\n border-radius: ", "px;\n\n > code {\n padding: 0 !important;\n border: none !important;\n }\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ", "px;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0;\n margin-inline-end: 0;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n\n code {\n display: inline-flex;\n }\n }\n\n th,\n td {\n padding-block-start: 10px;\n padding-block-end: 10px;\n padding-inline-start: 16px;\n padding-inline-end: 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n > ol > li::marker {\n color: ", " !important;\n }\n\n > ul > li {\n line-height: 1.8;\n list-style-type: disc;\n &::marker {\n color: ", " !important;\n }\n }\n\n ol,\n ul {\n > li::marker {\n color: ", ";\n }\n }\n\n details {\n margin-bottom: 1em;\n padding: 12px 16px;\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n transition: all 400ms ", ";\n }\n\n details[open] {\n summary {\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n }\n }\n "])), token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, cyanColor, cyanBackground, isDarkMode ? token.cyan1A : token.cyan6A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan9A : token.cyan10A, token.colorTextDescription, token.colorFillTertiary, token.colorBorderSecondary, token.borderRadiusLG, token.motionEaseOut, token.colorBorder),
16
+ markdown: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n\n h1,\n h2,\n h3,\n h4,\n h5 {\n font-weight: 600;\n }\n\n p {\n margin-block-start: 0;\n margin-block-end: 0;\n\n font-size: 14px;\n line-height: 1.8;\n color: ", ";\n word-break: break-all;\n word-wrap: break-word;\n\n + * {\n margin-block-end: 0.5em;\n }\n }\n\n > *:last-child {\n margin-bottom: 0 !important;\n }\n\n blockquote {\n margin: 16px 0;\n padding: 0 12px;\n\n p {\n font-style: italic;\n color: ", ";\n }\n }\n\n p:not(:last-child) {\n margin-bottom: 1em;\n }\n\n a {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n }\n\n img {\n max-width: 100%;\n }\n\n pre,\n [data-code-type='highlighter'] {\n border: none;\n border-radius: ", "px;\n\n > code {\n padding: 0 !important;\n border: none !important;\n }\n }\n\n > :not([data-code-type='highlighter']) code {\n padding: 2px 6px;\n\n font-size: ", "px;\n color: ", ";\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n }\n\n table {\n border-spacing: 0;\n\n width: 100%;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0;\n margin-inline-end: 0;\n padding: 8px;\n\n border: 1px solid ", ";\n border-radius: ", "px;\n\n code {\n display: inline-flex;\n }\n }\n\n th,\n td {\n padding-block-start: 10px;\n padding-block-end: 10px;\n padding-inline-start: 16px;\n padding-inline-end: 16px;\n }\n\n thead {\n tr {\n th {\n background: ", ";\n\n &:first-child {\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n }\n\n &:last-child {\n border-top-right-radius: ", "px;\n border-bottom-right-radius: ", "px;\n }\n }\n }\n }\n\n > ol > li::marker {\n color: ", " !important;\n }\n\n > ul > li {\n line-height: 1.8;\n list-style-type: disc;\n\n &::marker {\n color: ", " !important;\n }\n }\n\n ol,\n ul {\n > li::marker {\n color: ", ";\n }\n }\n\n details {\n margin-bottom: 1em;\n padding: 12px 16px;\n\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n\n transition: all 400ms ", ";\n }\n\n details[open] {\n summary {\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n }\n }\n "])), token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, cyanColor, cyanBackground, isDarkMode ? token.cyan1A : token.cyan6A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan9A : token.cyan10A, token.colorTextDescription, token.colorFillTertiary, token.colorBorderSecondary, token.borderRadiusLG, token.motionEaseOut, token.colorBorder),
17
17
  noScrollbar: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n background-color: transparent;\n }\n "]))),
18
18
  resetLinkColor: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n "])), token.colorTextSecondary, token.colorText)
19
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.98.4",
3
+ "version": "1.99.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",