uibee 2.5.0 → 2.5.1
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 +2 -1
- package/dist/src/components/buttons/button.js +2 -2
- package/dist/src/components/inputs/label.js +1 -1
- package/dist/src/components/toast/toaster.js +1 -1
- package/dist/src/globals.css +4 -7
- package/package.json +1 -1
- package/src/components/buttons/button.tsx +3 -1
- package/src/components/inputs/label.tsx +1 -1
- package/src/components/inputs/select.tsx +0 -2
- package/src/components/navbar/navbarDropdown.tsx +1 -1
- package/src/components/navbar/navbarItem.tsx +1 -1
- package/src/components/toast/toaster.tsx +1 -1
- package/src/components/toggle/theme.tsx +1 -1
- package/src/components/version/version.tsx +1 -1
- package/src/globals.css +1 -1
- package/src/utils/auth/callback.ts +1 -1
- package/src/utils/auth/token.ts +1 -1
- package/src/utils/cookies/cookies.ts +1 -1
|
@@ -4,9 +4,10 @@ type ButtonProps = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
icon?: string | JSX.Element;
|
|
6
6
|
path?: string;
|
|
7
|
+
type?: 'button' | 'submit' | 'reset';
|
|
7
8
|
color?: 'primary' | 'secondary';
|
|
8
9
|
onClick?: (_: object) => void;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
};
|
|
11
|
-
export default function Button({ text, className, icon, path, color, onClick, disabled }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default function Button({ text, className, icon, path, color, type, onClick, disabled }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'next/link';
|
|
3
|
-
export default function Button({ text, className, icon, path, color, onClick, disabled }) {
|
|
3
|
+
export default function Button({ text, className, icon, path, color, type, onClick, disabled }) {
|
|
4
4
|
const bg = color === 'secondary'
|
|
5
5
|
? 'bg-login-600/70 outline-login-600 hover:bg-login-600/90'
|
|
6
6
|
: 'bg-login/70 outline-login hover:bg-login/90';
|
|
7
7
|
if (!path) {
|
|
8
|
-
return (_jsxs("button", { type: 'button', disabled: disabled, onClick: onClick, "aria-label": text, className: `
|
|
8
|
+
return (_jsxs("button", { type: type || 'button', disabled: disabled, onClick: onClick, "aria-label": text, className: `
|
|
9
9
|
${bg} cursor-pointer px-4 rounded-md h-6 flex
|
|
10
10
|
justify-evenly items-center gap-2 select-none
|
|
11
11
|
focus:outline-none border-0 outline w-fit ${className}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
export default function Label({ label, value, required, showRequired, className, color }) {
|
|
3
3
|
return (_jsx("label", { className: 'w-[calc(100%-10px)] truncate pointer-events-none absolute text-sm duration-300 transform z-10 ' +
|
|
4
|
-
'peer-focus:px-2 peer-focus:top-2 origin-
|
|
4
|
+
'peer-focus:px-2 peer-focus:top-2 origin-left px-2 pt-1 peer-focus:scale-75 peer-focus:-translate-y-5 start-2 ' +
|
|
5
5
|
`${color ? color : 'bg-login-800'} ` +
|
|
6
6
|
`${value ? '-translate-y-5 scale-75 top-2 w-fit '
|
|
7
7
|
: '-translate-y-1/2 scale-100 top-1/2 '
|
|
@@ -72,7 +72,7 @@ export default function Toaster() {
|
|
|
72
72
|
top: mainToastPosition ? `${mainToastPosition.top - idx * 8}px` : 'auto',
|
|
73
73
|
zIndex: 100 - idx,
|
|
74
74
|
transform: `scale(${1 - idx * 0.05})`,
|
|
75
|
-
}, children: [_jsx("span", { className: '
|
|
75
|
+
}, children: [_jsx("span", { className: 'shrink-0 w-10 h-10 flex items-center justify-center', children: _jsx(ToastIcon, { type: toast.type }) }), _jsxs("div", { className: 'pr-1 pb-1', children: [_jsx("span", { className: 'font-bold', children: toast.title }), (idx === 0 || isHovered) &&
|
|
76
76
|
_jsx("span", { className: 'text-sm line-clamp-3', children: toast.description })] })] }, `${toast.id}-${idx}`))) }));
|
|
77
77
|
}
|
|
78
78
|
function ToastIcon({ type }) {
|
package/dist/src/globals.css
CHANGED
|
@@ -537,18 +537,15 @@
|
|
|
537
537
|
.flex-1 {
|
|
538
538
|
flex: 1;
|
|
539
539
|
}
|
|
540
|
-
.flex-shrink-0 {
|
|
541
|
-
flex-shrink: 0;
|
|
542
|
-
}
|
|
543
540
|
.shrink-0 {
|
|
544
541
|
flex-shrink: 0;
|
|
545
542
|
}
|
|
546
|
-
.origin-\[0\] {
|
|
547
|
-
transform-origin: 0;
|
|
548
|
-
}
|
|
549
543
|
.origin-center {
|
|
550
544
|
transform-origin: center;
|
|
551
545
|
}
|
|
546
|
+
.origin-left {
|
|
547
|
+
transform-origin: 0;
|
|
548
|
+
}
|
|
552
549
|
.translate-x-4 {
|
|
553
550
|
--tw-translate-x: calc(var(--spacing) * 4);
|
|
554
551
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1629,4 +1626,4 @@
|
|
|
1629
1626
|
--tw-content: "";
|
|
1630
1627
|
}
|
|
1631
1628
|
}
|
|
1632
|
-
}
|
|
1629
|
+
}
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ type ButtonProps = {
|
|
|
6
6
|
className?: string
|
|
7
7
|
icon?: string | JSX.Element
|
|
8
8
|
path?: string
|
|
9
|
+
type?: 'button' | 'submit' | 'reset'
|
|
9
10
|
color?: 'primary' | 'secondary'
|
|
10
11
|
onClick?: (_: object) => void
|
|
11
12
|
disabled?: boolean
|
|
@@ -17,6 +18,7 @@ export default function Button({
|
|
|
17
18
|
icon,
|
|
18
19
|
path,
|
|
19
20
|
color,
|
|
21
|
+
type,
|
|
20
22
|
onClick,
|
|
21
23
|
disabled
|
|
22
24
|
}: ButtonProps) {
|
|
@@ -27,7 +29,7 @@ export default function Button({
|
|
|
27
29
|
if (!path) {
|
|
28
30
|
return (
|
|
29
31
|
<button
|
|
30
|
-
type='button'
|
|
32
|
+
type={type || 'button'}
|
|
31
33
|
disabled={disabled}
|
|
32
34
|
onClick={onClick}
|
|
33
35
|
aria-label={text}
|
|
@@ -13,7 +13,7 @@ export default function Label({ label, value, required, showRequired, className,
|
|
|
13
13
|
<label
|
|
14
14
|
className={
|
|
15
15
|
'w-[calc(100%-10px)] truncate pointer-events-none absolute text-sm duration-300 transform z-10 ' +
|
|
16
|
-
'peer-focus:px-2 peer-focus:top-2 origin-
|
|
16
|
+
'peer-focus:px-2 peer-focus:top-2 origin-left px-2 pt-1 peer-focus:scale-75 peer-focus:-translate-y-5 start-2 ' +
|
|
17
17
|
`${color ? color : 'bg-login-800'} ` +
|
|
18
18
|
`${value ? '-translate-y-5 scale-75 top-2 w-fit '
|
|
19
19
|
: '-translate-y-1/2 scale-100 top-1/2 '
|
|
@@ -94,7 +94,7 @@ export default function Toaster() {
|
|
|
94
94
|
transform: `scale(${1 - idx * 0.05})`,
|
|
95
95
|
}}
|
|
96
96
|
>
|
|
97
|
-
<span className='
|
|
97
|
+
<span className='shrink-0 w-10 h-10 flex items-center justify-center'>
|
|
98
98
|
<ToastIcon type={toast.type} />
|
|
99
99
|
</span>
|
|
100
100
|
<div className='pr-1 pb-1'>
|
package/src/globals.css
CHANGED
package/src/utils/auth/token.ts
CHANGED