@cakemail-org/ui-components-v2 2.1.19 → 2.1.20

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./styles.scss";
3
3
  import { TInlineTextEdit } from "./types";
4
- export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, defaultValue, name, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
4
+ export declare function InlineTextEdit({ disabled, tooltipTitle, tooltipPlacement, defaultValue, name, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
5
5
  export default InlineTextEdit;
6
6
  export * from "./types";
@@ -1,6 +1,5 @@
1
1
  import { TTooltipPlacement } from "../header/types";
2
2
  export type TInlineTextEdit = {
3
- children: any;
4
3
  tooltipTitle: string;
5
4
  tooltipPlacement?: TTooltipPlacement;
6
5
  defaultValue?: string;
package/dist/cjs/index.js CHANGED
@@ -10736,7 +10736,7 @@ styleInject(css_248z$5);
10736
10736
 
10737
10737
  function InlineTextEdit(_a) {
10738
10738
  var _b, _c;
10739
- var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, defaultValue = _a.defaultValue, name = _a.name, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
10739
+ var disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, defaultValue = _a.defaultValue, name = _a.name, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
10740
10740
  var _d = React.useState(false), editing = _d[0], setEditing = _d[1];
10741
10741
  var id = React.useRef(Math.floor(Math.random() * 1000000000));
10742
10742
  var spanRef = React.useRef(null);
@@ -10784,7 +10784,7 @@ function InlineTextEdit(_a) {
10784
10784
  React.createElement(Box, { id: "inlineTextEdit-id-" + id.current, className: classes },
10785
10785
  !editing &&
10786
10786
  React.createElement(Tooltip, { title: tooltipTitle, arrow: true, placement: tooltipPlacement },
10787
- React.createElement(Box, { component: "span", className: "".concat(!children && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, children || placeholder)),
10787
+ React.createElement(Box, { component: "span", className: "".concat(!value && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, value || placeholder)),
10788
10788
  React.createElement(Box, { className: editing ? "" : "hidden" },
10789
10789
  React.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, value: value, onChange: handleOnChange }),
10790
10790
  showActionButtons &&
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./styles.scss";
3
3
  import { TInlineTextEdit } from "./types";
4
- export declare function InlineTextEdit({ children, disabled, tooltipTitle, tooltipPlacement, defaultValue, name, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
4
+ export declare function InlineTextEdit({ disabled, tooltipTitle, tooltipPlacement, defaultValue, name, onConfirm, onCancel, placeholder, showActionButtons, maxRows, maxLength }: TInlineTextEdit): React.JSX.Element;
5
5
  export default InlineTextEdit;
6
6
  export * from "./types";
@@ -1,6 +1,5 @@
1
1
  import { TTooltipPlacement } from "../header/types";
2
2
  export type TInlineTextEdit = {
3
- children: any;
4
3
  tooltipTitle: string;
5
4
  tooltipPlacement?: TTooltipPlacement;
6
5
  defaultValue?: string;
package/dist/esm/index.js CHANGED
@@ -10716,7 +10716,7 @@ styleInject(css_248z$5);
10716
10716
 
10717
10717
  function InlineTextEdit(_a) {
10718
10718
  var _b, _c;
10719
- var children = _a.children, disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, defaultValue = _a.defaultValue, name = _a.name, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
10719
+ var disabled = _a.disabled, tooltipTitle = _a.tooltipTitle, tooltipPlacement = _a.tooltipPlacement, defaultValue = _a.defaultValue, name = _a.name, onConfirm = _a.onConfirm, onCancel = _a.onCancel, placeholder = _a.placeholder, showActionButtons = _a.showActionButtons, maxRows = _a.maxRows, maxLength = _a.maxLength;
10720
10720
  var _d = useState(false), editing = _d[0], setEditing = _d[1];
10721
10721
  var id = useRef(Math.floor(Math.random() * 1000000000));
10722
10722
  var spanRef = useRef(null);
@@ -10764,7 +10764,7 @@ function InlineTextEdit(_a) {
10764
10764
  React__default.createElement(Box$1, { id: "inlineTextEdit-id-" + id.current, className: classes },
10765
10765
  !editing &&
10766
10766
  React__default.createElement(Tooltip$1, { title: tooltipTitle, arrow: true, placement: tooltipPlacement },
10767
- React__default.createElement(Box$1, { component: "span", className: "".concat(!children && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, children || placeholder)),
10767
+ React__default.createElement(Box$1, { component: "span", className: "".concat(!value && placeholder ? "hasPlaceholder" : "", " pointer"), onClick: handleClick, style: { maxHeight: offsetHeightOfSpan * maxRows } }, value || placeholder)),
10768
10768
  React__default.createElement(Box$1, { className: editing ? "" : "hidden" },
10769
10769
  React__default.createElement(TextField, { disabled: disabled, inputProps: { maxLength: maxLength || 256 }, maxRows: maxRows, multiline: multiline, placeholder: placeholder, variant: "standard", name: name, style: { width: "".concat(offsetWidthOfSpan, "px") }, value: value, onChange: handleOnChange }),
10770
10770
  showActionButtons &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "description": "ui library kit made with material UI",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",