@yeverlibs/ds 1.1.15 → 1.1.17

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
@@ -7166,7 +7166,6 @@ var TimeInput = ({
7166
7166
  return `${String(hours).padStart(2, "0")}:${String(mins).padStart(2, "0")}`;
7167
7167
  };
7168
7168
  const initialTime = formatMinutesToTime(defaultValue ?? 0);
7169
- const value = reactHookForm.useWatch({ name, defaultValue: initialTime });
7170
7169
  React107.useEffect(() => {
7171
7170
  if (defaultValue !== void 0 && defaultValue !== null) {
7172
7171
  setValue(name, formatMinutesToTime(defaultValue));
@@ -7185,7 +7184,6 @@ var TimeInput = ({
7185
7184
  return formatMinutesToTime(totalMinutes);
7186
7185
  };
7187
7186
  const formatDescription = (time) => {
7188
- if (!time) return "0 minutos";
7189
7187
  const [hours, minutes] = time.split(":").map(Number);
7190
7188
  const totalMinutes = hours * 60 + minutes;
7191
7189
  if (hours > 0) {
@@ -7198,23 +7196,23 @@ var TimeInput = ({
7198
7196
  label,
7199
7197
  tooltip ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { text: tooltip }) : null
7200
7198
  ] }),
7201
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-8", children: [
7202
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-fit items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
7203
- reactHookForm.Controller,
7204
- {
7205
- name,
7206
- control,
7207
- defaultValue: initialTime,
7208
- render: ({ field }) => {
7209
- const handleIncrement = () => {
7210
- const newTime = adjustTime(field.value, step, maxTime);
7211
- setValue(name, newTime);
7212
- };
7213
- const handleDecrement = () => {
7214
- const newTime = adjustTime(field.value, -step, maxTime);
7215
- setValue(name, newTime);
7216
- };
7217
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7199
+ /* @__PURE__ */ jsxRuntime.jsx(
7200
+ reactHookForm.Controller,
7201
+ {
7202
+ name,
7203
+ control,
7204
+ defaultValue: initialTime,
7205
+ render: ({ field }) => {
7206
+ const handleIncrement = () => {
7207
+ const newTime = adjustTime(field.value, step, maxTime);
7208
+ setValue(name, newTime);
7209
+ };
7210
+ const handleDecrement = () => {
7211
+ const newTime = adjustTime(field.value, -step, maxTime);
7212
+ setValue(name, newTime);
7213
+ };
7214
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-8", children: [
7215
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-fit items-center", children: [
7218
7216
  /* @__PURE__ */ jsxRuntime.jsx(
7219
7217
  "button",
7220
7218
  {
@@ -7260,16 +7258,16 @@ var TimeInput = ({
7260
7258
  ) })
7261
7259
  }
7262
7260
  )
7263
- ] });
7264
- }
7261
+ ] }),
7262
+ description && /* @__PURE__ */ jsxRuntime.jsxs(FeedbackBadge, { $variant: "default", children: [
7263
+ "Enviado ",
7264
+ formatDescription(field.value || "00:00"),
7265
+ " ap\xF3s o abandono"
7266
+ ] })
7267
+ ] });
7265
7268
  }
7266
- ) }),
7267
- description && /* @__PURE__ */ jsxRuntime.jsxs(FeedbackBadge, { $variant: "default", children: [
7268
- "Enviado ",
7269
- formatDescription(value),
7270
- " ap\xF3s o abandono"
7271
- ] })
7272
- ] })
7269
+ }
7270
+ )
7273
7271
  ] });
7274
7272
  };
7275
7273
  var formatTime = (time) => {