@lobehub/ui 1.87.0 → 1.87.2

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.
@@ -13,7 +13,7 @@ export var useStyles = createStyles(function (_ref, itemMinWidth) {
13
13
  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 .ant-tag {\n font-family: ", ";\n }\n "])), token.colorTextDescription, token.fontFamilyCode),
14
14
  group: cx(isDarkMode && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ant-collapse-content {\n background: transparent;\n }\n\n .ant-collapse-header {\n background: ", ";\n }\n "])), token.colorFillTertiary), css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ant-collapse-header {\n align-items: center !important;\n border-radius: 0 !important;\n }\n\n .ant-collapse-content-box {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .ant-form-item-label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n "])))),
15
15
  icon: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n transition: all 100ms ", ";\n "])), token.motionEaseOut),
16
- item: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 8px 0;\n\n .ant-row {\n justify-content: space-between;\n\n > div {\n flex: unset !important;\n flex-grow: unset !important;\n }\n }\n\n ", "\n\n ", " {\n padding: 16px 0;\n\n .ant-row {\n flex-direction: column;\n gap: 4px;\n }\n\n .ant-form-item-control {\n flex: 1;\n width: 100%;\n }\n }\n "])), itemMinWidth && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ant-form-item-control {\n width: ", ";\n }\n "])), isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth), responsive.mobile),
16
+ item: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: 8px 0;\n\n .ant-row {\n justify-content: space-between;\n\n > div {\n flex: unset !important;\n flex-grow: unset !important;\n }\n }\n\n .ant-form-item-required::before {\n align-self: flex-start;\n }\n\n ", "\n\n ", " {\n padding: 16px 0;\n\n .ant-row {\n flex-direction: column;\n gap: 4px;\n }\n\n .ant-form-item-control {\n flex: 1;\n width: 100%;\n }\n }\n "])), itemMinWidth && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ant-form-item-control {\n width: ", ";\n }\n "])), isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth), responsive.mobile),
17
17
  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
18
  };
19
19
  });
@@ -67,6 +67,7 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
67
67
  children: (text === null || text === void 0 ? void 0 : text.title) || 'Prompt'
68
68
  }),
69
69
  width: 800,
70
+ wrapClassName: styles.root,
70
71
  children: isEdit ? /*#__PURE__*/_jsx(MessageInput, {
71
72
  defaultValue: value,
72
73
  height: height,
@@ -1,4 +1,5 @@
1
1
  export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
2
  body: import("antd-style").SerializedStyles;
3
3
  modal: import("antd-style").SerializedStyles;
4
+ root: import("antd-style").SerializedStyles;
4
5
  }>;
@@ -1,11 +1,12 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
2
+ var _templateObject, _templateObject2, _templateObject3;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
5
  var css = _ref.css,
6
6
  prefixCls = _ref.prefixCls;
7
7
  return {
8
8
  body: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n overflow-y: auto;\n max-height: 70vh;\n "]))),
9
- modal: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-modal-content {\n padding: 16px;\n }\n .", "-modal-header {\n margin-bottom: 16px;\n }\n "])), prefixCls, prefixCls)
9
+ modal: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", "-modal-content {\n padding: 16px;\n }\n .", "-modal-header {\n margin-bottom: 16px;\n }\n "])), prefixCls, prefixCls),
10
+ root: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n backdrop-filter: blur(2px);\n "])))
10
11
  };
11
12
  });
@@ -2,20 +2,17 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  var _excluded = ["spotlight", "className", "value", "onChange", "placeholder", "enableShortKey", "shortKey"];
5
- var _navigator;
6
5
  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
6
  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 { Tag } from 'antd';
9
7
  import { Search } from 'lucide-react';
10
8
  import { memo, useEffect, useRef, useState } from 'react';
11
9
  import Icon from "../Icon";
12
10
  import { Input } from "../Input";
13
11
  import Spotlight from "../Spotlight";
12
+ import Tag from "../Tag";
14
13
  import { useStyles } from "./style";
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
16
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
- var isAppleDevice = /(mac|iphone|ipod|ipad)/i.test(typeof navigator === 'undefined' ? '' : (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.platform);
18
- var symbol = isAppleDevice ? '⌘' : 'Ctrl';
19
16
  var SearchBar = /*#__PURE__*/memo(function (_ref) {
20
17
  var spotlight = _ref.spotlight,
21
18
  className = _ref.className,
@@ -26,20 +23,29 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
26
23
  _ref$shortKey = _ref.shortKey,
27
24
  shortKey = _ref$shortKey === void 0 ? 'f' : _ref$shortKey,
28
25
  properties = _objectWithoutProperties(_ref, _excluded);
29
- var _useState = useState(true),
26
+ var _useState = useState('Ctrl'),
30
27
  _useState2 = _slicedToArray(_useState, 2),
31
- showTag = _useState2[0],
32
- setShowTag = _useState2[1];
33
- var _useState3 = useState(value),
28
+ symbol = _useState2[0],
29
+ setSymbol = _useState2[1];
30
+ var _useState3 = useState(true),
34
31
  _useState4 = _slicedToArray(_useState3, 2),
35
- inputValue = _useState4[0],
36
- setInputValue = _useState4[1];
32
+ showTag = _useState4[0],
33
+ setShowTag = _useState4[1];
34
+ var _useState5 = useState(value),
35
+ _useState6 = _slicedToArray(_useState5, 2),
36
+ inputValue = _useState6[0],
37
+ setInputValue = _useState6[1];
37
38
  var _useStyles = useStyles(),
38
39
  styles = _useStyles.styles,
39
40
  cx = _useStyles.cx;
40
41
  var inputReference = useRef();
41
42
  useEffect(function () {
43
+ var _navigator;
42
44
  if (!enableShortKey) return;
45
+ var isAppleDevice = /(mac|iphone|ipod|ipad)/i.test(typeof navigator === 'undefined' ? '' : (_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.platform);
46
+ if (isAppleDevice) {
47
+ setSymbol('⌘');
48
+ }
43
49
  var handler = function handler(event_) {
44
50
  if ((isAppleDevice ? event_.metaKey : event_.ctrlKey) && event_.key === shortKey) {
45
51
  var _inputReference$curre;
@@ -8,6 +8,6 @@ export var useStyles = createStyles(function (_ref) {
8
8
  icon: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorTextPlaceholder),
9
9
  input: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n padding: 0 8px 0 12px;\n "]))),
10
10
  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 background: ", ";\n "])), token.colorBgContainer)
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)
12
12
  };
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.87.0",
3
+ "version": "1.87.2",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",