@temp-spotwork/ui 1.4.8 → 1.6.0
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/components/atoms/form/textarea/RichTextarea.stories.d.ts +11 -0
- package/dist/components/atoms/form/textarea/RichTextarea.stories.js +67 -0
- package/dist/components/atoms/form/textarea/Textarea.stories.d.ts +4 -0
- package/dist/components/atoms/form/textarea/Textarea.stories.js +57 -12
- package/dist/components/atoms/form/textarea/index.d.ts +2 -0
- package/dist/components/atoms/form/textarea/index.js +2 -0
- package/dist/components/atoms/form/textarea/rich-textarea.d.ts +53 -0
- package/dist/components/atoms/form/textarea/rich-textarea.js +275 -0
- package/dist/components/atoms/form/textarea/textarea.js +1 -5
- package/dist/components/atoms/icons/iconMap.d.ts +12 -0
- package/dist/components/atoms/icons/iconMap.js +216 -210
- package/dist/components/atoms/icons/icons.stories.js +36 -28
- package/dist/components/atoms/icons/iconsSVGs/Large/CloudLightning.d.ts +4 -0
- package/dist/components/atoms/icons/iconsSVGs/Large/CloudLightning.js +22 -0
- package/dist/components/atoms/icons/iconsSVGs/Large/index.d.ts +2 -1
- package/dist/components/atoms/icons/iconsSVGs/Large/index.js +96 -94
- package/dist/components/atoms/icons/iconsSVGs/Small/CloudLightning.d.ts +4 -0
- package/dist/components/atoms/icons/iconsSVGs/Small/CloudLightning.js +22 -0
- package/dist/components/atoms/icons/iconsSVGs/Small/index.d.ts +2 -1
- package/dist/components/atoms/icons/iconsSVGs/Small/index.js +64 -62
- package/dist/components/atoms/small-large-text/small-large-text.js +3 -2
- package/dist/components/molecules/alert/alert.js +3 -2
- package/dist/components/molecules/dialog/dialog.js +4 -3
- package/dist/components/molecules/drawer/drawer.js +13 -12
- package/dist/components/molecules/snackbar/Snackbar.stories.js +1 -1
- package/dist/components/molecules/snackbar/index.js +1 -1
- package/dist/components/molecules/snackbar/snackbar.js +3 -2
- package/dist/main.d.ts +2 -0
- package/dist/main.js +107 -105
- package/dist/{snackbar-BaF8Ts3S.js → snackbar-CgqDB5xn.js} +5 -4
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { RichTextarea } from './rich-textarea';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof RichTextarea>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const WithInitialFormatting: Story;
|
|
9
|
+
export declare const ErrorState: Story;
|
|
10
|
+
export declare const WarningState: Story;
|
|
11
|
+
export declare const DisabledState: Story;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import n, { useState as l } from "react";
|
|
2
|
+
import { RichTextarea as a } from "./rich-textarea.js";
|
|
3
|
+
const c = {
|
|
4
|
+
title: "@spotwork-ui/RichTextarea",
|
|
5
|
+
component: a,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "centered"
|
|
8
|
+
},
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
args: {
|
|
11
|
+
value: "",
|
|
12
|
+
label: "Description",
|
|
13
|
+
placeholder: "Add content description",
|
|
14
|
+
helperText: "Use the toolbar to format text",
|
|
15
|
+
rows: 6,
|
|
16
|
+
onChange: () => {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, e = {
|
|
20
|
+
render: (t) => {
|
|
21
|
+
const [o, i] = l(t.value ?? "");
|
|
22
|
+
return n.createElement(
|
|
23
|
+
"div",
|
|
24
|
+
{ style: { width: 520 } },
|
|
25
|
+
n.createElement(a, {
|
|
26
|
+
...t,
|
|
27
|
+
value: o,
|
|
28
|
+
onChange: (r) => {
|
|
29
|
+
i(r), t.onChange(r);
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}, p = {
|
|
35
|
+
args: {
|
|
36
|
+
value: "<p><strong>Highlights</strong></p><ul><li>Rich text content</li><li><em>Italic details</em></li></ul>",
|
|
37
|
+
helperText: "Initial HTML content is supported."
|
|
38
|
+
},
|
|
39
|
+
render: e.render
|
|
40
|
+
}, u = {
|
|
41
|
+
args: {
|
|
42
|
+
error: !0,
|
|
43
|
+
helperText: "Description is required"
|
|
44
|
+
},
|
|
45
|
+
render: e.render
|
|
46
|
+
}, h = {
|
|
47
|
+
args: {
|
|
48
|
+
warning: !0,
|
|
49
|
+
helperText: "Description is getting too long"
|
|
50
|
+
},
|
|
51
|
+
render: e.render
|
|
52
|
+
}, g = {
|
|
53
|
+
args: {
|
|
54
|
+
disabled: !0,
|
|
55
|
+
value: "<p>This content is read-only</p>",
|
|
56
|
+
helperText: "Disabled inputs cannot be edited"
|
|
57
|
+
},
|
|
58
|
+
render: e.render
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
g as DisabledState,
|
|
62
|
+
u as ErrorState,
|
|
63
|
+
e as Primary,
|
|
64
|
+
h as WarningState,
|
|
65
|
+
p as WithInitialFormatting,
|
|
66
|
+
c as default
|
|
67
|
+
};
|
|
@@ -5,3 +5,7 @@ declare const meta: Meta<typeof Textarea>;
|
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof meta>;
|
|
7
7
|
export declare const Primary: Story;
|
|
8
|
+
export declare const WithInitialFormatting: Story;
|
|
9
|
+
export declare const ErrorState: Story;
|
|
10
|
+
export declare const WarningState: Story;
|
|
11
|
+
export declare const DisabledState: Story;
|
|
@@ -1,22 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Textarea as
|
|
3
|
-
const
|
|
1
|
+
import a, { useState as s } from "react";
|
|
2
|
+
import { Textarea as n } from "./textarea.js";
|
|
3
|
+
const c = {
|
|
4
4
|
title: "@spotwork-ui/Textarea",
|
|
5
|
-
component:
|
|
5
|
+
component: n,
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: "centered"
|
|
8
8
|
},
|
|
9
9
|
tags: ["autodocs"],
|
|
10
|
-
argTypes: {
|
|
11
|
-
backgroundColor: { control: "color" }
|
|
12
|
-
},
|
|
13
|
-
args: { onClick: o() }
|
|
14
|
-
}, s = {
|
|
15
10
|
args: {
|
|
16
|
-
|
|
11
|
+
value: "",
|
|
12
|
+
label: "Description",
|
|
13
|
+
placeholder: "Add content description",
|
|
14
|
+
helperText: "Add helpful details",
|
|
15
|
+
rows: 6,
|
|
16
|
+
onChange: () => {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, e = {
|
|
20
|
+
render: (t) => {
|
|
21
|
+
const [o, i] = s(t.value ?? "");
|
|
22
|
+
return a.createElement(
|
|
23
|
+
"div",
|
|
24
|
+
{ style: { width: 520 } },
|
|
25
|
+
a.createElement(n, {
|
|
26
|
+
...t,
|
|
27
|
+
value: o,
|
|
28
|
+
onChange: (r) => {
|
|
29
|
+
i(r), t.onChange(r);
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
);
|
|
17
33
|
}
|
|
34
|
+
}, p = {
|
|
35
|
+
args: {
|
|
36
|
+
value: "This starts with pre-filled content.",
|
|
37
|
+
helperText: "Textarea accepts plain text values."
|
|
38
|
+
},
|
|
39
|
+
render: e.render
|
|
40
|
+
}, u = {
|
|
41
|
+
args: {
|
|
42
|
+
error: !0,
|
|
43
|
+
helperText: "Description is required"
|
|
44
|
+
},
|
|
45
|
+
render: e.render
|
|
46
|
+
}, h = {
|
|
47
|
+
args: {
|
|
48
|
+
warning: !0,
|
|
49
|
+
helperText: "Description is getting too long"
|
|
50
|
+
},
|
|
51
|
+
render: e.render
|
|
52
|
+
}, g = {
|
|
53
|
+
args: {
|
|
54
|
+
disabled: !0,
|
|
55
|
+
value: "<p>This content is read-only</p>",
|
|
56
|
+
helperText: "Disabled inputs cannot be edited"
|
|
57
|
+
},
|
|
58
|
+
render: e.render
|
|
18
59
|
};
|
|
19
60
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
61
|
+
g as DisabledState,
|
|
62
|
+
u as ErrorState,
|
|
63
|
+
e as Primary,
|
|
64
|
+
h as WarningState,
|
|
65
|
+
p as WithInitialFormatting,
|
|
66
|
+
c as default
|
|
22
67
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type RichTextareaProps = {
|
|
4
|
+
/**
|
|
5
|
+
* HTML value for rich text content
|
|
6
|
+
*/
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* placeholder
|
|
10
|
+
*/
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/**
|
|
13
|
+
* inital amount of rows wants for the textarea
|
|
14
|
+
*/
|
|
15
|
+
rows?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The inital amount of columns wanted for the textarea
|
|
18
|
+
*/
|
|
19
|
+
cols?: number;
|
|
20
|
+
/**
|
|
21
|
+
* the hint text that is at the bottom of the component
|
|
22
|
+
*/
|
|
23
|
+
helperText?: string;
|
|
24
|
+
/**
|
|
25
|
+
* variable to determine error state
|
|
26
|
+
*/
|
|
27
|
+
error?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* variable to determine warning state
|
|
30
|
+
*/
|
|
31
|
+
warning?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* variable to determine disabled state
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Returns editor content as HTML string
|
|
38
|
+
*/
|
|
39
|
+
onChange: (value: string) => void;
|
|
40
|
+
/**
|
|
41
|
+
* The label that is placed at the top of the component
|
|
42
|
+
*/
|
|
43
|
+
label?: string;
|
|
44
|
+
/**
|
|
45
|
+
* pass onBlur func
|
|
46
|
+
*/
|
|
47
|
+
onBlur?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* optional?: autoFocus
|
|
50
|
+
*/
|
|
51
|
+
autoFocus?: boolean;
|
|
52
|
+
};
|
|
53
|
+
export declare const RichTextarea: React.ForwardRefExoticComponent<RichTextareaProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import R, { useState as L, useRef as A, useImperativeHandle as _, useEffect as w, useCallback as k } from "react";
|
|
3
|
+
import { Icons as q } from "../../icons/icons.js";
|
|
4
|
+
import "../../icons/iconsSVGs/Large/Profile.js";
|
|
5
|
+
import "../../icons/iconsSVGs/Small/Profile.js";
|
|
6
|
+
import { styles as O } from "./styles.js";
|
|
7
|
+
import { c as p } from "../../../../index-fN7hCOo3.js";
|
|
8
|
+
import { Typography as T } from "../../../styles/typography/typography.js";
|
|
9
|
+
import { styleMap as E } from "../../../styles/typography/style.js";
|
|
10
|
+
import { getLabelColor as D, getBorderClasses as j, getHelperTextColor as W } from "../utils-for-forms/state-functions.js";
|
|
11
|
+
const d = ({
|
|
12
|
+
onClick: l,
|
|
13
|
+
active: c,
|
|
14
|
+
title: x,
|
|
15
|
+
children: u
|
|
16
|
+
}) => /* @__PURE__ */ e(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
type: "button",
|
|
20
|
+
title: x,
|
|
21
|
+
onMouseDown: (n) => {
|
|
22
|
+
n.preventDefault(), l();
|
|
23
|
+
},
|
|
24
|
+
style: {
|
|
25
|
+
width: 28,
|
|
26
|
+
height: 28,
|
|
27
|
+
border: "none",
|
|
28
|
+
borderRadius: 5,
|
|
29
|
+
cursor: "pointer",
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
fontSize: 13,
|
|
34
|
+
fontFamily: "inherit",
|
|
35
|
+
background: c ? "#EEEDFE" : "transparent",
|
|
36
|
+
color: c ? "#534AB7" : "var(--color-text-secondary, #888)",
|
|
37
|
+
padding: 0,
|
|
38
|
+
flexShrink: 0
|
|
39
|
+
},
|
|
40
|
+
children: u
|
|
41
|
+
}
|
|
42
|
+
), K = () => /* @__PURE__ */ e("b", { style: { fontWeight: 700, fontSize: 13 }, children: "B" }), G = () => /* @__PURE__ */ e("i", { style: { fontStyle: "italic", fontSize: 13 }, children: "I" }), J = () => /* @__PURE__ */ e("u", { style: { textDecoration: "underline", fontSize: 13 }, children: "U" }), P = () => /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: [
|
|
43
|
+
/* @__PURE__ */ e("circle", { cx: "2", cy: "4", r: "1.5", fill: "currentColor" }),
|
|
44
|
+
/* @__PURE__ */ e("rect", { x: "5", y: "3", width: "8", height: "2", rx: "1", fill: "currentColor" }),
|
|
45
|
+
/* @__PURE__ */ e("circle", { cx: "2", cy: "9", r: "1.5", fill: "currentColor" }),
|
|
46
|
+
/* @__PURE__ */ e("rect", { x: "5", y: "8", width: "8", height: "2", rx: "1", fill: "currentColor" })
|
|
47
|
+
] }), Q = () => /* @__PURE__ */ i("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: [
|
|
48
|
+
/* @__PURE__ */ e("text", { x: "0", y: "6", fontSize: "6", fill: "currentColor", children: "1." }),
|
|
49
|
+
/* @__PURE__ */ e("rect", { x: "5", y: "3", width: "8", height: "2", rx: "1", fill: "currentColor" }),
|
|
50
|
+
/* @__PURE__ */ e("text", { x: "0", y: "11", fontSize: "6", fill: "currentColor", children: "2." }),
|
|
51
|
+
/* @__PURE__ */ e("rect", { x: "5", y: "8", width: "8", height: "2", rx: "1", fill: "currentColor" })
|
|
52
|
+
] }), oe = R.forwardRef(
|
|
53
|
+
({
|
|
54
|
+
value: l,
|
|
55
|
+
placeholder: c,
|
|
56
|
+
rows: x = 6,
|
|
57
|
+
helperText: u,
|
|
58
|
+
error: n = !1,
|
|
59
|
+
warning: f = !1,
|
|
60
|
+
disabled: t = !1,
|
|
61
|
+
label: H,
|
|
62
|
+
onChange: y,
|
|
63
|
+
onBlur: v,
|
|
64
|
+
autoFocus: g = !1
|
|
65
|
+
}, U) => {
|
|
66
|
+
const [C, b] = L(!1), [s, B] = L({
|
|
67
|
+
bold: !1,
|
|
68
|
+
italic: !1,
|
|
69
|
+
underline: !1,
|
|
70
|
+
insertUnorderedList: !1,
|
|
71
|
+
insertOrderedList: !1
|
|
72
|
+
}), o = A(null);
|
|
73
|
+
_(U, () => o.current, []);
|
|
74
|
+
const m = O(t), N = D(C, f, n, t), S = W(f, n, t), z = j(C, f, n, t);
|
|
75
|
+
w(() => {
|
|
76
|
+
const r = o.current;
|
|
77
|
+
r && r.innerHTML !== l && (r.innerHTML = l);
|
|
78
|
+
}, [l]), w(() => {
|
|
79
|
+
var r;
|
|
80
|
+
g && ((r = o.current) == null || r.focus());
|
|
81
|
+
}, [g]);
|
|
82
|
+
const h = k(() => {
|
|
83
|
+
B({
|
|
84
|
+
bold: document.queryCommandState("bold"),
|
|
85
|
+
italic: document.queryCommandState("italic"),
|
|
86
|
+
underline: document.queryCommandState("underline"),
|
|
87
|
+
insertUnorderedList: document.queryCommandState("insertUnorderedList"),
|
|
88
|
+
insertOrderedList: document.queryCommandState("insertOrderedList")
|
|
89
|
+
});
|
|
90
|
+
}, []), a = k(
|
|
91
|
+
(r) => {
|
|
92
|
+
var I;
|
|
93
|
+
t || ((I = o.current) == null || I.focus(), document.execCommand(r, !1, void 0), h(), o.current && y(o.current.innerHTML));
|
|
94
|
+
},
|
|
95
|
+
[t, y, h]
|
|
96
|
+
), F = x * 24, M = l.replace(/<br\s*\/?>/gi, "").trim().length === 0;
|
|
97
|
+
return /* @__PURE__ */ i("div", { className: m.container, children: [
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
T,
|
|
100
|
+
{
|
|
101
|
+
swStyle: 3,
|
|
102
|
+
"data-testid": "labelTextarea",
|
|
103
|
+
color: N,
|
|
104
|
+
children: H
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ i("div", { className: p(m.subContainer), children: [
|
|
108
|
+
/* @__PURE__ */ i(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: p(z, "w-full self-stretch"),
|
|
112
|
+
style: { borderRadius: "var(--border-radius-md, 6px)", overflow: "hidden" },
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ i(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
style: {
|
|
118
|
+
display: "flex",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
gap: 2,
|
|
121
|
+
padding: "6px 8px",
|
|
122
|
+
borderBottom: "1px solid var(--color-border-tertiary, #d9d9d9)",
|
|
123
|
+
background: "var(--color-background-secondary)",
|
|
124
|
+
opacity: t ? 0.4 : 1,
|
|
125
|
+
pointerEvents: t ? "none" : "auto"
|
|
126
|
+
},
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
d,
|
|
130
|
+
{
|
|
131
|
+
title: "Bold",
|
|
132
|
+
active: s.bold,
|
|
133
|
+
onClick: () => a("bold"),
|
|
134
|
+
children: /* @__PURE__ */ e(K, {})
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ e(
|
|
138
|
+
d,
|
|
139
|
+
{
|
|
140
|
+
title: "Italic",
|
|
141
|
+
active: s.italic,
|
|
142
|
+
onClick: () => a("italic"),
|
|
143
|
+
children: /* @__PURE__ */ e(G, {})
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ e(
|
|
147
|
+
d,
|
|
148
|
+
{
|
|
149
|
+
title: "Underline",
|
|
150
|
+
active: s.underline,
|
|
151
|
+
onClick: () => a("underline"),
|
|
152
|
+
children: /* @__PURE__ */ e(J, {})
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ e(
|
|
156
|
+
"div",
|
|
157
|
+
{
|
|
158
|
+
style: {
|
|
159
|
+
width: 1,
|
|
160
|
+
height: 18,
|
|
161
|
+
background: "var(--color-border-tertiary)",
|
|
162
|
+
margin: "0 4px",
|
|
163
|
+
flexShrink: 0
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ e(
|
|
168
|
+
d,
|
|
169
|
+
{
|
|
170
|
+
title: "Bullet list",
|
|
171
|
+
active: s.insertUnorderedList,
|
|
172
|
+
onClick: () => a("insertUnorderedList"),
|
|
173
|
+
children: /* @__PURE__ */ e(P, {})
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
d,
|
|
178
|
+
{
|
|
179
|
+
title: "Numbered list",
|
|
180
|
+
active: s.insertOrderedList,
|
|
181
|
+
onClick: () => a("insertOrderedList"),
|
|
182
|
+
children: /* @__PURE__ */ e(Q, {})
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ i(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
style: {
|
|
192
|
+
position: "relative"
|
|
193
|
+
},
|
|
194
|
+
children: [
|
|
195
|
+
M && c && /* @__PURE__ */ e(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
"aria-hidden": "true",
|
|
199
|
+
className: p(E[5]),
|
|
200
|
+
style: {
|
|
201
|
+
position: "absolute",
|
|
202
|
+
inset: "10px 12px auto 12px",
|
|
203
|
+
color: "var(--color-text-tertiary)",
|
|
204
|
+
pointerEvents: "none",
|
|
205
|
+
lineHeight: 1.6
|
|
206
|
+
},
|
|
207
|
+
children: c
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ e(
|
|
211
|
+
"div",
|
|
212
|
+
{
|
|
213
|
+
ref: o,
|
|
214
|
+
contentEditable: !t,
|
|
215
|
+
"data-testid": "textarea",
|
|
216
|
+
suppressContentEditableWarning: !0,
|
|
217
|
+
className: p(
|
|
218
|
+
m.textarea,
|
|
219
|
+
E[5],
|
|
220
|
+
"[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-6 [&_ol]:pl-6"
|
|
221
|
+
),
|
|
222
|
+
style: {
|
|
223
|
+
minHeight: F,
|
|
224
|
+
padding: "10px 12px",
|
|
225
|
+
outline: "none",
|
|
226
|
+
border: "none",
|
|
227
|
+
boxSizing: "border-box",
|
|
228
|
+
lineHeight: 1.6,
|
|
229
|
+
cursor: t ? "not-allowed" : "text",
|
|
230
|
+
opacity: t ? 0.5 : 1
|
|
231
|
+
},
|
|
232
|
+
onFocus: () => b(!0),
|
|
233
|
+
onBlur: () => {
|
|
234
|
+
b(!1), v == null || v();
|
|
235
|
+
},
|
|
236
|
+
onInput: (r) => {
|
|
237
|
+
t || y(r.target.innerHTML);
|
|
238
|
+
},
|
|
239
|
+
onKeyUp: h,
|
|
240
|
+
onMouseUp: h
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
u && /* @__PURE__ */ i("div", { className: m.helperContainer, children: [
|
|
250
|
+
(n || f) && /* @__PURE__ */ e(
|
|
251
|
+
q,
|
|
252
|
+
{
|
|
253
|
+
disabled: !0,
|
|
254
|
+
icon: n ? "AlertSmall" : "WarningSmall",
|
|
255
|
+
color: S,
|
|
256
|
+
id: "IconHintTextarea"
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ e(
|
|
260
|
+
T,
|
|
261
|
+
{
|
|
262
|
+
"data-testid": "hintTextarea",
|
|
263
|
+
color: S,
|
|
264
|
+
children: u,
|
|
265
|
+
swStyle: 1
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] })
|
|
269
|
+
] })
|
|
270
|
+
] });
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
export {
|
|
274
|
+
oe as RichTextarea
|
|
275
|
+
};
|
|
@@ -58,6 +58,12 @@ export declare const svgs: {
|
|
|
58
58
|
Clock: ({ fill }: {
|
|
59
59
|
fill: any;
|
|
60
60
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
CloudLightning: ({ fill }: {
|
|
62
|
+
fill: any;
|
|
63
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
cloudLightning: ({ fill }: {
|
|
65
|
+
fill: any;
|
|
66
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
67
|
CollapseSmall: ({ fill }: {
|
|
62
68
|
fill: any;
|
|
63
69
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -234,6 +240,12 @@ export declare const svgs: {
|
|
|
234
240
|
CrossSmall: ({ fill }: {
|
|
235
241
|
fill: any;
|
|
236
242
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
243
|
+
CloudLightningSmall: ({ fill }: {
|
|
244
|
+
fill: any;
|
|
245
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
246
|
+
cloudLightningSmall: ({ fill }: {
|
|
247
|
+
fill: any;
|
|
248
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
237
249
|
CopyLarge: ({ fill }: {
|
|
238
250
|
fill: any;
|
|
239
251
|
}) => import("react/jsx-runtime").JSX.Element;
|