@sarunyu/system-one 3.0.2 → 3.0.3
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 +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/src/components/input.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2581,18 +2581,18 @@ const Input = React.forwardRef(function Input2({
|
|
|
2581
2581
|
const isFocus = state === "focus";
|
|
2582
2582
|
const isFilled = currentValue.length > 0;
|
|
2583
2583
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2584
|
-
const floatLabel = isDisabled ? "var(--disabled
|
|
2585
|
-
const filledValue = isDisabled ? "var(--disabled
|
|
2586
|
-
const unitColor = isDisabled ? "var(--disabled
|
|
2584
|
+
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2585
|
+
const filledValue = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
2586
|
+
const unitColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2587
2587
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
2588
2588
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
2589
|
-
const borderColor = isDisabled ? "var(--border-disabled
|
|
2589
|
+
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--destructive)" : isFocus ? "var(--primary-action)" : "var(--border)";
|
|
2590
2590
|
const hasRight = Boolean(rightIcon) || Boolean(unit);
|
|
2591
2591
|
const padding = isFilled ? "px-[14px] py-[6px]" : hasRight ? "px-[14px] py-[14px]" : "p-[14px]";
|
|
2592
2592
|
const charCount = currentValue.length;
|
|
2593
2593
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
2594
2594
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2595
|
-
const leftColor = isError ? "var(--destructive
|
|
2595
|
+
const leftColor = isError ? "var(--destructive)" : "var(--muted-foreground)";
|
|
2596
2596
|
const handleChange = (e) => {
|
|
2597
2597
|
if (isDisabled) return;
|
|
2598
2598
|
let next = e.target.value;
|
|
@@ -2612,7 +2612,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2612
2612
|
};
|
|
2613
2613
|
const containerFlex = isFilled ? !hasRight ? "flex-col items-start justify-center" : rightIcon ? "flex items-center gap-[8px]" : "flex items-end gap-[8px]" : cn("flex items-center", hasRight && "gap-[8px]");
|
|
2614
2614
|
const inputCaretStyle = {
|
|
2615
|
-
caretColor: "var(--caret-color
|
|
2615
|
+
caretColor: "var(--caret-color)"
|
|
2616
2616
|
};
|
|
2617
2617
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col gap-1 w-full", className), children: [
|
|
2618
2618
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2660,7 +2660,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2660
2660
|
{
|
|
2661
2661
|
className: "text-xs leading-4",
|
|
2662
2662
|
style: {
|
|
2663
|
-
color: isDisabled ? "var(--disabled
|
|
2663
|
+
color: isDisabled ? "var(--disabled)" : "var(--error-dark)"
|
|
2664
2664
|
},
|
|
2665
2665
|
children: " *"
|
|
2666
2666
|
}
|
|
@@ -2690,7 +2690,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2690
2690
|
style: isFilled ? { ...inputStyleProp, color: filledValue, ...inputCaretStyle } : {
|
|
2691
2691
|
...inputStyleProp,
|
|
2692
2692
|
color: "transparent",
|
|
2693
|
-
caretColor: isFocus ? "var(--caret-color
|
|
2693
|
+
caretColor: isFocus ? "var(--caret-color)" : "transparent",
|
|
2694
2694
|
padding: hasRight ? "12px 14px" : "14px"
|
|
2695
2695
|
}
|
|
2696
2696
|
}
|
|
@@ -2733,7 +2733,7 @@ const Input = React.forwardRef(function Input2({
|
|
|
2733
2733
|
"span",
|
|
2734
2734
|
{
|
|
2735
2735
|
className: "shrink-0 text-right whitespace-nowrap",
|
|
2736
|
-
style: { color: "var(--muted-foreground
|
|
2736
|
+
style: { color: "var(--muted-foreground)" },
|
|
2737
2737
|
children: [
|
|
2738
2738
|
charCount,
|
|
2739
2739
|
"/",
|