@cfx-dev/ui-components 2.0.10 → 2.1.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/assets/Box.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/global.css +1 -1
- package/dist/components/Layout/Box/Box.d.ts +4 -1
- package/dist/components/Layout/Box/Box.js +97 -31
- package/dist/components/Layout/Flex/Flex.d.ts +2 -3
- package/dist/components/Layout/Flex/Flex.js +39 -33
- package/dist/components/Table/Table.d.ts +21 -9
- package/dist/components/Table/Table.js +129 -70
- package/dist/components/Table/TableShowcase.js +7 -1
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +4 -0
- package/dist/components/ui.d.ts +60 -16
- package/dist/components/ui.js +52 -17
- package/dist/styles-scss/global.scss +1 -0
- package/dist/styles-scss/tokens.scss +25 -0
- package/package.json +1 -1
package/dist/components/ui.js
CHANGED
|
@@ -1,29 +1,64 @@
|
|
|
1
|
-
var
|
|
2
|
-
((
|
|
3
|
-
function
|
|
1
|
+
var z = /* @__PURE__ */ ((t) => (t.none = "none", t.hairthin = "hairthin", t.thin = "thin", t.xxsmall = "xxsmall", t.xsmall = "xsmall", t.small = "small", t.normal = "normal", t.medium = "medium", t.large = "large", t.xlarge = "xlarge", t.safezone = "safezone", t))(z || {}), A = /* @__PURE__ */ ((t) => (t.initial = "initial", t.xxsmall = "xxsmall", t.xsmall = "xsmall", t.small = "small", t.medium = "medium", t.large = "large", t.xlarge = "xlarge", t))(A || {}), d;
|
|
2
|
+
((t) => {
|
|
3
|
+
function i(r = 1) {
|
|
4
4
|
return `calc(var(--quant) * ${r})`;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
function
|
|
6
|
+
t.q = i;
|
|
7
|
+
function s(r) {
|
|
8
8
|
return `var(--offset-${r})`;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
function
|
|
10
|
+
t.offset = s;
|
|
11
|
+
function u(r = "normal") {
|
|
12
12
|
return `var(--font-size-${r})`;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
function
|
|
14
|
+
t.fontSize = u;
|
|
15
|
+
function S(r = "normal") {
|
|
16
16
|
return `var(--border-radius-${r})`;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
-
return
|
|
18
|
+
t.borderRadius = S;
|
|
19
|
+
function b(r, l, n = 1) {
|
|
20
|
+
let e = l;
|
|
21
|
+
return e === "pure" && (e = ""), typeof e == "number" && (e = `${e}`), `rgba(var(--color-${r}${e ? `-${e}` : ""}), ${n})`;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
t.color = b, ((r) => {
|
|
24
24
|
r.fullWidth = "util-full-width", r.fullHeight = "util-full-height", r.flexGrow = "util-flex-grow", r.flexNoShrink = "util-flex-no-shrink", r.userSelectableText = "util-text-selectable", r.zIndex9000 = "util-z-index-9000";
|
|
25
|
-
})(
|
|
26
|
-
}
|
|
25
|
+
})(t.cls || (t.cls = {})), t.pc = (r) => `${r}%`, t.px = (r) => `${r}px`, t.ch = (r) => `${r}ch`, t.em = (r) => `${r}em`, t.rem = (r) => `${r}rem`, t.vh = (r) => `${r}vh`, t.vw = (r) => `${r}vw`, t.url = (r) => `url(${r})`, t.getOffsetAttrs = (r, l) => typeof l == "string" || typeof l == "number" ? {
|
|
26
|
+
[`data-${r}-initial`]: l.toString()
|
|
27
|
+
} : Object.entries(l).reduce((n, [e, o]) => (n[`data-${r}-${e}`] = o.toString(), n), {}), t.getOffsetStyles = (r, l) => typeof l == "string" ? {
|
|
28
|
+
[`--${r}-initial`]: s(l)
|
|
29
|
+
} : typeof l == "number" ? {
|
|
30
|
+
[`--${r}-initial`]: i(l)
|
|
31
|
+
} : Object.entries(l).reduce((n, [e, o]) => (n[`--${r}-${e}`] = typeof o == "number" ? i(o) : s(o), n), {});
|
|
32
|
+
function x(r, l) {
|
|
33
|
+
const {
|
|
34
|
+
m: n,
|
|
35
|
+
mt: e,
|
|
36
|
+
mr: o,
|
|
37
|
+
mb: f,
|
|
38
|
+
ml: $,
|
|
39
|
+
p: m,
|
|
40
|
+
pt: p,
|
|
41
|
+
pr: g,
|
|
42
|
+
pb: a,
|
|
43
|
+
pl: h
|
|
44
|
+
} = r;
|
|
45
|
+
return {
|
|
46
|
+
...n ? l("m", n) : null,
|
|
47
|
+
...e ? l("mt", e) : null,
|
|
48
|
+
...o ? l("mr", o) : null,
|
|
49
|
+
...f ? l("mb", f) : null,
|
|
50
|
+
...$ ? l("ml", $) : null,
|
|
51
|
+
...m ? l("p", m) : null,
|
|
52
|
+
...p ? l("pt", p) : null,
|
|
53
|
+
...g ? l("pr", g) : null,
|
|
54
|
+
...a ? l("pb", a) : null,
|
|
55
|
+
...h ? l("pl", h) : null
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
t.callAllMPProps = x, t.getAllMPStyles = (r) => x(r, t.getOffsetStyles), t.getAllMPAttrs = (r) => x(r, t.getOffsetAttrs);
|
|
59
|
+
})(d || (d = {}));
|
|
27
60
|
export {
|
|
28
|
-
|
|
61
|
+
A as MediaQueryEnum,
|
|
62
|
+
z as OffsetEnum,
|
|
63
|
+
d as ui
|
|
29
64
|
};
|
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
@use "ui";
|
|
3
3
|
@import "ui";
|
|
4
4
|
|
|
5
|
+
$mpMap: (
|
|
6
|
+
m: margin,
|
|
7
|
+
mt: margin-top,
|
|
8
|
+
mr: margin-right,
|
|
9
|
+
mb: margin-bottom,
|
|
10
|
+
ml: margin-left,
|
|
11
|
+
p: padding,
|
|
12
|
+
pt: padding-top,
|
|
13
|
+
pr: padding-right,
|
|
14
|
+
pb: padding-bottom,
|
|
15
|
+
pl: padding-left,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
@mixin mp-tokens() {
|
|
19
|
+
@each $name, $value in $mediaMap {
|
|
20
|
+
@include media-min($name) {
|
|
21
|
+
@each $mpName, $mpProp in $mpMap {
|
|
22
|
+
[data-#{$mpName}-#{$name}] {
|
|
23
|
+
#{$mpProp}: var(--#{$mpName}-#{$name});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
5
30
|
@mixin border-radius-tokens() {
|
|
6
31
|
@include ui.def('border-radius-none', 0);
|
|
7
32
|
@include ui.def('border-radius-xxsmall', ui.q(.25));
|