@cfx-dev/ui-components 4.5.1 → 4.5.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 (52) hide show
  1. package/dist/assets/all_css.css +2 -0
  2. package/dist/assets/css/Input.css +1 -1
  3. package/dist/assets/css/Modal.css +1 -1
  4. package/dist/assets/css/StyledInput.css +1 -0
  5. package/dist/assets/css/StyledTextarea.css +1 -0
  6. package/dist/assets/css/Textarea.css +1 -1
  7. package/dist/assets/general/global.css +1 -1
  8. package/dist/components/Button/LinkButton.js +30 -24
  9. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  10. package/dist/components/Checkbox/Checkbox.js +139 -129
  11. package/dist/components/ClipboardButton/ClipboardButton.js +4 -4
  12. package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
  13. package/dist/components/DropdownSelect/DropdownSelect.js +53 -44
  14. package/dist/components/DropdownSelect/DropdownSelectShowcase.js +13 -12
  15. package/dist/components/Flyout/Flyout.js +4 -4
  16. package/dist/components/Input/Input.d.ts +3 -2
  17. package/dist/components/Input/Input.js +94 -89
  18. package/dist/components/Input/Input.types.d.ts +2 -0
  19. package/dist/components/Input/Input.types.js +1 -0
  20. package/dist/components/Input/RichInput.d.ts +1 -1
  21. package/dist/components/Input/index.d.ts +2 -1
  22. package/dist/components/InputDropzone/InputDropzone.d.ts +1 -0
  23. package/dist/components/InputDropzone/InputDropzone.js +135 -134
  24. package/dist/components/InputDropzone/InputDropzoneShowcase.js +6 -5
  25. package/dist/components/Modal/Modal.d.ts +36 -2
  26. package/dist/components/Modal/Modal.js +129 -63
  27. package/dist/components/Modal/ModalShowcase.js +24 -16
  28. package/dist/components/Radio/Radio.d.ts +1 -0
  29. package/dist/components/Radio/Radio.js +21 -19
  30. package/dist/components/StyledInput/StyledInput.d.ts +12 -0
  31. package/dist/components/StyledInput/StyledInput.js +46 -0
  32. package/dist/components/StyledInput/index.d.ts +2 -0
  33. package/dist/components/StyledInput/index.js +4 -0
  34. package/dist/components/StyledTextarea/StyledTextarea.d.ts +10 -0
  35. package/dist/components/StyledTextarea/StyledTextarea.js +32 -0
  36. package/dist/components/StyledTextarea/index.d.ts +2 -0
  37. package/dist/components/StyledTextarea/index.js +4 -0
  38. package/dist/components/Switch/Switch.js +61 -49
  39. package/dist/components/Tabular/Tabular.d.ts +12 -0
  40. package/dist/components/Tabular/Tabular.js +34 -33
  41. package/dist/components/Tabular/index.d.ts +1 -1
  42. package/dist/components/Textarea/Textarea.d.ts +7 -3
  43. package/dist/components/Textarea/Textarea.js +46 -43
  44. package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -0
  45. package/dist/components/ToggleGroup/ToggleGroup.js +57 -47
  46. package/dist/main.d.ts +5 -1
  47. package/dist/main.js +126 -122
  48. package/dist/rsc.d.ts +4 -0
  49. package/dist/rsc.js +12 -8
  50. package/dist/styles-scss/global.scss +1 -1
  51. package/dist/styles-scss/tokens.scss +19 -20
  52. package/package.json +1 -1
@@ -1,72 +1,72 @@
1
- import { jsxs as I, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as P, jsx as i } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import M from "react";
4
- import { u as k, d as H, c as j, P as x, e as A, f as q } from "../../index-DCuJlMqr.js";
4
+ import { u as x, d as H, c as j, P as y, e as A, f as q } from "../../index-DCuJlMqr.js";
5
5
  import { u as z } from "../../index-BZPx6jYI.js";
6
- import { clsx as P } from "../../utils/clsx.js";
7
- var m = "Switch", [L, et] = j(m), [O, $] = L(m), y = r.forwardRef(
6
+ import { clsx as k } from "../../utils/clsx.js";
7
+ var w = "Switch", [L, et] = j(w), [O, $] = L(w), T = r.forwardRef(
8
8
  (e, s) => {
9
9
  const {
10
10
  __scopeSwitch: t,
11
11
  name: o,
12
12
  checked: c,
13
- defaultChecked: w,
14
- required: u,
15
- disabled: a,
16
- value: h = "on",
13
+ defaultChecked: u,
14
+ required: h,
15
+ disabled: n,
16
+ value: d = "on",
17
17
  onCheckedChange: _,
18
- form: n,
18
+ form: a,
19
19
  ...S
20
- } = e, [d, l] = r.useState(null), b = k(s, (f) => l(f)), v = r.useRef(!1), R = d ? n || !!d.closest("form") : !0, [p, B] = H({
20
+ } = e, [p, l] = r.useState(null), b = x(s, (m) => l(m)), v = r.useRef(!1), R = p ? a || !!p.closest("form") : !0, [f, U] = H({
21
21
  prop: c,
22
- defaultProp: w ?? !1,
22
+ defaultProp: u ?? !1,
23
23
  onChange: _,
24
- caller: m
24
+ caller: w
25
25
  });
26
- return /* @__PURE__ */ I(O, { scope: t, checked: p, disabled: a, children: [
26
+ return /* @__PURE__ */ P(O, { scope: t, checked: f, disabled: n, children: [
27
27
  /* @__PURE__ */ i(
28
- x.button,
28
+ y.button,
29
29
  {
30
30
  type: "button",
31
31
  role: "switch",
32
- "aria-checked": p,
33
- "aria-required": u,
34
- "data-state": g(p),
35
- "data-disabled": a ? "" : void 0,
36
- disabled: a,
37
- value: h,
32
+ "aria-checked": f,
33
+ "aria-required": h,
34
+ "data-state": B(f),
35
+ "data-disabled": n ? "" : void 0,
36
+ disabled: n,
37
+ value: d,
38
38
  ...S,
39
39
  ref: b,
40
- onClick: A(e.onClick, (f) => {
41
- B((U) => !U), R && (v.current = f.isPropagationStopped(), v.current || f.stopPropagation());
40
+ onClick: A(e.onClick, (m) => {
41
+ U((I) => !I), R && (v.current = m.isPropagationStopped(), v.current || m.stopPropagation());
42
42
  })
43
43
  }
44
44
  ),
45
45
  R && /* @__PURE__ */ i(
46
- E,
46
+ g,
47
47
  {
48
- control: d,
48
+ control: p,
49
49
  bubbles: !v.current,
50
50
  name: o,
51
- value: h,
52
- checked: p,
53
- required: u,
54
- disabled: a,
55
- form: n,
51
+ value: d,
52
+ checked: f,
53
+ required: h,
54
+ disabled: n,
55
+ form: a,
56
56
  style: { transform: "translateX(-100%)" }
57
57
  }
58
58
  )
59
59
  ] });
60
60
  }
61
61
  );
62
- y.displayName = m;
63
- var T = "SwitchThumb", N = r.forwardRef(
62
+ T.displayName = w;
63
+ var N = "SwitchThumb", E = r.forwardRef(
64
64
  (e, s) => {
65
- const { __scopeSwitch: t, ...o } = e, c = $(T, t);
65
+ const { __scopeSwitch: t, ...o } = e, c = $(N, t);
66
66
  return /* @__PURE__ */ i(
67
- x.span,
67
+ y.span,
68
68
  {
69
- "data-state": g(c.checked),
69
+ "data-state": B(c.checked),
70
70
  "data-disabled": c.disabled ? "" : void 0,
71
71
  ...o,
72
72
  ref: s
@@ -74,28 +74,28 @@ var T = "SwitchThumb", N = r.forwardRef(
74
74
  );
75
75
  }
76
76
  );
77
- N.displayName = T;
78
- var D = "SwitchBubbleInput", E = r.forwardRef(
77
+ E.displayName = N;
78
+ var D = "SwitchBubbleInput", g = r.forwardRef(
79
79
  ({
80
80
  __scopeSwitch: e,
81
81
  control: s,
82
82
  checked: t,
83
83
  bubbles: o = !0,
84
84
  ...c
85
- }, w) => {
86
- const u = r.useRef(null), a = k(u, w), h = z(t), _ = q(s);
85
+ }, u) => {
86
+ const h = r.useRef(null), n = x(h, u), d = z(t), _ = q(s);
87
87
  return r.useEffect(() => {
88
- const n = u.current;
89
- if (!n) return;
88
+ const a = h.current;
89
+ if (!a) return;
90
90
  const S = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(
91
91
  S,
92
92
  "checked"
93
93
  ).set;
94
- if (h !== t && l) {
94
+ if (d !== t && l) {
95
95
  const b = new Event("click", { bubbles: o });
96
- l.call(n, t), n.dispatchEvent(b);
96
+ l.call(a, t), a.dispatchEvent(b);
97
97
  }
98
- }, [h, t, o]), /* @__PURE__ */ i(
98
+ }, [d, t, o]), /* @__PURE__ */ i(
99
99
  "input",
100
100
  {
101
101
  type: "checkbox",
@@ -103,7 +103,7 @@ var D = "SwitchBubbleInput", E = r.forwardRef(
103
103
  defaultChecked: t,
104
104
  ...c,
105
105
  tabIndex: -1,
106
- ref: a,
106
+ ref: n,
107
107
  style: {
108
108
  ...c.style,
109
109
  ..._,
@@ -116,11 +116,11 @@ var D = "SwitchBubbleInput", E = r.forwardRef(
116
116
  );
117
117
  }
118
118
  );
119
- E.displayName = D;
120
- function g(e) {
119
+ g.displayName = D;
120
+ function B(e) {
121
121
  return e ? "checked" : "unchecked";
122
122
  }
123
- var F = y, W = N;
123
+ var F = T, W = E;
124
124
  const X = "cfxui__Switch__switchUnset__c8b03", G = "cfxui__Switch__switchRoot__f2911", J = "cfxui__Switch__switchThumb__9cbf5", C = {
125
125
  switchUnset: X,
126
126
  switchRoot: G,
@@ -130,9 +130,21 @@ function K(e) {
130
130
  const {
131
131
  classNameRoot: s,
132
132
  classNameThumb: t,
133
- ...o
133
+ name: o,
134
+ checked: c,
135
+ ...u
134
136
  } = e;
135
- return /* @__PURE__ */ i(F, { ...o, className: P(C.switchRoot, C.switchUnset, s), children: /* @__PURE__ */ i(W, { className: P(C.switchThumb, t) }) });
137
+ return /* @__PURE__ */ P(F, { ...u, className: k(C.switchRoot, C.switchUnset, s), children: [
138
+ o && /* @__PURE__ */ i(
139
+ "input",
140
+ {
141
+ type: "hidden",
142
+ name: o,
143
+ value: c ? "on" : ""
144
+ }
145
+ ),
146
+ /* @__PURE__ */ i(W, { className: k(C.switchThumb, t) })
147
+ ] });
136
148
  }
137
149
  const ot = M.memo(K);
138
150
  export {
@@ -32,9 +32,21 @@ export declare namespace Tabular {
32
32
  export interface TabularRootProps extends React.PropsWithChildren, Pick<TabularProps, 'className' | 'ariaLabel' | 'tabIndex' | 'theme' | 'role' | 'size'> {
33
33
  style?: React.CSSProperties;
34
34
  }
35
+ export interface TabularItemComponentProps {
36
+ disabled?: boolean;
37
+ type: HTMLButtonElement['type'];
38
+ role: HTMLButtonElement['role'];
39
+ className?: string;
40
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
41
+ 'aria-label'?: string;
42
+ 'aria-controls'?: string;
43
+ 'data-text'?: React.ReactNode;
44
+ 'aria-selected'?: boolean;
45
+ }
35
46
  export interface TabularItemProps extends TabularItem {
36
47
  active: boolean;
37
48
  onClick: (id: string) => void;
38
49
  className?: string;
39
50
  size?: ResponsiveValueType<TabularSize>;
51
+ Component?: React.ElementType<TabularItemComponentProps>;
40
52
  }
@@ -1,12 +1,12 @@
1
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
2
- import d, { createElement as N } from "react";
3
- import { Dot as p } from "../Dot/Dot.js";
1
+ import { jsx as m, jsxs as N } from "react/jsx-runtime";
2
+ import d, { createElement as p } from "react";
3
+ import { Dot as C } from "../Dot/Dot.js";
4
4
  import { clsx as n } from "../../utils/clsx.js";
5
- import { ui as C } from "../../utils/ui/ui.js";
6
- const v = "cfxui__Tabular__reset__b1dbc", k = "cfxui__Tabular__item__98cc3", I = "cfxui__Tabular__root__0ff05", R = "cfxui__Tabular__active__1ae95", y = "cfxui__Tabular__hasNotification__c372f", j = "cfxui__Tabular__content__3a95a", l = {
7
- reset: v,
5
+ import { ui as v } from "../../utils/ui/ui.js";
6
+ const k = "cfxui__Tabular__reset__b1dbc", R = "cfxui__Tabular__item__98cc3", I = "cfxui__Tabular__root__0ff05", y = "cfxui__Tabular__active__1ae95", j = "cfxui__Tabular__hasNotification__c372f", A = "cfxui__Tabular__content__3a95a", e = {
7
+ reset: k,
8
8
  "tabular-size-initial-large": "cfxui__Tabular__tabular-size-initial-large__9451f",
9
- item: k,
9
+ item: R,
10
10
  "tabular-size-initial-small": "cfxui__Tabular__tabular-size-initial-small__4dad8",
11
11
  "tabular-size-small-large": "cfxui__Tabular__tabular-size-small-large__1390c",
12
12
  "tabular-size-small-small": "cfxui__Tabular__tabular-size-small-small__cc6e3",
@@ -23,25 +23,25 @@ const v = "cfxui__Tabular__reset__b1dbc", k = "cfxui__Tabular__item__98cc3", I =
23
23
  root: I,
24
24
  "theme-dark": "cfxui__Tabular__theme-dark__80b8c",
25
25
  "theme-light": "cfxui__Tabular__theme-light__c05b9",
26
- active: R,
27
- hasNotification: y,
28
- content: j
26
+ active: y,
27
+ hasNotification: j,
28
+ content: A
29
29
  };
30
30
  function o(b) {
31
31
  const {
32
32
  items: s,
33
33
  activeItem: t,
34
- onActivate: e,
34
+ onActivate: l,
35
35
  itemClassName: i,
36
36
  size: u = "medium",
37
37
  ..._
38
38
  } = b, c = d.useCallback((a) => {
39
- e && e(a);
40
- }, [e]), r = n(
41
- l.root,
39
+ l && l(a);
40
+ }, [l]), r = n(
41
+ e.root,
42
42
  _.className
43
43
  );
44
- return /* @__PURE__ */ m(o.Root, { ..._, className: r, children: s.map((a) => /* @__PURE__ */ N(
44
+ return /* @__PURE__ */ m(o.Root, { ..._, className: r, children: s.map((a) => /* @__PURE__ */ p(
45
45
  o.Item,
46
46
  {
47
47
  ...a,
@@ -56,13 +56,13 @@ function o(b) {
56
56
  o.Root = function(s) {
57
57
  const {
58
58
  children: t,
59
- className: e,
59
+ className: l,
60
60
  ariaLabel: i,
61
61
  tabIndex: u,
62
62
  theme: _ = "dark",
63
63
  role: c = "tablist",
64
64
  style: r
65
- } = s, a = n(l.root, l[`theme-${_}`], e);
65
+ } = s, a = n(e.root, e[`theme-${_}`], l);
66
66
  return /* @__PURE__ */ m(
67
67
  "div",
68
68
  {
@@ -78,7 +78,7 @@ o.Root = function(s) {
78
78
  o.Item = function(s) {
79
79
  const {
80
80
  id: t,
81
- label: e,
81
+ label: l,
82
82
  onClick: i,
83
83
  ariaLabel: u,
84
84
  ariaControls: _,
@@ -86,34 +86,35 @@ o.Item = function(s) {
86
86
  active: r = !1,
87
87
  disabled: a = !1,
88
88
  hasNotification: f = !1,
89
- size: x
90
- } = s, z = d.useCallback(() => {
89
+ size: x,
90
+ Component: z
91
+ } = s, g = d.useCallback(() => {
91
92
  a || i(t);
92
- }, [a, i, t]), g = n(
93
- l.reset,
94
- l.item,
93
+ }, [a, i, t]), T = n(
94
+ e.reset,
95
+ e.item,
95
96
  c,
96
- C.getResponsiveFlatClassnames("tabular-size", x).map((T) => l[T]),
97
+ v.getResponsiveFlatClassnames("tabular-size", x).map((h) => e[h]),
97
98
  {
98
- [l.active]: r,
99
- [l.hasNotification]: f
99
+ [e.active]: r,
100
+ [e.hasNotification]: f
100
101
  }
101
102
  );
102
103
  return /* @__PURE__ */ m(
103
- "button",
104
+ z || "button",
104
105
  {
105
106
  disabled: a,
106
107
  type: "button",
107
108
  role: "tab",
108
- className: g,
109
- onClick: z,
109
+ className: T,
110
+ onClick: g,
110
111
  "aria-label": u,
111
112
  "aria-controls": _,
112
- "data-text": e,
113
+ "data-text": l,
113
114
  "aria-selected": r,
114
- children: /* @__PURE__ */ h("span", { className: l.content, children: [
115
- e,
116
- f && /* @__PURE__ */ m(p, { color: "green", className: l.notification })
115
+ children: /* @__PURE__ */ N("span", { className: e.content, children: [
116
+ l,
117
+ f && /* @__PURE__ */ m(C, { color: "green", className: e.notification })
117
118
  ] })
118
119
  }
119
120
  );
@@ -1,2 +1,2 @@
1
1
  export { Tabular } from './Tabular';
2
- export type { TabularProps, TabularItem, TabularRootProps, } from './Tabular';
2
+ export type { TabularProps, TabularItem, TabularRootProps, TabularItemComponentProps, } from './Tabular';
@@ -1,15 +1,19 @@
1
1
  import { default as React } from 'react';
2
+ import { TextareaResizeType } from '../StyledTextarea';
2
3
 
3
4
  export interface TextareaProps {
4
- value: string;
5
- onChange: (value: string) => void;
5
+ value?: string;
6
+ defaultValue?: string;
7
+ onChange?: (value: string) => void;
6
8
  label?: React.ReactNode;
7
9
  placeholder?: string;
8
10
  rows?: number;
9
11
  disabled?: boolean;
10
- resize?: 'none' | 'vertical' | 'horizontal' | 'both';
12
+ resize?: TextareaResizeType;
11
13
  autofocus?: boolean;
12
14
  className?: string;
13
15
  backdropBlur?: boolean;
16
+ name?: string;
17
+ ref?: React.Ref<HTMLTextAreaElement>;
14
18
  }
15
19
  export declare function Textarea(props: TextareaProps): import("react/jsx-runtime").JSX.Element;
@@ -1,55 +1,58 @@
1
- import { jsx as s, jsxs as p } from "react/jsx-runtime";
2
- import l from "react";
3
- import { clsx as T } from "../../utils/clsx.js";
4
- const k = "cfxui__Textarea__root__688b1", v = "cfxui__Textarea__fullWidth__2e853", B = "cfxui__Textarea__disabled__5d783", C = "cfxui__Textarea__error__932cb", N = "cfxui__Textarea__backdropBlur__15cb2", e = {
5
- root: k,
6
- fullWidth: v,
7
- "resize-none": "cfxui__Textarea__resize-none__1130d",
8
- "resize-vertical": "cfxui__Textarea__resize-vertical__f856e",
9
- "resize-horizontal": "cfxui__Textarea__resize-horizontal__b4b8f",
10
- "resize-both": "cfxui__Textarea__resize-both__004b8",
11
- disabled: B,
12
- error: C,
13
- backdropBlur: N
1
+ import { jsx as s, jsxs as C } from "react/jsx-runtime";
2
+ import c from "react";
3
+ import N from "../StyledTextarea/StyledTextarea.js";
4
+ import { clsx as g } from "../../utils/clsx.js";
5
+ const v = "cfxui__Textarea__root__688b1", j = "cfxui__Textarea__textarea__8ab29", F = "cfxui__Textarea__disabled__5d783", I = "cfxui__Textarea__backdropBlur__15cb2", a = {
6
+ root: v,
7
+ textarea: j,
8
+ disabled: F,
9
+ backdropBlur: I
14
10
  };
15
- function F(c) {
11
+ function S(d) {
16
12
  const {
17
- value: i,
18
- onChange: r,
19
- label: a,
20
- placeholder: n,
21
- rows: d,
22
- resize: u = "none",
13
+ value: n,
14
+ defaultValue: _,
15
+ onChange: e,
16
+ label: t,
17
+ placeholder: u,
18
+ rows: i,
19
+ resize: x = "none",
23
20
  disabled: o = !1,
24
- autofocus: x,
21
+ autofocus: b,
25
22
  className: f,
26
- backdropBlur: b = !1
27
- } = c, h = l.useCallback(
28
- (m) => {
29
- r(m.target.value);
23
+ backdropBlur: m = !1,
24
+ name: p,
25
+ ref: h
26
+ } = d, k = c.useCallback(
27
+ (B) => {
28
+ e && e(B.target.value);
30
29
  },
31
- [r]
32
- ), _ = l.useId(), t = /* @__PURE__ */ s(
33
- "textarea",
30
+ [e]
31
+ ), r = c.useId(), l = /* @__PURE__ */ s(
32
+ N,
34
33
  {
35
- autoFocus: x,
36
- id: _,
37
- className: e[`resize-${u}`],
38
- rows: d,
39
- value: i,
34
+ id: r,
35
+ className: a.textarea,
36
+ rows: i,
37
+ value: n,
38
+ defaultValue: _,
40
39
  disabled: o,
41
- onChange: h,
42
- placeholder: n
40
+ onChange: k,
41
+ placeholder: u,
42
+ name: p,
43
+ ref: h,
44
+ resize: x,
45
+ autoFocus: b
43
46
  }
44
- ), z = T(e.root, f, {
45
- [e.disabled]: o,
46
- [e.backdropBlur]: b
47
+ ), T = g(a.root, f, {
48
+ [a.disabled]: o,
49
+ [a.backdropBlur]: m
47
50
  });
48
- return /* @__PURE__ */ s("div", { className: z, children: a ? /* @__PURE__ */ p("label", { htmlFor: _, children: [
49
- a,
50
- t
51
- ] }) : t });
51
+ return /* @__PURE__ */ s("div", { className: T, children: t ? /* @__PURE__ */ C("label", { htmlFor: r, children: [
52
+ t,
53
+ l
54
+ ] }) : l });
52
55
  }
53
56
  export {
54
- F as Textarea
57
+ S as Textarea
55
58
  };
@@ -26,5 +26,6 @@ export interface ToggleGroupProps {
26
26
  multiline?: boolean;
27
27
  fullWidth?: boolean;
28
28
  size?: ToggleGroupSizeType;
29
+ name?: string;
29
30
  }
30
31
  export declare const ToggleGroup: React.NamedExoticComponent<ToggleGroupProps>;
@@ -1,77 +1,87 @@
1
1
  import { jsxs as m, jsx as d } from "react/jsx-runtime";
2
- import g from "react";
3
- import { clsx as f } from "../../utils/clsx.js";
4
- const b = "cfxui__ToggleGroup__unsetAll__6911e", x = "cfxui__ToggleGroup__root__fb460", v = "cfxui__ToggleGroup__disabled__75462", h = "cfxui__ToggleGroup__fullWidth__0c589", G = "cfxui__ToggleGroup__large__ad624", T = "cfxui__ToggleGroup__options__7bc0c", C = "cfxui__ToggleGroup__option__8436c", W = "cfxui__ToggleGroup__active__84da0", k = "cfxui__ToggleGroup__multiline__6b784", o = {
5
- unsetAll: b,
6
- root: x,
2
+ import p from "react";
3
+ import { clsx as g } from "../../utils/clsx.js";
4
+ const x = "cfxui__ToggleGroup__unsetAll__6911e", h = "cfxui__ToggleGroup__root__fb460", v = "cfxui__ToggleGroup__disabled__75462", G = "cfxui__ToggleGroup__fullWidth__0c589", T = "cfxui__ToggleGroup__large__ad624", C = "cfxui__ToggleGroup__options__7bc0c", W = "cfxui__ToggleGroup__option__8436c", k = "cfxui__ToggleGroup__active__84da0", N = "cfxui__ToggleGroup__multiline__6b784", o = {
5
+ unsetAll: x,
6
+ root: h,
7
7
  disabled: v,
8
- fullWidth: h,
9
- large: G,
10
- options: T,
11
- option: C,
12
- active: W,
13
- multiline: k
8
+ fullWidth: G,
9
+ large: T,
10
+ options: C,
11
+ option: W,
12
+ active: k,
13
+ multiline: N
14
14
  };
15
- var N = /* @__PURE__ */ ((t) => (t.normal = "normal", t.large = "large", t))(N || {});
16
- const A = g.memo(function(_) {
15
+ var A = /* @__PURE__ */ ((t) => (t.normal = "normal", t.large = "large", t))(A || {});
16
+ const y = p.memo(function(s) {
17
17
  const {
18
- option: s,
19
- onClick: e,
18
+ option: e,
19
+ onClick: i,
20
20
  active: c = !1,
21
- disabled: i = !1
22
- } = _, {
21
+ disabled: n = !1
22
+ } = s, {
23
23
  value: l,
24
24
  label: a,
25
- icon: n
26
- } = s, u = g.useCallback(() => {
27
- e(l);
28
- }, [e, l]);
25
+ icon: _
26
+ } = e, u = p.useCallback(() => {
27
+ i(l);
28
+ }, [i, l]);
29
29
  return /* @__PURE__ */ m(
30
30
  "button",
31
31
  {
32
32
  type: "button",
33
- className: f(o.unsetAll, o.option, {
33
+ className: g(o.unsetAll, o.option, {
34
34
  [o.active]: c
35
35
  }),
36
- tabIndex: i ? 0 : 1,
36
+ tabIndex: n ? 0 : 1,
37
37
  onClick: u,
38
- disabled: i,
38
+ disabled: n,
39
39
  children: [
40
- n || null,
40
+ _ || null,
41
41
  a
42
42
  ]
43
43
  },
44
44
  l
45
45
  );
46
- }), w = g.memo(function(_) {
46
+ }), I = p.memo(function(s) {
47
47
  const {
48
- value: s,
49
- options: e,
48
+ value: e,
49
+ options: i,
50
50
  onChange: c,
51
- className: i = "",
51
+ className: n = "",
52
52
  disabled: l = !1,
53
53
  multiline: a = !1,
54
- fullWidth: n = !1,
55
- size: u = "normal"
56
- /* normal */
57
- } = _, p = f(o.root, o[u], i, {
54
+ fullWidth: _ = !1,
55
+ size: u = "normal",
56
+ name: f
57
+ } = s, b = g(o.root, o[u], n, {
58
58
  [o.disabled]: l,
59
59
  [o.multiline]: a,
60
- [o.fullWidth]: n
60
+ [o.fullWidth]: _
61
61
  });
62
- return /* @__PURE__ */ d("div", { className: p, children: /* @__PURE__ */ d("div", { className: f(o.options, { [o.fullWidth]: n }), children: e.map((r) => /* @__PURE__ */ d(
63
- A,
64
- {
65
- option: r,
66
- onClick: c,
67
- active: r.value === s,
68
- disabled: l
69
- },
70
- r.value
71
- )) }) });
62
+ return /* @__PURE__ */ m("div", { className: b, children: [
63
+ f && /* @__PURE__ */ d(
64
+ "input",
65
+ {
66
+ type: "hidden",
67
+ name: f,
68
+ value: e
69
+ }
70
+ ),
71
+ /* @__PURE__ */ d("div", { className: g(o.options, { [o.fullWidth]: _ }), children: i.map((r) => /* @__PURE__ */ d(
72
+ y,
73
+ {
74
+ option: r,
75
+ onClick: c,
76
+ active: r.value === e,
77
+ disabled: l
78
+ },
79
+ r.value
80
+ )) })
81
+ ] });
72
82
  });
73
83
  export {
74
- w as ToggleGroup,
75
- A as ToggleGroupOption,
76
- N as ToggleGroupSizeEnum
84
+ I as ToggleGroup,
85
+ y as ToggleGroupOption,
86
+ A as ToggleGroupSizeEnum
77
87
  };
package/dist/main.d.ts CHANGED
@@ -63,6 +63,8 @@ export { InfoPanel } from './components/InfoPanel';
63
63
  export type { InfoPanelProps, InfoPanelSize, InfoPanelType, } from './components/InfoPanel';
64
64
  export { Input, RichInput } from './components/Input';
65
65
  export type { InputSize, InputProps, InputTheme, RichInputProps, } from './components/Input';
66
+ export { StyledInput } from './components/StyledInput';
67
+ export type { StyledInputProps } from './components/StyledInput';
66
68
  export { Interactive } from './components/Interactive';
67
69
  export type { InteractiveProps } from './components/Interactive';
68
70
  export { Island, IslandCorner } from './components/Island';
@@ -118,7 +120,7 @@ export type { SwitchProps } from './components/Switch';
118
120
  export { ToggleGroup } from './components/ToggleGroup';
119
121
  export type { ToggleGroupOption, ToggleGroupProps } from './components/ToggleGroup';
120
122
  export { Tabular } from './components/Tabular';
121
- export type { TabularProps, TabularItem, TabularRootProps, } from './components/Tabular';
123
+ export type { TabularProps, TabularItem, TabularRootProps, TabularItemComponentProps, } from './components/Tabular';
122
124
  export { DataTable, DataTableHeaderItem, DataTableRow, } from './components/DataTable';
123
125
  export type { DataTableHeaderType, DataTableProps, DataTableRowType, DataTableContainerType, DataTableHeaderItemProps, DataTableRowProps, } from './components/DataTable';
124
126
  export { Table, TableIconButton, } from './components/Table';
@@ -131,6 +133,8 @@ export { Label } from './components/Label';
131
133
  export type { LabelProps } from './components/Label';
132
134
  export { Textarea } from './components/Textarea';
133
135
  export type { TextareaProps } from './components/Textarea';
136
+ export { StyledTextarea } from './components/StyledTextarea';
137
+ export type { StyledTextareaProps, TextareaResizeType } from './components/StyledTextarea';
134
138
  export { TITLE_OUTLET_ID, titleGetCssStyle, titleGetCoords, Title, } from './components/Title';
135
139
  export type { TitleProps, TitleFixedOn, TitleChildren, } from './components/Title';
136
140
  export { InputDropzone, DropzoneItemPreview, } from './components/InputDropzone';