@tidbcloud/uikit 2.4.0 → 2.4.2

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,20 @@
1
1
  # @tidbcloud/uikit
2
2
 
3
+ ## 2.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(uikit): clean up icon usage and remove unnecessary strokeWidth in CodeBlock and ProMultiSelect ([#546](https://github.com/tidbcloud/tidbcloud-uikit/pull/546))
8
+ - fix(biz): add horizontal scroll support to AppPageShell ([#544](https://github.com/tidbcloud/tidbcloud-uikit/pull/544))
9
+ - fix(uikit): clean up icon usage and remove unnecessary strokeWidth in CodeBlock and ProMultiSelect ([#546](https://github.com/tidbcloud/tidbcloud-uikit/pull/546))
10
+ - fix(biz): add horizontal scroll support to AppPageShell ([#544](https://github.com/tidbcloud/tidbcloud-uikit/pull/544))
11
+
12
+ ## 2.4.1
13
+
14
+ ### Patch Changes
15
+
16
+ - refactor(biz/app-shell): extract back button props for cleaner prop handling ([#542](https://github.com/tidbcloud/tidbcloud-uikit/pull/542))
17
+
3
18
  ## 2.4.0
4
19
 
5
20
  ### Minor Changes
@@ -37,7 +37,8 @@ const AppPageShell = ({
37
37
  height: "100%",
38
38
  maxWidth: `min(100%, ${maxWidth})`,
39
39
  margin: "0 auto",
40
- padding: 24
40
+ padding: 24,
41
+ overflowX: "auto"
41
42
  },
42
43
  bodyProps == null ? void 0 : bodyProps.sx
43
44
  ]),
@@ -45,6 +46,7 @@ const AppPageShell = ({
45
46
  }
46
47
  );
47
48
  }
49
+ const { withBack, onBackClick, ...headerPropsWithoutBack } = headerProps ?? {};
48
50
  return /* @__PURE__ */ jsxRuntime.jsxs(
49
51
  PageShellBaseRoot.PageShellBaseRoot,
50
52
  {
@@ -59,7 +61,8 @@ const AppPageShell = ({
59
61
  height: "100%",
60
62
  maxWidth: `min(100%, ${maxWidth})`,
61
63
  margin: "0 auto",
62
- minWidth: `calc(${theme.breakpoints.md} - var(--app-shell-navbar-offset))`
64
+ minWidth: `calc(${theme.breakpoints.md} - var(--app-shell-navbar-offset))`,
65
+ overflowX: "auto"
63
66
  }),
64
67
  wrapperProps == null ? void 0 : wrapperProps.sx
65
68
  ]),
@@ -67,10 +70,10 @@ const AppPageShell = ({
67
70
  /* @__PURE__ */ jsxRuntime.jsx(
68
71
  PageShellBaseHeader.PageShellBaseHeader,
69
72
  {
70
- ...headerProps,
73
+ ...headerPropsWithoutBack,
71
74
  leftSection: /* @__PURE__ */ jsxRuntime.jsxs(Group.Group, { wrap: "nowrap", gap: 0, children: [
72
75
  /* @__PURE__ */ jsxRuntime.jsx(ExpandNavbarButtonPlaceholder.ExpandNavbarButtonPlaceholder, {}),
73
- (headerProps == null ? void 0 : headerProps.withBack) && /* @__PURE__ */ jsxRuntime.jsx(PageShellBaseBackButton.PageShellBaseBackButton, { onClick: headerProps == null ? void 0 : headerProps.onBackClick, mr: "md" })
76
+ withBack && /* @__PURE__ */ jsxRuntime.jsx(PageShellBaseBackButton.PageShellBaseBackButton, { onClick: onBackClick, mr: "md" })
74
77
  ] }),
75
78
  sx: styles.mergeSxList([
76
79
  (theme) => ({
@@ -35,7 +35,8 @@ const AppPageShell = ({
35
35
  height: "100%",
36
36
  maxWidth: `min(100%, ${maxWidth})`,
37
37
  margin: "0 auto",
38
- padding: 24
38
+ padding: 24,
39
+ overflowX: "auto"
39
40
  },
40
41
  bodyProps == null ? void 0 : bodyProps.sx
41
42
  ]),
@@ -43,6 +44,7 @@ const AppPageShell = ({
43
44
  }
44
45
  );
45
46
  }
47
+ const { withBack, onBackClick, ...headerPropsWithoutBack } = headerProps ?? {};
46
48
  return /* @__PURE__ */ jsxs(
47
49
  PageShellBaseRoot,
48
50
  {
@@ -57,7 +59,8 @@ const AppPageShell = ({
57
59
  height: "100%",
58
60
  maxWidth: `min(100%, ${maxWidth})`,
59
61
  margin: "0 auto",
60
- minWidth: `calc(${theme.breakpoints.md} - var(--app-shell-navbar-offset))`
62
+ minWidth: `calc(${theme.breakpoints.md} - var(--app-shell-navbar-offset))`,
63
+ overflowX: "auto"
61
64
  }),
62
65
  wrapperProps == null ? void 0 : wrapperProps.sx
63
66
  ]),
@@ -65,10 +68,10 @@ const AppPageShell = ({
65
68
  /* @__PURE__ */ jsx(
66
69
  PageShellBaseHeader,
67
70
  {
68
- ...headerProps,
71
+ ...headerPropsWithoutBack,
69
72
  leftSection: /* @__PURE__ */ jsxs(Group, { wrap: "nowrap", gap: 0, children: [
70
73
  /* @__PURE__ */ jsx(ExpandNavbarButtonPlaceholder, {}),
71
- (headerProps == null ? void 0 : headerProps.withBack) && /* @__PURE__ */ jsx(PageShellBaseBackButton, { onClick: headerProps == null ? void 0 : headerProps.onBackClick, mr: "md" })
74
+ withBack && /* @__PURE__ */ jsx(PageShellBaseBackButton, { onClick: onBackClick, mr: "md" })
72
75
  ] }),
73
76
  sx: mergeSxList([
74
77
  (theme) => ({
@@ -105,7 +105,7 @@ const CodeBlock = ({
105
105
  setFolded(v);
106
106
  onFoldIconClick == null ? void 0 : onFoldIconClick(v);
107
107
  },
108
- children: folded ? /* @__PURE__ */ jsxRuntime.jsx(index.IconChevronVerticalExpand, { size: 14, strokeWidth: 2.5 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconChevronVerticalShrink, { size: 14, strokeWidth: 2.5 })
108
+ children: folded ? /* @__PURE__ */ jsxRuntime.jsx(index.IconChevronVerticalExpand, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconChevronVerticalShrink, { size: 14 })
109
109
  }
110
110
  ) }),
111
111
  /* @__PURE__ */ jsxRuntime.jsx(HoverCard.HoverCard.Dropdown, { p: "xs", children: folded ? "Expand" : "Collapse" })
@@ -121,7 +121,7 @@ const CodeBlock = ({
121
121
  copy();
122
122
  onCopyClick == null ? void 0 : onCopyClick();
123
123
  },
124
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx(index.IconCheck, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconCopy01, { size: 14, strokeWidth: 2.5 })
124
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(index.IconCheck, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconCopy01, { size: 14 })
125
125
  }
126
126
  ) }),
127
127
  /* @__PURE__ */ jsxRuntime.jsx(HoverCard.HoverCard.Dropdown, { p: "xs", children: copied ? "Copied" : "Copy" })
@@ -162,7 +162,7 @@ const CopyText = ({ children, value, ...rest }) => {
162
162
  onClick: () => {
163
163
  copy();
164
164
  },
165
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx(index.IconCheck, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconCopy01, { size: 14, strokeWidth: 2.5 })
165
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(index.IconCheck, { size: 14 }) : /* @__PURE__ */ jsxRuntime.jsx(index.IconCopy01, { size: 14 })
166
166
  }
167
167
  ) }),
168
168
  /* @__PURE__ */ jsxRuntime.jsx(HoverCard.HoverCard.Dropdown, { p: "xs", children: copied ? "Copied" : "Copy" })
@@ -103,7 +103,7 @@ const CodeBlock = ({
103
103
  setFolded(v);
104
104
  onFoldIconClick == null ? void 0 : onFoldIconClick(v);
105
105
  },
106
- children: folded ? /* @__PURE__ */ jsx(IconChevronVerticalExpand, { size: 14, strokeWidth: 2.5 }) : /* @__PURE__ */ jsx(IconChevronVerticalShrink, { size: 14, strokeWidth: 2.5 })
106
+ children: folded ? /* @__PURE__ */ jsx(IconChevronVerticalExpand, { size: 14 }) : /* @__PURE__ */ jsx(IconChevronVerticalShrink, { size: 14 })
107
107
  }
108
108
  ) }),
109
109
  /* @__PURE__ */ jsx(HoverCard.Dropdown, { p: "xs", children: folded ? "Expand" : "Collapse" })
@@ -119,7 +119,7 @@ const CodeBlock = ({
119
119
  copy();
120
120
  onCopyClick == null ? void 0 : onCopyClick();
121
121
  },
122
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy01, { size: 14, strokeWidth: 2.5 })
122
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy01, { size: 14 })
123
123
  }
124
124
  ) }),
125
125
  /* @__PURE__ */ jsx(HoverCard.Dropdown, { p: "xs", children: copied ? "Copied" : "Copy" })
@@ -160,7 +160,7 @@ const CopyText = ({ children, value, ...rest }) => {
160
160
  onClick: () => {
161
161
  copy();
162
162
  },
163
- children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy01, { size: 14, strokeWidth: 2.5 })
163
+ children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy01, { size: 14 })
164
164
  }
165
165
  ) }),
166
166
  /* @__PURE__ */ jsx(HoverCard.Dropdown, { p: "xs", children: copied ? "Copied" : "Copy" })
@@ -428,7 +428,7 @@ const ProMultiSelect = (_props) => {
428
428
  searchable && /* @__PURE__ */ jsxRuntime.jsx(
429
429
  Combobox.Combobox.Search,
430
430
  {
431
- leftSection: /* @__PURE__ */ jsxRuntime.jsx(index.IconSearchLg, { size: 16, c: "gray.9", strokeWidth: 2 }),
431
+ leftSection: /* @__PURE__ */ jsxRuntime.jsx(index.IconSearchLg, { size: 16, c: "gray.9" }),
432
432
  value: _searchValue,
433
433
  onChange: (event) => {
434
434
  setSearchValue(event.currentTarget.value);
@@ -426,7 +426,7 @@ const ProMultiSelect = (_props) => {
426
426
  searchable && /* @__PURE__ */ jsx(
427
427
  Combobox.Search,
428
428
  {
429
- leftSection: /* @__PURE__ */ jsx(IconSearchLg, { size: 16, c: "gray.9", strokeWidth: 2 }),
429
+ leftSection: /* @__PURE__ */ jsx(IconSearchLg, { size: 16, c: "gray.9" }),
430
430
  value: _searchValue,
431
431
  onChange: (event) => {
432
432
  setSearchValue(event.currentTarget.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidbcloud/uikit",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "tidbcloud uikit",
5
5
  "type": "module",
6
6
  "main": "dist/primitive/index.cjs",
@@ -1,3 +0,0 @@
1
- export default Application;
2
- declare const Application: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Application;
2
- declare const Application: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default DataApiSystem;
2
- declare const DataApiSystem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default DataApiSystem;
2
- declare const DataApiSystem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Edit02;
2
- declare const Edit02: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Edit02;
2
- declare const Edit02: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default LineChart;
2
- declare const LineChart: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default LineChart;
2
- declare const LineChart: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Moon02;
2
- declare const Moon02: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Moon02;
2
- declare const Moon02: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Server01;
2
- declare const Server01: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Server01;
2
- declare const Server01: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Service;
2
- declare const Service: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default Service;
2
- declare const Service: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default SystemDatabase;
2
- declare const SystemDatabase: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default SystemDatabase;
2
- declare const SystemDatabase: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default TerminalBrowser1;
2
- declare const TerminalBrowser1: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';
@@ -1,3 +0,0 @@
1
- export default TerminalBrowser1;
2
- declare const TerminalBrowser1: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
3
- import * as React from 'react';