@lax-wp/design-system 0.5.3 → 0.5.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.
@@ -6,8 +6,8 @@ type ClassValue = string | number | boolean | undefined | null | ClassValue[];
6
6
  export interface LogoLoaderProps {
7
7
  /** Additional CSS classes for the wrapper */
8
8
  classValue?: ClassValue;
9
- /** Whether dark mode is enabled */
10
- isDarkMode: boolean;
9
+ /** Whether dark mode is enabled. If not provided, checks if document has "dark" class */
10
+ isDarkMode?: boolean;
11
11
  }
12
12
  /**
13
13
  * LogoLoader displays an animated LAX logo with a loading bar
@@ -16,6 +16,7 @@ export interface LogoLoaderProps {
16
16
  * ```tsx
17
17
  * <LogoLoader isDarkMode={false} />
18
18
  * <LogoLoader isDarkMode={true} classValue="h-screen" />
19
+ * <LogoLoader /> // Auto-detects dark mode from document "dark" class
19
20
  * ```
20
21
  */
21
22
  export declare const LogoLoader: FC<LogoLoaderProps>;
package/dist/index.es.js CHANGED
@@ -14282,7 +14282,10 @@ const ls = () => /* @__PURE__ */ p(
14282
14282
  ) })
14283
14283
  ]
14284
14284
  }
14285
- ), ss = ({ classValue: t, isDarkMode: r }) => /* @__PURE__ */ e("div", { className: `${T(t)} flex justify-center items-center`, children: r ? /* @__PURE__ */ e(is, {}) : /* @__PURE__ */ e(ls, {}) });
14285
+ ), ss = ({ classValue: t, isDarkMode: r }) => {
14286
+ const n = r ?? document.documentElement.classList.contains("dark");
14287
+ return /* @__PURE__ */ e("div", { className: `${T(t)} flex justify-center items-center`, children: n ? /* @__PURE__ */ e(is, {}) : /* @__PURE__ */ e(ls, {}) });
14288
+ };
14286
14289
  ss.displayName = "LogoLoader";
14287
14290
  const Tn = xe(
14288
14291
  ({ item: t, variant: r, isLastItem: n = !1, onClick: a }, o) => {