@lobehub/ui 2.20.1 → 2.21.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.
- package/es/Accordion/AccordionItem.js +4 -23
- package/es/Accordion/type.d.ts +1 -1
- package/es/icons/lucideExtra/CreateBotIcon.d.ts +3 -0
- package/es/icons/lucideExtra/CreateBotIcon.js +7 -0
- package/es/icons/lucideExtra/index.d.ts +1 -0
- package/es/icons/lucideExtra/index.js +1 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
-
import {
|
|
9
|
+
import { LazyMotion, m } from 'framer-motion';
|
|
10
10
|
import { memo, useCallback, useMemo } from 'react';
|
|
11
11
|
import { Flexbox } from 'react-layout-kit';
|
|
12
12
|
import Block from "../Block";
|
|
@@ -114,7 +114,7 @@ var AccordionItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
114
114
|
return _objectSpread({
|
|
115
115
|
animate: isOpen ? 'enter' : 'exit',
|
|
116
116
|
exit: 'exit',
|
|
117
|
-
initial:
|
|
117
|
+
initial: false,
|
|
118
118
|
variants: {
|
|
119
119
|
enter: {
|
|
120
120
|
height: 'auto',
|
|
@@ -138,7 +138,7 @@ var AccordionItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
138
138
|
|
|
139
139
|
// Render content
|
|
140
140
|
var contentElement = useMemo(function () {
|
|
141
|
-
if (disableAnimation) {
|
|
141
|
+
if (disableAnimation || !keepContentMounted) {
|
|
142
142
|
if (keepContentMounted) {
|
|
143
143
|
return /*#__PURE__*/_jsx("div", {
|
|
144
144
|
className: cx('accordion-content', styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
@@ -162,7 +162,7 @@ var AccordionItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
162
162
|
})
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return /*#__PURE__*/_jsx(LazyMotion, {
|
|
166
166
|
features: loadFeatures,
|
|
167
167
|
children: /*#__PURE__*/_jsx(m.div, _objectSpread(_objectSpread({}, motionProps), {}, {
|
|
168
168
|
style: {
|
|
@@ -178,25 +178,6 @@ var AccordionItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
178
178
|
})
|
|
179
179
|
})
|
|
180
180
|
}))
|
|
181
|
-
}) : /*#__PURE__*/_jsx(AnimatePresence, {
|
|
182
|
-
initial: false,
|
|
183
|
-
children: isOpen && /*#__PURE__*/_jsx(LazyMotion, {
|
|
184
|
-
features: loadFeatures,
|
|
185
|
-
children: /*#__PURE__*/_jsx(m.div, _objectSpread(_objectSpread({}, motionProps), {}, {
|
|
186
|
-
style: {
|
|
187
|
-
overflow: 'hidden'
|
|
188
|
-
},
|
|
189
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
190
|
-
className: cx('accordion-content', styles.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
191
|
-
role: "region",
|
|
192
|
-
style: customStyles === null || customStyles === void 0 ? void 0 : customStyles.content,
|
|
193
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
194
|
-
className: styles.contentInner,
|
|
195
|
-
children: children
|
|
196
|
-
})
|
|
197
|
-
})
|
|
198
|
-
}))
|
|
199
|
-
})
|
|
200
181
|
});
|
|
201
182
|
}, [disableAnimation, keepContentMounted, isOpen, cx, styles, classNames, customStyles, children, motionProps]);
|
|
202
183
|
var titleNode = useMemo(function () {
|
package/es/Accordion/type.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ export interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
|
|
|
107
107
|
indicatorPlacement?: 'end' | 'start';
|
|
108
108
|
/**
|
|
109
109
|
* Keep content mounted when collapsed
|
|
110
|
-
* @default
|
|
110
|
+
* @default true
|
|
111
111
|
*/
|
|
112
112
|
keepContentMounted?: boolean;
|
|
113
113
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createLucideIcon } from 'lucide-react';
|
|
2
|
+
var CreateBotIcon = createLucideIcon('CreateBot', [['path', {
|
|
3
|
+
d: 'M12 8V4H8M20 10C20 8.895 19.105 8 18 8H6C4.895 8 4 8.895 4 10V18C4 19.105 4.895 20 6 20H10M2 14H4M15 13V15M9 13V15M21.378 16.626C21.776 16.228 22 15.687 22 15.124 22 14.561 21.776 14.02 21.378 13.622 20.98 13.224 20.439 13 19.876 13 19.313 13 18.772 13.224 18.374 13.622L14.364 17.634C14.126 17.872 13.952 18.165 13.858 18.488L13.021 21.358C12.996 21.444 12.994 21.535 13.017 21.622 13.039 21.709 13.084 21.788 13.148 21.852 13.211 21.915 13.29 21.96 13.377 21.982 13.464 22.005 13.555 22.003 13.641 21.978L16.511 21.141C16.834 21.047 17.127 20.873 17.365 20.635L21.378 16.626Z',
|
|
4
|
+
key: '1'
|
|
5
|
+
}]]);
|
|
6
|
+
CreateBotIcon.displayName = 'CreateBotIcon';
|
|
7
|
+
export default CreateBotIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as BotPromptIcon } from './BotPromptIcon';
|
|
2
|
+
export { default as CreateBotIcon } from './CreateBotIcon';
|
|
2
3
|
export { default as DiscordIcon } from './DiscordIcon';
|
|
3
4
|
export { default as GlobeOffIcon } from './GlobeOffIcon';
|
|
4
5
|
export { default as GroupBotIcon } from './GroupBotIcon';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as BotPromptIcon } from "./BotPromptIcon";
|
|
2
|
+
export { default as CreateBotIcon } from "./CreateBotIcon";
|
|
2
3
|
export { default as DiscordIcon } from "./DiscordIcon";
|
|
3
4
|
export { default as GlobeOffIcon } from "./GlobeOffIcon";
|
|
4
5
|
export { default as GroupBotIcon } from "./GroupBotIcon";
|