@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.
- package/dist/assets/all_css.css +2 -0
- package/dist/assets/css/Input.css +1 -1
- package/dist/assets/css/Modal.css +1 -1
- package/dist/assets/css/StyledInput.css +1 -0
- package/dist/assets/css/StyledTextarea.css +1 -0
- package/dist/assets/css/Textarea.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/components/Button/LinkButton.js +30 -24
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +139 -129
- package/dist/components/ClipboardButton/ClipboardButton.js +4 -4
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +53 -44
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +13 -12
- package/dist/components/Flyout/Flyout.js +4 -4
- package/dist/components/Input/Input.d.ts +3 -2
- package/dist/components/Input/Input.js +94 -89
- package/dist/components/Input/Input.types.d.ts +2 -0
- package/dist/components/Input/Input.types.js +1 -0
- package/dist/components/Input/RichInput.d.ts +1 -1
- package/dist/components/Input/index.d.ts +2 -1
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -0
- package/dist/components/InputDropzone/InputDropzone.js +135 -134
- package/dist/components/InputDropzone/InputDropzoneShowcase.js +6 -5
- package/dist/components/Modal/Modal.d.ts +36 -2
- package/dist/components/Modal/Modal.js +129 -63
- package/dist/components/Modal/ModalShowcase.js +24 -16
- package/dist/components/Radio/Radio.d.ts +1 -0
- package/dist/components/Radio/Radio.js +21 -19
- package/dist/components/StyledInput/StyledInput.d.ts +12 -0
- package/dist/components/StyledInput/StyledInput.js +46 -0
- package/dist/components/StyledInput/index.d.ts +2 -0
- package/dist/components/StyledInput/index.js +4 -0
- package/dist/components/StyledTextarea/StyledTextarea.d.ts +10 -0
- package/dist/components/StyledTextarea/StyledTextarea.js +32 -0
- package/dist/components/StyledTextarea/index.d.ts +2 -0
- package/dist/components/StyledTextarea/index.js +4 -0
- package/dist/components/Switch/Switch.js +61 -49
- package/dist/components/Tabular/Tabular.d.ts +12 -0
- package/dist/components/Tabular/Tabular.js +34 -33
- package/dist/components/Tabular/index.d.ts +1 -1
- package/dist/components/Textarea/Textarea.d.ts +7 -3
- package/dist/components/Textarea/Textarea.js +46 -43
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +57 -47
- package/dist/main.d.ts +5 -1
- package/dist/main.js +126 -122
- package/dist/rsc.d.ts +4 -0
- package/dist/rsc.js +12 -8
- package/dist/styles-scss/global.scss +1 -1
- package/dist/styles-scss/tokens.scss +19 -20
- package/package.json +1 -1
|
@@ -1,60 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import B from "react";
|
|
3
3
|
import "../Button/Button.js";
|
|
4
|
-
import { ButtonBar as
|
|
4
|
+
import { ButtonBar as M } from "../Button/ButtonBar.js";
|
|
5
5
|
import "../../utils/links.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import "
|
|
10
|
-
import {
|
|
6
|
+
import g from "../Flex/Flex.js";
|
|
7
|
+
import { clsx as i } from "../../utils/clsx.js";
|
|
8
|
+
import { IconBig as w } from "../IconBig/IconBig.js";
|
|
9
|
+
import O from "../IconButton/IconButton.js";
|
|
10
|
+
import { Overlay as u } from "../Overlay/Overlay.js";
|
|
11
|
+
import { Text as b } from "../Text/Text.js";
|
|
12
|
+
import { ui as C } from "../../utils/ui/ui.js";
|
|
13
|
+
import { ColorEnum as z } from "../../utils/ui/ui.types.js";
|
|
11
14
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
12
|
-
import { useKeyboardClose as
|
|
15
|
+
import { useKeyboardClose as F } from "../../utils/hooks/useKeyboardClose.js";
|
|
13
16
|
import "../../index-Cl_RnsqN.js";
|
|
14
|
-
const
|
|
15
|
-
root:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const H = "cfxui__Modal__root__53283", I = "cfxui__Modal__colored__649d1", L = "cfxui__Modal__close__2df9b", T = "cfxui__Modal__header__bec76", j = "cfxui__Modal__footer__bb2fc", l = {
|
|
18
|
+
root: H,
|
|
19
|
+
colored: I,
|
|
20
|
+
close: L,
|
|
21
|
+
header: T,
|
|
22
|
+
footer: j
|
|
19
23
|
};
|
|
20
|
-
|
|
24
|
+
var A = /* @__PURE__ */ ((o) => (o.default = "default", o.danger = "danger", o.success = "success", o.warning = "warning", o))(A || {});
|
|
25
|
+
const h = {
|
|
26
|
+
default: void 0,
|
|
27
|
+
danger: "red",
|
|
28
|
+
success: "green",
|
|
29
|
+
warning: "yellow"
|
|
30
|
+
};
|
|
31
|
+
function N(o) {
|
|
21
32
|
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
33
|
+
theme: r = "default",
|
|
34
|
+
color: c,
|
|
35
|
+
onClose: e,
|
|
36
|
+
children: t,
|
|
37
|
+
className: s,
|
|
38
|
+
overlayClassName: m,
|
|
39
|
+
backdropClassName: f,
|
|
40
|
+
contentClassName: y,
|
|
41
|
+
ariaDescribedby: v,
|
|
42
|
+
ariaLabelledby: x,
|
|
43
|
+
disableBackdropClose: _ = !1,
|
|
44
|
+
disableFocusLock: k = !1
|
|
45
|
+
} = o, p = B.useCallback(() => {
|
|
46
|
+
_ || !e || e();
|
|
47
|
+
}, [e, _]);
|
|
48
|
+
F(p);
|
|
49
|
+
const n = c || h[r];
|
|
50
|
+
return /* @__PURE__ */ d(u, { className: i(l.overlay, m), children: [
|
|
36
51
|
/* @__PURE__ */ a(
|
|
37
|
-
|
|
52
|
+
u.Backdrop,
|
|
38
53
|
{
|
|
39
|
-
onClick:
|
|
40
|
-
className:
|
|
54
|
+
onClick: p,
|
|
55
|
+
className: i(l.backdrop, f)
|
|
41
56
|
}
|
|
42
57
|
),
|
|
43
58
|
/* @__PURE__ */ a(
|
|
44
|
-
|
|
59
|
+
u.Content,
|
|
45
60
|
{
|
|
46
|
-
className:
|
|
47
|
-
disableFocusLock:
|
|
48
|
-
children: /* @__PURE__ */
|
|
61
|
+
className: y,
|
|
62
|
+
disableFocusLock: k,
|
|
63
|
+
children: /* @__PURE__ */ d(
|
|
49
64
|
"div",
|
|
50
65
|
{
|
|
51
66
|
role: "dialog",
|
|
52
|
-
"aria-describedby":
|
|
53
|
-
"aria-labelledby":
|
|
54
|
-
className:
|
|
67
|
+
"aria-describedby": v,
|
|
68
|
+
"aria-labelledby": x,
|
|
69
|
+
className: i(l.root, s, {
|
|
70
|
+
[l.colored]: !!n
|
|
71
|
+
}),
|
|
72
|
+
style: {
|
|
73
|
+
"--modal-color": n ? C.color(n) : void 0,
|
|
74
|
+
"--modal-color-bg": n ? C.color(n, void 0, 0.2) : void 0
|
|
75
|
+
},
|
|
55
76
|
children: [
|
|
56
|
-
!!
|
|
57
|
-
|
|
77
|
+
!!e && /* @__PURE__ */ a(O, { areaSize: "large", className: l.close, name: "Close", onClick: e }),
|
|
78
|
+
t
|
|
58
79
|
]
|
|
59
80
|
}
|
|
60
81
|
)
|
|
@@ -62,37 +83,82 @@ function _(c) {
|
|
|
62
83
|
)
|
|
63
84
|
] });
|
|
64
85
|
}
|
|
65
|
-
|
|
86
|
+
function D(o) {
|
|
87
|
+
switch (o) {
|
|
88
|
+
case "danger":
|
|
89
|
+
return "Warni";
|
|
90
|
+
case "success":
|
|
91
|
+
return "Confirm";
|
|
92
|
+
default:
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function P(o) {
|
|
66
97
|
const {
|
|
67
|
-
|
|
68
|
-
|
|
98
|
+
theme: r = "default",
|
|
99
|
+
iconName: c,
|
|
100
|
+
iconColor: e
|
|
69
101
|
} = o;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
102
|
+
if (!c && !r)
|
|
103
|
+
return null;
|
|
104
|
+
const t = c || D(r), s = e || h[r] || z.primary;
|
|
105
|
+
return t ? /* @__PURE__ */ a(g, { centered: !0, children: /* @__PURE__ */ a(
|
|
106
|
+
w,
|
|
107
|
+
{
|
|
108
|
+
name: t,
|
|
109
|
+
color: s,
|
|
110
|
+
size: "normal"
|
|
111
|
+
}
|
|
112
|
+
) }) : null;
|
|
113
|
+
}
|
|
114
|
+
N.Header = function(r) {
|
|
115
|
+
const {
|
|
116
|
+
title: c,
|
|
117
|
+
description: e,
|
|
118
|
+
theme: t = "default",
|
|
119
|
+
icon: s,
|
|
120
|
+
iconName: m,
|
|
121
|
+
iconColor: f
|
|
122
|
+
} = r;
|
|
123
|
+
return /* @__PURE__ */ d(g, { vertical: !0, gap: "large", children: [
|
|
124
|
+
s || /* @__PURE__ */ a(
|
|
125
|
+
P,
|
|
73
126
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
127
|
+
theme: t,
|
|
128
|
+
iconName: m,
|
|
129
|
+
iconColor: f
|
|
77
130
|
}
|
|
78
131
|
),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
132
|
+
/* @__PURE__ */ d("div", { className: l.header, children: [
|
|
133
|
+
/* @__PURE__ */ a(
|
|
134
|
+
b,
|
|
135
|
+
{
|
|
136
|
+
weight: "bold",
|
|
137
|
+
size: "large",
|
|
138
|
+
children: c
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
e && /* @__PURE__ */ a(
|
|
142
|
+
b,
|
|
143
|
+
{
|
|
144
|
+
size: "small",
|
|
145
|
+
color: "secondary",
|
|
146
|
+
typographic: !0,
|
|
147
|
+
children: e
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] })
|
|
87
151
|
] });
|
|
88
152
|
};
|
|
89
|
-
|
|
153
|
+
N.Footer = function(r) {
|
|
90
154
|
const {
|
|
91
|
-
className:
|
|
155
|
+
className: c,
|
|
92
156
|
...e
|
|
93
|
-
} =
|
|
94
|
-
return /* @__PURE__ */ a(
|
|
157
|
+
} = r;
|
|
158
|
+
return /* @__PURE__ */ a(M, { ...e, className: i(l.footer, c) });
|
|
95
159
|
};
|
|
96
160
|
export {
|
|
97
|
-
|
|
161
|
+
h as MODAL_THEME_TO_COLOR_MAP,
|
|
162
|
+
N as Modal,
|
|
163
|
+
A as ModalThemeEnum
|
|
98
164
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import r from "react";
|
|
3
3
|
import n from "../Box/Box.js";
|
|
4
4
|
import "../../utils/ui/ui.js";
|
|
5
|
-
import
|
|
5
|
+
import i from "../Button/Button.js";
|
|
6
6
|
import "../../utils/links.js";
|
|
7
|
-
import
|
|
7
|
+
import c from "../Input/Input.js";
|
|
8
8
|
import "../../utils/hooks/useGlobalKeyboardEvent.js";
|
|
9
9
|
import "../../utils/hooks/useKeyboardClose.js";
|
|
10
10
|
import "../../index-Cl_RnsqN.js";
|
|
11
|
-
import { LOREM_IPSUM as
|
|
12
|
-
import { Modal as
|
|
11
|
+
import { LOREM_IPSUM as p } from "../../utils/loremipsum.js";
|
|
12
|
+
import { Modal as l } from "./Modal.js";
|
|
13
13
|
function s() {
|
|
14
|
-
const [
|
|
14
|
+
const [a, d] = r.useState(!1), t = r.useCallback(() => d((m) => !m), []);
|
|
15
15
|
return /* @__PURE__ */ e(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
@@ -22,16 +22,24 @@ function s() {
|
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ o("div", { id: "backdrop" }),
|
|
24
24
|
/* @__PURE__ */ o("div", { id: "overlay-outlet" }),
|
|
25
|
-
/* @__PURE__ */ o(
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */ o(
|
|
28
|
-
|
|
25
|
+
/* @__PURE__ */ o(i, { theme: "primary", onClick: t, text: "Toggle Modal" }),
|
|
26
|
+
a && /* @__PURE__ */ e(l, { onClose: t, children: [
|
|
27
|
+
/* @__PURE__ */ o(
|
|
28
|
+
l.Header,
|
|
29
|
+
{
|
|
30
|
+
iconName: "Subscriptions",
|
|
31
|
+
iconColor: "accent",
|
|
32
|
+
title: "Modal Title",
|
|
33
|
+
description: "Modal Description"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ o(n, { mb: 4, children: /* @__PURE__ */ o(c, { theme: "onlight", placeholder: "Input", fullWidth: !0 }) }),
|
|
29
37
|
"Modal content:",
|
|
30
38
|
" ",
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */ e(
|
|
39
|
+
p,
|
|
40
|
+
/* @__PURE__ */ e(l.Footer, { children: [
|
|
33
41
|
/* @__PURE__ */ o(
|
|
34
|
-
|
|
42
|
+
i,
|
|
35
43
|
{
|
|
36
44
|
fullWidth: !0,
|
|
37
45
|
theme: "secondary",
|
|
@@ -40,7 +48,7 @@ function s() {
|
|
|
40
48
|
}
|
|
41
49
|
),
|
|
42
50
|
/* @__PURE__ */ o(
|
|
43
|
-
|
|
51
|
+
i,
|
|
44
52
|
{
|
|
45
53
|
fullWidth: !0,
|
|
46
54
|
theme: "primary",
|
|
@@ -54,7 +62,7 @@ function s() {
|
|
|
54
62
|
}
|
|
55
63
|
);
|
|
56
64
|
}
|
|
57
|
-
const
|
|
65
|
+
const w = r.memo(s);
|
|
58
66
|
export {
|
|
59
|
-
|
|
67
|
+
w as default
|
|
60
68
|
};
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
|
-
import { clsx as
|
|
4
|
-
const
|
|
5
|
-
root:
|
|
3
|
+
import { clsx as h } from "../../utils/clsx.js";
|
|
4
|
+
const R = "cfxui__Radio__root__05f1c", p = "cfxui__Radio__indicator__2181e", z = "cfxui__Radio__disabled__c411f", e = {
|
|
5
|
+
root: R,
|
|
6
6
|
"size-normal": "cfxui__Radio__size-normal__6dccc",
|
|
7
7
|
"size-large": "cfxui__Radio__size-large__0a074",
|
|
8
|
-
indicator:
|
|
9
|
-
disabled:
|
|
8
|
+
indicator: p,
|
|
9
|
+
disabled: z
|
|
10
10
|
};
|
|
11
11
|
let t = 1;
|
|
12
|
-
function
|
|
12
|
+
function N(d) {
|
|
13
13
|
const {
|
|
14
14
|
checked: i,
|
|
15
15
|
onChange: n,
|
|
16
16
|
label: _,
|
|
17
17
|
size: l = "normal",
|
|
18
18
|
className: r,
|
|
19
|
-
disabled: s = !1
|
|
20
|
-
|
|
19
|
+
disabled: s = !1,
|
|
20
|
+
name: f
|
|
21
|
+
} = d, m = a.useRef(t);
|
|
21
22
|
a.useEffect(() => {
|
|
22
23
|
t += 1;
|
|
23
24
|
}, []);
|
|
24
|
-
const
|
|
25
|
+
const u = () => {
|
|
25
26
|
n(!i);
|
|
26
|
-
}, c = a.useId(),
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
27
|
+
}, c = a.useId(), x = h(e.root, r, e[`size-${l}`], { [e.disabled]: s });
|
|
28
|
+
return /* @__PURE__ */ b("label", { className: x, htmlFor: c, children: [
|
|
29
|
+
/* @__PURE__ */ o(
|
|
29
30
|
"input",
|
|
30
31
|
{
|
|
31
32
|
type: "radio",
|
|
32
|
-
tabIndex:
|
|
33
|
+
tabIndex: m.current,
|
|
33
34
|
checked: i,
|
|
34
35
|
disabled: s,
|
|
35
|
-
onChange:
|
|
36
|
-
id: c
|
|
36
|
+
onChange: u,
|
|
37
|
+
id: c,
|
|
38
|
+
name: f
|
|
37
39
|
}
|
|
38
40
|
),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o("div", { className: e.indicator }),
|
|
42
|
+
/* @__PURE__ */ o("div", { className: e.label, children: _ })
|
|
41
43
|
] });
|
|
42
44
|
}
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
N as Radio
|
|
45
47
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputSize, InputTheme } from '../Input/Input.types';
|
|
3
|
+
import { ResponsiveValueType } from '../../utils/ui';
|
|
4
|
+
|
|
5
|
+
export interface StyledInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: ResponsiveValueType<InputSize>;
|
|
8
|
+
theme?: InputTheme;
|
|
9
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
10
|
+
}
|
|
11
|
+
declare function StyledInput(props: StyledInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default StyledInput;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as m } from "../../utils/clsx.js";
|
|
3
|
+
import { ui as p } from "../../utils/ui/ui.js";
|
|
4
|
+
const s = "cfxui__StyledInput__root__37064", S = "cfxui__StyledInput__small__0f240", r = "cfxui__StyledInput__large__a3ad2", d = "cfxui__StyledInput__onlight__dcd8f", l = {
|
|
5
|
+
root: s,
|
|
6
|
+
small: S,
|
|
7
|
+
large: r,
|
|
8
|
+
onlight: d,
|
|
9
|
+
"inputSizeinitial-large": "cfxui__StyledInput__inputSizeinitial-large__a31e6",
|
|
10
|
+
"inputSizeinitial-small": "cfxui__StyledInput__inputSizeinitial-small__77433",
|
|
11
|
+
"inputSizesmall-large": "cfxui__StyledInput__inputSizesmall-large__eb62a",
|
|
12
|
+
"inputSizesmall-small": "cfxui__StyledInput__inputSizesmall-small__d5e87",
|
|
13
|
+
"inputSizesmall-medium-large": "cfxui__StyledInput__inputSizesmall-medium-large__b13be",
|
|
14
|
+
"inputSizesmall-medium-small": "cfxui__StyledInput__inputSizesmall-medium-small__a9d00",
|
|
15
|
+
"inputSizemedium-large": "cfxui__StyledInput__inputSizemedium-large__75764",
|
|
16
|
+
"inputSizemedium-small": "cfxui__StyledInput__inputSizemedium-small__43151",
|
|
17
|
+
"inputSizemedium-large-large": "cfxui__StyledInput__inputSizemedium-large-large__3f450",
|
|
18
|
+
"inputSizemedium-large-small": "cfxui__StyledInput__inputSizemedium-large-small__eba0f",
|
|
19
|
+
"inputSizelarge-large": "cfxui__StyledInput__inputSizelarge-large__19572",
|
|
20
|
+
"inputSizelarge-small": "cfxui__StyledInput__inputSizelarge-small__3ecc3",
|
|
21
|
+
"inputSizexlarge-large": "cfxui__StyledInput__inputSizexlarge-large__06e9b",
|
|
22
|
+
"inputSizexlarge-small": "cfxui__StyledInput__inputSizexlarge-small__b318f"
|
|
23
|
+
};
|
|
24
|
+
function f(e) {
|
|
25
|
+
const {
|
|
26
|
+
className: i,
|
|
27
|
+
size: _ = "normal",
|
|
28
|
+
theme: t = "default",
|
|
29
|
+
...u
|
|
30
|
+
} = e;
|
|
31
|
+
return /* @__PURE__ */ n(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
className: m(
|
|
35
|
+
i,
|
|
36
|
+
l.root,
|
|
37
|
+
l[t],
|
|
38
|
+
p.getResponsiveFlatClassnames("input-size", _).map((a) => l[a])
|
|
39
|
+
),
|
|
40
|
+
...u
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
f as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TextareaResizeType = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
4
|
+
export interface StyledTextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
|
+
className?: string;
|
|
6
|
+
resize?: TextareaResizeType;
|
|
7
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
8
|
+
}
|
|
9
|
+
declare function StyledTextarea(props: StyledTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default StyledTextarea;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as i } from "../../utils/clsx.js";
|
|
3
|
+
const c = "cfxui__StyledTextarea__root__8c3b9", e = {
|
|
4
|
+
root: c,
|
|
5
|
+
"resize-none": "cfxui__StyledTextarea__resize-none__e5b55",
|
|
6
|
+
"resize-vertical": "cfxui__StyledTextarea__resize-vertical__717ec",
|
|
7
|
+
"resize-horizontal": "cfxui__StyledTextarea__resize-horizontal__4f44b",
|
|
8
|
+
"resize-both": "cfxui__StyledTextarea__resize-both__c451f"
|
|
9
|
+
};
|
|
10
|
+
function n(r) {
|
|
11
|
+
const {
|
|
12
|
+
className: t,
|
|
13
|
+
resize: _ = "none",
|
|
14
|
+
ref: o,
|
|
15
|
+
...a
|
|
16
|
+
} = r;
|
|
17
|
+
return /* @__PURE__ */ s(
|
|
18
|
+
"textarea",
|
|
19
|
+
{
|
|
20
|
+
className: i(
|
|
21
|
+
e.root,
|
|
22
|
+
t,
|
|
23
|
+
e[`resize-${_}`]
|
|
24
|
+
),
|
|
25
|
+
ref: o,
|
|
26
|
+
...a
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
n as default
|
|
32
|
+
};
|