@tidbcloud/uikit 2.0.0-beta.84 → 2.0.0-beta.86
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/CHANGELOG.md +12 -0
- package/dist/biz/Table/ProTable/helpers.cjs +9 -2
- package/dist/biz/Table/ProTable/helpers.js +9 -2
- package/dist/node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/InlineCodeHighlight.cjs +43 -0
- package/dist/node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/InlineCodeHighlight.js +43 -0
- package/dist/primitive/index.cjs +2 -0
- package/dist/primitive/index.d.cts +2 -2
- package/dist/primitive/index.d.ts +2 -2
- package/dist/primitive/index.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -40,6 +40,7 @@ function mergeProTableProps(props) {
|
|
|
40
40
|
mantineTableFooterRowProps = {},
|
|
41
41
|
mantineTableFooterProps = {},
|
|
42
42
|
mantineLoadingOverlayProps = {},
|
|
43
|
+
layoutMode,
|
|
43
44
|
withBorder = true,
|
|
44
45
|
loading = false,
|
|
45
46
|
enableExpanding = false,
|
|
@@ -152,7 +153,12 @@ function mergeProTableProps(props) {
|
|
|
152
153
|
sx: {
|
|
153
154
|
"&:where([data-with-row-border]):not(:last-of-type)": {
|
|
154
155
|
td: {
|
|
155
|
-
borderBottom: enableRowVirtualization ? "none !important" : void 0
|
|
156
|
+
borderBottom: enableRowVirtualization || layoutMode && layoutMode !== "semantic" ? "none !important" : void 0
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"&[data-hover]": {
|
|
160
|
+
"&:hover": {
|
|
161
|
+
"--mrt-row-hover-background-color": theme.colors.carbon[3]
|
|
156
162
|
}
|
|
157
163
|
},
|
|
158
164
|
"&:not([data-striped], [data-striped='false'])": {
|
|
@@ -202,7 +208,7 @@ function mergeProTableProps(props) {
|
|
|
202
208
|
);
|
|
203
209
|
const mTableFooterProps = mergeMProps(
|
|
204
210
|
{
|
|
205
|
-
sx: { outline: enableStickyFooter ? "none" : void 0 }
|
|
211
|
+
sx: { outline: enableStickyFooter ? "none !important" : void 0 }
|
|
206
212
|
},
|
|
207
213
|
mantineTableFooterProps
|
|
208
214
|
);
|
|
@@ -229,6 +235,7 @@ function mergeProTableProps(props) {
|
|
|
229
235
|
mantineTableFooterCellProps: mTableFooterCellProps,
|
|
230
236
|
mantineTableFooterRowProps: mTableFooterRowProps,
|
|
231
237
|
mantineTableFooterProps: mTableFooterProps,
|
|
238
|
+
layoutMode,
|
|
232
239
|
data,
|
|
233
240
|
icons: {
|
|
234
241
|
IconArrowsSort: (props2) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(index.IconSwitchVertical02, { size: 14, ...props2 }),
|
|
@@ -38,6 +38,7 @@ function mergeProTableProps(props) {
|
|
|
38
38
|
mantineTableFooterRowProps = {},
|
|
39
39
|
mantineTableFooterProps = {},
|
|
40
40
|
mantineLoadingOverlayProps = {},
|
|
41
|
+
layoutMode,
|
|
41
42
|
withBorder = true,
|
|
42
43
|
loading = false,
|
|
43
44
|
enableExpanding = false,
|
|
@@ -150,7 +151,12 @@ function mergeProTableProps(props) {
|
|
|
150
151
|
sx: {
|
|
151
152
|
"&:where([data-with-row-border]):not(:last-of-type)": {
|
|
152
153
|
td: {
|
|
153
|
-
borderBottom: enableRowVirtualization ? "none !important" : void 0
|
|
154
|
+
borderBottom: enableRowVirtualization || layoutMode && layoutMode !== "semantic" ? "none !important" : void 0
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"&[data-hover]": {
|
|
158
|
+
"&:hover": {
|
|
159
|
+
"--mrt-row-hover-background-color": theme.colors.carbon[3]
|
|
154
160
|
}
|
|
155
161
|
},
|
|
156
162
|
"&:not([data-striped], [data-striped='false'])": {
|
|
@@ -200,7 +206,7 @@ function mergeProTableProps(props) {
|
|
|
200
206
|
);
|
|
201
207
|
const mTableFooterProps = mergeMProps(
|
|
202
208
|
{
|
|
203
|
-
sx: { outline: enableStickyFooter ? "none" : void 0 }
|
|
209
|
+
sx: { outline: enableStickyFooter ? "none !important" : void 0 }
|
|
204
210
|
},
|
|
205
211
|
mantineTableFooterProps
|
|
206
212
|
);
|
|
@@ -227,6 +233,7 @@ function mergeProTableProps(props) {
|
|
|
227
233
|
mantineTableFooterCellProps: mTableFooterCellProps,
|
|
228
234
|
mantineTableFooterRowProps: mTableFooterRowProps,
|
|
229
235
|
mantineTableFooterProps: mTableFooterProps,
|
|
236
|
+
layoutMode,
|
|
230
237
|
data,
|
|
231
238
|
icons: {
|
|
232
239
|
IconArrowsSort: (props2) => /* @__PURE__ */ jsxRuntimeExports.jsx(IconSwitchVertical02, { size: 14, ...props2 }),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("../../../../../react@18.3.1/node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const clsx = require("clsx");
|
|
5
|
+
const index = require("../../../../../highlight.js@11.10.0/node_modules/highlight.js/lib/index.cjs");
|
|
6
|
+
const CodeHighlight_module_css = require("./CodeHighlight.module.css.cjs");
|
|
7
|
+
const CodeHighlight_theme_module_css = require("./CodeHighlight.theme.module.css.cjs");
|
|
8
|
+
const factory = require("../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/factory/factory.cjs");
|
|
9
|
+
const useProps = require("../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/MantineProvider/use-props/use-props.cjs");
|
|
10
|
+
const useStyles = require("../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/styles-api/use-styles/use-styles.cjs");
|
|
11
|
+
const Box = require("../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/Box/Box.cjs");
|
|
12
|
+
const classes = { ...CodeHighlight_module_css.default, code: clsx(CodeHighlight_module_css.default.code, CodeHighlight_theme_module_css.default.theme) };
|
|
13
|
+
const defaultProps = {
|
|
14
|
+
language: "tsx"
|
|
15
|
+
};
|
|
16
|
+
const InlineCodeHighlight = factory.factory((_props, ref) => {
|
|
17
|
+
const props = useProps.useProps("InlineCodeHighlight", defaultProps, _props);
|
|
18
|
+
const { classNames, className, style, styles, unstyled, vars, code, language, ...others } = props;
|
|
19
|
+
const getStyles = useStyles.useStyles({
|
|
20
|
+
name: "InlineCodeHighlight",
|
|
21
|
+
props,
|
|
22
|
+
classes,
|
|
23
|
+
className,
|
|
24
|
+
style,
|
|
25
|
+
classNames,
|
|
26
|
+
styles,
|
|
27
|
+
unstyled,
|
|
28
|
+
rootSelector: "code"
|
|
29
|
+
});
|
|
30
|
+
const highlighted = index.default.highlight(code.trim(), { language }).value;
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
32
|
+
Box.Box,
|
|
33
|
+
{
|
|
34
|
+
...getStyles("code"),
|
|
35
|
+
component: "code",
|
|
36
|
+
ref,
|
|
37
|
+
...others,
|
|
38
|
+
dangerouslySetInnerHTML: { __html: highlighted }
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
InlineCodeHighlight.displayName = "@mantine/core/InlineCodeHighlight";
|
|
43
|
+
exports.InlineCodeHighlight = InlineCodeHighlight;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../../../react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import HighlightJS from "../../../../../highlight.js@11.10.0/node_modules/highlight.js/lib/index.js";
|
|
4
|
+
import _classes from "./CodeHighlight.module.css.js";
|
|
5
|
+
import themeClasses from "./CodeHighlight.theme.module.css.js";
|
|
6
|
+
import { factory } from "../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/factory/factory.js";
|
|
7
|
+
import { useProps } from "../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/MantineProvider/use-props/use-props.js";
|
|
8
|
+
import { useStyles } from "../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/styles-api/use-styles/use-styles.js";
|
|
9
|
+
import { Box } from "../../../../../@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/core/Box/Box.js";
|
|
10
|
+
const classes = { ..._classes, code: clsx(_classes.code, themeClasses.theme) };
|
|
11
|
+
const defaultProps = {
|
|
12
|
+
language: "tsx"
|
|
13
|
+
};
|
|
14
|
+
const InlineCodeHighlight = factory((_props, ref) => {
|
|
15
|
+
const props = useProps("InlineCodeHighlight", defaultProps, _props);
|
|
16
|
+
const { classNames, className, style, styles, unstyled, vars, code, language, ...others } = props;
|
|
17
|
+
const getStyles = useStyles({
|
|
18
|
+
name: "InlineCodeHighlight",
|
|
19
|
+
props,
|
|
20
|
+
classes,
|
|
21
|
+
className,
|
|
22
|
+
style,
|
|
23
|
+
classNames,
|
|
24
|
+
styles,
|
|
25
|
+
unstyled,
|
|
26
|
+
rootSelector: "code"
|
|
27
|
+
});
|
|
28
|
+
const highlighted = HighlightJS.highlight(code.trim(), { language }).value;
|
|
29
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30
|
+
Box,
|
|
31
|
+
{
|
|
32
|
+
...getStyles("code"),
|
|
33
|
+
component: "code",
|
|
34
|
+
ref,
|
|
35
|
+
...others,
|
|
36
|
+
dangerouslySetInnerHTML: { __html: highlighted }
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
InlineCodeHighlight.displayName = "@mantine/core/InlineCodeHighlight";
|
|
41
|
+
export {
|
|
42
|
+
InlineCodeHighlight
|
|
43
|
+
};
|
package/dist/primitive/index.cjs
CHANGED
|
@@ -133,6 +133,7 @@ const TimeInput = require("../node_modules/.pnpm/@mantine_dates@7.13.2_@mantine_
|
|
|
133
133
|
const TextInput = require("./TextInput/TextInput.cjs");
|
|
134
134
|
const CodeHighlight = require("../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/CodeHighlight.cjs");
|
|
135
135
|
const CodeHighlightTabs = require("../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/CodeHighlightTabs.cjs");
|
|
136
|
+
const InlineCodeHighlight = require("../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/InlineCodeHighlight.cjs");
|
|
136
137
|
exports.useColorScheme = useColorScheme.useColorScheme;
|
|
137
138
|
exports.Dropzone = index.Dropzone;
|
|
138
139
|
exports.notifier = index$1.notifier;
|
|
@@ -272,3 +273,4 @@ exports.TimeInput = TimeInput.TimeInput;
|
|
|
272
273
|
exports.TextInput = TextInput.TextInput;
|
|
273
274
|
exports.CodeHighlight = CodeHighlight.CodeHighlight;
|
|
274
275
|
exports.CodeHighlightTabs = CodeHighlightTabs.CodeHighlightTabs;
|
|
276
|
+
exports.InlineCodeHighlight = InlineCodeHighlight.InlineCodeHighlight;
|
|
@@ -45,5 +45,5 @@ export { notifier } from './notifier/index.js';
|
|
|
45
45
|
export { Typography, TYPOGRAPHY_STYLES_MAP, type TypographyProps } from './Typography/index.js';
|
|
46
46
|
export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.js';
|
|
47
47
|
export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.js';
|
|
48
|
-
export { CodeHighlight, CodeHighlightTabs } from '@mantine/code-highlight';
|
|
49
|
-
export type { CodeHighlightProps, CodeHighlightTabsProps } from '@mantine/code-highlight';
|
|
48
|
+
export { CodeHighlight, CodeHighlightTabs, InlineCodeHighlight } from '@mantine/code-highlight';
|
|
49
|
+
export type { CodeHighlightProps, CodeHighlightTabsProps, InlineCodeHighlightProps } from '@mantine/code-highlight';
|
|
@@ -45,5 +45,5 @@ export { notifier } from './notifier/index.js';
|
|
|
45
45
|
export { Typography, TYPOGRAPHY_STYLES_MAP, type TypographyProps } from './Typography/index.js';
|
|
46
46
|
export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.js';
|
|
47
47
|
export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.js';
|
|
48
|
-
export { CodeHighlight, CodeHighlightTabs } from '@mantine/code-highlight';
|
|
49
|
-
export type { CodeHighlightProps, CodeHighlightTabsProps } from '@mantine/code-highlight';
|
|
48
|
+
export { CodeHighlight, CodeHighlightTabs, InlineCodeHighlight } from '@mantine/code-highlight';
|
|
49
|
+
export type { CodeHighlightProps, CodeHighlightTabsProps, InlineCodeHighlightProps } from '@mantine/code-highlight';
|
package/dist/primitive/index.js
CHANGED
|
@@ -131,6 +131,7 @@ import { TimeInput } from "../node_modules/.pnpm/@mantine_dates@7.13.2_@mantine_
|
|
|
131
131
|
import { TextInput } from "./TextInput/TextInput.js";
|
|
132
132
|
import { CodeHighlight } from "../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/CodeHighlight.js";
|
|
133
133
|
import { CodeHighlightTabs } from "../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/CodeHighlightTabs.js";
|
|
134
|
+
import { InlineCodeHighlight } from "../node_modules/.pnpm/@mantine_code-highlight@7.13.2_@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@ma_tdwfyw6pqjurzjjnx3eualyu44/node_modules/@mantine/code-highlight/esm/InlineCodeHighlight.js";
|
|
134
135
|
export {
|
|
135
136
|
Accordion,
|
|
136
137
|
ActionIcon,
|
|
@@ -188,6 +189,7 @@ export {
|
|
|
188
189
|
IMAGE_MIME_TYPE,
|
|
189
190
|
Image,
|
|
190
191
|
Indicator,
|
|
192
|
+
InlineCodeHighlight,
|
|
191
193
|
Input,
|
|
192
194
|
InputBase,
|
|
193
195
|
JsonInput,
|