beem-component 2.1.13 → 2.1.15

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.
@@ -47,7 +47,7 @@ const Badge = _styledComponents.default.span.withConfig({
47
47
  });
48
48
  const Description = _styledComponents.default.p.withConfig({
49
49
  displayName: "HorizontalCard__Description"
50
- })(["margin-top:4px;font-size:0.9rem;color:#6b7280;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
50
+ })(["margin-top:4px;font-size:0.9rem;color:#6b7280;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word;"]);
51
51
  const MetaRow = _styledComponents.default.div.withConfig({
52
52
  displayName: "HorizontalCard__MetaRow"
53
53
  })(["display:flex;flex-wrap:wrap;gap:16px;margin-top:12px;"]);
@@ -28,19 +28,27 @@ const Overlay = exports.Overlay = _styledComponents.default.div.withConfig({
28
28
  })(["position:fixed;top:0;left:0;z-index:9999;width:100vw;height:100vh;background-color:", ";"], _colors.BmBgGrey45);
29
29
  const ModalContent = exports.ModalContent = _styledComponents.default.div.withConfig({
30
30
  displayName: "modal__ModalContent"
31
- })(["display:flex;flex-direction:column;border-radius:0.8571rem;padding:1rem;margin:2rem auto;background:", ";width:auto;max-width:100%;> *:not(:last-child){margin-bottom:0.5rem;}@media (min-width:576px){width:500px;}"], _colors.BmPrimaryWhite);
31
+ })(["display:flex;flex-direction:column;border-radius:0.8571rem;padding:1rem;margin:2rem auto;background:", ";width:auto;max-width:100%;> *:not(:last-child){margin-bottom:0.5rem;}@media (min-width:576px){width:", ";}"], _colors.BmPrimaryWhite, _ref => {
32
+ let {
33
+ size
34
+ } = _ref;
35
+ if (size) {
36
+ return size;
37
+ }
38
+ return '500px';
39
+ });
32
40
  const ModalWrapper = exports.ModalWrapper = _styledComponents.default.div.withConfig({
33
41
  displayName: "modal__ModalWrapper"
34
42
  })(["position:fixed;top:0;left:0;z-index:9999;display:block;width:100%;height:100%;overflow:hidden;outline:0;margin:auto;overflow-x:hidden;overflow-y:auto;"]);
35
- const BmModal = _ref => {
43
+ const BmModal = _ref2 => {
36
44
  let {
37
45
  children,
38
46
  show,
39
47
  size,
40
48
  onHide,
41
49
  centered
42
- } = _ref,
43
- rest = _objectWithoutProperties(_ref, _excluded);
50
+ } = _ref2,
51
+ rest = _objectWithoutProperties(_ref2, _excluded);
44
52
  const [toggle, setToggle] = (0, _react.useState)(show);
45
53
  (0, _react.useEffect)(() => {
46
54
  setToggle(show);
@@ -79,7 +87,7 @@ const ModalHeaderContent = _styledComponents.default.div.withConfig({
79
87
  const IconContainer = _styledComponents.default.div.withConfig({
80
88
  displayName: "modal__IconContainer"
81
89
  })(["display:flex;padding:0.5714rem;justify-content:center;align-items:center;border-radius:0.7143rem;border:0.0714rem solid var(--Gray-200,#eaecf0);background:var(--Base-White,#fff);box-shadow:0rem 0.0714rem 0.1429rem 0rem rgba(16,24,40,0.05);"]);
82
- BmModal.Header = _ref2 => {
90
+ BmModal.Header = _ref3 => {
83
91
  let {
84
92
  children,
85
93
  size,
@@ -89,8 +97,8 @@ BmModal.Header = _ref2 => {
89
97
  show,
90
98
  icon,
91
99
  trailingIcon
92
- } = _ref2,
93
- rest = _objectWithoutProperties(_ref2, _excluded2);
100
+ } = _ref3,
101
+ rest = _objectWithoutProperties(_ref3, _excluded2);
94
102
  return /*#__PURE__*/_react.default.createElement(Consumer, null, value => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ModalHeader, rest, trailingIcon && /*#__PURE__*/_react.default.createElement(IconContainer, null, trailingIcon), /*#__PURE__*/_react.default.createElement("div", {
95
103
  style: {
96
104
  width: '100%'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -31,7 +31,7 @@ import {
31
31
  // BmButtonDropDown,
32
32
  // BmBtnIcon,
33
33
  BmContactCard,
34
- // BmModal,
34
+ BmModal,
35
35
  // BmContactCheckbox,
36
36
  // BmCounter,
37
37
  // BmProfileIcon,
@@ -915,6 +915,7 @@ const Chat = () => {
915
915
  ],
916
916
  };
917
917
  };
918
+ const [showModal, setShowModal] = useState(false);
918
919
 
919
920
  const renderJsonMessagex = () => {
920
921
  const parsedMessage = JSON.parse(x.metadata.prev_message);
@@ -1075,6 +1076,20 @@ const Chat = () => {
1075
1076
  return (
1076
1077
  <>
1077
1078
  <GlobalStyle />
1079
+ <div>
1080
+ <BmButton onClick={() => setShowModal(!showModal)}>Click Me!</BmButton>
1081
+ </div>
1082
+ <BmModal show={showModal} onHide={() => setShowModal(false)}>
1083
+ <BmModal.Header closeButton>
1084
+ <h2>Header</h2>
1085
+ </BmModal.Header>
1086
+ <BmModal.Body>
1087
+ <p>This is a body</p>
1088
+ </BmModal.Body>
1089
+ <BmModal.Footer>
1090
+ <p>This is a footer</p>
1091
+ </BmModal.Footer>
1092
+ </BmModal>
1078
1093
 
1079
1094
  <div
1080
1095
  style={{
@@ -1093,7 +1108,7 @@ const Chat = () => {
1093
1108
  {sampleAppointmentTypes.map((type) => (
1094
1109
  <BmHorizontalCard
1095
1110
  name={type.name}
1096
- description={type.description}
1111
+ description="Handles imaging and diagnostic scanssdijfsdoijfoisd jsdoij fosidf jsdoif jsdoifs ergjri gr[ jdi[t gegrepg fghepoiurig hroegeigig hep etghtpg hepghrp eug hrg[o hrgiorwrgh w[uugo ggwg iuhwoigw[ig soiug [oh g[wgh[oig hrw[ouig hei reg rwg wgujhsuw hgwrg h9rug rfewrewg fskg42398 glskjgur ghwpgh43hsaujhpghrpeihhou re9ojgpoh"
1097
1112
  price={type.price}
1098
1113
  color={type.color}
1099
1114
  isActive={type.isActive}
@@ -90,9 +90,12 @@ const Description = styled.p`
90
90
  margin-top: 4px;
91
91
  font-size: 0.9rem;
92
92
  color: #6b7280;
93
+ display: -webkit-box;
94
+ -webkit-line-clamp: 1;
95
+ -webkit-box-orient: vertical;
93
96
  overflow: hidden;
94
97
  text-overflow: ellipsis;
95
- white-space: nowrap;
98
+ word-break: break-word;
96
99
  `;
97
100
 
98
101
  const MetaRow = styled.div`
@@ -34,7 +34,12 @@ export const ModalContent = styled.div`
34
34
  margin-bottom: 0.5rem;
35
35
  }
36
36
  @media (min-width: 576px) {
37
- width: 500px;
37
+ width: ${({ size }) => {
38
+ if (size) {
39
+ return size;
40
+ }
41
+ return '500px';
42
+ }};
38
43
  }
39
44
  `;
40
45