hplx-react-elements-dev 1.1.14 → 1.1.15
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/alert/Alert.d.ts +4 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +60 -9
- package/dist/esm/types.d.ts +8 -1
- package/package.json +1 -1
package/dist/esm/index.d.ts
CHANGED
|
@@ -32,3 +32,4 @@ export { default as InputTagDropdownItem } from "./inputTag/InputTagDropdownItem
|
|
|
32
32
|
export { default as CalendarView } from "./calendarView/CalendarView";
|
|
33
33
|
export { default as PopUpModal } from "./popUpModal/PopUpModal";
|
|
34
34
|
export { default as ImageCarousel } from "./carousel/imageCarousel";
|
|
35
|
+
export { default as Alert } from "./alert/Alert";
|
package/dist/esm/index.js
CHANGED
|
@@ -2069,7 +2069,7 @@ var getTypeClassName = function getTypeClassName(type) {
|
|
|
2069
2069
|
break;
|
|
2070
2070
|
|
|
2071
2071
|
case "Text xs":
|
|
2072
|
-
className = "hplxt-font-inter
|
|
2072
|
+
className = "hplxt-font-inter hplxt-leading-10 hplxt-text-1 hplxt-tracking-1";
|
|
2073
2073
|
break;
|
|
2074
2074
|
|
|
2075
2075
|
default:
|
|
@@ -2959,6 +2959,10 @@ var getSizeClassName$6 = function getSizeClassName(size) {
|
|
|
2959
2959
|
var className;
|
|
2960
2960
|
|
|
2961
2961
|
switch (size) {
|
|
2962
|
+
case "xs":
|
|
2963
|
+
className = "hplxt-w-11 hplxt-h-11";
|
|
2964
|
+
break;
|
|
2965
|
+
|
|
2962
2966
|
case "sm":
|
|
2963
2967
|
className = "hplxt-w-16 hplxt-h-16";
|
|
2964
2968
|
break;
|
|
@@ -3013,7 +3017,7 @@ var OtpField = function OtpField(_a) {
|
|
|
3013
3017
|
};
|
|
3014
3018
|
|
|
3015
3019
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
3016
|
-
className: "otpfield"
|
|
3020
|
+
className: "otpfield hplxt-inline-flex hplxt-flex-col ".concat(Boolean(label) || Boolean(hint_text) || Boolean(errorMsg) ? "hplxt-gap-y-1.5" : "")
|
|
3017
3021
|
}, {
|
|
3018
3022
|
children: [Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
|
|
3019
3023
|
className: "hplxt-text-Gray-700 hplxt-mb-1"
|
|
@@ -3035,14 +3039,14 @@ var OtpField = function OtpField(_a) {
|
|
|
3035
3039
|
onFocus: handleFocus,
|
|
3036
3040
|
onBlur: handleBlur
|
|
3037
3041
|
})), jsxRuntime.exports.jsx("div", __assign({
|
|
3038
|
-
className: "hplxt-flex hplxt-pointer-events-none"
|
|
3042
|
+
className: "hplxt-flex hplxt-pointer-events-none ".concat(size === "xs" || size === "sm" ? "hplxt-gap-2" : "hplxt-gap-3")
|
|
3039
3043
|
}, {
|
|
3040
3044
|
children: Array(digits).fill("").map(function (_, index) {
|
|
3041
3045
|
return jsxRuntime.exports.jsxs("div", __assign({
|
|
3042
3046
|
className: "hplxt-flex hplxt-items-center hplxt-justify-center"
|
|
3043
3047
|
}, {
|
|
3044
3048
|
children: [digits === 6 && index === 3 && jsxRuntime.exports.jsx("div", __assign({
|
|
3045
|
-
className: "hplxt-text-Gray-300"
|
|
3049
|
+
className: "hplxt-text-Gray-300 hplxt-mr-2.5"
|
|
3046
3050
|
}, {
|
|
3047
3051
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
3048
3052
|
type: "Display xl",
|
|
@@ -3051,10 +3055,10 @@ var OtpField = function OtpField(_a) {
|
|
|
3051
3055
|
children: "-"
|
|
3052
3056
|
}))
|
|
3053
3057
|
})), jsxRuntime.exports.jsx("div", __assign({
|
|
3054
|
-
className: "hplxt-flex hplxt-items-center hplxt-justify-center hplxt-border-1 ".concat(errorMsg ? "hplxt-border-Error-300" : "hplxt-border-Gray-300", " ").concat(disabled ? "hplxt-bg-Gray-50" : typeof value === "string" && value.length === index && "hplxt-bg-White ".concat(errorMsg ? "hover:hplxt-shadow-xs-error ".concat(active && "hplxt-shadow-xs-error") : "hover:hplxt-border-Primary-300 hover:hplxt-shadow-xs-primary ".concat(active && "hplxt-border-Primary-300 hplxt-shadow-xs-primary")), " hplxt-rounded-lg
|
|
3058
|
+
className: "hplxt-flex hplxt-items-center hplxt-justify-center hplxt-border-1 ".concat(errorMsg ? "hplxt-border-Error-300" : "hplxt-border-Gray-300", " ").concat(disabled ? "hplxt-bg-Gray-50" : typeof value === "string" && value.length === index && "hplxt-bg-White ".concat(errorMsg ? "hover:hplxt-shadow-xs-error ".concat(active && "hplxt-shadow-xs-error") : "hover:hplxt-border-Primary-300 hover:hplxt-shadow-xs-primary ".concat(active && "hplxt-border-Primary-300 hplxt-shadow-xs-primary")), " hplxt-rounded-lg ").concat(getSizeClassName$6(size))
|
|
3055
3059
|
}, {
|
|
3056
3060
|
children: typeof value === "string" && !!value[index] ? jsxRuntime.exports.jsx(Typography, __assign({
|
|
3057
|
-
type: size === "lg" ? "Display xl" : "Display lg",
|
|
3061
|
+
type: size === "lg" ? "Display xl" : size === "xs" ? "Display xs" : "Display lg",
|
|
3058
3062
|
variant: "Medium"
|
|
3059
3063
|
}, {
|
|
3060
3064
|
children: value[index]
|
|
@@ -3062,7 +3066,7 @@ var OtpField = function OtpField(_a) {
|
|
|
3062
3066
|
className: "hplxt-text-Gray-300"
|
|
3063
3067
|
}, {
|
|
3064
3068
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
3065
|
-
type: size === "lg" ? "Display xl" : "Display lg",
|
|
3069
|
+
type: size === "lg" ? "Display xl" : size === "xs" ? "Display xs" : "Display lg",
|
|
3066
3070
|
variant: "Medium"
|
|
3067
3071
|
}, {
|
|
3068
3072
|
children: "0"
|
|
@@ -3076,7 +3080,7 @@ var OtpField = function OtpField(_a) {
|
|
|
3076
3080
|
className: "".concat(errorMsg ? "hplxt-text-Error-500" : "hplxt-text-Gray-500 hplxt-mt-1")
|
|
3077
3081
|
}, {
|
|
3078
3082
|
children: jsxRuntime.exports.jsx(Typography, __assign({
|
|
3079
|
-
type: "Text sm",
|
|
3083
|
+
type: size === "xs" ? "Text xs" : "Text sm",
|
|
3080
3084
|
variant: "Regular"
|
|
3081
3085
|
}, {
|
|
3082
3086
|
children: errorMsg ? String(errorMsg) : jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, {
|
|
@@ -20728,4 +20732,51 @@ var ImageCarousel = function ImageCarousel(_a) {
|
|
|
20728
20732
|
);
|
|
20729
20733
|
};
|
|
20730
20734
|
|
|
20731
|
-
|
|
20735
|
+
var VARIANT_CLASSNAMES = {
|
|
20736
|
+
Info: "hplxt-border-Blue-200 hplxt-bg-Blue-50",
|
|
20737
|
+
Warning: "hplxt-border-Warning-200 hplxt-bg-Warning-50",
|
|
20738
|
+
Error: "hplxt-border-Error-200 hplxt-bg-Error-50",
|
|
20739
|
+
Success: "hplxt-border-Success-200 hplxt-bg-Success-50"
|
|
20740
|
+
};
|
|
20741
|
+
var ICON_CLASSNAMES = {
|
|
20742
|
+
Info: "hx_info-filled hplxt-text-Blue-600",
|
|
20743
|
+
Warning: "hx_warning-filled hplxt-text-Error-600",
|
|
20744
|
+
Error: "hx_info-filled hplxt-text-Error-600",
|
|
20745
|
+
Success: "hx_checkmark-circle-filled hplxt-text-Success-600"
|
|
20746
|
+
};
|
|
20747
|
+
|
|
20748
|
+
var Alert = function Alert(_a) {
|
|
20749
|
+
var type = _a.type,
|
|
20750
|
+
message = _a.message,
|
|
20751
|
+
showCloseIcon = _a.showCloseIcon;
|
|
20752
|
+
|
|
20753
|
+
var _b = useState(true),
|
|
20754
|
+
showAlert = _b[0],
|
|
20755
|
+
setShowAlert = _b[1];
|
|
20756
|
+
|
|
20757
|
+
if (!showAlert) return null;
|
|
20758
|
+
return jsxRuntime.exports.jsxs("div", __assign({
|
|
20759
|
+
className: "hplxt-flex hplxt-justify-between hplxt-items-center hplxt-gap-2.5 hplxt-p-2.5 hplxt-border hplxt-rounded ".concat(VARIANT_CLASSNAMES[type])
|
|
20760
|
+
}, {
|
|
20761
|
+
children: [jsxRuntime.exports.jsxs("div", __assign({
|
|
20762
|
+
className: "hplxt-flex hplxt-justify-between hplxt-items-center hplxt-gap-2.5"
|
|
20763
|
+
}, {
|
|
20764
|
+
children: [jsxRuntime.exports.jsx("i", {
|
|
20765
|
+
className: "hplxt-text-5 ".concat(ICON_CLASSNAMES[type])
|
|
20766
|
+
}), jsxRuntime.exports.jsx(Typography, __assign({
|
|
20767
|
+
variant: "Regular",
|
|
20768
|
+
type: "Text sm",
|
|
20769
|
+
className: "hplxt-text-Primary-900"
|
|
20770
|
+
}, {
|
|
20771
|
+
children: message
|
|
20772
|
+
}))]
|
|
20773
|
+
})), showCloseIcon && jsxRuntime.exports.jsx("i", {
|
|
20774
|
+
className: "hx_close",
|
|
20775
|
+
onClick: function onClick() {
|
|
20776
|
+
return setShowAlert(false);
|
|
20777
|
+
}
|
|
20778
|
+
})]
|
|
20779
|
+
}));
|
|
20780
|
+
};
|
|
20781
|
+
|
|
20782
|
+
export { AddSuggestion, Alert, Avatar, Badge, BadgeGroup, Button, ButtonGroups, CalendarView, Card, Checkbox, CheckboxGroup, CheckboxGroupItem, CollapsibleCard, DatePicker, DoubleInput, DropdownField, DropdownItems as DropdownItem, ImageCarousel, InputField, InputFieldSplit, InputTag, InputTagDropdownItem, MessageToast, NestedDropdown, OtpField, PopUpModal, ProgressBar, ProgressCircle, RadioBtn, SingleDatePicker, Slider, TextAreaField, ToggleSwitch, Tooltip, Typography };
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export interface InputFieldSplitProps {
|
|
|
103
103
|
};
|
|
104
104
|
inputProps: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
105
105
|
}
|
|
106
|
-
type otpSizeType = "lg" | "md" | "sm";
|
|
106
|
+
type otpSizeType = "lg" | "md" | "sm" | "xs";
|
|
107
107
|
export interface OtpFieldProps {
|
|
108
108
|
label?: string;
|
|
109
109
|
hint_text?: string;
|
|
@@ -476,4 +476,11 @@ export interface CarouselProps {
|
|
|
476
476
|
carouselIndicator?: boolean;
|
|
477
477
|
autoPlay?: boolean;
|
|
478
478
|
}
|
|
479
|
+
type AlertType = "Success" | "Info" | "Error" | "Warning";
|
|
480
|
+
export interface AlertProps {
|
|
481
|
+
type: AlertType;
|
|
482
|
+
message: string;
|
|
483
|
+
showCloseIcon?: boolean;
|
|
484
|
+
fullWidth?: boolean;
|
|
485
|
+
}
|
|
479
486
|
export {};
|