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.js
CHANGED
|
@@ -35623,9 +35623,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
|
|
|
35623
35623
|
position: relative;
|
|
35624
35624
|
cursor: pointer;
|
|
35625
35625
|
user-select: none;
|
|
35626
|
-
opacity: ${
|
|
35627
|
-
|
|
35628
|
-
|
|
35626
|
+
opacity: ${_ref => {
|
|
35627
|
+
let {
|
|
35628
|
+
disabled
|
|
35629
|
+
} = _ref;
|
|
35630
|
+
return disabled ? 0.5 : 1;
|
|
35631
|
+
}};
|
|
35629
35632
|
`;
|
|
35630
35633
|
const ToggleInput = styled__default["default"].input`
|
|
35631
35634
|
display: none;
|
|
@@ -35633,15 +35636,19 @@ const ToggleInput = styled__default["default"].input`
|
|
|
35633
35636
|
const ToggleSlider = styled__default["default"].span`
|
|
35634
35637
|
display: block;
|
|
35635
35638
|
position: relative;
|
|
35636
|
-
background: ${
|
|
35637
|
-
|
|
35638
|
-
|
|
35639
|
-
|
|
35639
|
+
background: ${_ref2 => {
|
|
35640
|
+
let {
|
|
35641
|
+
checked,
|
|
35642
|
+
disabled
|
|
35643
|
+
} = _ref2;
|
|
35644
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
35645
|
+
}};
|
|
35640
35646
|
border-radius: 999px;
|
|
35641
35647
|
transition: background 0.2s;
|
|
35642
|
-
${
|
|
35643
|
-
|
|
35644
|
-
|
|
35648
|
+
${_ref3 => {
|
|
35649
|
+
let {
|
|
35650
|
+
size
|
|
35651
|
+
} = _ref3;
|
|
35645
35652
|
switch (size) {
|
|
35646
35653
|
case "s":
|
|
35647
35654
|
return styled.css`width: 40px; height: 20px;`;
|
|
@@ -35660,9 +35667,10 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35660
35667
|
background: #fff;
|
|
35661
35668
|
border-radius: 50%;
|
|
35662
35669
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
35663
|
-
${
|
|
35664
|
-
|
|
35665
|
-
|
|
35670
|
+
${_ref4 => {
|
|
35671
|
+
let {
|
|
35672
|
+
size
|
|
35673
|
+
} = _ref4;
|
|
35666
35674
|
switch (size) {
|
|
35667
35675
|
case "s":
|
|
35668
35676
|
return styled.css`width: 14px; height: 14px;`;
|
|
@@ -35672,10 +35680,11 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35672
35680
|
return styled.css`width: 20px; height: 20px;`;
|
|
35673
35681
|
}
|
|
35674
35682
|
}}
|
|
35675
|
-
left: ${
|
|
35676
|
-
|
|
35677
|
-
|
|
35678
|
-
|
|
35683
|
+
left: ${_ref5 => {
|
|
35684
|
+
let {
|
|
35685
|
+
checked,
|
|
35686
|
+
size
|
|
35687
|
+
} = _ref5;
|
|
35679
35688
|
if (!checked) return "3px";
|
|
35680
35689
|
switch (size) {
|
|
35681
35690
|
case "s":
|
|
@@ -35689,9 +35698,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
35689
35698
|
}
|
|
35690
35699
|
`;
|
|
35691
35700
|
|
|
35692
|
-
/**
|
|
35693
|
-
* ToggleSwitch component for on/off states.
|
|
35694
|
-
* Supports small/large sizes and disabled state.
|
|
35701
|
+
/**
|
|
35702
|
+
* ToggleSwitch component for on/off states.
|
|
35703
|
+
* Supports small/large sizes and disabled state.
|
|
35695
35704
|
*/
|
|
35696
35705
|
function ToggleSwitch(_ref) {
|
|
35697
35706
|
let {
|
|
@@ -43797,10 +43806,11 @@ const NewSubitem = ({
|
|
|
43797
43806
|
packageObject,
|
|
43798
43807
|
vendor,
|
|
43799
43808
|
onBack,
|
|
43800
|
-
addNewPackage
|
|
43809
|
+
addNewPackage,
|
|
43810
|
+
componentText = "Scale"
|
|
43801
43811
|
}) => {
|
|
43802
43812
|
const [negotiatedBrands, setNegotiatedBrands] = React$1.useState("");
|
|
43803
|
-
const [negotiatedComponent, setNegotiatedComponent] = React$1.useState(
|
|
43813
|
+
const [negotiatedComponent, setNegotiatedComponent] = React$1.useState(componentText);
|
|
43804
43814
|
|
|
43805
43815
|
// Form state
|
|
43806
43816
|
const isApplyEnabled = negotiatedBrands.trim().length > 2;
|
|
@@ -52515,7 +52525,8 @@ const ItemManagerPanel = _ref => {
|
|
|
52515
52525
|
backgroundColor = 'white',
|
|
52516
52526
|
buttonTooltipText = "Please fill out all forms before sending.",
|
|
52517
52527
|
trashTooltipText = 'Package cannot be deleted since it has been sent to the vendor as a form.',
|
|
52518
|
-
maxVisibleVendors = 12
|
|
52528
|
+
maxVisibleVendors = 12,
|
|
52529
|
+
componentText = "Scale"
|
|
52519
52530
|
} = _ref;
|
|
52520
52531
|
const [screen, setScreen] = React$1.useState("initial");
|
|
52521
52532
|
const [selectedVendor, setSelectedVendor] = React$1.useState(null);
|
|
@@ -52711,7 +52722,8 @@ const ItemManagerPanel = _ref => {
|
|
|
52711
52722
|
addNewPackage: addNewPackage,
|
|
52712
52723
|
updateExistingPackage: updateExistingPackage,
|
|
52713
52724
|
isEditingExisting: isEditingExisting,
|
|
52714
|
-
onBack: () => setScreen("subitem")
|
|
52725
|
+
onBack: () => setScreen("subitem"),
|
|
52726
|
+
componentText: componentText
|
|
52715
52727
|
}));
|
|
52716
52728
|
}
|
|
52717
52729
|
if (screen === "list") {
|
|
@@ -52811,7 +52823,8 @@ const Drawer = styled__default["default"].div`
|
|
|
52811
52823
|
top: 0;
|
|
52812
52824
|
right: ${props => props.open ? '0' : `-${props.widthPercent || 70}%`};
|
|
52813
52825
|
width: ${props => props.widthPercent ? `${props.widthPercent}%` : '70%'};
|
|
52814
|
-
height: 100
|
|
52826
|
+
height: ${props => props.height ? props.height : '100%'};
|
|
52827
|
+
|
|
52815
52828
|
background: #fff;
|
|
52816
52829
|
z-index: 1001;
|
|
52817
52830
|
transition: right 0.3s;
|
|
@@ -52847,6 +52860,7 @@ const CloseBtn = styled__default["default"].button`
|
|
|
52847
52860
|
function ModalDrawer(_ref) {
|
|
52848
52861
|
let {
|
|
52849
52862
|
open,
|
|
52863
|
+
height,
|
|
52850
52864
|
onClose,
|
|
52851
52865
|
children,
|
|
52852
52866
|
widthPercent = 70
|
|
@@ -52855,6 +52869,7 @@ function ModalDrawer(_ref) {
|
|
|
52855
52869
|
onClick: onClose,
|
|
52856
52870
|
"data-testid": "overlay"
|
|
52857
52871
|
}), /*#__PURE__*/React__default["default"].createElement(Drawer, {
|
|
52872
|
+
height: height,
|
|
52858
52873
|
open: open,
|
|
52859
52874
|
widthPercent: widthPercent,
|
|
52860
52875
|
"data-testid": "drawer"
|