uibee 2.4.13 → 2.5.0
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/src/components/buttons/button.d.ts +12 -0
- package/dist/src/components/buttons/button.js +24 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.js +2 -0
- package/dist/src/globals.css +62 -0
- package/package.json +1 -1
- package/src/components/buttons/button.tsx +72 -0
- package/src/components/container/highlight.tsx +1 -1
- package/src/components/index.ts +3 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
type ButtonProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
icon?: string | JSX.Element;
|
|
6
|
+
path?: string;
|
|
7
|
+
color?: 'primary' | 'secondary';
|
|
8
|
+
onClick?: (_: object) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default function Button({ text, className, icon, path, color, onClick, disabled }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
export default function Button({ text, className, icon, path, color, onClick, disabled }) {
|
|
4
|
+
const bg = color === 'secondary'
|
|
5
|
+
? 'bg-login-600/70 outline-login-600 hover:bg-login-600/90'
|
|
6
|
+
: 'bg-login/70 outline-login hover:bg-login/90';
|
|
7
|
+
if (!path) {
|
|
8
|
+
return (_jsxs("button", { type: 'button', disabled: disabled, onClick: onClick, "aria-label": text, className: `
|
|
9
|
+
${bg} cursor-pointer px-4 rounded-md h-6 flex
|
|
10
|
+
justify-evenly items-center gap-2 select-none
|
|
11
|
+
focus:outline-none border-0 outline w-fit ${className}
|
|
12
|
+
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? icon : '' }), _jsx("h1", { children: text })] }));
|
|
13
|
+
}
|
|
14
|
+
if (disabled) {
|
|
15
|
+
return (_jsxs("div", { className: `
|
|
16
|
+
${bg} cursor-not-allowed px-4 rounded-md h-6 flex
|
|
17
|
+
justify-evenly items-center gap-2 select-none
|
|
18
|
+
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? `${icon}` : '' }), _jsx("h1", { className: '', children: text })] }));
|
|
19
|
+
}
|
|
20
|
+
return (_jsxs(Link, { href: path, className: `
|
|
21
|
+
${bg} cursor-pointer px-4 rounded-md h-6 flex
|
|
22
|
+
justify-evenly items-center gap-2 select-none
|
|
23
|
+
`, children: [_jsx("h1", { className: 'font-bold', children: icon ? `${icon}` : '' }), _jsx("h1", { className: '', children: text })] }));
|
|
24
|
+
}
|
|
@@ -15,3 +15,4 @@ export { default as Highlight } from './container/highlight';
|
|
|
15
15
|
export { default as VersionTag } from './version/version';
|
|
16
16
|
export { default as LoginPage } from './login/loginPage';
|
|
17
17
|
export { default as Toaster, addToast } from './toast/toaster';
|
|
18
|
+
export { default as Button } from './buttons/button';
|
|
@@ -21,3 +21,5 @@ export { default as Highlight } from './container/highlight';
|
|
|
21
21
|
export { default as VersionTag } from './version/version';
|
|
22
22
|
export { default as LoginPage } from './login/loginPage';
|
|
23
23
|
export { default as Toaster, addToast } from './toast/toaster';
|
|
24
|
+
// Buttons
|
|
25
|
+
export { default as Button } from './buttons/button';
|
package/dist/src/globals.css
CHANGED
|
@@ -603,6 +603,9 @@
|
|
|
603
603
|
.animate-jump {
|
|
604
604
|
animation: jump 0.4s 1;
|
|
605
605
|
}
|
|
606
|
+
.cursor-not-allowed {
|
|
607
|
+
cursor: not-allowed;
|
|
608
|
+
}
|
|
606
609
|
.cursor-pointer {
|
|
607
610
|
cursor: pointer;
|
|
608
611
|
}
|
|
@@ -642,6 +645,9 @@
|
|
|
642
645
|
.justify-end {
|
|
643
646
|
justify-content: flex-end;
|
|
644
647
|
}
|
|
648
|
+
.justify-evenly {
|
|
649
|
+
justify-content: space-evenly;
|
|
650
|
+
}
|
|
645
651
|
.gap-0\.5 {
|
|
646
652
|
gap: calc(var(--spacing) * 0.5);
|
|
647
653
|
}
|
|
@@ -696,6 +702,10 @@
|
|
|
696
702
|
border-style: var(--tw-border-style);
|
|
697
703
|
border-width: 1px;
|
|
698
704
|
}
|
|
705
|
+
.border-0 {
|
|
706
|
+
border-style: var(--tw-border-style);
|
|
707
|
+
border-width: 0px;
|
|
708
|
+
}
|
|
699
709
|
.border-\[0\.10rem\] {
|
|
700
710
|
border-style: var(--tw-border-style);
|
|
701
711
|
border-width: 0.10rem;
|
|
@@ -729,6 +739,12 @@
|
|
|
729
739
|
.bg-login-600 {
|
|
730
740
|
background-color: var(--color-login-600);
|
|
731
741
|
}
|
|
742
|
+
.bg-login-600\/70 {
|
|
743
|
+
background-color: color-mix(in srgb, #212121 70%, transparent);
|
|
744
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
745
|
+
background-color: color-mix(in oklab, var(--color-login-600) 70%, transparent);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
732
748
|
.bg-login-700 {
|
|
733
749
|
background-color: var(--color-login-700);
|
|
734
750
|
}
|
|
@@ -750,6 +766,12 @@
|
|
|
750
766
|
background-color: color-mix(in oklab, var(--color-login-900) 20%, transparent);
|
|
751
767
|
}
|
|
752
768
|
}
|
|
769
|
+
.bg-login\/70 {
|
|
770
|
+
background-color: color-mix(in srgb, #fd8738 70%, transparent);
|
|
771
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
772
|
+
background-color: color-mix(in oklab, var(--color-login) 70%, transparent);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
753
775
|
.bg-transparent {
|
|
754
776
|
background-color: transparent;
|
|
755
777
|
}
|
|
@@ -1002,6 +1024,16 @@
|
|
|
1002
1024
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1003
1025
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1004
1026
|
}
|
|
1027
|
+
.outline {
|
|
1028
|
+
outline-style: var(--tw-outline-style);
|
|
1029
|
+
outline-width: 1px;
|
|
1030
|
+
}
|
|
1031
|
+
.outline-login {
|
|
1032
|
+
outline-color: var(--color-login);
|
|
1033
|
+
}
|
|
1034
|
+
.outline-login-600 {
|
|
1035
|
+
outline-color: var(--color-login-600);
|
|
1036
|
+
}
|
|
1005
1037
|
.backdrop-blur-xl {
|
|
1006
1038
|
--tw-backdrop-blur: blur(var(--blur-xl));
|
|
1007
1039
|
-webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
@@ -1072,6 +1104,10 @@
|
|
|
1072
1104
|
--tw-outline-style: none;
|
|
1073
1105
|
outline-style: none;
|
|
1074
1106
|
}
|
|
1107
|
+
.select-none {
|
|
1108
|
+
-webkit-user-select: none;
|
|
1109
|
+
user-select: none;
|
|
1110
|
+
}
|
|
1075
1111
|
.group-\[\.dropdown\]\:h-auto {
|
|
1076
1112
|
&:is(:where(.group):is(.dropdown) *) {
|
|
1077
1113
|
height: auto;
|
|
@@ -1202,6 +1238,16 @@
|
|
|
1202
1238
|
}
|
|
1203
1239
|
}
|
|
1204
1240
|
}
|
|
1241
|
+
.hover\:bg-login-600\/90 {
|
|
1242
|
+
&:hover {
|
|
1243
|
+
@media (hover: hover) {
|
|
1244
|
+
background-color: color-mix(in srgb, #212121 90%, transparent);
|
|
1245
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1246
|
+
background-color: color-mix(in oklab, var(--color-login-600) 90%, transparent);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1205
1251
|
.hover\:bg-login\/80 {
|
|
1206
1252
|
&:hover {
|
|
1207
1253
|
@media (hover: hover) {
|
|
@@ -1212,6 +1258,16 @@
|
|
|
1212
1258
|
}
|
|
1213
1259
|
}
|
|
1214
1260
|
}
|
|
1261
|
+
.hover\:bg-login\/90 {
|
|
1262
|
+
&:hover {
|
|
1263
|
+
@media (hover: hover) {
|
|
1264
|
+
background-color: color-mix(in srgb, #fd8738 90%, transparent);
|
|
1265
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1266
|
+
background-color: color-mix(in oklab, var(--color-login) 90%, transparent);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1215
1271
|
.hover\:text-red-800 {
|
|
1216
1272
|
&:hover {
|
|
1217
1273
|
@media (hover: hover) {
|
|
@@ -1472,6 +1528,11 @@
|
|
|
1472
1528
|
inherits: false;
|
|
1473
1529
|
initial-value: 0 0 #0000;
|
|
1474
1530
|
}
|
|
1531
|
+
@property --tw-outline-style {
|
|
1532
|
+
syntax: "*";
|
|
1533
|
+
inherits: false;
|
|
1534
|
+
initial-value: solid;
|
|
1535
|
+
}
|
|
1475
1536
|
@property --tw-backdrop-blur {
|
|
1476
1537
|
syntax: "*";
|
|
1477
1538
|
inherits: false;
|
|
@@ -1553,6 +1614,7 @@
|
|
|
1553
1614
|
--tw-ring-offset-width: 0px;
|
|
1554
1615
|
--tw-ring-offset-color: #fff;
|
|
1555
1616
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1617
|
+
--tw-outline-style: solid;
|
|
1556
1618
|
--tw-backdrop-blur: initial;
|
|
1557
1619
|
--tw-backdrop-brightness: initial;
|
|
1558
1620
|
--tw-backdrop-contrast: initial;
|
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import Link from 'next/link'
|
|
2
|
+
import type { JSX } from 'react'
|
|
3
|
+
|
|
4
|
+
type ButtonProps = {
|
|
5
|
+
text: string
|
|
6
|
+
className?: string
|
|
7
|
+
icon?: string | JSX.Element
|
|
8
|
+
path?: string
|
|
9
|
+
color?: 'primary' | 'secondary'
|
|
10
|
+
onClick?: (_: object) => void
|
|
11
|
+
disabled?: boolean
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function Button({
|
|
15
|
+
text,
|
|
16
|
+
className,
|
|
17
|
+
icon,
|
|
18
|
+
path,
|
|
19
|
+
color,
|
|
20
|
+
onClick,
|
|
21
|
+
disabled
|
|
22
|
+
}: ButtonProps) {
|
|
23
|
+
const bg = color === 'secondary'
|
|
24
|
+
? 'bg-login-600/70 outline-login-600 hover:bg-login-600/90'
|
|
25
|
+
: 'bg-login/70 outline-login hover:bg-login/90'
|
|
26
|
+
|
|
27
|
+
if (!path) {
|
|
28
|
+
return (
|
|
29
|
+
<button
|
|
30
|
+
type='button'
|
|
31
|
+
disabled={disabled}
|
|
32
|
+
onClick={onClick}
|
|
33
|
+
aria-label={text}
|
|
34
|
+
className={`
|
|
35
|
+
${bg} cursor-pointer px-4 rounded-md h-6 flex
|
|
36
|
+
justify-evenly items-center gap-2 select-none
|
|
37
|
+
focus:outline-none border-0 outline w-fit ${className}
|
|
38
|
+
`}
|
|
39
|
+
>
|
|
40
|
+
<h1 className='font-bold'>{icon ? icon : ''}</h1>
|
|
41
|
+
<h1>{text}</h1>
|
|
42
|
+
</button>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (disabled) {
|
|
47
|
+
return (
|
|
48
|
+
<div
|
|
49
|
+
className={`
|
|
50
|
+
${bg} cursor-not-allowed px-4 rounded-md h-6 flex
|
|
51
|
+
justify-evenly items-center gap-2 select-none
|
|
52
|
+
`}
|
|
53
|
+
>
|
|
54
|
+
<h1 className='font-bold'>{icon ? `${icon}` : ''}</h1>
|
|
55
|
+
<h1 className=''>{text}</h1>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Link
|
|
62
|
+
href={path}
|
|
63
|
+
className={`
|
|
64
|
+
${bg} cursor-pointer px-4 rounded-md h-6 flex
|
|
65
|
+
justify-evenly items-center gap-2 select-none
|
|
66
|
+
`}
|
|
67
|
+
>
|
|
68
|
+
<h1 className='font-bold'>{icon ? `${icon}` : ''}</h1>
|
|
69
|
+
<h1 className=''>{text}</h1>
|
|
70
|
+
</Link>
|
|
71
|
+
)
|
|
72
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -26,3 +26,6 @@ export { default as Highlight } from './container/highlight'
|
|
|
26
26
|
export { default as VersionTag } from './version/version'
|
|
27
27
|
export { default as LoginPage } from './login/loginPage'
|
|
28
28
|
export { default as Toaster, addToast } from './toast/toaster'
|
|
29
|
+
|
|
30
|
+
// Buttons
|
|
31
|
+
export { default as Button } from './buttons/button'
|