@julseb-lib/react 0.1.60 → 0.1.62
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.cjs +16 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,
|
|
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<
|
|
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,
|
|
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<
|
|
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
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
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",
|
|
@@ -5206,7 +5210,7 @@ var InputCheck = ({
|
|
|
5206
5210
|
className: clsx(
|
|
5207
5211
|
"inline-flex items-start gap-1 outline-none cursor-pointer",
|
|
5208
5212
|
variant === "tile" && [
|
|
5209
|
-
"w-full border-gray-200 border p-2 rounded-lg",
|
|
5213
|
+
"w-full border-gray-200 border p-2 rounded-lg bg-background",
|
|
5210
5214
|
"has-[input:checked]:border-primary-500",
|
|
5211
5215
|
validation === false && "has-[input:checked]:border-danger-500",
|
|
5212
5216
|
disabled && "has-[input:checked]:border-gray-500"
|
|
@@ -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
|