oa-componentbook 1.0.1-stage.38 → 1.0.1-stage.380
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/build/components/oa-component-accordion/Accordion.js +118 -42
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +6 -4
- package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +25 -22
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-select/CustomSelect.js +116 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +531 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +29 -11
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/{TextArea.js → CustomTextArea.js} +4 -4
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +120 -40
- package/build/components/oa-component-viewer/CustomViewer.js +3 -1
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +3 -0
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +114 -2
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2290 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +85 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +25 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +544 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +73 -12
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +18 -11
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +395 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +40 -10
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +2 -1
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +105 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +57 -29
- package/build/widgets/oa-widget-track-shipment-list/fn.js +16 -4
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +351 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +4 -2
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
require("core-js/modules/es.object.assign.js");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _antd = require("antd");
|
|
@@ -11,14 +12,12 @@ var _KeyboardArrowUpRounded = _interopRequireDefault(require("@material-ui/icons
|
|
|
11
12
|
var _styles = require("./styles");
|
|
12
13
|
var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
|
|
13
14
|
var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
|
|
15
|
+
var _CustomTag = _interopRequireDefault(require("../oa-component-tag/CustomTag"));
|
|
16
|
+
var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
|
|
17
|
+
var _KeyValueWidget = _interopRequireDefault(require("../../widgets/oa-widget-key-value/KeyValueWidget"));
|
|
18
|
+
var _CustomButton = _interopRequireDefault(require("../oa-component-button/CustomButton"));
|
|
14
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
* Renders a MaterialIcon that rotates depending on the state of isActive.
|
|
17
|
-
*
|
|
18
|
-
* @param {boolean} isActive - Whether the icon should be rotated or not.
|
|
19
|
-
*
|
|
20
|
-
* @returns {React.ReactElement} - A React element representing the CollapseIcon.
|
|
21
|
-
*/
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* eslint-disable */
|
|
22
21
|
function CollapseIcon(_ref) {
|
|
23
22
|
let {
|
|
24
23
|
isActive
|
|
@@ -29,29 +28,56 @@ function CollapseIcon(_ref) {
|
|
|
29
28
|
rotate: isActive ? 0 : 180
|
|
30
29
|
});
|
|
31
30
|
}
|
|
31
|
+
function renderCustomBody(customBody, onActionClick) {
|
|
32
|
+
if (!customBody || !customBody.items) return null;
|
|
33
|
+
return customBody.items.map((item, index) => {
|
|
34
|
+
var _item$dataConfig;
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
+
key: index,
|
|
37
|
+
className: "custom-body-item"
|
|
38
|
+
}, item.heading && /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: "custom-body-heading"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
41
|
+
typography: item.heading.type,
|
|
42
|
+
color: item.heading.color || "primary-content"
|
|
43
|
+
}, item.heading.label)), item.dataConfig && item.dataConfig.type === "keyvalue" && /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: "custom-body-content"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_KeyValueWidget.default, {
|
|
46
|
+
data: item.dataConfig.data,
|
|
47
|
+
customClassName: "gst-details-keyvalue"
|
|
48
|
+
})), item.dataConfig && item.dataConfig.type === "titleSubtitle" && /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: "custom-body-content-titleSubtitle"
|
|
50
|
+
}, (item === null || item === void 0 || (_item$dataConfig = item.dataConfig) === null || _item$dataConfig === void 0 || (_item$dataConfig = _item$dataConfig.data) === null || _item$dataConfig === void 0 ? void 0 : _item$dataConfig.length) > 0 && item.dataConfig.data.map((field, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
key: index,
|
|
52
|
+
className: "title-subtitle-item"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: "user-details"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
56
|
+
typography: "type-t2-700",
|
|
57
|
+
color: "primary-content"
|
|
58
|
+
}, field.title), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
59
|
+
typography: "type-b1-400",
|
|
60
|
+
color: "secondary-content"
|
|
61
|
+
}, field.subtitle))))), item.dataConfig && item.dataConfig.type === "button" && /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
+
className: "custom-body-content"
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
64
|
+
type: item.dataConfig.subType,
|
|
65
|
+
onClick: () => {
|
|
66
|
+
if (onActionClick && item.dataConfig.onClick) {
|
|
67
|
+
onActionClick(item.dataConfig.onClick, item.dataConfig);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
label: item.dataConfig.label
|
|
71
|
+
})));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
32
74
|
CollapseIcon.propTypes = {
|
|
33
75
|
isActive: _propTypes.default.bool.isRequired
|
|
34
76
|
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Accordion component that renders a collapsible panel with the given header text, body content,
|
|
38
|
-
* and optional small text. The component is disabled if the `disabled` prop is true.
|
|
39
|
-
*
|
|
40
|
-
* @param {React.ReactNode} body - Content to be rendered in the collapsible panel.
|
|
41
|
-
* @param {string} [dataTest] - String to be used as a data-test attribute on the component.
|
|
42
|
-
* @param {boolean} [disabled=false] - Whether the component is disabled or not.
|
|
43
|
-
* @param {string} headerText - Text to be displayed as the header of the collapsible panel.
|
|
44
|
-
* @param {string} [smallText] - Optional small text to be displayed next to the header text.
|
|
45
|
-
* @param {string | number} [key] - Key to be used for the collapsible panel.
|
|
46
|
-
* @param {string | number} [defaultActiveKey] - Key of the collapsible panel that should be active by default.
|
|
47
|
-
* @param {boolean} [hasContentPadding=true] - Whether to apply content padding to the collapsible panel or not.
|
|
48
|
-
* @param {Function} [onChange=() => {}] - Function to be called when the panel is expanded or collapsed.
|
|
49
|
-
* @param {string | number} [activeKey] - Key of the collapsible panel that is currently active.
|
|
50
|
-
*/
|
|
51
77
|
function Accordion(_ref2) {
|
|
52
78
|
let {
|
|
53
79
|
body,
|
|
54
|
-
|
|
80
|
+
"data-test": dataTest,
|
|
55
81
|
disabled,
|
|
56
82
|
headerText,
|
|
57
83
|
smallText,
|
|
@@ -60,13 +86,17 @@ function Accordion(_ref2) {
|
|
|
60
86
|
hasContentPadding,
|
|
61
87
|
// New prop to determine whether to apply contentPadding
|
|
62
88
|
onChange,
|
|
63
|
-
activeKey
|
|
89
|
+
activeKey,
|
|
90
|
+
componentConfig,
|
|
91
|
+
subtext,
|
|
92
|
+
customBody,
|
|
93
|
+
onActionClick
|
|
64
94
|
} = _ref2;
|
|
65
95
|
const themeConfig = {
|
|
66
96
|
components: {
|
|
67
97
|
Collapse: {
|
|
68
|
-
headerBg: _ColorVariablesMap.default[
|
|
69
|
-
contentPadding: hasContentPadding ?
|
|
98
|
+
headerBg: _ColorVariablesMap.default["--color-secondary-background"],
|
|
99
|
+
contentPadding: hasContentPadding ? "20px 24px" : "0" // Adjust the value as needed
|
|
70
100
|
}
|
|
71
101
|
}
|
|
72
102
|
};
|
|
@@ -75,43 +105,89 @@ function Accordion(_ref2) {
|
|
|
75
105
|
}, /*#__PURE__*/_react.default.createElement(_styles.CollapseStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Collapse, {
|
|
76
106
|
expandIcon: CollapseIcon,
|
|
77
107
|
expandIconPosition: "end",
|
|
78
|
-
defaultActiveKey: disabled ?
|
|
108
|
+
defaultActiveKey: disabled ? "-1" : defaultActiveKey,
|
|
79
109
|
onChange: onChange
|
|
80
110
|
}, /*#__PURE__*/_react.default.createElement(_antd.Collapse.Panel, {
|
|
81
111
|
"data-test": dataTest ? "".concat(dataTest, "--complete") : undefined,
|
|
82
|
-
collapsible: disabled ?
|
|
112
|
+
collapsible: disabled ? "disabled" : undefined,
|
|
83
113
|
key: activeKey || key,
|
|
84
114
|
header: /*#__PURE__*/_react.default.createElement("div", {
|
|
85
115
|
"data-test": dataTest ? "".concat(dataTest, "--header") : undefined,
|
|
86
116
|
className: "type-button-500"
|
|
87
|
-
},
|
|
88
|
-
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
118
|
+
className: "header-content"
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
120
|
+
className: "header-main"
|
|
121
|
+
}, componentConfig && (componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.type) === "tag" && /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
className: "header-tag"
|
|
123
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomTag.default, _extends({
|
|
124
|
+
type: componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.subType,
|
|
125
|
+
label: componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.label
|
|
126
|
+
}, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.props))), /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
className: "header-text"
|
|
128
|
+
}, headerText, smallText && /*#__PURE__*/_react.default.createElement(_styles.SmallText, null, smallText)), subtext && /*#__PURE__*/_react.default.createElement("div", {
|
|
129
|
+
className: "header-subtext"
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
131
|
+
typography: subtext === null || subtext === void 0 ? void 0 : subtext.type,
|
|
132
|
+
color: "secondary-content"
|
|
133
|
+
}, subtext === null || subtext === void 0 ? void 0 : subtext.label)))))
|
|
134
|
+
}, body && /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
+
className: "gridContainer"
|
|
136
|
+
}, body), customBody && /*#__PURE__*/_react.default.createElement("div", {
|
|
89
137
|
className: "gridContainer"
|
|
90
|
-
},
|
|
138
|
+
}, renderCustomBody(customBody, onActionClick))))));
|
|
91
139
|
}
|
|
92
140
|
Accordion.propTypes = {
|
|
93
141
|
body: _propTypes.default.node,
|
|
94
|
-
|
|
142
|
+
"data-test": _propTypes.default.string,
|
|
95
143
|
disabled: _propTypes.default.bool,
|
|
96
144
|
headerText: _propTypes.default.string.isRequired,
|
|
97
145
|
smallText: _propTypes.default.string,
|
|
98
146
|
hasContentPadding: _propTypes.default.bool,
|
|
99
|
-
// New prop for controlling contentPadding
|
|
100
147
|
key: _propTypes.default.string,
|
|
101
148
|
defaultActiveKey: _propTypes.default.string,
|
|
102
149
|
onChange: _propTypes.default.func,
|
|
103
|
-
activeKey: _propTypes.default.string || _propTypes.default.number
|
|
150
|
+
activeKey: _propTypes.default.string || _propTypes.default.number,
|
|
151
|
+
componentConfig: _propTypes.default.shape({
|
|
152
|
+
type: _propTypes.default.string.isRequired,
|
|
153
|
+
subType: _propTypes.default.string,
|
|
154
|
+
label: _propTypes.default.string.isRequired,
|
|
155
|
+
props: _propTypes.default.object
|
|
156
|
+
}),
|
|
157
|
+
subtext: _propTypes.default.shape({
|
|
158
|
+
type: _propTypes.default.string.isRequired,
|
|
159
|
+
label: _propTypes.default.string.isRequired
|
|
160
|
+
}),
|
|
161
|
+
customBody: _propTypes.default.shape({
|
|
162
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
163
|
+
heading: _propTypes.default.shape({
|
|
164
|
+
type: _propTypes.default.string.isRequired,
|
|
165
|
+
label: _propTypes.default.string.isRequired
|
|
166
|
+
}),
|
|
167
|
+
dataConfig: _propTypes.default.shape({
|
|
168
|
+
type: _propTypes.default.string.isRequired,
|
|
169
|
+
data: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]).isRequired,
|
|
170
|
+
subType: _propTypes.default.string,
|
|
171
|
+
label: _propTypes.default.string,
|
|
172
|
+
onClick: _propTypes.default.string
|
|
173
|
+
})
|
|
174
|
+
}))
|
|
175
|
+
}),
|
|
176
|
+
onActionClick: _propTypes.default.func
|
|
104
177
|
};
|
|
105
178
|
Accordion.defaultProps = {
|
|
106
|
-
body:
|
|
107
|
-
|
|
179
|
+
body: "",
|
|
180
|
+
"data-test": null,
|
|
108
181
|
disabled: false,
|
|
109
|
-
smallText:
|
|
110
|
-
key:
|
|
111
|
-
defaultActiveKey:
|
|
182
|
+
smallText: "",
|
|
183
|
+
key: "1",
|
|
184
|
+
defaultActiveKey: "1",
|
|
112
185
|
hasContentPadding: true,
|
|
113
|
-
// Default value for contentPadding
|
|
114
186
|
onChange: () => {},
|
|
115
|
-
activeKey: null
|
|
187
|
+
activeKey: null,
|
|
188
|
+
componentConfig: null,
|
|
189
|
+
subtext: null,
|
|
190
|
+
customBody: null,
|
|
191
|
+
onActionClick: null
|
|
116
192
|
};
|
|
117
193
|
var _default = exports.default = Accordion;
|
|
@@ -9,5 +9,5 @@ var _templateObject, _templateObject2;
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
11
|
var _default = exports.default = {};
|
|
12
|
-
const SmallText = exports.SmallText = _styledComponents.default.small(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 18px;\n color: #
|
|
13
|
-
const CollapseStyle = exports.CollapseStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n.ant-collapse .ant-collapse-item-disabled{\n
|
|
12
|
+
const SmallText = exports.SmallText = _styledComponents.default.small(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 18px;\n color: #e21616;\n margin: 0 0 0 4px;\n"])));
|
|
13
|
+
const CollapseStyle = exports.CollapseStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-collapse .ant-collapse-item-disabled {\n background: var(--color-disabled-button);\n }\n /* .ant-collapse-item-active .ant-collapse-expand-icon{\n transform: rotate(180deg);\n } */\n /* .ant-collapse-expand-icon{\n padding-inline-start: 0 !important;\n } */\n .ant-collapse-header-text {\n color: var(--color-primary-content);\n }\n /* .ant-collapse-arrow{\n color: var(--color-secondary-content) !important;\n } */\n .ant-collapse > .ant-collapse-item:last-child,\n .ant-collapse > .ant-collapse-item:last-child > .ant-collapse-header,\n .ant-collapse .ant-collapse-item:last-child > .ant-collapse-content {\n border-radius: 0 0 4px 4px;\n }\n .ant-collapse > .ant-collapse-item {\n border: none;\n }\n .ant-collapse {\n border: 1px solid var(--color-divider);\n border-radius: 4px;\n overflow: hidden;\n }\n\n .ant-collapse > .ant-collapse-item > .ant-collapse-header {\n padding: 12px 24px;\n }\n\n /* New styles for header content layout */\n .header-content {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n width: 100%;\n }\n\n .header-main {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex: 1;\n gap: 8px;\n }\n\n .header-tag {\n margin-bottom: 4px;\n }\n\n .header-text {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .header-subtext {\n margin-top: 4px;\n color: var(--color-secondary-content);\n }\n\n /* Custom body styles */\n .custom-body-item {\n margin-bottom: 24px;\n }\n\n .custom-body-heading {\n margin-bottom: 16px;\n }\n\n .custom-body-content {\n // margin-top: 8px;\n }\n\n .custom-body-button {\n margin-top: 16px;\n display: flex;\n justify-content: flex-end;\n }\n\n .gst-details-keyvalue {\n .key-value-item {\n margin-bottom: 4px;\n }\n\n .key {\n font-weight: 400;\n color: var(--color-primary-content);\n }\n\n .value {\n font-weight: 700;\n color: var(--color-primary-content);\n }\n }\n\n @media only screen and (max-width: 600px) {\n .ant-collapse .ant-collapse-content > .ant-collapse-content-box {\n padding: 16px;\n }\n .ant-collapse > .ant-collapse-item > .ant-collapse-header {\n padding: 12px 16px;\n }\n }\n\n .custom-body-content-titleSubtitle {\n display: flex;\n flex-direction: column;\n gap: 16px; /* spacing between each item */\n }\n\n .title-subtitle-item {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n }\n\n .title-subtitle-item .user-details {\n flex: 1;\n display: flex; /* \uD83D\uDC48 add this */\n flex-direction: column; /* stack name & email vertically */\n gap: 2px; /* optional: tighten spacing between name & email */\n }\n"])));
|
|
@@ -61,14 +61,14 @@ function CustomButton(_ref) {
|
|
|
61
61
|
}, domProps), /*#__PURE__*/_react.default.createElement("div", {
|
|
62
62
|
className: "text-container"
|
|
63
63
|
}, iconConfig.position === 'left' && /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
|
|
64
|
-
size: iconSize
|
|
64
|
+
size: (iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.size) || iconSize
|
|
65
65
|
}), label && (showEllipsis ? /*#__PURE__*/_react.default.createElement(_styles.EllipsisTypography, {
|
|
66
66
|
title: label,
|
|
67
67
|
typography: buttonTypography
|
|
68
68
|
}, label) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
69
69
|
typography: buttonTypography
|
|
70
70
|
}, label)), iconConfig.position === 'right' && /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
|
|
71
|
-
size: iconSize
|
|
71
|
+
size: (iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.size) || iconSize
|
|
72
72
|
})));
|
|
73
73
|
}
|
|
74
74
|
CustomButton.propTypes = {
|
|
@@ -80,7 +80,8 @@ CustomButton.propTypes = {
|
|
|
80
80
|
iconConfig: _propTypes.default.shape({
|
|
81
81
|
icon: _propTypes.default.node,
|
|
82
82
|
position: _propTypes.default.oneOf(['left', 'right']),
|
|
83
|
-
style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
|
|
83
|
+
style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])),
|
|
84
|
+
size: _propTypes.default.number
|
|
84
85
|
}),
|
|
85
86
|
label: _propTypes.default.node,
|
|
86
87
|
showEllipsis: _propTypes.default.bool,
|
|
@@ -93,7 +94,8 @@ CustomButton.defaultProps = {
|
|
|
93
94
|
disabled: false,
|
|
94
95
|
htmlType: 'button',
|
|
95
96
|
iconConfig: {
|
|
96
|
-
position: 'left'
|
|
97
|
+
position: 'left',
|
|
98
|
+
size: 20
|
|
97
99
|
},
|
|
98
100
|
label: '',
|
|
99
101
|
showEllipsis: false,
|
|
@@ -12,7 +12,8 @@ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorV
|
|
|
12
12
|
var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
|
|
13
13
|
var _styles = require("./styles");
|
|
14
14
|
var _utils = require("../../utils");
|
|
15
|
-
const _excluded = ["data-test", "label", "onChange", "size"];
|
|
15
|
+
const _excluded = ["data-test", "label", "onChange", "size", "className"];
|
|
16
|
+
/* eslint-disable */
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
19
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -32,14 +33,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
32
33
|
*/
|
|
33
34
|
const getCheckboxTheme = () => ({
|
|
34
35
|
token: {
|
|
35
|
-
colorTextDisabled: _ColorVariablesMap.default[
|
|
36
|
-
colorPrimaryHover: _ColorVariablesMap.default[
|
|
37
|
-
colorPrimary: _ColorVariablesMap.default[
|
|
38
|
-
colorBgContainerDisabled: _ColorVariablesMap.default[
|
|
39
|
-
colorBorder: _ColorVariablesMap.default[
|
|
40
|
-
colorText: _ColorVariablesMap.default[
|
|
41
|
-
borderRadiusSM:
|
|
42
|
-
paddingXS:
|
|
36
|
+
colorTextDisabled: _ColorVariablesMap.default["--color-disabled-button"],
|
|
37
|
+
colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
|
|
38
|
+
colorPrimary: _ColorVariablesMap.default["--color-primary"],
|
|
39
|
+
colorBgContainerDisabled: _ColorVariablesMap.default["--color-secondary-background"],
|
|
40
|
+
colorBorder: _ColorVariablesMap.default["--color-secondary-content"],
|
|
41
|
+
colorText: _ColorVariablesMap.default["--color-primary-content"],
|
|
42
|
+
borderRadiusSM: "2px",
|
|
43
|
+
paddingXS: "12px"
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
|
|
@@ -64,10 +65,11 @@ const getCheckboxTheme = () => ({
|
|
|
64
65
|
exports.getCheckboxTheme = getCheckboxTheme;
|
|
65
66
|
function CustomCheckBox(_ref) {
|
|
66
67
|
let {
|
|
67
|
-
|
|
68
|
+
"data-test": dataTest,
|
|
68
69
|
label,
|
|
69
70
|
onChange,
|
|
70
|
-
size
|
|
71
|
+
size,
|
|
72
|
+
className
|
|
71
73
|
/*
|
|
72
74
|
Instead of keeping a `checked` prop explicitly,
|
|
73
75
|
we keep it optional by directly passing extra props to the antd component.
|
|
@@ -82,12 +84,13 @@ function CustomCheckBox(_ref) {
|
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement(_styles.StyleContainer, null, /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
83
85
|
theme: getCheckboxTheme()
|
|
84
86
|
}, /*#__PURE__*/_react.default.createElement(_antd.Checkbox, _extends({
|
|
87
|
+
className: className !== null && className !== void 0 ? className : "",
|
|
85
88
|
"data-test": dataTest,
|
|
86
89
|
onChange: handleChange
|
|
87
90
|
}, antDesignProps),
|
|
88
91
|
// The label is a string or a number
|
|
89
92
|
((0, _utils.isString)(label) || (0, _utils.isNumber)(label)) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
90
|
-
typography: size ===
|
|
93
|
+
typography: size === "large" ? "type-b1-400" : "type-b2-400"
|
|
91
94
|
}, label) ||
|
|
92
95
|
// The label is a node
|
|
93
96
|
/*#__PURE__*/_react.default.isValidElement(label) && label || undefined)));
|
|
@@ -96,17 +99,17 @@ function CustomCheckBox(_ref) {
|
|
|
96
99
|
// This allows us referencing the Group container in our Checkbox component
|
|
97
100
|
CustomCheckBox.Group = _antd.Checkbox.Group;
|
|
98
101
|
CustomCheckBox.propTypes = {
|
|
99
|
-
|
|
102
|
+
"data-test": _propTypes.default.string,
|
|
100
103
|
label: _propTypes.default.node,
|
|
101
104
|
onChange: _propTypes.default.func,
|
|
102
|
-
size: _propTypes.default.oneOf([
|
|
105
|
+
size: _propTypes.default.oneOf(["large", "small"]),
|
|
103
106
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])
|
|
104
107
|
};
|
|
105
108
|
CustomCheckBox.defaultProps = {
|
|
106
|
-
|
|
109
|
+
"data-test": null,
|
|
107
110
|
label: null,
|
|
108
111
|
onChange: value => {},
|
|
109
|
-
size:
|
|
110
|
-
value:
|
|
112
|
+
size: "small",
|
|
113
|
+
value: ""
|
|
111
114
|
};
|
|
112
115
|
var _default = exports.default = CustomCheckBox;
|
|
@@ -9,4 +9,4 @@ var _templateObject;
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
11
|
var _default = exports.default = {};
|
|
12
|
-
const StyleContainer = exports.StyleContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-checkbox-wrapper .ant-checkbox {\n align-self: start;\n margin: 2px 0 0 0
|
|
12
|
+
const StyleContainer = exports.StyleContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-checkbox-wrapper .ant-checkbox {\n align-self: start;\n margin: 2px 0 0 0; \n}\n"])));
|
|
@@ -14,8 +14,9 @@ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorV
|
|
|
14
14
|
var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
|
|
15
15
|
require("antd/dist/reset.css");
|
|
16
16
|
var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
|
|
17
|
-
const _excluded = ["data-test"];
|
|
17
|
+
const _excluded = ["data-test", "disabledDateFunction"];
|
|
18
18
|
var _templateObject;
|
|
19
|
+
/* eslint-disable */
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
21
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -37,7 +38,8 @@ const FullWidthDatePicker = (0, _styledComponents.default)(_antd.DatePicker)(_te
|
|
|
37
38
|
*/
|
|
38
39
|
function CustomDatePicker(_ref) {
|
|
39
40
|
let {
|
|
40
|
-
|
|
41
|
+
"data-test": dataTest,
|
|
42
|
+
disabledDateFunction
|
|
41
43
|
} = _ref,
|
|
42
44
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
45
|
return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
@@ -65,7 +67,7 @@ function CustomDatePicker(_ref) {
|
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
token: {
|
|
68
|
-
lineHeight: _TypographiesMap.default[
|
|
70
|
+
lineHeight: _TypographiesMap.default["type-b2-400"]["line-height"] / _TypographiesMap.default["type-b2-400"]["font-size"],
|
|
69
71
|
paddingBlockLG: 50,
|
|
70
72
|
paddingXS: 16,
|
|
71
73
|
// Used to control margin of calendar icon
|
|
@@ -77,31 +79,31 @@ function CustomDatePicker(_ref) {
|
|
|
77
79
|
// height of small text field
|
|
78
80
|
// controlHeightLG: 64,
|
|
79
81
|
borderRadius: 4,
|
|
80
|
-
colorPrimary: _ColorVariablesMap.default[
|
|
82
|
+
colorPrimary: _ColorVariablesMap.default["--color-primary"],
|
|
81
83
|
// for active color of input
|
|
82
|
-
colorPrimaryHover: _ColorVariablesMap.default[
|
|
84
|
+
colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
|
|
83
85
|
// for hover color of input
|
|
84
|
-
colorBgContainerDisabled: _ColorVariablesMap.default[
|
|
85
|
-
colorBorder: _ColorVariablesMap.default[
|
|
86
|
+
colorBgContainerDisabled: _ColorVariablesMap.default["--color-divider"],
|
|
87
|
+
colorBorder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
86
88
|
// border color of input text field
|
|
87
|
-
colorTextDisabled: _ColorVariablesMap.default[
|
|
89
|
+
colorTextDisabled: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
88
90
|
// Color of disabled text.
|
|
89
|
-
colorTextPlaceholder: _ColorVariablesMap.default[
|
|
91
|
+
colorTextPlaceholder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
90
92
|
// Color of placeholder text
|
|
91
|
-
colorTextQuaternary: _ColorVariablesMap.default[
|
|
93
|
+
colorTextQuaternary: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
92
94
|
// color of disabled calendar icon
|
|
93
|
-
colorText: _ColorVariablesMap.default[
|
|
95
|
+
colorText: _ColorVariablesMap.default["--color-primary-content"],
|
|
94
96
|
// Text color
|
|
95
|
-
colorIcon: _ColorVariablesMap.default[
|
|
97
|
+
colorIcon: _ColorVariablesMap.default["--color-primary"],
|
|
96
98
|
// Color of arrows icons beside month and year in datepicker
|
|
97
|
-
colorIconHover: _ColorVariablesMap.default[
|
|
99
|
+
colorIconHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
98
100
|
// Hover color of arrows icons beside month and year in datepicker
|
|
99
101
|
|
|
100
|
-
colorLink: _ColorVariablesMap.default[
|
|
101
|
-
colorLinkHover: _ColorVariablesMap.default[
|
|
102
|
-
colorError: _ColorVariablesMap.default[
|
|
102
|
+
colorLink: _ColorVariablesMap.default["--color-primary"],
|
|
103
|
+
colorLinkHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
104
|
+
colorError: _ColorVariablesMap.default["--color-negative"],
|
|
103
105
|
// Error color
|
|
104
|
-
colorErrorBorderHover: _ColorVariablesMap.default[
|
|
106
|
+
colorErrorBorderHover: _ColorVariablesMap.default["--color-negative"] // Hover error color should be same as error color
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
}, /*#__PURE__*/_react.default.createElement(FullWidthDatePicker, _extends({
|
|
@@ -110,14 +112,15 @@ function CustomDatePicker(_ref) {
|
|
|
110
112
|
suffixIcon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
111
113
|
icon: _CalendarTodayRounded.default,
|
|
112
114
|
size: 20
|
|
113
|
-
})
|
|
115
|
+
}),
|
|
116
|
+
disabledDate: disabledDateFunction
|
|
114
117
|
}, props)));
|
|
115
118
|
}
|
|
116
119
|
CustomDatePicker.propTypes = {
|
|
117
|
-
|
|
118
|
-
size: _propTypes.default.oneOf([
|
|
120
|
+
"data-test": _propTypes.default.string,
|
|
121
|
+
size: _propTypes.default.oneOf(["small", "middle"])
|
|
119
122
|
};
|
|
120
123
|
CustomDatePicker.defaultProps = {
|
|
121
|
-
|
|
122
|
-
size:
|
|
124
|
+
"data-test": null,
|
|
125
|
+
size: "middle"
|
|
123
126
|
};
|
|
@@ -114,11 +114,13 @@ function CustomDrawer(_ref) {
|
|
|
114
114
|
title: isBaseDrawer ? /*#__PURE__*/_react.default.createElement(_styles.BaseDrawerTitle, null, DrawerTitle(title), /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
115
115
|
color: "primary-content",
|
|
116
116
|
icon: _CloseRounded.default,
|
|
117
|
+
className: "drawerCloseRoundedIcon",
|
|
117
118
|
onClick: handleClose,
|
|
118
119
|
size: 20,
|
|
119
120
|
"data-test": dataTest ? "".concat(dataTest, "--close-drawer-button") : undefined
|
|
120
121
|
})) : /*#__PURE__*/_react.default.createElement(_styles.LayeredDrawerTitle, null, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
121
122
|
color: "primary-content",
|
|
123
|
+
className: "drawerCloseRoundedIcon",
|
|
122
124
|
icon: _ArrowBackIosRounded.default,
|
|
123
125
|
onClick: handleClose,
|
|
124
126
|
size: 20,
|
|
@@ -36,7 +36,8 @@ function CustomDropdown(_ref) {
|
|
|
36
36
|
firstLetterIcon,
|
|
37
37
|
trigger,
|
|
38
38
|
placement,
|
|
39
|
-
type
|
|
39
|
+
type,
|
|
40
|
+
onMenuItemClick
|
|
40
41
|
// dropDownHeading,
|
|
41
42
|
} = _ref;
|
|
42
43
|
const firstLetter = (displayText === null || displayText === void 0 || (_displayText$split = displayText.split(' ')) === null || _displayText$split === void 0 || (_displayText$split = _displayText$split[1]) === null || _displayText$split === void 0 ? void 0 : _displayText$split.charAt(0).toUpperCase()) || 'H'; // Extract the first letter after Hi.
|
|
@@ -52,7 +53,16 @@ function CustomDropdown(_ref) {
|
|
|
52
53
|
}
|
|
53
54
|
}, /*#__PURE__*/_react.default.createElement(_styles.default, null, firstLetterIcon && firstLetter && /*#__PURE__*/_react.default.createElement("small", null, firstLetter), /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
54
55
|
menu: {
|
|
55
|
-
items
|
|
56
|
+
items,
|
|
57
|
+
onClick: _ref2 => {
|
|
58
|
+
let {
|
|
59
|
+
key
|
|
60
|
+
} = _ref2;
|
|
61
|
+
const clickedItem = items.find(item => item.key === key);
|
|
62
|
+
if (clickedItem) {
|
|
63
|
+
onMenuItemClick(clickedItem);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
56
66
|
},
|
|
57
67
|
trigger: trigger,
|
|
58
68
|
placement: placement,
|
|
@@ -69,7 +79,8 @@ CustomDropdown.propTypes = {
|
|
|
69
79
|
firstLetterIcon: _propTypes.default.bool,
|
|
70
80
|
trigger: _propTypes.default.string,
|
|
71
81
|
placement: _propTypes.default.string,
|
|
72
|
-
type: _propTypes.default.string
|
|
82
|
+
type: _propTypes.default.string,
|
|
83
|
+
onMenuItemClick: _propTypes.default.func
|
|
73
84
|
// dropDownHeading: PropTypes.string,
|
|
74
85
|
};
|
|
75
86
|
CustomDropdown.defaultProps = {
|
|
@@ -85,6 +96,7 @@ CustomDropdown.defaultProps = {
|
|
|
85
96
|
firstLetterIcon: false,
|
|
86
97
|
trigger: ['click'],
|
|
87
98
|
placement: 'bottomRight',
|
|
88
|
-
type: 'default'
|
|
99
|
+
type: 'default',
|
|
100
|
+
onMenuItemClick: () => {}
|
|
89
101
|
// dropDownHeading: '',
|
|
90
102
|
};
|
|
@@ -39,7 +39,7 @@ function MaterialIcon(_ref) {
|
|
|
39
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
const renderedIcon = /*#__PURE__*/_react.default.createElement(Icon, _extends({
|
|
41
41
|
style: _objectSpread({
|
|
42
|
-
color: color ? _ColorVariablesMap.default["--color-".concat(color)] : undefined,
|
|
42
|
+
color: color && _ColorVariablesMap.default["--color-".concat(color)] ? _ColorVariablesMap.default["--color-".concat(color)] : color || undefined,
|
|
43
43
|
fontSize: size ? "".concat(size, "px") : 'inherit',
|
|
44
44
|
transition: 'transform .3s ease',
|
|
45
45
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TitleContainer = exports.DescriptionContainer = exports.ButtonContainer = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
/* eslint-disable */
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n margin:
|
|
12
|
+
const ButtonContainer = exports.ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n justify-content: flex-end;\n margin: 36px 0 0;\n @media (max-width: 768px) {\n justify-content: space-between;\n button{\n width: 100%;\n }\n }\n"])));
|
|
12
13
|
const DescriptionContainer = exports.DescriptionContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 12px 0 0;\n"])));
|
|
13
|
-
const TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
14
|
+
const TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin: 32px 0 0 0;\n display: flex;\n flex-direction: column;\n gap: 16px;\n img {\n height: 36px;\n width: 36px;\n }\n"])));
|