@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.js
CHANGED
|
@@ -12433,21 +12433,19 @@ var Avatar = function (_a) {
|
|
|
12433
12433
|
/** Primary UI component for user interaction */
|
|
12434
12434
|
var InputCounter = function (_a) {
|
|
12435
12435
|
var _b = _a.current, current = _b === void 0 ? 0 : _b, limit = _a.limit;
|
|
12436
|
-
return (React__default["default"].createElement("
|
|
12437
|
-
React__default["default"].createElement("
|
|
12438
|
-
|
|
12439
|
-
"
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
" ",
|
|
12443
|
-
limit)));
|
|
12436
|
+
return (React__default["default"].createElement("div", { className: "mt-1 text-center text-sm text-gray-500 flex gap-1" },
|
|
12437
|
+
React__default["default"].createElement("div", { className: "currentCount" }, current),
|
|
12438
|
+
(limit || 0) > 0 &&
|
|
12439
|
+
React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
12440
|
+
React__default["default"].createElement("div", null, "/"),
|
|
12441
|
+
React__default["default"].createElement("div", { className: "limitCount" }, limit))));
|
|
12444
12442
|
};
|
|
12445
12443
|
|
|
12446
12444
|
/** default input styles */
|
|
12447
12445
|
var defaultStyles = "border py-2 px-3 rounded text-sm leading-5 font-normal w-full border-gray-300 shadow-sm";
|
|
12448
12446
|
/** Base input field component */
|
|
12449
12447
|
var BaseField = function (_a, ref) {
|
|
12450
|
-
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,
|
|
12448
|
+
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;
|
|
12451
12449
|
var handleChange = function (e) {
|
|
12452
12450
|
var targetValue = e.currentTarget.value;
|
|
12453
12451
|
onChange && onChange(targetValue);
|
|
@@ -12479,11 +12477,11 @@ var useId = function () {
|
|
|
12479
12477
|
};
|
|
12480
12478
|
|
|
12481
12479
|
var TextInput = function (_a, ref) {
|
|
12482
|
-
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,
|
|
12480
|
+
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;
|
|
12483
12481
|
var uniqueID = useId();
|
|
12484
|
-
var
|
|
12485
|
-
var
|
|
12486
|
-
var
|
|
12482
|
+
var _b = React.useState(Boolean(isFocused)), isFocus = _b[0], setIsFocus = _b[1];
|
|
12483
|
+
var _c = React.useState(false); _c[0]; var setIsActive = _c[1];
|
|
12484
|
+
var _d = React.useState(externalValue || defaultValue || ""), value = _d[0], setValue = _d[1];
|
|
12487
12485
|
var inputRef = React.useRef(null);
|
|
12488
12486
|
React.useEffect(function () {
|
|
12489
12487
|
//if the external value is updated by the parent component, reset the value in here...
|
|
@@ -12567,9 +12565,9 @@ var InputCta = function (_a) {
|
|
|
12567
12565
|
};
|
|
12568
12566
|
|
|
12569
12567
|
var TextInputAddon = function (_a, ref) {
|
|
12570
|
-
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,
|
|
12571
|
-
var
|
|
12572
|
-
var
|
|
12568
|
+
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;
|
|
12569
|
+
var _c = React.useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
|
|
12570
|
+
var _d = React.useState(defaultValue || ""), value = _d[0], setValue = _d[1];
|
|
12573
12571
|
var inputRef = React.useRef(null);
|
|
12574
12572
|
var uniqueID = useId();
|
|
12575
12573
|
if (!id)
|
|
@@ -12657,9 +12655,9 @@ var InputSelect = function (_a) {
|
|
|
12657
12655
|
};
|
|
12658
12656
|
|
|
12659
12657
|
var TextInputSelect = function (_a) {
|
|
12660
|
-
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,
|
|
12661
|
-
var
|
|
12662
|
-
var
|
|
12658
|
+
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;
|
|
12659
|
+
var _c = React.useState(Boolean(isFocused)), isFocus = _c[0], setIsFocus = _c[1];
|
|
12660
|
+
var _d = React.useState(defaultValue || ""), value = _d[0], setValue = _d[1];
|
|
12663
12661
|
var inputRef = React.useRef(null);
|
|
12664
12662
|
var uniqueID = useId();
|
|
12665
12663
|
if (!id)
|
|
@@ -12756,9 +12754,9 @@ var Radio = function (_a) {
|
|
|
12756
12754
|
};
|
|
12757
12755
|
|
|
12758
12756
|
var Textarea = function (_a, ref) {
|
|
12759
|
-
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,
|
|
12757
|
+
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;
|
|
12760
12758
|
var uniqueID = useId();
|
|
12761
|
-
var
|
|
12759
|
+
var _c = React.useState(externalValue || defaultValue || ""), value = _c[0], setValue = _c[1];
|
|
12762
12760
|
var handleOnchange = function (e) {
|
|
12763
12761
|
var targetValue = e.currentTarget.value;
|
|
12764
12762
|
typeof onChange === "function" && onChange(targetValue);
|