@cfx-dev/ui-components 3.0.3 → 3.0.5

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 (34) hide show
  1. package/dist/Select-Ds-fm4CN.js +3245 -0
  2. package/dist/assets/all_css.css +2 -0
  3. package/dist/assets/css/DropdownSelect.css +1 -0
  4. package/dist/assets/css/Input.css +1 -1
  5. package/dist/assets/css/Slider.css +1 -0
  6. package/dist/components/Checkbox/Checkbox.js +190 -118
  7. package/dist/components/DropdownSelect/DropdownSelect.d.ts +16 -0
  8. package/dist/components/DropdownSelect/DropdownSelect.js +2393 -0
  9. package/dist/components/DropdownSelect/DropdownSelectShowcase.d.ts +5 -0
  10. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +52 -0
  11. package/dist/components/DropdownSelect/index.d.ts +1 -0
  12. package/dist/components/DropdownSelect/index.js +4 -0
  13. package/dist/components/Icons/cfx-icons/UpvotesRecurring.js +9 -8
  14. package/dist/components/Input/Input.js +4 -4
  15. package/dist/components/Select/Select.d.ts +2 -0
  16. package/dist/components/Select/Select.js +7 -3092
  17. package/dist/components/Select/SelectShowcase.js +1 -1
  18. package/dist/components/Select/index.d.ts +1 -1
  19. package/dist/components/Select/index.js +3 -2
  20. package/dist/components/Slider/Slider.d.ts +11 -0
  21. package/dist/components/Slider/Slider.js +606 -0
  22. package/dist/components/Slider/SliderShowcase.d.ts +5 -0
  23. package/dist/components/Slider/SliderShowcase.js +63 -0
  24. package/dist/components/Slider/index.d.ts +1 -0
  25. package/dist/components/Slider/index.js +4 -0
  26. package/dist/components/Switch/Switch.js +131 -68
  27. package/dist/index-BCnz73Lm.js +72 -0
  28. package/dist/index-BW3WdIgK.js +14 -0
  29. package/dist/index-BlbvKsmN.js +82 -0
  30. package/dist/index-CjTSD6zB.js +161 -0
  31. package/dist/main.d.ts +2 -0
  32. package/dist/main.js +69 -65
  33. package/package.json +3 -1
  34. package/dist/index-CjWRnNpt.js +0 -210
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare function DropdownSelectShowcase(): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof DropdownSelectShowcase>;
5
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import r from "react";
3
+ import { Flex as t } from "../Layout/Flex/Flex.js";
4
+ import { Text as o } from "../Text/Text.js";
5
+ import { DropdownSelect as a } from "./DropdownSelect.js";
6
+ const c = [
7
+ {
8
+ value: "all",
9
+ label: "all"
10
+ },
11
+ {
12
+ value: "recurring",
13
+ label: "recurring"
14
+ },
15
+ {
16
+ value: "bursts",
17
+ label: "bursts"
18
+ }
19
+ ];
20
+ function d() {
21
+ const [n, i] = r.useState(void 0), [u, s] = r.useState(void 0);
22
+ return /* @__PURE__ */ l(t, { gap: "large", vertical: !0, pb: 20, children: [
23
+ /* @__PURE__ */ l(t, { gap: "normal", vertical: !0, children: [
24
+ /* @__PURE__ */ e(o, { children: "Default Select Input" }),
25
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
26
+ a,
27
+ {
28
+ options: c,
29
+ onChange: i,
30
+ value: n
31
+ }
32
+ ) })
33
+ ] }),
34
+ /* @__PURE__ */ l(t, { gap: "normal", vertical: !0, children: [
35
+ /* @__PURE__ */ e(o, { children: "Full Width Select Input" }),
36
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
37
+ a,
38
+ {
39
+ size: "large",
40
+ options: c,
41
+ fullWidth: !0,
42
+ value: u,
43
+ onChange: s
44
+ }
45
+ ) })
46
+ ] })
47
+ ] });
48
+ }
49
+ const f = r.memo(d);
50
+ export {
51
+ f as default
52
+ };
@@ -0,0 +1 @@
1
+ export { DropdownSelect } from './DropdownSelect';
@@ -0,0 +1,4 @@
1
+ import { DropdownSelect as r } from "./DropdownSelect.js";
2
+ export {
3
+ r as DropdownSelect
4
+ };
@@ -1,13 +1,14 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import t from "react";
3
- function e(o) {
4
- return /* @__PURE__ */ r(
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import e from "react";
3
+ function t(r) {
4
+ return /* @__PURE__ */ o(
5
5
  "svg",
6
6
  {
7
- ...o,
7
+ ...r,
8
8
  viewBox: "0 0 16 16",
9
+ fill: "none",
9
10
  xmlns: "http://www.w3.org/2000/svg",
10
- children: /* @__PURE__ */ r(
11
+ children: /* @__PURE__ */ o(
11
12
  "path",
12
13
  {
13
14
  stroke: "currentColor",
@@ -20,7 +21,7 @@ function e(o) {
20
21
  }
21
22
  );
22
23
  }
23
- const i = t.memo(e);
24
+ const s = e.memo(t);
24
25
  export {
25
- i as default
26
+ s as default
26
27
  };
@@ -5,16 +5,16 @@ 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 = "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 = {
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__onlight__7d0b7", U = "cfxui__Input__empty__3b36a", Y = "cfxui__Input__decorator__3b81f", e = {
9
9
  root: H,
10
10
  input: J,
11
11
  small: L,
12
12
  large: O,
13
13
  placeholderIcon: P,
14
+ onlight: Q,
14
15
  "full-width": "cfxui__Input__full-width__587b3",
15
- empty: Q,
16
- decorator: U,
17
- onlight: Y,
16
+ empty: U,
17
+ decorator: Y,
18
18
  "backdrop-blur": "cfxui__Input__backdrop-blur__6922f"
19
19
  };
20
20
  function Z(b) {
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { IconSize } from '../Icon';
2
3
  import { InputSize } from '../Input';
3
4
 
4
5
  export interface SelectOption<T> {
@@ -15,4 +16,5 @@ export interface SelectProps<T = string> {
15
16
  size?: InputSize;
16
17
  fullWidth?: boolean;
17
18
  }
19
+ export declare const ICON_SIZE_MAP: Record<InputSize, IconSize>;
18
20
  export declare const Select: React.ForwardRefExoticComponent<SelectProps<string> & React.RefAttributes<unknown>>;