@edux-design/forms 0.0.2 → 0.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.js CHANGED
@@ -123,7 +123,7 @@ var Input = (0, import_react4.forwardRef)(
123
123
  }, ref) => {
124
124
  const { labelHTMLForId } = useFieldContext();
125
125
  const hasValue = Boolean(props.value);
126
- const defaults = "h-[44px] w-full border-2 rounded-md border-border-base focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out";
126
+ const defaults = "h-[44px] w-full border-2 rounded-md border-border-base focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out pl-5";
127
127
  const fonts = "font-normal text-base";
128
128
  const variants = {
129
129
  primary: "hover:border-2 hover:border-border-primary-base focus:border-2 focus:border-border-primary-base focus-within:border-2 focus-within:border-border-primary-base",
@@ -137,7 +137,8 @@ var Input = (0, import_react4.forwardRef)(
137
137
  fonts,
138
138
  variants[variant],
139
139
  startIcon && "pl-10",
140
- (clearable || endIcon) && "pr-10"
140
+ clearable && endIcon && "pr-10",
141
+ clearable && !endIcon && "pr-5"
141
142
  );
142
143
  return /* @__PURE__ */ import_react4.default.createElement("div", { className: "w-full relative flex items-center" }, startIcon && /* @__PURE__ */ import_react4.default.createElement(
143
144
  "span",
@@ -168,7 +169,7 @@ var Input = (0, import_react4.forwardRef)(
168
169
  return (_a = props.onChange) == null ? void 0 : _a.call(props, { target: { value: "" } });
169
170
  },
170
171
  className: (0, import_utils.cx)(
171
- clearable && hasValue ? "right-9" : "right-3",
172
+ clearable && hasValue && endIcon ? "right-9" : "right-3",
172
173
  "absolute flex items-center p-1 rounded-full outline-none",
173
174
  "transition-all duration-300 ease-in-out",
174
175
  hasValue ? "opacity-100 scale-100" : "opacity-0 scale-90 pointer-events-none",
package/dist/index.mjs CHANGED
@@ -92,7 +92,7 @@ var Input = forwardRef(
92
92
  }, ref) => {
93
93
  const { labelHTMLForId } = useFieldContext();
94
94
  const hasValue = Boolean(props.value);
95
- const defaults = "h-[44px] w-full border-2 rounded-md border-border-base focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out";
95
+ const defaults = "h-[44px] w-full border-2 rounded-md border-border-base focus:shadow-focus focus-visible:shadow-focus outline-none transition-all duration-300 ease-in-out pl-5";
96
96
  const fonts = "font-normal text-base";
97
97
  const variants = {
98
98
  primary: "hover:border-2 hover:border-border-primary-base focus:border-2 focus:border-border-primary-base focus-within:border-2 focus-within:border-border-primary-base",
@@ -106,7 +106,8 @@ var Input = forwardRef(
106
106
  fonts,
107
107
  variants[variant],
108
108
  startIcon && "pl-10",
109
- (clearable || endIcon) && "pr-10"
109
+ clearable && endIcon && "pr-10",
110
+ clearable && !endIcon && "pr-5"
110
111
  );
111
112
  return /* @__PURE__ */ React3.createElement("div", { className: "w-full relative flex items-center" }, startIcon && /* @__PURE__ */ React3.createElement(
112
113
  "span",
@@ -137,7 +138,7 @@ var Input = forwardRef(
137
138
  return (_a = props.onChange) == null ? void 0 : _a.call(props, { target: { value: "" } });
138
139
  },
139
140
  className: cx(
140
- clearable && hasValue ? "right-9" : "right-3",
141
+ clearable && hasValue && endIcon ? "right-9" : "right-3",
141
142
  "absolute flex items-center p-1 rounded-full outline-none",
142
143
  "transition-all duration-300 ease-in-out",
143
144
  hasValue ? "opacity-100 scale-100" : "opacity-0 scale-90 pointer-events-none",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edux-design/forms",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],