frst-components 0.27.3 → 0.27.5
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/index.js +9 -9
- package/dist/src/components/DS/impedimentosTab/index.d.ts +1 -1
- package/dist/src/components/DS/impedimentosTab/index.d.ts.map +1 -1
- package/dist/src/components/DS/impedimentosTab/styles.d.ts +9 -6
- package/dist/src/components/DS/impedimentosTab/styles.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7458,9 +7458,9 @@ const TabWrapper = styled__default["default"]('div') `
|
|
|
7458
7458
|
const Tab$1 = styled__default["default"]('div') `
|
|
7459
7459
|
width: 137px;
|
|
7460
7460
|
padding: 12px 16px;
|
|
7461
|
-
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
7461
|
+
background-color: ${({ theme, style, selected }) => style?.backgroundColor || (selected ? '#D2ACE4' : theme.colors.shadeWhite)};
|
|
7462
7462
|
border-radius: 8px 8px 0px 0px;
|
|
7463
|
-
cursor:
|
|
7463
|
+
cursor: pointer;
|
|
7464
7464
|
|
|
7465
7465
|
${(props) => props.selected &&
|
|
7466
7466
|
styled.css `
|
|
@@ -7561,8 +7561,8 @@ const WrapperImpedimentoSelect = styled__default["default"]('div') `
|
|
|
7561
7561
|
gap: 8px;
|
|
7562
7562
|
padding: 8px;
|
|
7563
7563
|
border-radius: 6px;
|
|
7564
|
-
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
7565
|
-
cursor:
|
|
7564
|
+
background-color: ${({ theme, style }) => style?.backgroundColor || theme.colors.shadeWhite};
|
|
7565
|
+
cursor: pointer;
|
|
7566
7566
|
|
|
7567
7567
|
p {
|
|
7568
7568
|
font-family: 'PT Sans';
|
|
@@ -7817,7 +7817,7 @@ function Dropdown$1({ isOpen, anchor, onClose, impedimentoList, onClickImpedimen
|
|
|
7817
7817
|
}, children: jsxRuntime.jsx(ContainerDropdown$1, { children: render() }) }));
|
|
7818
7818
|
}
|
|
7819
7819
|
|
|
7820
|
-
function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText }) {
|
|
7820
|
+
function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent, style }) {
|
|
7821
7821
|
const [selectedTab, setSelectedTab] = React.useState(null);
|
|
7822
7822
|
const [allTabs, setAllTabs] = React.useState([]);
|
|
7823
7823
|
const [onShowTabs, setOnShowTabs] = React.useState([]);
|
|
@@ -7842,7 +7842,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7842
7842
|
}
|
|
7843
7843
|
}, [idSelectedTab]);
|
|
7844
7844
|
React.useEffect(() => {
|
|
7845
|
-
if (allTabs
|
|
7845
|
+
if (allTabs?.length > 0) {
|
|
7846
7846
|
const tabToSelect = allTabs.find((tab) => tab.id === currentTab);
|
|
7847
7847
|
setSelectedTab(tabToSelect ? tabToSelect : allTabs[0]);
|
|
7848
7848
|
setOnShowTabs(allTabs.slice(0, maxTabs));
|
|
@@ -7873,7 +7873,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7873
7873
|
handleClickTab(impedimento);
|
|
7874
7874
|
};
|
|
7875
7875
|
const renderTabs = (tabInfo, index) => {
|
|
7876
|
-
return (jsxRuntime.jsx(Tab$1, { selected: tabInfo.id === selectedTab?.id, onClick: () => handleClickTab(tabInfo), children: jsxRuntime.jsx("p", { children: tabInfo.title }) }, index));
|
|
7876
|
+
return (jsxRuntime.jsx(Tab$1, { style: style, selected: tabInfo.id === selectedTab?.id, onClick: () => handleClickTab(tabInfo), children: jsxRuntime.jsx("p", { children: tabInfo.title }) }, index));
|
|
7877
7877
|
};
|
|
7878
7878
|
const handleUpdate = () => {
|
|
7879
7879
|
if (editDescription == '')
|
|
@@ -7911,7 +7911,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7911
7911
|
setEditDescription(selectedTab.description || '');
|
|
7912
7912
|
}
|
|
7913
7913
|
}, [selectedTab]);
|
|
7914
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: allTabs
|
|
7914
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: allTabs?.length > 0 ? (jsxRuntime.jsxs(ContainerImpedimentos, { children: [jsxRuntime.jsxs(TabWrapper, { children: [jsxRuntime.jsxs(material.Box, { display: 'flex', alignItems: 'center', children: [onShowTabs.map((item, index) => renderTabs(item, index)), onHideTabs.length > 0 ? (jsxRuntime.jsx(Tooltip$2, { content: "Ver todos os impedimentos", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperImpedimentoSelect, { activeSelect: openImpedimentoSelect, onClick: (e) => setImpedimentoSelectAnchor(e.currentTarget), style: style, children: [jsxRuntime.jsxs("p", { children: ["Mais ", onHideTabs.length] }), jsxRuntime.jsx(WrapperSelectIcon$1, { isOpenSelect: openImpedimentoSelect, children: jsxRuntime.jsx(ArrrowExpandDropdown, {}) })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))] }), jsxRuntime.jsx(material.Box, { display: 'flex', alignItems: 'center', children: showAddButton ? (jsxRuntime.jsx(Tooltip$2, { content: "Sugerir impedimento", direction: "bottom", delay: 200, style: { textAlign: 'center' }, children: jsxRuntime.jsxs(WrapperAddButton, { activeButton: openAddImpedimento, onClick: handleClickAddImpedimento, children: [jsxRuntime.jsx(AddIcon, {}), jsxRuntime.jsx("p", { children: addButtonText })] }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) })] }), selectedTab?.id ? (jsxRuntime.jsxs(TabInfoWrapper, { onDoubleClick: () => selectedTab?.showOptions && setIsEdit(true), children: [jsxRuntime.jsx(Tooltip$2, { content: selectedTab?.user_name, direction: "bottom", delay: 200, style: {
|
|
7915
7915
|
fontFamily: 'PT Sans',
|
|
7916
7916
|
fontWeight: 400,
|
|
7917
7917
|
fontSize: '14px',
|
|
@@ -7971,7 +7971,7 @@ function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpediment
|
|
|
7971
7971
|
}
|
|
7972
7972
|
]
|
|
7973
7973
|
: [])
|
|
7974
|
-
], closeAfterClick: true, isContainerOptions: true }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))] }))] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})), jsxRuntime.jsx(AddImpedimentoModal, { isOpen: openAddImpedimento, anchor: addImpedimentoAnchor, onClose: () => setAddImpedimentoAnchor(null), onSaveBtn: handleSaveNewImpedimento }), jsxRuntime.jsx(Dropdown$1, { isOpen: openImpedimentoSelect, anchor: impedimentoSelectAnchor, onClose: () => setImpedimentoSelectAnchor(null), impedimentoList: onHideTabs, maxTabs: maxTabs, onClickImpedimento: handleClickSelectImpedimento })] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) }));
|
|
7974
|
+
], closeAfterClick: true, isContainerOptions: true }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {}))] }))] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})), jsxRuntime.jsx(AddImpedimentoModal, { isOpen: openAddImpedimento, anchor: addImpedimentoAnchor, onClose: () => setAddImpedimentoAnchor(null), onSaveBtn: handleSaveNewImpedimento }), jsxRuntime.jsx(Dropdown$1, { isOpen: openImpedimentoSelect, anchor: impedimentoSelectAnchor, onClose: () => setImpedimentoSelectAnchor(null), impedimentoList: onHideTabs, maxTabs: maxTabs, onClickImpedimento: handleClickSelectImpedimento })] })) : (emptyComponent !== undefined ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: emptyComponent }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})) }));
|
|
7975
7975
|
}
|
|
7976
7976
|
|
|
7977
7977
|
const backgroundColors$1 = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ImpedimentosTabProps } from './impedimentosTab';
|
|
2
|
-
export default function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText }: ImpedimentosTabProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ImpedimentosTab({ maxTabs, tabsList, showAddButton, onSaveNewImpedimento, onSelectedTab, idSelectedTab, currentTab, addButtonText, emptyComponent, style }: ImpedimentosTabProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAW,MAAM,mBAAmB,CAAA;AAejE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAW,MAAM,mBAAmB,CAAA;AAejE,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,OAAO,EACP,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,KAAK,EACR,EAAE,oBAAoB,2CAqUtB"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ImpedimentoSelectProps {
|
|
3
|
+
activeSelect?: boolean;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
}
|
|
1
7
|
export declare const ContainerImpedimentos: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
8
|
export declare const TabWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const Tab: import("styled-components").StyledComponent<"div", any,
|
|
4
|
-
selected: boolean;
|
|
5
|
-
}, never>;
|
|
9
|
+
export declare const Tab: import("styled-components").StyledComponent<"div", any, ImpedimentoSelectProps, never>;
|
|
6
10
|
export declare const TabInfoWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
11
|
export declare const WrapperAddButton: import("styled-components").StyledComponent<"div", any, {
|
|
8
12
|
activeButton: boolean;
|
|
9
13
|
}, never>;
|
|
10
|
-
export declare const WrapperImpedimentoSelect: import("styled-components").StyledComponent<"div", any,
|
|
11
|
-
activeSelect: boolean;
|
|
12
|
-
}, never>;
|
|
14
|
+
export declare const WrapperImpedimentoSelect: import("styled-components").StyledComponent<"div", any, ImpedimentoSelectProps, never>;
|
|
13
15
|
export declare const WrapperSelectIcon: import("styled-components").StyledComponent<"div", any, {
|
|
14
16
|
isOpenSelect: boolean;
|
|
15
17
|
}, never>;
|
|
@@ -18,4 +20,5 @@ export declare const EditWrapper: import("styled-components").StyledComponent<"d
|
|
|
18
20
|
export declare const EditButtons: import("styled-components").StyledComponent<"div", any, {
|
|
19
21
|
buttonColor: string;
|
|
20
22
|
}, never>;
|
|
23
|
+
export {};
|
|
21
24
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/DS/impedimentosTab/styles.ts"],"names":[],"mappings":";AAGA,UAAU,sBAAsB;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,qBAAqB,oEAIjC,CAAA;AAED,eAAO,MAAM,UAAU,oEAItB,CAAA;AAED,eAAO,MAAM,GAAG,wFAoCf,CAAA;AAED,eAAO,MAAM,cAAc,oEAkB1B,CAAA;AAED,eAAO,MAAM,gBAAgB;kBAAgC,OAAO;SAgDnE,CAAA;AAED,eAAO,MAAM,wBAAwB,wFA4BpC,CAAA;AAED,eAAO,MAAM,iBAAiB;kBAAgC,OAAO;SAepE,CAAA;AAED,eAAO,MAAM,eAAe,oEAG3B,CAAA;AAED,eAAO,MAAM,WAAW,oEAKvB,CAAA;AAED,eAAO,MAAM,WAAW;iBAA+B,MAAM;SAQ5D,CAAA"}
|