fui-material 2.0.2 → 2.1.0
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 +43 -40
- package/dist/f-ui-kit.es.js.map +1 -1
- package/dist/main.css +1 -1
- package/dist/types/material/FButton/FButton.d.ts +1 -1
- package/dist/types/material/FTooltip/FTooltip.d.ts +128 -0
- package/dist/types/material/FTooltip/index.d.ts +1 -0
- package/dist/types/material/TableComponents/FTableRow/FTableRow.d.ts +6 -0
- package/dist/types/material/Tabs/FTab/FTab.d.ts +1 -2
- package/package.json +1 -1
package/dist/f-ui-kit.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState,
|
|
1
|
+
import React, { forwardRef, useRef, useState, useEffect, useMemo, useCallback, useLayoutEffect, Fragment, isValidElement, cloneElement } from "react";
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import './main.css';function _mergeNamespaces(n, m) {
|
|
4
4
|
for (var i = 0; i < m.length; i++) {
|
|
@@ -967,7 +967,7 @@ const stylesBtn = {
|
|
|
967
967
|
"btn-link": "_btn-link_ch6o3_411",
|
|
968
968
|
"btn-outline-link": "_btn-outline-link_ch6o3_434"
|
|
969
969
|
};
|
|
970
|
-
const FButton = ({
|
|
970
|
+
const FButton = forwardRef(({
|
|
971
971
|
children,
|
|
972
972
|
variant = "contained",
|
|
973
973
|
color = "primary",
|
|
@@ -975,7 +975,7 @@ const FButton = ({
|
|
|
975
975
|
st: st2,
|
|
976
976
|
fullWidth,
|
|
977
977
|
...props
|
|
978
|
-
}) => {
|
|
978
|
+
}, ref) => {
|
|
979
979
|
const inputId = props.id || `button-${Math.random().toString(36).substring(2, 9)}`;
|
|
980
980
|
let style = st2 !== void 0 ? { ...st2 } : void 0;
|
|
981
981
|
if (fullWidth) {
|
|
@@ -994,6 +994,7 @@ const FButton = ({
|
|
|
994
994
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
995
995
|
"button",
|
|
996
996
|
{
|
|
997
|
+
ref,
|
|
997
998
|
style,
|
|
998
999
|
type: "button",
|
|
999
1000
|
...props,
|
|
@@ -1002,7 +1003,8 @@ const FButton = ({
|
|
|
1002
1003
|
children
|
|
1003
1004
|
}
|
|
1004
1005
|
);
|
|
1005
|
-
};
|
|
1006
|
+
});
|
|
1007
|
+
FButton.displayName = "FButton";
|
|
1006
1008
|
const defaultStyles = {
|
|
1007
1009
|
"f-button-file": "_f-button-file_i2hex_1",
|
|
1008
1010
|
"file-preview-list": "_file-preview-list_i2hex_1"
|
|
@@ -1614,19 +1616,25 @@ const FPaper = ({
|
|
|
1614
1616
|
}
|
|
1615
1617
|
);
|
|
1616
1618
|
};
|
|
1617
|
-
const bordered = "
|
|
1619
|
+
const bordered = "_bordered_19x7r_18";
|
|
1620
|
+
const left$1 = "_left_19x7r_40";
|
|
1621
|
+
const center = "_center_19x7r_43";
|
|
1622
|
+
const right = "_right_19x7r_46";
|
|
1618
1623
|
const styles$p = {
|
|
1619
|
-
"f-table-component": "_f-table-
|
|
1620
|
-
"f-table-component__table": "_f-table-
|
|
1624
|
+
"f-table-component": "_f-table-component_19x7r_1",
|
|
1625
|
+
"f-table-component__table": "_f-table-component__table_19x7r_7",
|
|
1621
1626
|
bordered,
|
|
1622
|
-
"bordered-half": "_bordered-
|
|
1623
|
-
"f-table-component__table_header": "_f-table-
|
|
1624
|
-
"is-sticky": "_is-
|
|
1625
|
-
"f-table-component__table_header-cell": "_f-table-component__table_header-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
"f-table-
|
|
1627
|
+
"bordered-half": "_bordered-half_19x7r_22",
|
|
1628
|
+
"f-table-component__table_header": "_f-table-component__table_header_19x7r_25",
|
|
1629
|
+
"is-sticky": "_is-sticky_19x7r_32",
|
|
1630
|
+
"f-table-component__table_header-cell": "_f-table-component__table_header-cell_19x7r_37",
|
|
1631
|
+
left: left$1,
|
|
1632
|
+
center,
|
|
1633
|
+
right,
|
|
1634
|
+
"f-table-component__table_body": "_f-table-component__table_body_19x7r_65",
|
|
1635
|
+
"f-table-component__table_row": "_f-table-component__table_row_19x7r_68",
|
|
1636
|
+
"f-table-component__table_body-cell": "_f-table-component__table_body-cell_19x7r_81",
|
|
1637
|
+
"f-table-component__table_footer": "_f-table-component__table_footer_19x7r_97"
|
|
1630
1638
|
};
|
|
1631
1639
|
const FTableHead = ({
|
|
1632
1640
|
st: st2,
|
|
@@ -1637,16 +1645,12 @@ const FTableHead = ({
|
|
|
1637
1645
|
// По умолчанию заголовок не "липкий"
|
|
1638
1646
|
...props
|
|
1639
1647
|
}) => {
|
|
1640
|
-
const style = {
|
|
1641
|
-
textAlign: textAlignment,
|
|
1642
|
-
...st2
|
|
1643
|
-
};
|
|
1644
1648
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1645
1649
|
"thead",
|
|
1646
1650
|
{
|
|
1647
|
-
style,
|
|
1651
|
+
style: st2,
|
|
1648
1652
|
...props,
|
|
1649
|
-
className: `${styles$p["f-table-component__table_header"]} ${isSticky ? styles$p["is-sticky"] : ""} ${props.className || ""}`,
|
|
1653
|
+
className: `${styles$p["f-table-component__table_header"]} ${isSticky ? styles$p["is-sticky"] : ""} ${props.className || ""} ${styles$p[textAlignment]}`,
|
|
1650
1654
|
children
|
|
1651
1655
|
}
|
|
1652
1656
|
);
|
|
@@ -1660,10 +1664,6 @@ const FTableBody = ({
|
|
|
1660
1664
|
visibleRowCount = void 0,
|
|
1661
1665
|
...props
|
|
1662
1666
|
}) => {
|
|
1663
|
-
const style = {
|
|
1664
|
-
textAlign: textAlignment,
|
|
1665
|
-
...st2
|
|
1666
|
-
};
|
|
1667
1667
|
const tableBodyRef = useRef(null);
|
|
1668
1668
|
const flatChildren = useMemo(() => React.Children.toArray(children), [children]);
|
|
1669
1669
|
const totalRows = flatChildren.length;
|
|
@@ -1743,7 +1743,7 @@ const FTableBody = ({
|
|
|
1743
1743
|
} else {
|
|
1744
1744
|
visibleItems = flatChildren;
|
|
1745
1745
|
}
|
|
1746
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { ref: tableBodyRef, style, ...props, className: `${styles$p["f-table-component__table_body"]} ${props.className || ""}`, children: [
|
|
1746
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { ref: tableBodyRef, style: st2, ...props, className: `${styles$p["f-table-component__table_body"]} ${props.className || ""} ${styles$p[textAlignment]}`, children: [
|
|
1747
1747
|
virtualizationEnabled && rowHeights.some((h) => h > 0) && /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { height: topOffset } }),
|
|
1748
1748
|
visibleItems.map((child, idx) => React.isValidElement(child) ? React.cloneElement(child, { "data-row-index": virtualizationEnabled ? startIdx + idx : idx, key: virtualizationEnabled ? startIdx + idx : idx }) : child),
|
|
1749
1749
|
virtualizationEnabled && rowHeights.some((h) => h > 0) && /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { style: { height: bottomOffset } })
|
|
@@ -1821,6 +1821,7 @@ const FTable = ({
|
|
|
1821
1821
|
const FTableRow = ({
|
|
1822
1822
|
st: st2,
|
|
1823
1823
|
children,
|
|
1824
|
+
textAlignment,
|
|
1824
1825
|
...props
|
|
1825
1826
|
}) => {
|
|
1826
1827
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1828,7 +1829,7 @@ const FTableRow = ({
|
|
|
1828
1829
|
{
|
|
1829
1830
|
style: st2,
|
|
1830
1831
|
...props,
|
|
1831
|
-
className: `${styles$p["f-table-component__table_row"]} ${props.className || ""}`,
|
|
1832
|
+
className: `${styles$p["f-table-component__table_row"]} ${props.className || ""}${textAlignment !== void 0 ? ` ${styles$p[textAlignment]}` : ""}`,
|
|
1832
1833
|
children
|
|
1833
1834
|
}
|
|
1834
1835
|
);
|
|
@@ -1838,8 +1839,8 @@ const FTableHeaderCell = ({
|
|
|
1838
1839
|
row,
|
|
1839
1840
|
col,
|
|
1840
1841
|
children,
|
|
1841
|
-
textAlignment
|
|
1842
|
-
// По умолчанию
|
|
1842
|
+
textAlignment,
|
|
1843
|
+
// По умолчанию выравнивания нет
|
|
1843
1844
|
width = "auto",
|
|
1844
1845
|
// По умолчанию ширина автоматическая
|
|
1845
1846
|
...props
|
|
@@ -1866,8 +1867,8 @@ const FTableDataCell = ({
|
|
|
1866
1867
|
row,
|
|
1867
1868
|
col,
|
|
1868
1869
|
children,
|
|
1869
|
-
textAlignment
|
|
1870
|
-
// По умолчанию
|
|
1870
|
+
textAlignment,
|
|
1871
|
+
// По умолчанию выравнивания нет
|
|
1871
1872
|
height = "auto",
|
|
1872
1873
|
// По умолчанию высота автоматическая
|
|
1873
1874
|
...props
|
|
@@ -3511,7 +3512,7 @@ const FTabs = ({
|
|
|
3511
3512
|
}
|
|
3512
3513
|
);
|
|
3513
3514
|
};
|
|
3514
|
-
const FTab = ({
|
|
3515
|
+
const FTab = forwardRef(({
|
|
3515
3516
|
children,
|
|
3516
3517
|
id,
|
|
3517
3518
|
className,
|
|
@@ -3519,10 +3520,11 @@ const FTab = ({
|
|
|
3519
3520
|
onClick,
|
|
3520
3521
|
disabled: disabled2,
|
|
3521
3522
|
active: active2
|
|
3522
|
-
}) => {
|
|
3523
|
+
}, ref) => {
|
|
3523
3524
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3524
3525
|
"button",
|
|
3525
3526
|
{
|
|
3527
|
+
ref,
|
|
3526
3528
|
type: "button",
|
|
3527
3529
|
id,
|
|
3528
3530
|
style: st2,
|
|
@@ -3532,7 +3534,8 @@ const FTab = ({
|
|
|
3532
3534
|
children
|
|
3533
3535
|
}
|
|
3534
3536
|
);
|
|
3535
|
-
};
|
|
3537
|
+
});
|
|
3538
|
+
FTab.displayName = "FTab";
|
|
3536
3539
|
const styles$a = {
|
|
3537
3540
|
"f-dropdown": "_f-dropdown_d5i2z_1",
|
|
3538
3541
|
"f-dropdown__arrow": "_f-dropdown__arrow_d5i2z_6",
|
|
@@ -6705,7 +6708,7 @@ const document$1 = (data, format = "A4", orientation = "vertical") => {
|
|
|
6705
6708
|
let width = 11906;
|
|
6706
6709
|
let height = 16838;
|
|
6707
6710
|
let top = 1134;
|
|
6708
|
-
let
|
|
6711
|
+
let right2 = 567;
|
|
6709
6712
|
let bottom = 1134;
|
|
6710
6713
|
let left2 = 1701;
|
|
6711
6714
|
const header = 709;
|
|
@@ -6715,7 +6718,7 @@ const document$1 = (data, format = "A4", orientation = "vertical") => {
|
|
|
6715
6718
|
width = orientation === "landscape" ? 16838 : 11906;
|
|
6716
6719
|
height = orientation === "landscape" ? 11906 : 16838;
|
|
6717
6720
|
top = orientation === "landscape" ? 1134 : 1134;
|
|
6718
|
-
|
|
6721
|
+
right2 = orientation === "landscape" ? 851 : 567;
|
|
6719
6722
|
bottom = orientation === "landscape" ? 1418 : 1134;
|
|
6720
6723
|
left2 = orientation === "landscape" ? 1701 : 1701;
|
|
6721
6724
|
break;
|
|
@@ -6723,7 +6726,7 @@ const document$1 = (data, format = "A4", orientation = "vertical") => {
|
|
|
6723
6726
|
width = orientation === "landscape" ? 23803 : 16817;
|
|
6724
6727
|
height = orientation === "landscape" ? 16817 : 23803;
|
|
6725
6728
|
top = orientation === "landscape" ? 1134 : 1134;
|
|
6726
|
-
|
|
6729
|
+
right2 = orientation === "landscape" ? 851 : 851;
|
|
6727
6730
|
bottom = orientation === "landscape" ? 1134 : 1134;
|
|
6728
6731
|
left2 = orientation === "landscape" ? 1418 : 1418;
|
|
6729
6732
|
break;
|
|
@@ -6731,7 +6734,7 @@ const document$1 = (data, format = "A4", orientation = "vertical") => {
|
|
|
6731
6734
|
width = orientation === "landscape" ? 31678 : 23803;
|
|
6732
6735
|
height = orientation === "landscape" ? 23803 : 31678;
|
|
6733
6736
|
top = orientation === "landscape" ? 1418 : 1418;
|
|
6734
|
-
|
|
6737
|
+
right2 = orientation === "landscape" ? 1134 : 1134;
|
|
6735
6738
|
bottom = orientation === "landscape" ? 1418 : 1418;
|
|
6736
6739
|
left2 = orientation === "landscape" ? 1701 : 1701;
|
|
6737
6740
|
break;
|
|
@@ -6739,12 +6742,12 @@ const document$1 = (data, format = "A4", orientation = "vertical") => {
|
|
|
6739
6742
|
width = orientation === "landscape" ? 31678 : 31678;
|
|
6740
6743
|
height = orientation === "landscape" ? 31678 : 31678;
|
|
6741
6744
|
top = orientation === "landscape" ? 1701 : 1701;
|
|
6742
|
-
|
|
6745
|
+
right2 = orientation === "landscape" ? 1701 : 1701;
|
|
6743
6746
|
bottom = orientation === "landscape" ? 1985 : 1985;
|
|
6744
6747
|
left2 = orientation === "landscape" ? 2268 : 2268;
|
|
6745
6748
|
break;
|
|
6746
6749
|
}
|
|
6747
|
-
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body>${data}<w:sectPr><w:pgSz w:w="${width}" w:h="${height}" w:orient="${orientation}"/><w:pgMar w:top="${top}" w:right="${
|
|
6750
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body>${data}<w:sectPr><w:pgSz w:w="${width}" w:h="${height}" w:orient="${orientation}"/><w:pgMar w:top="${top}" w:right="${right2}" w:bottom="${bottom}" w:left="${left2}" w:header="${header}" w:footer="${footer}" w:gutter="0"/><w:cols w:space="708"/><w:docGrid w:linePitch="360"/></w:sectPr></w:body></w:document>`;
|
|
6748
6751
|
};
|
|
6749
6752
|
const styles$1 = () => {
|
|
6750
6753
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|