sprint-asia-custom-component 0.1.179 → 0.1.181
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/index.js
CHANGED
|
@@ -29054,7 +29054,7 @@
|
|
|
29054
29054
|
className: "fixed inset-0 bg-black bg-opacity-25 transition-opacity",
|
|
29055
29055
|
onClick: handleBackgroundClick
|
|
29056
29056
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29057
|
-
className: "fixed inset-0
|
|
29057
|
+
className: "fixed inset-0 w-screen overflow-y-auto"
|
|
29058
29058
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29059
29059
|
className: "flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0"
|
|
29060
29060
|
}, /*#__PURE__*/React__default["default"].createElement(qe.Child, {
|
|
@@ -29068,16 +29068,16 @@
|
|
|
29068
29068
|
}, /*#__PURE__*/React__default["default"].createElement(_t.Panel, {
|
|
29069
29069
|
className: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
|
|
29070
29070
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29071
|
-
className: "bg-white
|
|
29071
|
+
className: "bg-white p-4"
|
|
29072
29072
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29073
|
-
className: "
|
|
29073
|
+
className: "flex"
|
|
29074
29074
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29075
|
-
className: "
|
|
29075
|
+
className: "flex h-12 w-16 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10"
|
|
29076
29076
|
}, /*#__PURE__*/React__default["default"].createElement(PiInfoDuotone, {
|
|
29077
29077
|
className: "h-8 w-8 text-primary500",
|
|
29078
29078
|
"aria-hidden": "true"
|
|
29079
29079
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29080
|
-
className: "
|
|
29080
|
+
className: "text-left sm:ml-4 sm:mt-0"
|
|
29081
29081
|
}, /*#__PURE__*/React__default["default"].createElement(_t.Title, {
|
|
29082
29082
|
as: "h3",
|
|
29083
29083
|
className: "text-base font-semibold leading-6 text-black"
|
|
@@ -29226,7 +29226,7 @@
|
|
|
29226
29226
|
max: maximum !== null && maximum !== undefined && type === "number" ? maximum : undefined,
|
|
29227
29227
|
type: type === "password" ? showPassword ? "text" : "password" : "text" // number tetap text
|
|
29228
29228
|
,
|
|
29229
|
-
className: `py-2.5
|
|
29229
|
+
className: `py-2.5 w-full font-normal text-sm text-black rounded-md border
|
|
29230
29230
|
${!value && mode === "default" && "bg-neutral20 border-neutral50 focus:outline-2 outline-primary500"}
|
|
29231
29231
|
${value && mode === "default" && "bg-neutral20 border-black focus:outline-2 outline-primary500"}
|
|
29232
29232
|
${isFocused && mode === "default" && "bg-neutral20 border-primary500"}
|
|
@@ -29237,6 +29237,10 @@
|
|
|
29237
29237
|
${leftIcon && leftAdornment ? "pl-16" : "pl-3"}
|
|
29238
29238
|
${rightIcon || rightAdornment ? "pr-8" : "pr-3"}
|
|
29239
29239
|
${rightIcon && rightAdornment ? "pr-16" : "pr-3"}`,
|
|
29240
|
+
style: {
|
|
29241
|
+
paddingLeft: leftAdornment || leftIcon ? "2rem" : "0.75rem",
|
|
29242
|
+
paddingRight: rightAdornment || rightIcon ? "2rem" : "0.75rem"
|
|
29243
|
+
},
|
|
29240
29244
|
placeholder: placeholder,
|
|
29241
29245
|
disabled: mode === "disable",
|
|
29242
29246
|
value: displayValue,
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ const ModalLoading = (props) => {
|
|
|
32
32
|
<div className="fixed inset-0 bg-black bg-opacity-25 transition-opacity" onClick={handleBackgroundClick} />
|
|
33
33
|
</Transition.Child>
|
|
34
34
|
|
|
35
|
-
<div className="fixed inset-0
|
|
35
|
+
<div className="fixed inset-0 w-screen overflow-y-auto">
|
|
36
36
|
<div className="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
|
|
37
37
|
<Transition.Child
|
|
38
38
|
as={Fragment}
|
|
@@ -44,12 +44,12 @@ const ModalLoading = (props) => {
|
|
|
44
44
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
45
45
|
>
|
|
46
46
|
<Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg">
|
|
47
|
-
<div className="bg-white
|
|
48
|
-
<div className="
|
|
49
|
-
<div className="
|
|
47
|
+
<div className="bg-white p-4">
|
|
48
|
+
<div className="flex">
|
|
49
|
+
<div className="flex h-12 w-16 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10">
|
|
50
50
|
<PiInfoDuotone className="h-8 w-8 text-primary500" aria-hidden="true" />
|
|
51
51
|
</div>
|
|
52
|
-
<div className="
|
|
52
|
+
<div className="text-left sm:ml-4 sm:mt-0">
|
|
53
53
|
<Dialog.Title as="h3" className="text-base font-semibold leading-6 text-black">
|
|
54
54
|
{props.title}
|
|
55
55
|
</Dialog.Title>
|
|
@@ -53,8 +53,7 @@ const TextInput = ({
|
|
|
53
53
|
onChangeInput(e);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const displayValue =
|
|
57
|
-
type === "number" ? (value ? formatNumber(value) : "") : value;
|
|
56
|
+
const displayValue = type === "number" ? (value ? formatNumber(value) : "") : value;
|
|
58
57
|
|
|
59
58
|
return (
|
|
60
59
|
<div className={`w-full ${className}`}>
|
|
@@ -62,9 +61,7 @@ const TextInput = ({
|
|
|
62
61
|
{title && (
|
|
63
62
|
<div className="flex">
|
|
64
63
|
<p className="text-sm font-normal text-black mb-1">{title}</p>
|
|
65
|
-
{isRequired &&
|
|
66
|
-
<p className="text-sm font-normal text-danger500 ml-1">*</p>
|
|
67
|
-
)}
|
|
64
|
+
{isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
|
|
68
65
|
</div>
|
|
69
66
|
)}
|
|
70
67
|
{rightComponent}
|
|
@@ -86,41 +83,24 @@ const TextInput = ({
|
|
|
86
83
|
</section>
|
|
87
84
|
|
|
88
85
|
<input
|
|
89
|
-
min={
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
maximum !== null && maximum !== undefined && type === "number"
|
|
96
|
-
? maximum
|
|
97
|
-
: undefined
|
|
98
|
-
}
|
|
99
|
-
type={
|
|
100
|
-
type === "password" ? (showPassword ? "text" : "password") : "text"
|
|
101
|
-
} // number tetap text
|
|
102
|
-
className={`py-2.5 px-3 w-full font-normal text-sm text-black rounded-md border
|
|
103
|
-
${
|
|
104
|
-
!value &&
|
|
105
|
-
mode === "default" &&
|
|
106
|
-
"bg-neutral20 border-neutral50 focus:outline-2 outline-primary500"
|
|
107
|
-
}
|
|
108
|
-
${
|
|
109
|
-
value &&
|
|
110
|
-
mode === "default" &&
|
|
111
|
-
"bg-neutral20 border-black focus:outline-2 outline-primary500"
|
|
112
|
-
}
|
|
86
|
+
min={minimum !== null && minimum !== undefined && type === "number" ? minimum : undefined}
|
|
87
|
+
max={maximum !== null && maximum !== undefined && type === "number" ? maximum : undefined}
|
|
88
|
+
type={type === "password" ? (showPassword ? "text" : "password") : "text"} // number tetap text
|
|
89
|
+
className={`py-2.5 w-full font-normal text-sm text-black rounded-md border
|
|
90
|
+
${!value && mode === "default" && "bg-neutral20 border-neutral50 focus:outline-2 outline-primary500"}
|
|
91
|
+
${value && mode === "default" && "bg-neutral20 border-black focus:outline-2 outline-primary500"}
|
|
113
92
|
${isFocused && mode === "default" && "bg-neutral20 border-primary500"}
|
|
114
93
|
${mode === "disable" && "bg-neutral30 border-neutral50"}
|
|
115
94
|
${mode === "white" && "bg-white border-neutral50"}
|
|
116
|
-
${
|
|
117
|
-
mode === "danger" &&
|
|
118
|
-
"bg-danger50 border-danger500 focus:outline-2 outline-danger500"
|
|
119
|
-
}
|
|
95
|
+
${mode === "danger" && "bg-danger50 border-danger500 focus:outline-2 outline-danger500"}
|
|
120
96
|
${leftIcon || leftAdornment ? "pl-8" : "pl-3"}
|
|
121
97
|
${leftIcon && leftAdornment ? "pl-16" : "pl-3"}
|
|
122
98
|
${rightIcon || rightAdornment ? "pr-8" : "pr-3"}
|
|
123
99
|
${rightIcon && rightAdornment ? "pr-16" : "pr-3"}`}
|
|
100
|
+
style={{
|
|
101
|
+
paddingLeft: leftAdornment || leftIcon ? "2rem" : "0.75rem",
|
|
102
|
+
paddingRight: rightAdornment || rightIcon ? "2rem" : "0.75rem",
|
|
103
|
+
}}
|
|
124
104
|
placeholder={placeholder}
|
|
125
105
|
disabled={mode === "disable"}
|
|
126
106
|
value={displayValue}
|
|
@@ -135,19 +115,9 @@ const TextInput = ({
|
|
|
135
115
|
onClick={handleTogglePasswordVisibility}
|
|
136
116
|
>
|
|
137
117
|
{showPassword ? (
|
|
138
|
-
<PiEye
|
|
139
|
-
size={16}
|
|
140
|
-
className={`text-black ${
|
|
141
|
-
mode === "danger" && "text-danger500"
|
|
142
|
-
}`}
|
|
143
|
-
/>
|
|
118
|
+
<PiEye size={16} className={`text-black ${mode === "danger" && "text-danger500"}`} />
|
|
144
119
|
) : (
|
|
145
|
-
<PiEyeClosedLight
|
|
146
|
-
size={16}
|
|
147
|
-
className={`text-black ${
|
|
148
|
-
mode === "danger" && "text-danger500"
|
|
149
|
-
}`}
|
|
150
|
-
/>
|
|
120
|
+
<PiEyeClosedLight size={16} className={`text-black ${mode === "danger" && "text-danger500"}`} />
|
|
151
121
|
)}
|
|
152
122
|
</span>
|
|
153
123
|
)}
|
|
@@ -185,4 +155,4 @@ const TextInput = ({
|
|
|
185
155
|
);
|
|
186
156
|
};
|
|
187
157
|
|
|
188
|
-
export default TextInput;
|
|
158
|
+
export default TextInput;
|