beem-component 2.1.12 → 2.1.14
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/components/BmTabv2/BmTabv2.js +1 -1
- package/dist/components/HorizontalCard/HorizontalCard.js +2 -1
- package/dist/components/Modals/modal.js +15 -7
- package/package.json +1 -1
- package/src/App.js +32 -11
- package/src/lib/components/BmTabv2/BmTabv2.js +1 -0
- package/src/lib/components/HorizontalCard/HorizontalCard.js +2 -1
- package/src/lib/components/Modals/modal.js +6 -1
|
@@ -16,7 +16,7 @@ const TabsHeader = _styledComponents.default.div.withConfig({
|
|
|
16
16
|
})(["display:flex;justify-content:flex-start;align-items:center;margin-bottom:14px;padding:0 14px;border-radius:var(--radius-lg,12px);flex-wrap:wrap;"]);
|
|
17
17
|
const TabsList = _styledComponents.default.div.withConfig({
|
|
18
18
|
displayName: "BmTabv2__TabsList"
|
|
19
|
-
})(["display:inline-flex;background-color:var(--color-muted,#f2f2f2);color:var(--color-muted-foreground,#666);align-items:center;justify-content:center;border-radius:var(--radius-lg,12px);padding:4px 4px;"]);
|
|
19
|
+
})(["width:100%;display:inline-flex;background-color:var(--color-muted,#f2f2f2);color:var(--color-muted-foreground,#666);align-items:center;justify-content:center;border-radius:var(--radius-lg,12px);padding:4px 4px;"]);
|
|
20
20
|
const TabsTriggerButton = _styledComponents.default.button.withConfig({
|
|
21
21
|
displayName: "BmTabv2__TabsTriggerButton"
|
|
22
22
|
})(["display:inline-flex;flex:1;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:var(--radius-lg,12px);padding:6px 12px;font-size:14px;font-weight:500;white-space:nowrap;transition:color 0.2s,box-shadow 0.2s,background-color 0.2s;cursor:pointer;", " &:focus-visible{outline:none;border-color:var(--color-ring,#2684ff);box-shadow:0 0 0 3px rgba(38,132,255,0.3);}&:disabled{pointer-events:none;opacity:0.5;}svg{flex-shrink:0;pointer-events:none;width:16px;height:16px;}"], _ref => {
|
|
@@ -14,6 +14,7 @@ var _Edit = _interopRequireDefault(require("@mui/icons-material/Edit"));
|
|
|
14
14
|
var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
|
|
15
15
|
var _Groups2Outlined = _interopRequireDefault(require("@mui/icons-material/Groups2Outlined"));
|
|
16
16
|
var _PeopleAltOutlined = _interopRequireDefault(require("@mui/icons-material/PeopleAltOutlined"));
|
|
17
|
+
var _lodash = require("lodash");
|
|
17
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
const RowContainer = _styledComponents.default.div.withConfig({
|
|
@@ -95,7 +96,7 @@ const BmHorizontalCard = _ref4 => {
|
|
|
95
96
|
fontSize: "small"
|
|
96
97
|
}), /*#__PURE__*/_react.default.createElement("span", null, price === 0 ? 'Free' : "$".concat(price))), /*#__PURE__*/_react.default.createElement(MetaItem, null, /*#__PURE__*/_react.default.createElement(_LocationOnOutlined.default, {
|
|
97
98
|
fontSize: "small"
|
|
98
|
-
}), /*#__PURE__*/_react.default.createElement("span", null, location, location === 'physical' && address ? " (".concat(address.split(',')[0], "...)") : '')), guest_limit && /*#__PURE__*/_react.default.createElement(MetaItem, null, /*#__PURE__*/_react.default.createElement(_Groups2Outlined.default, {
|
|
99
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, location, (0, _lodash.lowerCase)(location) === 'physical' && address ? " (".concat(address.split(',')[0], "...)") : '')), guest_limit && /*#__PURE__*/_react.default.createElement(MetaItem, null, /*#__PURE__*/_react.default.createElement(_Groups2Outlined.default, {
|
|
99
100
|
fontSize: "small"
|
|
100
101
|
}), /*#__PURE__*/_react.default.createElement("span", null, "Max ", guest_limit, " attendee", guest_limit > 1 ? 's' : '')), selectedResources && selectedResources.length > 0 && /*#__PURE__*/_react.default.createElement(MetaItem, null, /*#__PURE__*/_react.default.createElement(_PeopleAltOutlined.default, {
|
|
101
102
|
fontSize: "small"
|
|
@@ -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:
|
|
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 =
|
|
43
|
+
const BmModal = _ref2 => {
|
|
36
44
|
let {
|
|
37
45
|
children,
|
|
38
46
|
show,
|
|
39
47
|
size,
|
|
40
48
|
onHide,
|
|
41
49
|
centered
|
|
42
|
-
} =
|
|
43
|
-
rest = _objectWithoutProperties(
|
|
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 =
|
|
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
|
-
} =
|
|
93
|
-
rest = _objectWithoutProperties(
|
|
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
package/src/App.js
CHANGED
|
@@ -10,7 +10,7 @@ import PersonIcon from '@mui/icons-material/Person';
|
|
|
10
10
|
import CalendarTodayOutlinedIcon from '@mui/icons-material/CalendarTodayOutlined';
|
|
11
11
|
|
|
12
12
|
import GroupIcon from '@mui/icons-material/Group';
|
|
13
|
-
import BusinessIcon from '@mui/icons-material/Business';
|
|
13
|
+
// import BusinessIcon from '@mui/icons-material/Business';
|
|
14
14
|
|
|
15
15
|
import CheckIcon from '@mui/icons-material/Check';
|
|
16
16
|
import EditIcon from '@mui/icons-material/Edit';
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
// BmButtonDropDown,
|
|
32
32
|
// BmBtnIcon,
|
|
33
33
|
BmContactCard,
|
|
34
|
-
|
|
34
|
+
BmModal,
|
|
35
35
|
// BmContactCheckbox,
|
|
36
36
|
// BmCounter,
|
|
37
37
|
// BmProfileIcon,
|
|
@@ -71,7 +71,7 @@ import AlertBox from './lib/components/Alert/Alert';
|
|
|
71
71
|
// });
|
|
72
72
|
// console.log(datsa);
|
|
73
73
|
const tabs = [
|
|
74
|
-
{ value: 'departments', label: 'Departments'
|
|
74
|
+
{ value: 'departments', label: 'Departments' },
|
|
75
75
|
{ value: 'resources', label: 'Resources', icon: GroupIcon },
|
|
76
76
|
{ value: 'events', label: 'Events', icon: CalendarTodayOutlinedIcon },
|
|
77
77
|
];
|
|
@@ -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,7 +1076,34 @@ const Chat = () => {
|
|
|
1075
1076
|
return (
|
|
1076
1077
|
<>
|
|
1077
1078
|
<GlobalStyle />
|
|
1078
|
-
<div
|
|
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>
|
|
1093
|
+
|
|
1094
|
+
<div
|
|
1095
|
+
style={{
|
|
1096
|
+
display: 'flex',
|
|
1097
|
+
flexDirection: 'column',
|
|
1098
|
+
gap: '2rem',
|
|
1099
|
+
width: '50%',
|
|
1100
|
+
}}
|
|
1101
|
+
>
|
|
1102
|
+
<BmCustomTab
|
|
1103
|
+
value={activeTab}
|
|
1104
|
+
onValueChange={setActiveTab}
|
|
1105
|
+
tabs={tabs}
|
|
1106
|
+
/>
|
|
1079
1107
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
|
1080
1108
|
{sampleAppointmentTypes.map((type) => (
|
|
1081
1109
|
<BmHorizontalCard
|
|
@@ -1099,13 +1127,6 @@ const Chat = () => {
|
|
|
1099
1127
|
))}
|
|
1100
1128
|
</div>
|
|
1101
1129
|
|
|
1102
|
-
<BmCustomTab
|
|
1103
|
-
value={activeTab}
|
|
1104
|
-
onValueChange={setActiveTab}
|
|
1105
|
-
tabs={tabs}
|
|
1106
|
-
className="event-types-tabs"
|
|
1107
|
-
/>
|
|
1108
|
-
|
|
1109
1130
|
<div style={{ width: '100%', maxWidth: '900px', margin: '2rem auto' }}>
|
|
1110
1131
|
<div style={{ maxWidth: 400, margin: '2rem auto' }}>
|
|
1111
1132
|
<BmDepartmentCard
|
|
@@ -8,6 +8,7 @@ import EditIcon from '@mui/icons-material/Edit';
|
|
|
8
8
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
9
9
|
import Groups2OutlinedIcon from '@mui/icons-material/Groups2Outlined';
|
|
10
10
|
import PeopleAltOutlinedIcon from '@mui/icons-material/PeopleAltOutlined';
|
|
11
|
+
import { lowerCase } from 'lodash';
|
|
11
12
|
|
|
12
13
|
const RowContainer = styled.div`
|
|
13
14
|
position: relative;
|
|
@@ -195,7 +196,7 @@ const BmHorizontalCard = ({
|
|
|
195
196
|
<LocationOnOutlinedIcon fontSize="small" />
|
|
196
197
|
<span>
|
|
197
198
|
{location}
|
|
198
|
-
{location === 'physical' && address
|
|
199
|
+
{lowerCase(location) === 'physical' && address
|
|
199
200
|
? ` (${address.split(',')[0]}...)`
|
|
200
201
|
: ''}
|
|
201
202
|
</span>
|