@lobehub/ui 1.72.7 → 1.73.0

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.
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ChatHeaderTitleProps {
3
+ desc?: string | ReactNode;
4
+ tag?: ReactNode;
5
+ title: string | ReactNode;
6
+ }
7
+ declare const ChatHeaderTitle: import("react").NamedExoticComponent<ChatHeaderTitleProps>;
8
+ export default ChatHeaderTitle;
@@ -0,0 +1,65 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
3
+ import { createStyles } from 'antd-style';
4
+ import { memo } from 'react';
5
+ import { Flexbox } from 'react-layout-kit';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ var useStyles = createStyles(function (_ref) {
9
+ var css = _ref.css,
10
+ token = _ref.token;
11
+ return {
12
+ container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n flex: 1;\n max-width: 100%;\n "]))),
13
+ desc: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n width: 100%;\n\n font-size: 12px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n "])), token.colorTextTertiary),
14
+ tag: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: none;\n "]))),
15
+ title: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n overflow: hidden;\n\n font-size: 16px;\n font-weight: bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]))),
16
+ titleContainer: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 1;\n "]))),
17
+ titleWithDesc: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n font-weight: bold;\n text-overflow: ellipsis;\n white-space: nowrap;\n "])))
18
+ };
19
+ });
20
+ var ChatHeaderTitle = /*#__PURE__*/memo(function (_ref2) {
21
+ var title = _ref2.title,
22
+ desc = _ref2.desc,
23
+ tag = _ref2.tag;
24
+ var _useStyles = useStyles(),
25
+ styles = _useStyles.styles;
26
+ if (desc) return /*#__PURE__*/_jsxs(Flexbox, {
27
+ className: styles.container,
28
+ children: [/*#__PURE__*/_jsxs(Flexbox, {
29
+ align: 'center',
30
+ className: styles.titleContainer,
31
+ gap: 8,
32
+ horizontal: true,
33
+ children: [/*#__PURE__*/_jsx("div", {
34
+ className: styles.titleWithDesc,
35
+ children: title
36
+ }), /*#__PURE__*/_jsx(Flexbox, {
37
+ className: styles.tag,
38
+ horizontal: true,
39
+ children: tag
40
+ })]
41
+ }), /*#__PURE__*/_jsx(Flexbox, {
42
+ align: 'center',
43
+ horizontal: true,
44
+ children: /*#__PURE__*/_jsx("div", {
45
+ className: styles.desc,
46
+ children: desc
47
+ })
48
+ })]
49
+ });
50
+ return /*#__PURE__*/_jsxs(Flexbox, {
51
+ align: 'center',
52
+ className: styles.container,
53
+ gap: 8,
54
+ horizontal: true,
55
+ children: [/*#__PURE__*/_jsx("div", {
56
+ className: styles.title,
57
+ children: title
58
+ }), /*#__PURE__*/_jsx(Flexbox, {
59
+ className: styles.tag,
60
+ horizontal: true,
61
+ children: tag
62
+ })]
63
+ });
64
+ });
65
+ export default ChatHeaderTitle;
@@ -30,8 +30,7 @@ var ChatInputArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
30
30
  onSend = _ref.onSend,
31
31
  _ref$defaultValue = _ref.defaultValue,
32
32
  defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
33
- _ref$loading = _ref.loading,
34
- loading = _ref$loading === void 0 ? false : _ref$loading,
33
+ loading = _ref.loading,
35
34
  disabled = _ref.disabled,
36
35
  onInputChange = _ref.onInputChange,
37
36
  _onPressEnter = _ref.onPressEnter,
@@ -22,7 +22,8 @@ export interface EditableMessageProps {
22
22
  * @default false
23
23
  */
24
24
  editing?: boolean;
25
- height?: number;
25
+ height?: MessageInputProps['height'];
26
+ inputType?: MessageInputProps['type'];
26
27
  /**
27
28
  * @title Callback function when the value changes
28
29
  * @param value - The new value
@@ -25,6 +25,7 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
25
25
  showEditWhenEmpty = _ref$showEditWhenEmpt === void 0 ? false : _ref$showEditWhenEmpt,
26
26
  styles = _ref.styles,
27
27
  height = _ref.height,
28
+ inputType = _ref.inputType,
28
29
  editButtonSize = _ref.editButtonSize,
29
30
  text = _ref.text;
30
31
  var _useControlledState = useControlledState(false, {
@@ -41,6 +42,7 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
41
42
  _useControlledState4 = _slicedToArray(_useControlledState3, 2),
42
43
  expand = _useControlledState4[0],
43
44
  setExpand = _useControlledState4[1];
45
+ var isAutoSize = height === 'auto';
44
46
  var input = /*#__PURE__*/_jsx(MessageInput, {
45
47
  className: classNames === null || classNames === void 0 ? void 0 : classNames.input,
46
48
  classNames: {
@@ -58,20 +60,23 @@ var EditableMessage = /*#__PURE__*/memo(function (_ref) {
58
60
  },
59
61
  placeholder: placeholder,
60
62
  style: styles === null || styles === void 0 ? void 0 : styles.input,
61
- text: text
63
+ text: text,
64
+ textareaClassname: classNames === null || classNames === void 0 ? void 0 : classNames.input,
65
+ type: inputType
62
66
  });
63
67
  if (!value && showEditWhenEmpty) return input;
64
68
  return /*#__PURE__*/_jsxs(_Fragment, {
65
69
  children: [!expand && isEdit ? input : /*#__PURE__*/_jsx(Markdown, {
66
70
  className: classNames === null || classNames === void 0 ? void 0 : classNames.markdown,
67
71
  style: _objectSpread({
68
- height: height,
72
+ height: isAutoSize ? 'unset' : height,
69
73
  overflowX: 'hidden',
70
74
  overflowY: 'auto'
71
75
  }, styles === null || styles === void 0 ? void 0 : styles.markdown),
72
76
  children: value || placeholder
73
77
  }), /*#__PURE__*/_jsx(MessageModal, {
74
78
  editing: isEdit,
79
+ height: height,
75
80
  onChange: function onChange(text) {
76
81
  return _onChange === null || _onChange === void 0 ? void 0 : _onChange(text);
77
82
  },
@@ -1,6 +1,6 @@
1
- import { Tag } from 'antd';
2
1
  import { memo } from 'react';
3
2
  import { Flexbox } from 'react-layout-kit';
3
+ import Tag from "../../Tag";
4
4
  import { useStyles } from "./style";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -0,0 +1,3 @@
1
+ import { type LucideIcon } from 'lucide-react';
2
+ declare const _default: LucideIcon;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ 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; }
3
+ 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; }
4
+ import { createLucideIcon } from 'lucide-react';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ var Discord = createLucideIcon('Discord', [['path', {
7
+ d: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
8
+ key: '18tl5t'
9
+ }]]);
10
+ var DiscordIcon = function DiscordIcon(props) {
11
+ return /*#__PURE__*/_jsx(Discord, _objectSpread({
12
+ style: {
13
+ overflow: 'visible'
14
+ }
15
+ }, props));
16
+ };
17
+ export default DiscordIcon;
@@ -0,0 +1 @@
1
+ export { default as DiscordIcon } from './DiscordIcon';
@@ -0,0 +1 @@
1
+ export { default as DiscordIcon } from "./DiscordIcon";
@@ -22,7 +22,14 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
22
22
  a: Typography.Link,
23
23
  code: Code,
24
24
  details: Collapse,
25
- hr: Divider,
25
+ hr: function hr() {
26
+ return /*#__PURE__*/_jsx(Divider, {
27
+ style: {
28
+ marginBottom: '1em',
29
+ marginTop: 0
30
+ }
31
+ });
32
+ },
26
33
  pre: CodeBlock
27
34
  };
28
35
  return /*#__PURE__*/_jsx(Typography, {
@@ -13,7 +13,7 @@ export interface MessageInputProps extends DivProps {
13
13
  */
14
14
  defaultValue?: string;
15
15
  editButtonSize?: ButtonProps['size'];
16
- height?: number | string;
16
+ height?: number | 'auto' | string;
17
17
  /**
18
18
  * @description Callback function triggered when user clicks on the cancel button.
19
19
  */
@@ -1,7 +1,7 @@
1
1
  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
- var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "style", "editButtonSize", "classNames"];
4
+ var _excluded = ["text", "type", "onCancel", "defaultValue", "onConfirm", "renderButtons", "textareaStyle", "textareaClassname", "placeholder", "height", "style", "editButtonSize", "classNames"];
5
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; }
6
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; }
7
7
  import { Button } from 'antd';
@@ -24,6 +24,8 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
24
24
  textareaClassname = _ref.textareaClassname,
25
25
  _ref$placeholder = _ref.placeholder,
26
26
  placeholder = _ref$placeholder === void 0 ? 'Type something...' : _ref$placeholder,
27
+ _ref$height = _ref.height,
28
+ height = _ref$height === void 0 ? 'auto' : _ref$height,
27
29
  style = _ref.style,
28
30
  _ref$editButtonSize = _ref.editButtonSize,
29
31
  editButtonSize = _ref$editButtonSize === void 0 ? 'middle' : _ref$editButtonSize,
@@ -36,6 +38,7 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
36
38
  var _useStyles = useStyles(),
37
39
  cx = _useStyles.cx,
38
40
  styles = _useStyles.styles;
41
+ var isAutoSize = height === 'auto';
39
42
  return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
40
43
  gap: 16,
41
44
  style: _objectSpread({
@@ -44,7 +47,7 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
44
47
  }, style)
45
48
  }, props), {}, {
46
49
  children: [/*#__PURE__*/_jsx(TextArea, {
47
- autoSize: true,
50
+ autoSize: isAutoSize,
48
51
  className: cx(styles, textareaClassname),
49
52
  classNames: classNames,
50
53
  onBlur: function onBlur(e) {
@@ -55,7 +58,10 @@ var MessageInput = /*#__PURE__*/memo(function (_ref) {
55
58
  },
56
59
  placeholder: placeholder,
57
60
  resize: false,
58
- style: textareaStyle,
61
+ style: _objectSpread({
62
+ height: isAutoSize ? 'unset' : height,
63
+ minHeight: '100%'
64
+ }, textareaStyle),
59
65
  type: type,
60
66
  value: temporarySystemRole
61
67
  }), /*#__PURE__*/_jsx(Flexbox, {
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject;
3
3
  import { createStyles } from 'antd-style';
4
4
  export var useStyles = createStyles(function (_ref) {
5
- var css = _ref.css;
6
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n height: 100%;\n font-size: 14px;\n line-height: 1.8;\n "])));
5
+ var css = _ref.css,
6
+ token = _ref.token;
7
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n\n height: 100%;\n\n font-family: ", ";\n font-size: 13px;\n line-height: 1.8;\n "])), token.fontFamilyCode);
7
8
  });
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
+ import { type MessageInputProps } from "../MessageInput";
2
3
  export interface MessageModalProps {
3
4
  /**
4
5
  * @description Whether the message is being edited or not
5
6
  * @default false
6
7
  */
7
8
  editing?: boolean;
9
+ height?: MessageInputProps['height'];
8
10
  /**
9
11
  * @description Callback fired when message content is changed
10
12
  */
@@ -1,4 +1,7 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ 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; }
4
+ 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; }
2
5
  import { Modal } from 'antd';
3
6
  import { X } from 'lucide-react';
4
7
  import { memo } from 'react';
@@ -12,6 +15,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
12
15
  var MessageModal = /*#__PURE__*/memo(function (_ref) {
13
16
  var editing = _ref.editing,
14
17
  open = _ref.open,
18
+ _ref$height = _ref.height,
19
+ height = _ref$height === void 0 ? 'auto' : _ref$height,
15
20
  onOpenChange = _ref.onOpenChange,
16
21
  onEditingChange = _ref.onEditingChange,
17
22
  placeholder = _ref.placeholder,
@@ -34,6 +39,12 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
34
39
  _useControlledState4 = _slicedToArray(_useControlledState3, 2),
35
40
  expand = _useControlledState4[0],
36
41
  setExpand = _useControlledState4[1];
42
+ var isAutoSize = height === 'auto';
43
+ var markdownStyle = {
44
+ height: isAutoSize ? 'unset' : height,
45
+ overflowX: 'hidden',
46
+ overflowY: 'auto'
47
+ };
37
48
  return /*#__PURE__*/_jsx(Modal, {
38
49
  cancelText: (text === null || text === void 0 ? void 0 : text.cancel) || 'Cancel',
39
50
  className: styles.modal,
@@ -58,7 +69,7 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
58
69
  width: 800,
59
70
  children: isEdit ? /*#__PURE__*/_jsx(MessageInput, {
60
71
  defaultValue: value,
61
- height: "70vh",
72
+ height: height,
62
73
  onCancel: function onCancel() {
63
74
  return setTyping(false);
64
75
  },
@@ -70,12 +81,13 @@ var MessageModal = /*#__PURE__*/memo(function (_ref) {
70
81
  text: {
71
82
  cancel: text === null || text === void 0 ? void 0 : text.cancel,
72
83
  confirm: text === null || text === void 0 ? void 0 : text.confirm
73
- }
84
+ },
85
+ type: 'block'
74
86
  }) : /*#__PURE__*/_jsx(Markdown, {
75
87
  className: styles.body,
76
- style: value ? {} : {
88
+ style: value ? markdownStyle : _objectSpread(_objectSpread({}, markdownStyle), {}, {
77
89
  opacity: 0.5
78
- },
90
+ }),
79
91
  children: String(value || placeholder)
80
92
  })
81
93
  });
@@ -6,6 +6,6 @@ export var useStyles = createStyles(function (_ref) {
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-header {\n margin-bottom: 24px;\n }\n "])), 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
10
  };
11
11
  });
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { type InputNumberProps } from 'antd';
3
+ import { SliderSingleProps } from 'antd/es/slider';
4
+ export interface SliderWithInputProps extends SliderSingleProps {
5
+ controls?: InputNumberProps['controls'];
6
+ size?: InputNumberProps['size'];
7
+ }
8
+ declare const SliderWithInput: import("react").NamedExoticComponent<SliderWithInputProps>;
9
+ export default SliderWithInput;
@@ -0,0 +1,69 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["step", "value", "onChange", "max", "min", "defaultValue", "size", "controls", "style", "className", "disabled"];
4
+ 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; }
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
+ import { InputNumber, Slider } from 'antd';
7
+ import { isNull } from 'lodash-es';
8
+ import { memo, useCallback } from 'react';
9
+ import { Flexbox } from 'react-layout-kit';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var SliderWithInput = /*#__PURE__*/memo(function (_ref) {
13
+ var step = _ref.step,
14
+ value = _ref.value,
15
+ onChange = _ref.onChange,
16
+ max = _ref.max,
17
+ min = _ref.min,
18
+ defaultValue = _ref.defaultValue,
19
+ size = _ref.size,
20
+ controls = _ref.controls,
21
+ style = _ref.style,
22
+ className = _ref.className,
23
+ disabled = _ref.disabled,
24
+ props = _objectWithoutProperties(_ref, _excluded);
25
+ var handleOnchange = useCallback(function (value) {
26
+ if (Number.isNaN(value) || isNull(value)) return;
27
+ onChange === null || onChange === void 0 ? void 0 : onChange(value);
28
+ }, []);
29
+ return /*#__PURE__*/_jsxs(Flexbox, {
30
+ align: 'center',
31
+ className: className,
32
+ direction: 'horizontal',
33
+ gap: 8,
34
+ style: style,
35
+ children: [/*#__PURE__*/_jsx(Slider, _objectSpread({
36
+ defaultValue: defaultValue,
37
+ disabled: disabled,
38
+ max: max,
39
+ min: min,
40
+ onChange: handleOnchange,
41
+ step: step,
42
+ style: size === 'small' ? {
43
+ flex: 1,
44
+ margin: 0
45
+ } : {
46
+ flex: 1
47
+ },
48
+ tooltip: {
49
+ open: false
50
+ },
51
+ value: typeof value === 'number' ? value : 0
52
+ }, props)), /*#__PURE__*/_jsx(InputNumber, {
53
+ controls: size !== 'small' || controls,
54
+ defaultValue: defaultValue,
55
+ disabled: disabled,
56
+ max: max,
57
+ min: min,
58
+ onChange: handleOnchange,
59
+ size: size,
60
+ step: Number.isNaN(step) || isNull(step) ? undefined : step,
61
+ style: {
62
+ flex: 1,
63
+ maxWidth: size === 'small' ? 40 : 64
64
+ },
65
+ value: typeof value === 'number' ? value : 0
66
+ })]
67
+ });
68
+ });
69
+ export default SliderWithInput;
@@ -0,0 +1,7 @@
1
+ import { type TagProps as AntTagProps } from 'antd';
2
+ import { ReactNode } from 'react';
3
+ export interface TagProps extends AntTagProps {
4
+ icon?: ReactNode;
5
+ }
6
+ declare const Tag: import("react").NamedExoticComponent<TagProps>;
7
+ export default Tag;
@@ -0,0 +1,41 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
4
+ var _excluded = ["icon", "children"];
5
+ var _templateObject, _templateObject2;
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
+ 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 as AntTag } from 'antd';
9
+ import { createStyles } from 'antd-style';
10
+ import { memo } from 'react';
11
+ import { Flexbox } from 'react-layout-kit';
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var useStyles = createStyles(function (_ref) {
15
+ var cx = _ref.cx,
16
+ css = _ref.css,
17
+ token = _ref.token;
18
+ return {
19
+ count: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n height: 20px;\n padding: 0 8px;\n\n font-size: 12px;\n line-height: 1;\n\n background: ", ";\n border: ", "px;\n "])), token.colorFillTertiary, token.borderRadius),
20
+ tag: cx(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", " !important;\n background: ", ";\n border: ", "px;\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n "])), token.colorTextSecondary, token.colorFillSecondary, token.borderRadius, token.colorText, token.colorFill))
21
+ };
22
+ });
23
+ var Tag = /*#__PURE__*/memo(function (_ref2) {
24
+ var icon = _ref2.icon,
25
+ children = _ref2.children,
26
+ props = _objectWithoutProperties(_ref2, _excluded);
27
+ var _useStyles = useStyles(),
28
+ styles = _useStyles.styles;
29
+ return /*#__PURE__*/_jsx(AntTag, _objectSpread(_objectSpread({
30
+ bordered: false,
31
+ className: styles.tag
32
+ }, props), {}, {
33
+ children: /*#__PURE__*/_jsxs(Flexbox, {
34
+ align: 'center',
35
+ gap: 4,
36
+ horizontal: true,
37
+ children: [icon, children]
38
+ })
39
+ }));
40
+ });
41
+ export default Tag;
@@ -9,6 +9,7 @@ export interface TokenTagProps extends DivProps {
9
9
  * @description Maximum value for the token
10
10
  */
11
11
  maxValue: number;
12
+ shape?: 'round' | 'square';
12
13
  text?: {
13
14
  overload?: string;
14
15
  remained?: string;
@@ -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 = ["className", "displayMode", "maxValue", "value", "text"];
3
+ var _excluded = ["className", "displayMode", "maxValue", "value", "text", "shape"];
4
4
  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; }
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 { forwardRef } from 'react';
@@ -15,6 +15,8 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
15
15
  maxValue = _ref.maxValue,
16
16
  value = _ref.value,
17
17
  text = _ref.text,
18
+ _ref$shape = _ref.shape,
19
+ shape = _ref$shape === void 0 ? 'round' : _ref$shape,
18
20
  props = _objectWithoutProperties(_ref, _excluded);
19
21
  var valueLeft = maxValue - value;
20
22
  var percent = valueLeft / maxValue;
@@ -30,7 +32,10 @@ var TokenTag = /*#__PURE__*/forwardRef(function (_ref, ref) {
30
32
  type = 'overload';
31
33
  emoji = '🤯';
32
34
  }
33
- var _useStyles = useStyles(type),
35
+ var _useStyles = useStyles({
36
+ shape: shape,
37
+ type: type
38
+ }),
34
39
  styles = _useStyles.styles,
35
40
  cx = _useStyles.cx;
36
41
  return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
@@ -1,4 +1,7 @@
1
1
  export declare const ICON_SIZE = 20;
2
- export declare const useStyles: (props?: "normal" | "low" | "overload" | undefined) => import("antd-style").ReturnStyles<{
2
+ export declare const useStyles: (props?: {
3
+ shape: 'round' | 'square';
4
+ type: 'normal' | 'low' | 'overload';
5
+ } | undefined) => import("antd-style").ReturnStyles<{
3
6
  container: string;
4
7
  }>;
@@ -1,31 +1,35 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
3
3
  import { createStyles } from 'antd-style';
4
4
  var HEIGHT = 28;
5
5
  export var ICON_SIZE = 20;
6
- export var useStyles = createStyles(function (_ref, type) {
6
+ export var useStyles = createStyles(function (_ref, _ref2) {
7
7
  var cx = _ref.cx,
8
8
  css = _ref.css,
9
9
  token = _ref.token;
10
+ var type = _ref2.type,
11
+ shape = _ref2.shape;
10
12
  var percentStyle;
11
13
  switch (type) {
12
14
  case 'normal':
13
15
  {
14
- percentStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorSuccessText);
16
+ percentStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorSuccessText);
15
17
  break;
16
18
  }
17
19
  case 'low':
18
20
  {
19
- percentStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorWarningText);
21
+ percentStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorWarningText);
20
22
  break;
21
23
  }
22
24
  case 'overload':
23
25
  {
24
- percentStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorErrorText);
26
+ percentStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n "])), token.colorErrorText);
25
27
  break;
26
28
  }
27
29
  }
30
+ var roundStylish = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "px 0 ", "px;\n background: ", ";\n border-radius: ", "px;\n "])), (HEIGHT - ICON_SIZE) * 1.2, (HEIGHT - ICON_SIZE) / 2, token.colorFillSecondary, HEIGHT / 2);
31
+ var squareStylish = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n "])), token.borderRadiusSM);
28
32
  return {
29
- container: cx(percentStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n display: flex;\n flex: 0;\n gap: 4px;\n align-items: center;\n\n min-width: fit-content;\n height: ", "px;\n padding: 0 ", "px 0 ", "px;\n\n font-family: ", ";\n font-size: 13px;\n line-height: 1;\n\n background: ", ";\n border-radius: ", "px;\n "])), HEIGHT, (HEIGHT - ICON_SIZE) * 1.2, (HEIGHT - ICON_SIZE) / 2, token.fontFamilyCode, token.colorFillSecondary, HEIGHT / 2))
33
+ container: cx(percentStyle, shape === 'round' ? roundStylish : squareStylish, css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n user-select: none;\n\n overflow: hidden;\n display: flex;\n flex: 0;\n gap: 4px;\n align-items: center;\n\n min-width: fit-content;\n height: ", "px;\n\n font-family: ", ";\n font-size: 13px;\n line-height: 1;\n "])), HEIGHT, token.fontFamilyCode))
30
34
  };
31
35
  });
package/es/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { default as ActionIconGroup, type ActionIconGroupProps } from './ActionI
3
3
  export { default as Avatar, type AvatarProps } from './Avatar';
4
4
  export { default as Burger, type BurgerProps } from './Burger';
5
5
  export { default as ChatHeader, type ChatHeaderProps } from './ChatHeader';
6
+ export { default as ChatHeaderTitle, type ChatHeaderTitleProps, } from './ChatHeader/ChatHeaderTitle';
6
7
  export { default as ChatInputArea, type ChatInputAreaProps } from './ChatInputArea';
7
8
  export { default as ChatItem, type ChatItemProps } from './ChatItem';
8
9
  export type { ChatListProps, OnActionClick, OnMessageChange, RenderErrorMessage, RenderMessage, } from './ChatList';
@@ -37,6 +38,7 @@ export { default as Header, type HeaderProps } from './Header';
37
38
  export { default as Hero, type HeroAction, type HeroProps } from './Hero';
38
39
  export { default as Highlighter, type HighlighterProps, SyntaxHighlighter, type SyntaxHighlighterProps, } from './Highlighter';
39
40
  export { default as Icon, type IconProps, type IconSize } from './Icon';
41
+ export * from './Icon/icons';
40
42
  export { Input, type InputProps, TextArea, type TextAreaProps } from './Input';
41
43
  export { default as Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, } from './Layout';
42
44
  export { default as List } from './List';
@@ -47,12 +49,14 @@ export { default as MessageInput, type MessageInputProps } from './MessageInput'
47
49
  export { default as MessageModal, type MessageModalProps } from './MessageModal';
48
50
  export { default as SearchBar, type SearchBarProps } from './SearchBar';
49
51
  export { default as SideNav, type SideNavProps } from './SideNav';
52
+ export { default as SliderWithInput, type SliderWithInputProps } from './SliderWithInput';
50
53
  export { default as Snippet, type SnippetProps } from './Snippet';
51
54
  export { default as Spotlight, type SpotlightProps } from './Spotlight';
52
55
  export { default as StroyBook, type StroyBookProps, useControls, useCreateStore, } from './StroyBook';
53
56
  export * from './styles';
54
57
  export { default as Swatches, type SwatchesProps } from './Swatches';
55
58
  export { default as TabsNav, type TabsNavProps } from './TabsNav';
59
+ export { default as Tag, type TagProps } from './Tag';
56
60
  export { default as ThemeProvider } from './ThemeProvider';
57
61
  export { default as ThemeSwitch, type ThemeSwitchProps } from './ThemeSwitch';
58
62
  export { default as Toc, type TocProps } from './Toc';
package/es/index.js CHANGED
@@ -3,6 +3,7 @@ export { default as ActionIconGroup } from "./ActionIconGroup";
3
3
  export { default as Avatar } from "./Avatar";
4
4
  export { default as Burger } from "./Burger";
5
5
  export { default as ChatHeader } from "./ChatHeader";
6
+ export { default as ChatHeaderTitle } from "./ChatHeader/ChatHeaderTitle";
6
7
  export { default as ChatInputArea } from "./ChatInputArea";
7
8
  export { default as ChatItem } from "./ChatItem";
8
9
  export { default as ChatList } from "./ChatList";
@@ -36,6 +37,7 @@ export { default as Header } from "./Header";
36
37
  export { default as Hero } from "./Hero";
37
38
  export { default as Highlighter, SyntaxHighlighter } from "./Highlighter";
38
39
  export { default as Icon } from "./Icon";
40
+ export * from "./Icon/icons";
39
41
  export { Input, TextArea } from "./Input";
40
42
  export { default as Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc } from "./Layout";
41
43
  export { default as List } from "./List";
@@ -46,12 +48,14 @@ export { default as MessageInput } from "./MessageInput";
46
48
  export { default as MessageModal } from "./MessageModal";
47
49
  export { default as SearchBar } from "./SearchBar";
48
50
  export { default as SideNav } from "./SideNav";
51
+ export { default as SliderWithInput } from "./SliderWithInput";
49
52
  export { default as Snippet } from "./Snippet";
50
53
  export { default as Spotlight } from "./Spotlight";
51
54
  export { default as StroyBook, useControls, useCreateStore } from "./StroyBook";
52
55
  export * from "./styles";
53
56
  export { default as Swatches } from "./Swatches";
54
57
  export { default as TabsNav } from "./TabsNav";
58
+ export { default as Tag } from "./Tag";
55
59
  export { default as ThemeProvider } from "./ThemeProvider";
56
60
  export { default as ThemeSwitch } from "./ThemeSwitch";
57
61
  export { default as Toc } from "./Toc";
@@ -1,17 +1,19 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
3
3
  import { keyframes } from 'antd-style';
4
+ import { readableColor } from 'polished';
4
5
  export var generateCustomStylish = function generateCustomStylish(_ref) {
5
6
  var css = _ref.css,
6
7
  token = _ref.token,
7
8
  isDarkMode = _ref.isDarkMode;
9
+ var cyan = isDarkMode ? token.cyan9A : token.cyan10A;
8
10
  var gradient = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n "])));
9
11
  return {
10
12
  blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n backdrop-filter: saturate(180%) blur(10px);\n "]))),
11
13
  blurStrong: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n backdrop-filter: blur(36px);\n "]))),
12
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),
13
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),
14
- 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 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 border: none;\n border-radius: ", "px;\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\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 li {\n line-height: 1.8;\n\n &::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 "])), isDarkMode ? token.colorTextSecondary : token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan1A : token.cyan3A, isDarkMode ? token.cyan1A : token.cyan4A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, isDarkMode ? token.cyan9A : token.cyan10A, 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 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 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\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 {\n margin-left: 0;\n }\n\n ol {\n counter-reset: steps;\n margin-left: 0;\n list-style: none;\n\n li {\n counter-increment: steps;\n\n &::before {\n content: counter(steps);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n width: 1.1rem;\n height: 1.1rem;\n margin-right: 0.5em;\n\n font-size: 0.8em;\n font-weight: 500;\n line-height: 1;\n color: ", ";\n\n background: ", ";\n border-radius: 50%;\n }\n }\n\n ol li::before {\n color: ", ";\n background: ", ";\n }\n }\n\n > ul {\n > li {\n line-height: 1.8;\n list-style-type: disc;\n\n &::marker {\n color: ", ";\n }\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 "])), isDarkMode ? token.colorTextSecondary : token.colorText, token.colorText, token.colorTextDescription, token.colorLink, token.colorLinkHover, token.colorLinkActive, token.borderRadius, token.fontSizeSM, isDarkMode ? token.cyan9A : token.cyan10A, isDarkMode ? token.cyan1A : token.cyan3A, isDarkMode ? token.cyan1A : token.cyan4A, token.borderRadiusSM, token.colorBorderSecondary, token.borderRadius, token.colorFillTertiary, token.borderRadius, token.borderRadius, token.borderRadius, token.borderRadius, readableColor(cyan), cyan, token.colorTextSecondary, token.colorFill, cyan, token.colorFillTertiary, token.colorBorderSecondary, token.borderRadiusLG, token.motionEaseOut, token.colorBorder),
15
17
  noScrollbar: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n background-color: transparent;\n }\n "]))),
16
18
  resetLinkColor: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n cursor: pointer;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n "])), token.colorTextSecondary, token.colorText)
17
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.72.7",
3
+ "version": "1.73.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",