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.
@@ -713,39 +713,39 @@ const FPaper = ({
713
713
  );
714
714
  };
715
715
  const TableControlsContext = createContext({ query: "", sort: null });
716
- const left$1 = "_left_13igk_78";
717
- const center = "_center_13igk_81";
718
- const right = "_right_13igk_84";
719
- const justify = "_justify_13igk_87";
720
- const more = "_more_13igk_195";
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-component_13igk_1",
723
- "f-table-component__table": "_f-table-component__table_13igk_13",
724
- "f-table-component__table_header": "_f-table-component__table_header_13igk_23",
725
- "is-sticky": "_is-sticky_13igk_27",
726
- "f-table-component__table_header-cell": "_f-table-component__table_header-cell_13igk_33",
727
- "f-table-component__table_body-cell": "_f-table-component__table_body-cell_13igk_33",
728
- "f-table-component__table_body": "_f-table-component__table_body_13igk_33",
729
- "f-table-component__table_row": "_f-table-component__table_row_13igk_61",
730
- "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_13igk_61",
731
- "f-table-component__table_footer": "_f-table-component__table_footer_13igk_67",
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-text_13igk_91",
737
- "cell-preview-text": "_cell-preview-text_13igk_112",
738
- "cell-preview": "_cell-preview_13igk_112",
739
- "cell-reveal": "_cell-reveal_13igk_169",
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-menu_13igk_226",
742
- "table-tools": "_table-tools_13igk_318",
743
- "table-search": "_table-search_13igk_324",
744
- "table-sort": "_table-sort_13igk_359",
745
- "table-empty": "_table-empty_13igk_387",
746
- "cell-tooltip-anchor": "_cell-tooltip-anchor_13igk_394",
747
- "cell-tooltip": "_cell-tooltip_13igk_394",
748
- "cell-tooltip-in": "_cell-tooltip-in_13igk_1"
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: { ...st, tableLayout: layout },
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 = "auto",
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
- height,
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
- height,
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(