@cfx-dev/ui-components 3.0.2 → 3.0.4

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 (136) hide show
  1. package/dist/Rail-DcVowhML.js +81 -0
  2. package/dist/assets/css/Accordion.css +1 -1
  3. package/dist/assets/css/Avatar.css +1 -1
  4. package/dist/assets/css/Badge.css +1 -1
  5. package/dist/assets/css/Box.css +1 -1
  6. package/dist/assets/css/Button.css +1 -1
  7. package/dist/assets/css/ButtonBar.css +1 -1
  8. package/dist/assets/css/Center.css +1 -1
  9. package/dist/assets/css/Checkbox.css +1 -1
  10. package/dist/assets/css/ClipboardButton.css +1 -1
  11. package/dist/assets/css/ControlBox.css +1 -1
  12. package/dist/assets/css/CountryFlag.css +1 -1
  13. package/dist/assets/css/Decorate.css +1 -1
  14. package/dist/assets/css/Dot.css +1 -1
  15. package/dist/assets/css/Flex.css +1 -1
  16. package/dist/assets/css/FlexRestricter.css +1 -1
  17. package/dist/assets/css/FlexShowcase.css +1 -1
  18. package/dist/assets/css/Flyout.css +1 -1
  19. package/dist/assets/css/Icon.css +1 -1
  20. package/dist/assets/css/IconBig.css +1 -1
  21. package/dist/assets/css/IconButton.css +1 -1
  22. package/dist/assets/css/Indicator.css +1 -1
  23. package/dist/assets/css/InfoPanel.css +1 -1
  24. package/dist/assets/css/Input.css +1 -1
  25. package/dist/assets/css/InputDropzone.css +1 -1
  26. package/dist/assets/css/Interactive.css +1 -1
  27. package/dist/assets/css/Island.css +1 -1
  28. package/dist/assets/css/ItemPreview.css +1 -1
  29. package/dist/assets/css/Link.css +1 -1
  30. package/dist/assets/css/Loaf.css +1 -1
  31. package/dist/assets/css/Modal.css +1 -1
  32. package/dist/assets/css/NavList.css +1 -1
  33. package/dist/assets/css/Overlay.css +1 -1
  34. package/dist/assets/css/Pad.css +1 -1
  35. package/dist/assets/css/Page.css +1 -1
  36. package/dist/assets/css/Popover.css +1 -1
  37. package/dist/assets/css/PopoverShowcase.css +1 -1
  38. package/dist/assets/css/PremiumBadge.css +1 -1
  39. package/dist/assets/css/Prose.css +1 -1
  40. package/dist/assets/css/Radio.css +1 -1
  41. package/dist/assets/css/Rail.css +1 -1
  42. package/dist/assets/css/RichInput.css +1 -1
  43. package/dist/assets/css/Select.css +1 -1
  44. package/dist/assets/css/Separator.css +1 -1
  45. package/dist/assets/css/Shroud.css +1 -1
  46. package/dist/assets/css/Skeleton.css +1 -1
  47. package/dist/assets/css/Spacer.css +1 -1
  48. package/dist/assets/css/Switch.css +1 -1
  49. package/dist/assets/css/Table.css +1 -1
  50. package/dist/assets/css/Tabular.css +1 -1
  51. package/dist/assets/css/Text.css +1 -1
  52. package/dist/assets/css/TextShowcase.css +1 -1
  53. package/dist/assets/css/Textarea.css +1 -1
  54. package/dist/assets/css/Title.css +1 -1
  55. package/dist/assets/css/ToggleGroup.css +1 -1
  56. package/dist/assets/general/global.css +1 -1
  57. package/dist/cfxIcons-BNd1WgpX.js +96 -0
  58. package/dist/components/Accordion/Accordion.js +69 -69
  59. package/dist/components/Avatar/Avatar.js +18 -18
  60. package/dist/components/Badge/Badge.js +23 -23
  61. package/dist/components/Button/Button.js +76 -76
  62. package/dist/components/Button/ButtonBar.js +6 -6
  63. package/dist/components/Checkbox/Checkbox.js +90 -85
  64. package/dist/components/ClipboardButton/ClipboardButton.js +17 -17
  65. package/dist/components/ControlBox/ControlBox.js +11 -11
  66. package/dist/components/CountryFlag/CountryFlag.js +9 -9
  67. package/dist/components/Decorate/Decorate.js +12 -12
  68. package/dist/components/Dot/Dot.js +17 -17
  69. package/dist/components/Flyout/Flyout.js +44 -44
  70. package/dist/components/Icon/Icon.js +14 -14
  71. package/dist/components/IconBig/IconBig.js +23 -18
  72. package/dist/components/IconButton/IconButton.js +25 -25
  73. package/dist/components/Icons/IconsShowcase.js +1 -1
  74. package/dist/components/Icons/cfx-icons/Cart.d.ts +5 -0
  75. package/dist/components/Icons/cfx-icons/Cart.js +42 -0
  76. package/dist/components/Icons/cfx-icons/UpvotesBurst.d.ts +5 -0
  77. package/dist/components/Icons/cfx-icons/UpvotesBurst.js +26 -0
  78. package/dist/components/Icons/cfx-icons/UpvotesRecurring.d.ts +5 -0
  79. package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +27 -0
  80. package/dist/components/Icons/cfx-icons/User.d.ts +5 -0
  81. package/dist/components/Icons/cfx-icons/User.js +31 -0
  82. package/dist/components/Icons/cfx-icons/Verified.d.ts +5 -0
  83. package/dist/components/Icons/cfx-icons/Verified.js +23 -0
  84. package/dist/components/Icons/cfxIcons.d.ts +5 -0
  85. package/dist/components/Icons/cfxIcons.js +52 -42
  86. package/dist/components/Icons/index.js +1 -1
  87. package/dist/components/Indicator/Indicator.js +11 -11
  88. package/dist/components/InfoPanel/InfoPanel.js +37 -37
  89. package/dist/components/Input/Input.js +59 -59
  90. package/dist/components/Input/RichInput.js +39 -39
  91. package/dist/components/InputDropzone/InputDropzone.js +87 -87
  92. package/dist/components/InputDropzone/ItemPreview.js +17 -17
  93. package/dist/components/Interactive/Interactive.js +6 -6
  94. package/dist/components/Island/Island.js +20 -20
  95. package/dist/components/Layout/Box/Box.js +81 -81
  96. package/dist/components/Layout/Center/Center.js +14 -14
  97. package/dist/components/Layout/Flex/Flex.js +67 -67
  98. package/dist/components/Layout/Flex/FlexRestricter.js +14 -14
  99. package/dist/components/Layout/Flex/FlexShowcase.js +4 -4
  100. package/dist/components/Layout/Pad/Pad.js +34 -34
  101. package/dist/components/Layout/Page/Page.js +11 -11
  102. package/dist/components/Layout/Scrollable/Rail.js +1 -1
  103. package/dist/components/Layout/Scrollable/Scrollable.js +1 -1
  104. package/dist/components/Layout/Scrollable/VirtualScrollable.js +1 -1
  105. package/dist/components/Layout/Scrollable/index.js +1 -1
  106. package/dist/components/Link/ButtonLink.js +7 -6
  107. package/dist/components/Link/Link.js +36 -27
  108. package/dist/components/Loaf/Loaf.js +20 -20
  109. package/dist/components/Modal/Modal.js +51 -51
  110. package/dist/components/NavList/NavList.js +23 -23
  111. package/dist/components/Overlay/Overlay.js +17 -17
  112. package/dist/components/Popover/Popover.js +29 -29
  113. package/dist/components/Popover/PopoverShowcase.js +9 -9
  114. package/dist/components/PremiumBadge/PremiumBadge.js +8 -8
  115. package/dist/components/Prose/Prose.js +6 -6
  116. package/dist/components/Radio/Radio.js +32 -32
  117. package/dist/components/Select/Select.js +157 -157
  118. package/dist/components/Separator/Separator.js +31 -31
  119. package/dist/components/Shroud/Shroud.js +14 -14
  120. package/dist/components/Skeleton/Skeleton.js +10 -10
  121. package/dist/components/Spacer/Spacer.js +25 -25
  122. package/dist/components/Switch/Switch.js +43 -43
  123. package/dist/components/Table/Table.js +82 -82
  124. package/dist/components/Tabular/Tabular.js +60 -60
  125. package/dist/components/Text/Text.js +26 -26
  126. package/dist/components/Text/TextShowcase.js +19 -19
  127. package/dist/components/Textarea/Textarea.js +36 -36
  128. package/dist/components/Title/Title.js +57 -57
  129. package/dist/components/ToggleGroup/ToggleGroup.js +40 -40
  130. package/dist/main.js +2 -2
  131. package/dist/styles-scss/_ui.scss +22 -0
  132. package/dist/styles-scss/global.scss +5 -0
  133. package/dist/styles-scss/tokens.scss +5 -25
  134. package/package.json +2 -2
  135. package/dist/Rail-XT5PwAlx.js +0 -81
  136. package/dist/cfxIcons-BlbKR-zU.js +0 -86
@@ -1,24 +1,24 @@
1
1
  import { default as o } from "./cfx-icons/Close.js";
2
- import { default as t } from "./cfx-icons/Controller.js";
2
+ import { default as a } from "./cfx-icons/Controller.js";
3
3
  import { default as l } from "./cfx-icons/Copy.js";
4
4
  import { default as p } from "./cfx-icons/DownArrow.js";
5
- import { default as u } from "./cfx-icons/DownChevron.js";
5
+ import { default as d } from "./cfx-icons/DownChevron.js";
6
6
  import { default as m } from "./cfx-icons/Download.js";
7
7
  import { default as i } from "./cfx-icons/Expand.js";
8
8
  import { default as C } from "./cfx-icons/ExternalLink.js";
9
- import { default as M } from "./cfx-icons/Heart.js";
10
- import { default as U } from "./cfx-icons/HeartFilled.js";
11
- import { default as v } from "./cfx-icons/Help.js";
12
- import { default as A } from "./cfx-icons/LeftArrow.js";
13
- import { default as k } from "./cfx-icons/LeftChevron.js";
14
- import { default as H } from "./cfx-icons/Map.js";
15
- import { default as P } from "./cfx-icons/Menu.js";
9
+ import { default as w } from "./cfx-icons/Heart.js";
10
+ import { default as c } from "./cfx-icons/HeartFilled.js";
11
+ import { default as S } from "./cfx-icons/Help.js";
12
+ import { default as y } from "./cfx-icons/LeftArrow.js";
13
+ import { default as R } from "./cfx-icons/LeftChevron.js";
14
+ import { default as D } from "./cfx-icons/Map.js";
15
+ import { default as L } from "./cfx-icons/Menu.js";
16
16
  import { default as T } from "./cfx-icons/Minus.js";
17
- import { default as q } from "./cfx-icons/More.js";
18
- import { default as V } from "./cfx-icons/MoreInfo.js";
19
- import { default as I } from "./cfx-icons/Pencil.js";
20
- import { default as W } from "./cfx-icons/Play.js";
21
- import { default as z } from "./cfx-icons/Plus.js";
17
+ import { default as b } from "./cfx-icons/More.js";
18
+ import { default as E } from "./cfx-icons/MoreInfo.js";
19
+ import { default as F } from "./cfx-icons/Pencil.js";
20
+ import { default as O } from "./cfx-icons/Play.js";
21
+ import { default as j } from "./cfx-icons/Plus.js";
22
22
  import { default as G } from "./cfx-icons/Refresh.js";
23
23
  import { default as K } from "./cfx-icons/RightArrow.js";
24
24
  import { default as Q } from "./cfx-icons/RightChevron.js";
@@ -26,40 +26,46 @@ import { default as Y } from "./cfx-icons/Search.js";
26
26
  import { default as _ } from "./cfx-icons/Sort.js";
27
27
  import { default as rr } from "./cfx-icons/Square.js";
28
28
  import { default as or } from "./cfx-icons/SquareCheck.js";
29
- import { default as tr } from "./cfx-icons/Stop.js";
29
+ import { default as ar } from "./cfx-icons/Stop.js";
30
30
  import { default as lr } from "./cfx-icons/Tick.js";
31
31
  import { default as pr } from "./cfx-icons/Transfer.js";
32
- import { default as ur } from "./cfx-icons/Trash.js";
32
+ import { default as dr } from "./cfx-icons/Trash.js";
33
33
  import { default as mr } from "./cfx-icons/Undo.js";
34
34
  import { default as ir } from "./cfx-icons/UpArrow.js";
35
35
  import { default as Cr } from "./cfx-icons/UpChevron.js";
36
- import { default as Mr } from "./cfx-icons/Upload.js";
37
- import { default as Ur } from "./cfx-icons/Users.js";
38
- import { default as vr } from "./cfx-icons/Visibility.js";
39
- import { default as Ar } from "./cfx-icons/VisibilityOff.js";
40
- import { default as kr } from "./cfx-icons/Warning.js";
36
+ import { default as wr } from "./cfx-icons/Upload.js";
37
+ import { default as cr } from "./cfx-icons/Users.js";
38
+ import { default as Sr } from "./cfx-icons/Visibility.js";
39
+ import { default as yr } from "./cfx-icons/VisibilityOff.js";
40
+ import { default as Rr } from "./cfx-icons/Warning.js";
41
+ import { default as Dr } from "./cfx-icons/Cart.js";
42
+ import { default as Lr } from "./cfx-icons/User.js";
43
+ import { default as Tr } from "./cfx-icons/Verified.js";
44
+ import { default as br } from "./cfx-icons/UpvotesBurst.js";
45
+ import { default as Er } from "./cfx-icons/UpvotesRecurring.js";
41
46
  export {
47
+ Dr as Cart,
42
48
  o as Close,
43
- t as Controller,
49
+ a as Controller,
44
50
  l as Copy,
45
51
  p as DownArrow,
46
- u as DownChevron,
52
+ d as DownChevron,
47
53
  m as Download,
48
54
  i as Expand,
49
55
  C as ExternalLink,
50
- M as Heart,
51
- U as HeartFilled,
52
- v as Help,
53
- A as LeftArrow,
54
- k as LeftChevron,
55
- H as Map,
56
- P as Menu,
56
+ w as Heart,
57
+ c as HeartFilled,
58
+ S as Help,
59
+ y as LeftArrow,
60
+ R as LeftChevron,
61
+ D as Map,
62
+ L as Menu,
57
63
  T as Minus,
58
- q as More,
59
- V as MoreInfo,
60
- I as Pencil,
61
- W as Play,
62
- z as Plus,
64
+ b as More,
65
+ E as MoreInfo,
66
+ F as Pencil,
67
+ O as Play,
68
+ j as Plus,
63
69
  G as Refresh,
64
70
  K as RightArrow,
65
71
  Q as RightChevron,
@@ -67,16 +73,20 @@ export {
67
73
  _ as Sort,
68
74
  rr as Square,
69
75
  or as SquareCheck,
70
- tr as Stop,
76
+ ar as Stop,
71
77
  lr as Tick,
72
78
  pr as Transfer,
73
- ur as Trash,
79
+ dr as Trash,
74
80
  mr as Undo,
75
81
  ir as UpArrow,
76
82
  Cr as UpChevron,
77
- Mr as Upload,
78
- Ur as Users,
79
- vr as Visibility,
80
- Ar as VisibilityOff,
81
- kr as Warning
83
+ wr as Upload,
84
+ br as UpvotesBurst,
85
+ Er as UpvotesRecurring,
86
+ Lr as User,
87
+ cr as Users,
88
+ Tr as Verified,
89
+ Sr as Visibility,
90
+ yr as VisibilityOff,
91
+ Rr as Warning
82
92
  };
@@ -1,4 +1,4 @@
1
- import { I as s } from "../../cfxIcons-BlbKR-zU.js";
1
+ import { I as s } from "../../cfxIcons-BNd1WgpX.js";
2
2
  import { I as a } from "../../cfxIconsBig-BLJjMT-Y.js";
3
3
  export {
4
4
  s as Icons,
@@ -1,19 +1,19 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import i from "react";
3
- import { clsx as a } from "../../utils/clsx.js";
4
- const s = "_root_2gp9n_1", e = "_indicator_2gp9n_1", r = {
5
- root: s,
6
- indicator: e
7
- }, c = { animationDelay: "0ms" }, m = { animationDelay: "50ms" }, d = { animationDelay: "100ms" }, l = { animationDelay: "150ms" }, v = i.memo(function({
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import a from "react";
3
+ import { clsx as n } from "../../utils/clsx.js";
4
+ const c = "cfxui__Indicator__root__71ac4", s = "cfxui__Indicator__indicator__9d908", r = {
5
+ root: c,
6
+ indicator: s
7
+ }, d = { animationDelay: "0ms" }, e = { animationDelay: "50ms" }, m = { animationDelay: "100ms" }, l = { animationDelay: "150ms" }, u = a.memo(function({
8
8
  className: t
9
9
  }) {
10
- return /* @__PURE__ */ n("div", { className: a(r.root, t), children: [
11
- /* @__PURE__ */ o("div", { style: c }),
12
- /* @__PURE__ */ o("div", { style: m }),
10
+ return /* @__PURE__ */ i("div", { className: n(r.root, t), children: [
13
11
  /* @__PURE__ */ o("div", { style: d }),
12
+ /* @__PURE__ */ o("div", { style: e }),
13
+ /* @__PURE__ */ o("div", { style: m }),
14
14
  /* @__PURE__ */ o("div", { style: l })
15
15
  ] });
16
16
  });
17
17
  export {
18
- v as Indicator
18
+ u as Indicator
19
19
  };
@@ -1,56 +1,56 @@
1
- import { jsxs as p, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
2
  import u from "react";
3
- import { Icon as r } from "../Icon/Icon.js";
4
- import { clsx as v } from "../../utils/clsx.js";
5
- const y = "_rootUnset_5rtl4_1", f = "_root_5rtl4_1", x = "_interactive_5rtl4_19", z = "_interactiveIcon_5rtl4_22", d = "_icon_5rtl4_70", I = "_content_5rtl4_74", t = {
6
- rootUnset: y,
7
- root: f,
8
- interactive: x,
9
- interactiveIcon: z,
10
- "type-neutral": "_type-neutral_5rtl4_34",
11
- "type-error": "_type-error_5rtl4_41",
12
- "type-success": "_type-success_5rtl4_48",
13
- "type-warning": "_type-warning_5rtl4_55",
14
- "size-small": "_size-small_5rtl4_62",
15
- "size-large": "_size-large_5rtl4_66",
16
- icon: d,
17
- content: I
3
+ import { Icon as _ } from "../Icon/Icon.js";
4
+ import { clsx as x } from "../../utils/clsx.js";
5
+ const I = "cfxui__InfoPanel__rootUnset__7ca3f", p = "cfxui__InfoPanel__root__a19ad", P = "cfxui__InfoPanel__interactive__1b051", v = "cfxui__InfoPanel__interactiveIcon__03510", y = "cfxui__InfoPanel__icon__b2fca", d = "cfxui__InfoPanel__content__43082", n = {
6
+ rootUnset: I,
7
+ root: p,
8
+ interactive: P,
9
+ interactiveIcon: v,
10
+ "type-neutral": "cfxui__InfoPanel__type-neutral__c4653",
11
+ "type-error": "cfxui__InfoPanel__type-error__bdfbf",
12
+ "type-success": "cfxui__InfoPanel__type-success__e3f02",
13
+ "type-warning": "cfxui__InfoPanel__type-warning__053e4",
14
+ "size-small": "cfxui__InfoPanel__size-small__815a3",
15
+ "size-large": "cfxui__InfoPanel__size-large__20a20",
16
+ icon: y,
17
+ content: d
18
18
  };
19
- function N(s) {
19
+ function b(a) {
20
20
  const {
21
21
  type: c = "neutral",
22
- size: a = "normal",
23
- className: i,
22
+ size: i = "normal",
23
+ className: s,
24
24
  onClick: e,
25
- ariaLabel: l,
26
- icon: n,
27
- children: _
28
- } = s, m = v(
29
- t.rootUnset,
30
- t.root,
31
- i,
32
- t[`type-${c}`],
33
- t[`size-${a}`],
25
+ ariaLabel: r,
26
+ icon: t,
27
+ children: l
28
+ } = a, f = x(
29
+ n.rootUnset,
30
+ n.root,
31
+ s,
32
+ n[`type-${c}`],
33
+ n[`size-${i}`],
34
34
  {
35
- [t.interactive]: !!e
35
+ [n.interactive]: !!e
36
36
  }
37
37
  );
38
- return /* @__PURE__ */ p(
38
+ return /* @__PURE__ */ m(
39
39
  e ? "button" : "div",
40
40
  {
41
41
  type: e ? "button" : void 0,
42
- className: m,
42
+ className: f,
43
43
  onClick: e,
44
- "aria-label": l,
44
+ "aria-label": r,
45
45
  children: [
46
- n && /* @__PURE__ */ o(r, { size: "xxsmall", name: n, className: t.icon }),
47
- /* @__PURE__ */ o("div", { className: t.content, children: _ }),
48
- e && /* @__PURE__ */ o(r, { size: "xxsmall", name: "LeftArrow", className: t.interactiveIcon })
46
+ t && /* @__PURE__ */ o(_, { size: "xxsmall", name: t, className: n.icon }),
47
+ /* @__PURE__ */ o("div", { className: n.content, children: l }),
48
+ e && /* @__PURE__ */ o(_, { size: "xxsmall", name: "LeftArrow", className: n.interactiveIcon })
49
49
  ]
50
50
  }
51
51
  );
52
52
  }
53
- const R = u.memo(N);
53
+ const w = u.memo(b);
54
54
  export {
55
- R as default
55
+ w as default
56
56
  };
@@ -1,110 +1,110 @@
1
- import { jsxs as G, jsx as t } from "react/jsx-runtime";
2
- import r from "react";
1
+ import { jsxs as G, jsx as o } from "react/jsx-runtime";
2
+ import l from "react";
3
3
  import { Icon as T } from "../Icon/Icon.js";
4
4
  import W from "../IconButton/IconButton.js";
5
5
  import { Indicator as X } from "../Indicator/Indicator.js";
6
6
  import { clsx as $ } from "../../utils/clsx.js";
7
7
  import { getValue as q } from "../../utils/getValue.js";
8
- const H = "_root_e1sis_1", J = "_input_e1sis_1", L = "_small_e1sis_5", O = "_large_e1sis_9", P = "_placeholderIcon_e1sis_72", Q = "_empty_e1sis_164", U = "_decorator_e1sis_169", Y = "_onlight_e1sis_186", e = {
8
+ const H = "cfxui__Input__root__6392b", J = "cfxui__Input__input__07830", L = "cfxui__Input__small__c1513", O = "cfxui__Input__large__92d72", P = "cfxui__Input__placeholderIcon__4d079", Q = "cfxui__Input__empty__3b36a", U = "cfxui__Input__decorator__3b81f", Y = "cfxui__Input__onlight__7d0b7", e = {
9
9
  root: H,
10
10
  input: J,
11
11
  small: L,
12
12
  large: O,
13
13
  placeholderIcon: P,
14
- "full-width": "_full-width_e1sis_158",
14
+ "full-width": "cfxui__Input__full-width__587b3",
15
15
  empty: Q,
16
16
  decorator: U,
17
17
  onlight: Y,
18
- "backdrop-blur": "_backdrop-blur_e1sis_240"
18
+ "backdrop-blur": "cfxui__Input__backdrop-blur__6922f"
19
19
  };
20
- function Z(I) {
20
+ function Z(b) {
21
21
  const {
22
- decorator: o,
23
- loading: i,
24
- type: u,
25
- hasValue: d,
26
- onCleare: a
27
- } = I;
28
- return i ? /* @__PURE__ */ t("div", { className: e.decorator, children: /* @__PURE__ */ t(X, {}) }) : o ? /* @__PURE__ */ t("div", { className: e.decorator, children: q(o) }) : u === "search" && d ? /* @__PURE__ */ t("div", { className: e.decorator, children: /* @__PURE__ */ t(W, { size: "xsmall", areaSize: "large", name: "Close", onClick: a }) }) : null;
22
+ decorator: t,
23
+ loading: s,
24
+ type: i,
25
+ hasValue: _,
26
+ onCleare: n
27
+ } = b;
28
+ return s ? /* @__PURE__ */ o("div", { className: e.decorator, children: /* @__PURE__ */ o(X, {}) }) : t ? /* @__PURE__ */ o("div", { className: e.decorator, children: q(t) }) : i === "search" && _ ? /* @__PURE__ */ o("div", { className: e.decorator, children: /* @__PURE__ */ o(W, { size: "xsmall", areaSize: "large", name: "Close", onClick: n }) }) : null;
29
29
  }
30
- const se = r.forwardRef(function(o, i) {
30
+ const ce = l.forwardRef(function(t, s) {
31
31
  const {
32
- id: u,
33
- fullWidth: d = !1,
34
- value: a,
35
- onChange: m,
32
+ id: i,
33
+ fullWidth: _ = !1,
34
+ value: n,
35
+ onChange: d,
36
36
  onSubmit: f,
37
- onKeyDown: _,
37
+ onKeyDown: m,
38
38
  pattern: p,
39
- tabIndex: C,
40
- loading: N = !1,
41
- spellCheck: k = !0,
42
- autofocus: w = !1,
43
- disabled: x = !1,
39
+ tabIndex: y,
40
+ loading: C = !1,
41
+ spellCheck: N = !0,
42
+ autofocus: k = !1,
43
+ disabled: w = !1,
44
44
  className: v = "",
45
- placeholder: s = "",
46
- placeholderIcon: c,
47
- type: g = "text",
45
+ placeholder: c = "",
46
+ placeholderIcon: u,
47
+ type: x = "text",
48
48
  size: E = "normal",
49
49
  theme: R = "default",
50
50
  decorator: V,
51
51
  backdropBlur: S = !1
52
- } = o, [h, D] = r.useState(a), y = typeof h < "u" && h !== "" && h !== null || typeof a < "u" && a !== "" && a !== null, z = o.type === "number" && (o.min ?? Number.MIN_SAFE_INTEGER) || void 0, A = o.type === "number" && (o.max ?? Number.MAX_SAFE_INTEGER) || void 0, n = r.useCallback((l) => {
53
- D(l), m && m(l);
54
- }, [m]), F = r.useCallback(
55
- (l) => {
52
+ } = t, [h, D] = l.useState(n), g = typeof h < "u" && h !== "" && h !== null || typeof n < "u" && n !== "" && n !== null, z = t.type === "number" && (t.min ?? Number.MIN_SAFE_INTEGER) || void 0, A = t.type === "number" && (t.max ?? Number.MAX_SAFE_INTEGER) || void 0, r = l.useCallback((a) => {
53
+ D(a), d && d(a);
54
+ }, [d]), F = l.useCallback(
55
+ (a) => {
56
56
  const {
57
- value: b
58
- } = l.target;
57
+ value: I
58
+ } = a.target;
59
59
  if (p) {
60
- p.test(b) && n(b);
60
+ p.test(I) && r(I);
61
61
  return;
62
62
  }
63
- n(b);
63
+ r(I);
64
64
  },
65
- [n, p]
66
- ), K = r.useCallback((l) => {
67
- _ && _(l), f && l.key === "Enter" && f();
68
- }, [_, f]), M = r.useCallback(() => {
69
- n("");
70
- }, [n]), j = $(e.root, e[E], e[R], v, {
71
- [e["full-width"]]: d,
65
+ [r, p]
66
+ ), K = l.useCallback((a) => {
67
+ m && m(a), f && a.key === "Enter" && f();
68
+ }, [m, f]), M = l.useCallback(() => {
69
+ r("");
70
+ }, [r]), j = $(e.root, e[E], e[R], v, {
71
+ [e["full-width"]]: _,
72
72
  [e["backdrop-blur"]]: S,
73
- [e.empty]: !y
74
- }), B = r.useMemo(() => s ? c ? ` ${s.trim()}` : s.trim() : "", [s, c]);
73
+ [e.empty]: !g
74
+ }), B = l.useMemo(() => c ? u ? ` ${c.trim()}` : c.trim() : "", [c, u]);
75
75
  return /* @__PURE__ */ G("div", { className: j, children: [
76
- /* @__PURE__ */ t(
76
+ /* @__PURE__ */ o(
77
77
  "input",
78
78
  {
79
- id: u,
80
- ref: i,
81
- type: g,
82
- tabIndex: C,
83
- autoFocus: w,
79
+ id: i,
80
+ ref: s,
81
+ type: x,
82
+ tabIndex: y,
83
+ autoFocus: k,
84
84
  className: e.input,
85
- value: a,
85
+ value: n,
86
86
  placeholder: B,
87
- disabled: x,
87
+ disabled: w,
88
88
  onChange: F,
89
89
  onKeyDown: K,
90
- spellCheck: k,
90
+ spellCheck: N,
91
91
  min: z,
92
92
  max: A
93
93
  }
94
94
  ),
95
- c && /* @__PURE__ */ t(T, { name: c, className: e.placeholderIcon }),
96
- /* @__PURE__ */ t(
95
+ u && /* @__PURE__ */ o(T, { name: u, className: e.placeholderIcon }),
96
+ /* @__PURE__ */ o(
97
97
  Z,
98
98
  {
99
99
  decorator: V,
100
- loading: N,
101
- type: g,
102
- hasValue: y,
100
+ loading: C,
101
+ type: x,
102
+ hasValue: g,
103
103
  onCleare: M
104
104
  }
105
105
  )
106
106
  ] });
107
107
  });
108
108
  export {
109
- se as default
109
+ ce as default
110
110
  };
@@ -1,63 +1,63 @@
1
- import { jsxs as D, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as B, jsx as n } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { Button as F } from "../Button/Button.js";
4
- import { clsx as I } from "../../utils/clsx.js";
3
+ import { Button as D } from "../Button/Button.js";
4
+ import { clsx as F } from "../../utils/clsx.js";
5
5
  import { useDynamicRef as i } from "../../utils/hooks/useDynamicRef.js";
6
6
  import "../../utils/hooks/useGlobalKeyboardEvent.js";
7
7
  import "../../utils/hooks/useKeyboardClose.js";
8
8
  import "../../index-2hJuj4UN.js";
9
- const L = "_root_1vnop_1", T = "_renderer_1vnop_1", j = "_small_1vnop_5", E = "_large_1vnop_10", z = "_clear_1vnop_157", o = {
9
+ const L = "cfxui__RichInput__root__57e6e", T = "cfxui__RichInput__renderer__8b298", j = "cfxui__RichInput__small__cd3d1", E = "cfxui__RichInput__large__74aed", z = "cfxui__RichInput__clear__5538b", c = {
10
10
  root: L,
11
11
  renderer: T,
12
12
  small: j,
13
13
  large: E,
14
14
  clear: z
15
- }, P = r.forwardRef(function(f, m) {
15
+ }, P = r.forwardRef(function(f, _) {
16
16
  const {
17
- size: p = "normal",
18
- value: c,
19
- onChange: d,
20
- onFocus: _,
17
+ size: d = "normal",
18
+ value: l,
19
+ onChange: m,
20
+ onFocus: p,
21
21
  onBlur: h,
22
- onSelect: C,
23
- onKeyDown: g,
24
- className: R,
25
- rendered: v,
26
- placeholder: S,
27
- autoFocus: k,
28
- withClearButton: x = !1
29
- } = f, s = r.useRef(null), n = r.useRef(null), a = i(d), u = i(C), N = r.useCallback((e) => {
30
- a.current(e.target.value);
31
- }, []), b = r.useCallback(() => {
22
+ onSelect: R,
23
+ onKeyDown: C,
24
+ className: g,
25
+ rendered: x,
26
+ placeholder: I,
27
+ autoFocus: S,
28
+ withClearButton: b = !1
29
+ } = f, a = r.useRef(null), t = r.useRef(null), s = i(m), u = i(R), k = r.useCallback((e) => {
30
+ s.current(e.target.value);
31
+ }, []), N = r.useCallback(() => {
32
32
  var e;
33
- a.current(""), (e = s.current) == null || e.focus();
34
- }, []), w = r.useCallback((e) => {
33
+ s.current(""), (e = a.current) == null || e.focus();
34
+ }, []), v = r.useCallback((e) => {
35
35
  if (!u.current || !(e.target instanceof HTMLInputElement))
36
36
  return;
37
- const l = e.target;
38
- u.current(l.selectionStart, l.selectionEnd, l.selectionDirection);
39
- }, []), y = r.useCallback((e) => {
40
- n.current && (n.current.scrollTop = e.target.scrollTop, n.current.scrollLeft = e.target.scrollLeft);
41
- }, []), B = I(o.root, R, o[p]);
42
- return /* @__PURE__ */ D("div", { ref: m, className: B, children: [
43
- /* @__PURE__ */ t(
37
+ const o = e.target;
38
+ u.current(o.selectionStart, o.selectionEnd, o.selectionDirection);
39
+ }, []), w = r.useCallback((e) => {
40
+ t.current && (t.current.scrollTop = e.target.scrollTop, t.current.scrollLeft = e.target.scrollLeft);
41
+ }, []), y = F(c.root, g, c[d]);
42
+ return /* @__PURE__ */ B("div", { ref: _, className: y, children: [
43
+ /* @__PURE__ */ n(
44
44
  "input",
45
45
  {
46
- ref: s,
47
- autoFocus: k,
46
+ ref: a,
47
+ autoFocus: S,
48
48
  type: "text",
49
- value: c,
50
- onChange: N,
51
- placeholder: S,
49
+ value: l,
50
+ onChange: k,
51
+ placeholder: I,
52
52
  onBlur: h,
53
- onFocus: _,
54
- onScroll: y,
55
- onSelect: w,
56
- onKeyDown: g
53
+ onFocus: p,
54
+ onScroll: w,
55
+ onSelect: v,
56
+ onKeyDown: C
57
57
  }
58
58
  ),
59
- /* @__PURE__ */ t("div", { ref: n, className: o.renderer, children: v }),
60
- x && c && /* @__PURE__ */ t("div", { className: o.clear, children: /* @__PURE__ */ t(F, { icon: "Close", onClick: b }) })
59
+ /* @__PURE__ */ n("div", { ref: t, className: c.renderer, children: x }),
60
+ b && l && /* @__PURE__ */ n("div", { className: c.clear, children: /* @__PURE__ */ n(D, { icon: "Close", onClick: N }) })
61
61
  ] });
62
62
  });
63
63
  export {