oa-componentbook 0.17.100 → 0.18.1
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/MockData.js +7 -4
- package/build/components/oa-component-accordion/Accordion.js +4 -1
- package/build/components/oa-component-accordion/styles.js +6 -3
- package/build/components/oa-component-auto-complete/CustomAutoComplete.js +1 -0
- package/build/components/oa-component-bar-chart/BarChart.js +34 -42
- package/build/components/oa-component-bread-crumb/CustomBreadCrumb.js +3 -1
- package/build/components/oa-component-button/CustomButton.js +2 -1
- package/build/components/oa-component-button/styles.js +6 -3
- package/build/components/oa-component-checkbox/CustomCheckBox.js +2 -1
- package/build/components/oa-component-demo-border-radius/BorderRadiusDemo.js +2 -1
- package/build/components/oa-component-demo-border-radius/styles.js +4 -2
- package/build/components/oa-component-demo-color-variables/ColorVariablesDemo.js +2 -1
- package/build/components/oa-component-demo-color-variables/styles.js +4 -2
- package/build/components/oa-component-demo-elevation/ElevationDemo.js +2 -1
- package/build/components/oa-component-demo-elevation/styles.js +4 -2
- package/build/components/oa-component-demo-spacing/SpacingScales.js +2 -1
- package/build/components/oa-component-demo-spacing/styles.js +2 -1
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -1
- package/build/components/oa-component-drawer/styles.js +8 -4
- package/build/components/oa-component-info/styles.js +7 -4
- package/build/components/oa-component-input/CustomInput.js +1 -0
- package/build/components/oa-component-input-number/CustomInputNumber.js +1 -0
- package/build/components/oa-component-lable/CustomLable.js +2 -1
- package/build/components/oa-component-lable/styles.js +4 -2
- package/build/components/oa-component-loader/CustomLoader.js +2 -1
- package/build/components/oa-component-modal/CustomModal.js +3 -1
- package/build/components/oa-component-modal/styles.js +6 -3
- package/build/components/oa-component-notification/CustomNotification.js +6 -4
- package/build/components/oa-component-notification/styles.js +4 -2
- package/build/components/oa-component-radio/CustomRadio.js +3 -1
- package/build/components/oa-component-radio/styles.js +4 -2
- package/build/components/oa-component-select/CustomSelect.js +3 -2
- package/build/components/oa-component-table/CustomTable.js +2 -1
- package/build/components/oa-component-tabs/CustomTabs.js +3 -1
- package/build/components/oa-component-tabs/styles.js +4 -2
- package/build/components/oa-component-tag/CustomTag.js +2 -1
- package/build/components/oa-component-tag/styles.js +6 -3
- package/build/components/oa-component-textarea/TextArea.js +2 -1
- package/build/components/oa-component-textarea/styles.js +2 -1
- package/build/components/oa-component-timeline/CustomTimeline.js +2 -1
- package/build/components/oa-component-timeline/styles.js +6 -3
- package/build/components/oa-component-timepicker/CustomTimePicker.js +1 -0
- package/build/components/oa-component-toggle/CustomToggle.js +4 -3
- package/build/components/oa-component-toggle/styles.js +4 -2
- package/build/components/oa-component-typography/Typography.js +2 -1
- package/build/components/oa-component-typography/styles.js +4 -2
- package/build/global-css/BorderRadius.js +2 -1
- package/build/global-css/ColorVariables.js +2 -1
- package/build/global-css/ColorVariablesMap.js +2 -1
- package/build/global-css/Elevation.js +4 -2
- package/build/global-css/GridLayout.js +3 -3
- package/build/global-css/Typographies.js +2 -1
- package/build/global-css/TypographiesMap.js +2 -1
- package/build/global-css/color-options.js +4 -2
- package/build/global-css/typography-options.js +4 -2
- package/build/index.js +2 -2
- package/build/utils/get-uuid.js +2 -1
- package/build/utils/hex-to-rgb.js +2 -1
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +8 -3
- package/build/widgets/oa-widget-address/styles.js +6 -3
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +4 -3
- package/build/widgets/oa-widget-approval/styles.js +4 -2
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +4 -3
- package/build/widgets/oa-widget-close-claim/styles.js +4 -2
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +2 -1
- package/build/widgets/oa-widget-key-value/styles.js +8 -4
- package/build/widgets/oa-widget-notes/NotesWidget.js +4 -3
- package/build/widgets/oa-widget-notes/styles.js +4 -2
- package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +2 -2
- package/build/widgets/oa-widget-send-payment-link/styles.js +6 -3
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +23 -12
- package/build/widgets/oa-widget-spare-part/styles.js +12 -6
- package/build/widgets/oa-widget-stage-timeline/StageTimelineWidget.js +2 -2
- package/build/widgets/oa-widget-stage-timeline/styles.js +14 -7
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +2 -1
- package/build/widgets/oa-widget-track-shipment/styles.js +6 -3
- package/build/widgets/oa-widget-upload-download/UploadDownloadWidget.js +2 -1
- package/build/widgets/oa-widget-upload-download/styles.js +6 -3
- package/build/widgets/oa-widget-view-history/styles.js +4 -2
- package/build/widgets/oa-widget-view-previous-description/ViewPreviousDescriptionWidget.js +2 -2
- package/build/widgets/oa-widget-view-previous-description/styles.js +12 -6
- package/package.json +1 -1
- package/build/hooks/useResizeObserver.js +0 -11
package/build/MockData.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.serviceRequestData = exports.fraudReasons = exports.closingClaimReasons = void 0;
|
|
7
|
-
const serviceRequestData =
|
|
7
|
+
const serviceRequestData = {
|
|
8
8
|
status: 'P',
|
|
9
9
|
createdOn: '09-Oct-2023 22:02:14',
|
|
10
10
|
createdBy: '51834430',
|
|
@@ -1282,7 +1282,8 @@ const serviceRequestData = exports.serviceRequestData = {
|
|
|
1282
1282
|
taskDefId: null
|
|
1283
1283
|
}]
|
|
1284
1284
|
};
|
|
1285
|
-
|
|
1285
|
+
exports.serviceRequestData = serviceRequestData;
|
|
1286
|
+
const fraudReasons = [{
|
|
1286
1287
|
status: 'A',
|
|
1287
1288
|
createdOn: '26-Nov-2019 17:27:47',
|
|
1288
1289
|
createdBy: 'SCRIPT',
|
|
@@ -1397,7 +1398,8 @@ const fraudReasons = exports.fraudReasons = [{
|
|
|
1397
1398
|
key: 'SECOND_OR_REFURBISHED_DEVICE',
|
|
1398
1399
|
value: 'Second hand device/Refurbished device'
|
|
1399
1400
|
}];
|
|
1400
|
-
|
|
1401
|
+
exports.fraudReasons = fraudReasons;
|
|
1402
|
+
const closingClaimReasons = [{
|
|
1401
1403
|
status: 'A',
|
|
1402
1404
|
createdOn: '23-Nov-2018 15:40:44',
|
|
1403
1405
|
createdBy: 'SCRIPT',
|
|
@@ -2347,4 +2349,5 @@ const closingClaimReasons = exports.closingClaimReasons = [{
|
|
|
2347
2349
|
keySetDescription: 'CLOSE_CLAIM_REASON_CODE',
|
|
2348
2350
|
key: 'IMEI_NO_MISMATCH',
|
|
2349
2351
|
value: 'IMEI No. is mismatch'
|
|
2350
|
-
}];
|
|
2352
|
+
}];
|
|
2353
|
+
exports.closingClaimReasons = closingClaimReasons;
|
|
@@ -42,6 +42,7 @@ function Accordion(_ref2) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
|
|
45
46
|
return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
46
47
|
theme: themeConfig
|
|
47
48
|
}, /*#__PURE__*/_react.default.createElement(_styles.CollapseStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Collapse, {
|
|
@@ -68,6 +69,7 @@ Accordion.propTypes = {
|
|
|
68
69
|
smallText: _propTypes.default.string,
|
|
69
70
|
hasContentPadding: _propTypes.default.bool // New prop for controlling contentPadding
|
|
70
71
|
};
|
|
72
|
+
|
|
71
73
|
Accordion.defaultProps = {
|
|
72
74
|
body: '',
|
|
73
75
|
'data-test': null,
|
|
@@ -75,4 +77,5 @@ Accordion.defaultProps = {
|
|
|
75
77
|
smallText: '',
|
|
76
78
|
hasContentPadding: true // Default value for contentPadding
|
|
77
79
|
};
|
|
78
|
-
var _default =
|
|
80
|
+
var _default = Accordion;
|
|
81
|
+
exports.default = _default;
|
|
@@ -8,6 +8,9 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
var _default =
|
|
12
|
-
|
|
13
|
-
const
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const SmallText = _styledComponents.default.small(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 18px;\n color: #E21616;\n margin: 0 0 0 4px;\n"])));
|
|
14
|
+
exports.SmallText = SmallText;
|
|
15
|
+
const 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,.ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header,.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 }\n \n .ant-collapse>.ant-collapse-item >.ant-collapse-header{\n padding: 12px 24px;\n }\n"])));
|
|
16
|
+
exports.CollapseStyle = CollapseStyle;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = BarChart;
|
|
8
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
require("core-js/modules/es.array.reduce.js");
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var ReactDOMServer = _interopRequireWildcard(require("react-dom/server"));
|
|
@@ -20,12 +20,14 @@ var _utils = require("../../utils");
|
|
|
20
20
|
var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
|
|
21
21
|
var _templateObject;
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const iconHtml = ReactDOMServer.renderToString( /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
27
|
+
icon: _ExpandLess.default,
|
|
28
|
+
size: 20
|
|
29
|
+
}));
|
|
30
|
+
const FullSizeContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n\n .black {\n color: var(--color-primary-content);\n }\n"])));
|
|
29
31
|
function BarChart(_ref) {
|
|
30
32
|
var _barsConfig$length, _barsConfig$length2;
|
|
31
33
|
let {
|
|
@@ -36,8 +38,8 @@ function BarChart(_ref) {
|
|
|
36
38
|
yLabel,
|
|
37
39
|
xLabel
|
|
38
40
|
} = _ref;
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
+
const height = 420;
|
|
42
|
+
const width = 600;
|
|
41
43
|
const barSpacing = 32;
|
|
42
44
|
const marginBottom = 32;
|
|
43
45
|
const marginTop = 32;
|
|
@@ -71,20 +73,21 @@ function BarChart(_ref) {
|
|
|
71
73
|
*/
|
|
72
74
|
const xScale = d3.scaleBand().domain(barsConfig.map(barConfig => barConfig.label)).range([0, availableWidth]).padding(barSpacingInPercentage); // Inner and outer paddings are equal for symmmetry
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
console.log('updateChartDimensions');
|
|
76
|
-
console.log('updateChartDimensions');
|
|
76
|
+
(0, _react.useEffect)(() => {
|
|
77
77
|
// Adding the svg element on first render.
|
|
78
|
-
barChartSvg
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
const barChartSvg = d3.select(barChartRef.current).append('svg') // If we chain methods after this one, we will be executing commands on the 'svg' element.
|
|
79
|
+
.attr('width', width) // Make these dimensions responsive
|
|
80
|
+
.attr('height', height);
|
|
81
|
+
|
|
82
|
+
// Adding the X axis.
|
|
83
|
+
const xAxis = barChartSvg.append('g').attr('id', 'x-axis').attr('transform', "translate(".concat(marginLeft, ", ").concat(height - marginBottom, ")"));
|
|
84
|
+
const yAxis = barChartSvg.append('g').attr('id', 'y-axis').attr('transform', "translate(".concat(marginLeft, ", ").concat(marginTop, ")"));
|
|
85
|
+
const yAxisLabel = barChartSvg.append('text').classed('type-b2-400', true).style('fill', _ColorVariablesMap.default['--color-primary-content']).attr('transform', "translate(".concat(marginLeft, ", ").concat(marginTop - _TypographiesMap.default['type-b2-400']['line-height'], ")")).text(yLabel);
|
|
86
|
+
// Removing the svg element, as a cleanup operation, before dismount.
|
|
87
|
+
return () => {
|
|
88
|
+
barChartSvg.remove();
|
|
89
|
+
};
|
|
90
|
+
});
|
|
88
91
|
const updateBars = barChartSvg => {
|
|
89
92
|
barChartSvg.selectAll('rect').data(barsConfig) // Performing a data join for an array of objects.
|
|
90
93
|
.join('rect').attr('x', (d, i) => marginRight + xScale(d.label)).attr('y', (d, i) => marginBottom + yScale(d.value)).attr('height', d => availableHeight - yScale(d.value)).attr('width', widthOfEachBar).style('fill', d => {
|
|
@@ -92,7 +95,7 @@ function BarChart(_ref) {
|
|
|
92
95
|
return _ColorVariablesMap.default["--color-".concat((_d$color = d === null || d === void 0 ? void 0 : d.color) !== null && _d$color !== void 0 ? _d$color : 'warning')];
|
|
93
96
|
});
|
|
94
97
|
};
|
|
95
|
-
const
|
|
98
|
+
const updateAxes = () => {
|
|
96
99
|
const xAxisRef = d3.select('#x-axis');
|
|
97
100
|
const yAxisRef = d3.select('#y-axis');
|
|
98
101
|
|
|
@@ -102,10 +105,9 @@ function BarChart(_ref) {
|
|
|
102
105
|
tickSize sets both at once
|
|
103
106
|
*/
|
|
104
107
|
|
|
105
|
-
const yAxisConfiguration = d3.axisLeft(yScale).
|
|
108
|
+
const yAxisConfiguration = d3.axisLeft(yScale).tickSize(0).tickPadding(16).tickFormat(_utils.rupeeShorthandFormatter);
|
|
106
109
|
const yAxis = yAxisRef.call(yAxisConfiguration);
|
|
107
|
-
|
|
108
|
-
// const yAxisSymbol = yAxisRef.append('g').html(iconHtml);
|
|
110
|
+
const yAxisSymbol = yAxisRef.append('g').html(iconHtml);
|
|
109
111
|
// .attr("y", 0 – margin.left)
|
|
110
112
|
// .attr("x",0 - (height / 2))
|
|
111
113
|
// .attr("dy", "1em")
|
|
@@ -116,25 +118,15 @@ function BarChart(_ref) {
|
|
|
116
118
|
const xAxis = xAxisRef.call(xAxisConfiguration);
|
|
117
119
|
};
|
|
118
120
|
(0, _react.useEffect)(() => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
updateAxesPosition(barChartSvgReference);
|
|
126
|
-
updateAxesConfiguration();
|
|
127
|
-
updateBars(barChartSvgReference);
|
|
128
|
-
});
|
|
121
|
+
// D3 code to create the graph
|
|
122
|
+
const barChartSvg = d3.select(barChartRef.current).select('svg');
|
|
123
|
+
updateBars(barChartSvg);
|
|
124
|
+
updateAxes();
|
|
125
|
+
}, [barsConfig]); // Empty dependency array so that this code is called on every re-render
|
|
126
|
+
|
|
129
127
|
return /*#__PURE__*/_react.default.createElement(FullSizeContainer, {
|
|
130
128
|
ref: barChartRef
|
|
131
|
-
}
|
|
132
|
-
className: "bar-chart-svg"
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
134
|
-
id: "x-axis"
|
|
135
|
-
}), /*#__PURE__*/_react.default.createElement("g", {
|
|
136
|
-
id: "y-axis"
|
|
137
|
-
})));
|
|
129
|
+
});
|
|
138
130
|
}
|
|
139
131
|
BarChart.propTypes = {
|
|
140
132
|
barsConfig: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
@@ -26,10 +26,12 @@ function CustomBreadCrumb(props) {
|
|
|
26
26
|
separatorMargin: 4 // Separator margin
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
|
|
29
30
|
theme: {
|
|
30
31
|
colorBgTextHover: _ColorVariablesMap.default['--color-primary-background']
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
}, /*#__PURE__*/_react.default.createElement(_antd.Breadcrumb, props));
|
|
34
35
|
}
|
|
35
|
-
var _default =
|
|
36
|
+
var _default = CustomBreadCrumb;
|
|
37
|
+
exports.default = _default;
|
|
@@ -11,10 +11,13 @@ var _Typography = _interopRequireDefault(require("../oa-component-typography/Typ
|
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3;
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
var _default =
|
|
14
|
+
var _default = {};
|
|
15
|
+
exports.default = _default;
|
|
15
16
|
const StyledButton = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n .text-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px; \n text-align: left;\n }\n"])));
|
|
16
|
-
const EllipsisTypography =
|
|
17
|
-
|
|
17
|
+
const EllipsisTypography = (0, _styledComponents.default)(_Typography.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: block; \n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 84px;\n"])));
|
|
18
|
+
exports.EllipsisTypography = EllipsisTypography;
|
|
19
|
+
const ColoredStyledButton = (0, _styledComponents.default)(StyledButton)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 2.25rem;\n min-width: 100px;\n padding: 0.625rem 1rem;\n\n &.small {\n height: 30px;\n min-width: 80px;\n padding: 10px 16px;\n }\n\n &.medium {\n height: 36px;\n min-width: 100px;\n padding: 10px 16px;\n }\n\n &.large {\n height: 48px;\n min-width: 136px;\n padding: 10px 24px;\n }\n\n &.medium-text-only,\n &.small-text-only {\n min-width: auto;\n height: auto;\n padding: 4px 0;\n }\n\n &.large-text-only {\n min-width: auto;\n height: auto;\n padding: 8px 0;\n }\n\n &.primary {\n background: var(--color-primary);\n border: 1px solid var(--color-primary);\n color: var(--color-primary-background);\n }\n &.primary:hover {\n background: var(--color-primary-hover);\n border: 1px solid var(--color-primary-hover);\n }\n\n &.primary-disabled {\n background: var(--color-disabled-button);\n cursor: not-allowed;\n color: var(--color-primary-background);\n border: 1px solid var(--color-disabled-button);\n }\n\n &.secondary {\n background: transparent;\n border: 1px solid var(--color-primary);\n color: var(--color-primary);\n }\n &.secondary:hover {\n background: transparent;\n border: 1px solid var(--color-primary-hover);\n color: var(--color-primary-hover);\n }\n\n &.secondary-disabled {\n background: transparent;\n border: 1px solid var(--color-disabled-button);\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.text-only {\n border: none;\n background: transparent;\n color: var(--color-primary);\n }\n &.text-only:hover {\n color: var(--color-primary-hover);\n }\n\n &.text-only-disabled {\n border: none;\n background: transparent;\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.danger-primary {\n background: var(--color-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-negative);\n }\n &.danger-primary:hover {\n background: var(--color-hover-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-hover-negative);\n }\n\n &.danger-secondary {\n background: transparent;\n border: 1px solid var(--color-negative);\n color: var(--color-negative);\n }\n &.danger-secondary:hover {\n background: transparent;\n border: 1px solid var(--color-hover-negative);\n color: var(--color-hover-negative);\n }\n\n &.danger-text-only {\n border: none;\n color: var(--color-negative);\n background: transparent;\n }\n &.danger-text-only:hover {\n border: none;\n color: var(--color-hover-negative);\n background: transparent;\n }\n"])));
|
|
20
|
+
exports.ColoredStyledButton = ColoredStyledButton;
|
|
18
21
|
function getButtonTypography(size) {
|
|
19
22
|
switch (size) {
|
|
20
23
|
case 'large':
|
|
@@ -21,4 +21,5 @@ function BorderRadiusDemo(_ref) {
|
|
|
21
21
|
BorderRadiusDemo.propTypes = {
|
|
22
22
|
className: _propTypes.default.oneOf(['border-radius-xlarge', 'border-radius-large', 'border-radius-medium', 'border-radius-small', 'border-radius-xsmall', 'border-radius-none', 'border-radius-full']).isRequired
|
|
23
23
|
};
|
|
24
|
-
var _default =
|
|
24
|
+
var _default = BorderRadiusDemo;
|
|
25
|
+
exports.default = _default;
|
|
@@ -8,5 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
var _default =
|
|
12
|
-
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const StyledCornerComponent = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n width: 200px;\n color: white;\n background-color: #029CFD;\n"])));
|
|
14
|
+
exports.StyledCornerComponent = StyledCornerComponent;
|
|
@@ -22,4 +22,5 @@ function ColorVariablesDemo(_ref) {
|
|
|
22
22
|
ColorVariablesDemo.propTypes = {
|
|
23
23
|
color: _propTypes.default.oneOf(_colorOptions.colorOptions).isRequired
|
|
24
24
|
};
|
|
25
|
-
var _default =
|
|
25
|
+
var _default = ColorVariablesDemo;
|
|
26
|
+
exports.default = _default;
|
|
@@ -8,5 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
var _default =
|
|
12
|
-
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const StyledDemo = _styledComponents.default.h1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: var(--color-", ");\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n width: 450px;\n"])), props => props.color);
|
|
14
|
+
exports.StyledDemo = StyledDemo;
|
|
@@ -19,4 +19,5 @@ function ElevationDemo(_ref) {
|
|
|
19
19
|
ElevationDemo.propTypes = {
|
|
20
20
|
className: _propTypes.default.oneOf(['elevation-white-1', 'elevation-above-white-1', 'elevation-white-2', 'elevation-above-white-2', 'elevation-white-3', 'elevation-dark-1', 'elevation-dark-2', 'elevation-dark-3']).isRequired
|
|
21
21
|
};
|
|
22
|
-
var _default =
|
|
22
|
+
var _default = ElevationDemo;
|
|
23
|
+
exports.default = _default;
|
|
@@ -8,5 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
var _default =
|
|
12
|
-
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 200px;\n width: 200px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
|
|
14
|
+
exports.Container = Container;
|
|
@@ -23,4 +23,5 @@ function SpacingScales(_ref) {
|
|
|
23
23
|
SpacingScales.propTypes = {
|
|
24
24
|
type: _propTypes.default.oneOf(['spacing-4', 'spacing-8', 'spacing-12', 'spacing-16', 'spacing-24', 'spacing-32', 'spacing-40', 'spacing-48', 'spacing-56', 'spacing-64', 'spacing-72', 'spacing-80', 'spacing-96', 'spacing-108']).isRequired
|
|
25
25
|
};
|
|
26
|
-
var _default =
|
|
26
|
+
var _default = SpacingScales;
|
|
27
|
+
exports.default = _default;
|
|
@@ -9,7 +9,11 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
const DrawerFooter =
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
12
|
+
const DrawerFooter = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n"])));
|
|
13
|
+
exports.DrawerFooter = DrawerFooter;
|
|
14
|
+
const CustomStyledDrawer = (0, _styledComponents.default)(_antd.Drawer)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-drawer-header {\n background: var(--color-secondary-background);\n }\n .ant-drawer-footer{\n background: var(--color-secondary-background);\n }\n"])));
|
|
15
|
+
exports.CustomStyledDrawer = CustomStyledDrawer;
|
|
16
|
+
const BaseDrawerTitle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
17
|
+
exports.BaseDrawerTitle = BaseDrawerTitle;
|
|
18
|
+
const LayeredDrawerTitle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n gap: 12px;\n\n align-items: center;\n"])));
|
|
19
|
+
exports.LayeredDrawerTitle = LayeredDrawerTitle;
|
|
@@ -8,8 +8,11 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
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
|
-
const RowFlex =
|
|
12
|
-
|
|
13
|
-
const
|
|
11
|
+
const RowFlex = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
|
|
12
|
+
exports.RowFlex = RowFlex;
|
|
13
|
+
const ColFlex = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
|
|
14
|
+
exports.ColFlex = ColFlex;
|
|
15
|
+
const InfoContainer = (0, _styledComponents.default)(RowFlex).attrs({
|
|
14
16
|
as: 'section'
|
|
15
|
-
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 8px;\n align-items: center;\n border-radius: 8px;\n background-color: var(--color-", ");\n \n button {\n margin-left: 8px;\n };\n"])), props => props.$color);
|
|
17
|
+
})(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 8px;\n align-items: center;\n border-radius: 8px;\n background-color: var(--color-", ");\n \n button {\n margin-left: 8px;\n };\n"])), props => props.$color);
|
|
18
|
+
exports.InfoContainer = InfoContainer;
|
|
@@ -8,5 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
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
|
-
var _default =
|
|
12
|
-
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const Stylelabels = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: var(--color-primary-content);\n margin: 0 0 4px;\n display: inline-flex;\n .anticon-info-circle{\n margin: 0 0 0 8px;\n color: var(--color-secondary-content);\n cursor: pointer;\n .ant-tooltip-placement-bottomLeft .ant-tooltip-arrow {\n left: 3px;\n }\n\n .ant-tooltip-inner {\n background-color: var(--color-primary-content);\n }\n }\n"])));
|
|
14
|
+
exports.Stylelabels = Stylelabels;
|
|
@@ -38,6 +38,7 @@ function CustomModal(_ref) {
|
|
|
38
38
|
onCancel();
|
|
39
39
|
// console.log('`handleCancel` callback of CustomModal component called.');
|
|
40
40
|
};
|
|
41
|
+
|
|
41
42
|
return /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
42
43
|
centered: true,
|
|
43
44
|
"data-test": dataTest,
|
|
@@ -105,4 +106,5 @@ CustomModal.defaultProps = {
|
|
|
105
106
|
},
|
|
106
107
|
width: 416
|
|
107
108
|
};
|
|
108
|
-
var _default =
|
|
109
|
+
var _default = CustomModal;
|
|
110
|
+
exports.default = _default;
|
|
@@ -8,6 +8,9 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
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
|
-
const ButtonContainer =
|
|
12
|
-
|
|
13
|
-
const
|
|
11
|
+
const ButtonContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 20px;\n justify-content: flex-end;\n"])));
|
|
12
|
+
exports.ButtonContainer = ButtonContainer;
|
|
13
|
+
const DescriptionContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 12px 0 24px 0;\n"])));
|
|
14
|
+
exports.DescriptionContainer = DescriptionContainer;
|
|
15
|
+
const TitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n gap: 16px;\n flex-direction: column;\n\n img {\n height: 36px;\n width: 36px;\n }\n"])));
|
|
16
|
+
exports.TitleContainer = TitleContainer;
|
|
@@ -16,11 +16,12 @@ var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/Materi
|
|
|
16
16
|
var _typographyOptions = require("../../global-css/typography-options");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
// Import the styles from the separate file
|
|
22
22
|
|
|
23
|
-
const notificationOptions =
|
|
23
|
+
const notificationOptions = ['positive', 'negative'];
|
|
24
|
+
exports.notificationOptions = notificationOptions;
|
|
24
25
|
const Notification = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
25
26
|
let {
|
|
26
27
|
duration,
|
|
@@ -122,4 +123,5 @@ Notification.defaultProps = {
|
|
|
122
123
|
title: 'type-b2-400'
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
|
-
var _default =
|
|
126
|
+
var _default = Notification;
|
|
127
|
+
exports.default = _default;
|
|
@@ -8,5 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject; // NotificationStyles.js
|
|
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
|
-
var _default =
|
|
12
|
-
|
|
11
|
+
var _default = {};
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
const StyledNotification = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\nbackground: red;\n.ant-notification-notice-close{\n position: inherit !important;\n}\n.ant-notification-notice-message{\n margin-bottom: 0;\n}\n display: flex;\n justify-content: space-between; \n align-item: center;\n small{\n font-size: inherit;\n display: block;\n padding: 4px 0 0;\n }\n .anticon-close{\n color: var(--color-secondary-content);\n \n }\n \n"])));
|
|
14
|
+
exports.StyledNotification = StyledNotification;
|
|
@@ -26,6 +26,7 @@ const getRadioTheme = () => ({
|
|
|
26
26
|
// color-disabled-button
|
|
27
27
|
colorText: _ColorVariablesMap.default['--color-primary-content'] // color-primary-content
|
|
28
28
|
},
|
|
29
|
+
|
|
29
30
|
components: {
|
|
30
31
|
Radio: {
|
|
31
32
|
wrapperMarginInlineEnd: 12
|
|
@@ -87,4 +88,5 @@ CustomRadio.defaultProps = {
|
|
|
87
88
|
size: 'small',
|
|
88
89
|
value: ''
|
|
89
90
|
};
|
|
90
|
-
var _default =
|
|
91
|
+
var _default = CustomRadio;
|
|
92
|
+
exports.default = _default;
|
|
@@ -9,5 +9,7 @@ var _antd = require("antd");
|
|
|
9
9
|
var _templateObject;
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
-
var _default =
|
|
13
|
-
|
|
12
|
+
var _default = {};
|
|
13
|
+
exports.default = _default;
|
|
14
|
+
const RadioContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* .ant-radio-wrapper span.ant-radio+*{\n padding-inline-start: 12px;\n} */\n"])));
|
|
15
|
+
exports.RadioContainer = RadioContainer;
|
|
@@ -26,8 +26,8 @@ const _excluded = ["allText", "children", "defaultValue", "data-test", "mode", "
|
|
|
26
26
|
_excluded2 = ["label", "disabled", "value"];
|
|
27
27
|
var _templateObject;
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
function _getRequireWildcardCache(
|
|
30
|
-
function _interopRequireWildcard(
|
|
29
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
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); }
|
|
32
32
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
33
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -198,6 +198,7 @@ function CustomSelect(_ref) {
|
|
|
198
198
|
// activeShadow: '0px 0px 4px 0px red', // Box shadow for active select box.
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
|
|
201
202
|
token: {
|
|
202
203
|
// controlOutline: '4px 4px 4px 4px red', // an attempt at applying box shadow
|
|
203
204
|
colorTextPlaceholder: _ColorVariablesMap.default['--color-placeholder-text'],
|