uibee 2.5.11 → 2.7.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/index.d.ts +5 -3
- package/dist/src/components/index.js +5 -3
- package/dist/src/components/inputs/checkbox.d.ts +13 -0
- package/dist/src/components/inputs/checkbox.js +17 -0
- package/dist/src/components/inputs/input.d.ts +11 -9
- package/dist/src/components/inputs/input.js +76 -9
- package/dist/src/components/inputs/radio.d.ts +14 -0
- package/dist/src/components/inputs/radio.js +17 -0
- package/dist/src/components/inputs/range.d.ts +17 -0
- package/dist/src/components/inputs/range.js +20 -0
- package/dist/src/components/inputs/select.d.ts +11 -11
- package/dist/src/components/inputs/select.js +54 -50
- package/dist/src/components/inputs/shared/dateTimePickerPopup.d.ts +8 -0
- package/dist/src/components/inputs/shared/dateTimePickerPopup.js +117 -0
- package/dist/src/components/inputs/shared/fieldWrapper.d.ts +12 -0
- package/dist/src/components/inputs/shared/fieldWrapper.js +7 -0
- package/dist/src/components/inputs/shared/index.d.ts +5 -0
- package/dist/src/components/inputs/shared/index.js +5 -0
- package/dist/src/components/inputs/shared/inputError.d.ts +6 -0
- package/dist/src/components/inputs/shared/inputError.js +6 -0
- package/dist/src/components/inputs/shared/inputInfo.d.ts +5 -0
- package/dist/src/components/inputs/shared/inputInfo.js +5 -0
- package/dist/src/components/inputs/shared/inputLabel.d.ts +9 -0
- package/dist/src/components/inputs/shared/inputLabel.js +4 -0
- package/dist/src/components/inputs/shared/selectionWrapper.d.ts +13 -0
- package/dist/src/components/inputs/shared/selectionWrapper.js +7 -0
- package/dist/src/components/inputs/switch.d.ts +10 -7
- package/dist/src/components/inputs/switch.js +13 -5
- package/dist/src/components/inputs/textarea.d.ts +15 -0
- package/dist/src/components/inputs/textarea.js +14 -0
- package/dist/src/components/toggle/language.js +1 -1
- package/dist/src/components/toggle/theme.js +1 -1
- package/dist/src/globals.css +397 -162
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.js +1 -0
- package/dist/src/hooks/useClickOutside.d.ts +1 -0
- package/dist/src/hooks/useClickOutside.js +20 -0
- package/dist/src/utils/index.d.ts +0 -3
- package/dist/src/utils/index.js +0 -3
- package/eslint.config.js +1 -0
- package/package.json +5 -3
- package/src/components/index.ts +5 -3
- package/src/components/inputs/checkbox.tsx +66 -0
- package/src/components/inputs/input.tsx +137 -35
- package/src/components/inputs/radio.tsx +67 -0
- package/src/components/inputs/range.tsx +84 -0
- package/src/components/inputs/select.tsx +137 -172
- package/src/components/inputs/shared/dateTimePickerPopup.tsx +219 -0
- package/src/components/inputs/shared/fieldWrapper.tsx +44 -0
- package/src/components/inputs/shared/index.ts +5 -0
- package/src/components/inputs/shared/inputError.tsx +21 -0
- package/src/components/inputs/shared/inputInfo.tsx +17 -0
- package/src/components/inputs/shared/inputLabel.tsx +19 -0
- package/src/components/inputs/shared/selectionWrapper.tsx +47 -0
- package/src/components/inputs/switch.tsx +48 -25
- package/src/components/inputs/textarea.tsx +65 -0
- package/src/components/logo/logo.tsx +1 -1
- package/src/components/toggle/language.tsx +1 -1
- package/src/components/toggle/theme.tsx +1 -1
- package/src/globals.css +36 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useClickOutside.ts +27 -0
- package/src/types/utils.d.ts +0 -32
- package/src/utils/index.ts +0 -3
- package/dist/src/components/inputs/erase.d.ts +0 -3
- package/dist/src/components/inputs/erase.js +0 -5
- package/dist/src/components/inputs/label.d.ts +0 -10
- package/dist/src/components/inputs/label.js +0 -13
- package/dist/src/components/inputs/markdown.d.ts +0 -15
- package/dist/src/components/inputs/markdown.js +0 -32
- package/dist/src/components/inputs/tag.d.ts +0 -11
- package/dist/src/components/inputs/tag.js +0 -44
- package/dist/src/components/inputs/tooltip.d.ts +0 -4
- package/dist/src/components/inputs/tooltip.js +0 -4
- package/dist/src/utils/cookies/cookies.d.ts +0 -4
- package/dist/src/utils/cookies/cookies.js +0 -36
- package/dist/src/utils/discord/discordAlert.d.ts +0 -2
- package/dist/src/utils/discord/discordAlert.js +0 -32
- package/dist/src/utils/sql/alertSlowQuery.d.ts +0 -2
- package/dist/src/utils/sql/alertSlowQuery.js +0 -25
- package/src/components/inputs/erase.tsx +0 -13
- package/src/components/inputs/label.tsx +0 -31
- package/src/components/inputs/markdown.tsx +0 -129
- package/src/components/inputs/tag.tsx +0 -137
- package/src/components/inputs/tooltip.tsx +0 -12
- package/src/utils/cookies/cookies.ts +0 -43
- package/src/utils/discord/discordAlert.ts +0 -44
- package/src/utils/sql/alertSlowQuery.ts +0 -37
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SelectionWrapperProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
info?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export default function SelectionWrapper({ label, name, required, info, error, children, className, disabled, }: SelectionWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import InputLabel from './inputLabel';
|
|
3
|
+
import InputInfo from './inputInfo';
|
|
4
|
+
import InputError from './inputError';
|
|
5
|
+
export default function SelectionWrapper({ label, name, required, info, error, children, className, disabled, }) {
|
|
6
|
+
return (_jsxs("div", { className: `flex flex-col gap-1 ${className || ''}`, children: [_jsxs("div", { className: 'flex items-center justify-between mb-1', children: [_jsxs("div", { className: 'flex items-center gap-2', children: [children, label && (_jsx(InputLabel, { label: label, name: name, required: required, disabled: disabled, className: 'select-none cursor-pointer' }))] }), info && _jsx(InputInfo, { info: info })] }), _jsx(InputError, { error: error })] }));
|
|
7
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
type
|
|
1
|
+
import { type ChangeEvent } from 'react';
|
|
2
|
+
export type SwitchProps = {
|
|
3
|
+
label?: string;
|
|
2
4
|
name: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
setValue: (_: boolean) => void;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
6
7
|
className?: string;
|
|
7
|
-
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
info?: string;
|
|
11
|
+
required?: boolean;
|
|
8
12
|
};
|
|
9
|
-
export default function Switch({ name,
|
|
10
|
-
export {};
|
|
13
|
+
export default function Switch({ label, name, checked, onChange, className, disabled, error, info, required, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
export default function Switch({ name,
|
|
5
|
-
return (_jsxs("
|
|
6
|
-
|
|
2
|
+
import { SelectionWrapper } from './shared';
|
|
3
|
+
export default function Switch({ label, name, checked, onChange, className, disabled, error, info, required, }) {
|
|
4
|
+
return (_jsx(SelectionWrapper, { label: label, name: name, required: required, info: info, error: error, className: className, disabled: disabled, children: _jsxs("label", { className: 'relative inline-flex items-center cursor-pointer', children: [_jsx("input", { type: 'checkbox', id: name, name: name, checked: checked, onChange: onChange, disabled: disabled, required: required, className: 'sr-only peer' }), _jsx("div", { className: `
|
|
5
|
+
w-11 h-6 bg-login-500/50 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-login/50
|
|
6
|
+
rounded-full peer
|
|
7
|
+
peer-checked:after:translate-x-full peer-checked:after:border-white
|
|
8
|
+
after:content-[''] after:absolute after:top-0.5 after:left-0.5
|
|
9
|
+
after:bg-white after:border-gray-300 after:border after:rounded-full
|
|
10
|
+
after:h-5 after:w-5 after:transition-all
|
|
11
|
+
peer-checked:bg-login
|
|
12
|
+
${disabled ? 'opacity-50 cursor-not-allowed' : ''}
|
|
13
|
+
${error ? 'ring-1 ring-red-500' : ''}
|
|
14
|
+
` })] }) }));
|
|
7
15
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChangeEvent } from 'react';
|
|
2
|
+
export type TextareaProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
8
|
+
error?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
rows?: number;
|
|
13
|
+
info?: string;
|
|
14
|
+
};
|
|
15
|
+
export default function Textarea({ label, name, placeholder, value, onChange, error, className, disabled, required, rows, info, }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FieldWrapper } from './shared';
|
|
3
|
+
export default function Textarea({ label, name, placeholder, value, onChange, error, className, disabled, required, rows = 4, info, }) {
|
|
4
|
+
return (_jsx(FieldWrapper, { label: label, name: name, required: required, info: info, error: error, className: className, children: _jsx("textarea", { id: name, name: name, placeholder: placeholder, value: value, onChange: onChange, disabled: disabled, required: required, rows: rows, title: label, "aria-invalid": !!error, "aria-describedby": error ? `${name}-error` : undefined, className: `
|
|
5
|
+
w-full rounded-md bg-login-500/50 border border-login-500
|
|
6
|
+
text-login-text placeholder-login-200
|
|
7
|
+
focus:outline-none focus:border-login focus:ring-1 focus:ring-login
|
|
8
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
9
|
+
p-3
|
|
10
|
+
transition-all duration-200
|
|
11
|
+
resize-y
|
|
12
|
+
${error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : ''}
|
|
13
|
+
` }) }));
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { getCookie, setCookie } from '
|
|
4
|
+
import { getCookie, setCookie } from 'utilbee/utils';
|
|
5
5
|
import { useRouter } from 'next/navigation';
|
|
6
6
|
import { Globe } from 'lucide-react';
|
|
7
7
|
export default function LanguageToggle({ language }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { getCookie, setCookie } from '
|
|
4
|
+
import { getCookie, setCookie } from 'utilbee/utils';
|
|
5
5
|
import { useRouter } from 'next/navigation';
|
|
6
6
|
export default function ThemeToggle({ className }) {
|
|
7
7
|
const router = useRouter();
|