beem-component 2.1.29 → 2.1.31
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/Dockerfile +1 -1
- package/Jenkinsfile +20 -5
- package/dist/assets/voiceCallIcon.svg +5 -0
- package/dist/components/Alert/Alert.js +83 -0
- package/dist/components/Alert/Alert.stories.js +66 -0
- package/dist/components/BmCustomCardTitle/CustomCardTitle.js +181 -0
- package/dist/components/BmCustomCardTitle/CustomCardTitle.stories.js +92 -0
- package/dist/components/BmSelector/BmSelector.js +15 -2
- package/dist/components/BmSelector/BmSelector.stories.js +14 -1
- package/dist/components/BmTabv2/BmTabv2.js +51 -0
- package/dist/components/BmTabv2/BmTabv2.stories.js +73 -0
- package/dist/components/Card_v2/Card.js +38 -12
- package/dist/components/ChatComponents/ChatBody/chatBody.js +402 -104
- package/dist/components/DepartmentCard/DepartmentCard.js +99 -0
- package/dist/components/DepartmentCard/DepartmentCard.stories.js +53 -0
- package/dist/components/HorizontalCard/HorizontalCard.js +142 -0
- package/dist/components/HorizontalCard/HorizontalCard.stories.js +40 -0
- package/dist/components/InfoPanel/InfoPanel.js +54 -17
- package/dist/components/InfoPanel/InfoPanel.stories.js +56 -4
- package/dist/components/Modals/modal.js +26 -10
- package/dist/components/Modals/modals.stories.js +13 -6
- package/dist/components/ProfileIcon/ProfileIcon.js +5 -0
- package/dist/components/ResourceCard/ResourceCard.js +132 -0
- package/dist/components/ResourceCard/ResourceCard.stories.js +94 -0
- package/dist/components/globalStyles.js +1 -1
- package/dist/components/index.js +42 -0
- package/dist/components/text.js +11 -10
- package/dist/components/typography.js +3 -2
- package/package.json +2 -1
- package/public/index.html +1 -0
- package/src/App.js +804 -1412
- package/src/fonts/Inter-Black.woff2 +0 -0
- package/src/fonts/Inter-Bold.woff2 +0 -0
- package/src/fonts/Inter-ExtraBold.woff2 +0 -0
- package/src/fonts/Inter-ExtraLight.woff2 +0 -0
- package/src/fonts/Inter-Light.woff2 +0 -0
- package/src/fonts/Inter-Medium.woff2 +0 -0
- package/src/fonts/Inter-Regular.woff2 +0 -0
- package/src/fonts/Inter-SemiBold.woff2 +0 -0
- package/src/fonts/Inter-Thin.woff2 +0 -0
- package/src/fonts/Inter-VariableFont_opsz,wght.ttf +0 -0
- package/src/fonts/InterDisplay-Black.woff2 +0 -0
- package/src/fonts/InterDisplay-Bold.woff2 +0 -0
- package/src/fonts/InterDisplay-ExtraBold.woff2 +0 -0
- package/src/fonts/InterDisplay-ExtraLight.woff2 +0 -0
- package/src/fonts/InterDisplay-Light.woff2 +0 -0
- package/src/fonts/InterDisplay-Medium.woff2 +0 -0
- package/src/fonts/InterDisplay-SemiBold.woff2 +0 -0
- package/src/fonts/InterDisplay-Thin.woff2 +0 -0
- package/src/fonts.scss +4 -1
- package/src/lib/assets/voiceCallIcon.svg +5 -0
- package/src/lib/components/Alert/Alert.js +111 -0
- package/src/lib/components/Alert/Alert.stories.jsx +66 -0
- package/src/lib/components/BmCustomCardTitle/CustomCardTitle.js +162 -0
- package/src/lib/components/BmCustomCardTitle/CustomCardTitle.stories.jsx +92 -0
- package/src/lib/components/BmSelector/BmSelector.js +14 -1
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +10 -0
- package/src/lib/components/BmTabv2/BmTabv2.js +109 -0
- package/src/lib/components/BmTabv2/BmTabv2.stories.jsx +51 -0
- package/src/lib/components/Card_v2/Card.js +46 -13
- package/src/lib/components/ChatComponents/ChatBody/chatBody.js +551 -57
- package/src/lib/components/DepartmentCard/DepartmentCard.js +130 -0
- package/src/lib/components/DepartmentCard/DepartmentCard.stories.jsx +38 -0
- package/src/lib/components/HorizontalCard/HorizontalCard.js +276 -0
- package/src/lib/components/HorizontalCard/HorizontalCard.stories.jsx +33 -0
- package/src/lib/components/InfoPanel/InfoPanel.js +35 -11
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +42 -2
- package/src/lib/components/Modals/modal.js +17 -4
- package/src/lib/components/Modals/modals.stories.js +10 -6
- package/src/lib/components/ProfileIcon/ProfileIcon.js +4 -0
- package/src/lib/components/ResourceCard/ResourceCard.js +213 -0
- package/src/lib/components/ResourceCard/ResourceCard.stories.jsx +68 -0
- package/src/lib/components/globalStyles.js +2 -1
- package/src/lib/components/index.js +13 -0
- package/src/lib/components/text.js +17 -11
- package/src/lib/components/typography.js +1 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ExampleTabs = exports.ExampleCustomTabsUsage = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _CalendarTodayOutlined = _interopRequireDefault(require("@mui/icons-material/CalendarTodayOutlined"));
|
|
9
|
+
var _Group = _interopRequireDefault(require("@mui/icons-material/Group"));
|
|
10
|
+
var _Business = _interopRequireDefault(require("@mui/icons-material/Business"));
|
|
11
|
+
var _BmTabv = _interopRequireDefault(require("./BmTabv2"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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); }
|
|
14
|
+
const ExampleCustomTabsUsage = () => {
|
|
15
|
+
const [activeTab, setActiveTab] = (0, _react.useState)('departments');
|
|
16
|
+
const tabs = [{
|
|
17
|
+
value: 'departments',
|
|
18
|
+
label: 'Departments',
|
|
19
|
+
icon: _Business.default
|
|
20
|
+
}, {
|
|
21
|
+
value: 'resources',
|
|
22
|
+
label: 'Resources',
|
|
23
|
+
icon: _Group.default
|
|
24
|
+
}, {
|
|
25
|
+
value: 'events',
|
|
26
|
+
label: 'Events',
|
|
27
|
+
icon: _CalendarTodayOutlined.default
|
|
28
|
+
}];
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
style: {
|
|
31
|
+
padding: 20
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_BmTabv.default, {
|
|
34
|
+
value: activeTab,
|
|
35
|
+
onValueChange: setActiveTab,
|
|
36
|
+
tabs: tabs
|
|
37
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
style: {
|
|
39
|
+
marginTop: 20
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, "Current Tab:"), " ", activeTab));
|
|
42
|
+
};
|
|
43
|
+
exports.ExampleCustomTabsUsage = ExampleCustomTabsUsage;
|
|
44
|
+
var _default = exports.default = {
|
|
45
|
+
title: 'Components/CustomTabs',
|
|
46
|
+
component: _BmTabv.default
|
|
47
|
+
};
|
|
48
|
+
const ExampleTabs = () => {
|
|
49
|
+
const [activeTab, setActiveTab] = (0, _react.useState)('departments');
|
|
50
|
+
const tabs = [{
|
|
51
|
+
value: 'departments',
|
|
52
|
+
label: 'Departments',
|
|
53
|
+
icon: _Business.default
|
|
54
|
+
}, {
|
|
55
|
+
value: 'resources',
|
|
56
|
+
label: 'Resources',
|
|
57
|
+
icon: _Group.default
|
|
58
|
+
}, {
|
|
59
|
+
value: 'events',
|
|
60
|
+
label: 'Events',
|
|
61
|
+
icon: _CalendarTodayOutlined.default
|
|
62
|
+
}];
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BmTabv.default, {
|
|
64
|
+
value: activeTab,
|
|
65
|
+
onValueChange: setActiveTab,
|
|
66
|
+
tabs: tabs
|
|
67
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
style: {
|
|
69
|
+
marginTop: '20px'
|
|
70
|
+
}
|
|
71
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, "You have selected: ", /*#__PURE__*/_react.default.createElement("strong", null, activeTab))));
|
|
72
|
+
};
|
|
73
|
+
exports.ExampleTabs = ExampleTabs;
|
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BmCardv2 = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
const _excluded = ["className", "children", "borderColor", "borderWidth"];
|
|
9
|
+
const _excluded = ["className", "children", "borderColor", "borderWidth", "contentHeight"];
|
|
10
10
|
/* eslint-disable func-style */
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
12
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
14
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
14
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
@@ -23,10 +24,11 @@ const hexToRgba = function (hex) {
|
|
|
23
24
|
const g = parseInt(normalizedHex.slice(2, 4), 16);
|
|
24
25
|
const b = parseInt(normalizedHex.slice(4, 6), 16);
|
|
25
26
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
26
|
-
} catch (
|
|
27
|
+
} catch (_unused) {
|
|
27
28
|
return "rgba(0, 0, 0, ".concat(opacity, ")");
|
|
28
29
|
}
|
|
29
30
|
};
|
|
31
|
+
const CardContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
30
32
|
const StyledCard = _styledComponents.default.div.withConfig({
|
|
31
33
|
displayName: "Card__StyledCard"
|
|
32
34
|
})(["background-color:var(--card,#fff);color:var(--card-foreground,#000);display:flex;flex-direction:column;gap:1.5rem;border-radius:0.75rem;border-style:solid;border-color:", ";border-width:", ";width:100%;"], _ref => {
|
|
@@ -49,25 +51,49 @@ const Title = _styledComponents.default.h4.withConfig({
|
|
|
49
51
|
const Description = _styledComponents.default.p.withConfig({
|
|
50
52
|
displayName: "Card__Description"
|
|
51
53
|
})(["color:var(--muted-foreground,#666);margin:0;"]);
|
|
52
|
-
const
|
|
53
|
-
displayName: "
|
|
54
|
-
})(["padding:0 1.5rem
|
|
54
|
+
const ContentWrapper = _styledComponents.default.div.withConfig({
|
|
55
|
+
displayName: "Card__ContentWrapper"
|
|
56
|
+
})(["min-height:", ";padding:0 1.5rem;max-height:calc(100vh - 28.5714rem);overflow-y:auto;scrollbar-width:thin;scrollbar-color:", " transparent;&::-webkit-scrollbar-thumb{background:", ";border-radius:0.6429rem;transition:background 0.2s ease;}&::-webkit-scrollbar-thumb:hover{background:", ";}&:last-child{padding-bottom:1.5rem;}@media (max-width:54.8571rem){max-height:calc(100vh - 17.8572rem);}"], _ref3 => {
|
|
57
|
+
let {
|
|
58
|
+
$contentHeight
|
|
59
|
+
} = _ref3;
|
|
60
|
+
return $contentHeight || '14.2857rem';
|
|
61
|
+
}, () => hexToRgba('#33b1ba', 0.2), () => hexToRgba('#33b1ba', 0.3), () => hexToRgba('#33b1ba', 0.4));
|
|
62
|
+
function Content(_ref4) {
|
|
63
|
+
let {
|
|
64
|
+
children,
|
|
65
|
+
style
|
|
66
|
+
} = _ref4;
|
|
67
|
+
const {
|
|
68
|
+
contentHeight
|
|
69
|
+
} = (0, _react.useContext)(CardContext);
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(ContentWrapper, {
|
|
71
|
+
$contentHeight: contentHeight,
|
|
72
|
+
style: style
|
|
73
|
+
}, children);
|
|
74
|
+
}
|
|
55
75
|
const Footer = _styledComponents.default.div.withConfig({
|
|
56
76
|
displayName: "Card__Footer"
|
|
57
77
|
})(["display:flex;justify-content:space-between;align-items:center;padding:0 1.5rem 1.5rem 1.5rem;gap:1rem;@media (max-width:42.8571rem){flex-direction:column;align-items:stretch;& > *{width:100%;}}"]);
|
|
58
|
-
function CardComponent(
|
|
78
|
+
function CardComponent(_ref5) {
|
|
59
79
|
let {
|
|
60
80
|
className,
|
|
61
81
|
children,
|
|
62
82
|
borderColor,
|
|
63
|
-
borderWidth
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
83
|
+
borderWidth,
|
|
84
|
+
contentHeight
|
|
85
|
+
} = _ref5,
|
|
86
|
+
props = _objectWithoutProperties(_ref5, _excluded);
|
|
87
|
+
const contextValue = {
|
|
88
|
+
contentHeight
|
|
89
|
+
};
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(CardContext.Provider, {
|
|
91
|
+
value: contextValue
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(StyledCard, _extends({
|
|
67
93
|
className: className,
|
|
68
94
|
borderColor: borderColor,
|
|
69
95
|
borderWidth: borderWidth
|
|
70
|
-
}, props), children);
|
|
96
|
+
}, props), children));
|
|
71
97
|
}
|
|
72
98
|
const BmCardv2 = exports.BmCardv2 = Object.assign(CardComponent, {
|
|
73
99
|
Header,
|