@lobehub/ui 2.0.3 → 2.0.5

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.
@@ -88,6 +88,34 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
88
88
  onClick: onClose
89
89
  }, closeIconProps))]
90
90
  });
91
+ var sidebarContent = /*#__PURE__*/_jsxs(_Fragment, {
92
+ children: [/*#__PURE__*/_jsx(Flexbox, {
93
+ className: classNames === null || classNames === void 0 ? void 0 : classNames.sidebar,
94
+ paddingBlock: 12,
95
+ paddingInline: 16,
96
+ style: _objectSpread({
97
+ background: theme.colorBgLayout,
98
+ borderRight: "1px solid ".concat(theme.colorBorderSecondary),
99
+ height: '100%',
100
+ overflowX: 'hidden',
101
+ overflowY: 'auto'
102
+ }, styles === null || styles === void 0 ? void 0 : styles.sidebar),
103
+ width: sidebarWidth,
104
+ children: sidebar
105
+ }), /*#__PURE__*/_jsx(Flexbox, {
106
+ className: classNames === null || classNames === void 0 ? void 0 : classNames.sidebarContent,
107
+ flex: 1,
108
+ paddingBlock: 12,
109
+ paddingInline: 16,
110
+ style: _objectSpread({
111
+ background: theme.colorBgContainer,
112
+ height: '100%',
113
+ overflowX: 'hidden',
114
+ overflowY: 'auto'
115
+ }, styles === null || styles === void 0 ? void 0 : styles.sidebarContent),
116
+ children: children
117
+ })]
118
+ });
91
119
  return /*#__PURE__*/_jsx(AntdDrawer, _objectSpread(_objectSpread({
92
120
  classNames: classNames,
93
121
  closable: false,
@@ -100,7 +128,8 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
100
128
  styles: _objectSpread(_objectSpread({}, styles), {}, {
101
129
  body: _objectSpread({
102
130
  background: 'transparent',
103
- padding: '0 4px'
131
+ paddingBlock: sidebar ? 0 : 12,
132
+ paddingInline: sidebar ? 0 : 16
104
133
  }, styles === null || styles === void 0 ? void 0 : styles.body),
105
134
  content: _objectSpread({
106
135
  background: sidebar ? "linear-gradient(to right, ".concat(theme.colorBgLayout, " 49.9%, ").concat(theme.colorBgContainer, " 50%)") : theme.colorBgContainer
@@ -132,43 +161,14 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
132
161
  }, rest), {}, {
133
162
  children: /*#__PURE__*/_jsxs(Flexbox, {
134
163
  className: classNames === null || classNames === void 0 ? void 0 : classNames.bodyContent,
135
- height: '100%',
136
164
  horizontal: !!sidebar,
137
- paddingBlock: sidebar ? undefined : 12,
138
- paddingInline: sidebar ? undefined : 16,
139
165
  style: _objectSpread({
140
166
  justifySelf: 'center',
141
167
  maxWidth: containerMaxWidth,
168
+ minHeight: '100%',
142
169
  width: '100%'
143
170
  }, styles === null || styles === void 0 ? void 0 : styles.bodyContent),
144
- children: [noHeader && extraNode, sidebar ? /*#__PURE__*/_jsxs(_Fragment, {
145
- children: [/*#__PURE__*/_jsx(Flexbox, {
146
- className: classNames === null || classNames === void 0 ? void 0 : classNames.sidebar,
147
- paddingBlock: 12,
148
- paddingInline: 16,
149
- style: _objectSpread({
150
- background: theme.colorBgLayout,
151
- borderRight: "1px solid ".concat(theme.colorBorderSecondary),
152
- height: '100%',
153
- overflowX: 'hidden',
154
- overflowY: 'auto'
155
- }, styles === null || styles === void 0 ? void 0 : styles.sidebar),
156
- width: sidebarWidth,
157
- children: sidebar
158
- }), /*#__PURE__*/_jsx(Flexbox, {
159
- className: classNames === null || classNames === void 0 ? void 0 : classNames.sidebarContent,
160
- flex: 1,
161
- paddingBlock: 12,
162
- paddingInline: 16,
163
- style: _objectSpread({
164
- background: theme.colorBgContainer,
165
- height: '100%',
166
- overflowX: 'hidden',
167
- overflowY: 'auto'
168
- }, styles === null || styles === void 0 ? void 0 : styles.sidebarContent),
169
- children: children
170
- })]
171
- }) : children]
171
+ children: [noHeader && extraNode, sidebar ? sidebarContent : children]
172
172
  })
173
173
  }));
174
174
  });
@@ -10,7 +10,7 @@ export interface DrawerProps extends Omit<AntdDrawerProps, 'styles' | 'className
10
10
  title?: string;
11
11
  };
12
12
  closeIconProps?: ActionIconProps;
13
- containerMaxWidth?: number;
13
+ containerMaxWidth?: number | string;
14
14
  noHeader?: boolean;
15
15
  ref?: Ref<HTMLDivElement>;
16
16
  sidebar?: ReactNode;
package/es/Input/style.js CHANGED
@@ -14,7 +14,7 @@ export var useStyles = createStyles(function (_ref) {
14
14
  filledOPT: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-otp {\n .", "-otp-input {\n ", ";\n }\n }\n "])), prefixCls, prefixCls, stylish.variantFilled),
15
15
  outlined: stylish.variantOutlined,
16
16
  outlinedOPT: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &.", "-otp {\n .", "-otp-input {\n ", ";\n }\n }\n "])), prefixCls, prefixCls, stylish.variantOutlined),
17
- root: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n overflow: hidden;\n "]))),
17
+ root: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))),
18
18
  rootOPT: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n &.", "-otp {\n .", "-otp-input {\n &:focus-within {\n border-color: ", ";\n }\n }\n }\n "])), prefixCls, prefixCls, token.colorBorder),
19
19
  shadow: stylish.shadow,
20
20
  shadowOPT: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n &.", "-otp {\n .", "-otp-input {\n ", ";\n }\n }\n "])), prefixCls, prefixCls, stylish.shadow)
@@ -60,7 +60,10 @@ var ChatInputArea = /*#__PURE__*/memo(function (_ref) {
60
60
  _onSend === null || _onSend === void 0 || _onSend();
61
61
  setExpand === null || setExpand === void 0 || setExpand(false);
62
62
  },
63
- ref: ref
63
+ ref: ref,
64
+ style: {
65
+ paddingInline: 16
66
+ }
64
67
  }, rest))
65
68
  }), bottomAddons]
66
69
  })
@@ -92,6 +92,7 @@ var ChatInputArea = /*#__PURE__*/memo(function (_ref) {
92
92
  active: true,
93
93
  className: styles.expandButton,
94
94
  icon: expand ? ChevronDown : ChevronUp,
95
+ id: 'sssssss',
95
96
  onClick: function onClick() {
96
97
  return setExpand === null || setExpand === void 0 ? void 0 : setExpand(!expand);
97
98
  },
@@ -111,9 +112,9 @@ var ChatInputArea = /*#__PURE__*/memo(function (_ref) {
111
112
  children: /*#__PURE__*/_jsx(ChatInputAreaInner, {
112
113
  autoSize: expand ? false : {
113
114
  maxRows: 6,
114
- minRows: 0
115
+ minRows: 1
115
116
  },
116
- className: cx(expand && styles.expandTextArea),
117
+ className: styles.expandTextArea,
117
118
  loading: loading,
118
119
  onBlur: function onBlur() {
119
120
  return setIsFocused(false);
@@ -6,7 +6,7 @@ export var useStyles = createStyles(function (_ref) {
6
6
  token = _ref.token;
7
7
  return {
8
8
  container: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex: none;\n padding-block: 12px;\n background: ", ";\n border-block-start: 1px solid ", ";\n "])), token.colorFillQuaternary, token.colorFillTertiary),
9
- expand: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n "]))),
9
+ expand: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n height: 100%;\n "]))),
10
10
  expandButton: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n inset-inline-end: 14px;\n "]))),
11
11
  expandTextArea: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1;\n "]))),
12
12
  inner: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n height: inherit;\n padding-block: 0;\n padding-inline: 8px;\n "])))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",