sccoreui 3.7.9 → 3.8.1
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
|
@@ -12,15 +12,15 @@ const max_1 = tslib_1.__importStar(require("react-phone-number-input/max"));
|
|
|
12
12
|
const inputnumber_1 = require("primereact/inputnumber");
|
|
13
13
|
const InputTextField = (props) => {
|
|
14
14
|
const { errors, touched, name, length, label, placeholder, optional, maxLength, className } = props;
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, Object.assign({ maxLength: maxLength, placeholder: placeholder }, field, { className: `${className} fullWidth ${errors[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: 'errorField' }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(inputtext_1.InputText, Object.assign({ maxLength: maxLength, placeholder: placeholder }, field, { className: `${className} fullWidth ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: 'errorField' }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
16
16
|
};
|
|
17
17
|
const InputNumberField = (props) => {
|
|
18
18
|
const { errors, touched, name, length, label, placeholder, optional, setFieldValue, min, max, maxLength, className } = props;
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "number" }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ min: min, max: max, maxLength: maxLength, placeholder: placeholder }, field, { onChange: (e) => e, onValueChange: (e) => setFieldValue(name, e.value), className: `fullWidth ${className} ${errors[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "number" }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ min: min, max: max, maxLength: maxLength, placeholder: placeholder }, field, { onChange: (e) => e, onValueChange: (e) => setFieldValue(name, e.value), className: `fullWidth ${className} ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
20
20
|
};
|
|
21
21
|
const InputCurrencyField = (props) => {
|
|
22
22
|
const { errors, touched, name, length, label, placeholder, optional, setFieldValue, min, max, maxLength, className } = props;
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "number" }, { children: ({ field }) => ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "p-input-icon-left" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix text-lg text-gray-600 font-normal" }, { children: "$" })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ min: min, max: max, maxLength: maxLength }, field, { onChange: (e) => e, onValueChange: (e) => setFieldValue(name, e.value), maxFractionDigits: 2, placeholder: placeholder, className: `fullWidth ${className} customNumberField ${errors[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))] }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "number" }, { children: ({ field }) => ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "p-input-icon-left" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-input-prefix text-lg text-gray-600 font-normal" }, { children: "$" })), (0, jsx_runtime_1.jsx)(inputnumber_1.InputNumber, Object.assign({ min: min, max: max, maxLength: maxLength }, field, { onChange: (e) => e, onValueChange: (e) => setFieldValue(name, e.value), maxFractionDigits: 2, placeholder: placeholder, className: `fullWidth ${className} customNumberField ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))] }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
24
24
|
};
|
|
25
25
|
const InputTextAreaField = (props) => {
|
|
26
26
|
const [charCount, setCharCount] = (0, react_1.useState)(0);
|
|
@@ -29,15 +29,15 @@ const InputTextAreaField = (props) => {
|
|
|
29
29
|
setCharCount(values[name].length);
|
|
30
30
|
}, [values[name]]);
|
|
31
31
|
(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-base font-medium font-italic text-gray-600" }, { children: "Optional" }));
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1 relative" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "textarea" }, { children: ({ field }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(inputtextarea_1.InputTextarea, Object.assign({ placeholder: placeholder, style: { height: '154px', resize: 'none', overflowY: 'scroll' } }, field, { maxLength: 100, className: `pt-2 fullWidth ${className} ${errors[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "absolute text-base font-normal text-gray-600", style: { bottom: '30px', right: '12px' } }, { children: [charCount, "/100"] }))] })) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1 relative" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ name: name, type: "textarea" }, { children: ({ field }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(inputtextarea_1.InputTextarea, Object.assign({ placeholder: placeholder, style: { height: '154px', resize: 'none', overflowY: 'scroll' } }, field, { maxLength: 100, className: `pt-2 fullWidth ${className} ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "absolute text-base font-normal text-gray-600", style: { bottom: '30px', right: '12px' } }, { children: [charCount, "/100"] }))] })) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: `errorField` }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
33
33
|
};
|
|
34
34
|
const DropDownField = (props) => {
|
|
35
35
|
const { errors, touched, name, length, label, placeholder, options, optional, customSelectedTemplate, customFieldsTemplate, optionLabel, optionDisabled, className } = props;
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, Object.assign({ placeholder: placeholder }, field, { options: options, itemTemplate: customFieldsTemplate, valueTemplate: customSelectedTemplate, optionDisabled: optionDisabled, optionLabel: optionLabel, className: `fullWidth ${className} ${errors[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: 'errorField' }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, Object.assign({ placeholder: placeholder }, field, { options: options, itemTemplate: customFieldsTemplate, valueTemplate: customSelectedTemplate, optionDisabled: optionDisabled, optionLabel: optionLabel, className: `fullWidth ${className} ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: 'errorField' }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
37
37
|
};
|
|
38
38
|
const MultiSelectField = (props) => {
|
|
39
|
-
const { errors, touched, name, length, label, placeholder, options, optional,
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, Object.assign({ placeholder: placeholder }, field, { options: options, itemTemplate: customFieldsTemplate,
|
|
39
|
+
const { errors, touched, name, length, label, placeholder, options, optional, customFieldsTemplate, optionLabel, optionDisabled, className } = props;
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex flex-column gap-1" }, { 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 && (0, jsx_runtime_1.jsx)("label", Object.assign({ className: "font-medium text-base mb-1", htmlFor: name }, { children: label })), (0, jsx_runtime_1.jsx)(formik_1.Field, Object.assign({ type: "text", name: name }, { children: ({ field }) => ((0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, Object.assign({ placeholder: placeholder }, field, { options: options, itemTemplate: customFieldsTemplate, optionDisabled: optionDisabled, optionLabel: optionLabel, className: `fullWidth ${className} ${errors[name] && touched[name] ? 'p-invalid' : ''} ${length === 'full' ? '' : 'w-18rem'}`, id: name }))) })), errors[name] && touched[name] ? ((0, jsx_runtime_1.jsx)("small", Object.assign({ className: 'errorField' }, { children: errors[name] }))) : (0, jsx_runtime_1.jsx)("small", { children: "\u00A0" })] })));
|
|
41
41
|
};
|
|
42
42
|
const PhoneNumberField = (props) => {
|
|
43
43
|
const { errors, touched, name, length, values, label, placeholder, optional, position, setFieldValue } = props;
|