@digilogiclabs/saas-factory-ui 0.13.1 → 0.13.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.d.mts CHANGED
@@ -286,8 +286,10 @@ interface SuccessAnimationProps {
286
286
  playSound?: boolean;
287
287
  /** Custom sound URL */
288
288
  soundUrl?: string;
289
+ /** Additional HTML attributes for the container */
290
+ containerProps?: Omit<React.HTMLAttributes<HTMLDivElement>, 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onAnimationStart' | 'onAnimationEnd'>;
289
291
  }
290
- declare function SuccessAnimation({ onComplete, duration, type, message, showMessage, size, className, playSound, soundUrl }: SuccessAnimationProps): react_jsx_runtime.JSX.Element;
292
+ declare function SuccessAnimation({ onComplete, duration, type, message, showMessage, size, className, playSound, soundUrl, containerProps }: SuccessAnimationProps): react_jsx_runtime.JSX.Element;
291
293
  declare const SuccessCheckmark: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
292
294
  declare const ErrorAnimation: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
293
295
  declare const WarningAnimation: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
@@ -731,14 +733,14 @@ interface StackProps extends React$1.HTMLAttributes<HTMLDivElement> {
731
733
  declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
732
734
 
733
735
  declare const heroVariants: (props?: ({
734
- height?: "auto" | "compact" | "responsive" | "screen" | "50vh" | "60vh" | "75vh" | "80vh" | null | undefined;
736
+ height?: "auto" | "screen" | "compact" | "responsive" | "50vh" | "60vh" | "75vh" | "80vh" | null | undefined;
735
737
  backgroundType?: "none" | "video" | "image" | "pattern" | "gradient" | null | undefined;
736
738
  contentAlignment?: "center" | "top" | "right" | "bottom" | "left" | "bottom-right" | "bottom-left" | null | undefined;
737
739
  overlay?: "none" | "medium" | "dark" | "light" | "gradient" | null | undefined;
738
740
  } & class_variance_authority_types.ClassProp) | undefined) => string;
739
741
  declare const contentVariants: (props?: ({
740
742
  maxWidth?: "sm" | "md" | "lg" | "xl" | "mobile" | "full" | "2xl" | "3xl" | "4xl" | null | undefined;
741
- mobileTextSize?: "compact" | "standard" | "large" | "hero" | null | undefined;
743
+ mobileTextSize?: "large" | "compact" | "standard" | "hero" | null | undefined;
742
744
  } & class_variance_authority_types.ClassProp) | undefined) => string;
743
745
  interface MobileHeroProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof heroVariants> {
744
746
  backgroundImage?: string;
@@ -1004,6 +1006,8 @@ interface PageTransitionProps {
1004
1006
  onTransitionStart?: () => void;
1005
1007
  onTransitionComplete?: () => void;
1006
1008
  key?: string | number;
1009
+ /** Additional HTML attributes for the container */
1010
+ containerProps?: Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onAnimationStart' | 'onAnimationEnd' | 'onTransitionStart' | 'onTransitionEnd' | 'onDrag' | 'onDragStart' | 'onDragEnd'>;
1007
1011
  }
1008
1012
  declare const PageTransition: React__default.FC<PageTransitionProps>;
1009
1013
  declare const withPageTransition: (Component: React__default.ComponentType<any>, transitionProps?: Partial<PageTransitionProps>) => {
@@ -1152,6 +1156,8 @@ interface NetworkAwareContentProps {
1152
1156
  onNetworkChange?: (networkInfo: NetworkInfo) => void;
1153
1157
  loadingComponent?: ReactNode;
1154
1158
  fallbackToDefault?: boolean;
1159
+ /** Additional HTML attributes for the container */
1160
+ containerProps?: React__default.HTMLAttributes<HTMLDivElement>;
1155
1161
  }
1156
1162
  declare const NetworkAwareContent: React__default.FC<NetworkAwareContentProps>;
1157
1163
  declare const useNetworkInfo: () => NetworkInfo | null;
package/dist/index.d.ts CHANGED
@@ -286,8 +286,10 @@ interface SuccessAnimationProps {
286
286
  playSound?: boolean;
287
287
  /** Custom sound URL */
288
288
  soundUrl?: string;
289
+ /** Additional HTML attributes for the container */
290
+ containerProps?: Omit<React.HTMLAttributes<HTMLDivElement>, 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onAnimationStart' | 'onAnimationEnd'>;
289
291
  }
290
- declare function SuccessAnimation({ onComplete, duration, type, message, showMessage, size, className, playSound, soundUrl }: SuccessAnimationProps): react_jsx_runtime.JSX.Element;
292
+ declare function SuccessAnimation({ onComplete, duration, type, message, showMessage, size, className, playSound, soundUrl, containerProps }: SuccessAnimationProps): react_jsx_runtime.JSX.Element;
291
293
  declare const SuccessCheckmark: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
292
294
  declare const ErrorAnimation: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
293
295
  declare const WarningAnimation: (props: Omit<SuccessAnimationProps, "type">) => react_jsx_runtime.JSX.Element;
@@ -731,14 +733,14 @@ interface StackProps extends React$1.HTMLAttributes<HTMLDivElement> {
731
733
  declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
732
734
 
733
735
  declare const heroVariants: (props?: ({
734
- height?: "auto" | "compact" | "responsive" | "screen" | "50vh" | "60vh" | "75vh" | "80vh" | null | undefined;
736
+ height?: "auto" | "screen" | "compact" | "responsive" | "50vh" | "60vh" | "75vh" | "80vh" | null | undefined;
735
737
  backgroundType?: "none" | "video" | "image" | "pattern" | "gradient" | null | undefined;
736
738
  contentAlignment?: "center" | "top" | "right" | "bottom" | "left" | "bottom-right" | "bottom-left" | null | undefined;
737
739
  overlay?: "none" | "medium" | "dark" | "light" | "gradient" | null | undefined;
738
740
  } & class_variance_authority_types.ClassProp) | undefined) => string;
739
741
  declare const contentVariants: (props?: ({
740
742
  maxWidth?: "sm" | "md" | "lg" | "xl" | "mobile" | "full" | "2xl" | "3xl" | "4xl" | null | undefined;
741
- mobileTextSize?: "compact" | "standard" | "large" | "hero" | null | undefined;
743
+ mobileTextSize?: "large" | "compact" | "standard" | "hero" | null | undefined;
742
744
  } & class_variance_authority_types.ClassProp) | undefined) => string;
743
745
  interface MobileHeroProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof heroVariants> {
744
746
  backgroundImage?: string;
@@ -1004,6 +1006,8 @@ interface PageTransitionProps {
1004
1006
  onTransitionStart?: () => void;
1005
1007
  onTransitionComplete?: () => void;
1006
1008
  key?: string | number;
1009
+ /** Additional HTML attributes for the container */
1010
+ containerProps?: Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onAnimationStart' | 'onAnimationEnd' | 'onTransitionStart' | 'onTransitionEnd' | 'onDrag' | 'onDragStart' | 'onDragEnd'>;
1007
1011
  }
1008
1012
  declare const PageTransition: React__default.FC<PageTransitionProps>;
1009
1013
  declare const withPageTransition: (Component: React__default.ComponentType<any>, transitionProps?: Partial<PageTransitionProps>) => {
@@ -1152,6 +1156,8 @@ interface NetworkAwareContentProps {
1152
1156
  onNetworkChange?: (networkInfo: NetworkInfo) => void;
1153
1157
  loadingComponent?: ReactNode;
1154
1158
  fallbackToDefault?: boolean;
1159
+ /** Additional HTML attributes for the container */
1160
+ containerProps?: React__default.HTMLAttributes<HTMLDivElement>;
1155
1161
  }
1156
1162
  declare const NetworkAwareContent: React__default.FC<NetworkAwareContentProps>;
1157
1163
  declare const useNetworkInfo: () => NetworkInfo | null;
package/dist/index.js CHANGED
@@ -2168,7 +2168,8 @@ function SuccessAnimation({
2168
2168
  size = "md",
2169
2169
  className,
2170
2170
  playSound = true,
2171
- soundUrl
2171
+ soundUrl,
2172
+ containerProps
2172
2173
  }) {
2173
2174
  const [isVisible, setIsVisible] = (0, import_react3.useState)(true);
2174
2175
  const sizeClasses = {
@@ -2239,6 +2240,7 @@ function SuccessAnimation({
2239
2240
  animate: { opacity: 0, scale: 0.8 },
2240
2241
  transition: { duration: 0.3 },
2241
2242
  className: cn("flex flex-col items-center justify-center", className),
2243
+ ...containerProps,
2242
2244
  children: [
2243
2245
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn(
2244
2246
  "rounded-full border-2 flex items-center justify-center",
@@ -2262,6 +2264,7 @@ function SuccessAnimation({
2262
2264
  // Spring-like easing
2263
2265
  },
2264
2266
  className: cn("flex flex-col items-center justify-center", className),
2267
+ ...containerProps,
2265
2268
  children: [
2266
2269
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2267
2270
  import_framer_motion4.motion.div,
@@ -6578,7 +6581,8 @@ var PageTransition = ({
6578
6581
  reduceMotion = false,
6579
6582
  onTransitionStart,
6580
6583
  onTransitionComplete,
6581
- key
6584
+ key,
6585
+ containerProps
6582
6586
  }) => {
6583
6587
  const prefersReducedMotion = import_react15.default.useMemo(() => {
6584
6588
  if (typeof window === "undefined") return false;
@@ -6611,6 +6615,7 @@ var PageTransition = ({
6611
6615
  height: "100%",
6612
6616
  position: "relative"
6613
6617
  },
6618
+ ...containerProps,
6614
6619
  children
6615
6620
  },
6616
6621
  key || "page-transition"
@@ -7794,7 +7799,8 @@ var NetworkAwareContent = ({
7794
7799
  respectSaveData = true,
7795
7800
  onNetworkChange,
7796
7801
  loadingComponent,
7797
- fallbackToDefault = true
7802
+ fallbackToDefault = true,
7803
+ containerProps
7798
7804
  }) => {
7799
7805
  const [networkInfo, setNetworkInfo] = (0, import_react21.useState)(null);
7800
7806
  const [isLoading, setIsLoading] = (0, import_react21.useState)(true);
@@ -7823,13 +7829,13 @@ var NetworkAwareContent = ({
7823
7829
  };
7824
7830
  }, [updateNetworkInfo]);
7825
7831
  if (isLoading || !networkInfo) {
7826
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("flex items-center justify-center p-4", className), children: loadingComponent || /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "animate-pulse", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "h-4 bg-gray-200 rounded w-32" }) }) });
7832
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("flex items-center justify-center p-4", className), ...containerProps, children: loadingComponent || /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "animate-pulse", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "h-4 bg-gray-200 rounded w-32" }) }) });
7827
7833
  }
7828
7834
  if (!networkInfo.online) {
7829
7835
  if (showOnOffline) {
7830
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children: showOnOffline });
7836
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children: showOnOffline });
7831
7837
  }
7832
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("text-center p-4 bg-red-50 border border-red-200 rounded", className), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-red-800", children: [
7838
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("text-center p-4 bg-red-50 border border-red-200 rounded", className), ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-red-800", children: [
7833
7839
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { className: "w-6 h-6 mx-auto mb-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M18.364 5.636l-12.728 12.728m0-12.728l12.728 12.728" }) }),
7834
7840
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "font-medium", children: "No internet connection" }),
7835
7841
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm", children: "Please check your connection and try again" })
@@ -7837,12 +7843,12 @@ var NetworkAwareContent = ({
7837
7843
  }
7838
7844
  if (respectSaveData && networkInfo.saveData) {
7839
7845
  if (showOnSlow) {
7840
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children: showOnSlow });
7846
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children: showOnSlow });
7841
7847
  }
7842
7848
  if (fallbackToDefault) {
7843
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children });
7849
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children });
7844
7850
  }
7845
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("text-center p-4 bg-yellow-50 border border-yellow-200 rounded", className), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-yellow-800", children: [
7851
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: cn("text-center p-4 bg-yellow-50 border border-yellow-200 rounded", className), ...containerProps, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-yellow-800", children: [
7846
7852
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { className: "w-6 h-6 mx-auto mb-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" }) }),
7847
7853
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "font-medium", children: "Data saver mode enabled" }),
7848
7854
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm", children: "Showing minimal content to save data" })
@@ -7851,12 +7857,12 @@ var NetworkAwareContent = ({
7851
7857
  const isFastNetwork = fastThreshold.includes(networkInfo.speed) || networkInfo.downlink >= 10;
7852
7858
  const isSlowNetwork = slowThreshold.includes(networkInfo.speed) || networkInfo.downlink < 1.5;
7853
7859
  if (isFastNetwork && showOnFast) {
7854
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children: showOnFast });
7860
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children: showOnFast });
7855
7861
  }
7856
7862
  if (isSlowNetwork && showOnSlow) {
7857
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children: showOnSlow });
7863
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children: showOnSlow });
7858
7864
  }
7859
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, children });
7865
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className, ...containerProps, children });
7860
7866
  };
7861
7867
  var useNetworkInfo = () => {
7862
7868
  const [networkInfo, setNetworkInfo] = (0, import_react21.useState)(null);