@julseb-lib/react 0.1.60 → 0.1.61

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.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as LibColorsHover, ag as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, e as LibOverlays, f as LibAllColorsAndOverlays, l as LibSpacers, al as CssAlignContent, aj as CssAlignItems, ak as CssJustifyContent, ai as CssJustifyItems, F as LibMaxWidth, m as LibRadiuses, ao as CssObjectFit, v as LibButtonVariantExtended, k as LibShadows, ah as CssVerticalAlign, ae as DispatchState, a6 as TranslateLang, ab as ReactChildren, q as LibThemeNames, ac as ReactElement, t as LibLoaderVariant } from './global-D-4hL0jH.cjs';
1
+ import { c as LibColorsHover, ag as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, q as LibThemeNames, e as LibOverlays, f as LibAllColorsAndOverlays, l as LibSpacers, al as CssAlignContent, aj as CssAlignItems, ak as CssJustifyContent, ai as CssJustifyItems, F as LibMaxWidth, m as LibRadiuses, ao as CssObjectFit, v as LibButtonVariantExtended, k as LibShadows, ah as CssVerticalAlign, ae as DispatchState, a6 as TranslateLang, ab as ReactChildren, ac as ReactElement, t as LibLoaderVariant } from './global-D-4hL0jH.cjs';
2
2
  export { aw as designTokens } from './global-D-4hL0jH.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ClassNameValue } from 'tailwind-merge';
@@ -30,7 +30,7 @@ declare const genTextAllColor: Record<LibAllColors, string>;
30
30
 
31
31
  declare const genBgColor: Record<LibColors, string>;
32
32
  declare const genBgColorShort: Record<LibColorsShort, string>;
33
- declare const genBgColor50: Record<Exclude<LibColorsShort, "black" | "transparent" | "background" | "current">, string>;
33
+ declare const genBgColor50: (theme: LibThemeNames) => Record<"primary" | "secondary" | "success" | "danger" | "warning" | "gray" | "white", string>;
34
34
  declare const genBgColorHover: Record<LibColorsHover, string>;
35
35
  declare const genBgColorGhostHover: Record<LibColorsHover, string>;
36
36
  declare const genBgOverlay: Record<LibOverlays, string>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as LibColorsHover, ag as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, e as LibOverlays, f as LibAllColorsAndOverlays, l as LibSpacers, al as CssAlignContent, aj as CssAlignItems, ak as CssJustifyContent, ai as CssJustifyItems, F as LibMaxWidth, m as LibRadiuses, ao as CssObjectFit, v as LibButtonVariantExtended, k as LibShadows, ah as CssVerticalAlign, ae as DispatchState, a6 as TranslateLang, ab as ReactChildren, q as LibThemeNames, ac as ReactElement, t as LibLoaderVariant } from './global-D-4hL0jH.js';
1
+ import { c as LibColorsHover, ag as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, q as LibThemeNames, e as LibOverlays, f as LibAllColorsAndOverlays, l as LibSpacers, al as CssAlignContent, aj as CssAlignItems, ak as CssJustifyContent, ai as CssJustifyItems, F as LibMaxWidth, m as LibRadiuses, ao as CssObjectFit, v as LibButtonVariantExtended, k as LibShadows, ah as CssVerticalAlign, ae as DispatchState, a6 as TranslateLang, ab as ReactChildren, ac as ReactElement, t as LibLoaderVariant } from './global-D-4hL0jH.js';
2
2
  export { aw as designTokens } from './global-D-4hL0jH.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ClassNameValue } from 'tailwind-merge';
@@ -30,7 +30,7 @@ declare const genTextAllColor: Record<LibAllColors, string>;
30
30
 
31
31
  declare const genBgColor: Record<LibColors, string>;
32
32
  declare const genBgColorShort: Record<LibColorsShort, string>;
33
- declare const genBgColor50: Record<Exclude<LibColorsShort, "black" | "transparent" | "background" | "current">, string>;
33
+ declare const genBgColor50: (theme: LibThemeNames) => Record<"primary" | "secondary" | "success" | "danger" | "warning" | "gray" | "white", string>;
34
34
  declare const genBgColorHover: Record<LibColorsHover, string>;
35
35
  declare const genBgColorGhostHover: Record<LibColorsHover, string>;
36
36
  declare const genBgOverlay: Record<LibOverlays, string>;
package/dist/index.js CHANGED
@@ -989,14 +989,17 @@ var genBgColorShort = {
989
989
  transparent: "bg-transparent",
990
990
  background: "bg-background"
991
991
  };
992
- var genBgColor50 = {
993
- primary: "bg-primary-50",
994
- secondary: "bg-secondary-50",
995
- success: "bg-success-50",
996
- danger: "bg-danger-50",
997
- warning: "bg-warning-50",
998
- gray: "bg-gray-50",
999
- white: "bg-white"
992
+ var genBgColor50 = (theme) => {
993
+ const colors = {
994
+ primary: theme === "dark" ? "bg-primary-950" : "bg-primary-50",
995
+ secondary: theme === "dark" ? "bg-secondary-950" : "bg-secondary-50",
996
+ success: theme === "dark" ? "bg-success-950" : "bg-success-50",
997
+ danger: theme === "dark" ? "bg-danger-950" : "bg-danger-50",
998
+ warning: theme === "dark" ? "bg-warning-950" : "bg-warning-50",
999
+ gray: theme === "dark" ? "bg-gray-950" : "bg-gray-50",
1000
+ white: theme === "dark" ? "bg-gray-950" : "bg-white"
1001
+ };
1002
+ return colors;
1000
1003
  };
1001
1004
  var genBgColorHover = {
1002
1005
  primary: "bg-primary-500 hover:bg-primary-300 active:bg-primary-600",
@@ -2820,6 +2823,7 @@ var Key = ({
2820
2823
  accentColor = "primary",
2821
2824
  ...rest
2822
2825
  }) => {
2826
+ const { theme } = useLibTheme();
2823
2827
  const Element = element;
2824
2828
  const childrenArray = Children.toArray(
2825
2829
  children?.toString().replaceAll(",", "").split("")
@@ -2833,7 +2837,7 @@ var Key = ({
2833
2837
  genBorderRadius2[size],
2834
2838
  genFontSize[size],
2835
2839
  genPadding[size],
2836
- genBgColor50[accentColor],
2840
+ genBgColor50(theme)[accentColor],
2837
2841
  genBorderColorShort[accentColor],
2838
2842
  genBorderBottom[size],
2839
2843
  "key",
@@ -8060,13 +8064,14 @@ var Alert = ({
8060
8064
  ...rest
8061
8065
  }) => {
8062
8066
  const Element = element;
8067
+ const { theme } = useLibTheme();
8063
8068
  return /* @__PURE__ */ jsx93(
8064
8069
  Element,
8065
8070
  {
8066
8071
  ref,
8067
8072
  className: clsx(
8068
8073
  "flex flex-col gap-2 px-4 py-2 border rounded-md w-full max-w-[400px]",
8069
- genBgColor50[color],
8074
+ genBgColor50(theme)[color],
8070
8075
  genBorderColorShort[color],
8071
8076
  "alert",
8072
8077
  className