@tidbcloud/uikit 2.0.0-beta.83 → 2.0.0-beta.85
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/TimeRangePicker/index.cjs +14 -1
- package/dist/biz/TimeRangePicker/index.js +14 -1
- 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
|
@@ -92,7 +92,20 @@ const TimeRangePicker = ({
|
|
|
92
92
|
...loading ? { "data-loading": true } : {},
|
|
93
93
|
children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(Group.Group, { w: "100%", gap: 0, children: [
|
|
94
94
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Box.Box, { sx: { flex: "none" }, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(DurationBadge, { children: helpers.formatDuration(duration, true) }) }),
|
|
95
|
-
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
96
|
+
Text.Text,
|
|
97
|
+
{
|
|
98
|
+
px: 8,
|
|
99
|
+
sx: {
|
|
100
|
+
flex: "1 1",
|
|
101
|
+
overflow: "hidden",
|
|
102
|
+
whiteSpace: "nowrap",
|
|
103
|
+
textOverflow: "ellipsis",
|
|
104
|
+
textAlign: "left"
|
|
105
|
+
},
|
|
106
|
+
children: isRelativeRange ? `Past ${helpers.formatDuration(duration)}` : formattedAbsDateTime
|
|
107
|
+
}
|
|
108
|
+
)
|
|
96
109
|
] })
|
|
97
110
|
}
|
|
98
111
|
) }) }),
|
|
@@ -91,7 +91,20 @@ const TimeRangePicker = ({
|
|
|
91
91
|
...loading ? { "data-loading": true } : {},
|
|
92
92
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { w: "100%", gap: 0, children: [
|
|
93
93
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { sx: { flex: "none" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DurationBadge, { children: formatDuration(duration, true) }) }),
|
|
94
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
94
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
95
|
+
Text,
|
|
96
|
+
{
|
|
97
|
+
px: 8,
|
|
98
|
+
sx: {
|
|
99
|
+
flex: "1 1",
|
|
100
|
+
overflow: "hidden",
|
|
101
|
+
whiteSpace: "nowrap",
|
|
102
|
+
textOverflow: "ellipsis",
|
|
103
|
+
textAlign: "left"
|
|
104
|
+
},
|
|
105
|
+
children: isRelativeRange ? `Past ${formatDuration(duration)}` : formattedAbsDateTime
|
|
106
|
+
}
|
|
107
|
+
)
|
|
95
108
|
] })
|
|
96
109
|
}
|
|
97
110
|
) }) }),
|
|
@@ -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,
|