oolib 2.230.2 → 2.230.4

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.
@@ -106,22 +106,23 @@ var OptionsMulti = function (_a) {
106
106
  setSearchString('');
107
107
  };
108
108
  var createSelectedOptions = function () {
109
- return (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0 && (react_1.default.createElement("div", null,
109
+ return (showSelectAll || (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0) && (react_1.default.createElement("div", null,
110
110
  react_1.default.createElement("div", { style: {
111
111
  padding: "0 0.8rem",
112
112
  display: "flex",
113
113
  justifyContent: "space-between",
114
114
  alignItems: "center",
115
115
  } },
116
- react_1.default.createElement(__1.UI_TAG, null, "Selected"),
116
+ react_1.default.createElement(__1.UI_TAG, null, (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0 && "Selected"),
117
117
  react_1.default.createElement("div", { style: { display: "flex", gap: "0.2rem" } },
118
- showSelectAll && options.length > 0 && (react_1.default.createElement(__1.ButtonTertiaryCompact, { onClick: handleSelectAll, children: "Select all", icon: "CheckCircle" })),
119
- react_1.default.createElement(__1.ButtonTertiaryCompact, { onClick: handleClearAll, children: "Clear all", icon: "X" }))),
120
- react_1.default.createElement(List_1.List, { key: value, options: selectedOptions, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) {
121
- return handleSelect(v);
122
- }, setSearchString: setSearchString, optionsClassName: optionsClassName, setFocusSelectTagsInput: setFocusSelectTagsInput, S: S, isMulti: true, style: { padding: "0" }, disableShadow: true }),
123
- react_1.default.createElement("div", { style: { margin: "0.4rem 0rem" } },
124
- react_1.default.createElement(__1.Divider, { style: { borderBottom: "0.1rem solid ".concat(__1.colors2.grey20) } }))));
118
+ (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0 && (react_1.default.createElement(__1.ButtonTertiaryCompact, { onClick: handleClearAll, children: "Clear all", icon: "X" })),
119
+ showSelectAll && (react_1.default.createElement(__1.ButtonTertiaryCompact, { onClick: handleSelectAll, children: "Select all", icon: "CheckCircle" })))),
120
+ (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0 && (react_1.default.createElement(react_1.default.Fragment, null,
121
+ react_1.default.createElement(List_1.List, { key: value, options: selectedOptions, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) {
122
+ return handleSelect(v);
123
+ }, setSearchString: setSearchString, optionsClassName: optionsClassName, setFocusSelectTagsInput: setFocusSelectTagsInput, S: S, isMulti: true, style: { padding: "0" }, disableShadow: true }),
124
+ react_1.default.createElement("div", { style: { margin: "0.4rem 0rem" } },
125
+ react_1.default.createElement(__1.Divider, { style: { borderBottom: "0.1rem solid ".concat(__1.colors2.grey20) } }))))));
125
126
  };
126
127
  return (react_1.default.createElement(OptionsShell_1.OptionsShell, { ref: optionsRef, yOrientation: yOrientation, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, options: options, optionsAnchor: optionsAnchor, showOptions: showOptions, handleHideOptions: handleHideOptions, SelectComp: SelectComp, label: label, optionsModalLabel: optionsModalLabel, showDoneButton: true, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, relativeToRef: relativeToRef, S: S, alignDropdown: alignDropdown, matchSelectInputWidth: matchSelectInputWidth },
127
128
  react_1.default.createElement(List_1.List, { options: options, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) {
@@ -126,6 +126,7 @@ function TextInput(_a) {
126
126
  var size = S
127
127
  ? (screenWidth >= (0, mixins_1.getBreakPoint)('md') ? "S" : "M") //wat this basically means is, a defined 'small' text input will dynamically become 'medium' when on mobile, which is in sync with the pattern of the rest of our components
128
128
  : "M";
129
+ var ClearBtnComp = (clearBtn === null || clearBtn === void 0 ? void 0 : clearBtn.variant) === "tertiary" ? Buttons_1.ButtonTertiaryCompact : Buttons_1.ButtonSecondaryCompact;
129
130
  var handleValidate = function (e, onBlur) { return __awaiter(_this, void 0, void 0, function () {
130
131
  var value, res, validationPlugin, pluginResponse;
131
132
  return __generator(this, function (_a) {
@@ -205,7 +206,7 @@ function TextInput(_a) {
205
206
  react_1.default.createElement(LoadersAndProgress_1.LoaderCircle, { S: true }))),
206
207
  (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type) === "success" && (react_1.default.createElement("div", null,
207
208
  react_1.default.createElement(BadgeVetted, { size: 26 }))),
208
- (clearBtn && clearBtnEnabled) && (react_1.default.createElement(Buttons_1.ButtonSecondaryCompact, { onClick: function () { return onChange(id, ""); }, value: (clearBtn === null || clearBtn === void 0 ? void 0 : clearBtn.text) || "Clear", disabled: !clearBtnEnabled, style: { marginRight: size === "S" ? '-0.4rem' : '-0.2rem' } /** so that it stays ahead of the before element inside InputContainerStyled */ })),
209
+ (clearBtn && clearBtnEnabled) && (react_1.default.createElement(ClearBtnComp, { onClick: function () { return onChange(id, ""); }, value: (clearBtn === null || clearBtn === void 0 ? void 0 : clearBtn.text) || "Clear", disabled: !clearBtnEnabled, style: { marginRight: size === "S" ? '-0.4rem' : '-0.2rem' } /** so that it stays ahead of the before element inside InputContainerStyled */ })),
209
210
  actionBtn && (react_1.default.createElement(Buttons_1.ButtonPrimaryCompact, { value: (actionBtn === null || actionBtn === void 0 ? void 0 : actionBtn.text) || "Action", onClick: actionBtnEnabaled && actionBtn.onClick, disabled: !actionBtnEnabaled, style: { marginRight: size === "S" ? '-0.4rem' : '-0.2rem' } /** so that it stays ahead of the before element inside InputContainerStyled */ }))),
210
211
  displayValidationMsg && (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.msg) && (react_1.default.createElement(index_styled_1.MsgContainerStyled, { status: validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type },
211
212
  (validationStatus === null || validationStatus === void 0 ? void 0 : validationStatus.type) === "error" && (react_1.default.createElement(DisplayIcon_1.DisplayIcon, { size: 12, icon: "WarningDiamond", weight: "fill", color: themes_1.colors.red })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.230.2",
3
+ "version": "2.230.4",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",