@innovaccer/design-system 2.31.1 → 2.32.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/CHANGELOG.md +95 -0
- package/css/dist/index.css +69 -64
- package/css/dist/index.css.map +1 -1
- package/css/src/components/actionCard.css +1 -1
- package/css/src/components/backdrop.css +3 -3
- package/css/src/components/chipInput.css +1 -1
- package/css/src/components/dropdown.css +5 -5
- package/css/src/components/fullscreenModal.css +2 -2
- package/css/src/components/grid.css +13 -11
- package/css/src/components/horizontalNav.css +1 -1
- package/css/src/components/input.css +2 -2
- package/css/src/components/listbox.css +3 -3
- package/css/src/components/menu.css +1 -1
- package/css/src/components/message.css +4 -4
- package/css/src/components/navigation.css +1 -1
- package/css/src/components/pills.css +2 -2
- package/css/src/components/popover.css +1 -1
- package/css/src/components/select.css +4 -0
- package/css/src/components/selectionCard.css +5 -5
- package/css/src/components/statusHints.css +1 -1
- package/css/src/components/switch.css +2 -2
- package/css/src/components/tabs.css +1 -1
- package/css/src/components/toast.css +7 -7
- package/css/src/components/verticalNav.css +2 -2
- package/css/src/core/typography.css +3 -3
- package/css/src/variables/index.css +22 -23
- package/dist/.lib/tsconfig.type.tsbuildinfo +29 -29
- package/dist/core/components/atoms/avatarSelection/avatarPopover/AvatarSelectionOption.d.ts +2 -0
- package/dist/core/components/atoms/checkbox/Checkbox.d.ts +1 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +0 -1
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +1 -0
- package/dist/core/components/organisms/menu/MenuItem.d.ts +2 -0
- package/dist/core/components/organisms/select/SearchInput.d.ts +2 -2
- package/dist/core/components/organisms/select/Select.d.ts +2 -0
- package/dist/core/components/organisms/select/SelectContext.d.ts +1 -0
- package/dist/core/components/organisms/select/SelectEmptyTemplate.d.ts +2 -2
- package/dist/index.esm.js +122 -65
- package/dist/index.js +86 -44
- 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: 1715179205608
|
|
4
4
|
* Package: @innovaccer/design-system
|
|
5
|
-
* Version: v2.
|
|
5
|
+
* Version: v2.32.1
|
|
6
6
|
* License: MIT
|
|
7
7
|
* Docs: https://innovaccer.github.io/design-system
|
|
8
8
|
*/
|
|
@@ -2918,7 +2918,8 @@
|
|
|
2918
2918
|
helpText = props.helpText,
|
|
2919
2919
|
_j = props.id,
|
|
2920
2920
|
id = _j === void 0 ? name + "-" + label + "-" + uidGenerator() : _j,
|
|
2921
|
-
|
|
2921
|
+
labelRef = props.labelRef,
|
|
2922
|
+
rest = __rest(props, ["size", "tabIndex", "defaultChecked", "indeterminate", "label", "error", "disabled", "onChange", "name", "value", "className", "checked", "helpText", "id", "labelRef"]);
|
|
2922
2923
|
|
|
2923
2924
|
var ref = React__namespace.useRef(null);
|
|
2924
2925
|
React__namespace.useImperativeHandle(forwardedRef, function () {
|
|
@@ -2989,7 +2990,9 @@
|
|
|
2989
2990
|
"data-test": "DesignSystem-Checkbox-Label"
|
|
2990
2991
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
2991
2992
|
size: size === 'tiny' ? 'small' : 'regular',
|
|
2992
|
-
appearance: disabled ? 'disabled' : 'default'
|
|
2993
|
+
appearance: disabled ? 'disabled' : 'default',
|
|
2994
|
+
className: "ellipsis--noWrap mw-100",
|
|
2995
|
+
ref: labelRef
|
|
2993
2996
|
}, label.trim())), helpText && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
2994
2997
|
"data-test": "DesignSystem-Checkbox-HelpText",
|
|
2995
2998
|
size: "small",
|
|
@@ -4734,7 +4737,7 @@
|
|
|
4734
4737
|
style: dropdownStyle,
|
|
4735
4738
|
"data-test": "DesignSystem-Dropdown--wrapper"
|
|
4736
4739
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
4737
|
-
className: "d-flex flex-column justify-content-center align-items-center",
|
|
4740
|
+
className: "d-flex flex-column justify-content-center align-items-center w-100",
|
|
4738
4741
|
"data-test": "DesignSystem-Dropdown--errorWrapper"
|
|
4739
4742
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
4740
4743
|
className: "text-align-center mb-3",
|
|
@@ -5141,7 +5144,7 @@
|
|
|
5141
5144
|
if (isDropdownListBlank) {
|
|
5142
5145
|
if (noResultMessage) {
|
|
5143
5146
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
5144
|
-
className: "Dropdown-wrapper",
|
|
5147
|
+
className: "Dropdown-wrapper w-100",
|
|
5145
5148
|
style: dropdownStyle,
|
|
5146
5149
|
"data-test": "DesignSystem-Dropdown--errorWrapper"
|
|
5147
5150
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -8449,8 +8452,7 @@
|
|
|
8449
8452
|
_this.state = {
|
|
8450
8453
|
animationKeyframe: '',
|
|
8451
8454
|
isOpen: _this.props.open || false,
|
|
8452
|
-
uniqueKey: ''
|
|
8453
|
-
showClosingAnimation: false
|
|
8455
|
+
uniqueKey: ''
|
|
8454
8456
|
};
|
|
8455
8457
|
_this.hoverableDelay = 100;
|
|
8456
8458
|
_this.offsetMapping = {
|
|
@@ -8496,6 +8498,10 @@
|
|
|
8496
8498
|
zIndex: zIndex === undefined ? zIndex : zIndex + 1,
|
|
8497
8499
|
isOpen: true
|
|
8498
8500
|
});
|
|
8501
|
+
} else if (!this.props.open && this.props.animationClass) {
|
|
8502
|
+
this.setState({
|
|
8503
|
+
isOpen: false
|
|
8504
|
+
});
|
|
8499
8505
|
}
|
|
8500
8506
|
}
|
|
8501
8507
|
};
|
|
@@ -8558,8 +8564,6 @@
|
|
|
8558
8564
|
};
|
|
8559
8565
|
|
|
8560
8566
|
PopperWrapper.prototype.handleMouseLeave = function () {
|
|
8561
|
-
var _this = this;
|
|
8562
|
-
|
|
8563
8567
|
var on = this.props.on;
|
|
8564
8568
|
|
|
8565
8569
|
if (on === 'hover') {
|
|
@@ -8572,14 +8576,7 @@
|
|
|
8572
8576
|
} else {
|
|
8573
8577
|
onToggle(false, 'mouseLeave');
|
|
8574
8578
|
this.setState({
|
|
8575
|
-
|
|
8576
|
-
}, function () {
|
|
8577
|
-
window.setTimeout(function () {
|
|
8578
|
-
_this.setState({
|
|
8579
|
-
showClosingAnimation: false,
|
|
8580
|
-
isOpen: false
|
|
8581
|
-
});
|
|
8582
|
-
}, 120);
|
|
8579
|
+
isOpen: false
|
|
8583
8580
|
});
|
|
8584
8581
|
}
|
|
8585
8582
|
}
|
|
@@ -9489,7 +9486,7 @@
|
|
|
9489
9486
|
React__namespace.useEffect(function () {
|
|
9490
9487
|
var element = elementRef ? elementRef : childrenRef;
|
|
9491
9488
|
setIsTruncated(detectTruncation(element));
|
|
9492
|
-
}, [childrenRef, elementRef]);
|
|
9489
|
+
}, [childrenRef, elementRef, children]);
|
|
9493
9490
|
var renderChildren = elementRef || ! /*#__PURE__*/React__namespace.isValidElement(children) ? children : /*#__PURE__*/React__namespace.cloneElement(children, {
|
|
9494
9491
|
ref: childrenRef
|
|
9495
9492
|
});
|
|
@@ -18644,6 +18641,45 @@
|
|
|
18644
18641
|
}, description));
|
|
18645
18642
|
};
|
|
18646
18643
|
|
|
18644
|
+
var AvatarSelectionItem = function AvatarSelectionItem(props) {
|
|
18645
|
+
var avatarData = props.avatarData,
|
|
18646
|
+
isSelected = props.isSelected;
|
|
18647
|
+
|
|
18648
|
+
var _a = React__namespace.useState(false),
|
|
18649
|
+
showTooltip = _a[0],
|
|
18650
|
+
setShowTooltip = _a[1];
|
|
18651
|
+
|
|
18652
|
+
var elementRef = React__namespace.useRef(null);
|
|
18653
|
+
var _b = avatarData.firstName,
|
|
18654
|
+
firstName = _b === void 0 ? '' : _b,
|
|
18655
|
+
_c = avatarData.lastName,
|
|
18656
|
+
lastName = _c === void 0 ? '' : _c;
|
|
18657
|
+
var name = firstName + " " + lastName;
|
|
18658
|
+
return /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
18659
|
+
showOnTruncation: true,
|
|
18660
|
+
tooltip: name,
|
|
18661
|
+
elementRef: elementRef,
|
|
18662
|
+
open: showTooltip
|
|
18663
|
+
}, /*#__PURE__*/React__namespace.createElement(AvatarSelectionOption, {
|
|
18664
|
+
value: avatarData,
|
|
18665
|
+
onFocus: function onFocus() {
|
|
18666
|
+
setShowTooltip(true);
|
|
18667
|
+
},
|
|
18668
|
+
onBlur: function onBlur() {
|
|
18669
|
+
setShowTooltip(false);
|
|
18670
|
+
}
|
|
18671
|
+
}, /*#__PURE__*/React__namespace.createElement(Checkbox, {
|
|
18672
|
+
defaultChecked: isSelected,
|
|
18673
|
+
checked: isSelected,
|
|
18674
|
+
label: name,
|
|
18675
|
+
size: "regular",
|
|
18676
|
+
tabIndex: -1,
|
|
18677
|
+
className: "ellipsis--noWrap",
|
|
18678
|
+
"data-test": "DesignSystem-AvatarSelection--Checkbox",
|
|
18679
|
+
labelRef: elementRef
|
|
18680
|
+
})));
|
|
18681
|
+
};
|
|
18682
|
+
|
|
18647
18683
|
var AvatarSelectionPopover = function AvatarSelectionPopover(props) {
|
|
18648
18684
|
var _a;
|
|
18649
18685
|
|
|
@@ -18694,7 +18730,7 @@
|
|
|
18694
18730
|
setSearchList(hiddenAvatarList);
|
|
18695
18731
|
};
|
|
18696
18732
|
|
|
18697
|
-
var popperClassName = classNames__default["default"]((_a = {}, _a['py-3'] = !withSearch, _a['pb-3'] = withSearch, _a['SelectionAvatarGroup-popper'] = true, _a
|
|
18733
|
+
var popperClassName = classNames__default["default"]((_a = {}, _a['py-3'] = !withSearch, _a['pb-3'] = withSearch, _a['SelectionAvatarGroup-popper'] = true, _a));
|
|
18698
18734
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
18699
18735
|
style: {
|
|
18700
18736
|
width: customStyle.width
|
|
@@ -18715,24 +18751,12 @@
|
|
|
18715
18751
|
title: "No users found",
|
|
18716
18752
|
description: "Try modifying your search to find what you are looking for."
|
|
18717
18753
|
}), /*#__PURE__*/React__namespace.createElement(AvatarSelectionList, null, searchList.map(function (avatarData, index) {
|
|
18718
|
-
var _a = avatarData.firstName,
|
|
18719
|
-
firstName = _a === void 0 ? '' : _a,
|
|
18720
|
-
_b = avatarData.lastName,
|
|
18721
|
-
lastName = _b === void 0 ? '' : _b;
|
|
18722
|
-
var name = firstName + " " + lastName;
|
|
18723
18754
|
var isSelected = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.includes(avatarData);
|
|
18724
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
18755
|
+
return /*#__PURE__*/React__namespace.createElement(AvatarSelectionItem, {
|
|
18725
18756
|
key: index,
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
checked: isSelected,
|
|
18730
|
-
label: name,
|
|
18731
|
-
size: "regular",
|
|
18732
|
-
tabIndex: -1,
|
|
18733
|
-
className: "ellipsis--noWrap",
|
|
18734
|
-
"data-test": "DesignSystem-AvatarSelection--Checkbox"
|
|
18735
|
-
}));
|
|
18757
|
+
avatarData: avatarData,
|
|
18758
|
+
isSelected: isSelected
|
|
18759
|
+
});
|
|
18736
18760
|
}))));
|
|
18737
18761
|
};
|
|
18738
18762
|
|
|
@@ -19906,6 +19930,7 @@
|
|
|
19906
19930
|
rest = __rest(props, ["triggerSize", "placeholder", "withClearButton", "icon", "disabled", "inlineLabel", "iconType", "onClear", "setLabel"]);
|
|
19907
19931
|
|
|
19908
19932
|
var contextProp = React__namespace.useContext(SelectContext);
|
|
19933
|
+
var elementRef = React__namespace.useRef(null);
|
|
19909
19934
|
var openPopover = contextProp.openPopover,
|
|
19910
19935
|
selectValue = contextProp.selectValue,
|
|
19911
19936
|
setSelectValue = contextProp.setSelectValue,
|
|
@@ -19915,7 +19940,8 @@
|
|
|
19915
19940
|
setOpenPopover = contextProp.setOpenPopover,
|
|
19916
19941
|
setHighlightFirstItem = contextProp.setHighlightFirstItem,
|
|
19917
19942
|
setHighlightLastItem = contextProp.setHighlightLastItem,
|
|
19918
|
-
triggerRef = contextProp.triggerRef
|
|
19943
|
+
triggerRef = contextProp.triggerRef,
|
|
19944
|
+
width = contextProp.width;
|
|
19919
19945
|
var buttonDisabled = disabled ? 'disabled' : 'default';
|
|
19920
19946
|
var trimmedPlaceholder = placeholder === null || placeholder === void 0 ? void 0 : placeholder.trim();
|
|
19921
19947
|
var displayValue = computeValue(multiSelect, selectValue, setLabel);
|
|
@@ -19937,8 +19963,13 @@
|
|
|
19937
19963
|
};
|
|
19938
19964
|
|
|
19939
19965
|
var buttonClass = classNames__default["default"]((_a = {}, _a['Button'] = true, _a['Select-trigger'] = true, _a["Select-trigger--" + triggerSize] = triggerSize, _a['Select-trigger--placeholder'] = !isOptionSelected, _a['Select-trigger--icon'] = icon, _a['Select-trigger--open'] = openPopover, _a));
|
|
19940
|
-
var textClass = classNames__default["default"]((_b = {}, _b['
|
|
19941
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
19966
|
+
var textClass = classNames__default["default"]((_b = {}, _b['Select-trigger-text'] = true, _b));
|
|
19967
|
+
return /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
19968
|
+
showOnTruncation: true,
|
|
19969
|
+
showTooltip: !openPopover,
|
|
19970
|
+
tooltip: value,
|
|
19971
|
+
elementRef: elementRef
|
|
19972
|
+
}, /*#__PURE__*/React__namespace.createElement("button", __assign({
|
|
19942
19973
|
ref: triggerRef,
|
|
19943
19974
|
onKeyDown: function onKeyDown(event) {
|
|
19944
19975
|
return handleKeyDownTrigger(event, setOpenPopover, setHighlightFirstItem, setHighlightLastItem);
|
|
@@ -19946,13 +19977,16 @@
|
|
|
19946
19977
|
type: "button",
|
|
19947
19978
|
className: buttonClass,
|
|
19948
19979
|
disabled: disabled,
|
|
19980
|
+
style: {
|
|
19981
|
+
maxWidth: width
|
|
19982
|
+
},
|
|
19949
19983
|
tabIndex: 0,
|
|
19950
19984
|
"aria-haspopup": "listbox",
|
|
19951
19985
|
"aria-expanded": openPopover,
|
|
19952
19986
|
"aria-label": "trigger",
|
|
19953
19987
|
"data-test": "DesignSystem-Select-trigger"
|
|
19954
19988
|
}, rest), /*#__PURE__*/React__namespace.createElement("div", {
|
|
19955
|
-
className: "Select-trigger-wrapper"
|
|
19989
|
+
className: "Select-trigger-wrapper ellipsis--noWrap"
|
|
19956
19990
|
}, inlineLabel && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19957
19991
|
appearance: "subtle",
|
|
19958
19992
|
className: "mr-4 white-space-nowrap"
|
|
@@ -19961,7 +19995,8 @@
|
|
|
19961
19995
|
className: "d-flex align-items-center mr-4",
|
|
19962
19996
|
name: icon,
|
|
19963
19997
|
type: iconType
|
|
19964
|
-
}), value && /*#__PURE__*/React__namespace.createElement(
|
|
19998
|
+
}), value && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19999
|
+
ref: elementRef,
|
|
19965
20000
|
className: textClass
|
|
19966
20001
|
}, value)), isOptionSelected && withClearButton && /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
19967
20002
|
appearance: buttonDisabled,
|
|
@@ -19976,7 +20011,7 @@
|
|
|
19976
20011
|
appearance: buttonDisabled,
|
|
19977
20012
|
name: iconName,
|
|
19978
20013
|
type: iconType
|
|
19979
|
-
}));
|
|
20014
|
+
})));
|
|
19980
20015
|
};
|
|
19981
20016
|
|
|
19982
20017
|
SelectTrigger.defaultProps = {
|
|
@@ -20082,6 +20117,8 @@
|
|
|
20082
20117
|
maxHeight = props.maxHeight,
|
|
20083
20118
|
minHeight = props.minHeight,
|
|
20084
20119
|
value = props.value,
|
|
20120
|
+
boundaryElement = props.boundaryElement,
|
|
20121
|
+
appendToBody = props.appendToBody,
|
|
20085
20122
|
_a = props.multiSelect,
|
|
20086
20123
|
multiSelect = _a === void 0 ? false : _a,
|
|
20087
20124
|
onOutsideClick = props.onOutsideClick,
|
|
@@ -20206,6 +20243,7 @@
|
|
|
20206
20243
|
maxHeight: maxHeight,
|
|
20207
20244
|
minHeight: minHeight,
|
|
20208
20245
|
withSearch: withSearch,
|
|
20246
|
+
width: width,
|
|
20209
20247
|
setWithSearch: setWithSearch,
|
|
20210
20248
|
multiSelect: multiSelect,
|
|
20211
20249
|
listRef: listRef,
|
|
@@ -20228,6 +20266,8 @@
|
|
|
20228
20266
|
className: "mt-3",
|
|
20229
20267
|
triggerClass: "d-block",
|
|
20230
20268
|
customStyle: popoverStyle,
|
|
20269
|
+
boundaryElement: boundaryElement,
|
|
20270
|
+
appendToBody: appendToBody,
|
|
20231
20271
|
trigger: /*#__PURE__*/React__namespace.createElement(SelectTrigger, __assign({
|
|
20232
20272
|
"aria-controls": "select-listbox"
|
|
20233
20273
|
}, triggerOptions))
|
|
@@ -20375,7 +20415,8 @@
|
|
|
20375
20415
|
className = props.className,
|
|
20376
20416
|
onClick = props.onClick,
|
|
20377
20417
|
disabled = props.disabled,
|
|
20378
|
-
|
|
20418
|
+
onFocus = props.onFocus,
|
|
20419
|
+
rest = __rest(props, ["children", "className", "onClick", "disabled", "onFocus"]);
|
|
20379
20420
|
|
|
20380
20421
|
var contextProp = React__default["default"].useContext(MenuContext);
|
|
20381
20422
|
var subMenuContextProp = React__default["default"].useContext(SubMenuContext);
|
|
@@ -20417,6 +20458,7 @@
|
|
|
20417
20458
|
var onFocusHandler = function onFocusHandler(event) {
|
|
20418
20459
|
setFocusedOption === null || setFocusedOption === void 0 ? void 0 : setFocusedOption(event.target);
|
|
20419
20460
|
setOpenPopover === null || setOpenPopover === void 0 ? void 0 : setOpenPopover(true);
|
|
20461
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
|
|
20420
20462
|
};
|
|
20421
20463
|
|
|
20422
20464
|
var onKeyDownHandler = function onKeyDownHandler(event) {
|
|
@@ -20703,7 +20745,7 @@
|
|
|
20703
20745
|
position: 'bottom-start'
|
|
20704
20746
|
};
|
|
20705
20747
|
|
|
20706
|
-
var version = "2.
|
|
20748
|
+
var version = "2.32.1";
|
|
20707
20749
|
|
|
20708
20750
|
exports.ActionCard = ActionCard;
|
|
20709
20751
|
exports.Avatar = Avatar;
|