hplx-react-elements-dev 1.0.30 → 1.0.32
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AddSuggestionProps } from "../types";
|
|
3
|
-
declare const AddSuggestion: ({ isInputField, label, start_icon, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, height, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, }: AddSuggestionProps) => JSX.Element;
|
|
3
|
+
declare const AddSuggestion: ({ isInputField, label, labelColor, labelSize, start_icon, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, height, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, }: AddSuggestionProps) => JSX.Element;
|
|
4
4
|
export default AddSuggestion;
|
|
@@ -3,10 +3,12 @@ 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
|
export interface DatePickerProps {
|
|
6
|
-
disabledDates
|
|
6
|
+
disabledDates?: Date[];
|
|
7
7
|
selectDate?: any;
|
|
8
8
|
dateVar: (val: Date) => void;
|
|
9
|
-
isborderRequired
|
|
9
|
+
isborderRequired?: boolean;
|
|
10
|
+
minDate?: Date;
|
|
11
|
+
maxDate?: Date;
|
|
10
12
|
}
|
|
11
|
-
declare const DatePicker: ({ disabledDates, selectDate, dateVar, isborderRequired, }: DatePickerProps) => JSX.Element;
|
|
13
|
+
declare const DatePicker: ({ disabledDates, selectDate, dateVar, minDate, maxDate, isborderRequired, }: DatePickerProps) => JSX.Element;
|
|
12
14
|
export default DatePicker;
|
package/dist/esm/index.js
CHANGED
|
@@ -2102,6 +2102,8 @@ var DropdownItems = function DropdownItems(_a) {
|
|
|
2102
2102
|
|
|
2103
2103
|
var InputField = function InputField(_a) {
|
|
2104
2104
|
var label = _a.label,
|
|
2105
|
+
labelColor = _a.labelColor,
|
|
2106
|
+
labelSize = _a.labelSize,
|
|
2105
2107
|
_b = _a.start_icon,
|
|
2106
2108
|
start_icon = _b === void 0 ? "" : _b,
|
|
2107
2109
|
_c = _a.end_icon,
|
|
@@ -2195,16 +2197,16 @@ var InputField = function InputField(_a) {
|
|
|
2195
2197
|
}); // console.log("Input Field",suffixDropdown)
|
|
2196
2198
|
|
|
2197
2199
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
2198
|
-
className: "inputfield"
|
|
2200
|
+
className: "inputfield "
|
|
2199
2201
|
}, {
|
|
2200
2202
|
children: [jsxRuntime.exports.jsxs("div", __assign({
|
|
2201
2203
|
className: "flex justify-between"
|
|
2202
2204
|
}, {
|
|
2203
2205
|
children: [Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
|
|
2204
|
-
className: "text-Gray-700 mb-1"
|
|
2206
|
+
className: "".concat(labelColor ? labelColor : "text-Gray-700", " mb-1")
|
|
2205
2207
|
}, {
|
|
2206
2208
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
2207
|
-
type: "Text sm",
|
|
2209
|
+
type: "".concat(labelSize ? labelSize : "Text sm"),
|
|
2208
2210
|
variant: "Medium"
|
|
2209
2211
|
}, {
|
|
2210
2212
|
children: label
|
|
@@ -5170,6 +5172,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5170
5172
|
var _b = _a.isInputField,
|
|
5171
5173
|
isInputField = _b === void 0 ? false : _b,
|
|
5172
5174
|
label = _a.label,
|
|
5175
|
+
labelColor = _a.labelColor,
|
|
5176
|
+
labelSize = _a.labelSize,
|
|
5173
5177
|
_c = _a.start_icon,
|
|
5174
5178
|
start_icon = _c === void 0 ? "" : _c,
|
|
5175
5179
|
_d = _a.end_icon,
|
|
@@ -5278,6 +5282,8 @@ var AddSuggestion = function AddSuggestion(_a) {
|
|
|
5278
5282
|
}, {
|
|
5279
5283
|
children: [isInputField ? jsxRuntime.exports.jsx(InputField, {
|
|
5280
5284
|
label: label,
|
|
5285
|
+
labelColor: labelColor,
|
|
5286
|
+
labelSize: labelSize,
|
|
5281
5287
|
start_icon: start_icon,
|
|
5282
5288
|
end_icon: end_icon,
|
|
5283
5289
|
prefix: prefix,
|
|
@@ -16869,6 +16875,8 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16869
16875
|
_b = _a.selectDate,
|
|
16870
16876
|
selectDate = _b === void 0 ? undefined : _b,
|
|
16871
16877
|
dateVar = _a.dateVar,
|
|
16878
|
+
minDate = _a.minDate,
|
|
16879
|
+
maxDate = _a.maxDate,
|
|
16872
16880
|
_c = _a.isborderRequired,
|
|
16873
16881
|
isborderRequired = _c === void 0 ? true : _c;
|
|
16874
16882
|
|
|
@@ -16891,6 +16899,9 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16891
16899
|
setClicked(!clicked);
|
|
16892
16900
|
};
|
|
16893
16901
|
|
|
16902
|
+
useEffect(function () {
|
|
16903
|
+
if (selectDate) setDate(undefined);
|
|
16904
|
+
}, [selectDate]);
|
|
16894
16905
|
useEffect(function () {
|
|
16895
16906
|
var handleClickOutside = function handleClickOutside() {
|
|
16896
16907
|
return setClicked(false);
|
|
@@ -16902,7 +16913,7 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16902
16913
|
};
|
|
16903
16914
|
}, [clicked]);
|
|
16904
16915
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
16905
|
-
className: " px-[14px] py-[10px]
|
|
16916
|
+
className: " px-[14px] py-[10px]"
|
|
16906
16917
|
}, {
|
|
16907
16918
|
children: [jsxRuntime.exports.jsx("div", __assign({
|
|
16908
16919
|
className: "relative w-[189px]"
|
|
@@ -16917,12 +16928,14 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16917
16928
|
}
|
|
16918
16929
|
})
|
|
16919
16930
|
})), jsxRuntime.exports.jsx("div", __assign({
|
|
16920
|
-
className: "absolute mt-1
|
|
16931
|
+
className: "absolute mt-1 z-10 "
|
|
16921
16932
|
}, {
|
|
16922
16933
|
children: clicked ? jsxRuntime.exports.jsx(dist.Calendar, {
|
|
16923
16934
|
date: dayjs(date).isValid() ? date : new Date(),
|
|
16924
16935
|
onChange: handleSelect,
|
|
16925
|
-
disabledDates: disabledDates
|
|
16936
|
+
disabledDates: disabledDates,
|
|
16937
|
+
minDate: minDate,
|
|
16938
|
+
maxDate: maxDate
|
|
16926
16939
|
}) : null
|
|
16927
16940
|
}))]
|
|
16928
16941
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputFieldProps } from "../types";
|
|
3
|
-
declare const InputField: ({ label, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuffixClick, handleSuffixValChange, }: InputFieldProps) => JSX.Element;
|
|
3
|
+
declare const InputField: ({ label, labelColor, labelSize, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuffixClick, handleSuffixValChange, }: InputFieldProps) => JSX.Element;
|
|
4
4
|
export default InputField;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
export interface InputFieldProps {
|
|
3
3
|
label?: string;
|
|
4
|
+
labelSize?: typographyTextType;
|
|
5
|
+
labelColor?: string;
|
|
4
6
|
prefix?: ReactNode;
|
|
5
7
|
suffixButton?: ReactNode;
|
|
6
8
|
suffix?: ReactNode;
|
|
@@ -293,6 +295,8 @@ export interface AddSuggestionProps {
|
|
|
293
295
|
label?: string;
|
|
294
296
|
isInputField?: boolean;
|
|
295
297
|
height?: string;
|
|
298
|
+
labelSize?: typographyTextType;
|
|
299
|
+
labelColor?: string;
|
|
296
300
|
prefix?: ReactNode;
|
|
297
301
|
suffixButton?: ReactNode;
|
|
298
302
|
suffixDropdown?: any;
|