@aivex/ui 1.2.0-dev.5 → 1.2.0-dev.7
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/Textarea/Textarea.d.ts +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -21
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2936,9 +2936,12 @@ function ul({ className: e, orientation: t = "vertical", ref: n, ...r }) {
|
|
|
2936
2936
|
return /* @__PURE__ */ q(ol, {
|
|
2937
2937
|
ref: n,
|
|
2938
2938
|
orientation: t,
|
|
2939
|
-
className: R("aivex:z-20 aivex:flex aivex:touch-none aivex:select-none aivex:p-
|
|
2939
|
+
className: R("aivex:z-20 aivex:flex aivex:touch-none aivex:select-none aivex:rounded-full aivex:p-2xs aivex:transition-colors", t === "vertical" && "aivex:h-full aivex:w-2.5", t === "horizontal" && "aivex:h-2.5 aivex:flex-col", e),
|
|
2940
2940
|
...r,
|
|
2941
|
-
children: /* @__PURE__ */
|
|
2941
|
+
children: /* @__PURE__ */ J(sl, {
|
|
2942
|
+
className: "aivex:group aivex:relative aivex:flex-1 aivex:cursor-pointer aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-primary",
|
|
2943
|
+
children: [/* @__PURE__ */ q("span", { className: "aivex:absolute aivex:inset-0 aivex:bg-icon-tertiary aivex:opacity-50" }), /* @__PURE__ */ q(br, { variant: "strong" })]
|
|
2944
|
+
})
|
|
2942
2945
|
});
|
|
2943
2946
|
}
|
|
2944
2947
|
//#endregion
|
|
@@ -8476,33 +8479,53 @@ function r_({ className: e, size: t = "sm", label: n, helperText: r, error: i, d
|
|
|
8476
8479
|
}
|
|
8477
8480
|
//#endregion
|
|
8478
8481
|
//#region src/components/Textarea/Textarea.tsx
|
|
8479
|
-
function i_({ className: e, label: t, helperText: n, error: r, disabled: i, size: a = "md", minHeight: o, fixedHeight: s, startContent: c, endContent: l, id: u, ref: d, onFocus: f, onBlur: p,
|
|
8480
|
-
let [
|
|
8481
|
-
|
|
8482
|
+
function i_({ className: e, label: t, helperText: n, error: r, disabled: i, size: a = "md", minHeight: o, fixedHeight: s, startContent: c, endContent: l, id: u, ref: d, onFocus: f, onBlur: p, maxLength: m, value: h, defaultValue: g, onChange: _, ...v }) {
|
|
8483
|
+
let [y, b] = K(!1), x = m != null, S = (e) => e == null ? 0 : String(e).length, [C, w] = K(() => S(h ?? g)), T = h == null ? C : S(h), E = !!r || x && T > m, D = (e) => {
|
|
8484
|
+
w(e.target.value.length), _?.(e);
|
|
8485
|
+
}, O = {};
|
|
8486
|
+
o !== void 0 && (O.minHeight = typeof o == "number" ? `${o}px` : o), s && o !== void 0 && (O.height = O.minHeight, O.maxHeight = O.minHeight);
|
|
8487
|
+
let k = /* @__PURE__ */ q("textarea", {
|
|
8488
|
+
ref: d,
|
|
8489
|
+
id: u,
|
|
8490
|
+
disabled: i,
|
|
8491
|
+
style: O,
|
|
8492
|
+
value: h,
|
|
8493
|
+
defaultValue: g,
|
|
8494
|
+
maxLength: x ? void 0 : m,
|
|
8495
|
+
className: R("aivex:w-full aivex:min-w-0 aivex:bg-transparent aivex:text-text-primary aivex:placeholder:text-text-tertiary aivex:outline-none", a === "sm" ? "aivex:text-body-md-regular" : "aivex:text-body-lg-regular", "aivex:resize-none aivex:overflow-auto", e),
|
|
8496
|
+
onChange: x ? D : _,
|
|
8497
|
+
onFocus: (e) => {
|
|
8498
|
+
b(!0), f?.(e);
|
|
8499
|
+
},
|
|
8500
|
+
onBlur: (e) => {
|
|
8501
|
+
b(!1), p?.(e);
|
|
8502
|
+
},
|
|
8503
|
+
...v
|
|
8504
|
+
});
|
|
8505
|
+
return /* @__PURE__ */ q($l, {
|
|
8482
8506
|
id: u,
|
|
8483
8507
|
label: t,
|
|
8484
8508
|
helperText: n,
|
|
8485
|
-
error:
|
|
8509
|
+
error: E,
|
|
8486
8510
|
disabled: i,
|
|
8487
|
-
focused:
|
|
8511
|
+
focused: y,
|
|
8488
8512
|
size: a,
|
|
8489
8513
|
layout: "block",
|
|
8490
8514
|
startContent: c,
|
|
8491
8515
|
endContent: l,
|
|
8492
|
-
children: /* @__PURE__ */
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
}
|
|
8504
|
-
|
|
8505
|
-
})
|
|
8516
|
+
children: x ? /* @__PURE__ */ J("div", {
|
|
8517
|
+
className: "aivex:flex aivex:w-full aivex:flex-col aivex:gap-xs",
|
|
8518
|
+
children: [k, /* @__PURE__ */ J("div", {
|
|
8519
|
+
className: "aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-2xs aivex:text-body-sm-regular aivex:whitespace-nowrap",
|
|
8520
|
+
children: [/* @__PURE__ */ q("span", {
|
|
8521
|
+
className: E ? "aivex:text-text-danger" : "aivex:text-text-tertiary",
|
|
8522
|
+
children: T
|
|
8523
|
+
}), /* @__PURE__ */ q("span", {
|
|
8524
|
+
className: "aivex:text-text-tertiary",
|
|
8525
|
+
children: `/ ${m}`
|
|
8526
|
+
})]
|
|
8527
|
+
})]
|
|
8528
|
+
}) : k
|
|
8506
8529
|
});
|
|
8507
8530
|
}
|
|
8508
8531
|
//#endregion
|