@lobehub/ui 1.144.0 → 1.144.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.
- package/es/Collapse/index.js +4 -2
- package/es/Collapse/style.js +5 -5
- package/package.json +1 -1
package/es/Collapse/index.js
CHANGED
|
@@ -17,9 +17,11 @@ var Collapse = /*#__PURE__*/memo(function (_ref) {
|
|
|
17
17
|
className = _ref.className,
|
|
18
18
|
padding = _ref.padding,
|
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var bodyPadding = _typeof(padding) === 'object' ? padding.body : padding;
|
|
21
|
+
var headerPadding = _typeof(padding) === 'object' ? padding.header : padding;
|
|
20
22
|
var _useStyles = useStyles({
|
|
21
|
-
bodyPadding:
|
|
22
|
-
headerPadding:
|
|
23
|
+
bodyPadding: bodyPadding === undefined ? '12px 16px' : bodyPadding,
|
|
24
|
+
headerPadding: headerPadding === undefined ? '12px 16px' : headerPadding,
|
|
23
25
|
isSplit: !!gap
|
|
24
26
|
}),
|
|
25
27
|
cx = _useStyles.cx,
|
package/es/Collapse/style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
5
5
|
var css = _ref.css,
|
|
@@ -13,14 +13,14 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
13
13
|
var pureStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border-radius: 0;\n\n .", "-collapse-header {\n padding-inline: 0 !important;\n background: transparent !important;\n }\n\n .", "-collapse-content {\n background: transparent;\n border-color: ", ";\n }\n\n .", "-collapse-content-box {\n padding-inline: 2px !important;\n background: transparent;\n border-radius: 0;\n }\n "])), prefixCls, prefixCls, token.colorFillSecondary, prefixCls);
|
|
14
14
|
var blockStyle = cx(isSplit ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n .", "-collapse-item {\n overflow: hidden;\n background: ", ";\n border-radius: ", "px !important;\n }\n "])), prefixCls, token.colorFillQuaternary, token.borderRadiusLG) : css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n "])), token.colorFillQuaternary, token.borderRadiusLG));
|
|
15
15
|
var ghostStyle = cx(css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: transparent;\n\n .", "-collapse-header {\n background: transparent !important;\n }\n\n .", "-collapse-content-box {\n background: transparent;\n }\n "])), prefixCls, prefixCls), isSplit ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", "-collapse-item {\n overflow: hidden;\n border: 1px solid ", " !important;\n border-radius: ", "px !important;\n &.", "-collapse-item-active {\n .", "-collapse-content-box {\n border-block-start: 1px solid ", " !important;\n }\n }\n }\n "])), prefixCls, token.colorBorderSecondary, token.borderRadiusLG, prefixCls, prefixCls, token.colorBorderSecondary) : css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", "-collapse-item:not(:first-child) {\n .", "-collapse-header {\n border-block-start: 1px solid ", ";\n }\n }\n "])), prefixCls, prefixCls, token.colorBorderSecondary));
|
|
16
|
-
var defaultStyle = cx(
|
|
16
|
+
var defaultStyle = cx(isSplit ? css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background: transparent;\n .", "-collapse-item {\n overflow: hidden;\n background: ", ";\n border: 1px solid ", " !important;\n border-radius: ", "px !important;\n }\n "])), prefixCls, token.colorFillQuaternary, token.colorBorderSecondary, token.borderRadiusLG) : css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n .", "-collapse-item:not(:last-child) {\n .", "-collapse-header {\n border-block-end: 1px solid ", ";\n }\n }\n "])), token.colorFillQuaternary, token.borderRadiusLG, prefixCls, prefixCls, token.colorBorderSecondary));
|
|
17
17
|
return {
|
|
18
18
|
blockStyle: blockStyle,
|
|
19
19
|
defaultStyle: defaultStyle,
|
|
20
|
-
flatGroup: css(
|
|
20
|
+
flatGroup: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n overflow: hidden;\n padding-inline: 16px;\n "]))),
|
|
21
21
|
ghostStyle: ghostStyle,
|
|
22
|
-
group: cx(isDarkMode && css(
|
|
23
|
-
icon: css(
|
|
22
|
+
group: cx(isDarkMode && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n .", "-collapse-content {\n background: transparent;\n border-color: ", ";\n }\n\n .", "-collapse-header {\n background: ", ";\n }\n "])), prefixCls, token.colorBorderSecondary, prefixCls, token.colorFillTertiary), css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n overflow: hidden;\n display: flex;\n flex: none;\n flex-direction: column;\n\n .", "-collapse-item {\n border: none;\n }\n\n .", "-collapse-extra {\n margin-inline-start: 16px;\n }\n\n .", "-collapse-header {\n align-items: center !important;\n padding: ", " !important;\n border-radius: 0 !important;\n }\n\n .", "-collapse-content-box {\n padding: ", " !important;\n }\n\n .", "-form-item-label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n "])), prefixCls, prefixCls, prefixCls, typeof headerPadding === 'string' ? headerPadding : "".concat(headerPadding, "px"), prefixCls, typeof bodyPadding === 'string' ? bodyPadding : "".concat(bodyPadding, "px"), prefixCls)),
|
|
23
|
+
icon: css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n transition: all 100ms ", ";\n "])), token.motionEaseOut),
|
|
24
24
|
pureStyle: pureStyle
|
|
25
25
|
};
|
|
26
26
|
});
|