@lobehub/ui 1.74.0 → 1.75.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.
|
@@ -5,6 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
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 { Icon } from "../..";
|
|
7
7
|
import { Collapse } from 'antd';
|
|
8
|
+
import { ChevronDown } from 'lucide-react';
|
|
8
9
|
import { memo } from 'react';
|
|
9
10
|
import { useStyles } from "./style";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -22,6 +23,19 @@ var FormGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
22
23
|
return /*#__PURE__*/_jsx(Collapse, _objectSpread({
|
|
23
24
|
className: cx(styles.group, className),
|
|
24
25
|
defaultActiveKey: [1],
|
|
26
|
+
expandIcon: function expandIcon(_ref2) {
|
|
27
|
+
var isActive = _ref2.isActive;
|
|
28
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
29
|
+
className: styles.icon,
|
|
30
|
+
icon: ChevronDown,
|
|
31
|
+
size: {
|
|
32
|
+
fontSize: 16
|
|
33
|
+
},
|
|
34
|
+
style: isActive ? {} : {
|
|
35
|
+
rotate: '-90deg'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
25
39
|
items: [{
|
|
26
40
|
children: children,
|
|
27
41
|
extra: extra,
|
|
@@ -2,6 +2,7 @@ export declare const useStyles: (props?: string | number | undefined) => import(
|
|
|
2
2
|
footer: import("antd-style").SerializedStyles;
|
|
3
3
|
formTitle: import("antd-style").SerializedStyles;
|
|
4
4
|
group: string;
|
|
5
|
+
icon: import("antd-style").SerializedStyles;
|
|
5
6
|
item: import("antd-style").SerializedStyles;
|
|
6
7
|
title: import("antd-style").SerializedStyles;
|
|
7
8
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
import { isNumber } from 'lodash-es';
|
|
5
5
|
export var useStyles = createStyles(function (_ref, itemMinWidth) {
|
|
@@ -10,8 +10,9 @@ export var useStyles = createStyles(function (_ref, itemMinWidth) {
|
|
|
10
10
|
return {
|
|
11
11
|
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n "]))),
|
|
12
12
|
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),
|
|
13
|
-
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 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 "])))),
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
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 "])))),
|
|
14
|
+
icon: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n transition: all 100ms ", ";\n "])), token.motionEaseOut),
|
|
15
|
+
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 "])), itemMinWidth && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .ant-form-item-control {\n width: ", ";\n }\n "])), isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth)),
|
|
16
|
+
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)
|
|
16
17
|
};
|
|
17
18
|
});
|
package/es/TokenTag/style.js
CHANGED
|
@@ -6,7 +6,8 @@ export var ICON_SIZE = 20;
|
|
|
6
6
|
export var useStyles = createStyles(function (_ref, _ref2) {
|
|
7
7
|
var cx = _ref.cx,
|
|
8
8
|
css = _ref.css,
|
|
9
|
-
token = _ref.token
|
|
9
|
+
token = _ref.token,
|
|
10
|
+
isDarkMode = _ref.isDarkMode;
|
|
10
11
|
var type = _ref2.type,
|
|
11
12
|
shape = _ref2.shape;
|
|
12
13
|
var percentStyle;
|
|
@@ -27,7 +28,7 @@ export var useStyles = createStyles(function (_ref, _ref2) {
|
|
|
27
28
|
break;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
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 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, isDarkMode ? token.colorFillSecondary : token.colorFillTertiary, HEIGHT / 2);
|
|
31
32
|
var squareStylish = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n "])), token.borderRadiusSM);
|
|
32
33
|
return {
|
|
33
34
|
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))
|