ar-design 0.1.75 → 0.1.76
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.
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
right: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.ar-table > .content > table > thead > tr > th.sticky-left.sticky,
|
|
23
|
+
.ar-table > .content > table > thead > tr > th.sticky-right.sticky {
|
|
24
|
+
background-color: var(--gray-100);
|
|
25
|
+
}
|
|
22
26
|
.ar-table > .content > table > thead > tr > th.sticky-left.sticky::after,
|
|
23
27
|
.ar-table > .content > table > thead > tr > th.sticky-left.active-sticky::after,
|
|
24
28
|
.ar-table > .content > table > thead > tr > th.sticky-right.sticky::after,
|
|
@@ -39,6 +43,7 @@
|
|
|
39
43
|
}
|
|
40
44
|
.ar-table > .content > table > tbody > tr > td.sticky-left.sticky,
|
|
41
45
|
.ar-table > .content > table > tbody > tr > td.sticky-right.sticky {
|
|
46
|
+
background-color: var(--gray-100);
|
|
42
47
|
box-shadow: inset -1px 0 0 0 var(--gray-200);
|
|
43
48
|
}
|
|
44
49
|
.ar-table > .content > table > tbody > tr > td.sticky-right.sticky {
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
height: 100%;
|
|
15
15
|
}
|
|
16
16
|
.ar-layout > main > aside.ar-aside.left {
|
|
17
|
-
|
|
17
|
+
width: 100%;
|
|
18
18
|
min-height: calc(100vh - 7.5rem);
|
|
19
19
|
border-right: solid 1px var(--gray-200);
|
|
20
20
|
}
|
|
21
21
|
.ar-layout > main > aside.ar-aside.right {
|
|
22
|
-
|
|
22
|
+
width: 100%;
|
|
23
23
|
}
|
|
24
24
|
.ar-layout > main > section {
|
|
25
|
-
|
|
25
|
+
min-width: 1000px;
|
|
26
26
|
height: fit-content;
|
|
27
27
|
border-radius: var(--border-radius-lg);
|
|
28
28
|
}
|
|
@@ -127,6 +127,9 @@ const Table = function ({ children, title, description, data, columns, actions,
|
|
|
127
127
|
: _data;
|
|
128
128
|
}, [data, searchedText, currentPage]);
|
|
129
129
|
// useEffects
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
handleOnScroll();
|
|
132
|
+
}, [data]);
|
|
130
133
|
useEffect(() => {
|
|
131
134
|
if (!selections || selectionItems.length === 0)
|
|
132
135
|
return;
|
|
@@ -181,9 +184,21 @@ const Table = function ({ children, title, description, data, columns, actions,
|
|
|
181
184
|
config?.isSearchable && (React.createElement("tr", { key: "isSearchable" },
|
|
182
185
|
selections && React.createElement("th", { key: `column-selections` }),
|
|
183
186
|
columns.map((c, cIndex) => {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
let _className = [];
|
|
188
|
+
if (c.config?.sticky)
|
|
189
|
+
_className.push(`sticky-${c.config.sticky}`);
|
|
190
|
+
if (c.config?.alignContent) {
|
|
191
|
+
_className.push(`align-content-${c.config.alignContent}`);
|
|
192
|
+
}
|
|
193
|
+
if (!c.key)
|
|
194
|
+
return (React.createElement("th", { key: `column-${cIndex}`, ...(_className.length > 0 && {
|
|
195
|
+
className: `${_className.map((c) => c).join(" ")}`,
|
|
196
|
+
}), ...(c.config?.sticky && {
|
|
197
|
+
"data-sticky-position": c.config.sticky,
|
|
198
|
+
}) }));
|
|
199
|
+
return (React.createElement("th", { key: `column-${cIndex}`, ...(_className.length > 0 && {
|
|
200
|
+
className: `${_className.map((c) => c).join(" ")}`,
|
|
201
|
+
}), ...(c.config?.sticky && {
|
|
187
202
|
"data-sticky-position": c.config.sticky,
|
|
188
203
|
}) },
|
|
189
204
|
React.createElement("input", { className: "search-input", onChange: (event) => setSearchedText((prev) => {
|
|
@@ -234,7 +249,7 @@ const Table = function ({ children, title, description, data, columns, actions,
|
|
|
234
249
|
if (c.config?.textWrap)
|
|
235
250
|
_className.push(`text-${c.config.textWrap}`);
|
|
236
251
|
return (React.createElement("td", { key: `cell-${index}-${cIndex}`, ...(c.config?.width && {
|
|
237
|
-
style: {
|
|
252
|
+
style: { minWidth: c.config.width },
|
|
238
253
|
}), ...(_className.length > 0 && {
|
|
239
254
|
className: `${_className.map((c) => c).join(" ")}`,
|
|
240
255
|
}), ...(c.config?.sticky && {
|
|
@@ -23,7 +23,7 @@ const Select = ({ variant = "outlined", status, border = { radius: "sm" }, optio
|
|
|
23
23
|
const [searchText, setSearchText] = useState("");
|
|
24
24
|
const [singleInputText, setSingleInputText] = useState("");
|
|
25
25
|
const [navigationIndex, setNavigationIndex] = useState(0);
|
|
26
|
-
_selectionClassName.push(...Utils.GetClassName(variant, validation ? "danger" : "light", border, undefined, undefined, undefined));
|
|
26
|
+
_selectionClassName.push(...Utils.GetClassName(variant, validation?.text ? "danger" : "light", border, undefined, undefined, undefined));
|
|
27
27
|
// methods
|
|
28
28
|
const handleClickOutSide = (event) => {
|
|
29
29
|
const target = event.target;
|
|
@@ -77,6 +77,7 @@ const Select = ({ variant = "outlined", status, border = { radius: "sm" }, optio
|
|
|
77
77
|
? InpuRect.top - optionRect.height - (multiple ? 20 : 0)
|
|
78
78
|
: InpuRect.top + InpuRect.height) + sy}px`;
|
|
79
79
|
_options.current.style.left = `${InpuRect.left + sx}px`;
|
|
80
|
+
_options.current.style.minWidth = "200px";
|
|
80
81
|
_options.current.style.width = `${InpuRect.width}px`;
|
|
81
82
|
}
|
|
82
83
|
}
|