@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.
@@ -94,6 +94,7 @@
94
94
  min-width: 44px;
95
95
  width: 44px;
96
96
  transition: all 150ms;
97
+ outline: none;
97
98
 
98
99
  &[data-hidden] {
99
100
  transform: scale(0);
@@ -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
- header?: React.ReactNode;
11
+ attachbar?: React.ReactNode;
11
12
  children?: never;
12
13
  }
13
14
  export declare const WriteBar: {
14
- ({ before, inlineAfter, after, onHeightChange, shadow, containerRef, header, 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;
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 {};
@@ -1,83 +1,100 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import y from "classnames";
3
- import { Spinner as D } from "./bundle.es6.js";
4
- import { Icon as E } from "./bundle.es33.js";
5
- import { useResizeTextarea as F } from "./bundle.es43.js";
6
- import { callMultiple as G, attr as H } from "@companix/utils-browser";
7
- import { mergeRefs as J } from "react-merge-refs";
8
- const K = ({
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: a,
11
+ inlineAfter: o,
12
12
  after: i,
13
13
  onHeightChange: t,
14
- shadow: o = !1,
15
- containerRef: n,
16
- header: m,
14
+ shadow: s = !1,
15
+ containerRef: a,
16
+ attachbar: c,
17
+ contnetClassName: d,
17
18
  // textarea props
18
- textareaRef: c,
19
- autoComplete: d,
20
- cols: l,
21
- dirName: L,
22
- disabled: f,
23
- maxLength: p,
24
- minLength: h,
25
- name: x,
26
- placeholder: b,
27
- readOnly: u,
28
- required: w,
29
- value: N,
30
- wrap: v,
31
- rows: z,
32
- onChange: R,
33
- onFocus: g,
34
- onBlur: j,
35
- id: B,
36
- inputMode: I,
37
- defaultValue: T,
38
- autoFocus: A,
39
- tabIndex: C,
40
- spellCheck: M,
41
- className: S,
42
- ...W
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 [k, q] = F(t, !0);
45
- return /* @__PURE__ */ s("div", { ref: n, ...W, className: y("write-bar", S), children: [
46
- m,
47
- /* @__PURE__ */ s("div", { className: "write-bar-content", children: [
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: J([c, k]),
53
- id: B,
54
- onChange: G(R, q),
55
- autoComplete: d,
56
- cols: l,
57
- disabled: f,
58
- maxLength: p,
59
- minLength: h,
60
- name: x,
61
- placeholder: b,
62
- readOnly: u,
63
- required: w,
64
- value: N,
65
- wrap: v,
66
- rows: z,
67
- onFocus: g,
68
- onBlur: j,
69
- inputMode: I,
70
- defaultValue: T,
71
- autoFocus: A,
72
- tabIndex: C,
73
- spellCheck: M
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
- K.IconButton = ({ icon: r, mode: a, onClick: i, isLoading: t, isHidden: o }) => /* @__PURE__ */ e("button", { onClick: i, className: "write-bar-icon", "data-mode": a, "data-hidden": H(o), children: t ? /* @__PURE__ */ e(D, { size: 18 }) : /* @__PURE__ */ e(E, { icon: r, size: "xxs" }) });
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
- K as WriteBar
99
+ L as WriteBar
83
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companix/uikit",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "main": "./dist/bundle.es.js",
5
5
  "module": "./dist/bundle.es.js",
6
6
  "types": "./dist/index.d.ts",