@lobehub/ui 2.1.9 → 2.1.11
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/style.js
CHANGED
|
@@ -15,12 +15,12 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
15
15
|
borderless: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", "-collapse {\n .", "-collapse-header {\n padding-inline: 0;\n }\n .", "-collapse-content {\n padding-inline: 0;\n .", "-collapse-content-box {\n padding-inline: 0;\n }\n }\n }\n "])), prefixCls, prefixCls, prefixCls, prefixCls),
|
|
16
16
|
desc: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n color: ", ";\n "])), token.colorTextDescription),
|
|
17
17
|
filled: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.", "-collapse {\n .", "-collapse-item {\n background: ", ";\n .", "-collapse-content {\n margin-inline: 3px;\n margin-block-end: 3px;\n border-radius: ", "px;\n ", ";\n background: ", ";\n ", ";\n }\n }\n }\n "])), prefixCls, prefixCls, isDarkMode ? token.colorFillQuaternary : token.colorFillTertiary, prefixCls, token.borderRadius, stylish.variantOutlinedWithoutHover, isDarkMode ? token.colorFillQuaternary : token.colorBgContainer, isDarkMode ? undefined : stylish.shadow),
|
|
18
|
-
gapOutlined: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-collapse {\n background: transparent;\n .", "-collapse-item {\n
|
|
18
|
+
gapOutlined: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &.", "-collapse {\n background: transparent;\n .", "-collapse-item {\n border: 1px solid ", ";\n background: ", ";\n }\n\n .", "-collapse-item:not(:first-child) {\n .", "-collapse-header {\n border-block-start: none;\n }\n }\n }\n "])), prefixCls, prefixCls, token.colorFillSecondary, token.colorBgContainer, prefixCls, prefixCls),
|
|
19
19
|
gapRoot: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &.", "-collapse {\n display: flex;\n flex-direction: column;\n border: none;\n box-shadow: none;\n .", "-collapse-item {\n border: none;\n border-radius: ", "px;\n }\n }\n "])), prefixCls, prefixCls, token.borderRadiusLG),
|
|
20
20
|
hideCollapsibleIcon: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", "-collapse-expand-icon {\n display: none !important;\n }\n "])), prefixCls),
|
|
21
21
|
icon: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n cursor: pointer;\n transition: all 100ms ", ";\n "])), token.motionEaseOut),
|
|
22
|
-
outlined: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n &.", "-collapse {\n
|
|
23
|
-
root: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n &.", "-collapse {\n display: flex;\n flex-direction: column;\n background: transparent;\n\n .", "-collapse-header {\n display: flex;\n flex: none;\n gap: 0.75em;\n align-items: flex-start;\n\n border-radius: 0 !important;\n\n .", "-collapse-expand-icon {\n align-items: center;\n min-height: 28px;\n padding: 0;\n }\n\n .", "-collapse-extra {\n display: flex;\n align-items: center;\n min-height: 28px;\n }\n }\n\n .", "-collapse-content {\n background: transparent;\n }\n }\n "])), prefixCls, prefixCls, prefixCls, prefixCls, prefixCls),
|
|
22
|
+
outlined: css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n &.", "-collapse {\n border: 1px solid ", ";\n background: ", ";\n .", "-collapse-item .", "-collapse-header {\n transition: none;\n }\n .", "-collapse-item-active .", "-collapse-header {\n border-block-end: 1px solid ", ";\n }\n .", "-collapse-item:not(:first-child) {\n .", "-collapse-header {\n border-block-start: 1px solid ", ";\n }\n }\n }\n "])), prefixCls, token.colorFillSecondary, token.colorBgContainer, prefixCls, prefixCls, prefixCls, prefixCls, token.colorFillTertiary, prefixCls, prefixCls, token.colorFillTertiary),
|
|
23
|
+
root: css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n &.", "-collapse {\n display: flex;\n flex-direction: column;\n background: transparent;\n\n .", "-collapse-header {\n overflow: hidden;\n display: flex;\n flex: none;\n gap: 0.75em;\n align-items: flex-start;\n\n border-radius: 0 !important;\n\n .", "-collapse-expand-icon {\n align-items: center;\n min-height: 28px;\n padding: 0;\n }\n\n .", "-collapse-extra {\n display: flex;\n align-items: center;\n min-height: 28px;\n }\n }\n\n .", "-collapse-content {\n background: transparent;\n }\n }\n "])), prefixCls, prefixCls, prefixCls, prefixCls, prefixCls),
|
|
24
24
|
title: css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n font-size: 16px;\n font-weight: 500;\n line-height: 28px;\n "])))
|
|
25
25
|
};
|
|
26
26
|
});
|
|
@@ -23,13 +23,13 @@ export declare function escapeMhchemCommands(text: string): string;
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function escapeLatexPipes(text: string): string;
|
|
25
25
|
/**
|
|
26
|
-
* Escapes underscores within \text{...} commands in LaTeX expressions
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* Escapes underscores within \text{...} commands in LaTeX expressions
|
|
27
|
+
* that are not already escaped.
|
|
28
|
+
* For example, \text{node_domain} becomes \text{node\_domain},
|
|
29
|
+
* but \text{node\_domain} remains \text{node\_domain}.
|
|
30
30
|
*
|
|
31
31
|
* @param text The input string potentially containing LaTeX expressions
|
|
32
|
-
* @returns The string with underscores escaped within \text{...} commands
|
|
32
|
+
* @returns The string with unescaped underscores escaped within \text{...} commands
|
|
33
33
|
*/
|
|
34
34
|
export declare function escapeTextUnderscores(text: string): string;
|
|
35
35
|
/**
|
|
@@ -46,22 +46,20 @@ export function escapeLatexPipes(text) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Escapes underscores within \text{...} commands in LaTeX expressions
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
49
|
+
* Escapes underscores within \text{...} commands in LaTeX expressions
|
|
50
|
+
* that are not already escaped.
|
|
51
|
+
* For example, \text{node_domain} becomes \text{node\_domain},
|
|
52
|
+
* but \text{node\_domain} remains \text{node\_domain}.
|
|
53
53
|
*
|
|
54
54
|
* @param text The input string potentially containing LaTeX expressions
|
|
55
|
-
* @returns The string with underscores escaped within \text{...} commands
|
|
55
|
+
* @returns The string with unescaped underscores escaped within \text{...} commands
|
|
56
56
|
*/
|
|
57
57
|
export function escapeTextUnderscores(text) {
|
|
58
|
-
// This regular expression finds all \text{...} blocks.
|
|
59
|
-
// For each match, it takes the content inside the braces (the first capture group),
|
|
60
|
-
// replaces all underscores '_' with '\_', and then reconstructs the \text{...} command.
|
|
61
58
|
return text.replaceAll(/\\text{([^}]*)}/g, function (match, textContent) {
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
|
|
59
|
+
// textContent is the content within the braces, e.g., "node_domain" or "already\_escaped"
|
|
60
|
+
// Replace underscores '_' with '\_' only if they are NOT preceded by a backslash '\'.
|
|
61
|
+
// The (?<!\\) is a negative lookbehind assertion that ensures the character before '_' is not a '\'.
|
|
62
|
+
var escapedTextContent = textContent.replaceAll(/(?<!\\)_/g, '\\_');
|
|
65
63
|
return "\\text{".concat(escapedTextContent, "}");
|
|
66
64
|
});
|
|
67
65
|
}
|