@mmb-digital/ds-lilly 0.0.1-alpha.354 → 0.0.1-alpha.355

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.
Files changed (2) hide show
  1. package/dist/ds-lilly.js +8 -6
  2. package/package.json +1 -1
package/dist/ds-lilly.js CHANGED
@@ -96213,6 +96213,8 @@ var CompactButtons = function (_a) {
96213
96213
  var container = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])(null);
96214
96214
  var refs = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useRef"])([]);
96215
96215
  var width = useContainerDimensions(container).width;
96216
+ var _c = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isDropdownVisible = _c[0], setIsDropdownVisible = _c[1];
96217
+ var toggleDropdownVisibility = function () { return setIsDropdownVisible(function (prev) { return !prev; }); };
96216
96218
  var ends = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useMemo"])(function () {
96217
96219
  var offset = 0;
96218
96220
  return refs.current.map(function (_, i, arr) {
@@ -96240,9 +96242,9 @@ var CompactButtons = function (_a) {
96240
96242
  label),
96241
96243
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("i", { className: "c-compact-buttons__button_separator" })));
96242
96244
  }),
96243
- !isButtonVisible(buttons.length - 1) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Dropdown, { placement: "bottom-end", triggerComponent: external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { "aria-hidden": true, ariaLabel: "other", color: background, isSmall: isSmall, theme: "c-compact-buttons__button", type: type },
96245
+ !isButtonVisible(buttons.length - 1) && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Dropdown, { forceVisibility: isDropdownVisible, placement: "bottom-end", trigger: null, triggerComponent: external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { "aria-hidden": true, ariaLabel: "other", color: background, isSmall: isSmall, theme: "c-compact-buttons__button", type: type, onClick: toggleDropdownVisibility },
96244
96246
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "other" }),
96245
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "c-compact-buttons__dropdowm__opener" })) },
96247
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "c-compact-buttons__dropdowm__opener" })), onVisibleChange: function (state) { return setIsDropdownVisible(state); } },
96246
96248
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownMenu, { ariaHidden: true }, buttons.map(function (_a, i) {
96247
96249
  var icon = _a.icon, isDisabled = _a.isDisabled, isLoading = _a.isLoading, key = _a.key, label = _a.label, onClick = _a.onClick;
96248
96250
  if (isButtonVisible(i))
@@ -96250,7 +96252,7 @@ var CompactButtons = function (_a) {
96250
96252
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownItem, { key: key, iconName: icon, isDisabled: isDisabled, theme: classBinder_cx('c-compact-buttons__dropdowm-item', {
96251
96253
  'c-compact-buttons__dropdowm-item--disabled': isDisabled || isLoading
96252
96254
  }), onClick: onClick },
96253
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isDisabled: isDisabled, isLoading: isLoading, theme: "c-compact-buttons__dropdowm-item-button", type: "border" }, label)));
96255
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isDisabled: isDisabled, isLoading: isLoading, theme: "c-compact-buttons__dropdowm-item-button", type: "border", onClick: onClick }, label)));
96254
96256
  })))))));
96255
96257
  };
96256
96258
 
@@ -102980,7 +102982,7 @@ var SelectControlAutocomplete = Object(external_root_React_commonjs2_react_commo
102980
102982
  // @ts-ignore
102981
102983
  es_filter(function (item) { return (!inputValue || showAllItems ? true : isMatch(inputValue, item)); }), es_reject(es_isNil));
102982
102984
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: ref, className: es_cx({ 'f-control-wrapper--active': isOpen }) },
102983
- selectedItem && isTextInputHidden ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, SelectControlAutocomplete_assign({ "data-value": selectedItem.value, isDisabled: disabled, theme: es_cx('f-control', { 'f-control--active': isOpen }, theme) }, getToggleButtonProps({
102985
+ selectedItem && isTextInputHidden ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, SelectControlAutocomplete_assign({ allowEventPropagation: true, "data-value": selectedItem.value, isDisabled: disabled, theme: es_cx('f-control', { 'f-control--active': isOpen }, theme) }, getToggleButtonProps({
102984
102986
  'aria-label': ariaLabel,
102985
102987
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102986
102988
  // @ts-ignore
@@ -103067,7 +103069,7 @@ var SelectControlStatic = Object(external_root_React_commonjs2_react_commonjs_re
103067
103069
  })),
103068
103070
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(SelectItem, SelectControlStatic_assign({}, item, { hasAmountDisplayed: hasAmountDisplayed })))); }));
103069
103071
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: ref, className: classBinder_cx({ 'f-control-wrapper--active': isOpen }) },
103070
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, SelectControlStatic_assign({ "aria-errormessage": context === null || context === void 0 ? void 0 : context.error, "aria-invalid": context.hasError ? true : false, "data-value": selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value, isDisabled: disabled, theme: classBinder_cx('f-control', { 'f-control--active': isOpen }, theme) }, getToggleButtonProps({ name: name, id: id, 'aria-label': ariaLabel, onClick: function () { return context.onFocus(); } })), selectedItem ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(SelectItem, SelectControlStatic_assign({}, selectedItem, { hasAmountDisplayed: hasAmountDisplayed }))) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-control__placeholder') }, placeholder))),
103072
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, SelectControlStatic_assign({ allowEventPropagation: true, "aria-errormessage": context === null || context === void 0 ? void 0 : context.error, "aria-invalid": context.hasError ? true : false, "data-value": selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value, isDisabled: disabled, theme: classBinder_cx('f-control', { 'f-control--active': isOpen }, theme) }, getToggleButtonProps({ name: name, id: id, 'aria-label': ariaLabel, onClick: function () { return context.onFocus(); } })), selectedItem ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(SelectItem, SelectControlStatic_assign({}, selectedItem, { hasAmountDisplayed: hasAmountDisplayed }))) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-control__placeholder') }, placeholder))),
103071
103073
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(SelectMenu, { getMenuProps: getMenuProps, indexedGroupedItems: indexedGroupedItems, isDisabled: !!disabled, isOpen: isOpen, isWider: !!hasWiderMenu, renderItems: renderItems })));
103072
103074
  })));
103073
103075
  });
@@ -105537,7 +105539,7 @@ var MonthInput = function (_a) {
105537
105539
  altFormat: 'F Y'
105538
105540
  })
105539
105541
  ], disableMobile: true }, settings), render: function (_, ref) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { ref: ref },
105540
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, ariaLabel: ariaLabel, isDisabled: isDisabled, type: "border" },
105542
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { allowEventPropagation: true, isSmall: true, ariaLabel: ariaLabel, isDisabled: isDisabled, type: "border" },
105541
105543
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { isLeft: true, name: "calendar", size: "small" }), shownValue === null || shownValue === void 0 ? void 0 :
105542
105544
  shownValue.toString()))); }, value: value, onChange: onDateChange }));
105543
105545
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.0.1-alpha.354",
3
+ "version": "0.0.1-alpha.355",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,