@companix/uikit 0.0.87 → 0.0.89
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/WriteBar/WireBar.scss +1 -0
- package/dist/WriteBar/index.d.ts +5 -3
- package/dist/bundle.es38.js +82 -65
- package/package.json +1 -1
package/dist/WriteBar/index.d.ts
CHANGED
|
@@ -6,13 +6,14 @@ export interface WriteBarProps extends Pick<React.TextareaHTMLAttributes<HTMLTex
|
|
|
6
6
|
inlineAfter?: React.ReactNode;
|
|
7
7
|
after?: React.ReactNode;
|
|
8
8
|
onHeightChange?: VoidFunction;
|
|
9
|
+
contnetClassName?: string;
|
|
9
10
|
shadow?: boolean;
|
|
10
|
-
|
|
11
|
+
attachbar?: React.ReactNode;
|
|
11
12
|
children?: never;
|
|
12
13
|
}
|
|
13
14
|
export declare const WriteBar: {
|
|
14
|
-
({ before, inlineAfter, after, onHeightChange, shadow, containerRef,
|
|
15
|
-
IconButton({ icon, mode, onClick, isLoading, isHidden }: WriteBarIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
({ before, inlineAfter, after, onHeightChange, shadow, containerRef, attachbar, contnetClassName, textareaRef, autoComplete, cols, dirName, disabled, maxLength, minLength, name, placeholder, readOnly, required, value, wrap, rows, onChange, onFocus, onBlur, id, inputMode, defaultValue, autoFocus, tabIndex, spellCheck, className, ...restProps }: WriteBarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
IconButton({ Component, icon, mode, onClick, isLoading, isHidden }: WriteBarIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
};
|
|
17
18
|
interface WriteBarIconProps {
|
|
18
19
|
icon: IconDefinition;
|
|
@@ -20,5 +21,6 @@ interface WriteBarIconProps {
|
|
|
20
21
|
mode: 'send' | 'attach';
|
|
21
22
|
isLoading?: boolean;
|
|
22
23
|
isHidden?: boolean;
|
|
24
|
+
Component?: React.ElementType;
|
|
23
25
|
}
|
|
24
26
|
export {};
|
package/dist/bundle.es38.js
CHANGED
|
@@ -1,83 +1,100 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Spinner as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { useResizeTextarea as
|
|
6
|
-
import { callMultiple as
|
|
7
|
-
import { mergeRefs as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { Spinner as E } from "./bundle.es6.js";
|
|
4
|
+
import { Icon as F } from "./bundle.es33.js";
|
|
5
|
+
import { useResizeTextarea as G } from "./bundle.es43.js";
|
|
6
|
+
import { callMultiple as H, attr as J } from "@companix/utils-browser";
|
|
7
|
+
import { mergeRefs as K } from "react-merge-refs";
|
|
8
|
+
const L = ({
|
|
9
9
|
// WriteBarProps
|
|
10
10
|
before: r,
|
|
11
|
-
inlineAfter:
|
|
11
|
+
inlineAfter: o,
|
|
12
12
|
after: i,
|
|
13
13
|
onHeightChange: t,
|
|
14
|
-
shadow:
|
|
15
|
-
containerRef:
|
|
16
|
-
|
|
14
|
+
shadow: s = !1,
|
|
15
|
+
containerRef: a,
|
|
16
|
+
attachbar: c,
|
|
17
|
+
contnetClassName: d,
|
|
17
18
|
// textarea props
|
|
18
|
-
textareaRef:
|
|
19
|
-
autoComplete:
|
|
20
|
-
cols:
|
|
21
|
-
dirName:
|
|
22
|
-
disabled:
|
|
23
|
-
maxLength:
|
|
24
|
-
minLength:
|
|
25
|
-
name:
|
|
26
|
-
placeholder:
|
|
27
|
-
readOnly:
|
|
28
|
-
required:
|
|
29
|
-
value:
|
|
30
|
-
wrap:
|
|
31
|
-
rows:
|
|
32
|
-
onChange:
|
|
33
|
-
onFocus:
|
|
34
|
-
onBlur:
|
|
35
|
-
id:
|
|
36
|
-
inputMode:
|
|
37
|
-
defaultValue:
|
|
38
|
-
autoFocus:
|
|
39
|
-
tabIndex:
|
|
40
|
-
spellCheck:
|
|
41
|
-
className:
|
|
42
|
-
...
|
|
19
|
+
textareaRef: l,
|
|
20
|
+
autoComplete: f,
|
|
21
|
+
cols: p,
|
|
22
|
+
dirName: O,
|
|
23
|
+
disabled: h,
|
|
24
|
+
maxLength: x,
|
|
25
|
+
minLength: b,
|
|
26
|
+
name: u,
|
|
27
|
+
placeholder: w,
|
|
28
|
+
readOnly: N,
|
|
29
|
+
required: v,
|
|
30
|
+
value: z,
|
|
31
|
+
wrap: R,
|
|
32
|
+
rows: g,
|
|
33
|
+
onChange: j,
|
|
34
|
+
onFocus: B,
|
|
35
|
+
onBlur: I,
|
|
36
|
+
id: T,
|
|
37
|
+
inputMode: A,
|
|
38
|
+
defaultValue: C,
|
|
39
|
+
autoFocus: M,
|
|
40
|
+
tabIndex: S,
|
|
41
|
+
spellCheck: W,
|
|
42
|
+
className: k,
|
|
43
|
+
...q
|
|
43
44
|
}) => {
|
|
44
|
-
const [
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
45
|
+
const [y, D] = G(t, !0);
|
|
46
|
+
return /* @__PURE__ */ n("div", { ref: a, ...q, className: m("write-bar", k), children: [
|
|
47
|
+
c,
|
|
48
|
+
/* @__PURE__ */ n("div", { className: m("write-bar-content", d), children: [
|
|
48
49
|
r && /* @__PURE__ */ e("div", { className: "write-bar-before", children: r }),
|
|
49
50
|
/* @__PURE__ */ e("div", { className: "write-bar-form", children: /* @__PURE__ */ e(
|
|
50
51
|
"textarea",
|
|
51
52
|
{
|
|
52
|
-
ref:
|
|
53
|
-
id:
|
|
54
|
-
onChange:
|
|
55
|
-
autoComplete:
|
|
56
|
-
cols:
|
|
57
|
-
disabled:
|
|
58
|
-
maxLength:
|
|
59
|
-
minLength:
|
|
60
|
-
name:
|
|
61
|
-
placeholder:
|
|
62
|
-
readOnly:
|
|
63
|
-
required:
|
|
64
|
-
value:
|
|
65
|
-
wrap:
|
|
66
|
-
rows:
|
|
67
|
-
onFocus:
|
|
68
|
-
onBlur:
|
|
69
|
-
inputMode:
|
|
70
|
-
defaultValue:
|
|
71
|
-
autoFocus:
|
|
72
|
-
tabIndex:
|
|
73
|
-
spellCheck:
|
|
53
|
+
ref: K([l, y]),
|
|
54
|
+
id: T,
|
|
55
|
+
onChange: H(j, D),
|
|
56
|
+
autoComplete: f,
|
|
57
|
+
cols: p,
|
|
58
|
+
disabled: h,
|
|
59
|
+
maxLength: x,
|
|
60
|
+
minLength: b,
|
|
61
|
+
name: u,
|
|
62
|
+
placeholder: w,
|
|
63
|
+
readOnly: N,
|
|
64
|
+
required: v,
|
|
65
|
+
value: z,
|
|
66
|
+
wrap: R,
|
|
67
|
+
rows: g,
|
|
68
|
+
onFocus: B,
|
|
69
|
+
onBlur: I,
|
|
70
|
+
inputMode: A,
|
|
71
|
+
defaultValue: C,
|
|
72
|
+
autoFocus: M,
|
|
73
|
+
tabIndex: S,
|
|
74
|
+
spellCheck: W
|
|
74
75
|
}
|
|
75
76
|
) }),
|
|
76
77
|
i && /* @__PURE__ */ e("div", { className: "write-bar-after", children: i })
|
|
77
78
|
] })
|
|
78
79
|
] });
|
|
79
80
|
};
|
|
80
|
-
|
|
81
|
+
L.IconButton = ({
|
|
82
|
+
Component: r = "button",
|
|
83
|
+
icon: o,
|
|
84
|
+
mode: i,
|
|
85
|
+
onClick: t,
|
|
86
|
+
isLoading: s,
|
|
87
|
+
isHidden: a
|
|
88
|
+
}) => /* @__PURE__ */ e(
|
|
89
|
+
r,
|
|
90
|
+
{
|
|
91
|
+
onClick: t,
|
|
92
|
+
className: "write-bar-icon",
|
|
93
|
+
"data-mode": i,
|
|
94
|
+
"data-hidden": J(a),
|
|
95
|
+
children: s ? /* @__PURE__ */ e(E, { size: 18 }) : /* @__PURE__ */ e(F, { icon: o, size: "xxs" })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
81
98
|
export {
|
|
82
|
-
|
|
99
|
+
L as WriteBar
|
|
83
100
|
};
|