@stackloop/ui 2.0.2 → 2.0.4
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2776,7 +2776,7 @@ function u(...e) {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
const xe = Le.forwardRef(
|
|
2778
2778
|
({ variant: e = "primary", size: t = "md", loading: a, icon: o, className: n, children: l, disabled: s, ...c }, i) => {
|
|
2779
|
-
const m = "
|
|
2779
|
+
const m = "flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] w-auto", x = {
|
|
2780
2780
|
primary: "bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 shadow-sm",
|
|
2781
2781
|
secondary: "bg-secondary text-foreground hover:bg-border active:bg-border-dark",
|
|
2782
2782
|
outline: "bg-transparent text-primary border-2 border-primary hover:bg-secondary active:bg-border",
|
|
@@ -2813,24 +2813,28 @@ const mt = ae(
|
|
|
2813
2813
|
c.required && /* @__PURE__ */ r("span", { className: "text-error ml-1", children: "*" })
|
|
2814
2814
|
] }),
|
|
2815
2815
|
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
2816
|
-
o && /* @__PURE__ */ r("div", { className: "absolute
|
|
2816
|
+
o && /* @__PURE__ */ r("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { left: "14px", top: "50%", transform: "translateY(-50%)" }, children: o }),
|
|
2817
2817
|
/* @__PURE__ */ r(
|
|
2818
2818
|
"input",
|
|
2819
2819
|
{
|
|
2820
2820
|
ref: i,
|
|
2821
2821
|
type: h,
|
|
2822
2822
|
className: u(
|
|
2823
|
-
"w-full
|
|
2823
|
+
"w-full rounded-md border transition-all duration-200",
|
|
2824
2824
|
"bg-background text-foreground placeholder:text-foreground/50",
|
|
2825
2825
|
"focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
2826
2826
|
"disabled:bg-secondary disabled:cursor-not-allowed",
|
|
2827
2827
|
"touch-target text-base",
|
|
2828
2828
|
t && "border-error focus:ring-error",
|
|
2829
2829
|
!t && "border-border",
|
|
2830
|
-
o && "pl-11",
|
|
2831
|
-
(n || y) && "pr-11",
|
|
2832
2830
|
l
|
|
2833
2831
|
),
|
|
2832
|
+
style: {
|
|
2833
|
+
paddingTop: "12px",
|
|
2834
|
+
paddingBottom: "12px",
|
|
2835
|
+
paddingLeft: o ? "44px" : "16px",
|
|
2836
|
+
paddingRight: n || y ? "44px" : "16px"
|
|
2837
|
+
},
|
|
2834
2838
|
...c
|
|
2835
2839
|
}
|
|
2836
2840
|
),
|
|
@@ -2839,14 +2843,22 @@ const mt = ae(
|
|
|
2839
2843
|
{
|
|
2840
2844
|
type: "button",
|
|
2841
2845
|
onClick: () => x(!m),
|
|
2842
|
-
className: "absolute
|
|
2846
|
+
className: "absolute text-primary hover:text-primary-dark transition-colors",
|
|
2847
|
+
style: {
|
|
2848
|
+
right: "14px",
|
|
2849
|
+
top: "50%",
|
|
2850
|
+
transform: "translateY(-50%)",
|
|
2851
|
+
display: "inline-flex",
|
|
2852
|
+
alignItems: "center",
|
|
2853
|
+
justifyContent: "center"
|
|
2854
|
+
},
|
|
2843
2855
|
"aria-label": m ? "Hide password" : "Show password",
|
|
2844
2856
|
whileTap: { scale: 0.9 },
|
|
2845
2857
|
transition: { duration: 0.1 },
|
|
2846
2858
|
children: m ? /* @__PURE__ */ r(or, { className: "w-5 h-5" }) : /* @__PURE__ */ r(ar, { className: "w-5 h-5" })
|
|
2847
2859
|
}
|
|
2848
2860
|
),
|
|
2849
|
-
n && !y && /* @__PURE__ */ r("div", { className: "absolute
|
|
2861
|
+
n && !y && /* @__PURE__ */ r("div", { className: "absolute flex items-center pointer-events-none text-primary", style: { right: "14px", top: "50%", transform: "translateY(-50%)" }, children: n })
|
|
2850
2862
|
] }),
|
|
2851
2863
|
t && /* @__PURE__ */ r(
|
|
2852
2864
|
g.p,
|