@ctlyst.id/internal-ui 4.1.5 → 4.1.7

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -498,6 +498,7 @@ import { Box as Box6, FormControl, FormErrorMessage, FormHelperText, FormLabel }
498
498
  import { jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
499
499
  var Field = (props) => {
500
500
  const {
501
+ id: id2,
501
502
  label,
502
503
  isError,
503
504
  errorMessage,
@@ -520,7 +521,7 @@ var Field = (props) => {
520
521
  };
521
522
  const helperColor = getHelperColor();
522
523
  const justifyHelper = getJustifyContentHelper();
523
- return /* @__PURE__ */ jsxs3(FormControl, { isInvalid: isError, ...boxProps, children: [
524
+ return /* @__PURE__ */ jsxs3(FormControl, { isInvalid: isError, id: id2, ...boxProps, children: [
524
525
  label && (typeof label === "string" ? /* @__PURE__ */ jsxs3(FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
525
526
  isRequired && /* @__PURE__ */ jsx17(Box6, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
526
527
  label
@@ -693,6 +694,7 @@ var InputField = React2.forwardRef((props, ref) => {
693
694
  return /* @__PURE__ */ jsx21(
694
695
  field_default,
695
696
  {
697
+ id: props.id || props.name,
696
698
  label,
697
699
  isSuccess,
698
700
  isError,
@@ -726,6 +728,7 @@ var InputField = React2.forwardRef((props, ref) => {
726
728
  ref,
727
729
  type: inputType,
728
730
  value,
731
+ "data-test-id": `CT_Component_InputField${props.name ? `_${props.name}` : ""}`,
729
732
  isDisabled,
730
733
  isSuccess,
731
734
  ...inputProps,
@@ -5470,9 +5473,9 @@ var TimeInput2 = forwardRef12(
5470
5473
  gap: 3,
5471
5474
  children: [
5472
5475
  /* @__PURE__ */ jsxs29(Flex17, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
5473
- /* @__PURE__ */ jsx63(InputTimeArea, { ...hoursProps }),
5476
+ /* @__PURE__ */ jsx63(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
5474
5477
  /* @__PURE__ */ jsx63("span", { children: ":" }),
5475
- /* @__PURE__ */ jsx63(InputTimeArea, { ...getInputProps("minutes") }),
5478
+ /* @__PURE__ */ jsx63(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
5476
5479
  seconds && /* @__PURE__ */ jsxs29(Fragment10, { children: [
5477
5480
  /* @__PURE__ */ jsx63("span", { children: ":" }),
5478
5481
  /* @__PURE__ */ jsx63(InputTimeArea, { ...getInputProps("seconds") })