uibee 2.5.3 → 2.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.
|
@@ -2,23 +2,23 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Link from 'next/link';
|
|
3
3
|
export default function Button({ text, className, icon, path, color, type, onClick, disabled }) {
|
|
4
4
|
const bg = color === 'secondary'
|
|
5
|
-
? 'bg-login-
|
|
5
|
+
? 'bg-login-500/70 outline-login-500 hover:bg-login-500/90'
|
|
6
6
|
: 'bg-login/70 outline-login hover:bg-login/90';
|
|
7
7
|
if (!path) {
|
|
8
8
|
return (_jsxs("button", { type: type || 'button', disabled: disabled, onClick: onClick, "aria-label": text, className: `
|
|
9
|
-
${bg} cursor-pointer px-4 rounded-md h-
|
|
9
|
+
${bg} cursor-pointer px-4 rounded-md min-h-8 h-8 flex
|
|
10
10
|
justify-evenly items-center gap-2 select-none
|
|
11
11
|
focus:outline-none border-0 outline w-fit ${className}
|
|
12
12
|
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? icon : '' }), _jsx("h1", { children: text })] }));
|
|
13
13
|
}
|
|
14
14
|
if (disabled) {
|
|
15
15
|
return (_jsxs("div", { className: `
|
|
16
|
-
${bg} cursor-not-allowed px-4 rounded-md h-
|
|
16
|
+
${bg} cursor-not-allowed px-4 rounded-md h-8 flex
|
|
17
17
|
justify-evenly items-center gap-2 select-none
|
|
18
18
|
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? `${icon}` : '' }), _jsx("h1", { className: '', children: text })] }));
|
|
19
19
|
}
|
|
20
20
|
return (_jsxs(Link, { href: path, className: `
|
|
21
|
-
${bg} cursor-pointer px-4 rounded-md h-
|
|
21
|
+
${bg} cursor-pointer px-4 rounded-md h-8 flex
|
|
22
22
|
justify-evenly items-center gap-2 select-none
|
|
23
23
|
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? `${icon}` : '' }), _jsx("h1", { className: '', children: text })] }));
|
|
24
24
|
}
|
package/dist/src/globals.css
CHANGED
|
@@ -435,6 +435,9 @@
|
|
|
435
435
|
.h-6 {
|
|
436
436
|
height: calc(var(--spacing) * 6);
|
|
437
437
|
}
|
|
438
|
+
.h-8 {
|
|
439
|
+
height: calc(var(--spacing) * 8);
|
|
440
|
+
}
|
|
438
441
|
.h-10 {
|
|
439
442
|
height: calc(var(--spacing) * 10);
|
|
440
443
|
}
|
|
@@ -462,6 +465,9 @@
|
|
|
462
465
|
.max-h-\[calc\(100vh-4rem\)\] {
|
|
463
466
|
max-height: calc(100vh - 4rem);
|
|
464
467
|
}
|
|
468
|
+
.min-h-8 {
|
|
469
|
+
min-height: calc(var(--spacing) * 8);
|
|
470
|
+
}
|
|
465
471
|
.min-h-16 {
|
|
466
472
|
min-height: calc(var(--spacing) * 16);
|
|
467
473
|
}
|
|
@@ -733,15 +739,15 @@
|
|
|
733
739
|
.bg-login-200 {
|
|
734
740
|
background-color: var(--color-login-200);
|
|
735
741
|
}
|
|
736
|
-
.bg-login-
|
|
737
|
-
background-color:
|
|
738
|
-
}
|
|
739
|
-
.bg-login-600\/70 {
|
|
740
|
-
background-color: color-mix(in srgb, #212121 70%, transparent);
|
|
742
|
+
.bg-login-500\/70 {
|
|
743
|
+
background-color: color-mix(in srgb, #323232 70%, transparent);
|
|
741
744
|
@supports (color: color-mix(in lab, red, red)) {
|
|
742
|
-
background-color: color-mix(in oklab, var(--color-login-
|
|
745
|
+
background-color: color-mix(in oklab, var(--color-login-500) 70%, transparent);
|
|
743
746
|
}
|
|
744
747
|
}
|
|
748
|
+
.bg-login-600 {
|
|
749
|
+
background-color: var(--color-login-600);
|
|
750
|
+
}
|
|
745
751
|
.bg-login-700 {
|
|
746
752
|
background-color: var(--color-login-700);
|
|
747
753
|
}
|
|
@@ -1028,8 +1034,8 @@
|
|
|
1028
1034
|
.outline-login {
|
|
1029
1035
|
outline-color: var(--color-login);
|
|
1030
1036
|
}
|
|
1031
|
-
.outline-login-
|
|
1032
|
-
outline-color: var(--color-login-
|
|
1037
|
+
.outline-login-500 {
|
|
1038
|
+
outline-color: var(--color-login-500);
|
|
1033
1039
|
}
|
|
1034
1040
|
.backdrop-blur-xl {
|
|
1035
1041
|
--tw-backdrop-blur: blur(var(--blur-xl));
|
|
@@ -1228,20 +1234,20 @@
|
|
|
1228
1234
|
}
|
|
1229
1235
|
}
|
|
1230
1236
|
}
|
|
1231
|
-
.hover\:bg-login-
|
|
1237
|
+
.hover\:bg-login-500\/90 {
|
|
1232
1238
|
&:hover {
|
|
1233
1239
|
@media (hover: hover) {
|
|
1234
|
-
background-color:
|
|
1240
|
+
background-color: color-mix(in srgb, #323232 90%, transparent);
|
|
1241
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1242
|
+
background-color: color-mix(in oklab, var(--color-login-500) 90%, transparent);
|
|
1243
|
+
}
|
|
1235
1244
|
}
|
|
1236
1245
|
}
|
|
1237
1246
|
}
|
|
1238
|
-
.hover\:bg-login-600
|
|
1247
|
+
.hover\:bg-login-600 {
|
|
1239
1248
|
&:hover {
|
|
1240
1249
|
@media (hover: hover) {
|
|
1241
|
-
background-color: color-
|
|
1242
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1243
|
-
background-color: color-mix(in oklab, var(--color-login-600) 90%, transparent);
|
|
1244
|
-
}
|
|
1250
|
+
background-color: var(--color-login-600);
|
|
1245
1251
|
}
|
|
1246
1252
|
}
|
|
1247
1253
|
}
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ export default function Button({
|
|
|
23
23
|
disabled
|
|
24
24
|
}: ButtonProps) {
|
|
25
25
|
const bg = color === 'secondary'
|
|
26
|
-
? 'bg-login-
|
|
26
|
+
? 'bg-login-500/70 outline-login-500 hover:bg-login-500/90'
|
|
27
27
|
: 'bg-login/70 outline-login hover:bg-login/90'
|
|
28
28
|
|
|
29
29
|
if (!path) {
|
|
@@ -34,7 +34,7 @@ export default function Button({
|
|
|
34
34
|
onClick={onClick}
|
|
35
35
|
aria-label={text}
|
|
36
36
|
className={`
|
|
37
|
-
${bg} cursor-pointer px-4 rounded-md h-
|
|
37
|
+
${bg} cursor-pointer px-4 rounded-md min-h-8 h-8 flex
|
|
38
38
|
justify-evenly items-center gap-2 select-none
|
|
39
39
|
focus:outline-none border-0 outline w-fit ${className}
|
|
40
40
|
`}
|
|
@@ -49,7 +49,7 @@ export default function Button({
|
|
|
49
49
|
return (
|
|
50
50
|
<div
|
|
51
51
|
className={`
|
|
52
|
-
${bg} cursor-not-allowed px-4 rounded-md h-
|
|
52
|
+
${bg} cursor-not-allowed px-4 rounded-md h-8 flex
|
|
53
53
|
justify-evenly items-center gap-2 select-none
|
|
54
54
|
`}
|
|
55
55
|
>
|
|
@@ -63,7 +63,7 @@ export default function Button({
|
|
|
63
63
|
<Link
|
|
64
64
|
href={path}
|
|
65
65
|
className={`
|
|
66
|
-
${bg} cursor-pointer px-4 rounded-md h-
|
|
66
|
+
${bg} cursor-pointer px-4 rounded-md h-8 flex
|
|
67
67
|
justify-evenly items-center gap-2 select-none
|
|
68
68
|
`}
|
|
69
69
|
>
|