hplx-react-elements-dev 1.0.28 → 1.0.29
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 +36 -31
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2256,20 +2256,28 @@ var InputField = function InputField(_a) {
|
|
|
2256
2256
|
children: jsxRuntime.exports.jsx("span", {
|
|
2257
2257
|
className: end_icon
|
|
2258
2258
|
})
|
|
2259
|
-
})), Boolean(suffix
|
|
2260
|
-
|
|
2259
|
+
})), Boolean(suffix) && !isSuffixEditable && jsxRuntime.exports.jsx("div", __assign({
|
|
2260
|
+
"data-testid": "input-suffix",
|
|
2261
|
+
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]",
|
|
2262
|
+
onClick: function onClick() {
|
|
2263
|
+
return setShowSuffixDropdown(true);
|
|
2264
|
+
}
|
|
2265
|
+
}, {
|
|
2266
|
+
children: !isSuffixEditable && jsxRuntime.exports.jsx(Typography, __assign({
|
|
2267
|
+
type: "Text md",
|
|
2268
|
+
variant: "Regular"
|
|
2269
|
+
}, {
|
|
2270
|
+
children: suffix
|
|
2271
|
+
}))
|
|
2272
|
+
})), Boolean(suffix) && isSuffixEditable && jsxRuntime.exports.jsxs("div", {
|
|
2273
|
+
children: [jsxRuntime.exports.jsx("div", __assign({
|
|
2261
2274
|
"data-testid": "input-suffix",
|
|
2262
2275
|
className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]",
|
|
2263
2276
|
onClick: function onClick() {
|
|
2264
2277
|
return setShowSuffixDropdown(true);
|
|
2265
2278
|
}
|
|
2266
2279
|
}, {
|
|
2267
|
-
children:
|
|
2268
|
-
type: "Text md",
|
|
2269
|
-
variant: "Regular"
|
|
2270
|
-
}, {
|
|
2271
|
-
children: suffix
|
|
2272
|
-
})), isSuffixEditable && jsxRuntime.exports.jsx("input", {
|
|
2280
|
+
children: isSuffixEditable && jsxRuntime.exports.jsx("input", {
|
|
2273
2281
|
type: "text",
|
|
2274
2282
|
className: "flex-1 pl-[4px] w-36 pr-[1px] bg-Gray-50 py-2 focus-visible:outline-0 border-0 focus:border-0",
|
|
2275
2283
|
"data-testid": "text-input",
|
|
@@ -2279,7 +2287,7 @@ var InputField = function InputField(_a) {
|
|
|
2279
2287
|
onChange: function onChange(e) {
|
|
2280
2288
|
return handleSuffixValueChange(e);
|
|
2281
2289
|
}
|
|
2282
|
-
})
|
|
2290
|
+
})
|
|
2283
2291
|
})), showSuffixDropdown && jsxRuntime.exports.jsx("div", __assign({
|
|
2284
2292
|
ref: wrapperRef,
|
|
2285
2293
|
className: "absolute mt-1 min-w-max rounded-lg bg-White overflow-y-auto shadow-md z-10 max-h-80 "
|
|
@@ -4335,7 +4343,7 @@ var CollapsibleCard = function CollapsibleCard(props) {
|
|
|
4335
4343
|
onAnimationEnd: function onAnimationEnd() {
|
|
4336
4344
|
console.log("onAnimationEnd called");
|
|
4337
4345
|
},
|
|
4338
|
-
className: "".concat(active ? "max-h-[1000px]" : "max-h-0", " ").concat(active ? "p-5" : "p-0", " transition-all duration-500 ease-in-out
|
|
4346
|
+
className: "".concat(active ? "max-h-[1000px] overflow-visible" : "max-h-0 overflow-hidden", " ").concat(active ? "p-5" : "p-0", " transition-all duration-500 ease-in-out mt-5 ").concat(getWidth(width), " ").concat(getHeight(height), " text-ellipsis")
|
|
4339
4347
|
}, {
|
|
4340
4348
|
children: [header && jsxRuntime.exports.jsx("div", __assign({
|
|
4341
4349
|
className: "flex flex-1 m-1 p-4"
|
|
@@ -16850,32 +16858,29 @@ DateRangePicker$1.default = _default;
|
|
|
16850
16858
|
|
|
16851
16859
|
var DatePicker = function DatePicker(_a) {
|
|
16852
16860
|
var disabledDates = _a.disabledDates,
|
|
16853
|
-
|
|
16861
|
+
_b = _a.selectDate,
|
|
16862
|
+
selectDate = _b === void 0 ? undefined : _b,
|
|
16854
16863
|
dateVar = _a.dateVar,
|
|
16855
|
-
|
|
16856
|
-
isborderRequired =
|
|
16864
|
+
_c = _a.isborderRequired,
|
|
16865
|
+
isborderRequired = _c === void 0 ? true : _c;
|
|
16857
16866
|
|
|
16858
|
-
var
|
|
16859
|
-
date =
|
|
16860
|
-
setDate =
|
|
16867
|
+
var _d = useState(),
|
|
16868
|
+
date = _d[0],
|
|
16869
|
+
setDate = _d[1];
|
|
16861
16870
|
|
|
16862
|
-
var
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
useEffect(function () {
|
|
16867
|
-
if (selectDate) setDate(selectDate);
|
|
16868
|
-
}, [selectDate]);
|
|
16871
|
+
var _e = useState(false),
|
|
16872
|
+
clicked = _e[0],
|
|
16873
|
+
setClicked = _e[1];
|
|
16869
16874
|
|
|
16870
16875
|
var handleSelect = function handleSelect(date) {
|
|
16871
16876
|
setDate(date);
|
|
16872
|
-
|
|
16877
|
+
setClicked(!clicked);
|
|
16873
16878
|
console.log(dayjs().format("MMM DD, YYYY"));
|
|
16874
16879
|
dateVar(date);
|
|
16875
16880
|
};
|
|
16876
16881
|
|
|
16877
16882
|
var inputClick = function inputClick() {
|
|
16878
|
-
|
|
16883
|
+
setClicked(!clicked);
|
|
16879
16884
|
};
|
|
16880
16885
|
|
|
16881
16886
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
@@ -16888,20 +16893,20 @@ var DatePicker = function DatePicker(_a) {
|
|
|
16888
16893
|
isborderRequired: isborderRequired,
|
|
16889
16894
|
start_icon: "hx_calendar",
|
|
16890
16895
|
inputProps: {
|
|
16891
|
-
placeholder:
|
|
16892
|
-
|
|
16893
|
-
|
|
16896
|
+
placeholder: "Select date",
|
|
16897
|
+
onClick: inputClick,
|
|
16898
|
+
value: date ? dayjs(date).format("MMM DD, YYYY") : selectDate === null || selectDate === void 0 ? void 0 : selectDate.toString()
|
|
16894
16899
|
}
|
|
16895
16900
|
})
|
|
16896
16901
|
})), jsxRuntime.exports.jsx("div", __assign({
|
|
16897
|
-
className: "absolute
|
|
16902
|
+
className: "absolute mt-1 z-10 "
|
|
16898
16903
|
}, {
|
|
16899
|
-
children: jsxRuntime.exports.jsx(dist.Calendar, {
|
|
16904
|
+
children: clicked ? jsxRuntime.exports.jsx(dist.Calendar, {
|
|
16900
16905
|
date: dayjs(date).isValid() ? date : new Date(),
|
|
16901
16906
|
onChange: handleSelect,
|
|
16902
16907
|
dateDisplayFormat: "MMM d, yyyy",
|
|
16903
16908
|
disabledDates: disabledDates
|
|
16904
|
-
})
|
|
16909
|
+
}) : null
|
|
16905
16910
|
}))]
|
|
16906
16911
|
}));
|
|
16907
16912
|
};
|