@cfx-dev/ui-components 2.1.8 → 2.1.10

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
- ._root_1hqka_1{flex-shrink:0;position:relative;display:flex;flex-direction:column;max-width:calc((var(--width) - var(--offset-safezone) * 2) * 1);min-width:calc(var(--quant) * 100);max-height:calc((var(--height) - var(--offset-safezone) * 2) * 1);padding:calc(var(--quant) * 6);background-color:var(--color-modal-background);border-radius:var(--border-radius-small);overflow:hidden;animation-name:_modal-appearance_1hqka_1;animation-duration:.2s}@keyframes _modal-appearance_1hqka_1{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}._root_1hqka_1 ._close_1hqka_26{position:absolute;top:calc(var(--quant) * 2);right:calc(var(--quant) * 2.5);z-index:1}._root_1hqka_1 ._header_1hqka_32{display:flex;flex-direction:column;gap:calc(var(--quant) * 2.5);padding-bottom:calc(var(--quant) * 4)}._root_1hqka_1 ._header_1hqka_32 a{border-bottom:1px solid rgba(var(--color-secondary),1);font-weight:700}._root_1hqka_1 ._footer_1hqka_42{padding-top:calc(var(--quant) * 6)}
1
+ ._root_w22bc_1{flex-shrink:0;position:relative;display:flex;flex-direction:column;max-width:calc((var(--width) - var(--offset-safezone) * 2) * 1);min-width:calc(var(--quant) * 50);max-height:calc((var(--height) - var(--offset-safezone) * 2) * 1);padding:calc(var(--quant) * 6);background-color:var(--color-modal-background);border-radius:var(--border-radius-small);overflow:hidden;animation-name:_modal-appearance_w22bc_1;animation-duration:.2s}@media (min-width: 768px){._root_w22bc_1{min-width:calc(var(--quant) * 80)}}@media (min-width: 1280px){._root_w22bc_1{min-width:calc(var(--quant) * 100)}}@keyframes _modal-appearance_w22bc_1{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}._root_w22bc_1 ._close_w22bc_36{position:absolute;top:calc(var(--quant) * 2);right:calc(var(--quant) * 2.5);z-index:1}._root_w22bc_1 ._header_w22bc_42{display:flex;flex-direction:column;gap:calc(var(--quant) * 2.5);padding-bottom:calc(var(--quant) * 4)}._root_w22bc_1 ._header_w22bc_42 a{border-bottom:1px solid rgba(var(--color-secondary),1);font-weight:700}._root_w22bc_1 ._footer_w22bc_52{padding-top:calc(var(--quant) * 6)}
@@ -1 +1 @@
1
- ._reset_cctkn_1{all:unset}._root_cctkn_5{display:flex;align-items:center;--notification-gap: var(--tabular-notification-gap, initial)}._root_cctkn_5._theme-dark_cctkn_10{--color: var(--color-tabular-color-dark)}._root_cctkn_5._theme-light_cctkn_13{--color: var(--color-tabular-color-light)}._root_cctkn_5 ._item_cctkn_16{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;height:var(--tabular-item-height, initial);cursor:pointer;padding:0 var(--tabular-item-padding, initial);color:var(--color);text-transform:uppercase;font-weight:var(--font-weight-normal);font-size:var(--font-size-normal)}._root_cctkn_5 ._item_cctkn_16:disabled{opacity:.5;cursor:not-allowed}._root_cctkn_5 ._item_cctkn_16{transition:all .25s ease,outline-offset 0s,outline 0s}._root_cctkn_5 ._item_cctkn_16:not(:disabled)._active_cctkn_37{box-shadow:0 calc(-1 * var(--tabular-item-border-size, initial)) 0 0 var(--color) inset;font-weight:var(--font-weight-bold)}._root_cctkn_5 ._item_cctkn_16:not(:disabled):hover{box-shadow:0 calc(-1 * var(--tabular-item-border-size, initial)) 0 0 var(--color) inset}._root_cctkn_5 ._item_cctkn_16:not(:disabled):focus-visible,._root_cctkn_5 ._item_cctkn_16:not(:disabled):focus-visible:hover{box-shadow:0 0 0 var(--tabular-item-border-size, initial) var(--color) inset}._root_cctkn_5 ._item_cctkn_16:after{content:attr(data-text);content:attr(data-text)/"";height:0px;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:var(--font-weight-normal);font-size:var(--font-size-normal);text-transform:uppercase}@media speech{._root_cctkn_5 ._item_cctkn_16:after{display:none}}._root_cctkn_5 ._item_cctkn_16._hasNotification_cctkn_64:after{padding-right:calc(var(--notification-gap) + var(--quant))}._root_cctkn_5 ._item_cctkn_16 ._content_cctkn_67{display:inline-flex;align-items:flex-start;gap:var(--notification-gap)}
1
+ ._reset_17apb_1{all:unset}._root_17apb_5{display:flex;align-items:center;--notification-gap: var(--tabular-notification-gap, initial)}._root_17apb_5._theme-dark_17apb_10{--color: var(--color-tabular-color-dark)}._root_17apb_5._theme-light_17apb_13{--color: var(--color-tabular-color-light)}._root_17apb_5 ._item_17apb_16{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;height:var(--tabular-item-height, initial);cursor:pointer;padding:0 var(--tabular-item-padding, initial);color:var(--color);text-transform:capitalize;font-weight:var(--font-weight-normal);font-size:var(--font-size-normal)}._root_17apb_5 ._item_17apb_16:disabled{opacity:.5;cursor:not-allowed}._root_17apb_5 ._item_17apb_16{transition:all .25s ease,outline-offset 0s,outline 0s}._root_17apb_5 ._item_17apb_16:not(:disabled)._active_17apb_37{box-shadow:0 calc(-1 * var(--tabular-item-border-size, initial)) 0 0 var(--color) inset;font-weight:var(--font-weight-bold)}._root_17apb_5 ._item_17apb_16:not(:disabled):hover{box-shadow:0 calc(-1 * var(--tabular-item-border-size, initial)) 0 0 var(--color) inset}._root_17apb_5 ._item_17apb_16:not(:disabled):focus-visible,._root_17apb_5 ._item_17apb_16:not(:disabled):focus-visible:hover{box-shadow:0 0 0 var(--tabular-item-border-size, initial) var(--color) inset}._root_17apb_5 ._item_17apb_16:after{content:attr(data-text);content:attr(data-text)/"";height:0px;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:var(--font-weight-normal);font-size:var(--font-size-normal);text-transform:capitalize}@media speech{._root_17apb_5 ._item_17apb_16:after{display:none}}._root_17apb_5 ._item_17apb_16._hasNotification_17apb_64:after{padding-right:calc(var(--notification-gap) + var(--quant))}._root_17apb_5 ._item_17apb_16 ._content_17apb_67{display:inline-flex;align-items:flex-start;gap:var(--notification-gap)}
@@ -5,6 +5,7 @@ export interface ModalProps {
5
5
  children: React.ReactNode;
6
6
  onClose?: () => void;
7
7
  className?: string;
8
+ overlayClassName?: string;
8
9
  backdropClassName?: string;
9
10
  contentClassName?: string;
10
11
  disableBackdropClose?: boolean;
@@ -1,69 +1,83 @@
1
- import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
- import u from "react";
1
+ import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
+ import N from "react";
3
3
  import "../Button/Button.js";
4
- import { ButtonBar as C } from "../Button/ButtonBar.js";
4
+ import { ButtonBar as k } from "../Button/ButtonBar.js";
5
5
  import "../Button/LinkButton.js";
6
- import N from "../IconButton/IconButton.js";
6
+ import y from "../IconButton/IconButton.js";
7
7
  import { Overlay as t } from "../Overlay/Overlay.js";
8
- import { Text as d } from "../Text/Text.js";
9
- import { clsx as m } from "../../utils/clsx.js";
8
+ import { Text as m } from "../Text/Text.js";
9
+ import { clsx as l } from "../../utils/clsx.js";
10
10
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
11
- import { useKeyboardClose as y } from "../../utils/hooks/useKeyboardClose.js";
11
+ import { useKeyboardClose as w } from "../../utils/hooks/useKeyboardClose.js";
12
12
  import "../../index-2hJuj4UN.js";
13
- import '../../assets/Modal.css';const B = "_root_1hqka_1", q = "_close_1hqka_26", x = "_header_1hqka_32", g = "_footer_1hqka_42", s = {
13
+ import '../../assets/Modal.css';const B = "_root_w22bc_1", v = "_close_w22bc_36", x = "_header_w22bc_42", g = "_footer_w22bc_52", r = {
14
14
  root: B,
15
- "modal-appearance": "_modal-appearance_1hqka_1",
16
- close: q,
15
+ "modal-appearance": "_modal-appearance_w22bc_1",
16
+ close: v,
17
17
  header: x,
18
18
  footer: g
19
19
  };
20
- function p(l) {
20
+ function p(c) {
21
21
  const {
22
22
  onClose: o,
23
- children: a,
23
+ children: s,
24
24
  className: e,
25
+ overlayClassName: b,
25
26
  backdropClassName: f,
26
- contentClassName: h,
27
- ariaDescribedby: _,
28
- ariaLabelledby: b,
29
- disableBackdropClose: i = !1,
30
- disableFocusLock: k = !1
31
- } = l, n = u.useCallback(() => {
32
- i || !o || o();
33
- }, [o, i]);
34
- return y(n), /* @__PURE__ */ c(t, { children: [
35
- /* @__PURE__ */ r(t.Backdrop, { onClick: n, className: f }),
36
- /* @__PURE__ */ r(t.Content, { className: h, disableFocusLock: k, children: /* @__PURE__ */ c(
37
- "div",
27
+ contentClassName: _,
28
+ ariaDescribedby: h,
29
+ ariaLabelledby: u,
30
+ disableBackdropClose: n = !1,
31
+ disableFocusLock: C = !1
32
+ } = c, d = N.useCallback(() => {
33
+ n || !o || o();
34
+ }, [o, n]);
35
+ return w(d), /* @__PURE__ */ i(t, { className: l(r.overlay, b), children: [
36
+ /* @__PURE__ */ a(
37
+ t.Backdrop,
38
38
  {
39
- role: "dialog",
40
- "aria-describedby": _,
41
- "aria-labelledby": b,
42
- className: m(s.root, e),
43
- children: [
44
- !!o && /* @__PURE__ */ r(N, { className: s.close, name: "Close", onClick: o }),
45
- a
46
- ]
39
+ onClick: d,
40
+ className: l(r.backdrop, f)
47
41
  }
48
- ) })
42
+ ),
43
+ /* @__PURE__ */ a(
44
+ t.Content,
45
+ {
46
+ className: _,
47
+ disableFocusLock: C,
48
+ children: /* @__PURE__ */ i(
49
+ "div",
50
+ {
51
+ role: "dialog",
52
+ "aria-describedby": h,
53
+ "aria-labelledby": u,
54
+ className: l(r.root, e),
55
+ children: [
56
+ !!o && /* @__PURE__ */ a(y, { className: r.close, name: "Close", onClick: o }),
57
+ s
58
+ ]
59
+ }
60
+ )
61
+ }
62
+ )
49
63
  ] });
50
64
  }
51
65
  p.Header = function(o) {
52
66
  const {
53
- title: a,
67
+ title: s,
54
68
  description: e
55
69
  } = o;
56
- return /* @__PURE__ */ c("div", { className: s.header, children: [
57
- /* @__PURE__ */ r(
58
- d,
70
+ return /* @__PURE__ */ i("div", { className: r.header, children: [
71
+ /* @__PURE__ */ a(
72
+ m,
59
73
  {
60
74
  weight: "bold",
61
75
  size: "large",
62
- children: a
76
+ children: s
63
77
  }
64
78
  ),
65
- e && /* @__PURE__ */ r(
66
- d,
79
+ e && /* @__PURE__ */ a(
80
+ m,
67
81
  {
68
82
  size: "small",
69
83
  color: "secondary",
@@ -74,10 +88,10 @@ p.Header = function(o) {
74
88
  };
75
89
  p.Footer = function(o) {
76
90
  const {
77
- className: a,
91
+ className: s,
78
92
  ...e
79
93
  } = o;
80
- return /* @__PURE__ */ r(C, { ...e, className: m(s.footer, a) });
94
+ return /* @__PURE__ */ a(k, { ...e, className: l(r.footer, s) });
81
95
  };
82
96
  export {
83
97
  p as Modal
@@ -1,12 +1,12 @@
1
1
  import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import h, { createElement as v } from "react";
3
- import { Dot as C } from "../Dot/Dot.js";
4
- import { clsx as k } from "../../utils/clsx.js";
5
- import '../../assets/Tabular.css';const p = "_reset_cctkn_1", x = "_root_cctkn_5", I = "_item_cctkn_16", R = "_active_cctkn_37", g = "_hasNotification_cctkn_64", T = "_content_cctkn_67", a = {
6
- reset: p,
2
+ import f, { createElement as k } from "react";
3
+ import { Dot as v } from "../Dot/Dot.js";
4
+ import { clsx as h } from "../../utils/clsx.js";
5
+ import '../../assets/Tabular.css';const C = "_reset_17apb_1", x = "_root_17apb_5", I = "_item_17apb_16", R = "_active_17apb_37", g = "_hasNotification_17apb_64", T = "_content_17apb_67", e = {
6
+ reset: C,
7
7
  root: x,
8
- "theme-dark": "_theme-dark_cctkn_10",
9
- "theme-light": "_theme-light_cctkn_13",
8
+ "theme-dark": "_theme-dark_17apb_10",
9
+ "theme-light": "_theme-light_17apb_13",
10
10
  item: I,
11
11
  active: R,
12
12
  hasNotification: g,
@@ -14,77 +14,77 @@ import '../../assets/Tabular.css';const p = "_reset_cctkn_1", x = "_root_cctkn_5
14
14
  };
15
15
  function m(_) {
16
16
  const {
17
- items: i,
17
+ items: s,
18
18
  activeItem: o,
19
- onActivate: e,
20
- itemClassName: c,
21
- ...n
22
- } = _, s = h.useCallback((t) => {
23
- e && e(t);
24
- }, [e]);
25
- return /* @__PURE__ */ r(m.Root, { ...n, children: i.map((t) => /* @__PURE__ */ v(
19
+ onActivate: a,
20
+ itemClassName: i,
21
+ ...c
22
+ } = _, n = f.useCallback((t) => {
23
+ a && a(t);
24
+ }, [a]);
25
+ return /* @__PURE__ */ r(m.Root, { ...c, children: s.map((t) => /* @__PURE__ */ k(
26
26
  m.Item,
27
27
  {
28
28
  ...t,
29
- className: c,
29
+ className: i,
30
30
  key: t.id,
31
31
  active: t.id === o,
32
- onClick: s
32
+ onClick: n
33
33
  }
34
34
  )) });
35
35
  }
36
- m.Root = function(i) {
36
+ m.Root = function(s) {
37
37
  const {
38
38
  children: o,
39
- className: e,
40
- ariaLabel: c,
41
- tabIndex: n,
42
- theme: s = "dark",
39
+ className: a,
40
+ ariaLabel: i,
41
+ tabIndex: c,
42
+ theme: n = "dark",
43
43
  role: t = "tablist"
44
- } = i, l = k(a.root, a[`theme-${s}`], e);
44
+ } = s, l = h(e.root, e[`theme-${n}`], a);
45
45
  return /* @__PURE__ */ r(
46
46
  "div",
47
47
  {
48
48
  role: t,
49
- "aria-label": c,
50
- tabIndex: n,
49
+ "aria-label": i,
50
+ tabIndex: c,
51
51
  className: l,
52
52
  children: o
53
53
  }
54
54
  );
55
55
  };
56
- m.Item = function(i) {
56
+ m.Item = function(s) {
57
57
  const {
58
58
  id: o,
59
- label: e,
60
- onClick: c,
61
- ariaLabel: n,
62
- ariaControls: s,
59
+ label: a,
60
+ onClick: i,
61
+ ariaLabel: c,
62
+ ariaControls: n,
63
63
  className: t,
64
64
  active: l = !1,
65
- disabled: d = !1,
66
- hasNotification: f = !1
67
- } = i, b = h.useCallback(() => {
68
- d || c(o);
69
- }, [d, c, o]), N = k(a.reset, a.item, t, {
70
- [a.active]: l,
71
- [a.hasNotification]: f
65
+ disabled: b = !1,
66
+ hasNotification: d = !1
67
+ } = s, p = f.useCallback(() => {
68
+ b || i(o);
69
+ }, [b, i, o]), N = h(e.reset, e.item, t, {
70
+ [e.active]: l,
71
+ [e.hasNotification]: d
72
72
  });
73
73
  return /* @__PURE__ */ r(
74
74
  "button",
75
75
  {
76
- disabled: d,
76
+ disabled: b,
77
77
  type: "button",
78
78
  role: "tab",
79
79
  className: N,
80
- onClick: b,
81
- "aria-label": n,
82
- "aria-controls": s,
83
- "data-text": e,
80
+ onClick: p,
81
+ "aria-label": c,
82
+ "aria-controls": n,
83
+ "data-text": a,
84
84
  "aria-selected": l,
85
- children: /* @__PURE__ */ u("span", { className: a.content, children: [
86
- e,
87
- f && /* @__PURE__ */ r(C, { color: "green", className: a.notification })
85
+ children: /* @__PURE__ */ u("span", { className: e.content, children: [
86
+ a,
87
+ d && /* @__PURE__ */ r(v, { color: "green", className: e.notification })
88
88
  ] })
89
89
  }
90
90
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfx-dev/ui-components",
3
3
  "private": false,
4
- "version": "2.1.8",
4
+ "version": "2.1.10",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "dist/main.js",