@agility/plenum-ui 1.3.39 → 1.3.41

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 (43) hide show
  1. package/lib/components/Forms/InputCounter/InputCounter.d.ts +2 -2
  2. package/lib/index.esm.js +19 -21
  3. package/lib/index.esm.js.map +1 -1
  4. package/lib/index.js +19 -21
  5. package/lib/index.js.map +1 -1
  6. package/lib/tailwind.css +4 -0
  7. package/package.json +1 -1
  8. package/coverage/base.css +0 -224
  9. package/coverage/block-navigation.js +0 -87
  10. package/coverage/components/Button/Button.tsx.html +0 -739
  11. package/coverage/components/Button/index.html +0 -116
  12. package/coverage/components/Forms/BaseField/BaseField.tsx.html +0 -415
  13. package/coverage/components/Forms/BaseField/index.html +0 -116
  14. package/coverage/components/Forms/Checkbox/Checkbox.tsx.html +0 -346
  15. package/coverage/components/Forms/Checkbox/index.html +0 -116
  16. package/coverage/components/Forms/InputCounter/InputCounter.tsx.html +0 -139
  17. package/coverage/components/Forms/InputCounter/index.html +0 -116
  18. package/coverage/components/Forms/InputLabel/InputLabel.tsx.html +0 -211
  19. package/coverage/components/Forms/InputLabel/index.html +0 -131
  20. package/coverage/components/Forms/InputLabel/index.ts.html +0 -94
  21. package/coverage/components/Forms/Radio/Radio.tsx.html +0 -364
  22. package/coverage/components/Forms/Radio/index.html +0 -116
  23. package/coverage/components/Forms/Select/Select.tsx.html +0 -394
  24. package/coverage/components/Forms/Select/index.html +0 -116
  25. package/coverage/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +0 -271
  26. package/coverage/components/Forms/TextInputAddon/InputCta/index.html +0 -116
  27. package/coverage/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +0 -259
  28. package/coverage/components/Forms/TextInputSelect/InputSelect/index.html +0 -116
  29. package/coverage/components/Switch/Switch.tsx.html +0 -253
  30. package/coverage/components/Switch/index.html +0 -116
  31. package/coverage/components/ToggleSwitch/ToggleSwitch.tsx.html +0 -424
  32. package/coverage/components/ToggleSwitch/index.html +0 -116
  33. package/coverage/coverage-final.json +0 -14
  34. package/coverage/favicon.png +0 -0
  35. package/coverage/index.html +0 -251
  36. package/coverage/prettify.css +0 -1
  37. package/coverage/prettify.js +0 -2
  38. package/coverage/sort-arrow-sprite.png +0 -0
  39. package/coverage/sorter.js +0 -196
  40. package/coverage/util/DynamicIcons.tsx.html +0 -151
  41. package/coverage/util/Loader.tsx.html +0 -139
  42. package/coverage/util/index.html +0 -146
  43. package/coverage/util/useID.ts.html +0 -133
@@ -1,7 +1,7 @@
1
- import { FC } from 'react';
1
+ import { FC } from "react";
2
2
  export interface InputCounterProps {
3
3
  /** Counter limit */
4
- limit: number;
4
+ limit: number | undefined;
5
5
  /** Counter current number */
6
6
  current: number;
7
7
  }
package/lib/index.esm.js CHANGED
@@ -12407,21 +12407,19 @@ var Avatar = function (_a) {
12407
12407
  /** Primary UI component for user interaction */
12408
12408
  var InputCounter = function (_a) {
12409
12409
  var _b = _a.current, current = _b === void 0 ? 0 : _b, limit = _a.limit;
12410
- return (React__default.createElement("span", { className: "text-gray-500 text-sm mt-1 block text-center" },
12411
- React__default.createElement("span", { className: "currentCount" },
12412
- current > limit ? limit : current,
12413
- " "),
12414
- "/",
12415
- React__default.createElement("span", { className: "limitCount" },
12416
- " ",
12417
- limit)));
12410
+ return (React__default.createElement("div", { className: "mt-1 text-center text-sm text-gray-500 flex gap-1" },
12411
+ React__default.createElement("div", { className: "currentCount" }, current),
12412
+ (limit || 0) > 0 &&
12413
+ React__default.createElement(React__default.Fragment, null,
12414
+ React__default.createElement("div", null, "/"),
12415
+ React__default.createElement("div", { className: "limitCount" }, limit))));
12418
12416
  };
12419
12417
 
12420
12418
  /** default input styles */
12421
12419
  var defaultStyles = "border py-2 px-3 rounded text-sm leading-5 font-normal w-full border-gray-300 shadow-sm";
12422
12420
  /** Base input field component */
12423
12421
  var BaseField = function (_a, ref) {
12424
- var onFocus = _a.onFocus, onBlur = _a.onBlur, id = _a.id, name = _a.name, type = _a.type, value = _a.value, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isReadonly = _a.isReadonly, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, placeholder = _a.placeholder, _c = _a.className, className = _c === void 0 ? defaultStyles : _c, onChange = _a.onChange, onValueChange = _a.onValueChange;
12422
+ var onFocus = _a.onFocus, onBlur = _a.onBlur, id = _a.id, name = _a.name, type = _a.type, value = _a.value, defaultValue = _a.defaultValue, isDisabled = _a.isDisabled, isReadonly = _a.isReadonly, maxLength = _a.maxLength, placeholder = _a.placeholder, _b = _a.className, className = _b === void 0 ? defaultStyles : _b, onChange = _a.onChange, onValueChange = _a.onValueChange;
12425
12423
  var handleChange = function (e) {
12426
12424
  var targetValue = e.currentTarget.value;
12427
12425
  onChange && onChange(targetValue);
@@ -12453,11 +12451,11 @@ var useId = function () {
12453
12451
  };
12454
12452
 
12455
12453
  var TextInput = function (_a, ref) {
12456
- 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, isReadonly = _a.isReadonly, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 100 : _b, onChange = _a.onChange, externalValue = _a.value, className = _a.className;
12454
+ 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, isReadonly = _a.isReadonly, message = _a.message, isShowCounter = _a.isShowCounter, maxLength = _a.maxLength, onChange = _a.onChange, externalValue = _a.value, className = _a.className;
12457
12455
  var uniqueID = useId();
12458
- var _c = useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
12459
- var _d = useState(false); _d[0]; var setIsActive = _d[1];
12460
- var _e = useState(externalValue || defaultValue || ""), value = _e[0], setValue = _e[1];
12456
+ var _b = useState(Boolean(isFocused)), isFocus = _b[0], setIsFocus = _b[1];
12457
+ var _c = useState(false); _c[0]; var setIsActive = _c[1];
12458
+ var _d = useState(externalValue || defaultValue || ""), value = _d[0], setValue = _d[1];
12461
12459
  var inputRef = useRef(null);
12462
12460
  useEffect(function () {
12463
12461
  //if the external value is updated by the parent component, reset the value in here...
@@ -12541,9 +12539,9 @@ var InputCta = function (_a) {
12541
12539
  };
12542
12540
 
12543
12541
  var TextInputAddon = function (_a, ref) {
12544
- 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, inlineTrailingIcon = _a.inlineTrailingIcon, 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;
12545
- var _d = useState(Boolean(isFocused)), isFocus = _d[0], setIsFocus = _d[1];
12546
- var _e = useState(defaultValue || ""), value = _e[0], setValue = _e[1];
12542
+ 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, maxLength = _a.maxLength, placeholder = _a.placeholder, leadIcon = _a.leadIcon, trailIcon = _a.trailIcon, inlineIcon = _a.inlineIcon, inlineTrailingIcon = _a.inlineTrailingIcon, trailLabel = _a.trailLabel, leadLabel = _a.leadLabel, _b = _a.clearCta, clearCta = _b === void 0 ? "none" : _b, onChange = _a.onChange, onCtaClick = _a.onCtaClick, externalValue = _a.value, className = _a.className;
12543
+ var _c = useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
12544
+ var _d = useState(defaultValue || ""), value = _d[0], setValue = _d[1];
12547
12545
  var inputRef = useRef(null);
12548
12546
  var uniqueID = useId();
12549
12547
  if (!id)
@@ -12631,9 +12629,9 @@ var InputSelect = function (_a) {
12631
12629
  };
12632
12630
 
12633
12631
  var TextInputSelect = function (_a) {
12634
- 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, inputOptions = _a.inputOptions, _c = _a.selectLocation, selectLocation = _c === void 0 ? "right" : _c, prefix = _a.prefix, onChange = _a.onChange, onSelectOption = _a.onSelectOption, externalValue = _a.value;
12635
- var _d = useState(Boolean(isFocused)), isFocus = _d[0], setIsFocus = _d[1];
12636
- var _e = useState(defaultValue || ""), value = _e[0], setValue = _e[1];
12632
+ 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, maxLength = _a.maxLength, placeholder = _a.placeholder, inputOptions = _a.inputOptions, _b = _a.selectLocation, selectLocation = _b === void 0 ? "right" : _b, prefix = _a.prefix, onChange = _a.onChange, onSelectOption = _a.onSelectOption, externalValue = _a.value;
12633
+ var _c = useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
12634
+ var _d = useState(defaultValue || ""), value = _d[0], setValue = _d[1];
12637
12635
  var inputRef = useRef(null);
12638
12636
  var uniqueID = useId();
12639
12637
  if (!id)
@@ -12730,9 +12728,9 @@ var Radio = function (_a) {
12730
12728
  };
12731
12729
 
12732
12730
  var Textarea = function (_a, ref) {
12733
- var id = _a.id, name = _a.name, label = _a.label, isError = _a.isError, isRequired = _a.isRequired, isDisabled = _a.isDisabled, defaultValue = _a.defaultValue, message = _a.message, isShowCounter = _a.isShowCounter, _b = _a.maxLength, maxLength = _b === void 0 ? 500 : _b, _c = _a.rows, rows = _c === void 0 ? 4 : _c, onChange = _a.onChange, externalValue = _a.value, placeholder = _a.placeholder, className = _a.className;
12731
+ var id = _a.id, name = _a.name, label = _a.label, isError = _a.isError, isRequired = _a.isRequired, isDisabled = _a.isDisabled, defaultValue = _a.defaultValue, message = _a.message, isShowCounter = _a.isShowCounter, maxLength = _a.maxLength, _b = _a.rows, rows = _b === void 0 ? 4 : _b, onChange = _a.onChange, externalValue = _a.value, placeholder = _a.placeholder, className = _a.className;
12734
12732
  var uniqueID = useId();
12735
- var _d = useState(externalValue || defaultValue || ""), value = _d[0], setValue = _d[1];
12733
+ var _c = useState(externalValue || defaultValue || ""), value = _c[0], setValue = _c[1];
12736
12734
  var handleOnchange = function (e) {
12737
12735
  var targetValue = e.currentTarget.value;
12738
12736
  typeof onChange === "function" && onChange(targetValue);