hplx-react-elements-dev 1.0.43 → 1.0.45
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/esm/addSuggestion/AddSuggestion.d.ts +1 -1
- package/dist/esm/datePicker/DatePicker.d.ts +1 -1
- package/dist/esm/index.js +19 -9
- package/dist/esm/inputField/InputField.d.ts +1 -1
- package/dist/esm/inputFieldSplit/InputFieldSplit.d.ts +1 -1
- package/dist/esm/popUpModal/PopUpModal.d.ts +4 -0
- package/dist/esm/types.d.ts +24 -0
- package/package.json +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AddSuggestionProps } from "../types";
|
|
3
|
-
declare const AddSuggestion: ({ isInputField, label, labelColor, labelSize, start_icon, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixInputProps, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, className, rows, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, isDynamicHeight, fieldColor, }: AddSuggestionProps) => JSX.Element;
|
|
3
|
+
declare const AddSuggestion: ({ isInputField, label, labelColor, labelSize, start_icon, height, width, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixInputProps, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, className, rows, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, isDynamicHeight, fieldColor, }: AddSuggestionProps) => JSX.Element;
|
|
4
4
|
export default AddSuggestion;
|
|
@@ -3,5 +3,5 @@ import "react-date-range/dist/styles.css";
|
|
|
3
3
|
import "react-date-range/dist/theme/default.css";
|
|
4
4
|
import "../datePicker/DatePickerCSS.css";
|
|
5
5
|
import { DatePickerProps } from "../types";
|
|
6
|
-
declare const DatePicker: ({ disabledDates, selectDate, dateVar, minDate, maxDate, label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, suffixInputProps, suffixDropdown, isSuffixEditable, suffixPlaceholder, fieldColor, isborderRequired, }: DatePickerProps) => JSX.Element;
|
|
6
|
+
declare const DatePicker: ({ disabledDates, selectDate, dateVar, minDate, maxDate, label, width, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, suffixInputProps, suffixDropdown, isSuffixEditable, suffixPlaceholder, fieldColor, isborderRequired, }: DatePickerProps) => JSX.Element;
|
|
7
7
|
export default DatePicker;
|
package/dist/esm/index.js
CHANGED
|
@@ -2122,6 +2122,8 @@ var InputField = function InputField(_a) {
|
|
|
2122
2122
|
height = _a.height,
|
|
2123
2123
|
_b = _a.start_icon,
|
|
2124
2124
|
start_icon = _b === void 0 ? "" : _b,
|
|
2125
|
+
width = _a.width,
|
|
2126
|
+
border = _a.border,
|
|
2125
2127
|
_c = _a.end_icon,
|
|
2126
2128
|
end_icon = _c === void 0 ? "" : _c,
|
|
2127
2129
|
_d = _a.hint_text_icon,
|
|
@@ -2243,7 +2245,7 @@ var InputField = function InputField(_a) {
|
|
|
2243
2245
|
}, {
|
|
2244
2246
|
children: jsxRuntime.exports.jsxs("div", __assign({
|
|
2245
2247
|
"data-setid": "error-msg",
|
|
2246
|
-
className: "hplxt-flex ".concat(isborderRequired ? "hplxt-
|
|
2248
|
+
className: "hplxt-flex ".concat(isborderRequired ? "hplxt-shadow-xs ".concat(border ? border : "hplxt-border-1", " hplxt-rounded-lg") : "", " hplxt-overflow-hidden placeholder:hplxt-text-Gray-500 ").concat(errorMsg ? "hplxt-border-Error-300" : "hplxt-border-Gray-300", " ").concat(height ? height : "hplxt-h-10", " ").concat(disabled ? "hplxt-bg-Gray-50" : "".concat(fieldColor ? fieldColor : "hplxt-bg-White", " ").concat(errorMsg ? "hover:hplxt-shadow-xs-error ".concat(active && "hplxt-shadow-xs-error") : " ".concat(isborderRequired ? "hover:hplxt-border-Primary-300 hover:hplxt-shadow-xs-primary ".concat(active && "hplxt-border-Primary-300 hplxt-shadow-xs-primary") : " ")))
|
|
2247
2249
|
}, {
|
|
2248
2250
|
children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
|
|
2249
2251
|
"data-testid": "input-prefix",
|
|
@@ -2264,9 +2266,10 @@ var InputField = function InputField(_a) {
|
|
|
2264
2266
|
})), jsxRuntime.exports.jsx("input", __assign({
|
|
2265
2267
|
type: "text",
|
|
2266
2268
|
style: {
|
|
2267
|
-
background: "".concat(fieldColor === null || fieldColor === void 0 ? void 0 : fieldColor.split("-")[1])
|
|
2269
|
+
background: "".concat(fieldColor === null || fieldColor === void 0 ? void 0 : fieldColor.split("-")[1], " "),
|
|
2270
|
+
width: "".concat(width)
|
|
2268
2271
|
},
|
|
2269
|
-
className: "hplxt-flex-1 hplxt-pl-[14px] ".concat(fieldColor, "
|
|
2272
|
+
className: "hplxt-flex-1 hplxt-pl-[14px] ".concat(fieldColor, " placeholder:hplxt-text-Indigo-500 hplxt-opacity-50 hplxt-pr-[12px] hplxt-py-1 focus-visible:hplxt-outline-0 hplxt-border-0 focus:hplxt-border-0"),
|
|
2270
2273
|
"data-testid": "text-input"
|
|
2271
2274
|
}, inputProps, {
|
|
2272
2275
|
onFocus: handleFocus,
|
|
@@ -2300,7 +2303,7 @@ var InputField = function InputField(_a) {
|
|
|
2300
2303
|
}, {
|
|
2301
2304
|
children: isSuffixEditable && jsxRuntime.exports.jsx("input", __assign({
|
|
2302
2305
|
type: "text",
|
|
2303
|
-
className: "hplxt-flex-1 hplxt-pl-[4px] hplxt-w-36 hplxt-pr-[1px] hplxt-bg-Gray-50 hplxt-py-2 focus-visible:hplxt-outline-0 hplxt-border-0 focus:hplxt-border-0",
|
|
2306
|
+
className: "hplxt-flex-1 placeholder:hplxt-text-Indigo-500 hplxt-pl-[4px] hplxt-w-36 hplxt-pr-[1px] hplxt-bg-Gray-50 hplxt-py-2 focus-visible:hplxt-outline-0 hplxt-border-0 focus:hplxt-border-0",
|
|
2304
2307
|
"data-testid": "text-input",
|
|
2305
2308
|
placeholder: suffixPlaceholder
|
|
2306
2309
|
}, suffixInputProps, {
|
|
@@ -2311,7 +2314,7 @@ var InputField = function InputField(_a) {
|
|
|
2311
2314
|
}))
|
|
2312
2315
|
})), showSuffixDropdown && jsxRuntime.exports.jsx("div", __assign({
|
|
2313
2316
|
ref: wrapperRef,
|
|
2314
|
-
className: "hplxt-absolute hplxt-mt-1 hplxt-min-w-max hplxt-rounded-lg ".concat(fieldColor ? fieldColor : "hplxt-bg-White", " hplxt-overflow-y-auto hplxt-shadow-md hplxt-z-10 hplxt-max-h-80 ")
|
|
2317
|
+
className: "hplxt-absolute hplxt-mt-1 hplxt-min-w-max hplxt-rounded-lg ".concat(fieldColor ? fieldColor : "hplxt-bg-White", " hplxt-overflow-y-auto hplxt-bg-Indigo-25 hplxt-shadow-md hplxt-z-10 hplxt-max-h-80 ")
|
|
2315
2318
|
}, {
|
|
2316
2319
|
children: suffixFilterList && suffixFilterList.length > 0 && jsxRuntime.exports.jsx("div", {
|
|
2317
2320
|
children: (suffixFilterList === null || suffixFilterList === void 0 ? void 0 : suffixFilterList.constructor) === Array && suffixFilterList.length ? suffixFilterList.map(function (option) {
|
|
@@ -2374,6 +2377,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
2374
2377
|
prefix = _a.prefix,
|
|
2375
2378
|
suffix = _a.suffix,
|
|
2376
2379
|
hint_text = _a.hint_text,
|
|
2380
|
+
border = _a.border,
|
|
2377
2381
|
fieldNames = _a.fieldNames,
|
|
2378
2382
|
char_count = _a.char_count,
|
|
2379
2383
|
errorMsg = _a.errorMsg,
|
|
@@ -2452,7 +2456,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
2452
2456
|
type: "Text md"
|
|
2453
2457
|
}, {
|
|
2454
2458
|
children: jsxRuntime.exports.jsxs("div", __assign({
|
|
2455
|
-
className: "hplxt-flex hplxt-border-1 hplxt-overflow-hidden placeholder:hplxt-text-Gray-500 ".concat(errorMsg ? "hplxt-border-Error-300" : "hplxt-border-Gray-300", " hplxt-shadow-xs hplxt-rounded-lg ").concat(height ? height : "hplxt-h-10", " ").concat(disabled ? "hplxt-bg-Gray-50" : "hplxt-bg-White ".concat(errorMsg ? "hover:hplxt-shadow-xs-error ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "hplxt-shadow-xs-error") : "hover:hplxt-border-Primary-300 hover:hplxt-shadow-xs-primary ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "hplxt-border-Primary-300 hplxt-shadow-xs-primary")))
|
|
2459
|
+
className: "hplxt-flex ".concat(border ? border : "hplxt-border-1", " hplxt-overflow-hidden placeholder:hplxt-text-Gray-500 ").concat(errorMsg ? "hplxt-border-Error-300" : "hplxt-border-Gray-300", " hplxt-shadow-xs hplxt-rounded-lg ").concat(height ? height : "hplxt-h-10", " ").concat(disabled ? "hplxt-bg-Gray-50" : "hplxt-bg-White ".concat(errorMsg ? "hover:hplxt-shadow-xs-error ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "hplxt-shadow-xs-error") : "hover:hplxt-border-Primary-300 hover:hplxt-shadow-xs-primary ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "hplxt-border-Primary-300 hplxt-shadow-xs-primary")))
|
|
2456
2460
|
}, {
|
|
2457
2461
|
children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
|
|
2458
2462
|
"data-testid": "input-prefix",
|
|
@@ -2813,17 +2817,17 @@ var ButtonGroups = function ButtonGroups(_a) {
|
|
|
2813
2817
|
disabled: disabled,
|
|
2814
2818
|
onMouseEnter: onMouseEnterHandler(index),
|
|
2815
2819
|
onMouseLeave: onMouseLeaveHandler,
|
|
2816
|
-
className: "hplxt-flex hplxt-items-center hplxt-justify-center hplxt-flex-1 hplxt-h-10\n ".concat(!disabled && isSelected ? "hplxt-bg-
|
|
2820
|
+
className: "hplxt-flex hplxt-items-center hplxt-justify-center hplxt-flex-1 hplxt-h-10\n ".concat(!disabled && isSelected ? "hplxt-bg-Gray-100" : "hplxt-bg-White", "\n ").concat(index + 1 !== options.length && "hplxt-border-r-1 hplxt-border-Gray-300"),
|
|
2817
2821
|
onClick: handleChange(buttonValue)
|
|
2818
2822
|
}, ButtonGroupsProps, {
|
|
2819
2823
|
children: [Boolean(start_icon) && jsxRuntime.exports.jsx("div", __assign({
|
|
2820
|
-
className: "hplxt-flex hplxt-items-center hplxt-pl-2 ".concat(!label && "hplxt-pr-2", " ").concat(disabled ? "hplxt-text-Gray-300" : isSelected ? "hplxt-text-
|
|
2824
|
+
className: "hplxt-flex hplxt-items-center hplxt-pl-2 ".concat(!label && "hplxt-pr-2", " ").concat(disabled ? "hplxt-text-Gray-300" : isSelected ? "hplxt-text-Gray-800" : isHovered ? "hplxt-text-Gray-800" : "hplxt-text-Gray-600")
|
|
2821
2825
|
}, {
|
|
2822
2826
|
children: jsxRuntime.exports.jsx("span", {
|
|
2823
2827
|
className: start_icon
|
|
2824
2828
|
})
|
|
2825
2829
|
})), Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
|
|
2826
|
-
className: "hplxt-px-2 ".concat(disabled ? "hplxt-text-Gray-300" : isSelected ? "hplxt-text-
|
|
2830
|
+
className: "hplxt-px-2 ".concat(disabled ? "hplxt-text-Gray-300" : isSelected ? "hplxt-text-Gray-800" : isHovered ? "hplxt-text-Gray-800" : "hplxt-text-Gray-600")
|
|
2827
2831
|
}, {
|
|
2828
2832
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
2829
2833
|
variant: "Medium",
|
|
@@ -5219,6 +5223,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5219
5223
|
labelSize = _a.labelSize,
|
|
5220
5224
|
_c = _a.start_icon,
|
|
5221
5225
|
start_icon = _c === void 0 ? "" : _c,
|
|
5226
|
+
height = _a.height,
|
|
5227
|
+
width = _a.width,
|
|
5222
5228
|
_d = _a.end_icon,
|
|
5223
5229
|
end_icon = _d === void 0 ? "" : _d,
|
|
5224
5230
|
prefix = _a.prefix,
|
|
@@ -5333,6 +5339,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5333
5339
|
labelColor: labelColor,
|
|
5334
5340
|
labelSize: labelSize,
|
|
5335
5341
|
start_icon: start_icon,
|
|
5342
|
+
width: width,
|
|
5343
|
+
height: height,
|
|
5336
5344
|
end_icon: end_icon,
|
|
5337
5345
|
prefix: prefix,
|
|
5338
5346
|
suffixButton: suffixButton,
|
|
@@ -16930,6 +16938,7 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16930
16938
|
minDate = _a.minDate,
|
|
16931
16939
|
maxDate = _a.maxDate,
|
|
16932
16940
|
label = _a.label,
|
|
16941
|
+
width = _a.width,
|
|
16933
16942
|
labelColor = _a.labelColor,
|
|
16934
16943
|
labelSize = _a.labelSize,
|
|
16935
16944
|
_c = _a.height,
|
|
@@ -17006,6 +17015,7 @@ var DatePicker = function DatePicker(_a) {
|
|
|
17006
17015
|
className: "hplxt-relative hplxt-w-[189px]"
|
|
17007
17016
|
}, {
|
|
17008
17017
|
children: jsxRuntime.exports.jsx(InputField, {
|
|
17018
|
+
width: width,
|
|
17009
17019
|
label: label,
|
|
17010
17020
|
labelColor: labelColor,
|
|
17011
17021
|
labelSize: labelSize,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputFieldProps } from "../types";
|
|
3
|
-
declare const InputField: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, suffixInputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, fieldColor, handleSuffixClick, }: InputFieldProps) => JSX.Element;
|
|
3
|
+
declare const InputField: ({ label, labelColor, labelSize, height, start_icon, width, border, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, suffixInputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, fieldColor, handleSuffixClick, }: InputFieldProps) => JSX.Element;
|
|
4
4
|
export default InputField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputFieldSplitProps } from "../types";
|
|
3
|
-
declare const InputFieldSplit: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffix, hint_text, fieldNames, char_count, errorMsg, onChange, value, inputProps, }: InputFieldSplitProps) => JSX.Element;
|
|
3
|
+
declare const InputFieldSplit: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffix, hint_text, border, fieldNames, char_count, errorMsg, onChange, value, inputProps, }: InputFieldSplitProps) => JSX.Element;
|
|
4
4
|
export default InputFieldSplit;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { popUpModalProps } from "../types";
|
|
3
|
+
declare const PopUpModal: ({ backgroundColor, position, margin, zIndex, padding, width, height, boxShadow, borderRadius, ClassNames, openModal, closeModal, Children, style, }: popUpModalProps) => JSX.Element;
|
|
4
|
+
export default PopUpModal;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { ReactNode } from "react";
|
|
|
2
2
|
export interface InputFieldProps {
|
|
3
3
|
label?: string;
|
|
4
4
|
fieldColor?: string;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
border?: string;
|
|
5
7
|
labelSize?: typographyTextType;
|
|
6
8
|
labelColor?: string;
|
|
7
9
|
height?: string;
|
|
@@ -28,8 +30,10 @@ export interface DatePickerProps {
|
|
|
28
30
|
selectDate?: any;
|
|
29
31
|
dateVar: (val: Date) => void;
|
|
30
32
|
minDate?: Date;
|
|
33
|
+
width?: string | number;
|
|
31
34
|
maxDate?: Date;
|
|
32
35
|
label?: string;
|
|
36
|
+
border?: string;
|
|
33
37
|
fieldColor?: string;
|
|
34
38
|
labelSize?: typographyTextType;
|
|
35
39
|
labelColor?: string;
|
|
@@ -60,6 +64,7 @@ export interface InputFieldSplitProps {
|
|
|
60
64
|
suffix?: ReactNode;
|
|
61
65
|
start_icon?: string;
|
|
62
66
|
end_icon?: string;
|
|
67
|
+
border?: string;
|
|
63
68
|
fieldNames: [string, string];
|
|
64
69
|
hint_text?: string;
|
|
65
70
|
hint_text_icon?: string;
|
|
@@ -84,6 +89,23 @@ export interface OtpFieldProps {
|
|
|
84
89
|
errorMsg?: string;
|
|
85
90
|
inputProps: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
86
91
|
}
|
|
92
|
+
type popUpPositionType = "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky";
|
|
93
|
+
export interface popUpModalProps {
|
|
94
|
+
backgroundColor?: string;
|
|
95
|
+
position?: popUpPositionType;
|
|
96
|
+
style?: {};
|
|
97
|
+
margin?: string;
|
|
98
|
+
zIndex?: string;
|
|
99
|
+
padding?: string;
|
|
100
|
+
width?: string;
|
|
101
|
+
Children?: ReactNode;
|
|
102
|
+
height?: string;
|
|
103
|
+
boxShadow?: string;
|
|
104
|
+
borderRadius?: string;
|
|
105
|
+
ClassNames?: ReactNode;
|
|
106
|
+
openModal?: boolean;
|
|
107
|
+
closeModal?: () => void;
|
|
108
|
+
}
|
|
87
109
|
export interface TextAreaFieldProps {
|
|
88
110
|
label?: string;
|
|
89
111
|
hint_text?: string;
|
|
@@ -334,6 +356,8 @@ export interface AddSuggestionProps {
|
|
|
334
356
|
className?: string;
|
|
335
357
|
rows?: number;
|
|
336
358
|
isDynamicHeight?: boolean;
|
|
359
|
+
width?: string | number;
|
|
360
|
+
height?: string;
|
|
337
361
|
labelSize?: typographyTextType;
|
|
338
362
|
labelColor?: string;
|
|
339
363
|
prefix?: ReactNode;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"frontend",
|
|
10
10
|
"healthplix"
|
|
11
11
|
],
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.45",
|
|
13
13
|
"main": "dist/esm/index.js",
|
|
14
14
|
"module": "dist/esm/index.js",
|
|
15
15
|
"types": "dist/esm/index.d.ts",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"url": "git+https://hplx-admin@bitbucket.org/healthplixrepos/ui-elements.git"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"react-date-range": "^1.4.0"
|
|
25
|
+
"react-date-range": "^1.4.0",
|
|
26
|
+
"react-modal": "^3.16.1"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"start": "react-scripts start",
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
"@types/react-calendar": "^3.5.3",
|
|
92
93
|
"@types/react-date-range": "^1.4.4",
|
|
93
94
|
"@types/react-dom": "^18.0.6",
|
|
95
|
+
"@types/react-modal": "^3.13.1",
|
|
94
96
|
"@types/webfontloader": "^1.6.34",
|
|
95
97
|
"autoprefixer": "^10.4.7",
|
|
96
98
|
"babel-plugin-named-exports-order": "^0.0.2",
|