@companix/uikit 0.0.86 → 0.0.87

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.
@@ -11,7 +11,7 @@ export interface WriteBarProps extends Pick<React.TextareaHTMLAttributes<HTMLTex
11
11
  children?: never;
12
12
  }
13
13
  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, ...restProps }: WriteBarProps): import("react/jsx-runtime").JSX.Element;
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
15
  IconButton({ icon, mode, onClick, isLoading, isHidden }: WriteBarIconProps): import("react/jsx-runtime").JSX.Element;
16
16
  };
17
17
  interface WriteBarIconProps {
@@ -1,26 +1,27 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { Spinner as q } from "./bundle.es6.js";
3
- import { Icon as y } from "./bundle.es33.js";
4
- import { useResizeTextarea as D } from "./bundle.es43.js";
5
- import { callMultiple as E, attr as F } from "@companix/utils-browser";
6
- import { mergeRefs as G } from "react-merge-refs";
7
- const H = ({
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 = ({
8
9
  // WriteBarProps
9
10
  before: r,
10
- inlineAfter: t,
11
+ inlineAfter: a,
11
12
  after: i,
12
- onHeightChange: a,
13
- shadow: s = !1,
13
+ onHeightChange: t,
14
+ shadow: o = !1,
14
15
  containerRef: n,
15
16
  header: m,
16
17
  // textarea props
17
18
  textareaRef: c,
18
19
  autoComplete: d,
19
20
  cols: l,
20
- dirName: J,
21
+ dirName: L,
21
22
  disabled: f,
22
- maxLength: h,
23
- minLength: p,
23
+ maxLength: p,
24
+ minLength: h,
24
25
  name: x,
25
26
  placeholder: b,
26
27
  readOnly: u,
@@ -37,24 +38,25 @@ const H = ({
37
38
  autoFocus: A,
38
39
  tabIndex: C,
39
40
  spellCheck: M,
40
- ...S
41
+ className: S,
42
+ ...W
41
43
  }) => {
42
- const [W, k] = D(a, !0);
43
- return /* @__PURE__ */ o("div", { ref: n, ...S, className: "write-bar", children: [
44
+ const [k, q] = F(t, !0);
45
+ return /* @__PURE__ */ s("div", { ref: n, ...W, className: y("write-bar", S), children: [
44
46
  m,
45
- /* @__PURE__ */ o("div", { className: "write-bar-content", children: [
47
+ /* @__PURE__ */ s("div", { className: "write-bar-content", children: [
46
48
  r && /* @__PURE__ */ e("div", { className: "write-bar-before", children: r }),
47
49
  /* @__PURE__ */ e("div", { className: "write-bar-form", children: /* @__PURE__ */ e(
48
50
  "textarea",
49
51
  {
50
- ref: G([c, W]),
52
+ ref: J([c, k]),
51
53
  id: B,
52
- onChange: E(R, k),
54
+ onChange: G(R, q),
53
55
  autoComplete: d,
54
56
  cols: l,
55
57
  disabled: f,
56
- maxLength: h,
57
- minLength: p,
58
+ maxLength: p,
59
+ minLength: h,
58
60
  name: x,
59
61
  placeholder: b,
60
62
  readOnly: u,
@@ -75,7 +77,7 @@ const H = ({
75
77
  ] })
76
78
  ] });
77
79
  };
78
- H.IconButton = ({ icon: r, mode: t, onClick: i, isLoading: a, isHidden: s }) => /* @__PURE__ */ e("button", { onClick: i, className: "write-bar-icon", "data-mode": t, "data-hidden": F(s), children: a ? /* @__PURE__ */ e(q, { size: 18 }) : /* @__PURE__ */ e(y, { icon: r, size: "xxs" }) });
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" }) });
79
81
  export {
80
- H as WriteBar
82
+ K as WriteBar
81
83
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companix/uikit",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "main": "./dist/bundle.es.js",
5
5
  "module": "./dist/bundle.es.js",
6
6
  "types": "./dist/index.d.ts",