@cfx-dev/ui-components 1.0.2 → 1.1.1

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.
Files changed (59) hide show
  1. package/README.md +38 -38
  2. package/dist/Button.module-Cv-7p0xt.js +16 -0
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/Flex.css +1 -1
  5. package/dist/assets/Flyout.css +1 -1
  6. package/dist/assets/Input.css +1 -1
  7. package/dist/assets/Island.css +1 -1
  8. package/dist/assets/Pad.css +1 -1
  9. package/dist/assets/Popover.css +1 -1
  10. package/dist/assets/RichInput.css +1 -1
  11. package/dist/assets/Spacer.css +1 -1
  12. package/dist/assets/Textarea.css +1 -1
  13. package/dist/assets/global.css +1 -1
  14. package/dist/components/Button/Button.d.ts +1 -1
  15. package/dist/components/Button/Button.js +1 -1
  16. package/dist/components/Button/ButtonBar.js +1 -1
  17. package/dist/components/Flyout/Flyout.js +39 -39
  18. package/dist/components/Input/Input.d.ts +0 -1
  19. package/dist/components/Input/Input.js +58 -61
  20. package/dist/components/Input/RichInput.js +27 -27
  21. package/dist/components/InputDropzone/InputDropzone.js +122 -119
  22. package/dist/components/InputDropzone/ItemPreview.js +1 -1
  23. package/dist/components/Island/Island.js +23 -23
  24. package/dist/components/Layout/Flex/Flex.d.ts +1 -1
  25. package/dist/components/Layout/Flex/Flex.js +44 -43
  26. package/dist/components/Layout/Pad/Pad.d.ts +1 -1
  27. package/dist/components/Layout/Pad/Pad.js +30 -29
  28. package/dist/components/Modal/Modal.d.ts +2 -0
  29. package/dist/components/Modal/Modal.js +25 -23
  30. package/dist/components/Overlay/Overlay.js +13 -13
  31. package/dist/components/Popover/Popover.js +18 -18
  32. package/dist/components/Select/Select.d.ts +1 -1
  33. package/dist/components/Select/Select.js +239 -229
  34. package/dist/components/Spacer/Spacer.d.ts +1 -1
  35. package/dist/components/Spacer/Spacer.js +13 -12
  36. package/dist/components/Table/Table.js +41 -35
  37. package/dist/components/Text/Text.types.d.ts +1 -1
  38. package/dist/components/Textarea/Textarea.d.ts +0 -1
  39. package/dist/components/Textarea/Textarea.js +37 -40
  40. package/dist/iconBase-Bipuk9tK.js +112 -0
  41. package/dist/main.d.ts +1 -1
  42. package/dist/main.js +112 -113
  43. package/dist/style-guide/Icons/IconDisplayGrid.js +3 -3
  44. package/dist/style-guide/Icons/Icons.d.ts +13 -13
  45. package/dist/style-guide/Icons/Icons.js +36 -8
  46. package/dist/styles-scss/_ui.scss +167 -195
  47. package/dist/styles-scss/assets/images/checkered_dark.svg +7 -7
  48. package/dist/styles-scss/assets/images/checkered_light.svg +7 -7
  49. package/dist/styles-scss/global.scss +73 -75
  50. package/dist/styles-scss/theme_dark.scss +24 -24
  51. package/dist/styles-scss/theme_light.scss +54 -54
  52. package/dist/styles-scss/themes.scss +2 -2
  53. package/dist/styles-scss/tokens.scss +272 -274
  54. package/dist/utils/string.d.ts +16 -1
  55. package/dist/utils/string.js +46 -39
  56. package/package.json +71 -72
  57. package/dist/Button.module-Z6njvP9Z.js +0 -17
  58. package/dist/Icons-NE1cibCU.js +0 -107
  59. package/dist/index.esm-BkynlSN6.js +0 -72
@@ -12,7 +12,7 @@ export interface FlexProps {
12
12
  spaceBetween?: boolean;
13
13
  alignToEnd?: boolean;
14
14
  alignToEndAxis?: boolean;
15
- gap?: 'none' | 'thin' | 'small' | 'normal' | 'large' | 'xlarge';
15
+ gap?: 'none' | 'thin' | 'small' | 'normal' | 'medium' | 'large' | 'xlarge';
16
16
  children?: React.ReactNode;
17
17
  className?: string;
18
18
  }
@@ -1,51 +1,52 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import w from "react";
3
- import { clsx as b } from "../../../utils/clsx.js";
2
+ import b from "react";
3
+ import { clsx as v } from "../../../utils/clsx.js";
4
4
  import { FlexRestricter as R } from "./FlexRestricter.js";
5
- import '../../../assets/Flex.css';const F = "_root_1audv_1", z = "_centered_1audv_11", C = "_vertical_1audv_30", N = "_repell_1audv_36", E = "_wrap_1audv_39", T = "_stretch_1audv_51", j = "_horizontal_1audv_57", e = {
5
+ import '../../../assets/Flex.css';const F = "_root_pd612_1", z = "_centered_pd612_11", C = "_vertical_pd612_30", N = "_repell_pd612_36", E = "_wrap_pd612_39", T = "_stretch_pd612_51", j = "_horizontal_pd612_57", e = {
6
6
  root: F,
7
- "full-width": "_full-width_1audv_5",
8
- "full-height": "_full-height_1audv_8",
7
+ "full-width": "_full-width_pd612_5",
8
+ "full-height": "_full-height_pd612_8",
9
9
  centered: z,
10
- "centered-axis": "_centered-axis_1audv_15",
11
- "centered-cross-axis": "_centered-cross-axis_1audv_18",
12
- "baseline-axis": "_baseline-axis_1audv_21",
13
- "baseline-cross-axis": "_baseline-cross-axis_1audv_24",
14
- "reverse-order": "_reverse-order_1audv_27",
10
+ "centered-axis": "_centered-axis_pd612_15",
11
+ "centered-cross-axis": "_centered-cross-axis_pd612_18",
12
+ "baseline-axis": "_baseline-axis_pd612_21",
13
+ "baseline-cross-axis": "_baseline-cross-axis_pd612_24",
14
+ "reverse-order": "_reverse-order_pd612_27",
15
15
  vertical: C,
16
16
  repell: N,
17
17
  wrap: E,
18
- "align-to-end": "_align-to-end_1audv_42",
19
- "align-to-end-axis": "_align-to-end-axis_1audv_45",
20
- "space-between": "_space-between_1audv_48",
18
+ "align-to-end": "_align-to-end_pd612_42",
19
+ "align-to-end-axis": "_align-to-end-axis_pd612_45",
20
+ "space-between": "_space-between_pd612_48",
21
21
  stretch: T,
22
22
  horizontal: j,
23
- "gap-none": "_gap-none_1audv_63",
24
- "gap-thin": "_gap-thin_1audv_66",
25
- "gap-xsmall": "_gap-xsmall_1audv_69",
26
- "gap-small": "_gap-small_1audv_72",
27
- "gap-normal": "_gap-normal_1audv_75",
28
- "gap-large": "_gap-large_1audv_78",
29
- "gap-xlarge": "_gap-xlarge_1audv_81"
23
+ "gap-none": "_gap-none_pd612_63",
24
+ "gap-thin": "_gap-thin_pd612_66",
25
+ "gap-xsmall": "_gap-xsmall_pd612_69",
26
+ "gap-small": "_gap-small_pd612_72",
27
+ "gap-normal": "_gap-normal_pd612_75",
28
+ "gap-medium": "_gap-medium_pd612_78",
29
+ "gap-large": "_gap-large_pd612_81",
30
+ "gap-xlarge": "_gap-xlarge_pd612_84"
30
31
  };
31
32
  function A(l, s) {
32
33
  const {
33
- fullWidth: _ = !1,
34
+ fullWidth: n = !1,
34
35
  fullHeight: o = !1,
35
36
  vertical: t = !1,
36
37
  centered: a = !1,
37
38
  repell: i = !1,
38
- stretch: d = !1,
39
- wrap: c = !1,
40
- alignToEnd: u = !1,
41
- alignToEndAxis: p = !1,
42
- spaceBetween: v = !1,
43
- reverseOrder: g = !1,
44
- gap: x = "normal",
45
- children: f,
46
- className: h
47
- } = l, m = b(e.root, h, e[`gap-${x}`], {
48
- [e["full-width"]]: _,
39
+ stretch: p = !1,
40
+ wrap: d = !1,
41
+ alignToEnd: c = !1,
42
+ alignToEndAxis: g = !1,
43
+ spaceBetween: x = !1,
44
+ reverseOrder: f = !1,
45
+ gap: h = "normal",
46
+ children: m,
47
+ className: u
48
+ } = l, w = v(e.root, u, e[`gap-${h}`], {
49
+ [e["full-width"]]: n,
49
50
  [e["full-height"]]: o,
50
51
  [e.centered]: a === !0,
51
52
  [e["centered-axis"]]: a === "axis",
@@ -55,21 +56,21 @@ function A(l, s) {
55
56
  [e.vertical]: t,
56
57
  [e.horizontal]: !t,
57
58
  [e.repell]: i,
58
- [e.stretch]: d,
59
- [e.wrap]: c,
60
- [e["align-to-end"]]: u,
61
- [e["align-to-end-axis"]]: p,
62
- [e["space-between"]]: v,
63
- [e["reverse-order"]]: g
59
+ [e.stretch]: p,
60
+ [e.wrap]: d,
61
+ [e["align-to-end"]]: c,
62
+ [e["align-to-end-axis"]]: g,
63
+ [e["space-between"]]: x,
64
+ [e["reverse-order"]]: f
64
65
  });
65
- return /* @__PURE__ */ r("div", { ref: s, className: m, children: f });
66
+ return /* @__PURE__ */ r("div", { ref: s, className: w, children: m });
66
67
  }
67
- const B = w.forwardRef(A), n = B;
68
- n.Restricted = function({
68
+ const B = b.forwardRef(A), _ = B;
69
+ _.Restricted = function({
69
70
  children: s
70
71
  }) {
71
- return /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(R, { children: s }) });
72
+ return /* @__PURE__ */ r(_, { children: /* @__PURE__ */ r(R, { children: s }) });
72
73
  };
73
74
  export {
74
- n as Flex
75
+ _ as Flex
75
76
  };
@@ -6,7 +6,7 @@ export interface PadProps {
6
6
  /**
7
7
  * 'normal' by default
8
8
  */
9
- size?: 'none' | 'small' | 'normal' | 'large' | 'xlarge';
9
+ size?: 'none' | 'small' | 'normal' | 'medium' | 'large' | 'xlarge';
10
10
  top?: boolean;
11
11
  left?: boolean;
12
12
  right?: boolean;
@@ -1,36 +1,37 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { clsx as q } from "../../../utils/clsx.js";
3
- import '../../../assets/Pad.css';const y = "_root_166qt_1", o = {
4
- root: y,
5
- "offset-none": "_offset-none_166qt_1",
6
- "offset-thin": "_offset-thin_166qt_4",
7
- "offset-xsmall": "_offset-xsmall_166qt_7",
8
- "offset-small": "_offset-small_166qt_10",
9
- "offset-normal": "_offset-normal_166qt_13",
10
- "offset-large": "_offset-large_166qt_16",
11
- "offset-xlarge": "_offset-xlarge_166qt_19",
12
- "only-top": "_only-top_166qt_22",
13
- "only-left": "_only-left_166qt_25",
14
- "only-right": "_only-right_166qt_28",
15
- "only-bottom": "_only-bottom_166qt_31"
2
+ import { clsx as y } from "../../../utils/clsx.js";
3
+ import '../../../assets/Pad.css';const c = "_root_1lf8m_1", o = {
4
+ root: c,
5
+ "offset-none": "_offset-none_1lf8m_1",
6
+ "offset-thin": "_offset-thin_1lf8m_4",
7
+ "offset-xsmall": "_offset-xsmall_1lf8m_7",
8
+ "offset-small": "_offset-small_1lf8m_10",
9
+ "offset-normal": "_offset-normal_1lf8m_13",
10
+ "offset-medium": "_offset-medium_1lf8m_16",
11
+ "offset-large": "_offset-large_1lf8m_19",
12
+ "offset-xlarge": "_offset-xlarge_1lf8m_22",
13
+ "only-top": "_only-top_1lf8m_25",
14
+ "only-left": "_only-left_1lf8m_28",
15
+ "only-right": "_only-right_1lf8m_31",
16
+ "only-bottom": "_only-bottom_1lf8m_34"
16
17
  };
17
- function h(_) {
18
+ function p(_) {
18
19
  const {
19
- top: f = !1,
20
- left: l = !1,
21
- right: s = !1,
22
- bottom: e = !1,
23
- size: n = "normal",
24
- children: r,
25
- className: a
26
- } = _, t = !(f || l || s || e), m = q(o.root, a, o[`offset-${n}`], {
27
- [o["only-top"]]: t || f,
28
- [o["only-left"]]: t || l,
29
- [o["only-right"]]: t || s,
30
- [o["only-bottom"]]: t || e
20
+ top: l = !1,
21
+ left: t = !1,
22
+ right: e = !1,
23
+ bottom: s = !1,
24
+ size: m = "normal",
25
+ children: n,
26
+ className: r
27
+ } = _, f = !(l || t || e || s), a = y(o.root, r, o[`offset-${m}`], {
28
+ [o["only-top"]]: f || l,
29
+ [o["only-left"]]: f || t,
30
+ [o["only-right"]]: f || e,
31
+ [o["only-bottom"]]: f || s
31
32
  });
32
- return /* @__PURE__ */ i("div", { className: m, children: r });
33
+ return /* @__PURE__ */ i("div", { className: a, children: n });
33
34
  }
34
35
  export {
35
- h as Pad
36
+ p as Pad
36
37
  };
@@ -1,3 +1,5 @@
1
+ import { default as React } from 'react';
2
+
1
3
  export interface ModalProps {
2
4
  children: React.ReactNode;
3
5
  onClose?: () => void;
@@ -1,8 +1,8 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import { Button as _ } from "../Button/Button.js";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Button as p } from "../Button/Button.js";
3
3
  import { Overlay as s } from "../Overlay/Overlay.js";
4
- import { I as f } from "../../Icons-NE1cibCU.js";
5
- import { noop as n } from "../../utils/functional.js";
4
+ import { Icons as _ } from "../../style-guide/Icons/Icons.js";
5
+ import { noop as f } from "../../utils/functional.js";
6
6
  import { useKeyboardClose as h } from "../../utils/hooks.js";
7
7
  import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27", u = "_header_1v8ee_37", N = "_footer_1v8ee_47", r = {
8
8
  root: v,
@@ -11,32 +11,34 @@ import '../../assets/Modal.css';const v = "_root_1v8ee_1", C = "_close_1v8ee_27"
11
11
  header: u,
12
12
  footer: N
13
13
  };
14
- function l(a) {
14
+ function c(a) {
15
15
  const {
16
- onClose: e = n,
17
- children: d,
18
- backdropClassName: i,
19
- contentClassName: m,
20
- disableBackdropClose: p = !1
21
- } = a, t = p ? n : e;
22
- return h(t), /* @__PURE__ */ c(s, { children: [
23
- /* @__PURE__ */ o(s.Backdrop, { onClick: t, className: i }),
24
- /* @__PURE__ */ o(s.Content, { className: m, children: /* @__PURE__ */ c("div", { className: r.root, children: [
25
- !!e && /* @__PURE__ */ o("div", { className: r.close, children: /* @__PURE__ */ o(_, { size: "large", theme: "transparent", icon: f.exit, onClick: e }) }),
26
- d
16
+ onClose: o,
17
+ children: n,
18
+ backdropClassName: l,
19
+ contentClassName: d,
20
+ disableBackdropClose: i = !1
21
+ } = a;
22
+ h(o || f);
23
+ const m = i ? void 0 : o;
24
+ return /* @__PURE__ */ t(s, { children: [
25
+ /* @__PURE__ */ e(s.Backdrop, { onClick: m, className: l }),
26
+ /* @__PURE__ */ e(s.Content, { className: d, children: /* @__PURE__ */ t("div", { className: r.root, children: [
27
+ !!o && /* @__PURE__ */ e("div", { className: r.close, children: /* @__PURE__ */ e(p, { size: "large", theme: "transparent", icon: _.exit, onClick: o }) }),
28
+ n
27
29
  ] }) })
28
30
  ] });
29
31
  }
30
- l.Header = function({
31
- children: e
32
+ c.Header = function({
33
+ children: o
32
34
  }) {
33
- return /* @__PURE__ */ o("div", { className: r.header, children: e });
35
+ return /* @__PURE__ */ e("div", { className: r.header, children: o });
34
36
  };
35
- l.Footer = function({
36
- children: e
37
+ c.Footer = function({
38
+ children: o
37
39
  }) {
38
- return /* @__PURE__ */ o("div", { className: r.footer, children: e });
40
+ return /* @__PURE__ */ e("div", { className: r.footer, children: o });
39
41
  };
40
42
  export {
41
- l as Modal
43
+ c as Modal
42
44
  };
@@ -1,27 +1,27 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import a from "react";
3
- import { F as i } from "../../Combination-Dp_plIQU.js";
3
+ import { F as s } from "../../Combination-Dp_plIQU.js";
4
4
  import { Interactive as m } from "../Interactive/Interactive.js";
5
- import { clsx as e } from "../../utils/clsx.js";
5
+ import { clsx as r } from "../../utils/clsx.js";
6
6
  import { useOutlet as u } from "../../utils/hooks.js";
7
- import '../../assets/Overlay.css';const _ = "_root_15udb_1", f = "_backdrop_15udb_9", p = "_content_15udb_27", n = {
7
+ import '../../assets/Overlay.css';const _ = "_root_15udb_1", f = "_backdrop_15udb_9", k = "_content_15udb_27", e = {
8
8
  root: _,
9
9
  backdrop: f,
10
10
  "backdrop-appearance": "_backdrop-appearance_15udb_1",
11
- content: p
11
+ content: k
12
12
  }, b = "overlay-outlet";
13
- function l(c) {
13
+ function l(n) {
14
14
  const {
15
15
  className: o,
16
- children: t
17
- } = c, s = e(n.root, o), d = u(b);
18
- return /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("div", { className: s, children: t }) });
16
+ children: c
17
+ } = n, d = r(e.root, o), i = u(b);
18
+ return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t("div", { className: d, children: c }) });
19
19
  }
20
- l.Backdrop = a.forwardRef(function(o, t) {
21
- return /* @__PURE__ */ r(m, { ref: t, onClick: o.onClick, className: e(n.backdrop, o.className), children: o.children });
20
+ l.Backdrop = a.forwardRef(function(o, c) {
21
+ return o.onClick ? /* @__PURE__ */ t(m, { ref: c, onClick: o.onClick, className: r(e.backdrop, o.className), children: o.children }) : /* @__PURE__ */ t("div", { ref: c, className: r(e.backdrop, o.className), children: o.children });
22
22
  });
23
- l.Content = a.forwardRef(function(o, t) {
24
- return /* @__PURE__ */ r("div", { ref: t, className: e(n.content, o.className), children: /* @__PURE__ */ r(i, { children: o.children }) });
23
+ l.Content = a.forwardRef(function(o, c) {
24
+ return /* @__PURE__ */ t("div", { ref: c, className: r(e.content, o.className), children: /* @__PURE__ */ t(s, { children: o.children }) });
25
25
  });
26
26
  export {
27
27
  b as OVERLAY_OUTLET_ID,
@@ -1,36 +1,36 @@
1
- import { jsxs as f, jsx as l } from "react/jsx-runtime";
2
- import u from "react";
3
- import { Interactive as h } from "../Interactive/Interactive.js";
1
+ import { jsxs as l, jsx as g } from "react/jsx-runtime";
2
+ import j from "react";
3
+ import { Interactive as d } from "../Interactive/Interactive.js";
4
4
  import { clsx as t } from "../../utils/clsx.js";
5
- import '../../assets/Popover.css';const x = "_root_14ed3_1", N = "_active_14ed3_4", M = "_popover_14ed3_4", g = "_appearance_14ed3_1", o = {
6
- root: x,
7
- active: N,
8
- popover: M,
9
- appearance: g,
10
- "pos-top-right": "_pos-top-right_14ed3_37"
11
- }, R = u.forwardRef(function(r, s) {
5
+ import '../../assets/Popover.css';const u = "_root_1vjg7_1", h = "_active_1vjg7_4", x = "_popover_1vjg7_4", N = "_appearance_1vjg7_1", o = {
6
+ root: u,
7
+ active: h,
8
+ popover: x,
9
+ appearance: N,
10
+ "pos-top-right": "_pos-top-right_1vjg7_30"
11
+ }, R = j.forwardRef(function(r, s) {
12
12
  const {
13
13
  at: c,
14
14
  popover: p,
15
15
  children: a,
16
16
  active: n = !1,
17
- onMouseEnter: i,
18
- onMouseLeave: v,
17
+ onMouseEnter: v,
18
+ onMouseLeave: i,
19
19
  onMouseDown: _
20
20
  } = r, e = n, m = t(o.root, {
21
21
  [o.active]: e
22
- }), d = t(o.popover, o[`pos-${c}`]);
23
- return /* @__PURE__ */ f(
24
- h,
22
+ }), f = t(o.popover, o[`pos-${c}`]);
23
+ return /* @__PURE__ */ l(
24
+ d,
25
25
  {
26
26
  ref: s,
27
27
  className: m,
28
- onMouseEnter: i,
29
- onMouseLeave: v,
28
+ onMouseEnter: v,
29
+ onMouseLeave: i,
30
30
  onMouseDown: _,
31
31
  children: [
32
32
  a(e),
33
- e && /* @__PURE__ */ l("div", { className: d, children: p })
33
+ e && /* @__PURE__ */ g("div", { className: f, children: p })
34
34
  ]
35
35
  }
36
36
  );
@@ -12,5 +12,5 @@ export interface SelectProps<T = string> {
12
12
  disabled?: boolean;
13
13
  size?: 'normal' | 'small';
14
14
  }
15
- export declare const Select: React.ForwardRefExoticComponent<SelectProps<string> & React.RefAttributes<unknown>>;
15
+ export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
16
16
  export declare const Select2: <T extends string | number>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;