@aivex/ui 1.1.0-dev.5 → 1.1.0-dev.6

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
@@ -7530,45 +7530,46 @@ function Ya({ className: e, label: t, helperText: n, error: r, disabled: i, size
7530
7530
  }
7531
7531
  //#endregion
7532
7532
  //#region src/components/Textbox/Textbox.tsx
7533
- function Xa({ className: e, label: t, helperText: n, error: r, disabled: s, clearable: c, leadingElement: l, trailingElement: u, size: d = "md", id: p, ref: m, value: h, defaultValue: _, onChange: v, onFocus: y, onBlur: b, ...x }) {
7534
- let [S, C] = f(!1), [w, T] = f(typeof _ == "string" ? _ : _?.toString() ?? ""), E = h !== void 0, D = E ? String(h ?? "") : w, O = c && D.length > 0;
7533
+ function Xa({ className: e, containerClassName: t, label: n, helperText: r, error: s, disabled: c, clearable: l, leadingElement: u, trailingElement: d, size: p = "md", id: m, ref: h, value: _, defaultValue: v, onChange: y, onFocus: b, onBlur: x, ...S }) {
7534
+ let [C, w] = f(!1), [T, E] = f(typeof v == "string" ? v : v?.toString() ?? ""), D = _ !== void 0, O = D ? String(_ ?? "") : T, k = l && O.length > 0;
7535
7535
  return /* @__PURE__ */ a(Z, {
7536
- id: p,
7537
- label: t,
7538
- helperText: n,
7539
- error: r,
7540
- disabled: s,
7541
- focused: S,
7542
- size: d,
7536
+ id: m,
7537
+ label: n,
7538
+ helperText: r,
7539
+ error: s,
7540
+ disabled: c,
7541
+ focused: C,
7542
+ size: p,
7543
7543
  layout: "inline",
7544
- leadingElement: l,
7545
- trailingElement: u || O ? /* @__PURE__ */ o(i, { children: [u, O && /* @__PURE__ */ a("button", {
7544
+ leadingElement: u,
7545
+ trailingElement: d || k ? /* @__PURE__ */ o(i, { children: [d, k && /* @__PURE__ */ a("button", {
7546
7546
  type: "button",
7547
7547
  onClick: () => {
7548
- E || T(""), v?.({ target: { value: "" } });
7548
+ D || E(""), y?.({ target: { value: "" } });
7549
7549
  },
7550
7550
  tabIndex: -1,
7551
7551
  className: "aivex:flex aivex:items-center aivex:justify-center aivex:text-text-tertiary aivex:hover:text-text-secondary aivex:transition-colors aivex:cursor-pointer",
7552
7552
  "aria-label": "입력값 삭제",
7553
- children: /* @__PURE__ */ a(F, { size: d === "sm" ? 14 : 16 })
7553
+ children: /* @__PURE__ */ a(F, { size: p === "sm" ? 14 : 16 })
7554
7554
  })] }) : void 0,
7555
+ containerClassName: t,
7555
7556
  children: /* @__PURE__ */ a("input", {
7556
- ref: m,
7557
- id: p,
7558
- disabled: s,
7559
- value: c ? D : h,
7560
- defaultValue: c ? void 0 : _,
7561
- onChange: c || E ? (e) => {
7562
- E || T(e.target.value), v?.(e);
7563
- } : v,
7564
- className: g("aivex:m-0 aivex:w-full aivex:min-w-0 aivex:appearance-none aivex:border-0 aivex:bg-transparent aivex:p-0 aivex:text-text-primary aivex:placeholder:text-text-tertiary aivex:outline-none", d === "sm" ? "aivex:text-body-md-regular" : "aivex:text-body-lg-regular", e),
7557
+ ref: h,
7558
+ id: m,
7559
+ disabled: c,
7560
+ value: l ? O : _,
7561
+ defaultValue: l ? void 0 : v,
7562
+ onChange: l || D ? (e) => {
7563
+ D || E(e.target.value), y?.(e);
7564
+ } : y,
7565
+ className: g("aivex:m-0 aivex:w-full aivex:min-w-0 aivex:appearance-none aivex:border-0 aivex:bg-transparent aivex:p-0 aivex:text-text-primary aivex:placeholder:text-text-tertiary aivex:outline-none", p === "sm" ? "aivex:text-body-md-regular" : "aivex:text-body-lg-regular", e),
7565
7566
  onFocus: (e) => {
7566
- C(!0), y?.(e);
7567
+ w(!0), b?.(e);
7567
7568
  },
7568
7569
  onBlur: (e) => {
7569
- C(!1), b?.(e);
7570
+ w(!1), x?.(e);
7570
7571
  },
7571
- ...x
7572
+ ...S
7572
7573
  })
7573
7574
  });
7574
7575
  }