@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.
- package/lib/components/Forms/InputCounter/InputCounter.d.ts +2 -2
- package/lib/index.esm.js +19 -21
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +19 -21
- package/lib/index.js.map +1 -1
- package/lib/tailwind.css +4 -0
- package/package.json +1 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/components/Button/Button.tsx.html +0 -739
- package/coverage/components/Button/index.html +0 -116
- package/coverage/components/Forms/BaseField/BaseField.tsx.html +0 -415
- package/coverage/components/Forms/BaseField/index.html +0 -116
- package/coverage/components/Forms/Checkbox/Checkbox.tsx.html +0 -346
- package/coverage/components/Forms/Checkbox/index.html +0 -116
- package/coverage/components/Forms/InputCounter/InputCounter.tsx.html +0 -139
- package/coverage/components/Forms/InputCounter/index.html +0 -116
- package/coverage/components/Forms/InputLabel/InputLabel.tsx.html +0 -211
- package/coverage/components/Forms/InputLabel/index.html +0 -131
- package/coverage/components/Forms/InputLabel/index.ts.html +0 -94
- package/coverage/components/Forms/Radio/Radio.tsx.html +0 -364
- package/coverage/components/Forms/Radio/index.html +0 -116
- package/coverage/components/Forms/Select/Select.tsx.html +0 -394
- package/coverage/components/Forms/Select/index.html +0 -116
- package/coverage/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +0 -271
- package/coverage/components/Forms/TextInputAddon/InputCta/index.html +0 -116
- package/coverage/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +0 -259
- package/coverage/components/Forms/TextInputSelect/InputSelect/index.html +0 -116
- package/coverage/components/Switch/Switch.tsx.html +0 -253
- package/coverage/components/Switch/index.html +0 -116
- package/coverage/components/ToggleSwitch/ToggleSwitch.tsx.html +0 -424
- package/coverage/components/ToggleSwitch/index.html +0 -116
- package/coverage/coverage-final.json +0 -14
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -251
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/util/DynamicIcons.tsx.html +0 -151
- package/coverage/util/Loader.tsx.html +0 -139
- package/coverage/util/index.html +0 -146
- package/coverage/util/useID.ts.html +0 -133
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("
|
|
12411
|
-
React__default.createElement("
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
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,
|
|
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,
|
|
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
|
|
12459
|
-
var
|
|
12460
|
-
var
|
|
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,
|
|
12545
|
-
var
|
|
12546
|
-
var
|
|
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,
|
|
12635
|
-
var
|
|
12636
|
-
var
|
|
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,
|
|
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
|
|
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);
|