@sarunyu/system-one 3.0.0 → 3.0.2
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 +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/src/components/input.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2562,18 +2562,18 @@ const Input = forwardRef(function Input2({
|
|
|
2562
2562
|
const isFocus = state === "focus";
|
|
2563
2563
|
const isFilled = currentValue.length > 0;
|
|
2564
2564
|
const bg = isDisabled ? "bg-disabled-bg" : "bg-background";
|
|
2565
|
-
const floatLabel = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2566
|
-
const filledValue = isDisabled ? "var(--disabled)" : "var(--foreground)";
|
|
2567
|
-
const unitColor = isDisabled ? "var(--disabled)" : "var(--muted-foreground)";
|
|
2565
|
+
const floatLabel = isDisabled ? "var(--disabled, #99a1af)" : "var(--muted-foreground, #6a7282)";
|
|
2566
|
+
const filledValue = isDisabled ? "var(--disabled, #99a1af)" : "var(--foreground, #101828)";
|
|
2567
|
+
const unitColor = isDisabled ? "var(--disabled, #99a1af)" : "var(--muted-foreground, #6a7282)";
|
|
2568
2568
|
const borderInset = isFocus || isError ? "-1px" : "0px";
|
|
2569
2569
|
const borderRad = isFocus || isError ? "9px" : "8px";
|
|
2570
|
-
const borderColor = isDisabled ? "var(--border-disabled)" : isError ? "var(--destructive)" : isFocus ? "var(--primary-action)" : "var(--border)";
|
|
2570
|
+
const borderColor = isDisabled ? "var(--border-disabled, rgba(0, 0, 0, 0.05))" : isError ? "var(--destructive, #e7000b)" : isFocus ? "var(--primary-action, #0a6ee7)" : "var(--border, rgba(0, 0, 0, 0.1))";
|
|
2571
2571
|
const hasRight = Boolean(rightIcon) || Boolean(unit);
|
|
2572
2572
|
const padding = isFilled ? "px-[14px] py-[6px]" : hasRight ? "px-[14px] py-[14px]" : "p-[14px]";
|
|
2573
2573
|
const charCount = currentValue.length;
|
|
2574
2574
|
const showBelow = isError || Boolean(helperText) || showCount;
|
|
2575
2575
|
const leftText = isError ? errorMessage : helperText ?? "";
|
|
2576
|
-
const leftColor = isError ? "var(--destructive)" : "var(--muted-foreground)";
|
|
2576
|
+
const leftColor = isError ? "var(--destructive, #e7000b)" : "var(--muted-foreground, #6a7282)";
|
|
2577
2577
|
const handleChange = (e) => {
|
|
2578
2578
|
if (isDisabled) return;
|
|
2579
2579
|
let next = e.target.value;
|
|
@@ -2593,7 +2593,7 @@ const Input = forwardRef(function Input2({
|
|
|
2593
2593
|
};
|
|
2594
2594
|
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]");
|
|
2595
2595
|
const inputCaretStyle = {
|
|
2596
|
-
caretColor: "var(--caret-color)"
|
|
2596
|
+
caretColor: "var(--caret-color, #1447e6)"
|
|
2597
2597
|
};
|
|
2598
2598
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-1 w-full", className), children: [
|
|
2599
2599
|
/* @__PURE__ */ jsxs(
|
|
@@ -2641,7 +2641,7 @@ const Input = forwardRef(function Input2({
|
|
|
2641
2641
|
{
|
|
2642
2642
|
className: "text-xs leading-4",
|
|
2643
2643
|
style: {
|
|
2644
|
-
color: isDisabled ? "var(--disabled)" : "var(--error-dark)"
|
|
2644
|
+
color: isDisabled ? "var(--disabled, #99a1af)" : "var(--error-dark, #c10007)"
|
|
2645
2645
|
},
|
|
2646
2646
|
children: " *"
|
|
2647
2647
|
}
|
|
@@ -2671,7 +2671,7 @@ const Input = forwardRef(function Input2({
|
|
|
2671
2671
|
style: isFilled ? { ...inputStyleProp, color: filledValue, ...inputCaretStyle } : {
|
|
2672
2672
|
...inputStyleProp,
|
|
2673
2673
|
color: "transparent",
|
|
2674
|
-
caretColor: isFocus ? "var(--caret-color)" : "transparent",
|
|
2674
|
+
caretColor: isFocus ? "var(--caret-color, #1447e6)" : "transparent",
|
|
2675
2675
|
padding: hasRight ? "12px 14px" : "14px"
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
@@ -2714,7 +2714,7 @@ const Input = forwardRef(function Input2({
|
|
|
2714
2714
|
"span",
|
|
2715
2715
|
{
|
|
2716
2716
|
className: "shrink-0 text-right whitespace-nowrap",
|
|
2717
|
-
style: { color: "var(--muted-foreground)" },
|
|
2717
|
+
style: { color: "var(--muted-foreground, #6a7282)" },
|
|
2718
2718
|
children: [
|
|
2719
2719
|
charCount,
|
|
2720
2720
|
"/",
|
|
@@ -3076,7 +3076,7 @@ const sizeStyles = {
|
|
|
3076
3076
|
},
|
|
3077
3077
|
small: {
|
|
3078
3078
|
container: "px-1 py-0.5",
|
|
3079
|
-
text: "text-
|
|
3079
|
+
text: "text-[9px] leading-3",
|
|
3080
3080
|
closeIcon: "h-3.5 w-3.5",
|
|
3081
3081
|
closeButton: "h-3.5 w-3.5"
|
|
3082
3082
|
}
|