sag_components 2.0.0-beta165 → 2.0.0-beta167
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.d.ts +3 -2
- package/dist/index.esm.js +40 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +40 -25
- package/dist/index.js.map +1 -1
- package/dist/types/components/ItemManagerPanel/ItemManagerPanel.d.ts +2 -1
- package/dist/types/components/ItemManagerPanel/NewSubitem/NewSubitem.d.ts +2 -1
- package/dist/types/components/ModalDrawer/ModalDrawer.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1509,7 +1509,7 @@ declare function RangePop(props: any): react_jsx_runtime.JSX.Element;
|
|
|
1509
1509
|
|
|
1510
1510
|
declare function SearchInput(props: any): react_jsx_runtime.JSX.Element;
|
|
1511
1511
|
|
|
1512
|
-
declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, trashTooltipText, maxVisibleVendors }: {
|
|
1512
|
+
declare function ItemManagerPanel({ width, height, disableSection, onSendForms, editMode, disabledSendForms, AllFormsSent, itemAndPackage, setItemAndPackage, linkColor, backgroundColor, buttonTooltipText, trashTooltipText, maxVisibleVendors, componentText }: {
|
|
1513
1513
|
width?: string;
|
|
1514
1514
|
height?: string;
|
|
1515
1515
|
disableSection?: boolean;
|
|
@@ -1524,6 +1524,7 @@ declare function ItemManagerPanel({ width, height, disableSection, onSendForms,
|
|
|
1524
1524
|
buttonTooltipText?: string;
|
|
1525
1525
|
trashTooltipText?: string;
|
|
1526
1526
|
maxVisibleVendors?: number;
|
|
1527
|
+
componentText?: string;
|
|
1527
1528
|
}): react_jsx_runtime.JSX.Element;
|
|
1528
1529
|
|
|
1529
1530
|
/**
|
|
@@ -1534,7 +1535,7 @@ declare function ItemManagerPanel({ width, height, disableSection, onSendForms,
|
|
|
1534
1535
|
* @param {React.ReactNode} props.children - Drawer content
|
|
1535
1536
|
* @param {number} [props.widthPercent=70] - Width of the drawer as a percentage of the viewport width
|
|
1536
1537
|
*/
|
|
1537
|
-
declare function ModalDrawer({ open, onClose, children, widthPercent }: {
|
|
1538
|
+
declare function ModalDrawer({ open, height, onClose, children, widthPercent }: {
|
|
1538
1539
|
open: boolean;
|
|
1539
1540
|
onClose: Function;
|
|
1540
1541
|
children: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -35613,9 +35613,12 @@ const ToggleSwitchLabel = styled.label`
|
|
|
35613
35613
|
position: relative;
|
|
35614
35614
|
cursor: pointer;
|
|
35615
35615
|
user-select: none;
|
|
35616
|
-
opacity: ${
|
|
35617
|
-
|
|
35618
|
-
|
|
35616
|
+
opacity: ${_ref => {
|
|
35617
|
+
let {
|
|
35618
|
+
disabled
|
|
35619
|
+
} = _ref;
|
|
35620
|
+
return disabled ? 0.5 : 1;
|
|
35621
|
+
}};
|
|
35619
35622
|
`;
|
|
35620
35623
|
const ToggleInput = styled.input`
|
|
35621
35624
|
display: none;
|
|
@@ -35623,15 +35626,19 @@ const ToggleInput = styled.input`
|
|
|
35623
35626
|
const ToggleSlider = styled.span`
|
|
35624
35627
|
display: block;
|
|
35625
35628
|
position: relative;
|
|
35626
|
-
background: ${
|
|
35627
|
-
|
|
35628
|
-
|
|
35629
|
-
|
|
35629
|
+
background: ${_ref2 => {
|
|
35630
|
+
let {
|
|
35631
|
+
checked,
|
|
35632
|
+
disabled
|
|
35633
|
+
} = _ref2;
|
|
35634
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
35635
|
+
}};
|
|
35630
35636
|
border-radius: 999px;
|
|
35631
35637
|
transition: background 0.2s;
|
|
35632
|
-
${
|
|
35633
|
-
|
|
35634
|
-
|
|
35638
|
+
${_ref3 => {
|
|
35639
|
+
let {
|
|
35640
|
+
size
|
|
35641
|
+
} = _ref3;
|
|
35635
35642
|
switch (size) {
|
|
35636
35643
|
case "s":
|
|
35637
35644
|
return css`width: 40px; height: 20px;`;
|
|
@@ -35650,9 +35657,10 @@ const ToggleSlider = styled.span`
|
|
|
35650
35657
|
background: #fff;
|
|
35651
35658
|
border-radius: 50%;
|
|
35652
35659
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
35653
|
-
${
|
|
35654
|
-
|
|
35655
|
-
|
|
35660
|
+
${_ref4 => {
|
|
35661
|
+
let {
|
|
35662
|
+
size
|
|
35663
|
+
} = _ref4;
|
|
35656
35664
|
switch (size) {
|
|
35657
35665
|
case "s":
|
|
35658
35666
|
return css`width: 14px; height: 14px;`;
|
|
@@ -35662,10 +35670,11 @@ const ToggleSlider = styled.span`
|
|
|
35662
35670
|
return css`width: 20px; height: 20px;`;
|
|
35663
35671
|
}
|
|
35664
35672
|
}}
|
|
35665
|
-
left: ${
|
|
35666
|
-
|
|
35667
|
-
|
|
35668
|
-
|
|
35673
|
+
left: ${_ref5 => {
|
|
35674
|
+
let {
|
|
35675
|
+
checked,
|
|
35676
|
+
size
|
|
35677
|
+
} = _ref5;
|
|
35669
35678
|
if (!checked) return "3px";
|
|
35670
35679
|
switch (size) {
|
|
35671
35680
|
case "s":
|
|
@@ -35679,9 +35688,9 @@ const ToggleSlider = styled.span`
|
|
|
35679
35688
|
}
|
|
35680
35689
|
`;
|
|
35681
35690
|
|
|
35682
|
-
/**
|
|
35683
|
-
* ToggleSwitch component for on/off states.
|
|
35684
|
-
* Supports small/large sizes and disabled state.
|
|
35691
|
+
/**
|
|
35692
|
+
* ToggleSwitch component for on/off states.
|
|
35693
|
+
* Supports small/large sizes and disabled state.
|
|
35685
35694
|
*/
|
|
35686
35695
|
function ToggleSwitch(_ref) {
|
|
35687
35696
|
let {
|
|
@@ -43787,10 +43796,11 @@ const NewSubitem = ({
|
|
|
43787
43796
|
packageObject,
|
|
43788
43797
|
vendor,
|
|
43789
43798
|
onBack,
|
|
43790
|
-
addNewPackage
|
|
43799
|
+
addNewPackage,
|
|
43800
|
+
componentText = "Scale"
|
|
43791
43801
|
}) => {
|
|
43792
43802
|
const [negotiatedBrands, setNegotiatedBrands] = useState("");
|
|
43793
|
-
const [negotiatedComponent, setNegotiatedComponent] = useState(
|
|
43803
|
+
const [negotiatedComponent, setNegotiatedComponent] = useState(componentText);
|
|
43794
43804
|
|
|
43795
43805
|
// Form state
|
|
43796
43806
|
const isApplyEnabled = negotiatedBrands.trim().length > 2;
|
|
@@ -52505,7 +52515,8 @@ const ItemManagerPanel = _ref => {
|
|
|
52505
52515
|
backgroundColor = 'white',
|
|
52506
52516
|
buttonTooltipText = "Please fill out all forms before sending.",
|
|
52507
52517
|
trashTooltipText = 'Package cannot be deleted since it has been sent to the vendor as a form.',
|
|
52508
|
-
maxVisibleVendors = 12
|
|
52518
|
+
maxVisibleVendors = 12,
|
|
52519
|
+
componentText = "Scale"
|
|
52509
52520
|
} = _ref;
|
|
52510
52521
|
const [screen, setScreen] = useState("initial");
|
|
52511
52522
|
const [selectedVendor, setSelectedVendor] = useState(null);
|
|
@@ -52701,7 +52712,8 @@ const ItemManagerPanel = _ref => {
|
|
|
52701
52712
|
addNewPackage: addNewPackage,
|
|
52702
52713
|
updateExistingPackage: updateExistingPackage,
|
|
52703
52714
|
isEditingExisting: isEditingExisting,
|
|
52704
|
-
onBack: () => setScreen("subitem")
|
|
52715
|
+
onBack: () => setScreen("subitem"),
|
|
52716
|
+
componentText: componentText
|
|
52705
52717
|
}));
|
|
52706
52718
|
}
|
|
52707
52719
|
if (screen === "list") {
|
|
@@ -52801,7 +52813,8 @@ const Drawer = styled.div`
|
|
|
52801
52813
|
top: 0;
|
|
52802
52814
|
right: ${props => props.open ? '0' : `-${props.widthPercent || 70}%`};
|
|
52803
52815
|
width: ${props => props.widthPercent ? `${props.widthPercent}%` : '70%'};
|
|
52804
|
-
height: 100
|
|
52816
|
+
height: ${props => props.height ? props.height : '100%'};
|
|
52817
|
+
|
|
52805
52818
|
background: #fff;
|
|
52806
52819
|
z-index: 1001;
|
|
52807
52820
|
transition: right 0.3s;
|
|
@@ -52837,6 +52850,7 @@ const CloseBtn = styled.button`
|
|
|
52837
52850
|
function ModalDrawer(_ref) {
|
|
52838
52851
|
let {
|
|
52839
52852
|
open,
|
|
52853
|
+
height,
|
|
52840
52854
|
onClose,
|
|
52841
52855
|
children,
|
|
52842
52856
|
widthPercent = 70
|
|
@@ -52845,6 +52859,7 @@ function ModalDrawer(_ref) {
|
|
|
52845
52859
|
onClick: onClose,
|
|
52846
52860
|
"data-testid": "overlay"
|
|
52847
52861
|
}), /*#__PURE__*/React$1.createElement(Drawer, {
|
|
52862
|
+
height: height,
|
|
52848
52863
|
open: open,
|
|
52849
52864
|
widthPercent: widthPercent,
|
|
52850
52865
|
"data-testid": "drawer"
|