@tidbcloud/uikit 2.0.7 → 2.0.9
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tidbcloud/uikit
|
|
2
2
|
|
|
3
|
+
## 2.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- refine(time_range_picker): update default order of timerange ([#458](https://github.com/tidbcloud/tidbcloud-uikit/pull/458))
|
|
8
|
+
|
|
9
|
+
## 2.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix(uikit): adjust Select component null value handling ([#456](https://github.com/tidbcloud/tidbcloud-uikit/pull/456))
|
|
14
|
+
|
|
3
15
|
## 2.0.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,15 +6,15 @@ const dayjs = require("dayjs");
|
|
|
6
6
|
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.cjs");
|
|
7
7
|
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.cjs");
|
|
8
8
|
const DEFAULT_QUICK_RANGES = [
|
|
9
|
-
|
|
10
|
-
2 * 24 * 60 * 60,
|
|
11
|
-
24 * 60 * 60,
|
|
12
|
-
12 * 60 * 60,
|
|
13
|
-
3 * 60 * 60,
|
|
14
|
-
60 * 60,
|
|
15
|
-
30 * 60,
|
|
9
|
+
5 * 60,
|
|
16
10
|
15 * 60,
|
|
17
|
-
|
|
11
|
+
30 * 60,
|
|
12
|
+
60 * 60,
|
|
13
|
+
3 * 60 * 60,
|
|
14
|
+
12 * 60 * 60,
|
|
15
|
+
24 * 60 * 60,
|
|
16
|
+
2 * 24 * 60 * 60,
|
|
17
|
+
3 * 24 * 60 * 60
|
|
18
18
|
];
|
|
19
19
|
const DEFAULT_TIME_RANGE = {
|
|
20
20
|
type: "relative",
|
|
@@ -4,15 +4,15 @@ import dayjs from "dayjs";
|
|
|
4
4
|
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.mjs";
|
|
5
5
|
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.mjs";
|
|
6
6
|
const DEFAULT_QUICK_RANGES = [
|
|
7
|
-
|
|
8
|
-
2 * 24 * 60 * 60,
|
|
9
|
-
24 * 60 * 60,
|
|
10
|
-
12 * 60 * 60,
|
|
11
|
-
3 * 60 * 60,
|
|
12
|
-
60 * 60,
|
|
13
|
-
30 * 60,
|
|
7
|
+
5 * 60,
|
|
14
8
|
15 * 60,
|
|
15
|
-
|
|
9
|
+
30 * 60,
|
|
10
|
+
60 * 60,
|
|
11
|
+
3 * 60 * 60,
|
|
12
|
+
12 * 60 * 60,
|
|
13
|
+
24 * 60 * 60,
|
|
14
|
+
2 * 24 * 60 * 60,
|
|
15
|
+
3 * 24 * 60 * 60
|
|
16
16
|
];
|
|
17
17
|
const DEFAULT_TIME_RANGE = {
|
|
18
18
|
type: "relative",
|
|
@@ -15,8 +15,7 @@ function useCreateableSelect(props) {
|
|
|
15
15
|
throw new Error("`onCreate` is required when `creatable` is true");
|
|
16
16
|
}
|
|
17
17
|
const [value, setValue] = useUncontrolled.useUncontrolled({
|
|
18
|
-
value: props.value
|
|
19
|
-
// use null value to clear input
|
|
18
|
+
value: props.value,
|
|
20
19
|
onChange: props.onChange,
|
|
21
20
|
defaultValue: props.defaultValue
|
|
22
21
|
});
|
|
@@ -76,7 +75,7 @@ function useCreateableSelect(props) {
|
|
|
76
75
|
}
|
|
77
76
|
function Select(props) {
|
|
78
77
|
const allProps = useCreateableSelect(props);
|
|
79
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Select$1.Select, { ...allProps });
|
|
78
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Select$1.Select, { ...allProps, value: props.value || null });
|
|
80
79
|
}
|
|
81
80
|
function MultiSelect(props) {
|
|
82
81
|
const allProps = useCreateableSelect(props);
|
|
@@ -13,8 +13,7 @@ function useCreateableSelect(props) {
|
|
|
13
13
|
throw new Error("`onCreate` is required when `creatable` is true");
|
|
14
14
|
}
|
|
15
15
|
const [value, setValue] = useUncontrolled({
|
|
16
|
-
value: props.value
|
|
17
|
-
// use null value to clear input
|
|
16
|
+
value: props.value,
|
|
18
17
|
onChange: props.onChange,
|
|
19
18
|
defaultValue: props.defaultValue
|
|
20
19
|
});
|
|
@@ -74,7 +73,7 @@ function useCreateableSelect(props) {
|
|
|
74
73
|
}
|
|
75
74
|
function Select(props) {
|
|
76
75
|
const allProps = useCreateableSelect(props);
|
|
77
|
-
return /* @__PURE__ */ jsx(Select$1, { ...allProps });
|
|
76
|
+
return /* @__PURE__ */ jsx(Select$1, { ...allProps, value: props.value || null });
|
|
78
77
|
}
|
|
79
78
|
function MultiSelect(props) {
|
|
80
79
|
const allProps = useCreateableSelect(props);
|