@mmb-digital/ds-lilly 0.6.0 → 0.6.2
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/dist/.DS_Store +0 -0
- package/dist/ds-lilly.css.map +1 -0
- package/dist/ds-lilly.d.ts +2498 -0
- package/dist/ds-lilly.js +13 -11
- package/dist/ds-lilly.js.map +1 -0
- package/dist/types/src/components/Components/Card/Card.d.ts +2 -2
- package/dist/types/src/components/Components/Card/_elements_/CollapseHeader.d.ts +4 -3
- package/dist/types/src/components/Components/Icon/Icon.d.ts +2 -2
- package/dist/types/src/components/Form/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/types/src/components/Form/Select2/Select2.d.ts +2 -1
- package/dist/types/src/contexts/Select2Context.d.ts +2 -2
- package/dist/types/src/types/common.d.ts +3 -2
- package/package.json +1 -1
package/dist/ds-lilly.js
CHANGED
|
@@ -96589,7 +96589,9 @@ var ContentCard = function (_a) {
|
|
|
96589
96589
|
}, [isCollapsible, onToggle]);
|
|
96590
96590
|
Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return setIsOpened(isOpen); }, [isOpen]);
|
|
96591
96591
|
var hasSubtitleTag = (subtitleTagIcon || subtitleTagImageUrl) && subtitleTagText;
|
|
96592
|
-
var badgeIcon = hasSubtitleTag
|
|
96592
|
+
var badgeIcon = hasSubtitleTag
|
|
96593
|
+
? (subtitleTagIcon ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { backgroundColor: subtitleTagBackgroundColor, name: subtitleTagIcon, size: "small" })) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Avatar, { background: "transparent", imageUrl: subtitleTagImageUrl, size: "small" })))
|
|
96594
|
+
: undefined;
|
|
96593
96595
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Card, { header: external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader" },
|
|
96594
96596
|
customIcon && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-contentCardHeader__customIcon', "c-contentCardHeader__customIcon" + ucfirst(iconBadgePosition)) },
|
|
96595
96597
|
customIcon,
|
|
@@ -96609,7 +96611,7 @@ var ContentCard = function (_a) {
|
|
|
96609
96611
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["cloneElement"])(button, {
|
|
96610
96612
|
theme: classBinder_cx(button.props.theme, 'c-contentCardHeader__button')
|
|
96611
96613
|
});
|
|
96612
|
-
})))), iconBackgroundColor: iconBackgroundColor, iconBadge: isOpened && hasSubtitleTag
|
|
96614
|
+
})))), iconBackgroundColor: iconBackgroundColor, iconBadge: isOpened && hasSubtitleTag ? badgeIcon : undefined, iconBadgePosition: iconBadgePosition, iconName: iconName, iconSize: iconSize, isCollapsible: isCollapsible, isInteractive: isInteractive, isOpen: isOpened, shadowSize: isCompact ? 'no' : 'small', size: size, theme: classBinder_cx('c-contentCard', { 'c-contentCardCompact': isCompact, 'c-contentCardCompact--interactive': isInteractive }, theme), withoutOpener: withoutOpener, onToggle: handleOnToggle }, children));
|
|
96613
96615
|
};
|
|
96614
96616
|
|
|
96615
96617
|
// CONCATENATED MODULE: ./src/components/Components/ContentCard/ContentCardGroup.tsx
|
|
@@ -98057,10 +98059,10 @@ var Autocomplete_assign = (undefined && undefined.__assign) || function () {
|
|
|
98057
98059
|
|
|
98058
98060
|
var Autocomplete = function (_a) {
|
|
98059
98061
|
var _b, _c, _d;
|
|
98060
|
-
var disabledTooltip = _a.disabledTooltip, dropdownTheme = _a.dropdownTheme, error = _a.error, _e = _a.hasAlwaysValue, hasAlwaysValue = _e === void 0 ? false : _e, _f = _a.hasFullWidthOptions, hasFullWidthOptions = _f === void 0 ? true : _f, help = _a.help, _g = _a.inputAutocomplete, inputAutocomplete = _g === void 0 ? false : _g, isCreatable = _a.isCreatable, isDisabled = _a.isDisabled, items = _a.items, label = _a.label, labelTooltip = _a.labelTooltip, messages = _a.messages, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onCreate = _a.onCreate, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme,
|
|
98062
|
+
var disabledTooltip = _a.disabledTooltip, dropdownTheme = _a.dropdownTheme, error = _a.error, _e = _a.hasAlwaysValue, hasAlwaysValue = _e === void 0 ? false : _e, _f = _a.hasFullWidthOptions, hasFullWidthOptions = _f === void 0 ? true : _f, help = _a.help, _g = _a.inputAutocomplete, inputAutocomplete = _g === void 0 ? false : _g, isCreatable = _a.isCreatable, isDisabled = _a.isDisabled, items = _a.items, label = _a.label, labelTooltip = _a.labelTooltip, messages = _a.messages, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onCreate = _a.onCreate, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, outerValue = _a.value;
|
|
98061
98063
|
var isCategorised = !!((_b = items[0]) === null || _b === void 0 ? void 0 : _b.items);
|
|
98062
98064
|
var _h = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isDropdownVisible = _h[0], setIsDropdownVisible = _h[1];
|
|
98063
|
-
var _j = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(
|
|
98065
|
+
var _j = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(outerValue || ''), value = _j[0], setValue = _j[1];
|
|
98064
98066
|
var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(-1), focusedItemIndex = _k[0], setFocusedItemIndex = _k[1];
|
|
98065
98067
|
var _l = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(0), focusedCategoryIndex = _l[0], setFocusedCategoryIndex = _l[1];
|
|
98066
98068
|
var _m = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(items), filteredItems = _m[0], setFilteredItems = _m[1];
|
|
@@ -98070,15 +98072,15 @@ var Autocomplete = function (_a) {
|
|
|
98070
98072
|
var searchedItem;
|
|
98071
98073
|
if (isCategorised) {
|
|
98072
98074
|
var categories = items;
|
|
98073
|
-
categories.map(function (category) { return (searchedItem = category.items.filter(function (item) { return item.value ===
|
|
98075
|
+
categories.map(function (category) { return (searchedItem = category.items.filter(function (item) { return item.value === outerValue; })[0]); });
|
|
98074
98076
|
}
|
|
98075
98077
|
else {
|
|
98076
|
-
searchedItem = items.filter(function (item) { return item.value ===
|
|
98078
|
+
searchedItem = items.filter(function (item) { return item.value === outerValue; })[0];
|
|
98077
98079
|
}
|
|
98078
98080
|
var htmlInput = document.getElementById("" + name);
|
|
98079
|
-
htmlInput.value = searchedItem ? searchedItem.label :
|
|
98080
|
-
setValue(
|
|
98081
|
-
}, [
|
|
98081
|
+
htmlInput.value = searchedItem ? searchedItem.label : outerValue || '';
|
|
98082
|
+
setValue(outerValue || '');
|
|
98083
|
+
}, [outerValue]);
|
|
98082
98084
|
Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
|
|
98083
98085
|
if (value && focusedItemIndex === -1) {
|
|
98084
98086
|
setFocusedItemIndex(0);
|
|
@@ -98313,7 +98315,7 @@ var Autocomplete = function (_a) {
|
|
|
98313
98315
|
setFilteredItems(newItems);
|
|
98314
98316
|
setIsDropdownVisible(true);
|
|
98315
98317
|
};
|
|
98316
|
-
var
|
|
98318
|
+
var handleDropdownToggle = function () {
|
|
98317
98319
|
setFilteredItems(getFilteredItems(''));
|
|
98318
98320
|
setIsDropdownVisible(!isDropdownVisible);
|
|
98319
98321
|
};
|
|
@@ -98379,7 +98381,7 @@ var Autocomplete = function (_a) {
|
|
|
98379
98381
|
messages.create, " \"" + (isSelectedValue ? (_d = getMatchingItem()) === null || _d === void 0 ? void 0 : _d.label : value) + "\"")))),
|
|
98380
98382
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("button", { "aria-expanded": isDropdownVisible, "aria-haspopup": "listbox", "aria-labelledby": name + "_label " + name + "_button", className: classBinder_cx('f-controlSuffix f-controlSuffix--button', {
|
|
98381
98383
|
'f-controlSuffix--open': isDropdownVisible
|
|
98382
|
-
}), disabled: isDisabled, id: name + "_button", tabIndex: -1, type: "button", onClick:
|
|
98384
|
+
}), disabled: isDisabled, id: name + "_button", tabIndex: -1, type: "button", onClick: handleDropdownToggle },
|
|
98383
98385
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "arrowDown", size: "small", theme: "f-control2__selectIcon" }))))));
|
|
98384
98386
|
};
|
|
98385
98387
|
|