@cfx-dev/ui-components 4.0.1 → 4.0.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/assets/general/global.css +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +528 -524
- package/dist/components/ui.d.ts +8 -0
- package/dist/components/ui.js +56 -51
- package/dist/styles-scss/global.scss +1 -0
- package/dist/styles-scss/tokens.scss +6 -0
- package/package.json +1 -1
package/dist/components/ui.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { TextProps } from './Text/Text.types';
|
|
2
2
|
|
|
3
|
+
export declare enum ZIndexEnum {
|
|
4
|
+
zero = "zero",
|
|
5
|
+
first = "first",
|
|
6
|
+
second = "second",
|
|
7
|
+
max = "max"
|
|
8
|
+
}
|
|
9
|
+
export type ZIndexType = keyof typeof ZIndexEnum;
|
|
3
10
|
export declare enum OffsetEnum {
|
|
4
11
|
none = "none",
|
|
5
12
|
hairthin = "hairthin",
|
|
@@ -46,6 +53,7 @@ export declare namespace ui {
|
|
|
46
53
|
export function q(multiplier?: number): string;
|
|
47
54
|
export function offset(size: OffesetType): string;
|
|
48
55
|
export function fontSize(size?: TextProps['size']): string;
|
|
56
|
+
export function zindex(name?: ZIndexType): string;
|
|
49
57
|
export function borderRadius(size?: 'xsmall' | 'small' | 'normal'): string;
|
|
50
58
|
export function color(name: string, variantRaw?: string | number, alpha?: number): string;
|
|
51
59
|
export namespace cls {
|
package/dist/components/ui.js
CHANGED
|
@@ -1,64 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
((
|
|
3
|
-
function i(
|
|
4
|
-
return `calc(var(--quant) * ${
|
|
1
|
+
var A = /* @__PURE__ */ ((r) => (r.zero = "zero", r.first = "first", r.second = "second", r.max = "max", r))(A || {}), v = /* @__PURE__ */ ((r) => (r.none = "none", r.hairthin = "hairthin", r.thin = "thin", r.xxsmall = "xxsmall", r.xsmall = "xsmall", r.small = "small", r.normal = "normal", r.medium = "medium", r.large = "large", r.xlarge = "xlarge", r.safezone = "safezone", r))(v || {}), P = /* @__PURE__ */ ((r) => (r.initial = "initial", r.small = "small", r["small-medium"] = "small-medium", r.medium = "medium", r["medium-large"] = "medium-large", r.large = "large", r.xlarge = "xlarge", r))(P || {}), h;
|
|
2
|
+
((r) => {
|
|
3
|
+
function i(t = 1) {
|
|
4
|
+
return `calc(var(--quant) * ${t})`;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
return `var(--offset-${
|
|
6
|
+
r.q = i;
|
|
7
|
+
function s(t) {
|
|
8
|
+
return `var(--offset-${t})`;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
function u(
|
|
12
|
-
return `var(--font-size-${
|
|
10
|
+
r.offset = s;
|
|
11
|
+
function u(t = "normal") {
|
|
12
|
+
return `var(--font-size-${t})`;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
return `var(--
|
|
14
|
+
r.fontSize = u;
|
|
15
|
+
function z(t = "first") {
|
|
16
|
+
return `var(--zindex-${t})`;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
return e === "pure" && (e = ""), typeof e == "number" && (e = `${e}`), `rgba(var(--color-${r}${e ? `-${e}` : ""}), ${n})`;
|
|
18
|
+
r.zindex = z;
|
|
19
|
+
function S(t = "normal") {
|
|
20
|
+
return `var(--border-radius-${t})`;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
r.borderRadius = S;
|
|
23
|
+
function b(t, e, n = 1) {
|
|
24
|
+
let l = e;
|
|
25
|
+
return l === "pure" && (l = ""), typeof l == "number" && (l = `${l}`), `rgba(var(--color-${t}${l ? `-${l}` : ""}), ${n})`;
|
|
26
|
+
}
|
|
27
|
+
r.color = b, ((t) => {
|
|
28
|
+
t.fullWidth = "util-full-width", t.fullHeight = "util-full-height", t.flexGrow = "util-flex-grow", t.flexNoShrink = "util-flex-no-shrink", t.userSelectableText = "util-text-selectable", t.zIndex9000 = "util-z-index-9000";
|
|
29
|
+
})(r.cls || (r.cls = {})), r.pc = (t) => `${t}%`, r.px = (t) => `${t}px`, r.ch = (t) => `${t}ch`, r.em = (t) => `${t}em`, r.rem = (t) => `${t}rem`, r.vh = (t) => `${t}vh`, r.vw = (t) => `${t}vw`, r.url = (t) => `url(${t})`, r.getOffsetAttrs = (t, e) => typeof e == "string" || typeof e == "number" ? {
|
|
30
|
+
[`data-${t}-initial`]: e.toString()
|
|
31
|
+
} : Object.entries(e).reduce((n, [l, o]) => (n[`data-${t}-${l}`] = o.toString(), n), {}), r.getOffsetStyles = (t, e) => typeof e == "string" ? {
|
|
32
|
+
[`--${t}-initial`]: s(e)
|
|
33
|
+
} : typeof e == "number" ? {
|
|
34
|
+
[`--${t}-initial`]: i(e)
|
|
35
|
+
} : Object.entries(e).reduce((n, [l, o]) => (n[`--${t}-${l}`] = typeof o == "number" ? i(o) : s(o), n), {});
|
|
36
|
+
function f(t, e) {
|
|
33
37
|
const {
|
|
34
38
|
m: n,
|
|
35
|
-
mt:
|
|
39
|
+
mt: l,
|
|
36
40
|
mr: o,
|
|
37
|
-
mb:
|
|
38
|
-
ml:
|
|
39
|
-
p:
|
|
40
|
-
pt:
|
|
41
|
-
pr:
|
|
42
|
-
pb:
|
|
43
|
-
pl:
|
|
44
|
-
} =
|
|
41
|
+
mb: m,
|
|
42
|
+
ml: $,
|
|
43
|
+
p: g,
|
|
44
|
+
pt: a,
|
|
45
|
+
pr: p,
|
|
46
|
+
pb: x,
|
|
47
|
+
pl: d
|
|
48
|
+
} = t;
|
|
45
49
|
return {
|
|
46
|
-
...n ?
|
|
47
|
-
...
|
|
48
|
-
...o ?
|
|
49
|
-
...
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
...
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
...
|
|
50
|
+
...n ? e("m", n) : null,
|
|
51
|
+
...l ? e("mt", l) : null,
|
|
52
|
+
...o ? e("mr", o) : null,
|
|
53
|
+
...m ? e("mb", m) : null,
|
|
54
|
+
...$ ? e("ml", $) : null,
|
|
55
|
+
...g ? e("p", g) : null,
|
|
56
|
+
...a ? e("pt", a) : null,
|
|
57
|
+
...p ? e("pr", p) : null,
|
|
58
|
+
...x ? e("pb", x) : null,
|
|
59
|
+
...d ? e("pl", d) : null
|
|
56
60
|
};
|
|
57
61
|
}
|
|
58
|
-
|
|
59
|
-
})(
|
|
62
|
+
r.callAllMPProps = f, r.getAllMPStyles = (t) => f(t, r.getOffsetStyles), r.getAllMPAttrs = (t) => f(t, r.getOffsetAttrs);
|
|
63
|
+
})(h || (h = {}));
|
|
60
64
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
P as MediaQueryEnum,
|
|
66
|
+
v as OffsetEnum,
|
|
67
|
+
A as ZIndexEnum,
|
|
68
|
+
h as ui
|
|
64
69
|
};
|