sccoreui 6.4.74 → 6.4.76
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/dist/App.scss
CHANGED
|
@@ -1762,6 +1762,28 @@ code {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
1764
|
|
|
1765
|
+
.currency_with_input {
|
|
1766
|
+
display: flex;
|
|
1767
|
+
border: 1px solid var(--gray-300);
|
|
1768
|
+
border-radius: 6px;
|
|
1769
|
+
input {
|
|
1770
|
+
border: 0px !important;
|
|
1771
|
+
padding-inline: 0;
|
|
1772
|
+
&:focus {
|
|
1773
|
+
outline: none !important;
|
|
1774
|
+
border: none !important;
|
|
1775
|
+
box-shadow: none !important;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
.p-inputnumber .p-inputnumber-input {
|
|
1779
|
+
padding-inline: 0;
|
|
1780
|
+
}
|
|
1781
|
+
&:focus-within {
|
|
1782
|
+
border: 1px solid var(--primary-300);
|
|
1783
|
+
outline: 2px solid var(--primary-50);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1765
1787
|
.text-truncate {
|
|
1766
1788
|
white-space: nowrap;
|
|
1767
1789
|
overflow: hidden;
|
|
@@ -12,6 +12,7 @@ const max_1 = tslib_1.__importStar(require("react-phone-number-input/max"));
|
|
|
12
12
|
const inputnumber_1 = require("primereact/inputnumber");
|
|
13
13
|
const skeleton_1 = require("primereact/skeleton");
|
|
14
14
|
const FieldLabel_1 = tslib_1.__importDefault(require("./FieldLabel"));
|
|
15
|
+
const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
|
|
15
16
|
const InputTextField = (props) => {
|
|
16
17
|
const { errors, touched, name, length, label, placeholder, optional, maxLength, className, validate, disabled, isLoading, isRequired = false, value, } = props;
|
|
17
18
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column" }, { children: [!isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [optional && ((0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "font-medium text-base mb-1 w-full flex justify-content-between", htmlFor: name }, { children: [label, (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-base font-medium font-italic text-gray-600" }, { children: "Optional" }))] }))), !optional && (
|
|
@@ -32,14 +33,14 @@ const InputNumberField = (props) => {
|
|
|
32
33
|
} })), (errors === null || errors === void 0 ? void 0 : errors[name]) && (touched === null || touched === void 0 ? void 0 : touched[name]) ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: errors === null || errors === void 0 ? void 0 : errors[name] }) }))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) })))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "16px", className: "mb-1 w-5rem" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `${className ? className : "form_field"} ` }, { children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "40px" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) }))] })) })));
|
|
33
34
|
};
|
|
34
35
|
const InputCurrencyField = (props) => {
|
|
35
|
-
const { errors, spanClassName, touched, name, length, label, placeholder, optional, setFieldValue, useGrouping = false, min, max, maxLength, className, validate, disabled, isLoading, inputNumberProps = {}, isRequired = false, value, currenyIcon } = props;
|
|
36
|
+
const { errors, spanClassName, touched, name, length, label, placeholder, optional, setFieldValue, useGrouping = false, min, max, maxLength, className, validate, disabled, isLoading, inputNumberProps = {}, isRequired = false, value, currenyIcon, } = props;
|
|
36
37
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex flex-column" }, { children: !isLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [optional && ((0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "font-medium text-base mb-1 w-full flex justify-content-between", htmlFor: name }, { children: [label, (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-base font-medium font-italic text-gray-600" }, { children: "Optional" }))] }))), !optional && (
|
|
37
38
|
// <label className="font-medium text-base mb-1" htmlFor={name}>
|
|
38
39
|
// {label}
|
|
39
40
|
// </label>
|
|
40
41
|
(0, jsx_runtime_1.jsx)(FieldLabel_1.default, { value: value, label: label, error: errors === null || errors === void 0 ? void 0 : errors[name], touched: touched === null || touched === void 0 ? void 0 : touched[name], isRequired: isRequired })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, errors: errors, touched: touched, validate: validate }, { children: ({ field }) => {
|
|
41
42
|
const { value, name } = field;
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `${spanClassName}
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: `${spanClassName} currency_with_input` }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center gap-2 w-full" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-lg text-gray-600 font-normal px-3" }, { children: currenyIcon ? currenyIcon : "$" })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ name: name, value: value, "aria-autocomplete": "none", minFractionDigits: 2, disabled: disabled, min: min, max: max, maxLength: maxLength, onValueChange: (e) => setFieldValue(name, e.value !== null ? e.value : min), maxFractionDigits: 2, placeholder: placeholder, className: ` customNumberField ${errors[name] && touched[name] ? "p-invalid" : ""} ${length === "full" ? "" : ""} ${className}`, id: name, useGrouping: useGrouping }, inputNumberProps))] })), value && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flex align-items-center px-2", onClick: () => setFieldValue(name, null) }, { children: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 15, color: "text-gray-600" }) })))] })));
|
|
43
44
|
} })), (errors === null || errors === void 0 ? void 0 : errors[name]) && (touched === null || touched === void 0 ? void 0 : touched[name]) ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: errors === null || errors === void 0 ? void 0 : errors[name] }) }))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) })))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "16px", className: "mb-1 w-5rem" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `${className ? className : "form_field"} ` }, { children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { height: "40px" }) })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "errorField flex align-items-center text-sm" }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u00A0" }) }))] })) })));
|
|
44
45
|
};
|
|
45
46
|
const InputTextAreaField = (props) => {
|