beem-component 1.2.1 → 1.2.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.
@@ -0,0 +1,42 @@
1
+ $breakpoints: ( xs: 0, sm: 480px, md: 720px, lg: 960px, xl: 1200px, xxl: 1400px);
2
+ @mixin xs {
3
+ @media (min-width: map-get($breakpoints, 'xs')) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin sm {
9
+ @media (min-width: map-get($breakpoints, 'sm')) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin md {
15
+ @media (min-width: map-get($breakpoints, 'md')) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin lg {
21
+ @media (min-width: map-get($breakpoints, 'lg')) {
22
+ @content;
23
+ }
24
+ }
25
+
26
+ @mixin xl {
27
+ @media (min-width: map-get($breakpoints, 'xl')) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin xxl {
33
+ @media (min-width: map-get($breakpoints, 'xxl')) {
34
+ @content;
35
+ }
36
+ }
37
+
38
+ @mixin breakpoint($bp: 0) {
39
+ @media (min-width: $bp) {
40
+ @content;
41
+ }
42
+ }
@@ -55,6 +55,7 @@
55
55
  max-height: 100%;
56
56
  flex-grow: 1;
57
57
  height: 100%;
58
+ width: fit-content;
58
59
  }
59
60
 
60
61
  .chat-menu {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
6
+ exports.default = exports.MessageState = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -25,7 +25,7 @@ var _excluded = ["state", "file", "src", "fileName"],
25
25
  _excluded2 = ["state", "src", "fileName"],
26
26
  _excluded3 = ["children", "state", "displayTime", "status", "session", "src", "file", "fileName"];
27
27
 
28
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
28
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
29
29
 
30
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
31
 
@@ -41,11 +41,9 @@ var BmChat = _styledComponents.default.div(_templateObject || (_templateObject =
41
41
  /* border: 0.071rem solid ${BmGrey400}; */
42
42
  );
43
43
 
44
- BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0rem 1.5rem;\n flex-grow: 1;\n overflow: auto;\n"])));
44
+ BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n padding: 0rem 1.5rem;\n flex-grow: 1;\n overflow: auto;\n height: 100%;\n"])));
45
45
 
46
- var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n ", "\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n margin-bottom: 0.5rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n"])), ""
47
- /* align-items: center; */
48
- , function (_ref) {
46
+ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n margin-bottom: 0.5rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n"])), function (_ref) {
49
47
  var state = _ref.state;
50
48
 
51
49
  if (state === "inbound") {
@@ -59,7 +57,7 @@ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject
59
57
  return "row";
60
58
  });
61
59
 
62
- var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 50%;\n > * {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem; \n }\n"])));
60
+ var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 70%;\n > * {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n"])));
63
61
 
64
62
  var Messages = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem;\n background: ", ";\n color: ", ";\n border-radius: ", ";\n border: 0.071rem solid ", ";\n word-break: break-all;\n margin: 0rem;\n"])), function (_ref2) {
65
63
  var state = _ref2.state;
@@ -214,11 +212,15 @@ var BmImageChat = function BmImageChat(_ref13) {
214
212
  file: src,
215
213
  fileName: fileName
216
214
  }, rest))));
217
- }; //End of Component for Images
218
-
215
+ };
219
216
 
220
217
  exports.BmImageChat = BmImageChat;
221
218
 
219
+ var MessageState = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n @media all and (max-width: 960px) {\n display: none;\n }\n"]))); //End of Component for Images
220
+
221
+
222
+ exports.MessageState = MessageState;
223
+
222
224
  BmChat.Details = function (_ref14) {
223
225
  var children = _ref14.children,
224
226
  state = _ref14.state,
@@ -230,13 +232,12 @@ BmChat.Details = function (_ref14) {
230
232
  fileName = _ref14.fileName,
231
233
  rest = _objectWithoutProperties(_ref14, _excluded3);
232
234
 
233
- console.log("bbbb", fileName);
234
235
  return /*#__PURE__*/_react.default.createElement(Details, _extends({
235
236
  state: state
236
- }, rest), state === "inbound" && session && handleState({
237
+ }, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "inbound" && session && handleState({
237
238
  state: state,
238
239
  session: session
239
- }), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
+ })), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
241
  state: state,
241
242
  src: src,
242
243
  fileName: fileName
@@ -254,12 +255,12 @@ BmChat.Details = function (_ref14) {
254
255
  icon: /*#__PURE__*/_react.default.createElement(_icons.Done, null),
255
256
  color: "".concat(_colors.BmPrimaryBlack),
256
257
  size: "small"
257
- }))), state === "outbound" && session && handleState({
258
+ }))), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "outbound" && session && handleState({
258
259
  state: state,
259
260
  session: session
260
- }));
261
+ })));
261
262
  };
262
263
 
263
- BmChat.Footer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
264
+ BmChat.Footer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
264
265
  var _default = BmChat;
265
266
  exports.default = _default;
@@ -54,11 +54,11 @@ var _React$createContext = /*#__PURE__*/_react.default.createContext(),
54
54
  Provider = _React$createContext.Provider,
55
55
  Consumer = _React$createContext.Consumer;
56
56
 
57
- var Overlay = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n \tposition: fixed;\n top: 0;\n left: 0;\n z-index: 9999;\n width: 100%;\n height: 100%;\n background-color: ", ";\n}\n"])), _colors.BmBgGrey45);
57
+ var Overlay = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n \tposition: fixed;\n top: 0;\n left: 0;\n z-index: 9999;\n width: 100vw;\n height: 100vh;\n background-color: ", ";\n}\n"])), _colors.BmBgGrey45);
58
58
 
59
59
  exports.Overlay = Overlay;
60
60
 
61
- var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
61
+ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n max-width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
62
62
  var size = _ref.size;
63
63
 
64
64
  if (size) {
@@ -70,20 +70,33 @@ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateO
70
70
  }
71
71
 
72
72
  return "35.714rem";
73
- });
74
-
75
- exports.ModalContent = ModalContent;
73
+ }, function (_ref2) {
74
+ var size = _ref2.size;
76
75
 
77
- var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 9999;\n overflow-x: auto;\n overflow-y: auto;\n outline: 0;\n position: fixed;\n height: auto;\n top: ", ";\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (_ref2) {
78
- var centered = _ref2.centered;
79
-
80
- if (centered) {
81
- return "50%";
76
+ if (size) {
77
+ if (size === "small") return "21.429rem";
78
+ if (size === "default") return "35.714rem";
79
+ if (size === "large") return "57.143rem";
80
+ if (size === "xlarge") return "81.429rem";
81
+ return size;
82
82
  }
83
83
 
84
- return "10%";
84
+ return "35.714rem";
85
85
  });
86
86
 
87
+ exports.ModalContent = ModalContent;
88
+
89
+ var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n z-index: 9999;\n display: block;\n width: 100%;\n height: 100%;\n overflow: hidden;\n outline: 0;\n margin: 2rem auto;\n ", "\n"])), ''
90
+ /* top: ${({ centered }) => {
91
+ if (centered) {
92
+ return "50%";
93
+ }
94
+ return "15%";
95
+ }};
96
+ left: 50%;
97
+ transform: translate(-50%, -50%); */
98
+ );
99
+
87
100
  exports.ModalWrapper = ModalWrapper;
88
101
 
89
102
  var BmModal = function BmModal(_ref3) {
@@ -153,7 +166,7 @@ BmModal.Header = function (_ref4) {
153
166
  });
154
167
  };
155
168
 
156
- BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n height: ", ";\n overflow: auto;\n ", "\n ", "\n"])), function (_ref5) {
169
+ BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n max-height: ", ";\n overflow: auto;\n"])), function (_ref5) {
157
170
  var size = _ref5.size;
158
171
 
159
172
  if (size) {
@@ -165,16 +178,7 @@ BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObjec
165
178
  }
166
179
 
167
180
  return "35.714rem";
168
- }, ''
169
- /* height: 100%; */
170
- , ''
171
- /* > * {
172
- display: flex;
173
- flex-direction: row;
174
- justify-content: space-between;
175
- width: 100%;
176
- } */
177
- );
181
+ });
178
182
  BmModal.Footer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
179
183
  BmModal.propTypes = {
180
184
  size: _propTypes.default.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import "../src/main.scss";
3
3
  import { BmButton, MainWrapper, BmModal } from "./lib/components";
4
+ import AsyncSelect from 'react-select/async';
4
5
  import { GlobalStyle } from "./lib/components/globalStyles";
5
6
  import "./lib/assets/css/sidebar.scss";
6
7
  import SideBar from "./SideBar";
@@ -20,68 +21,16 @@ export const App = () => {
20
21
  Click Me!
21
22
  </BmButton>
22
23
  </div>
23
- <BmModal show={showModal} onHide={() => setShowModal(false)} centered>
24
+ <BmModal show={showModal} onHide={() => setShowModal(false)}>
24
25
  <BmModal.Header closeButton>
25
26
  <h2>Header</h2>
26
27
  </BmModal.Header>
27
28
  <BmModal.Body>
28
- <p>This is a body</p>
29
- <p>This is a body</p>
30
- <p>This is a body</p>
31
- <p>This is a body</p>
32
- <p>This is a body</p>
33
- <p>This is a body</p>
34
- <p>This is a body</p>
35
- <p>This is a body</p>
36
- <p>This is a body</p>
37
- <p>This is a body</p>
38
- <p>This is a body</p>
39
- <p>This is a body</p>
40
- <p>This is a body</p>
41
- <p>This is a body</p>
42
- <p>This is a body</p>
43
- <p>This is a body</p>
44
- <p>This is a body</p>
45
- <p>This is a body</p>
46
- <p>This is a body</p>
47
- <p>This is a body</p>
48
- <p>This is a body</p>
49
- <p>This is a body</p>
50
- <p>This is a body</p>
51
- <p>This is a body</p>
52
- <p>This is a body</p>
53
- <p>This is a body</p>
54
- <p>This is a body</p>
55
- <p>This is a body</p>
56
- <p>This is a body</p>
57
- <p>This is a body</p>
58
- <p>This is a body</p>
59
- <p>This is a body</p>
60
- <p>This is a body</p>
61
- <p>This is a body</p>
62
- <p>This is a body</p>
63
- <p>This is a body</p>
64
- <p>This is a body</p>
65
- <p>This is a body</p>
66
- <p>This is a body</p>
67
- <p>This is a body</p>
68
- <p>This is a body</p>
69
- <p>This is a body</p>
70
- <p>This is a body</p>
71
- <p>This is a body</p>
72
- <p>This is a body</p>
73
- <p>This is a body</p>
74
- <p>This is a body</p>
75
- <p>This is a body</p>
76
- <p>This is a body</p>
77
- <p>This is a body</p>
78
- <p>This is a body</p>
79
- <p>This is a body</p>
80
- <p>This is a body</p>
81
- <p>This is a body</p>
82
- <p>This is a body</p>
83
- <p>This is a body</p>
84
- <p>This is a body</p>
29
+ <AsyncSelect
30
+ cacheOptions
31
+ defaultOptions
32
+ placeholder="Search for an agent"
33
+ />{" "}
85
34
  </BmModal.Body>
86
35
  <BmModal.Footer>
87
36
  <p>This is a footer</p>
package/src/Chat.js CHANGED
@@ -20,6 +20,28 @@ const Chat = () => {
20
20
  src={image}
21
21
  fileName={<p>attachment.jpg</p>}
22
22
  />
23
+ <BmChat.Details
24
+ state="outbound"
25
+ session="bot"
26
+ displayTime={<p>12:00pm</p>}
27
+ status="sent"
28
+ // src={image}
29
+ // fileName={<p>attachment.jpg</p>}
30
+ >
31
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
32
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
33
+ Angalia asilimia ya QUALITY pale chini.
34
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
35
+ Au kama una aina nyingine ya kisimbuzi;
36
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
37
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
38
+ Au
39
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
40
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
41
+ Angalia asilimia ya QUALITY pale chini.
42
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
43
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
44
+ </BmChat.Details>
23
45
  <BmChat.Details
24
46
  state="inbound"
25
47
  session="bot"
@@ -28,7 +50,19 @@ const Chat = () => {
28
50
  // src={image}
29
51
  // fileName={<p>attachment.jpg</p>}
30
52
  >
31
- Hello
53
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
54
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
55
+ Angalia asilimia ya QUALITY pale chini.
56
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
57
+ Au kama una aina nyingine ya kisimbuzi;
58
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
59
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
60
+ Au
61
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
62
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
63
+ Angalia asilimia ya QUALITY pale chini.
64
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
65
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
32
66
  </BmChat.Details>
33
67
  <BmChat.Details
34
68
  state="outbound"
@@ -0,0 +1,42 @@
1
+ $breakpoints: ( xs: 0, sm: 480px, md: 720px, lg: 960px, xl: 1200px, xxl: 1400px);
2
+ @mixin xs {
3
+ @media (min-width: map-get($breakpoints, 'xs')) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin sm {
9
+ @media (min-width: map-get($breakpoints, 'sm')) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin md {
15
+ @media (min-width: map-get($breakpoints, 'md')) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin lg {
21
+ @media (min-width: map-get($breakpoints, 'lg')) {
22
+ @content;
23
+ }
24
+ }
25
+
26
+ @mixin xl {
27
+ @media (min-width: map-get($breakpoints, 'xl')) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin xxl {
33
+ @media (min-width: map-get($breakpoints, 'xxl')) {
34
+ @content;
35
+ }
36
+ }
37
+
38
+ @mixin breakpoint($bp: 0) {
39
+ @media (min-width: $bp) {
40
+ @content;
41
+ }
42
+ }
@@ -55,6 +55,7 @@
55
55
  max-height: 100%;
56
56
  flex-grow: 1;
57
57
  height: 100%;
58
+ width: fit-content;
58
59
  }
59
60
 
60
61
  .chat-menu {
@@ -2,7 +2,7 @@ import { Person } from "@material-ui/icons";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import styled from "styled-components";
5
- import { BmGrey100, BmPrimaryBlue, BmGrey400 } from "../colors";
5
+ import { BmGrey100, BmPrimaryBlue } from "../colors";
6
6
  import { BmAvatarIcon } from "../iconStyles";
7
7
  import SmartToyIcon from '@mui/icons-material/SmartToy';
8
8
 
@@ -23,15 +23,15 @@ const BmChat = styled.div`
23
23
 
24
24
  BmChat.Body = styled.div`
25
25
  display: flex;
26
- flex-direction: column;
26
+ flex-direction: column-reverse;
27
27
  padding: 0rem 1.5rem;
28
28
  flex-grow: 1;
29
29
  overflow: auto;
30
+ height: 100%;
30
31
  `;
31
32
 
32
33
  const Details = styled.div`
33
34
  display: flex;
34
- ${"" /* align-items: center; */}
35
35
  justify-content: ${({ state }) => {
36
36
  if (state === "inbound") {
37
37
  return "flex-start";
@@ -54,10 +54,10 @@ const Details = styled.div`
54
54
  const MessageDetails = styled.div`
55
55
  display: flex;
56
56
  flex-direction: column;
57
- max-width: 50%;
57
+ max-width: 70%;
58
58
  > * {
59
59
  margin-top: 0.5rem;
60
- margin-bottom: 0.5rem;
60
+ margin-bottom: 0.5rem;
61
61
  }
62
62
  `;
63
63
 
@@ -216,6 +216,12 @@ export const BmImageChat = ({ state, src, fileName, ...rest }) => {
216
216
  );
217
217
  };
218
218
 
219
+ export const MessageState = styled.div`
220
+ @media all and (max-width: 960px) {
221
+ display: none;
222
+ }
223
+ `;
224
+
219
225
  //End of Component for Images
220
226
 
221
227
  BmChat.Details = ({
@@ -229,10 +235,12 @@ BmChat.Details = ({
229
235
  fileName,
230
236
  ...rest
231
237
  }) => {
232
- console.log("bbbb", fileName);
233
238
  return (
234
239
  <Details state={state} {...rest}>
235
- {state === "inbound" && session && handleState({ state, session })}
240
+ {/* Adding for mobile */}
241
+ <MessageState>
242
+ {state === "inbound" && session && handleState({ state, session })}
243
+ </MessageState>
236
244
  <MessageDetails>
237
245
  {/* For Images */}
238
246
  {src && (
@@ -263,7 +271,9 @@ BmChat.Details = ({
263
271
  )}
264
272
  </MessagesSubDetails>
265
273
  </MessageDetails>
266
- {state === "outbound" && session && handleState({ state, session })}
274
+ <MessageState>
275
+ {state === "outbound" && session && handleState({ state, session })}
276
+ </MessageState>
267
277
  </Details>
268
278
  );
269
279
  };
@@ -12,8 +12,8 @@ export const Overlay = styled.div`
12
12
  top: 0;
13
13
  left: 0;
14
14
  z-index: 9999;
15
- width: 100%;
16
- height: 100%;
15
+ width: 100vw;
16
+ height: 100vh;
17
17
  background-color: ${BmBgGrey45};
18
18
  }
19
19
  `;
@@ -34,26 +34,40 @@ export const ModalContent = styled.div`
34
34
  }
35
35
  return "35.714rem";
36
36
  }};
37
+ max-width: ${({ size }) => {
38
+ if (size) {
39
+ if (size === "small") return "21.429rem";
40
+ if (size === "default") return "35.714rem";
41
+ if (size === "large") return "57.143rem";
42
+ if (size === "xlarge") return "81.429rem";
43
+ return size;
44
+ }
45
+ return "35.714rem";
46
+ }};
37
47
  > *:not(:last-child) {
38
48
  margin-bottom: 1rem;
39
49
  }
40
50
  `;
41
51
 
42
52
  export const ModalWrapper = styled.div`
53
+ position: fixed;
54
+ top: 0;
55
+ left: 0;
43
56
  z-index: 9999;
44
- overflow-x: auto;
45
- overflow-y: auto;
57
+ display: block;
58
+ width: 100%;
59
+ height: 100%;
60
+ overflow: hidden;
46
61
  outline: 0;
47
- position: fixed;
48
- height: auto;
49
- top: ${({ centered }) => {
62
+ margin: 2rem auto;
63
+ ${'' /* top: ${({ centered }) => {
50
64
  if (centered) {
51
65
  return "50%";
52
66
  }
53
- return "10%";
67
+ return "15%";
54
68
  }};
55
69
  left: 50%;
56
- transform: translate(-50%, -50%);
70
+ transform: translate(-50%, -50%); */}
57
71
  `;
58
72
 
59
73
  export const BmModal = ({
@@ -138,7 +152,7 @@ BmModal.Body = styled.div`
138
152
  > *:not(:last-child) {
139
153
  margin-bottom: 0.5rem;
140
154
  }
141
- height: ${({ size }) => {
155
+ max-height: ${({ size }) => {
142
156
  if (size) {
143
157
  if (size === "small") return "21.429rem";
144
158
  if (size === "default") return "35.714rem";
@@ -149,13 +163,6 @@ BmModal.Body = styled.div`
149
163
  return "35.714rem";
150
164
  }};
151
165
  overflow: auto;
152
- ${'' /* height: 100%; */}
153
- ${'' /* > * {
154
- display: flex;
155
- flex-direction: row;
156
- justify-content: space-between;
157
- width: 100%;
158
- } */}
159
166
  `;
160
167
 
161
168
  BmModal.Footer = styled.div`