@mmb-digital/ds-lilly 0.4.1 → 0.5.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/dist/.DS_Store +0 -0
- package/dist/ds-lilly.css +1 -1
- package/dist/ds-lilly.css.map +1 -0
- package/dist/ds-lilly.d.ts +2498 -0
- package/dist/ds-lilly.js +40 -42
- package/dist/ds-lilly.js.map +1 -0
- package/dist/types/src/components/Components/Badge/Badge.d.ts +4 -2
- package/dist/types/src/components/Components/ContentCard/ContentCard.d.ts +4 -1
- package/dist/types/src/components/Components/Pills/Pills.d.ts +6 -0
- package/dist/types/src/components/Navigation/Tabs/_elements_/TabListItem.d.ts +3 -1
- package/package.json +1 -1
package/dist/ds-lilly.js
CHANGED
|
@@ -84446,11 +84446,11 @@ Select2Context.displayName = 'Select2Context';
|
|
|
84446
84446
|
|
|
84447
84447
|
// CONCATENATED MODULE: ./src/contexts/TabsContext.tsx
|
|
84448
84448
|
|
|
84449
|
-
|
|
84449
|
+
|
|
84450
84450
|
var TabsContext = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["createContext"])({
|
|
84451
84451
|
activeItem: 0,
|
|
84452
84452
|
identification: '',
|
|
84453
|
-
setActiveItem:
|
|
84453
|
+
setActiveItem: noop,
|
|
84454
84454
|
tabsLimit: 0,
|
|
84455
84455
|
tabs: []
|
|
84456
84456
|
});
|
|
@@ -87142,10 +87142,10 @@ var Avatar = function (_a) {
|
|
|
87142
87142
|
|
|
87143
87143
|
|
|
87144
87144
|
var Badge = function (_a) {
|
|
87145
|
-
var ariaLabel = _a.ariaLabel, children = _a.children,
|
|
87146
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { "aria-label": ariaLabel, className: classBinder_cx('c-badge', theme), "data-testid": testId },
|
|
87145
|
+
var ariaLabel = _a.ariaLabel, children = _a.children, count = _a.count, _b = _a.hasNotification, hasNotification = _b === void 0 ? false : _b, _c = _a.isDotVisible, isDotVisible = _c === void 0 ? false : _c, _d = _a.maxCount, maxCount = _d === void 0 ? 99 : _d, testId = _a.testId, theme = _a.theme;
|
|
87146
|
+
return hasNotification || isDotVisible || children || count ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { "aria-label": ariaLabel, className: classBinder_cx('c-badge', theme), "data-testid": testId },
|
|
87147
87147
|
children,
|
|
87148
|
-
(isDotVisible ||
|
|
87148
|
+
(isDotVisible || hasNotification || count) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx('c-badge__point', { 'c-badge__point--relative': !children }, { 'c-badge__point--dot': isDotVisible || hasNotification }) }, count && (!isDotVisible || !hasNotification) ? (count > maxCount ? maxCount + "+" : count) : null)))) : null;
|
|
87149
87149
|
};
|
|
87150
87150
|
|
|
87151
87151
|
// CONCATENATED MODULE: ./src/components/Components/Badge/index.ts
|
|
@@ -96244,11 +96244,12 @@ var Card = function (_a) {
|
|
|
96244
96244
|
_b["c-card--" + size] = size,
|
|
96245
96245
|
_b), theme), "data-testid": testId, role: isInteractive && !withoutRole ? 'button' : undefined, tabIndex: (isInteractive || isCollapsible) && !withoutRole ? 0 : undefined, onClick: handleOnClick, onKeyDown: handleKeyDown },
|
|
96246
96246
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(CollapseHeader, { header: collapseHeader ? collapseHeader : children, iconBackground: iconBackground, iconName: iconName, iconSize: iconSize, isCollapsible: isCollapsible, isIconAlignTop: isIconAlignTop, isIconRight: isIconRight, isInteractive: isInteractive, onToggle: handleOnToggle }),
|
|
96247
|
-
isCollapsible ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(AnimatePresence, { initial: false }, isOpened && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(
|
|
96248
|
-
|
|
96249
|
-
|
|
96250
|
-
|
|
96251
|
-
|
|
96247
|
+
isCollapsible ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(AnimatePresence, { initial: false }, isOpened && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(motion.div, { key: "content", animate: "open", "aria-labelledby": identification + "_header", className: classBinder_cx('c-card__motion'), exit: "collapsed", initial: "collapsed", role: "region", transition: { duration: 0.6, ease: [0.04, 0.62, 0.23, 0.98] }, variants: {
|
|
96248
|
+
open: { opacity: 1, height: 'auto' },
|
|
96249
|
+
collapsed: { opacity: 0, height: 0 }
|
|
96250
|
+
} },
|
|
96251
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-card__content" }, children))))) : (collapseHeader &&
|
|
96252
|
+
children && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-labelledby": identification + "_header", className: classBinder_cx('c-card__content'), role: "region" }, children)))))));
|
|
96252
96253
|
};
|
|
96253
96254
|
|
|
96254
96255
|
// CONCATENATED MODULE: ./src/components/Components/Card/_elements_/CardCustomTrigger.tsx
|
|
@@ -96564,11 +96565,11 @@ children
|
|
|
96564
96565
|
|
|
96565
96566
|
*/
|
|
96566
96567
|
var ContentCard = function (_a) {
|
|
96567
|
-
var amount = _a.amount, amountSubtitle = _a.amountSubtitle, _b = _a.buttons, buttons = _b === void 0 ? [] : _b, currencyCode = _a.currencyCode, customIcon = _a.customIcon, children = _a.children, isCollapsible = _a.isCollapsible, isCompact = _a.isCompact, isInteractive = _a.isInteractive, isOpen = _a.isOpen, iconBackgroundColor = _a.iconBackgroundColor, iconName = _a.iconName, iconSize = _a.iconSize, _c = _a.parameters, parameters = _c === void 0 ? [] : _c, size = _a.size, _d = _a.subtitles, subtitles = _d === void 0 ? [] : _d, subtitleTag = _a.subtitleTag, theme = _a.theme, title = _a.title, onToggle = _a.onToggle;
|
|
96568
|
+
var amount = _a.amount, amountSubtitle = _a.amountSubtitle, _b = _a.buttons, buttons = _b === void 0 ? [] : _b, currencyCode = _a.currencyCode, customIcon = _a.customIcon, children = _a.children, isCollapsible = _a.isCollapsible, isCompact = _a.isCompact, isInteractive = _a.isInteractive, isOpen = _a.isOpen, iconBackgroundColor = _a.iconBackgroundColor, iconName = _a.iconName, iconSize = _a.iconSize, _c = _a.parameters, parameters = _c === void 0 ? [] : _c, size = _a.size, _d = _a.subtitles, subtitles = _d === void 0 ? [] : _d, subtitleTag = _a.subtitleTag, theme = _a.theme, title = _a.title, _e = _a.titleSize, titleSize = _e === void 0 ? 'h2' : _e, _f = _a.titleVisual, titleVisual = _f === void 0 ? 'h6' : _f, onToggle = _a.onToggle;
|
|
96568
96569
|
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" },
|
|
96569
96570
|
customIcon,
|
|
96570
96571
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__content" },
|
|
96571
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Title, { size:
|
|
96572
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Title, { size: titleSize, theme: "c-contentCardHeader__content__header", visual: titleVisual }, title),
|
|
96572
96573
|
(subtitles.length > 0 || subtitleTag) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__content__subtitles" },
|
|
96573
96574
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { size: "xSmall", theme: "u-mb--0 u-mr--xxSmall", type: "secondary" }, subtitles.map(function (subtitle, i) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], { key: subtitle === null || subtitle === void 0 ? void 0 : subtitle.toString() },
|
|
96574
96575
|
i > 0 && ' | ',
|
|
@@ -97056,31 +97057,35 @@ var useModal = function (disableCloseByOutsideClick, onHide, onShow) {
|
|
|
97056
97057
|
|
|
97057
97058
|
|
|
97058
97059
|
|
|
97060
|
+
|
|
97059
97061
|
var Pills = function (_a) {
|
|
97060
97062
|
var ariaLabel = _a.ariaLabel, _b = _a.initialPill, initialPill = _b === void 0 ? '' : _b, onChange = _a.onChange, pills = _a.pills, _c = _a.testId, testId = _c === void 0 ? 'Pills' : _c, theme = _a.theme;
|
|
97061
97063
|
var _d = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(''), activePill = _d[0], setActivePill = _d[1];
|
|
97062
|
-
var updateActivePill = function (pill) {
|
|
97063
|
-
if (onChange)
|
|
97064
|
+
var updateActivePill = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (pill) {
|
|
97065
|
+
if (onChange) {
|
|
97064
97066
|
onChange(pill);
|
|
97067
|
+
}
|
|
97065
97068
|
setActivePill(pill);
|
|
97066
|
-
};
|
|
97067
|
-
var handleOnClick = function (pill, isDisabled) { return function (event) {
|
|
97069
|
+
}, [onChange]);
|
|
97070
|
+
var handleOnClick = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (pill, isDisabled) { return function (event) {
|
|
97068
97071
|
if (isDisabled) {
|
|
97069
97072
|
event.preventDefault();
|
|
97070
97073
|
}
|
|
97071
97074
|
updateActivePill(pill);
|
|
97072
|
-
}; };
|
|
97075
|
+
}; }, [updateActivePill]);
|
|
97073
97076
|
Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
|
|
97074
97077
|
setActivePill(initialPill);
|
|
97075
97078
|
}, [initialPill]);
|
|
97076
97079
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("ul", { "aria-label": ariaLabel, className: classBinder_cx('c-pills__list', theme), "data-testid": testId }, pills.map(function (_a) {
|
|
97077
97080
|
var _b;
|
|
97078
|
-
var disabledTooltip = _a.disabledTooltip, _c = _a.
|
|
97081
|
+
var disabledTooltip = _a.disabledTooltip, _c = _a.hasNotification, hasNotification = _c === void 0 ? false : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, label = _a.label, notificationCount = _a.notificationCount, notificationMaxCount = _a.notificationMaxCount, value = _a.value;
|
|
97079
97082
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("li", { key: "pills-" + cuid_default()() + "-" + value, className: classBinder_cx('c-pills__listItem', (_b = {},
|
|
97080
|
-
_b[
|
|
97081
|
-
_b[
|
|
97083
|
+
_b['c-pills__listItem--disabled'] = isDisabled,
|
|
97084
|
+
_b['c-pills__listItem--selected'] = activePill === value,
|
|
97082
97085
|
_b)) },
|
|
97083
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { disabledTooltip: disabledTooltip, isDisabled: isDisabled, theme: classBinder_cx('c-pills__listButton'), type: "transparent", onClick: handleOnClick(value, isDisabled) },
|
|
97086
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { disabledTooltip: disabledTooltip, isDisabled: isDisabled, theme: classBinder_cx('c-pills__listButton'), type: "transparent", onClick: handleOnClick(value, isDisabled) },
|
|
97087
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Badge, { count: notificationCount, hasNotification: hasNotification, maxCount: notificationMaxCount, theme: "u-mr--xxSmall" }),
|
|
97088
|
+
label)));
|
|
97084
97089
|
})));
|
|
97085
97090
|
};
|
|
97086
97091
|
|
|
@@ -97809,7 +97814,7 @@ var UserAuth = function (_a) {
|
|
|
97809
97814
|
setTimeLeft((timer === null || timer === void 0 ? void 0 : timer.time) ? timer.time : 0);
|
|
97810
97815
|
setMobileKeyValue('');
|
|
97811
97816
|
}
|
|
97812
|
-
}, [resetTimer, timer]);
|
|
97817
|
+
}, [resetTimer, timer === null || timer === void 0 ? void 0 : timer.time]);
|
|
97813
97818
|
Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
|
|
97814
97819
|
if (mobileKey === null || mobileKey === void 0 ? void 0 : mobileKey.error) {
|
|
97815
97820
|
setMobileKeyValue('');
|
|
@@ -98638,18 +98643,15 @@ var Autocomplete2 = function (_a) {
|
|
|
98638
98643
|
(_b = document.getElementById(name + "_list-createNew")) === null || _b === void 0 ? void 0 : _b.focus();
|
|
98639
98644
|
};
|
|
98640
98645
|
var focusFulltextInput = function () {
|
|
98641
|
-
|
|
98642
|
-
|
|
98643
|
-
|
|
98644
|
-
|
|
98645
|
-
|
|
98646
|
-
|
|
98647
|
-
|
|
98648
|
-
|
|
98649
|
-
|
|
98650
|
-
(_b = document.getElementById(name + "_input")) === null || _b === void 0 ? void 0 : _b.focus();
|
|
98651
|
-
}
|
|
98652
|
-
}, 100);
|
|
98646
|
+
var _a;
|
|
98647
|
+
try {
|
|
98648
|
+
var inputElement = document.getElementById(name + "_input");
|
|
98649
|
+
inputElement === null || inputElement === void 0 ? void 0 : inputElement.select();
|
|
98650
|
+
}
|
|
98651
|
+
catch (err) {
|
|
98652
|
+
// set focus as failback
|
|
98653
|
+
(_a = document.getElementById(name + "_input")) === null || _a === void 0 ? void 0 : _a.focus();
|
|
98654
|
+
}
|
|
98653
98655
|
};
|
|
98654
98656
|
var resetFulltext = function (clearFulltext) {
|
|
98655
98657
|
if (clearFulltext === void 0) { clearFulltext = true; }
|
|
@@ -98699,7 +98701,7 @@ var Autocomplete2 = function (_a) {
|
|
|
98699
98701
|
setTypingMode(function (prev) { return !prev; });
|
|
98700
98702
|
};
|
|
98701
98703
|
var toggleDropdown = function () {
|
|
98702
|
-
setTypingMode(
|
|
98704
|
+
setTypingMode(function (prev) { return !prev; });
|
|
98703
98705
|
setIsDropdownVisible(function (prev) { return !prev; });
|
|
98704
98706
|
};
|
|
98705
98707
|
var handleFocus = function (event) {
|
|
@@ -113282,15 +113284,11 @@ var Stepper = function (_a) {
|
|
|
113282
113284
|
// CONCATENATED MODULE: ./src/components/Navigation/Tabs/_elements_/TabListItem.tsx
|
|
113283
113285
|
|
|
113284
113286
|
|
|
113287
|
+
|
|
113285
113288
|
var TabListItem = function (_a) {
|
|
113286
|
-
var _b;
|
|
113287
|
-
var _c = _a.countLimit, countLimit = _c === void 0 ? 99 : _c, hasNotification = _a.hasNotification, notificationCount = _a.notificationCount, value = _a.value;
|
|
113289
|
+
var _b = _a.countLimit, countLimit = _b === void 0 ? 99 : _b, hasNotification = _a.hasNotification, notificationCount = _a.notificationCount, notificationMaxCount = _a.notificationMaxCount, value = _a.value;
|
|
113288
113290
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Flex, { alignItems: hasNotification ? 'center' : 'baseline' },
|
|
113289
|
-
|
|
113290
|
-
? notificationCount > countLimit
|
|
113291
|
-
? countLimit + "+"
|
|
113292
|
-
: notificationCount
|
|
113293
|
-
: null)),
|
|
113291
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Badge, { count: notificationCount, hasNotification: hasNotification, maxCount: notificationMaxCount || countLimit, theme: "u-mr--xxSmall" }),
|
|
113294
113292
|
external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-tabs__text') }, value)));
|
|
113295
113293
|
};
|
|
113296
113294
|
|