@zuzjs/ui 0.4.1 → 0.4.2
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/comps/base.js +2 -2
- package/dist/comps/cover.js +1 -1
- package/dist/comps/dialog.d.ts +0 -0
- package/dist/comps/dialog.js +1 -0
- package/dist/comps/form.d.ts +4 -1
- package/dist/comps/form.js +10 -2
- package/dist/comps/select.d.ts +18 -0
- package/dist/comps/select.js +32 -0
- package/dist/comps/sheet.d.ts +2 -1
- package/dist/comps/sheet.js +39 -2
- package/dist/funs/css.d.ts +1 -0
- package/dist/funs/css.js +15 -0
- package/dist/funs/index.d.ts +2 -0
- package/dist/funs/index.js +5 -0
- package/dist/funs/stylesheet.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/types/enums.d.ts +1 -0
- package/dist/types/enums.js +1 -0
- package/package.json +1 -1
package/dist/comps/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement, forwardRef } from "react";
|
|
2
2
|
import { css, cleanProps } from "../funs";
|
|
3
|
-
import { buildWithStyles } from "../funs/css";
|
|
3
|
+
import { buildWithStyles, getAnimationCurve } from "../funs/css";
|
|
4
4
|
const With = forwardRef(({ tag, as, animate, className, propsToRemove, style, ...rest }, ref) => {
|
|
5
5
|
const Comp = tag || 'div';
|
|
6
6
|
let cx = [];
|
|
@@ -9,7 +9,7 @@ const With = forwardRef(({ tag, as, animate, className, propsToRemove, style, ..
|
|
|
9
9
|
}
|
|
10
10
|
const { from, to, when, duration, delay, curve } = animate || {};
|
|
11
11
|
let _style = {};
|
|
12
|
-
const _transition = from && to ? { transition: `all ${duration || `0.2`}s ${curve
|
|
12
|
+
const _transition = from && to ? { transition: `all ${duration || `0.2`}s ${getAnimationCurve(curve)} ${delay || 0}s` } : {};
|
|
13
13
|
if (undefined === when) {
|
|
14
14
|
_style = { ...from, ...to };
|
|
15
15
|
}
|
package/dist/comps/cover.js
CHANGED
|
@@ -6,7 +6,7 @@ import { hexToRgba } from "../funs";
|
|
|
6
6
|
const Cover = forwardRef((props, ref) => {
|
|
7
7
|
const { spinner, message, color, as, ...rest } = props;
|
|
8
8
|
return (_jsxs(With, { className: `zuz-cover flex aic jcc cols abs fill`, ref: ref, style: {
|
|
9
|
-
backgroundColor: hexToRgba(color || `#ffffff`, .9)
|
|
9
|
+
backgroundColor: color ? !color.startsWith(`#`) ? hexToRgba(color, .9) : color : hexToRgba(color || `#ffffff`, .9)
|
|
10
10
|
}, as: as, ...rest, children: [_jsx(Spinner, { ...spinner }), _jsx(With, { tag: `h1`, className: `label`, children: message || `loading` })] }));
|
|
11
11
|
});
|
|
12
12
|
export default Cover;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/comps/form.d.ts
CHANGED
|
@@ -16,5 +16,8 @@ export interface FormProps {
|
|
|
16
16
|
message?: string;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
export interface FormHandler {
|
|
20
|
+
setLoading: (mode: boolean) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const Form: import("react").ForwardRefExoticComponent<FormProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<FormHandler>>;
|
|
20
23
|
export default Form;
|
package/dist/comps/form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useEffect, useRef, useState, useTransition } from "react";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef, useState, useTransition } from "react";
|
|
4
4
|
import With from "./base";
|
|
5
5
|
import { isEmail, withPost } from "../funs";
|
|
6
6
|
import Sheet from "./sheet";
|
|
@@ -134,7 +134,15 @@ const Form = forwardRef((props, ref) => {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
+
useImperativeHandle(ref, () => ({
|
|
138
|
+
setLoading(mod) {
|
|
139
|
+
setLoading(mod);
|
|
140
|
+
},
|
|
141
|
+
showError(errorMsg) {
|
|
142
|
+
sheet.current.show(errorMsg, 4, SHEET.Error);
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
137
145
|
useEffect(_init, []);
|
|
138
|
-
return _jsxs(With, { as: as, className: `rel`, ref: _ref, propsToRemove: [`withData`, `action`, `onSubmit`, `onSuccess`, `onError`], ...rest, children: [_jsx(Sheet, { ref: sheet }), loading && _jsx(Cover, { message: cover.message || `working`, ...{ spinner, color: cover.color
|
|
146
|
+
return _jsxs(With, { as: as, className: `rel`, ref: _ref, propsToRemove: [`withData`, `action`, `onSubmit`, `onSuccess`, `onError`], ...rest, children: [_jsx(Sheet, { ref: sheet }), loading && _jsx(Cover, { message: cover ? cover.message || undefined : `working`, ...{ spinner, color: cover ? `color` in cover ? cover.color : `#ffffff` : `#ffffff` } }), children] });
|
|
139
147
|
});
|
|
140
148
|
export default Form;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { animationProps } from "./base";
|
|
2
|
+
import { FORMVALIDATION } from "../types/enums";
|
|
3
|
+
import { dynamicObject } from "../types";
|
|
4
|
+
export interface SelectProps {
|
|
5
|
+
as?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
animate?: animationProps;
|
|
8
|
+
required?: FORMVALIDATION;
|
|
9
|
+
options: dynamicObject[];
|
|
10
|
+
label?: string;
|
|
11
|
+
defaultValue?: string | dynamicObject;
|
|
12
|
+
onChange?: (v: string | dynamicObject) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface SelectHandler {
|
|
15
|
+
onChange?: (v: string | dynamicObject) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<SelectHandler>>;
|
|
18
|
+
export default Select;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import With from "./base";
|
|
5
|
+
import { uuid } from "../funs";
|
|
6
|
+
const chevronExpand = () => _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", className: "bi bi-chevron-expand", viewBox: "0 0 16 16", children: _jsx("path", { fillRule: "evenodd", d: "M3.646 9.146a.5.5 0 01.708 0L8 12.793l3.646-3.647a.5.5 0 01.708.708l-4 4a.5.5 0 01-.708 0l-4-4a.5.5 0 010-.708zm0-2.292a.5.5 0 00.708 0L8 3.207l3.646 3.647a.5.5 0 00.708-.708l-4-4a.5.5 0 00-.708 0l-4 4a.5.5 0 000 .708z" }) });
|
|
7
|
+
const Select = forwardRef((props, ref) => {
|
|
8
|
+
const { as, options, name, label, defaultValue, onChange, ...rest } = props;
|
|
9
|
+
const _ref = useRef(null);
|
|
10
|
+
const _id = useMemo(() => name || uuid(), []);
|
|
11
|
+
const [choosing, setChoosing] = useState(false);
|
|
12
|
+
const [value, setValue] = useState(defaultValue || options[0]);
|
|
13
|
+
const updateValue = (o) => {
|
|
14
|
+
setValue(o);
|
|
15
|
+
onChange && onChange(o);
|
|
16
|
+
};
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
document.body.addEventListener(`click`, (e) => {
|
|
19
|
+
setChoosing(false);
|
|
20
|
+
});
|
|
21
|
+
}, []);
|
|
22
|
+
return _jsxs(_Fragment, { children: [_jsxs(With, { popovertarget: _id, tag: `button`, as: as, className: `zuz-select rel flex aic`, ref: _ref, onClick: (e) => setChoosing(true), ...rest, children: [_jsx(With, { tag: `h2`, className: `zuz-selected`, children: value ? `string` == typeof value ? value : value.value : label || `Choose` }), chevronExpand()] }), _jsx(With, { popover: true, id: _id, className: `zuz-select-options abs flex cols`, style: {
|
|
23
|
+
pointerEvents: choosing ? `auto` : `none`,
|
|
24
|
+
}, animate: {
|
|
25
|
+
from: { height: 0, opacity: 0 },
|
|
26
|
+
to: { height: `auto`, opacity: 1 },
|
|
27
|
+
when: choosing,
|
|
28
|
+
curve: `spring`,
|
|
29
|
+
duration: .4
|
|
30
|
+
}, children: options.map((o) => _jsx(With, { onClick: (e) => updateValue(o), className: value && (`string` == typeof o ? o : o.value) == (`string` == typeof value ? value : value.value) ? `selected` : ``, tag: `button`, children: `string` == typeof o ? o : o.label }, `option-${(`string` == typeof o ? o : o.label).replace(/\s+/g, `-`)}-${`string` == typeof o ? o : o.value}`)) })] });
|
|
31
|
+
});
|
|
32
|
+
export default Select;
|
package/dist/comps/sheet.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export interface SheetProps {
|
|
|
8
8
|
message?: string | ReactNode;
|
|
9
9
|
}
|
|
10
10
|
export interface SheetHandler {
|
|
11
|
-
|
|
11
|
+
showDialog: (message: string | ReactNode, onShow: () => void) => void;
|
|
12
|
+
show: (message: string | ReactNode, duration?: number, type?: SHEET) => void;
|
|
12
13
|
hide: () => void;
|
|
13
14
|
}
|
|
14
15
|
declare const Sheet: import("react").ForwardRefExoticComponent<SheetProps & import("react").RefAttributes<SheetHandler>>;
|
package/dist/comps/sheet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
4
4
|
import With from "./base";
|
|
5
5
|
import { SHEET } from "../types/enums";
|
|
@@ -12,6 +12,24 @@ const Sheet = forwardRef((props, ref) => {
|
|
|
12
12
|
const [_errorType, setErrorType] = useState(SHEET.Default);
|
|
13
13
|
const divRef = useRef(null);
|
|
14
14
|
useImperativeHandle(ref, () => ({
|
|
15
|
+
showDialog(message, onShow) {
|
|
16
|
+
if (_sheetTimeout) {
|
|
17
|
+
clearTimeout(_sheetTimeout);
|
|
18
|
+
if (_sheetWobbleTimeout) {
|
|
19
|
+
clearTimeout(_sheetWobbleTimeout);
|
|
20
|
+
}
|
|
21
|
+
divRef.current.classList.remove(`wobble`);
|
|
22
|
+
setTimeout(() => divRef.current.classList.add(`wobble`), 50);
|
|
23
|
+
_sheetWobbleTimeout = setTimeout(() => {
|
|
24
|
+
divRef.current.classList.remove(`wobble`);
|
|
25
|
+
_sheetWobbleTimeout = null;
|
|
26
|
+
}, 500);
|
|
27
|
+
}
|
|
28
|
+
setErrorType(SHEET.Dialog);
|
|
29
|
+
setMsg(message);
|
|
30
|
+
setVisible(true);
|
|
31
|
+
setTimeout(() => onShow ? onShow() : () => { }, 1000);
|
|
32
|
+
},
|
|
15
33
|
show(message, duration, type) {
|
|
16
34
|
if (_sheetTimeout) {
|
|
17
35
|
clearTimeout(_sheetTimeout);
|
|
@@ -40,6 +58,25 @@ const Sheet = forwardRef((props, ref) => {
|
|
|
40
58
|
}));
|
|
41
59
|
useEffect(() => {
|
|
42
60
|
}, []);
|
|
43
|
-
return
|
|
61
|
+
return _jsxs(_Fragment, { children: [_errorType == SHEET.Dialog && _jsx(With, { className: `zuz-sheet-overlay fixed fill`, animate: {
|
|
62
|
+
from: { y: `-100vh`, opacity: 0 },
|
|
63
|
+
to: { y: 0, opacity: 1 },
|
|
64
|
+
when: visible,
|
|
65
|
+
duration: 0.1,
|
|
66
|
+
} }), _jsx(With, { animate: _errorType == SHEET.Dialog ? {
|
|
67
|
+
from: { scale: 0, x: `-50%`, y: `-50%`, opacity: 0 },
|
|
68
|
+
to: { scale: 1, x: `-50%`, y: `-50%`, opacity: 1 },
|
|
69
|
+
when: visible,
|
|
70
|
+
duration: 0.3,
|
|
71
|
+
delay: 0.1,
|
|
72
|
+
curve: `spring`
|
|
73
|
+
} : {
|
|
74
|
+
from: { scale: 0, x: `-50%`, y: `-10vh`, opacity: 0 },
|
|
75
|
+
to: { scale: 1, x: `-50%`, y: 0, opacity: 1 },
|
|
76
|
+
when: visible,
|
|
77
|
+
duration: 0.3,
|
|
78
|
+
delay: 0.1,
|
|
79
|
+
curve: `spring`
|
|
80
|
+
}, as: as, className: `zuz-sheet toast-${_errorType.toLowerCase()} fixed`.trim(), ...rest, ref: divRef, children: visible && msg == `` ? `Lorem ipsum dolor sit amet, consectetur adipiscing...` : msg })] });
|
|
44
81
|
});
|
|
45
82
|
export default Sheet;
|
package/dist/funs/css.d.ts
CHANGED
package/dist/funs/css.js
CHANGED
|
@@ -523,3 +523,18 @@ export const buildWithStyles = (source) => {
|
|
|
523
523
|
}
|
|
524
524
|
return _;
|
|
525
525
|
};
|
|
526
|
+
export const getAnimationCurve = (curve) => {
|
|
527
|
+
if (!curve)
|
|
528
|
+
return `linear`;
|
|
529
|
+
const _curves = [`spring`];
|
|
530
|
+
if (_curves.includes(curve)) {
|
|
531
|
+
switch (curve) {
|
|
532
|
+
case "spring":
|
|
533
|
+
return `cubic-bezier(0.2, -0.36, 0, 1.46)`;
|
|
534
|
+
break;
|
|
535
|
+
default:
|
|
536
|
+
return `linear`;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return curve;
|
|
540
|
+
};
|
package/dist/funs/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const LINE_KEY = "__LINE__";
|
|
|
6
6
|
export declare const toHash: (n: number, len?: number) => string;
|
|
7
7
|
export declare const fromHash: (n: string) => number;
|
|
8
8
|
export declare const css: () => CSS;
|
|
9
|
+
export declare const uuid: (len?: number) => string;
|
|
10
|
+
export declare const numberInRange: (min: number, max: number) => number;
|
|
9
11
|
export declare const hexColorRegex: RegExp;
|
|
10
12
|
export declare const rgbaColorRegex: RegExp;
|
|
11
13
|
export declare const hslColorRegex: RegExp;
|
package/dist/funs/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import CSS from './css.js';
|
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import { colorNames } from "./colors.js";
|
|
5
5
|
import Hashids from "hashids";
|
|
6
|
+
import { nanoid } from "nanoid";
|
|
6
7
|
let __css;
|
|
7
8
|
export const __SALT = `zuzjs-ui`;
|
|
8
9
|
export const FIELNAME_KEY = `__FILENAME__`;
|
|
@@ -10,6 +11,10 @@ export const LINE_KEY = `__LINE__`;
|
|
|
10
11
|
export const toHash = (n, len = 6) => new Hashids(__SALT, len).encode(n);
|
|
11
12
|
export const fromHash = (n) => Number(new Hashids(__SALT).decode(n));
|
|
12
13
|
export const css = () => __css ? __css : __css = new CSS();
|
|
14
|
+
export const uuid = (len) => nanoid(len);
|
|
15
|
+
export const numberInRange = (min, max) => {
|
|
16
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
17
|
+
};
|
|
13
18
|
export const hexColorRegex = /^#([A-Fa-f0-9]{3}){1,2}$/;
|
|
14
19
|
export const rgbaColorRegex = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*((0|1|0?\.\d+)\s*))?\)$/;
|
|
15
20
|
export const hslColorRegex = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/;
|
package/dist/funs/stylesheet.js
CHANGED
|
@@ -267,6 +267,7 @@ export const cssDirect = {
|
|
|
267
267
|
"rel": "position:relative;",
|
|
268
268
|
"abs": "position:absolute;",
|
|
269
269
|
"fixed": "position:fixed;",
|
|
270
|
+
"sticky": "position:sticky;",
|
|
270
271
|
"abc": "top: 50%;left: 50%;transform: translate(-50%, -50%);",
|
|
271
272
|
"tdn": "text-decoration:none;",
|
|
272
273
|
"tdu": "text-decoration:underline;",
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,6 @@ export { default as Heading } from "./comps/heading";
|
|
|
9
9
|
export { default as Icon } from "./comps/icon";
|
|
10
10
|
export { default as Image } from "./comps/image";
|
|
11
11
|
export { default as Input } from "./comps/input";
|
|
12
|
+
export { default as Select } from "./comps/select";
|
|
12
13
|
export { default as Sheet } from "./comps/sheet";
|
|
13
14
|
export { default as Spinner } from "./comps/spinner";
|
package/dist/index.js
CHANGED
|
@@ -9,5 +9,6 @@ export { default as Heading } from "./comps/heading";
|
|
|
9
9
|
export { default as Icon } from "./comps/icon";
|
|
10
10
|
export { default as Image } from "./comps/image";
|
|
11
11
|
export { default as Input } from "./comps/input";
|
|
12
|
+
export { default as Select } from "./comps/select";
|
|
12
13
|
export { default as Sheet } from "./comps/sheet";
|
|
13
14
|
export { default as Spinner } from "./comps/spinner";
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
button{user-select:none;cursor:pointer}input{user-select:none}input:-webkit-autofill{background-color:rgba(0,0,0,0) !important;-webkit-box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset;box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset}:root{--checkbox-checked: rgb(46, 161, 42);--checkbox-unchecked: rgb(203, 203, 203);--checkbox-thumb: #fff;--checkbox-thumb-shadow: #000;--checkbox-thumb-shadow-size: 2px}.flex{display:flex}.flex.cols{flex-direction:column}.flex.aic{align-items:center}.flex.jcc{justify-content:center}.abs{position:absolute}.fixed{position:fixed}.fill{top:0px;left:0px;bottom:0px;right:0px}.rel{position:relative}.input-with-error{box-shadow:inset 0px 0px 0px 1px #ff8b8b}.zuz-checkbox{height:25px;width:45px;cursor:pointer}.zuz-checkbox input[type=checkbox]{z-index:0;left:10px;top:10px;opacity:0}.zuz-checkbox:before{content:"";position:absolute;width:45px;height:25px;background:var(--checkbox-unchecked);border-radius:50px;z-index:1;transition:all .3s linear 0s}.zuz-checkbox:after{content:"";position:absolute;width:21px;height:21px;background:var(--checkbox-thumb);border-radius:50px;z-index:2;top:2px;left:2px;box-shadow:0px 0px --checkbox-thumb-shadow-size --checkbox-thumb-shadow;transition:all .2s linear 0s}.zuz-checkbox.is-checked:before{box-shadow:inset 0px 0px 0px 15px var(--checkbox-checked)}.zuz-checkbox.is-checked:after{transform:translateX(20px)}.zuz-spinner{animation:spin infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.zuz-cover{backdrop-filter:blur(4px);z-index:99999;gap:15px}.zuz-cover .label{font-size:14px;animation:breath 1s linear infinite}@keyframes breath{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}.zuz-sheet{top:
|
|
1
|
+
*,*::before,*::after{box-sizing:border-box}button{user-select:none;cursor:pointer}input{user-select:none}input:-webkit-autofill{background-color:rgba(0,0,0,0) !important;-webkit-box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset;box-shadow:0 0 0px 1000px rgba(0,0,0,0) inset}[popover]{margin:0;padding:0;border:0}:root{--checkbox-checked: rgb(46, 161, 42);--checkbox-unchecked: rgb(203, 203, 203);--checkbox-thumb: #fff;--checkbox-thumb-shadow: #000;--checkbox-thumb-shadow-size: 2px;--select: #fff;--select-options: #fff;--select-option-font-size: 16px;--select-hover: #eee;--select-selected: #ddd;--select-padding: 6px 8px;--select-radius: 5px}.flex{display:flex}.flex.cols{flex-direction:column}.flex.aic{align-items:center}.flex.jcc{justify-content:center}.abs{position:absolute}.fixed{position:fixed}.fill{top:0px;left:0px;bottom:0px;right:0px}.rel{position:relative}.input-with-error{box-shadow:inset 0px 0px 0px 1px #ff8b8b}.zuz-checkbox{height:25px;width:45px;cursor:pointer}.zuz-checkbox input[type=checkbox]{z-index:0;left:10px;top:10px;opacity:0}.zuz-checkbox:before{content:"";position:absolute;width:45px;height:25px;background:var(--checkbox-unchecked);border-radius:50px;z-index:1;transition:all .3s linear 0s}.zuz-checkbox:after{content:"";position:absolute;width:21px;height:21px;background:var(--checkbox-thumb);border-radius:50px;z-index:2;top:2px;left:2px;box-shadow:0px 0px --checkbox-thumb-shadow-size --checkbox-thumb-shadow;transition:all .2s linear 0s}.zuz-checkbox.is-checked:before{box-shadow:inset 0px 0px 0px 15px var(--checkbox-checked)}.zuz-checkbox.is-checked:after{transform:translateX(20px)}.zuz-spinner{animation:spin infinite}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.zuz-cover{backdrop-filter:blur(4px);z-index:99999;gap:15px}.zuz-cover .label{font-size:14px;animation:breath 1s linear infinite}@keyframes breath{0%{opacity:.5}50%{opacity:1}100%{opacity:.5}}.zuz-toast,.zuz-sheet.toast-warn,.zuz-sheet.toast-success,.zuz-sheet.toast-error{border-radius:6px;padding:6px 12px;font-size:14px;white-space:pre}.zuz-sheet{top:50%;left:50%;transform:translate(-50%, -50%);z-index:214748364;transform-origin:top left;transition:all .5s cubic-bezier(0.2, -0.36, 0, 1.46) 0s}.zuz-sheet.toast-default{background:#333;color:#fff}.zuz-sheet.toast-error{background:#ff4747;color:#fff;top:-20px}.zuz-sheet.toast-success{background:#23ac28;color:#fff}.zuz-sheet.toast-warn{background:#ffba00}.zuz-sheet-overlay{background:rgba(0,0,0,.7);z-index:111;backdrop-filter:blur(10px)}.zuz-context-menu{z-index:99;background:var(--context-background);border-radius:var(--context-radius);padding:10px;box-shadow:var(--context-shadow)}.zuz-context-menu .context-line{height:1px;background:var(--context-seperator);margin:3px 6px}.zuz-context-menu .context-menu-item{width:220px;padding:6px 10px;gap:10px;cursor:pointer;font-size:var(--context-label-size);border-radius:var(--context-radius)}.zuz-context-menu .context-menu-item .ico{font-size:var(--context-icon-size)}.zuz-context-menu .context-menu-item:hover{background:var(--context-hover)}.zuz-select{gap:5px;background:var(--select);border-radius:var(--select-radius)}.zuz-select .zuz-selected{flex:1}.zuz-select-options{max-height:400px;overflow-x:hidden;gap:2px;background:var(--select-options);border-radius:var(--select-radius);padding:4px 0px}.zuz-select-options button{background:rgba(0,0,0,0);border:0px;text-align:left;padding:var(--select-padding);border-radius:var(--select-radius);font-size:var(--select-option-font-size)}.zuz-select-options button:hover{background:var(--select-hover)}.zuz-select-options button.selected{background:var(--select-selected)}
|
package/dist/types/enums.d.ts
CHANGED
package/dist/types/enums.js
CHANGED