fui-material 2.8.8 → 2.8.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/dist/f-ui-kit.es.js +50 -34
- package/dist/f-ui-kit.es.js.map +1 -1
- package/dist/f-ui-kit.umd.js +2 -2
- package/dist/f-ui-kit.umd.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/types/material/TableComponents/FTable/FTable.d.ts +10 -0
- package/dist/types/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +12 -0
- package/dist/types/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +12 -1
- package/package.json +1 -1
package/dist/f-ui-kit.es.js
CHANGED
|
@@ -713,39 +713,39 @@ const FPaper = ({
|
|
|
713
713
|
);
|
|
714
714
|
};
|
|
715
715
|
const TableControlsContext = createContext({ query: "", sort: null });
|
|
716
|
-
const left$1 = "
|
|
717
|
-
const center = "
|
|
718
|
-
const right = "
|
|
719
|
-
const justify = "
|
|
720
|
-
const more = "
|
|
716
|
+
const left$1 = "_left_18u6h_77";
|
|
717
|
+
const center = "_center_18u6h_80";
|
|
718
|
+
const right = "_right_18u6h_83";
|
|
719
|
+
const justify = "_justify_18u6h_86";
|
|
720
|
+
const more = "_more_18u6h_194";
|
|
721
721
|
const styles$t = {
|
|
722
|
-
"f-table-component": "_f-table-
|
|
723
|
-
"f-table-component__table": "_f-table-
|
|
724
|
-
"f-table-component__table_header": "_f-table-
|
|
725
|
-
"is-sticky": "_is-
|
|
726
|
-
"f-table-component__table_header-cell": "_f-table-component__table_header-
|
|
727
|
-
"f-table-component__table_body-cell": "_f-table-component__table_body-
|
|
728
|
-
"f-table-component__table_body": "_f-table-
|
|
729
|
-
"f-table-component__table_row": "_f-table-
|
|
730
|
-
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-
|
|
731
|
-
"f-table-component__table_footer": "_f-table-
|
|
722
|
+
"f-table-component": "_f-table-component_18u6h_1",
|
|
723
|
+
"f-table-component__table": "_f-table-component__table_18u6h_14",
|
|
724
|
+
"f-table-component__table_header": "_f-table-component__table_header_18u6h_22",
|
|
725
|
+
"is-sticky": "_is-sticky_18u6h_26",
|
|
726
|
+
"f-table-component__table_header-cell": "_f-table-component__table_header-cell_18u6h_32",
|
|
727
|
+
"f-table-component__table_body-cell": "_f-table-component__table_body-cell_18u6h_32",
|
|
728
|
+
"f-table-component__table_body": "_f-table-component__table_body_18u6h_32",
|
|
729
|
+
"f-table-component__table_row": "_f-table-component__table_row_18u6h_60",
|
|
730
|
+
"f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_18u6h_60",
|
|
731
|
+
"f-table-component__table_footer": "_f-table-component__table_footer_18u6h_66",
|
|
732
732
|
left: left$1,
|
|
733
733
|
center,
|
|
734
734
|
right,
|
|
735
735
|
justify,
|
|
736
|
-
"cell-text": "_cell-
|
|
737
|
-
"cell-preview-text": "_cell-preview-
|
|
738
|
-
"cell-preview": "_cell-
|
|
739
|
-
"cell-reveal": "_cell-
|
|
736
|
+
"cell-text": "_cell-text_18u6h_90",
|
|
737
|
+
"cell-preview-text": "_cell-preview-text_18u6h_111",
|
|
738
|
+
"cell-preview": "_cell-preview_18u6h_111",
|
|
739
|
+
"cell-reveal": "_cell-reveal_18u6h_168",
|
|
740
740
|
more,
|
|
741
|
-
"row-menu": "_row-
|
|
742
|
-
"table-tools": "_table-
|
|
743
|
-
"table-search": "_table-
|
|
744
|
-
"table-sort": "_table-
|
|
745
|
-
"table-empty": "_table-
|
|
746
|
-
"cell-tooltip-anchor": "_cell-tooltip-
|
|
747
|
-
"cell-tooltip": "_cell-
|
|
748
|
-
"cell-tooltip-in": "_cell-tooltip-
|
|
741
|
+
"row-menu": "_row-menu_18u6h_225",
|
|
742
|
+
"table-tools": "_table-tools_18u6h_317",
|
|
743
|
+
"table-search": "_table-search_18u6h_323",
|
|
744
|
+
"table-sort": "_table-sort_18u6h_358",
|
|
745
|
+
"table-empty": "_table-empty_18u6h_386",
|
|
746
|
+
"cell-tooltip-anchor": "_cell-tooltip-anchor_18u6h_393",
|
|
747
|
+
"cell-tooltip": "_cell-tooltip_18u6h_393",
|
|
748
|
+
"cell-tooltip-in": "_cell-tooltip-in_18u6h_1"
|
|
749
749
|
};
|
|
750
750
|
const FTableHead = ({
|
|
751
751
|
st,
|
|
@@ -982,6 +982,8 @@ const FTable = ({
|
|
|
982
982
|
layout = "auto",
|
|
983
983
|
// Добавляем новый пропс с дефолтным значением 'auto'
|
|
984
984
|
searchable = false,
|
|
985
|
+
width,
|
|
986
|
+
minWidth,
|
|
985
987
|
...props
|
|
986
988
|
}) => {
|
|
987
989
|
const tableWrapperRef = useRef(null);
|
|
@@ -1039,7 +1041,12 @@ const FTable = ({
|
|
|
1039
1041
|
children: /* @__PURE__ */ jsx(
|
|
1040
1042
|
"table",
|
|
1041
1043
|
{
|
|
1042
|
-
style: {
|
|
1044
|
+
style: {
|
|
1045
|
+
tableLayout: layout,
|
|
1046
|
+
...width !== void 0 ? { width } : {},
|
|
1047
|
+
...minWidth !== void 0 ? { minWidth } : {},
|
|
1048
|
+
...st
|
|
1049
|
+
},
|
|
1043
1050
|
...props,
|
|
1044
1051
|
className: `table ${styles$t["f-table-component__table"]} ${props.className || ""}`,
|
|
1045
1052
|
children: React.Children.map(children, (child) => {
|
|
@@ -1106,8 +1113,9 @@ const FTableHeaderCell = ({
|
|
|
1106
1113
|
children,
|
|
1107
1114
|
textAlignment,
|
|
1108
1115
|
// По умолчанию выравнивания нет
|
|
1109
|
-
width
|
|
1110
|
-
|
|
1116
|
+
width,
|
|
1117
|
+
minWidth,
|
|
1118
|
+
maxWidth,
|
|
1111
1119
|
height,
|
|
1112
1120
|
sortKey,
|
|
1113
1121
|
...props
|
|
@@ -1115,10 +1123,13 @@ const FTableHeaderCell = ({
|
|
|
1115
1123
|
const { sort, toggleSort } = useContext(TableControlsContext);
|
|
1116
1124
|
const sortable = Boolean(sortKey && toggleSort);
|
|
1117
1125
|
const direction = (sort == null ? void 0 : sort.key) === sortKey ? sort == null ? void 0 : sort.direction : void 0;
|
|
1126
|
+
const resolvedMinWidth = minWidth !== void 0 ? minWidth : width !== void 0 && width !== "auto" && !String(width).includes("%") ? width : void 0;
|
|
1118
1127
|
const style = {
|
|
1119
1128
|
textAlign: textAlignment,
|
|
1120
|
-
width,
|
|
1121
|
-
|
|
1129
|
+
...width !== void 0 ? { width } : {},
|
|
1130
|
+
...resolvedMinWidth !== void 0 ? { minWidth: resolvedMinWidth } : {},
|
|
1131
|
+
...maxWidth !== void 0 ? { maxWidth } : {},
|
|
1132
|
+
...height !== void 0 ? { height } : {},
|
|
1122
1133
|
...st
|
|
1123
1134
|
};
|
|
1124
1135
|
return /* @__PURE__ */ jsx(
|
|
@@ -1229,6 +1240,8 @@ const FTableDataCell = ({
|
|
|
1229
1240
|
children,
|
|
1230
1241
|
textAlignment,
|
|
1231
1242
|
width,
|
|
1243
|
+
minWidth,
|
|
1244
|
+
maxWidth,
|
|
1232
1245
|
height,
|
|
1233
1246
|
truncate,
|
|
1234
1247
|
sortKey: _sortKey,
|
|
@@ -1242,10 +1255,13 @@ const FTableDataCell = ({
|
|
|
1242
1255
|
const text = typeof children === "string" || typeof children === "number" ? String(children) : null;
|
|
1243
1256
|
const limit = truncateAt !== void 0 && Number.isFinite(truncateAt) && truncateAt >= 1 ? Math.floor(truncateAt) : truncate ? 40 : void 0;
|
|
1244
1257
|
const collapsible = truncate !== false && limit !== void 0 && text !== null && text.length > limit;
|
|
1258
|
+
const resolvedMinWidth = minWidth !== void 0 ? minWidth : width !== void 0 && width !== "auto" && !String(width).includes("%") ? width : void 0;
|
|
1245
1259
|
const style = {
|
|
1246
1260
|
textAlign: textAlignment,
|
|
1247
|
-
width,
|
|
1248
|
-
|
|
1261
|
+
...width !== void 0 ? { width } : {},
|
|
1262
|
+
...resolvedMinWidth !== void 0 ? { minWidth: resolvedMinWidth } : {},
|
|
1263
|
+
...maxWidth !== void 0 ? { maxWidth } : {},
|
|
1264
|
+
...height !== void 0 ? { height } : {},
|
|
1249
1265
|
...st
|
|
1250
1266
|
};
|
|
1251
1267
|
return /* @__PURE__ */ jsx(
|