@dmsi/wedgekit-react 0.0.92 → 0.0.94
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/dist/{chunk-LYVH4YFE.js → chunk-E5ZL2ZYX.js} +1 -0
- package/dist/components/DataGridCell.cjs +1 -0
- package/dist/components/DataGridCell.js +1 -1
- package/dist/components/PDFViewer.cjs +12 -2
- package/dist/components/PDFViewer.js +12 -2
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.js +1 -1
- package/package.json +1 -1
- package/src/components/DataGridCell.tsx +1 -0
- package/src/components/PDFViewer.tsx +14 -2
|
@@ -124,6 +124,7 @@ var DataGridCell = memo(
|
|
|
124
124
|
className,
|
|
125
125
|
"flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
|
|
126
126
|
"focus-within:!z-10",
|
|
127
|
+
"overflow-x-hidden",
|
|
127
128
|
component === "input" && "border",
|
|
128
129
|
component === "input" && !error && !warning && "border-border-primary-normal",
|
|
129
130
|
component === "input" && error && "border-border-primary-error",
|
|
@@ -1741,6 +1741,7 @@ var DataGridCell = (0, import_react10.memo)(
|
|
|
1741
1741
|
className,
|
|
1742
1742
|
"flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
|
|
1743
1743
|
"focus-within:!z-10",
|
|
1744
|
+
"overflow-x-hidden",
|
|
1744
1745
|
component === "input" && "border",
|
|
1745
1746
|
component === "input" && !error && !warning && "border-border-primary-normal",
|
|
1746
1747
|
component === "input" && error && "border-border-primary-error",
|
|
@@ -1145,11 +1145,21 @@ function PDFViewer(props) {
|
|
|
1145
1145
|
headerIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DownloadIcon, { onClick: handleDownload, isDownloading }),
|
|
1146
1146
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { sizing: "layout", children: [
|
|
1147
1147
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PDFElement, { b64: encodedPdfs[currentIndex].base64 }),
|
|
1148
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Stack, { horizontal: true, sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Stack, { horizontal: true, overflowX: "auto", sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1149
1149
|
Button,
|
|
1150
1150
|
{
|
|
1151
1151
|
variant: index === currentIndex ? "primary" : "secondary",
|
|
1152
|
-
onClick: () =>
|
|
1152
|
+
onClick: (e) => {
|
|
1153
|
+
setCurrentIndex(index);
|
|
1154
|
+
requestAnimationFrame(() => {
|
|
1155
|
+
const button = e.target;
|
|
1156
|
+
button.scrollIntoView({
|
|
1157
|
+
behavior: "smooth",
|
|
1158
|
+
block: "nearest",
|
|
1159
|
+
inline: "center"
|
|
1160
|
+
});
|
|
1161
|
+
});
|
|
1162
|
+
},
|
|
1153
1163
|
disabled: isDownloading || currentIndex === index,
|
|
1154
1164
|
children: pdf.fileName
|
|
1155
1165
|
},
|
|
@@ -54,11 +54,21 @@ function PDFViewer(props) {
|
|
|
54
54
|
headerIcon: /* @__PURE__ */ jsx(DownloadIcon, { onClick: handleDownload, isDownloading }),
|
|
55
55
|
children: /* @__PURE__ */ jsxs(Stack, { sizing: "layout", children: [
|
|
56
56
|
/* @__PURE__ */ jsx(PDFElement, { b64: encodedPdfs[currentIndex].base64 }),
|
|
57
|
-
/* @__PURE__ */ jsx(Stack, { horizontal: true, sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ jsx(
|
|
57
|
+
/* @__PURE__ */ jsx(Stack, { horizontal: true, overflowX: "auto", sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ jsx(
|
|
58
58
|
Button,
|
|
59
59
|
{
|
|
60
60
|
variant: index === currentIndex ? "primary" : "secondary",
|
|
61
|
-
onClick: () =>
|
|
61
|
+
onClick: (e) => {
|
|
62
|
+
setCurrentIndex(index);
|
|
63
|
+
requestAnimationFrame(() => {
|
|
64
|
+
const button = e.target;
|
|
65
|
+
button.scrollIntoView({
|
|
66
|
+
behavior: "smooth",
|
|
67
|
+
block: "nearest",
|
|
68
|
+
inline: "center"
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
},
|
|
62
72
|
disabled: isDownloading || currentIndex === index,
|
|
63
73
|
children: pdf.fileName
|
|
64
74
|
},
|
|
@@ -1784,6 +1784,7 @@ var DataGridCell = (0, import_react10.memo)(
|
|
|
1784
1784
|
className,
|
|
1785
1785
|
"flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
|
|
1786
1786
|
"focus-within:!z-10",
|
|
1787
|
+
"overflow-x-hidden",
|
|
1787
1788
|
component === "input" && "border",
|
|
1788
1789
|
component === "input" && !error && !warning && "border-border-primary-normal",
|
|
1789
1790
|
component === "input" && error && "border-border-primary-error",
|
package/dist/components/index.js
CHANGED
package/package.json
CHANGED
|
@@ -148,6 +148,7 @@ export const DataGridCell = memo(
|
|
|
148
148
|
className,
|
|
149
149
|
"flex flex-1 items-center gap-1 whitespace-nowrap h-10 relative text-text-primary-normal",
|
|
150
150
|
"focus-within:!z-10",
|
|
151
|
+
"overflow-x-hidden",
|
|
151
152
|
component === "input" && "border",
|
|
152
153
|
component === "input" &&
|
|
153
154
|
!error &&
|
|
@@ -49,12 +49,24 @@ export function PDFViewer(props: PDFViewerProps) {
|
|
|
49
49
|
>
|
|
50
50
|
<Stack sizing="layout">
|
|
51
51
|
<PDFElement b64={encodedPdfs[currentIndex].base64} />
|
|
52
|
-
<Stack horizontal sizing="layout-group">
|
|
52
|
+
<Stack horizontal overflowX="auto" sizing="layout-group">
|
|
53
53
|
{encodedPdfs.map((pdf, index) => (
|
|
54
54
|
<Button
|
|
55
55
|
variant={index === currentIndex ? "primary" : "secondary"}
|
|
56
56
|
key={`${pdf.fileName}-${index}`}
|
|
57
|
-
onClick={() =>
|
|
57
|
+
onClick={(e: React.MouseEvent<HTMLButtonElement>) => {
|
|
58
|
+
setCurrentIndex(index);
|
|
59
|
+
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
const button = e.target as HTMLButtonElement;
|
|
62
|
+
|
|
63
|
+
button.scrollIntoView({
|
|
64
|
+
behavior: "smooth",
|
|
65
|
+
block: "nearest",
|
|
66
|
+
inline: "center"
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}}
|
|
58
70
|
disabled={isDownloading || currentIndex === index}
|
|
59
71
|
>
|
|
60
72
|
{pdf.fileName}
|