@mmb-digital/ds-lilly 0.6.4 → 0.7.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-lilly.js CHANGED
@@ -80309,7 +80309,6 @@ __webpack_require__.d(__webpack_exports__, "formatMonthDate", function() { retur
80309
80309
  __webpack_require__.d(__webpack_exports__, "ucfirst", function() { return /* reexport */ ucfirst; });
80310
80310
  __webpack_require__.d(__webpack_exports__, "MOBILE_PANEL_WIDTH", function() { return /* reexport */ MOBILE_PANEL_WIDTH; });
80311
80311
  __webpack_require__.d(__webpack_exports__, "BREAKPOINTS_VALUES", function() { return /* reexport */ BREAKPOINTS_VALUES; });
80312
- __webpack_require__.d(__webpack_exports__, "CARD_WIDTH_BREAKPOINT", function() { return /* reexport */ CARD_WIDTH_BREAKPOINT; });
80313
80312
  __webpack_require__.d(__webpack_exports__, "CardContext", function() { return /* reexport */ contexts_CardContext; });
80314
80313
  __webpack_require__.d(__webpack_exports__, "FormGroupContext", function() { return /* reexport */ contexts_FormGroupContext; });
80315
80314
  __webpack_require__.d(__webpack_exports__, "ModalContext", function() { return /* reexport */ contexts_ModalContext; });
@@ -84387,10 +84386,6 @@ var BREAKPOINTS_VALUES = {
84387
84386
  xl: 1200,
84388
84387
  xxl: 1600
84389
84388
  };
84390
- var CARD_WIDTH_BREAKPOINT = {
84391
- MOBILE: 320,
84392
- TABLET: 575
84393
- };
84394
84389
 
84395
84390
  // CONCATENATED MODULE: ./src/constants/index.ts
84396
84391
 
@@ -96186,7 +96181,7 @@ var CollapseHeader = function (_a) {
96186
96181
  var handleOnToggle = function (event) { return !hasCustomTrigger && onToggle(event); };
96187
96182
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-controls": isCollapsible && !hasCustomTrigger ? identification + "_content" : undefined, "aria-expanded": isCollapsible && !hasCustomTrigger ? isOpened : undefined, className: classBinder_cx('c-card__header', {
96188
96183
  'c-card__collapseTrigger': !hasCustomTrigger && isCollapsible
96189
- }), role: isCollapsible && !hasCustomTrigger ? 'button' : undefined, onClick: handleOnToggle },
96184
+ }), onClick: handleOnToggle },
96190
96185
  iconName && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-card__icon', {
96191
96186
  'c-card__icon--alignTop': isIconAlignTop,
96192
96187
  'c-card__icon--right': isIconRight
@@ -96207,7 +96202,7 @@ var CollapseHeader = function (_a) {
96207
96202
 
96208
96203
  var Card = function (_a) {
96209
96204
  var _b;
96210
- var allowEventPropagation = _a.allowEventPropagation, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor, children = _a.children, disabledTooltip = _a.disabledTooltip, disabledTooltipType = _a.disabledTooltipType, _c = _a.hasCustomTrigger, hasCustomTrigger = _c === void 0 ? false : _c, collapseHeader = _a.header, iconBackgroundColor = _a.iconBackgroundColor, iconBadge = _a.iconBadge, _d = _a.iconBadgePosition, iconBadgePosition = _d === void 0 ? 'bottomRight' : _d, iconName = _a.iconName, iconSize = _a.iconSize, isCollapsible = _a.isCollapsible, isDisabled = _a.isDisabled, isIconAlignTop = _a.isIconAlignTop, isIconRight = _a.isIconRight, isInteractive = _a.isInteractive, _e = _a.isOpen, isOpen = _e === void 0 ? false : _e, isSelected = _a.isSelected, onClick = _a.onClick, onRef = _a.onRef, onToggle = _a.onToggle, shadowSize = _a.shadowSize, size = _a.size, testId = _a.testId, theme = _a.theme, _f = _a.withoutOpener, withoutOpener = _f === void 0 ? false : _f, _g = _a.withoutRole, withoutRole = _g === void 0 ? false : _g;
96205
+ var allowEventPropagation = _a.allowEventPropagation, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor, children = _a.children, disabledTooltip = _a.disabledTooltip, disabledTooltipType = _a.disabledTooltipType, _c = _a.hasCustomTrigger, hasCustomTrigger = _c === void 0 ? false : _c, collapseHeader = _a.header, iconBackgroundColor = _a.iconBackgroundColor, iconBadge = _a.iconBadge, _d = _a.iconBadgePosition, iconBadgePosition = _d === void 0 ? 'bottomRight' : _d, iconName = _a.iconName, iconSize = _a.iconSize, isCollapsible = _a.isCollapsible, isDisabled = _a.isDisabled, isIconAlignTop = _a.isIconAlignTop, isIconRight = _a.isIconRight, isInteractive = _a.isInteractive, _e = _a.isOpen, isOpen = _e === void 0 ? false : _e, isSelected = _a.isSelected, onClick = _a.onClick, onToggle = _a.onToggle, shadowSize = _a.shadowSize, size = _a.size, testId = _a.testId, theme = _a.theme, _f = _a.withoutOpener, withoutOpener = _f === void 0 ? false : _f, _g = _a.withoutRole, withoutRole = _g === void 0 ? false : _g;
96211
96206
  var identification = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () { return "card_" + cuid_default()(); }, []);
96212
96207
  var _h = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(isOpen), isOpened = _h[0], setIsOpened = _h[1];
96213
96208
  var cardRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])(null);
@@ -96250,8 +96245,7 @@ var Card = function (_a) {
96250
96245
  };
96251
96246
  var setRef = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (ref) {
96252
96247
  cardRef.current = ref;
96253
- onRef && onRef(ref);
96254
- }, [onRef]);
96248
+ }, []);
96255
96249
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(contexts_CardContext.Provider, { value: cardContext }, withDisabledTooltip({
96256
96250
  isDisabled: isDisabled,
96257
96251
  disabledTooltip: disabledTooltip,
@@ -96586,45 +96580,38 @@ var Tag = function (_a) {
96586
96580
 
96587
96581
 
96588
96582
 
96589
-
96590
96583
  var ContentCard = function (_a) {
96591
- var amount = _a.amount, amountSubtitle = _a.amountSubtitle, _b = _a.amountSubtitleType, amountSubtitleType = _b === void 0 ? 'secondary' : _b, _c = _a.buttons, buttons = _c === void 0 ? [] : _c, currencyCode = _a.currencyCode, customIcon = _a.customIcon, children = _a.children, isCollapsible = _a.isCollapsible, isCompact = _a.isCompact, isInteractive = _a.isInteractive, _d = _a.isOpen, isOpen = _d === void 0 ? false : _d, iconBackgroundColor = _a.iconBackgroundColor, _e = _a.iconBadgePosition, iconBadgePosition = _e === void 0 ? 'bottomRight' : _e, iconName = _a.iconName, _f = _a.parameters, parameters = _f === void 0 ? [] : _f, size = _a.size, _g = _a.subtitles, subtitles = _g === void 0 ? [] : _g, subtitleTagBackgroundColor = _a.subtitleTagBackgroundColor, subtitleTagIcon = _a.subtitleTagIcon, subtitleTagImageUrl = _a.subtitleTagImageUrl, subtitleTagText = _a.subtitleTagText, theme = _a.theme, title = _a.title, _h = _a.titleSize, titleSize = _h === void 0 ? 'h2' : _h, _j = _a.titleVisual, titleVisual = _j === void 0 ? 'h6' : _j, _k = _a.withoutOpener, withoutOpener = _k === void 0 ? false : _k, onToggle = _a.onToggle;
96592
- var ref = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])(null);
96584
+ var amount = _a.amount, amountSubtitle = _a.amountSubtitle, _b = _a.amountSubtitleType, amountSubtitleType = _b === void 0 ? 'secondary' : _b, _c = _a.buttons, buttons = _c === void 0 ? [] : _c, currencyCode = _a.currencyCode, customIcon = _a.customIcon, children = _a.children, isCollapsible = _a.isCollapsible, isCompact = _a.isCompact, isInteractive = _a.isInteractive, _d = _a.isOpen, isOpen = _d === void 0 ? false : _d, iconBackgroundColor = _a.iconBackgroundColor, _e = _a.iconBadgePosition, iconBadgePosition = _e === void 0 ? 'bottomRight' : _e, iconName = _a.iconName, iconSize = _a.iconSize, _f = _a.parameters, parameters = _f === void 0 ? [] : _f, size = _a.size, _g = _a.subtitles, subtitles = _g === void 0 ? [] : _g, subtitleTagBackgroundColor = _a.subtitleTagBackgroundColor, subtitleTagIcon = _a.subtitleTagIcon, subtitleTagImageUrl = _a.subtitleTagImageUrl, subtitleTagText = _a.subtitleTagText, theme = _a.theme, title = _a.title, _h = _a.titleSize, titleSize = _h === void 0 ? 'h2' : _h, _j = _a.titleVisual, titleVisual = _j === void 0 ? 'h6' : _j, _k = _a.withoutOpener, withoutOpener = _k === void 0 ? false : _k, onToggle = _a.onToggle;
96593
96585
  var _l = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(isOpen), isOpened = _l[0], setIsOpened = _l[1];
96594
96586
  var handleOnToggle = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (state, event) {
96595
96587
  isCollapsible && onToggle && onToggle(state, event);
96596
96588
  setIsOpened(state);
96597
96589
  }, [isCollapsible, onToggle]);
96598
96590
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return setIsOpened(isOpen); }, [isOpen]);
96599
- var width = useContainerDimensions(ref).width;
96600
- var isMobileDeviceView = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () { return width <= CARD_WIDTH_BREAKPOINT.TABLET; }, [width]);
96601
- var setRef = function (cardRef) {
96602
- ref.current = cardRef;
96603
- };
96604
96591
  var hasSubtitleTag = (subtitleTagIcon || subtitleTagImageUrl) && subtitleTagText;
96605
96592
  var badgeIcon = hasSubtitleTag
96606
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" })))
96607
96594
  : undefined;
96608
- 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-contentCard__header" },
96609
- customIcon && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('c-contentCard__header__customIcon', "c-contentCard__header__customIcon" + ucfirst(iconBadgePosition)) },
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" },
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)) },
96610
96597
  customIcon,
96611
- hasSubtitleTag && isMobileDeviceView && badgeIcon)),
96612
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCard__header__content" },
96613
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Title, { size: titleSize, theme: "c-contentCard__header__title", visual: titleVisual }, title),
96614
- !isOpened && (subtitles.length > 0 || hasSubtitleTag) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCard__header__subtitle" },
96615
- subtitles.length > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { component: "div", size: "xSmall", theme: "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() },
96598
+ isOpened && hasSubtitleTag && badgeIcon)),
96599
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__content" },
96600
+ 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),
96601
+ !isOpened && (subtitles.length > 0 || hasSubtitleTag) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__content__subtitles" },
96602
+ 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() },
96616
96603
  i > 0 && ' | ',
96617
- subtitle)); }))),
96618
- hasSubtitleTag && !isMobileDeviceView && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Tag, { iconBackground: subtitleTagBackgroundColor, iconName: subtitleTagIcon, imageUrl: subtitleTagImageUrl }, subtitleTagText))))),
96619
- !isOpened && !isMobileDeviceView && parameters.length > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCard__header__params" }, parameters.map(function (param) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { key: param === null || param === void 0 ? void 0 : param.toString(), component: "div", size: "xSmall", theme: "c-contentCard__header__param", type: "secondary" }, param)); }))),
96620
- (amount !== undefined || amountSubtitle) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCard__header__amount" },
96621
- amount !== undefined && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(AmountWithUnit, { isBold: true, amount: amount, theme: "u-textRight", unitAfter: currencyCode })),
96622
- amountSubtitle && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { isTextRight: true, component: "div", size: "xSmall", type: amountSubtitleType }, amountSubtitle)))),
96623
- buttons.length > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCard__header__buttons" }, buttons.map(function (button) {
96604
+ subtitle)); })),
96605
+ hasSubtitleTag && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Tag, { iconBackground: subtitleTagBackgroundColor, iconName: subtitleTagIcon, imageUrl: subtitleTagImageUrl }, subtitleTagText))))),
96606
+ !isOpened && parameters.length > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__params" }, parameters.map(function (param) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { key: param === null || param === void 0 ? void 0 : param.toString(), size: "xSmall", theme: "c-contentCardHeader__param", type: "secondary" }, param)); }))),
96607
+ (amount !== undefined || amountSubtitle) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__amount" },
96608
+ amount !== undefined && external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(AmountWithUnit, { isBold: true, amount: amount, unitAfter: currencyCode }),
96609
+ amountSubtitle && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { isTextRight: true, size: "xSmall", type: amountSubtitleType }, amountSubtitle)))),
96610
+ buttons.length > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-contentCardHeader__buttons" }, buttons.map(function (button) {
96624
96611
  return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["cloneElement"])(button, {
96625
- theme: classBinder_cx(button.props.theme, 'c-contentCard__header__button')
96612
+ theme: classBinder_cx(button.props.theme, 'c-contentCardHeader__button')
96626
96613
  });
96627
- })))), iconBackgroundColor: iconBackgroundColor, iconBadge: isMobileDeviceView && hasSubtitleTag ? badgeIcon : undefined, iconBadgePosition: iconBadgePosition, iconName: iconName, iconSize: "xLarge", 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, onRef: setRef, onToggle: handleOnToggle }, children));
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));
96628
96615
  };
96629
96616
 
96630
96617
  // CONCATENATED MODULE: ./src/components/Components/ContentCard/ContentCardGroup.tsx
@@ -96660,7 +96647,7 @@ var ContentCardGroup_spreadArray = (undefined && undefined.__spreadArray) || fun
96660
96647
 
96661
96648
 
96662
96649
  var ContentCardGroup = function (_a) {
96663
- var accordion = _a.accordion, items = _a.items, theme = _a.theme, withoutShadow = _a.withoutShadow;
96650
+ var accordion = _a.accordion, items = _a.items, theme = _a.theme;
96664
96651
  var _b = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])([]), opened = _b[0], setOpened = _b[1];
96665
96652
  // a copy of opened cards array to enable open/close animation
96666
96653
  var _c = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])([]), openedCards = _c[0], setOpenedCards = _c[1];
@@ -96693,7 +96680,7 @@ var ContentCardGroup = function (_a) {
96693
96680
  return acc;
96694
96681
  }, [[]]);
96695
96682
  }, [opened, items]);
96696
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx({ 'c-contentCards': withoutShadow }, theme) }, openedCardsGroups.map(function (group) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Card, { key: group.join(''), shadowSize: withoutShadow ? 'no' : 'small', size: "zero", theme: "c-contentCard--group" }, group.map(function (itemIndex) {
96683
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx(theme) }, openedCardsGroups.map(function (group) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Card, { key: group.join(''), shadowSize: "small", theme: "c-contentCardGroup u-p--0" }, group.map(function (itemIndex) {
96697
96684
  var _a = items[itemIndex], key = _a.key, props = ContentCardGroup_rest(_a, ["key"]);
96698
96685
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ContentCard, ContentCardGroup_assign({ key: key, isCompact: true, isOpen: openedCards.includes(itemIndex) }, props, { onToggle: onToggle(itemIndex) })));
96699
96686
  }))); })));
@@ -98482,7 +98469,7 @@ var Autocomplete2_spreadArray = (undefined && undefined.__spreadArray) || functi
98482
98469
 
98483
98470
 
98484
98471
  var Autocomplete2 = function (_a) {
98485
- var _b = _a.asyncDelayMilliseconds, asyncDelayMilliseconds = _b === void 0 ? 200 : _b, _c = _a.canAlwaysCreateNewItem, canAlwaysCreateNewItem = _c === void 0 ? false : _c, disabledTooltip = _a.disabledTooltip, _d = _a.displayDetails, displayDetails = _d === void 0 ? false : _d, dropdownTheme = _a.dropdownTheme, emptyValueLabel = _a.emptyValueLabel, error = _a.error, _e = _a.filterMinimumLength, filterMinimumLength = _e === void 0 ? 2 : _e, _f = _a.hasFullWidthOptions, hasFullWidthOptions = _f === void 0 ? true : _f, help = _a.help, isDisabled = _a.isDisabled, isLazyLoaded = _a.isLazyLoaded, isLoading = _a.isLoading, _g = _a.items, inputItems = _g === void 0 ? [] : _g, label = _a.label, labelTooltip = _a.labelTooltip, loadItems = _a.loadItems, loadMoreItems = _a.loadMoreItems, name = _a.name, messages = _a.messages, _h = _a.newItemMinimumLength, newItemMinimumLength = _h === void 0 ? 2 : _h, onBlur = _a.onBlur, onChange = _a.onChange, onCreateNewItem = _a.onCreateNewItem, onFocus = _a.onFocus, onItemFocus = _a.onItemFocus, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, value = _a.value;
98472
+ var _b = _a.asyncDelayMilliseconds, asyncDelayMilliseconds = _b === void 0 ? 200 : _b, _c = _a.canAlwaysCreateNewItem, canAlwaysCreateNewItem = _c === void 0 ? false : _c, disabledTooltip = _a.disabledTooltip, _d = _a.displayDetails, displayDetails = _d === void 0 ? false : _d, dropdownTheme = _a.dropdownTheme, emptyValueLabel = _a.emptyValueLabel, error = _a.error, _e = _a.filterMinimumLength, filterMinimumLength = _e === void 0 ? 2 : _e, _f = _a.hasFullWidthOptions, hasFullWidthOptions = _f === void 0 ? true : _f, help = _a.help, isDisabled = _a.isDisabled, isLazyLoaded = _a.isLazyLoaded, isLoading = _a.isLoading, _g = _a.items, inputItems = _g === void 0 ? [] : _g, label = _a.label, labelTooltip = _a.labelTooltip, loadItems = _a.loadItems, loadMoreItems = _a.loadMoreItems, name = _a.name, messages = _a.messages, _h = _a.newItemMinimumLength, newItemMinimumLength = _h === void 0 ? 2 : _h, onBlur = _a.onBlur, onChange = _a.onChange, onCreateNewItem = _a.onCreateNewItem, onFocus = _a.onFocus, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, value = _a.value;
98486
98473
  var _j = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isDropdownVisible = _j[0], setIsDropdownVisible = _j[1];
98487
98474
  var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(null), buttonValue = _k[0], setButtonValue = _k[1];
98488
98475
  var _l = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), typingMode = _l[0], setTypingMode = _l[1];
@@ -98664,17 +98651,15 @@ var Autocomplete2 = function (_a) {
98664
98651
  (_b = document.getElementById(name + "_list-createNew")) === null || _b === void 0 ? void 0 : _b.focus();
98665
98652
  };
98666
98653
  var focusFulltextInput = function () {
98667
- setTimeout(function () {
98668
- var _a;
98669
- try {
98670
- var inputElement = document.getElementById(name + "_input");
98671
- inputElement === null || inputElement === void 0 ? void 0 : inputElement.select();
98672
- }
98673
- catch (err) {
98674
- // set focus as failback
98675
- (_a = document.getElementById(name + "_input")) === null || _a === void 0 ? void 0 : _a.focus();
98676
- }
98677
- });
98654
+ var _a;
98655
+ try {
98656
+ var inputElement = document.getElementById(name + "_input");
98657
+ inputElement === null || inputElement === void 0 ? void 0 : inputElement.select();
98658
+ }
98659
+ catch (err) {
98660
+ // set focus as failback
98661
+ (_a = document.getElementById(name + "_input")) === null || _a === void 0 ? void 0 : _a.focus();
98662
+ }
98678
98663
  };
98679
98664
  var resetFulltext = function (clearFulltext) {
98680
98665
  if (clearFulltext === void 0) { clearFulltext = true; }
@@ -98775,12 +98760,6 @@ var Autocomplete2 = function (_a) {
98775
98760
  var position = getItemIndexPosition({ item: item, category: category });
98776
98761
  setCurrentItemPosition(position);
98777
98762
  scrollToItem(item, category);
98778
- if (onItemFocus && position !== currentItemPosition) {
98779
- var focusedItem_1 = isCategorised(items)
98780
- ? items[category].items[item]
98781
- : items[item];
98782
- onItemFocus(focusedItem_1);
98783
- }
98784
98763
  };
98785
98764
  var handleCreateNewOption = function () {
98786
98765
  setButtonValue({ label: fulltextValue, value: fulltextValue });
@@ -99023,14 +99002,10 @@ var Autocomplete2 = function (_a) {
99023
99002
  }); };
99024
99003
  var handleDropdownVisibilityChange = function (isVisible) {
99025
99004
  if (!isVisible) {
99026
- var trimmedFulltextValue = fulltextValue.trim();
99027
99005
  setIsDropdownVisible(isVisible);
99028
99006
  setTypingMode(isVisible);
99029
- if (!trimmedFulltextValue) {
99030
- propagateChange();
99031
- }
99032
99007
  resetFulltext();
99033
- handleBlur(trimmedFulltextValue ? buttonValue : undefined);
99008
+ handleBlur(buttonValue);
99034
99009
  }
99035
99010
  };
99036
99011
  var renderDropdownContent = function () {
@@ -107300,7 +107275,7 @@ var Select2_spreadArray = (undefined && undefined.__spreadArray) || function (to
107300
107275
 
107301
107276
  var Select2 = function (_a) {
107302
107277
  var _b;
107303
- var disabledTooltip = _a.disabledTooltip, _c = _a.displayDetails, displayDetails = _c === void 0 ? false : _c, dropdownTheme = _a.dropdownTheme, emptyValueLabel = _a.emptyValueLabel, error = _a.error, _d = _a.hasFullWidthOptions, hasFullWidthOptions = _d === void 0 ? true : _d, help = _a.help, isDisabled = _a.isDisabled, items = _a.items, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onItemFocus = _a.onItemFocus, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, value = _a.value;
107278
+ var disabledTooltip = _a.disabledTooltip, _c = _a.displayDetails, displayDetails = _c === void 0 ? false : _c, dropdownTheme = _a.dropdownTheme, emptyValueLabel = _a.emptyValueLabel, error = _a.error, _d = _a.hasFullWidthOptions, hasFullWidthOptions = _d === void 0 ? true : _d, help = _a.help, isDisabled = _a.isDisabled, items = _a.items, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, value = _a.value;
107304
107279
  var _e = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isDropdownVisible = _e[0], setIsDropdownVisible = _e[1];
107305
107280
  var _f = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(null), buttonValue = _f[0], setButtonValue = _f[1];
107306
107281
  var _g = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(-1), currentItemPosition = _g[0], setCurrentItemPosition = _g[1];
@@ -107370,19 +107345,12 @@ var Select2 = function (_a) {
107370
107345
  var itemIndexPosition = getItemIndexPosition(itemIndex);
107371
107346
  setCurrentItemPosition(itemIndexPosition);
107372
107347
  }, [isDropdownVisible, getItemIndexByValue, value, getItemIndexPosition]);
107373
- var scrollToItem = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (item, category) {
107374
- var _a, _b, _c, _d, _e;
107348
+ var scrollToItem = function (item, category) {
107349
+ var _a;
107375
107350
  if (category === void 0) { category = -1; }
107376
107351
  var itemElementId = isCategorised ? name + "_option-" + category + "-" + item : name + "_option-" + item;
107377
- var dropdownId = name + "_dropdown";
107378
- var dropdownHalfHeight = (((_a = document.getElementById(dropdownId)) === null || _a === void 0 ? void 0 : _a.clientHeight) || 0) / 2;
107379
- var itemHalfHeight = (((_b = document.getElementById(itemElementId)) === null || _b === void 0 ? void 0 : _b.clientHeight) || 0) / 2;
107380
- var itemOffset = ((_c = document.getElementById(itemElementId)) === null || _c === void 0 ? void 0 : _c.offsetTop) || 0;
107381
- if (itemOffset > dropdownHalfHeight) {
107382
- (_d = document
107383
- .getElementById(dropdownId)) === null || _d === void 0 ? void 0 : _d.scrollTo(0, (((_e = document.getElementById(itemElementId)) === null || _e === void 0 ? void 0 : _e.offsetTop) || 0) - dropdownHalfHeight + itemHalfHeight);
107384
- }
107385
- }, [isCategorised, name]);
107352
+ (_a = document.getElementById(itemElementId)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'nearest' });
107353
+ };
107386
107354
  var handleComboBoxClick = function () {
107387
107355
  if (!isDropdownVisible) {
107388
107356
  setTimeout(function () {
@@ -107451,12 +107419,6 @@ var Select2 = function (_a) {
107451
107419
  var position = getItemIndexPosition({ item: item, category: category });
107452
107420
  setCurrentItemPosition(position);
107453
107421
  scrollToItem(item, category);
107454
- if (onItemFocus && position !== currentItemPosition) {
107455
- var focusedItem_1 = isCategorised
107456
- ? items[category].items[item]
107457
- : items[item];
107458
- onItemFocus(focusedItem_1);
107459
- }
107460
107422
  };
107461
107423
  var handleOptionKeyPress = function (event) {
107462
107424
  var key = event.key;
@@ -107553,7 +107515,7 @@ var Select2 = function (_a) {
107553
107515
  };
107554
107516
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Select2_assign({ theme: classBinder_cx({ 'f-group2--open': isDropdownVisible }, theme) }, fromGroupProps),
107555
107517
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(contexts_Select2Context.Provider, { value: select2context },
107556
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Dropdown, { dropdownId: name + "_dropdown", forceVisibility: isDropdownVisible, hasSameWidthAsTrigger: hasFullWidthOptions, placement: "bottom-start", theme: dropdownTheme, trigger: null, triggerComponent: external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlWrap", "data-testid": testId, role: "combobox" },
107518
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Dropdown, { forceVisibility: isDropdownVisible, hasSameWidthAsTrigger: hasFullWidthOptions, placement: "bottom-start", theme: dropdownTheme, trigger: null, triggerComponent: external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlWrap", "data-testid": testId, role: "combobox" },
107557
107519
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("button", { "aria-expanded": isDropdownVisible, "aria-haspopup": "listbox", "aria-invalid": !!error, "aria-labelledby": name + "_label " + name, className: classBinder_cx('f-control2 f-control2--select', { 'f-control2--large': displayDetails }), disabled: isDisabled, id: name + "_button", name: name, type: "button", onClick: handleComboBoxClick, onFocus: onFocus, onKeyDown: handleButtonKeyPress },
107558
107520
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx("f-control2__" + (buttonValue ? 'value' : 'placeholder')) }, buttonValue ? buttonValue : placeholder),
107559
107521
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "arrowDown", size: "small", theme: "f-control2__selectIcon" }))), onVisibleChange: function (state) { return setIsDropdownVisible(state); } }, isCategorised ? external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Select2CategorisedOptions, null) : external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Select2Options, null)))));
@@ -111445,7 +111407,7 @@ var AreaChart = function (_a) {
111445
111407
 
111446
111408
 
111447
111409
  var numberWithSpaces = function (num) {
111448
- return Intl.NumberFormat('cs-CZ', { style: 'decimal', maximumFractionDigits: 2 }).format(num);
111410
+ return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
111449
111411
  };
111450
111412
  var ChartLegendRow = function (_a) {
111451
111413
  var _b;