@agility/plenum-ui 1.3.25 → 1.3.26

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/lib/index.js CHANGED
@@ -12556,7 +12556,7 @@ var InputCta = function (_a) {
12556
12556
  };
12557
12557
 
12558
12558
  var TextInputAddon = function (_a, ref) {
12559
- var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, placeholder = _a.placeholder, leadIcon = _a.leadIcon, trailIcon = _a.trailIcon, inlineIcon = _a.inlineIcon, trailLabel = _a.trailLabel, leadLabel = _a.leadLabel, _c = _a.clearCta, clearCta = _c === void 0 ? "none" : _c, onChange = _a.onChange, onCtaClick = _a.onCtaClick, externalValue = _a.value;
12559
+ var label = _a.label, isFocused = _a.isFocused, isError = _a.isError, id = _a.id, name = _a.name, isRequired = _a.isRequired, type = _a.type, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, placeholder = _a.placeholder, leadIcon = _a.leadIcon, trailIcon = _a.trailIcon, inlineIcon = _a.inlineIcon, trailLabel = _a.trailLabel, leadLabel = _a.leadLabel, _c = _a.clearCta, clearCta = _c === void 0 ? "none" : _c, onChange = _a.onChange, onCtaClick = _a.onCtaClick, externalValue = _a.value, className = _a.className;
12560
12560
  var _d = React.useState(Boolean(isFocused)), isFocus = _d[0], setIsFocus = _d[1];
12561
12561
  var _e = React.useState(defaultValue || ""), value = _e[0], setValue = _e[1];
12562
12562
  var inputRef = React.useRef(null);
@@ -12597,13 +12597,6 @@ var TextInputAddon = function (_a, ref) {
12597
12597
  setIsFocus(false);
12598
12598
  // add other focus effects here
12599
12599
  };
12600
- var className = cn("border py-2 px-3 rounded text-sm leading-5 font-normal w-full border-gray-300 outline-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500 ", {
12601
- "focus:ring-red-500 !border-red-500 !outline-red-500 shadow-none": isError
12602
- }, { "pl-10": inlineIcon }, {
12603
- "!rounded-r-none !rounded-l": (trailIcon || trailLabel) && !(leadIcon || leadLabel)
12604
- }, {
12605
- "!rounded-r-none !rounded-r": !(trailIcon || trailLabel) && (leadIcon || leadLabel)
12606
- }, { "rounded-none": (trailIcon || trailLabel) && (leadIcon || leadLabel) });
12607
12600
  var discriptionStyles = cn("text-sm mt-1 block", { "text-gray-500": !isError }, { "text-red-500": isError });
12608
12601
  return (React__default["default"].createElement("div", null,
12609
12602
  label && (React__default["default"].createElement(InputLabel, { label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled })),
@@ -12612,7 +12605,18 @@ var TextInputAddon = function (_a, ref) {
12612
12605
  React__default["default"].createElement("div", { className: "relative flex-grow focus-within:z-20" },
12613
12606
  inlineIcon && (React__default["default"].createElement("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" },
12614
12607
  React__default["default"].createElement(DynamicIcons, { icon: inlineIcon, className: "h-5 w-5 text-gray-400", outline: false }))),
12615
- React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: ref, type: type, name: name, id: id, className: className, isDisabled: isDisabled, value: value, defaultValue: defaultValue, maxLength: maxLength, placeholder: placeholder })),
12608
+ React__default["default"].createElement(_BaseField, { onFocus: handleInputFocus, onBlur: handleInputBlur, onChange: onChange, onValueChange: setValue, ref: ref, type: type, name: name, id: id, className: cn("w-full rounded border border-gray-300 py-2 px-3 text-sm font-normal leading-5 outline-purple-500 focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500 ", {
12609
+ "!border-red-500 shadow-none !outline-red-500 focus:ring-red-500": isError
12610
+ }, { "pl-10": inlineIcon }, {
12611
+ "!rounded-r-none !rounded-l": (trailIcon || trailLabel) &&
12612
+ !(leadIcon || leadLabel)
12613
+ }, {
12614
+ "!rounded-r-none !rounded-r": !(trailIcon || trailLabel) &&
12615
+ (leadIcon || leadLabel)
12616
+ }, {
12617
+ "rounded-none": (trailIcon || trailLabel) &&
12618
+ (leadIcon || leadLabel)
12619
+ }, className), isDisabled: isDisabled, value: value, defaultValue: defaultValue, maxLength: maxLength, placeholder: placeholder })),
12616
12620
  (trailIcon || trailLabel) && (React__default["default"].createElement(InputCta, { icon: trailIcon, ctaLabel: trailLabel, align: "right", isClear: clearCta === "right" || clearCta === "both", onClickHandler: onCtaClick }))),
12617
12621
  React__default["default"].createElement("div", { className: "flex flex-row space-x-3" },
12618
12622
  React__default["default"].createElement("div", { className: "grow" }, message && (React__default["default"].createElement("span", { className: discriptionStyles }, message))),