@sfperusacdev/sf-ui 0.1.14 → 0.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/sf-ui.js CHANGED
@@ -1192,7 +1192,7 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
1192
1192
  return n;
1193
1193
  }) : window.classNames = n;
1194
1194
  })();
1195
- })))(), 1), X = ({ id: e, label: t, info: n, error: r, required: i = !0, onRefresh: a, loading: o = !1, children: s }) => /* @__PURE__ */ v("div", {
1195
+ })))(), 1), X = ({ id: e, label: t, info: n, infoPlacement: r = "left", error: i, required: a = !0, onRefresh: o, loading: s = !1, children: c }) => /* @__PURE__ */ v("div", {
1196
1196
  className: "grid gap-1.5",
1197
1197
  children: [
1198
1198
  t && /* @__PURE__ */ v("div", {
@@ -1203,7 +1203,7 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
1203
1203
  className: "text-sm font-medium text-slate-900",
1204
1204
  children: t
1205
1205
  }),
1206
- i && /* @__PURE__ */ _("span", {
1206
+ a && /* @__PURE__ */ _("span", {
1207
1207
  className: "text-sm font-medium text-red-500",
1208
1208
  children: "*"
1209
1209
  }),
@@ -1216,24 +1216,24 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
1216
1216
  children: /* @__PURE__ */ _(J, { size: 14 })
1217
1217
  }), /* @__PURE__ */ _("span", {
1218
1218
  role: "tooltip",
1219
- className: (0, Y.default)("pointer-events-none absolute left-1/2 top-full z-50 mt-1 hidden w-max max-w-64 -translate-x-1/2 rounded-md bg-slate-900 px-2 py-1.5 text-xs font-normal leading-relaxed text-white shadow-md", "group-hover:block group-focus-within:block"),
1219
+ className: (0, Y.default)("pointer-events-none absolute top-full z-50 mt-1 hidden w-max max-w-[20rem] rounded-md bg-slate-900 px-2 py-1.5 text-xs font-normal leading-relaxed text-white shadow-md", r === "right" ? "right-0" : "left-0", "group-hover:block group-focus-within:block"),
1220
1220
  children: n
1221
1221
  })]
1222
1222
  }),
1223
- a && /* @__PURE__ */ _("button", {
1223
+ o && /* @__PURE__ */ _("button", {
1224
1224
  type: "button",
1225
- onClick: a,
1225
+ onClick: o,
1226
1226
  "aria-label": "Actualizar",
1227
1227
  className: "inline-flex h-4 w-4 items-center justify-center rounded-full text-slate-400 hover:text-slate-700 focus:outline-none focus:ring-2 focus:ring-slate-200",
1228
- disabled: o,
1228
+ disabled: s,
1229
1229
  children: /* @__PURE__ */ _(Ge, { size: 14 })
1230
1230
  })
1231
1231
  ]
1232
1232
  }),
1233
- s,
1234
- r && /* @__PURE__ */ _("p", {
1233
+ c,
1234
+ i && /* @__PURE__ */ _("p", {
1235
1235
  className: "text-xs text-red-600",
1236
- children: r
1236
+ children: i
1237
1237
  })
1238
1238
  ]
1239
1239
  }), pt = (e) => /(^|\s)!?w-\S+/.test(e ?? ""), Z = ({ small: e, error: t, className: n, withRightIcon: r, disabled: i, readOnly: a }) => (0, Y.default)(!pt(n) && "w-full", "rounded-md border text-sm text-slate-900 shadow-sm outline-none", "placeholder:text-slate-400 focus:border-slate-400 focus:ring-2 focus:ring-slate-200", "disabled:cursor-not-allowed disabled:opacity-60", e ? "h-8 px-2" : "h-10 px-3", r && "pr-10", i || a ? "bg-slate-50" : "bg-white", t ? "border-red-500 focus:border-red-500 focus:ring-red-100" : "border-slate-300", n), mt = "transition-[border-color,box-shadow,background-color] duration-200 ease-out", ht = ({ small: e, error: t, className: n }) => (0, Y.default)("sf-input", "sf-input--textarea", e && "sf-input--sm", t && "sf-input--error", n), gt = ({ form: e, name: t, label: n, info: r, required: i, type: a = "text", className: o, placeholder: s, readOnly: c, onChange: l, icon: u, small: d, onIconClick: f, onRefresh: p }) => {
@@ -2598,7 +2598,7 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
2598
2598
  className: s,
2599
2599
  withRightIcon: !0,
2600
2600
  disabled: b
2601
- }), "flex items-center gap-1.5 text-left", o && V.length > 1 && "h-auto min-h-10 py-2"),
2601
+ }), "flex items-center gap-1.5 text-left", o && V.length > 1 && "h-auto min-h-[2.5rem] py-2"),
2602
2602
  children: [/* @__PURE__ */ _("span", {
2603
2603
  className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
2604
2604
  children: V.length ? o ? /* @__PURE__ */ v(g, { children: [V.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ v("span", {
@@ -2899,7 +2899,7 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
2899
2899
  })]
2900
2900
  }),
2901
2901
  /* @__PURE__ */ v("div", {
2902
- className: "flex min-h-10 items-center justify-between gap-3 border-b border-slate-200 bg-slate-50/70 px-3 py-2",
2902
+ className: "flex min-h-[2.5rem] items-center justify-between gap-3 border-b border-slate-200 bg-slate-50/70 px-3 py-2",
2903
2903
  children: [/* @__PURE__ */ v("div", {
2904
2904
  className: "flex min-w-0 flex-1 items-center gap-2",
2905
2905
  children: [/* @__PURE__ */ _("span", {
@@ -2908,7 +2908,7 @@ var Y = /* @__PURE__ */ Te((/* @__PURE__ */ Ce(((e, t) => {
2908
2908
  }), P.length > 0 && /* @__PURE__ */ v("div", {
2909
2909
  className: "flex min-w-0 flex-1 gap-1 overflow-hidden",
2910
2910
  children: [P.slice(0, 3).map((e) => /* @__PURE__ */ v("span", {
2911
- className: "inline-flex min-w-0 max-w-36 items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-xs text-slate-700",
2911
+ className: "inline-flex min-w-0 max-w-[9rem] items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-xs text-slate-700",
2912
2912
  children: [/* @__PURE__ */ _("span", {
2913
2913
  className: "truncate",
2914
2914
  children: e.label
@@ -4156,7 +4156,7 @@ function $n({ id: e, stateStore: t, data: n, columns: r, grouping: i, defaultGro
4156
4156
  "aria-hidden": "true"
4157
4157
  })
4158
4158
  }), je === n && /* @__PURE__ */ _("div", {
4159
- className: "sf-table-row-action-menu min-w-40",
4159
+ className: "sf-table-row-action-menu min-w-[10rem]",
4160
4160
  children: t.map((t) => /* @__PURE__ */ v("button", {
4161
4161
  type: "button",
4162
4162
  disabled: t.disabled,
@@ -4696,7 +4696,7 @@ function $n({ id: e, stateStore: t, data: n, columns: r, grouping: i, defaultGro
4696
4696
  "aria-hidden": "true"
4697
4697
  })
4698
4698
  }), Ne && /* @__PURE__ */ _("div", {
4699
- className: "sf-table-row-action-menu min-w-50",
4699
+ className: "sf-table-row-action-menu min-w-[12.5rem]",
4700
4700
  children: e.map((e) => /* @__PURE__ */ v("button", {
4701
4701
  type: "button",
4702
4702
  disabled: e.disabled,