@cfx-dev/ui-components 4.2.13 → 4.2.14

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.
@@ -1 +1 @@
1
- .cfxui__Text__root__2fe11{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Text__root__2fe11.cfxui__Text__centered__4d7bd{text-align:center}.cfxui__Text__root__2fe11.cfxui__Text__underlined__5860e{text-decoration:underline}.cfxui__Text__root__2fe11.cfxui__Text__underlined__5860e{text-decoration:line-through}.cfxui__Text__root__2fe11.cfxui__Text__truncated__417f4{width:100%;line-height:1.1;white-space:nowrap;overflow:hidden;-webkit-mask:linear-gradient(90deg,red,red calc(100% - 2ch),transparent);mask:linear-gradient(90deg,red,red calc(100% - 2ch),transparent)}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155{overflow-wrap:break-word}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155 li{margin-left:var(--offset-large)}.cfxui__Text__root__2fe11:not(.cfxui__Text__typographic__d8155) a{color:inherit;text-decoration:none}.cfxui__Text__root__2fe11.cfxui__Text__block__cb1b6{max-width:100%}
1
+ .cfxui__Text__root__2fe11{transition:all .25s ease,outline-offset 0s,outline 0s}.cfxui__Text__root__2fe11.cfxui__Text__centered__4d7bd{text-align:center}.cfxui__Text__root__2fe11.cfxui__Text__underlined__5860e{text-decoration:underline}.cfxui__Text__root__2fe11.cfxui__Text__strikethrough__e3ee3{text-decoration:line-through}.cfxui__Text__root__2fe11.cfxui__Text__truncated__417f4{width:100%;line-height:1.1;white-space:nowrap;overflow:hidden;-webkit-mask:linear-gradient(90deg,red,red calc(100% - 2ch),transparent);mask:linear-gradient(90deg,red,red calc(100% - 2ch),transparent)}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155{overflow-wrap:break-word}.cfxui__Text__root__2fe11.cfxui__Text__typographic__d8155 li{margin-left:var(--offset-large)}.cfxui__Text__root__2fe11:not(.cfxui__Text__typographic__d8155) a{color:inherit;text-decoration:none}.cfxui__Text__root__2fe11.cfxui__Text__block__cb1b6{max-width:100%}
@@ -1,86 +1,87 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import f from "react";
3
- import { ui as t, TextSizeEnum as u } from "../ui.js";
3
+ import { ui as t, TextSizeEnum as _ } from "../ui.js";
4
4
  import { clsx as w } from "../../utils/clsx.js";
5
5
  import { getColor as A } from "../../utils/color.js";
6
- const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "cfxui__Text__underlined__5860e", H = "cfxui__Text__truncated__417f4", N = "cfxui__Text__typographic__d8155", $ = "cfxui__Text__block__cb1b6", r = {
6
+ const E = "cfxui__Text__root__2fe11", O = "cfxui__Text__centered__4d7bd", F = "cfxui__Text__underlined__5860e", H = "cfxui__Text__strikethrough__e3ee3", N = "cfxui__Text__truncated__417f4", $ = "cfxui__Text__typographic__d8155", B = "cfxui__Text__block__cb1b6", n = {
7
7
  root: E,
8
8
  centered: O,
9
9
  underlined: F,
10
- truncated: H,
11
- typographic: N,
12
- block: $
13
- }, B = (e) => e in u ? t.fontSize(e) : typeof e == "number" ? t.q(e) : e, P = (e) => e in u ? t.lineHeight(e) : typeof e == "number" ? t.q(e) : e, q = {
10
+ strikethrough: H,
11
+ truncated: N,
12
+ typographic: $,
13
+ block: B
14
+ }, P = (e) => e in _ ? t.fontSize(e) : typeof e == "number" ? t.q(e) : e, q = (e) => e in _ ? t.lineHeight(e) : typeof e == "number" ? t.q(e) : e, D = {
14
15
  0: 0,
15
16
  25: "var(--text-opacity-25)",
16
17
  50: "var(--text-opacity-50)",
17
18
  75: "var(--text-opacity-75)",
18
19
  100: 1
19
- }, D = {
20
+ }, I = {
20
21
  h1: "h1",
21
22
  h2: "h2",
22
23
  h3: "h3",
23
24
  h4: "h4",
24
25
  h5: "h5",
25
26
  h6: "h6"
26
- }, I = (e, o = 1) => {
27
- const n = typeof e == "string" && q[e];
28
- return typeof n == "string" || typeof n == "number" ? n : o;
29
- }, L = "primary", M = f.forwardRef(function(o, n) {
27
+ }, L = (e, o = 1) => {
28
+ const r = typeof e == "string" && D[e];
29
+ return typeof r == "string" || typeof r == "number" ? r : o;
30
+ }, M = "primary", V = f.forwardRef(function(o, r) {
30
31
  const {
31
32
  family: c,
32
33
  size: i = "normal",
33
- weight: _ = "normal",
34
- letterSpacing: p = "normal",
34
+ weight: u = "normal",
35
+ letterSpacing: h = "normal",
35
36
  as: s = "span",
36
- centered: h = !1,
37
+ centered: p = !1,
37
38
  truncated: m = !1,
38
- typographic: d = !1,
39
- uppercase: y = !1,
40
- userSelectable: g = !1,
41
- underlined: x = !1,
39
+ typographic: g = !1,
40
+ uppercase: d = !1,
41
+ userSelectable: x = !1,
42
+ underlined: y = !1,
42
43
  strikethrough: T = !1,
43
44
  children: b,
44
- className: R,
45
- style: S
46
- } = o, k = s === "div", C = w(
47
- r.root,
48
- R,
45
+ className: k,
46
+ style: R
47
+ } = o, S = s === "div", C = w(
48
+ n.root,
49
+ k,
49
50
  t.getResponsiveClassnames("font-size", i),
50
51
  t.getResponsiveClassnames("line-height", i),
51
52
  {
52
- [r.block]: k,
53
- [r.centered]: h,
54
- [r.truncated]: m,
55
- [r.underlined]: x,
56
- [r.strikethrough]: T,
57
- [r.typographic]: d,
58
- [t.cls.userSelectableText]: g
53
+ [n.block]: S,
54
+ [n.centered]: p,
55
+ [n.truncated]: m,
56
+ [n.underlined]: y,
57
+ [n.strikethrough]: T,
58
+ [n.typographic]: g,
59
+ [t.cls.userSelectableText]: x
59
60
  }
60
61
  ), v = A({
61
62
  ...o,
62
- color: o.color || L,
63
- opacity: I(o.opacity)
64
- }), z = typeof c == "string" ? c : D[s] || "primary", a = {
63
+ color: o.color || M,
64
+ opacity: L(o.opacity)
65
+ }), z = typeof c == "string" ? c : I[s] || "primary", a = {
65
66
  color: v,
66
67
  fontFamily: `var(--font-family-${z})`,
67
68
  lineHeight: `var(--line-height-${i})`,
68
- letterSpacing: `var(--letter-spacing-${p})`,
69
- fontWeight: `var(--font-weight-${_})`,
70
- ...t.getResponsiveStyles("font-size", i, B),
71
- ...t.getResponsiveStyles("line-height", i, P),
72
- ...S
69
+ letterSpacing: `var(--letter-spacing-${h})`,
70
+ fontWeight: `var(--font-weight-${u})`,
71
+ ...t.getResponsiveStyles("font-size", i, P),
72
+ ...t.getResponsiveStyles("line-height", i, q),
73
+ ...R
73
74
  };
74
- return y && (a.textTransform = "uppercase"), /* @__PURE__ */ l(s, { ref: n, dir: "auto", className: C, style: a, children: b });
75
- }), Y = f.forwardRef(function(o, n) {
76
- return /* @__PURE__ */ l(M, { ref: n, ...o, as: "div" });
75
+ return d && (a.textTransform = "uppercase"), /* @__PURE__ */ l(s, { ref: r, dir: "auto", className: C, style: a, children: b });
76
+ }), J = f.forwardRef(function(o, r) {
77
+ return /* @__PURE__ */ l(V, { ref: r, ...o, as: "div" });
77
78
  });
78
79
  export {
79
- L as DEFAULT_TEXT_COLOR,
80
- q as TEXT_OPACITY_MAP,
81
- M as Text,
82
- Y as TextBlock,
83
- I as getTextOpacity,
84
- P as lineHeightResponsiveValueFormatter,
85
- B as textSizeResponsiveValueFormatter
80
+ M as DEFAULT_TEXT_COLOR,
81
+ D as TEXT_OPACITY_MAP,
82
+ V as Text,
83
+ J as TextBlock,
84
+ L as getTextOpacity,
85
+ q as lineHeightResponsiveValueFormatter,
86
+ P as textSizeResponsiveValueFormatter
86
87
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "4.2.13",
4
+ "version": "4.2.14",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",