@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.cjs
CHANGED
|
@@ -1229,14 +1229,17 @@ var genBgColorShort = {
|
|
|
1229
1229
|
transparent: "bg-transparent",
|
|
1230
1230
|
background: "bg-background"
|
|
1231
1231
|
};
|
|
1232
|
-
var genBgColor50 = {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1232
|
+
var genBgColor50 = (theme) => {
|
|
1233
|
+
const colors = {
|
|
1234
|
+
primary: theme === "dark" ? "bg-primary-950" : "bg-primary-50",
|
|
1235
|
+
secondary: theme === "dark" ? "bg-secondary-950" : "bg-secondary-50",
|
|
1236
|
+
success: theme === "dark" ? "bg-success-950" : "bg-success-50",
|
|
1237
|
+
danger: theme === "dark" ? "bg-danger-950" : "bg-danger-50",
|
|
1238
|
+
warning: theme === "dark" ? "bg-warning-950" : "bg-warning-50",
|
|
1239
|
+
gray: theme === "dark" ? "bg-gray-950" : "bg-gray-50",
|
|
1240
|
+
white: theme === "dark" ? "bg-gray-950" : "bg-white"
|
|
1241
|
+
};
|
|
1242
|
+
return colors;
|
|
1240
1243
|
};
|
|
1241
1244
|
var genBgColorHover = {
|
|
1242
1245
|
primary: "bg-primary-500 hover:bg-primary-300 active:bg-primary-600",
|
|
@@ -3001,6 +3004,7 @@ var Key = ({
|
|
|
3001
3004
|
accentColor = "primary",
|
|
3002
3005
|
...rest
|
|
3003
3006
|
}) => {
|
|
3007
|
+
const { theme } = useLibTheme();
|
|
3004
3008
|
const Element = element;
|
|
3005
3009
|
const childrenArray = import_react23.Children.toArray(
|
|
3006
3010
|
children?.toString().replaceAll(",", "").split("")
|
|
@@ -3014,7 +3018,7 @@ var Key = ({
|
|
|
3014
3018
|
genBorderRadius2[size],
|
|
3015
3019
|
genFontSize[size],
|
|
3016
3020
|
genPadding[size],
|
|
3017
|
-
genBgColor50[accentColor],
|
|
3021
|
+
genBgColor50(theme)[accentColor],
|
|
3018
3022
|
genBorderColorShort[accentColor],
|
|
3019
3023
|
genBorderBottom[size],
|
|
3020
3024
|
"key",
|
|
@@ -5387,7 +5391,7 @@ var InputCheck = ({
|
|
|
5387
5391
|
className: clsx(
|
|
5388
5392
|
"inline-flex items-start gap-1 outline-none cursor-pointer",
|
|
5389
5393
|
variant === "tile" && [
|
|
5390
|
-
"w-full border-gray-200 border p-2 rounded-lg",
|
|
5394
|
+
"w-full border-gray-200 border p-2 rounded-lg bg-background",
|
|
5391
5395
|
"has-[input:checked]:border-primary-500",
|
|
5392
5396
|
validation === false && "has-[input:checked]:border-danger-500",
|
|
5393
5397
|
disabled && "has-[input:checked]:border-gray-500"
|
|
@@ -8239,13 +8243,14 @@ var Alert = ({
|
|
|
8239
8243
|
...rest
|
|
8240
8244
|
}) => {
|
|
8241
8245
|
const Element = element;
|
|
8246
|
+
const { theme } = useLibTheme();
|
|
8242
8247
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
8243
8248
|
Element,
|
|
8244
8249
|
{
|
|
8245
8250
|
ref,
|
|
8246
8251
|
className: clsx(
|
|
8247
8252
|
"flex flex-col gap-2 px-4 py-2 border rounded-md w-full max-w-[400px]",
|
|
8248
|
-
genBgColor50[color],
|
|
8253
|
+
genBgColor50(theme)[color],
|
|
8249
8254
|
genBorderColorShort[color],
|
|
8250
8255
|
"alert",
|
|
8251
8256
|
className
|