mitre-form-component 2.2.4 → 2.2.6

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.cjs CHANGED
@@ -811,75 +811,84 @@ var fadeOut = import_styled_components5.keyframes`
811
811
  `;
812
812
  var typeStyles = {
813
813
  error: import_styled_components5.css`
814
- background-color: ${theme.colors.red};
815
- border: 1px solid ${theme.colors.red};
816
- color: ${theme.colors.white};
814
+ background-color: ${theme.colors.red} !important;
815
+ border: 1px solid ${theme.colors.red} !important;
816
+ color: ${theme.colors.white} !important;
817
817
  svg {
818
- color: ${theme.colors.white};
818
+ color: ${theme.colors.white} !important;
819
819
  }
820
820
  `,
821
821
  warning: import_styled_components5.css`
822
- background-color: ${theme.colors.yellow500};
823
- border: 1px solid ${theme.colors.yellow400};
824
- color: ${theme.colors.black};
822
+ background-color: ${theme.colors.yellow500} !important;
823
+ border: 1px solid ${theme.colors.yellow400} !important;
824
+ color: ${theme.colors.black} !important;
825
825
  svg {
826
- color: ${theme.colors.black};
826
+ color: ${theme.colors.black} !important;
827
827
  }
828
828
  `,
829
829
  info: import_styled_components5.css`
830
- background-color: ${theme.colors.blue};
831
- border: 1px solid ${theme.colors.blue};
832
- color: ${theme.colors.white};
830
+ background-color: ${theme.colors.blue} !important;
831
+ border: 1px solid ${theme.colors.blue} !important;
832
+ color: ${theme.colors.white} !important;
833
833
  svg {
834
- color: ${theme.colors.white};
834
+ color: ${theme.colors.white} !important;
835
835
  }
836
836
  `,
837
837
  success: import_styled_components5.css`
838
- background-color: ${theme.colors.green};
839
- border: 1px solid ${theme.colors.green2};
840
- color: ${theme.colors.white};
838
+ background-color: ${theme.colors.green} !important;
839
+ border: 1px solid ${theme.colors.green2} !important;
840
+ color: ${theme.colors.white} !important;
841
841
  svg {
842
- color: ${theme.colors.white};
842
+ color: ${theme.colors.white} !important;
843
843
  }
844
844
  `
845
845
  };
846
846
  var AlertContainer = import_styled_components5.default.div`
847
- position: fixed;
848
- width: 500px;
849
- top: 15px;
850
- right: 15px;
851
- padding: 1rem ${({ $dismissible }) => $dismissible ? "2.5rem" : "1rem"} 1rem
852
- 1rem;
853
- margin-bottom: 1rem;
854
- animation: ${({ $isClosing }) => $isClosing ? fadeOut : fadeIn} 0.3s
855
- ease-out;
856
- animation-fill-mode: forwards;
857
- align-items: center;
858
- gap: 0.5rem;
859
- box-shadow: ${theme.shadows.shadow500};
860
- border-radius: 0.5rem;
861
- font-size: 1rem;
862
- font-weight: 500;
847
+ && {
848
+ position: fixed !important;
849
+ width: 500px !important;
850
+ top: 15px !important;
851
+ right: 15px !important;
852
+ padding: 1rem ${({ $dismissible }) => $dismissible ? "2.5rem" : "1rem"} 1rem
853
+ 1rem !important;
854
+ margin: 0 0 1rem !important;
855
+ align-items: center !important;
856
+ gap: 0.5rem !important;
857
+ box-shadow: ${theme.shadows.shadow500} !important;
858
+ border-radius: 0.5rem !important;
859
+ font-size: 1rem !important;
860
+ font-weight: 500 !important;
861
+ box-sizing: border-box !important;
862
+ z-index: 9999 !important;
863
+ animation: ${({ $isClosing }) => $isClosing ? fadeOut : fadeIn} 0.3s
864
+ ease-out;
865
+ animation-fill-mode: forwards;
866
+ }
863
867
 
864
868
  ${({ $type }) => typeStyles[$type]}
865
869
  `;
866
870
  var DismissButton = import_styled_components5.default.button`
867
- position: absolute;
868
- background: transparent;
869
- right: 10px;
870
- border: none;
871
- cursor: pointer;
872
- color: inherit;
873
- opacity: 1;
874
- transition: opacity 0.2s;
871
+ && {
872
+ position: absolute !important;
873
+ background: transparent !important;
874
+ right: 10px !important;
875
+ border: none !important;
876
+ cursor: pointer !important;
877
+ color: inherit !important;
878
+ opacity: 1 !important;
879
+ padding: 0 !important;
880
+ margin: 0 !important;
881
+ box-sizing: border-box !important;
882
+ transition: opacity 0.2s;
883
+ }
875
884
 
876
- &:hover {
877
- opacity: 0.7;
885
+ &&:hover {
886
+ opacity: 0.7 !important;
878
887
  }
879
888
 
880
- svg {
881
- width: 1rem;
882
- height: 1rem;
889
+ && svg {
890
+ width: 1rem !important;
891
+ height: 1rem !important;
883
892
  }
884
893
  `;
885
894
 
@@ -1818,12 +1827,20 @@ var MitreFormComponent = import_react8.default.forwardRef(({
1818
1827
  }, REDIRECT_DELAY_MS);
1819
1828
  }
1820
1829
  } else if (channel === "chat") {
1821
- const { channel: _channelInBody, ...requestBodyNoChannel } = requestBody;
1830
+ const { channel: _channelInBody, name: _nameInBody, phone: _phoneInBody, ...requestBodyMinimal } = requestBody;
1831
+ const dialCode = phone.dialCode;
1832
+ const nationalDigits = dialCode && phoneDigitsOnly.startsWith(dialCode) ? phoneDigitsOnly.slice(dialCode.length) : phoneDigitsOnly;
1833
+ const foneDdd = nationalDigits.slice(0, 2);
1834
+ const foneNumber = nationalDigits.slice(2);
1822
1835
  const effectiveIdEmpreendimento = idEmpreendimento ?? selectedProduct.id.toString();
1823
1836
  const effectiveIdProdutoTerceiro = idProdutoTerceiro ?? "0";
1824
1837
  const virtualObj = {
1825
- ...requestBodyNoChannel,
1838
+ ...requestBodyMinimal,
1826
1839
  canal: channel,
1840
+ nome: name,
1841
+ ddi: dialCode,
1842
+ ddd: foneDdd,
1843
+ fone: foneNumber,
1827
1844
  externalOriginId: leadId,
1828
1845
  idEmpreendimento: effectiveIdEmpreendimento,
1829
1846
  id_produto: effectiveIdEmpreendimento,