@innovaccer/design-system 2.22.0 → 2.23.0
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/CHANGELOG.md +42 -1
- package/css/dist/index.css +7 -6
- package/css/dist/index.css.map +1 -1
- package/css/src/components/pageHeader.css +7 -6
- package/dist/.lib/tsconfig.type.tsbuildinfo +22 -5
- package/dist/core/components/atoms/icon/Icon.d.ts +0 -1
- package/dist/core/components/organisms/pageHeader/PageHeader.d.ts +1 -0
- package/dist/core/components/organisms/pageHeader/utils.d.ts +32 -0
- package/dist/index.esm.js +187 -52
- package/dist/index.js +176 -48
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* Generated on:
|
|
3
|
+
* Generated on: 1697533162690
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.
|
|
5
|
+
* Version: v2.23.0
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -2341,6 +2341,36 @@
|
|
|
2341
2341
|
});
|
|
2342
2342
|
};
|
|
2343
2343
|
|
|
2344
|
+
var iconTypeMapper = {
|
|
2345
|
+
timelapse: 'outlined',
|
|
2346
|
+
content_copy: 'outlined',
|
|
2347
|
+
speed: 'outlined',
|
|
2348
|
+
add_circle_outline: 'outlined',
|
|
2349
|
+
turned_in_not: 'outlined',
|
|
2350
|
+
important_devices: 'outlined',
|
|
2351
|
+
thumb_down_off_alt: 'outlined',
|
|
2352
|
+
alarm_on: 'outlined',
|
|
2353
|
+
calendar_view_month: 'outlined',
|
|
2354
|
+
aspect_ratio: 'outlined',
|
|
2355
|
+
change_history: 'outlined',
|
|
2356
|
+
arrow_circle_down: 'outlined',
|
|
2357
|
+
card_membership: 'outlined',
|
|
2358
|
+
query_builder: 'outlined',
|
|
2359
|
+
copyright: 'outlined',
|
|
2360
|
+
arrow_circle_up: 'outlined',
|
|
2361
|
+
alarm: 'outlined',
|
|
2362
|
+
work_outline: 'outlined',
|
|
2363
|
+
bookmark_border: 'outlined',
|
|
2364
|
+
delete_outline: 'outlined',
|
|
2365
|
+
credit_card: 'outlined',
|
|
2366
|
+
highlight_of: 'outlined',
|
|
2367
|
+
check_circle_outline: 'outlined',
|
|
2368
|
+
help_outline: 'outlined',
|
|
2369
|
+
schedule: 'outlined',
|
|
2370
|
+
radio_button_unchecked: 'outlined',
|
|
2371
|
+
radio_button_checked: 'outlined',
|
|
2372
|
+
"delete": 'outlined'
|
|
2373
|
+
};
|
|
2344
2374
|
var Icon = function Icon(props) {
|
|
2345
2375
|
var _a;
|
|
2346
2376
|
|
|
@@ -2358,7 +2388,7 @@
|
|
|
2358
2388
|
filled: 'rounded',
|
|
2359
2389
|
'two-tone': 'rounded'
|
|
2360
2390
|
};
|
|
2361
|
-
var type = props.type && mapper[props.type] || props.type;
|
|
2391
|
+
var type = props.type && mapper[props.type] || props.type || name && iconTypeMapper[name] || 'rounded';
|
|
2362
2392
|
|
|
2363
2393
|
var getIconAppearance = function getIconAppearance(iconColor) {
|
|
2364
2394
|
var x = iconColor.indexOf('_');
|
|
@@ -2387,8 +2417,7 @@
|
|
|
2387
2417
|
};
|
|
2388
2418
|
Icon.displayName = 'Icon';
|
|
2389
2419
|
Icon.defaultProps = {
|
|
2390
|
-
size: 16
|
|
2391
|
-
type: 'rounded'
|
|
2420
|
+
size: 16
|
|
2392
2421
|
};
|
|
2393
2422
|
|
|
2394
2423
|
var GenericText = function GenericText(_a) {
|
|
@@ -5166,8 +5195,18 @@
|
|
|
5166
5195
|
|
|
5167
5196
|
var disabledOptions = _this.getDisabledOptions(unSelectedGroup.slice(0, _this.staticLimit));
|
|
5168
5197
|
|
|
5198
|
+
var errorResult = errorType;
|
|
5199
|
+
|
|
5200
|
+
if (optionsLength === 0 && searchTerm === '') {
|
|
5201
|
+
errorResult = 'DEFAULT';
|
|
5202
|
+
} else if (searchTerm !== '') {
|
|
5203
|
+
errorResult = 'NO_RECORDS_FOUND';
|
|
5204
|
+
} else {
|
|
5205
|
+
errorResult = 'FAILED_TO_FETCH';
|
|
5206
|
+
}
|
|
5207
|
+
|
|
5169
5208
|
_this.setState(__assign(__assign({}, _this.state), {
|
|
5170
|
-
errorType: fetchOptions
|
|
5209
|
+
errorType: fetchOptions ? errorResult : errorType,
|
|
5171
5210
|
scrollIndex: res.scrollToIndex || 0,
|
|
5172
5211
|
optionsLength: optionsLength,
|
|
5173
5212
|
loading: false,
|
|
@@ -5183,6 +5222,11 @@
|
|
|
5183
5222
|
|
|
5184
5223
|
if (updatedAsync || withSearch) (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
5185
5224
|
}
|
|
5225
|
+
})["catch"](function () {
|
|
5226
|
+
_this.setState({
|
|
5227
|
+
errorType: fetchOptions ? 'FAILED_TO_FETCH' : errorType,
|
|
5228
|
+
loading: false
|
|
5229
|
+
});
|
|
5186
5230
|
});
|
|
5187
5231
|
};
|
|
5188
5232
|
|
|
@@ -10176,7 +10220,7 @@
|
|
|
10176
10220
|
withTrigger: true
|
|
10177
10221
|
};
|
|
10178
10222
|
|
|
10179
|
-
var Status = function Status(props) {
|
|
10223
|
+
var Status$1 = function Status(props) {
|
|
10180
10224
|
var _a, _b;
|
|
10181
10225
|
|
|
10182
10226
|
var type = props.type,
|
|
@@ -10273,7 +10317,7 @@
|
|
|
10273
10317
|
return null;
|
|
10274
10318
|
}
|
|
10275
10319
|
};
|
|
10276
|
-
Status.displayName = 'Status';
|
|
10320
|
+
Status$1.displayName = 'Status';
|
|
10277
10321
|
|
|
10278
10322
|
var Box = function Box(props) {
|
|
10279
10323
|
var _a;
|
|
@@ -10346,7 +10390,7 @@
|
|
|
10346
10390
|
typingText: typingText,
|
|
10347
10391
|
isTyping: isTyping,
|
|
10348
10392
|
statusType: statusType
|
|
10349
|
-
}), !isTyping && statusOptions && /*#__PURE__*/React__namespace.createElement(Status, __assign({}, statusOptions)));
|
|
10393
|
+
}), !isTyping && statusOptions && /*#__PURE__*/React__namespace.createElement(Status$1, __assign({}, statusOptions)));
|
|
10350
10394
|
};
|
|
10351
10395
|
ChatMessage.displayName = 'ChatMessage';
|
|
10352
10396
|
|
|
@@ -15616,6 +15660,83 @@
|
|
|
15616
15660
|
rounded: false
|
|
15617
15661
|
};
|
|
15618
15662
|
|
|
15663
|
+
var Status = function Status(props) {
|
|
15664
|
+
var status = props.status,
|
|
15665
|
+
meta = props.meta,
|
|
15666
|
+
navigationPosition = props.navigationPosition,
|
|
15667
|
+
navigation = props.navigation,
|
|
15668
|
+
tabs = props.tabs;
|
|
15669
|
+
var statusClasses = classNames__default["default"]({
|
|
15670
|
+
'PageHeader-statusWrapper': true,
|
|
15671
|
+
'mb-3': navigationPosition === 'bottom' && navigation || tabs
|
|
15672
|
+
});
|
|
15673
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, (status || meta) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
15674
|
+
className: statusClasses,
|
|
15675
|
+
"data-test": "DesignSystem-PageHeader--Status"
|
|
15676
|
+
}, status, meta));
|
|
15677
|
+
};
|
|
15678
|
+
var Action = function Action(props) {
|
|
15679
|
+
var actions = props.actions,
|
|
15680
|
+
navigation = props.navigation,
|
|
15681
|
+
stepper = props.stepper;
|
|
15682
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, actions ? /*#__PURE__*/React__namespace.createElement(Column, {
|
|
15683
|
+
size: "4",
|
|
15684
|
+
sizeXL: "4",
|
|
15685
|
+
sizeM: "4",
|
|
15686
|
+
"data-test": "DesignSystem-PageHeader--Actions"
|
|
15687
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
15688
|
+
className: "PageHeader-actionsWrapper"
|
|
15689
|
+
}, actions)) : (navigation || stepper) && /*#__PURE__*/React__namespace.createElement(Column, {
|
|
15690
|
+
size: "4",
|
|
15691
|
+
sizeXL: "4",
|
|
15692
|
+
sizeM: "4",
|
|
15693
|
+
"data-test": "DesignSystem-PageHeader--Actions"
|
|
15694
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
15695
|
+
className: "PageHeader-actionsWrapper"
|
|
15696
|
+
})));
|
|
15697
|
+
};
|
|
15698
|
+
var Nav = function Nav(props) {
|
|
15699
|
+
var navigation = props.navigation,
|
|
15700
|
+
stepper = props.stepper;
|
|
15701
|
+
|
|
15702
|
+
if (!navigation && !stepper) {
|
|
15703
|
+
return null;
|
|
15704
|
+
}
|
|
15705
|
+
|
|
15706
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15707
|
+
className: "PageHeader-navigationWrapper",
|
|
15708
|
+
"data-test": "DesignSystem-PageHeader--Nav"
|
|
15709
|
+
}, navigation || stepper);
|
|
15710
|
+
};
|
|
15711
|
+
var CenterNav = function CenterNav(props) {
|
|
15712
|
+
var colSize = props.colSize,
|
|
15713
|
+
breadcrumbs = props.breadcrumbs,
|
|
15714
|
+
navigationPosition = props.navigationPosition;
|
|
15715
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, (!breadcrumbs || navigationPosition === 'center') && colSize === '4' && /*#__PURE__*/React__namespace.createElement(Column, {
|
|
15716
|
+
size: "4",
|
|
15717
|
+
sizeXL: "4",
|
|
15718
|
+
sizeM: "4",
|
|
15719
|
+
"data-test": "DesignSystem-PageHeader--CenterNav"
|
|
15720
|
+
}, /*#__PURE__*/React__namespace.createElement(Nav, __assign({}, props))));
|
|
15721
|
+
};
|
|
15722
|
+
var BackButton = function BackButton(props) {
|
|
15723
|
+
var button = props.button;
|
|
15724
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, button && /*#__PURE__*/React__namespace.createElement("div", {
|
|
15725
|
+
className: "mr-5 my-3",
|
|
15726
|
+
"data-test": "DesignSystem-PageHeader--Button"
|
|
15727
|
+
}, button));
|
|
15728
|
+
};
|
|
15729
|
+
var Title = function Title(props) {
|
|
15730
|
+
var badge = props.badge,
|
|
15731
|
+
title = props.title;
|
|
15732
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15733
|
+
className: "PageHeader-titleWrapper",
|
|
15734
|
+
"data-test": "DesignSystem-PageHeader--Title"
|
|
15735
|
+
}, /*#__PURE__*/React__namespace.createElement(Heading, {
|
|
15736
|
+
className: "PageHeader-title"
|
|
15737
|
+
}, title), badge);
|
|
15738
|
+
};
|
|
15739
|
+
|
|
15619
15740
|
var PageHeader = function PageHeader(props) {
|
|
15620
15741
|
var _a;
|
|
15621
15742
|
|
|
@@ -15630,57 +15751,64 @@
|
|
|
15630
15751
|
status = props.status,
|
|
15631
15752
|
meta = props.meta,
|
|
15632
15753
|
navigationPosition = props.navigationPosition,
|
|
15633
|
-
className = props.className
|
|
15754
|
+
className = props.className,
|
|
15755
|
+
button = props.button;
|
|
15634
15756
|
var baseProps = extractBaseProps(props);
|
|
15635
15757
|
var wrapperClasses = classNames__default["default"]((_a = {
|
|
15636
15758
|
'PageHeader-wrapper': true
|
|
15637
|
-
}, _a['PageHeader-wrapper--
|
|
15759
|
+
}, _a['PageHeader-wrapper--withTabs'] = tabs, _a), className);
|
|
15638
15760
|
var classes = classNames__default["default"]({
|
|
15639
15761
|
PageHeader: true
|
|
15640
15762
|
});
|
|
15641
|
-
|
|
15642
|
-
var renderNav = function renderNav() {
|
|
15643
|
-
if (!navigation && !stepper) {
|
|
15644
|
-
return null;
|
|
15645
|
-
}
|
|
15646
|
-
|
|
15647
|
-
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15648
|
-
className: "PageHeader-navigationWrapper"
|
|
15649
|
-
}, navigation || stepper);
|
|
15650
|
-
};
|
|
15651
|
-
|
|
15652
15763
|
var colSize = (navigation || stepper) && navigationPosition === 'center' ? '4' : actions ? '8' : '12';
|
|
15653
|
-
|
|
15764
|
+
var centerNavProps = {
|
|
15765
|
+
colSize: colSize,
|
|
15766
|
+
breadcrumbs: breadcrumbs,
|
|
15767
|
+
navigationPosition: navigationPosition,
|
|
15768
|
+
navigation: navigation,
|
|
15769
|
+
stepper: stepper
|
|
15770
|
+
};
|
|
15771
|
+
var statusProps = {
|
|
15772
|
+
status: status,
|
|
15773
|
+
meta: meta,
|
|
15774
|
+
navigationPosition: navigationPosition,
|
|
15775
|
+
navigation: navigation,
|
|
15776
|
+
tabs: tabs
|
|
15777
|
+
};
|
|
15778
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
15779
|
+
"data-test": "DesignSystem-PageHeader"
|
|
15780
|
+
}, /*#__PURE__*/React__namespace.createElement("div", __assign({}, baseProps, {
|
|
15654
15781
|
className: wrapperClasses
|
|
15655
|
-
}), breadcrumbs
|
|
15782
|
+
}), breadcrumbs && /*#__PURE__*/React__namespace.createElement("div", {
|
|
15783
|
+
className: "pl-6",
|
|
15784
|
+
"data-test": "DesignSystem-PageHeader--Breadcrumbs"
|
|
15785
|
+
}, breadcrumbs), /*#__PURE__*/React__namespace.createElement("div", {
|
|
15786
|
+
className: "d-flex pl-6"
|
|
15787
|
+
}, /*#__PURE__*/React__namespace.createElement(BackButton, {
|
|
15788
|
+
button: button
|
|
15789
|
+
}), /*#__PURE__*/React__namespace.createElement("div", {
|
|
15656
15790
|
className: classes
|
|
15657
15791
|
}, /*#__PURE__*/React__namespace.createElement(Row, null, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
15658
15792
|
size: colSize,
|
|
15659
15793
|
sizeXL: colSize,
|
|
15660
15794
|
sizeM: colSize
|
|
15661
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
15674
|
-
|
|
15675
|
-
},
|
|
15676
|
-
|
|
15677
|
-
|
|
15678
|
-
sizeM: "4"
|
|
15679
|
-
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
15680
|
-
className: "PageHeader-actionsWrapper"
|
|
15681
|
-
})))), (status || meta) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
15682
|
-
className: "PageHeader-statusWrapper"
|
|
15683
|
-
}, status, meta), breadcrumbs && navigationPosition === 'bottom' && renderNav(), tabs && /*#__PURE__*/React__namespace.createElement("div", null, tabs));
|
|
15795
|
+
}, /*#__PURE__*/React__namespace.createElement(Title, {
|
|
15796
|
+
badge: badge,
|
|
15797
|
+
title: title
|
|
15798
|
+
})), /*#__PURE__*/React__namespace.createElement(CenterNav, __assign({}, centerNavProps)), /*#__PURE__*/React__namespace.createElement(Action, {
|
|
15799
|
+
actions: actions,
|
|
15800
|
+
navigation: navigation,
|
|
15801
|
+
stepper: stepper
|
|
15802
|
+
})), /*#__PURE__*/React__namespace.createElement(Status, __assign({}, statusProps)))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
15803
|
+
className: "pl-3"
|
|
15804
|
+
}, navigationPosition === 'bottom' && /*#__PURE__*/React__namespace.createElement(Nav, {
|
|
15805
|
+
navigation: navigation,
|
|
15806
|
+
stepper: stepper
|
|
15807
|
+
}), tabs && /*#__PURE__*/React__namespace.createElement("div", {
|
|
15808
|
+
"data-test": "DesignSystem-PageHeader--Tabs"
|
|
15809
|
+
}, tabs))), separator && /*#__PURE__*/React__namespace.createElement(Divider, {
|
|
15810
|
+
appearance: "header"
|
|
15811
|
+
}));
|
|
15684
15812
|
};
|
|
15685
15813
|
PageHeader.defaultProps = {
|
|
15686
15814
|
navigationPosition: 'center',
|
|
@@ -16450,7 +16578,7 @@
|
|
|
16450
16578
|
SelectionCard.useMultiSelect = useMultiSelect;
|
|
16451
16579
|
SelectionCard.useSingleSelect = useSingleSelect;
|
|
16452
16580
|
|
|
16453
|
-
var version = "2.
|
|
16581
|
+
var version = "2.23.0";
|
|
16454
16582
|
|
|
16455
16583
|
exports.ActionCard = ActionCard;
|
|
16456
16584
|
exports.Avatar = Avatar;
|