@lendi/navbar 7.35.1 → 7.36.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.
@@ -1617,7 +1617,7 @@ var _templateObject$8, _templateObject2$3;
1617
1617
  var StyledWrapper = styled__default["default"].div.withConfig({
1618
1618
  displayName: "style__StyledWrapper",
1619
1619
  componentId: "lui__sc-1hl3v3a-0"
1620
- })(["", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:", ";cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}"], breakpoint.gte('tablet')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n right: 16px;\n "]))), getColour.getColour('interaction', 'main'), _ref => {
1620
+ })(["", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:#e52c64;cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}"], breakpoint.gte('tablet')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n right: 16px;\n "]))), _ref => {
1621
1621
  var {
1622
1622
  isContracted
1623
1623
  } = _ref;
@@ -1634,7 +1634,7 @@ var Label$1 = styled__default["default"].span.withConfig({
1634
1634
  var Dot = styled__default["default"].span.withConfig({
1635
1635
  displayName: "style__Dot",
1636
1636
  componentId: "lui__sc-1hl3v3a-3"
1637
- })(["width:24px;height:24px;border-radius:40px;background-color:#e52c64;position:absolute;top:-21px;right:-19px;"]);
1637
+ })(["width:24px;height:24px;border-radius:40px;background-color:", ";position:absolute;top:-21px;right:-19px;"], getColour.getColour('interaction', 'main'));
1638
1638
 
1639
1639
  var ChatBubble = _ref => {
1640
1640
  var {
@@ -1737,9 +1737,7 @@ props => {
1737
1737
  React.useEffect(() => {
1738
1738
  var timeout;
1739
1739
  if (props.enableChatBubble && chatBubble && isExperiment) {
1740
- timeout = setTimeout(() => {
1741
- setRenderChatBubble(true);
1742
- }, 1000);
1740
+ setRenderChatBubble(true);
1743
1741
  }
1744
1742
  return () => clearTimeout(timeout);
1745
1743
  }, [props, chatBubble, isExperiment]);
@@ -1021,7 +1021,7 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1021
1021
  }, StyledWrapper = styled__default.default.div.withConfig({
1022
1022
  displayName: "style__StyledWrapper",
1023
1023
  componentId: "lui__sc-1hl3v3a-0"
1024
- })([ "", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:", ";cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}" ], breakpoint.gte("tablet")(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral([ "\n right: 16px;\n " ]))), getColour.getColour("interaction", "main"), (_ref => {
1024
+ })([ "", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:#e52c64;cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}" ], breakpoint.gte("tablet")(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral([ "\n right: 16px;\n " ]))), (_ref => {
1025
1025
  var {isContracted: isContracted} = _ref;
1026
1026
  return isContracted ? "50px" : "143px";
1027
1027
  })), BubbleBody = styled__default.default.div.withConfig({
@@ -1033,7 +1033,7 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1033
1033
  })([ "", ";color:#fff;text-align:center;font-size:12px;font-style:normal;font-weight:700;line-height:20px;&.hidden{display:none;}" ], breakpoint.gte("tablet")(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral([ "\n font-size: 14px;\n " ])))), Dot = styled__default.default.span.withConfig({
1034
1034
  displayName: "style__Dot",
1035
1035
  componentId: "lui__sc-1hl3v3a-3"
1036
- })([ "width:24px;height:24px;border-radius:40px;background-color:#e52c64;position:absolute;top:-21px;right:-19px;" ]), ChatBubble = _ref => {
1036
+ })([ "width:24px;height:24px;border-radius:40px;background-color:", ";position:absolute;top:-21px;right:-19px;" ], getColour.getColour("interaction", "main")), ChatBubble = _ref => {
1037
1037
  var {onClick: _onClick} = _ref, [isContracted, setContracted] = React.useState(!1), [showLabel, setShowLabel] = React.useState(!0);
1038
1038
  return React.useEffect((() => {
1039
1039
  var timeout = setTimeout((() => {
@@ -1081,12 +1081,8 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1081
1081
  var {onException: onException} = useError(), {chatBubble: chatBubble, chatExperiment: chatExperiment} = launchdarkly.useFlags(), {isCommPanelOpen: isCommPanelOpen, openCommPanel: openCommPanel, closeCommPanel: closeCommPanel, channelId: channelId, customerOwner: customerOwner, openChat: openChat} = chat.useBootstrappedChatState(), [hasUnread, setHasUnread] = React__default.default.useState(!1), [isOtherUserOnline, setIsOtherUserOnline] = React__default.default.useState(!1), [breakpoint$1, setBreakpoint] = React__default.default.useState(), [renderChatBubble, setRenderChatBubble] = React.useState(!1);
1082
1082
  breakpoint.useBreakpoint(setBreakpoint);
1083
1083
  var shouldFullScreen = "aussie" === utils$1.getThemeName() || "mobile" === breakpoint$1, isExperiment = "Experiment1" === chatExperiment || "Experiment3" === chatExperiment;
1084
- return React.useEffect((() => {
1085
- var timeout;
1086
- return props.enableChatBubble && chatBubble && isExperiment && (timeout = setTimeout((() => {
1087
- setRenderChatBubble(!0);
1088
- }), 1e3)), () => clearTimeout(timeout);
1089
- }), [ props, chatBubble, isExperiment ]), jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
1084
+ return React.useEffect((() => (props.enableChatBubble && chatBubble && isExperiment && setRenderChatBubble(!0),
1085
+ () => clearTimeout(undefined))), [ props, chatBubble, isExperiment ]), jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
1090
1086
  value: {
1091
1087
  setHasUnReadMessage: hasUnreadMessages => setHasUnread(hasUnreadMessages),
1092
1088
  setStatus: status => setIsOtherUserOnline(status)
@@ -1584,7 +1584,7 @@ var _templateObject$8, _templateObject2$3;
1584
1584
  var StyledWrapper = styled.div.withConfig({
1585
1585
  displayName: "style__StyledWrapper",
1586
1586
  componentId: "lui__sc-1hl3v3a-0"
1587
- })(["", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:", ";cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}"], gte('tablet')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n right: 16px;\n "]))), getColour$1('interaction', 'main'), _ref => {
1587
+ })(["", ";right:14px;position:fixed;bottom:30px;padding:14px;align-items:center;gap:10px;border-radius:40px;color:#fff;background-color:#e52c64;cursor:pointer;box-shadow:0px 0px 2px 0px rgba(0,0,0,0.12),0px 2px 2px 0px rgba(0,0,0,0.12),0px 1px 3px 0px rgba(0,0,0,0.14);transition:width 600ms ease-in-out;width:", ";&:hover{width:143px;}"], gte('tablet')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n right: 16px;\n "]))), _ref => {
1588
1588
  var {
1589
1589
  isContracted
1590
1590
  } = _ref;
@@ -1601,7 +1601,7 @@ var Label$1 = styled.span.withConfig({
1601
1601
  var Dot = styled.span.withConfig({
1602
1602
  displayName: "style__Dot",
1603
1603
  componentId: "lui__sc-1hl3v3a-3"
1604
- })(["width:24px;height:24px;border-radius:40px;background-color:#e52c64;position:absolute;top:-21px;right:-19px;"]);
1604
+ })(["width:24px;height:24px;border-radius:40px;background-color:", ";position:absolute;top:-21px;right:-19px;"], getColour$1('interaction', 'main'));
1605
1605
 
1606
1606
  var ChatBubble = _ref => {
1607
1607
  var {
@@ -1704,9 +1704,7 @@ props => {
1704
1704
  useEffect(() => {
1705
1705
  var timeout;
1706
1706
  if (props.enableChatBubble && chatBubble && isExperiment) {
1707
- timeout = setTimeout(() => {
1708
- setRenderChatBubble(true);
1709
- }, 1000);
1707
+ setRenderChatBubble(true);
1710
1708
  }
1711
1709
  return () => clearTimeout(timeout);
1712
1710
  }, [props, chatBubble, isExperiment]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lendi/navbar",
3
3
  "access": "restricted",
4
- "version": "7.35.1",
4
+ "version": "7.36.0",
5
5
  "license": "ISC",
6
6
  "source": "src/index.tsx",
7
7
  "main": "dist/navbar.cjs.js",