@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/components/Textbox/Textbox.d.ts +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,
|
|
7534
|
-
let [
|
|
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:
|
|
7537
|
-
label:
|
|
7538
|
-
helperText:
|
|
7539
|
-
error:
|
|
7540
|
-
disabled:
|
|
7541
|
-
focused:
|
|
7542
|
-
size:
|
|
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:
|
|
7545
|
-
trailingElement:
|
|
7544
|
+
leadingElement: u,
|
|
7545
|
+
trailingElement: d || k ? /* @__PURE__ */ o(i, { children: [d, k && /* @__PURE__ */ a("button", {
|
|
7546
7546
|
type: "button",
|
|
7547
7547
|
onClick: () => {
|
|
7548
|
-
|
|
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:
|
|
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:
|
|
7557
|
-
id:
|
|
7558
|
-
disabled:
|
|
7559
|
-
value:
|
|
7560
|
-
defaultValue:
|
|
7561
|
-
onChange:
|
|
7562
|
-
|
|
7563
|
-
} :
|
|
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",
|
|
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
|
-
|
|
7567
|
+
w(!0), b?.(e);
|
|
7567
7568
|
},
|
|
7568
7569
|
onBlur: (e) => {
|
|
7569
|
-
|
|
7570
|
+
w(!1), x?.(e);
|
|
7570
7571
|
},
|
|
7571
|
-
...
|
|
7572
|
+
...S
|
|
7572
7573
|
})
|
|
7573
7574
|
});
|
|
7574
7575
|
}
|