hplx-react-elements-dev 1.0.20 → 1.0.22
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/datePicker/DatePicker.d.ts +1 -1
- package/dist/esm/index.js +18 -16
- package/dist/esm/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export interface DatePickerProps {
|
|
|
6
6
|
disabledDates: Date[];
|
|
7
7
|
selectDate?: Date;
|
|
8
8
|
dateVar: (val: Date) => void;
|
|
9
|
-
isborderRequired:
|
|
9
|
+
isborderRequired: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare const DatePicker: ({ disabledDates, selectDate, dateVar, isborderRequired, }: DatePickerProps) => JSX.Element;
|
|
12
12
|
export default DatePicker;
|
package/dist/esm/index.js
CHANGED
|
@@ -201,7 +201,8 @@ var InputField = function InputField(_a) {
|
|
|
201
201
|
_e = _a.errorMsg,
|
|
202
202
|
errorMsg = _e === void 0 ? "" : _e,
|
|
203
203
|
inputProps = _a.inputProps,
|
|
204
|
-
|
|
204
|
+
_f = _a.isborderRequired,
|
|
205
|
+
isborderRequired = _f === void 0 ? true : _f;
|
|
205
206
|
var disabled = (inputProps || {}).disabled;
|
|
206
207
|
return jsxRuntime.exports.jsxs("div", {
|
|
207
208
|
children: [jsxRuntime.exports.jsxs("div", __assign({
|
|
@@ -236,7 +237,7 @@ var InputField = function InputField(_a) {
|
|
|
236
237
|
}, {
|
|
237
238
|
children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
|
|
238
239
|
"data-testid": "input-prefix",
|
|
239
|
-
className: "bg-Gray-50 border-r-1 border-r-Gray-300 text-Gray-500 flex items-center px-
|
|
240
|
+
className: "bg-Gray-50 border-r-1 border-r-Gray-300 text-Gray-500 flex items-center px-3"
|
|
240
241
|
}, {
|
|
241
242
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
242
243
|
type: "Text md",
|
|
@@ -252,7 +253,7 @@ var InputField = function InputField(_a) {
|
|
|
252
253
|
})
|
|
253
254
|
})), jsxRuntime.exports.jsx("input", __assign({
|
|
254
255
|
type: "text",
|
|
255
|
-
className: "flex-1
|
|
256
|
+
className: "flex-1 pl-[14px] pr-[12px] py-1 focus-visible:outline-0",
|
|
256
257
|
"data-testid": "text-input"
|
|
257
258
|
}, inputProps)), Boolean(end_icon) && jsxRuntime.exports.jsx("div", __assign({
|
|
258
259
|
className: "text-Gray-500 flex items-center pr-2"
|
|
@@ -262,7 +263,7 @@ var InputField = function InputField(_a) {
|
|
|
262
263
|
})
|
|
263
264
|
})), Boolean(suffix) && jsxRuntime.exports.jsx("div", __assign({
|
|
264
265
|
"data-testid": "input-suffix",
|
|
265
|
-
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center
|
|
266
|
+
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]"
|
|
266
267
|
}, {
|
|
267
268
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
268
269
|
type: "Text md",
|
|
@@ -360,7 +361,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
360
361
|
}, {
|
|
361
362
|
children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
|
|
362
363
|
"data-testid": "input-prefix",
|
|
363
|
-
className: "bg-Gray-50 border-r-1 border-r-Gray-300 text-Gray-500 flex items-center px-
|
|
364
|
+
className: "bg-Gray-50 border-r-1 border-r-Gray-300 text-Gray-500 flex items-center px-3"
|
|
364
365
|
}, {
|
|
365
366
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
366
367
|
type: "Text md",
|
|
@@ -375,11 +376,11 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
375
376
|
className: start_icon
|
|
376
377
|
})
|
|
377
378
|
})), jsxRuntime.exports.jsxs("div", __assign({
|
|
378
|
-
className: "flex-1 relative flex min-w-
|
|
379
|
+
className: "flex-1 relative flex min-w-100"
|
|
379
380
|
}, {
|
|
380
381
|
children: [jsxRuntime.exports.jsx("input", __assign({
|
|
381
382
|
type: "text",
|
|
382
|
-
className: "
|
|
383
|
+
className: "pl-[14px] py-1 focus-visible:outline-0 absolute top-0 bottom-0 left-0 right-1/2 mr-2 "
|
|
383
384
|
}, inputProps, {
|
|
384
385
|
value: value && value[fieldNames[0]],
|
|
385
386
|
onChange: handleChange(fieldNames[0]),
|
|
@@ -396,7 +397,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
396
397
|
}))
|
|
397
398
|
})), jsxRuntime.exports.jsx("input", __assign({
|
|
398
399
|
type: "text",
|
|
399
|
-
className: "
|
|
400
|
+
className: "pr-2 py-1 focus-visible:outline-0 absolute top-0 bottom-0 left-1/2 right-0 ml-2"
|
|
400
401
|
}, inputProps, {
|
|
401
402
|
value: value && value[fieldNames[1]],
|
|
402
403
|
onChange: handleChange(fieldNames[1]),
|
|
@@ -410,7 +411,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
|
|
|
410
411
|
})
|
|
411
412
|
})), Boolean(suffix) && jsxRuntime.exports.jsx("div", __assign({
|
|
412
413
|
"data-testid": "input-suffix",
|
|
413
|
-
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center
|
|
414
|
+
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]"
|
|
414
415
|
}, {
|
|
415
416
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
416
417
|
type: "Text md",
|
|
@@ -16616,15 +16617,16 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16616
16617
|
var disabledDates = _a.disabledDates,
|
|
16617
16618
|
selectDate = _a.selectDate,
|
|
16618
16619
|
dateVar = _a.dateVar,
|
|
16619
|
-
|
|
16620
|
+
_b = _a.isborderRequired,
|
|
16621
|
+
isborderRequired = _b === void 0 ? true : _b;
|
|
16620
16622
|
|
|
16621
|
-
var
|
|
16622
|
-
date =
|
|
16623
|
-
setDate =
|
|
16623
|
+
var _c = useState(new Date(selectDate ? selectDate : new Date())),
|
|
16624
|
+
date = _c[0],
|
|
16625
|
+
setDate = _c[1];
|
|
16624
16626
|
|
|
16625
|
-
var
|
|
16626
|
-
selected =
|
|
16627
|
-
setSelected =
|
|
16627
|
+
var _d = useState(false),
|
|
16628
|
+
selected = _d[0],
|
|
16629
|
+
setSelected = _d[1];
|
|
16628
16630
|
|
|
16629
16631
|
var handleSelect = function handleSelect(date) {
|
|
16630
16632
|
setDate(date);
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface InputFieldProps {
|
|
|
10
10
|
hint_text_icon?: string;
|
|
11
11
|
char_count?: string;
|
|
12
12
|
errorMsg?: string;
|
|
13
|
-
isborderRequired?:
|
|
13
|
+
isborderRequired?: boolean;
|
|
14
14
|
inputProps: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
15
15
|
}
|
|
16
16
|
export interface InputFieldSplitProps {
|