@particle-academy/react-fancy 4.4.2 → 4.4.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.js CHANGED
@@ -2954,18 +2954,18 @@ function Field({
2954
2954
  ] });
2955
2955
  }
2956
2956
  var insidePaddingLeft = {
2957
- xs: "pl-7",
2958
- sm: "pl-8",
2959
- md: "pl-9",
2960
- lg: "pl-10",
2961
- xl: "pl-11"
2957
+ xs: "[&_input]:pl-7 [&_select]:pl-7 [&_textarea]:pl-7",
2958
+ sm: "[&_input]:pl-8 [&_select]:pl-8 [&_textarea]:pl-8",
2959
+ md: "[&_input]:pl-9 [&_select]:pl-9 [&_textarea]:pl-9",
2960
+ lg: "[&_input]:pl-10 [&_select]:pl-10 [&_textarea]:pl-10",
2961
+ xl: "[&_input]:pl-11 [&_select]:pl-11 [&_textarea]:pl-11"
2962
2962
  };
2963
2963
  var insidePaddingRight = {
2964
- xs: "pr-7",
2965
- sm: "pr-8",
2966
- md: "pr-9",
2967
- lg: "pr-10",
2968
- xl: "pr-11"
2964
+ xs: "[&_input]:pr-7 [&_select]:pr-7 [&_textarea]:pr-7",
2965
+ sm: "[&_input]:pr-8 [&_select]:pr-8 [&_textarea]:pr-8",
2966
+ md: "[&_input]:pr-9 [&_select]:pr-9 [&_textarea]:pr-9",
2967
+ lg: "[&_input]:pr-10 [&_select]:pr-10 [&_textarea]:pr-10",
2968
+ xl: "[&_input]:pr-11 [&_select]:pr-11 [&_textarea]:pr-11"
2969
2969
  };
2970
2970
  var affixOutsideClasses = "inline-flex items-center border border-zinc-300 bg-zinc-50 px-3 text-sm text-zinc-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400";
2971
2971
  function InputWrapper({
@@ -3004,7 +3004,7 @@ function InputWrapper({
3004
3004
  hasOutsidePrefix && !hasOutsideSuffix && "[&_input]:rounded-l-none [&_select]:rounded-l-none [&_textarea]:rounded-l-none",
3005
3005
  !hasOutsidePrefix && hasOutsideSuffix && "[&_input]:rounded-r-none [&_select]:rounded-r-none [&_textarea]:rounded-r-none",
3006
3006
  hasOutsidePrefix && hasOutsideSuffix && "[&_input]:rounded-none [&_select]:rounded-none [&_textarea]:rounded-none",
3007
- hasInsidePrefix && `[&_input]:${insidePaddingLeft[size]} [&_select]:${insidePaddingLeft[size]} [&_textarea]:${insidePaddingLeft[size]}`
3007
+ hasInsidePrefix && insidePaddingLeft[size]
3008
3008
  ),
3009
3009
  children
3010
3010
  }
@@ -3023,8 +3023,8 @@ function InputWrapper({
3023
3023
  {
3024
3024
  className: cn(
3025
3025
  "w-full",
3026
- hasInsidePrefix && `[&_input]:${insidePaddingLeft[size]} [&_select]:${insidePaddingLeft[size]} [&_textarea]:${insidePaddingLeft[size]}`,
3027
- hasInsideSuffix && `[&_input]:${insidePaddingRight[size]} [&_select]:${insidePaddingRight[size]} [&_textarea]:${insidePaddingRight[size]}`
3026
+ hasInsidePrefix && insidePaddingLeft[size],
3027
+ hasInsideSuffix && insidePaddingRight[size]
3028
3028
  ),
3029
3029
  children
3030
3030
  }
@@ -3212,7 +3212,11 @@ var Textarea = forwardRef(
3212
3212
  );
3213
3213
  Textarea.displayName = "Textarea";
3214
3214
  function Portal({ children, container }) {
3215
- if (typeof document === "undefined") return null;
3215
+ const [mounted, setMounted] = useState(false);
3216
+ useEffect(() => {
3217
+ setMounted(true);
3218
+ }, []);
3219
+ if (!mounted || typeof document === "undefined") return null;
3216
3220
  const target = container ?? document.body;
3217
3221
  return createPortal(
3218
3222
  /* @__PURE__ */ jsx(PortalDarkWrapper, { children }),