@ctlyst.id/internal-ui 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +108 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -992,89 +992,94 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
992
992
|
leftHelperText,
|
993
993
|
rightHelperText,
|
994
994
|
isRequired,
|
995
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
996
|
-
import_react22.
|
995
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
996
|
+
import_react22.Box,
|
997
997
|
{
|
998
|
-
|
998
|
+
transition: "all 0.15s",
|
999
|
+
boxShadow: "none",
|
999
1000
|
borderRadius: "sm",
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1001
|
+
border: "1px solid",
|
1002
|
+
borderColor: outlineColor,
|
1003
|
+
_focusWithin: {
|
1004
|
+
borderColor: focusColor
|
1005
|
+
},
|
1006
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1007
|
+
import_react22.InputGroup,
|
1008
|
+
{
|
1009
|
+
size: size2,
|
1010
|
+
borderRadius: "sm",
|
1011
|
+
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
1012
|
+
cursor: isDisabled ? "not-allowed" : "default",
|
1013
|
+
children: [
|
1014
|
+
addOnLeft,
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1016
|
+
import_react22.Input,
|
1017
|
+
{
|
1018
|
+
ref,
|
1019
|
+
type: inputType,
|
1020
|
+
value,
|
1021
|
+
isDisabled,
|
1022
|
+
isSuccess,
|
1023
|
+
...inputProps,
|
1024
|
+
fontSize
|
1025
|
+
}
|
1026
|
+
),
|
1027
|
+
(withClear || isLoading || type === "password") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1028
|
+
import_react22.Box,
|
1029
|
+
{
|
1030
|
+
"data-test-id": "CT_Component_ClearInput",
|
1031
|
+
display: "flex",
|
1032
|
+
alignItems: "center",
|
1033
|
+
justifyContent: "center",
|
1034
|
+
width: "16px",
|
1035
|
+
mr: "10px",
|
1036
|
+
children: [
|
1037
|
+
withClear && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1038
|
+
import_react22.Box,
|
1039
|
+
{
|
1040
|
+
display: "flex",
|
1041
|
+
justifyContent: "center",
|
1042
|
+
onClick: !isDisabled ? onClear : void 0,
|
1043
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.Close, { size: 4, color: iconColor })
|
1045
|
+
}
|
1046
|
+
),
|
1047
|
+
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1048
|
+
import_react22.Box,
|
1049
|
+
{
|
1050
|
+
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
1051
|
+
onClick: () => {
|
1052
|
+
if (!isDisabled) setIsShowPassword(true);
|
1053
|
+
},
|
1054
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1055
|
+
display: "flex",
|
1056
|
+
justifyContent: "center",
|
1057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.EyeOff, { size: 4, color: iconColor })
|
1058
|
+
}
|
1059
|
+
),
|
1060
|
+
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1061
|
+
import_react22.Box,
|
1062
|
+
{
|
1063
|
+
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
1064
|
+
onClick: () => {
|
1065
|
+
if (!isDisabled) setIsShowPassword(false);
|
1066
|
+
},
|
1067
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1068
|
+
display: "flex",
|
1069
|
+
justifyContent: "center",
|
1070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.Eye, { size: 4, color: iconColor })
|
1071
|
+
}
|
1072
|
+
),
|
1073
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(loader_default, { size: "sm" })
|
1074
|
+
]
|
1075
|
+
}
|
1076
|
+
),
|
1077
|
+
addOnRight
|
1078
|
+
]
|
1079
|
+
}
|
1080
|
+
)
|
1076
1081
|
}
|
1077
|
-
)
|
1082
|
+
)
|
1078
1083
|
}
|
1079
1084
|
);
|
1080
1085
|
});
|
@@ -1121,12 +1126,6 @@ var Counter = ({
|
|
1121
1126
|
helperText = "",
|
1122
1127
|
isReadOnly = false
|
1123
1128
|
}) => {
|
1124
|
-
const getFieldSize = () => {
|
1125
|
-
if (size2 === "xl") return "lg";
|
1126
|
-
if (size2 === "lg") return "md";
|
1127
|
-
if (size2 === "md") return "sm";
|
1128
|
-
return "xs";
|
1129
|
-
};
|
1130
1129
|
const decrement = () => {
|
1131
1130
|
onChange(value - 1);
|
1132
1131
|
};
|
@@ -1157,7 +1156,7 @@ var Counter = ({
|
|
1157
1156
|
isError,
|
1158
1157
|
isDisabled: disabled || max === 0,
|
1159
1158
|
textAlign: "center",
|
1160
|
-
size:
|
1159
|
+
size: size2,
|
1161
1160
|
min,
|
1162
1161
|
max,
|
1163
1162
|
onChange: handleChange,
|
@@ -2665,7 +2664,7 @@ function environmentName(env) {
|
|
2665
2664
|
|
2666
2665
|
// src/components/header/components/version.tsx
|
2667
2666
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
2668
|
-
var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
2667
|
+
var Version = ({ hideEnv, version, environment, onOpenModalRelease, versionStyle }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
2669
2668
|
version && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
2670
2669
|
badge_default,
|
2671
2670
|
{
|
@@ -2674,6 +2673,7 @@ var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__P
|
|
2674
2673
|
variant: "neutral-light",
|
2675
2674
|
onClick: onOpenModalRelease,
|
2676
2675
|
cursor: onOpenModalRelease ? "pointer" : "auto",
|
2676
|
+
...versionStyle,
|
2677
2677
|
children: version
|
2678
2678
|
}
|
2679
2679
|
),
|
@@ -2695,7 +2695,8 @@ Version.defaultProps = {
|
|
2695
2695
|
hideEnv: false,
|
2696
2696
|
environment: void 0,
|
2697
2697
|
version: void 0,
|
2698
|
-
onOpenModalRelease: void 0
|
2698
|
+
onOpenModalRelease: void 0,
|
2699
|
+
versionStyle: void 0
|
2699
2700
|
};
|
2700
2701
|
var version_default = Version;
|
2701
2702
|
|
@@ -2716,6 +2717,7 @@ var Header = ({
|
|
2716
2717
|
children,
|
2717
2718
|
profile,
|
2718
2719
|
bg = "white",
|
2720
|
+
versionStyle,
|
2719
2721
|
...props
|
2720
2722
|
}) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react45.Flex, { h: "auto", w: "full", alignItems: "center", justifyContent: profile ? "flex-end" : "space-between", pos: "relative", children: [
|
2721
2723
|
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react45.Flex, { alignItems: "center", children: [
|
@@ -2730,7 +2732,8 @@ var Header = ({
|
|
2730
2732
|
hideEnv,
|
2731
2733
|
version: data == null ? void 0 : data.version,
|
2732
2734
|
environment: data == null ? void 0 : data.environment,
|
2733
|
-
onOpenModalRelease
|
2735
|
+
onOpenModalRelease,
|
2736
|
+
versionStyle
|
2734
2737
|
}
|
2735
2738
|
)
|
2736
2739
|
] }),
|
@@ -2751,7 +2754,8 @@ Header.defaultProps = {
|
|
2751
2754
|
centerLogoSize: void 0,
|
2752
2755
|
hideEnv: false,
|
2753
2756
|
urlLogo: void 0,
|
2754
|
-
profile: void 0
|
2757
|
+
profile: void 0,
|
2758
|
+
versionStyle: void 0
|
2755
2759
|
};
|
2756
2760
|
var header_default = Header;
|
2757
2761
|
|
@@ -4981,19 +4985,25 @@ var baseStyle5 = definePartsStyle4({
|
|
4981
4985
|
});
|
4982
4986
|
var size = {
|
4983
4987
|
lg: (0, import_styled_system7.defineStyle)({
|
4984
|
-
|
4988
|
+
textStyle: "text.lg",
|
4985
4989
|
h: 12,
|
4986
4990
|
borderRadius: "sm"
|
4987
4991
|
}),
|
4988
4992
|
md: (0, import_styled_system7.defineStyle)({
|
4989
|
-
|
4993
|
+
textStyle: "text.md",
|
4990
4994
|
h: 10,
|
4991
4995
|
borderRadius: "sm"
|
4992
4996
|
}),
|
4993
4997
|
sm: (0, import_styled_system7.defineStyle)({
|
4994
|
-
|
4998
|
+
textStyle: "text.sm",
|
4995
4999
|
h: 9.5,
|
4996
5000
|
borderRadius: "sm"
|
5001
|
+
}),
|
5002
|
+
xs: (0, import_styled_system7.defineStyle)({
|
5003
|
+
textStyle: "text.sm",
|
5004
|
+
p: 1,
|
5005
|
+
h: 5.5,
|
5006
|
+
borderRadius: "sm"
|
4997
5007
|
})
|
4998
5008
|
};
|
4999
5009
|
var sizes2 = {
|
@@ -5008,6 +5018,10 @@ var sizes2 = {
|
|
5008
5018
|
sm: definePartsStyle4({
|
5009
5019
|
field: size.sm,
|
5010
5020
|
addon: size.sm
|
5021
|
+
}),
|
5022
|
+
xs: definePartsStyle4({
|
5023
|
+
field: size.xs,
|
5024
|
+
addon: size.xs
|
5011
5025
|
})
|
5012
5026
|
};
|
5013
5027
|
var outline = definePartsStyle4((props) => {
|