@cakemail-org/ui-components-v2 2.1.19 → 2.1.21
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/cjs/components/inlineTextEdit/index.d.ts +1 -1
- package/dist/cjs/components/inlineTextEdit/types.d.ts +0 -1
- package/dist/cjs/index.js +3 -3
- package/dist/esm/components/inlineTextEdit/index.d.ts +1 -1
- package/dist/esm/components/inlineTextEdit/types.d.ts +0 -1
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
|
@@ -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({
|
|
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";
|
package/dist/cjs/index.js
CHANGED
|
@@ -9122,7 +9122,7 @@ function Link(_a) {
|
|
|
9122
9122
|
return React.createElement(material.Link, __assign({}, props, { variant: variant, color: color, className: classes }), children);
|
|
9123
9123
|
}
|
|
9124
9124
|
|
|
9125
|
-
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9125
|
+
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9126
9126
|
styleInject(css_248z$b);
|
|
9127
9127
|
|
|
9128
9128
|
function SubNav(_a) {
|
|
@@ -10736,7 +10736,7 @@ styleInject(css_248z$5);
|
|
|
10736
10736
|
|
|
10737
10737
|
function InlineTextEdit(_a) {
|
|
10738
10738
|
var _b, _c;
|
|
10739
|
-
var
|
|
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(!
|
|
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({
|
|
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";
|
package/dist/esm/index.js
CHANGED
|
@@ -9102,7 +9102,7 @@ function Link(_a) {
|
|
|
9102
9102
|
return React__default.createElement(Link$1, __assign({}, props, { variant: variant, color: color, className: classes }), children);
|
|
9103
9103
|
}
|
|
9104
9104
|
|
|
9105
|
-
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9105
|
+
var css_248z$b = ".subNav-component-v2 {\n flex-wrap: wrap;\n}\n.subNav-component-v2.dir-row button:not(:last-child) {\n margin-right: 2px;\n}\n.subNav-component-v2.dir-column button:not(:first-child) {\n margin-top: 1.25rem;\n}\n.subNav-component-v2 button.default, .subNav-component-v2 button.text {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n outline: none;\n}\n.subNav-component-v2 button.default span, .subNav-component-v2 button.text span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.default:not(:hover), .subNav-component-v2 button.text:not(:hover) {\n background: none;\n}\n.subNav-component-v2 button.default:hover, .subNav-component-v2 button.text:hover {\n outline: none;\n}\n.subNav-component-v2 button.default:active, .subNav-component-v2 button.text:active {\n outline: none !important;\n}\n.subNav-component-v2 button.default {\n text-transform: none;\n}\n.subNav-component-v2 button.default span {\n text-transform: none;\n}\n.subNav-component-v2 button.default.selected {\n background-color: var(--cloud, #F4F4F4);\n}\n.subNav-component-v2 button.text span {\n color: var(--silver, #9B9B9B);\n}\n.subNav-component-v2 button.text:hover, .subNav-component-v2 button.text.selected {\n background: none;\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}\n.subNav-component-v2 button.text:hover span, .subNav-component-v2 button.text.selected span {\n color: var(--body-font-color, var(--dark-matter, #2B2B2B));\n}";
|
|
9106
9106
|
styleInject(css_248z$b);
|
|
9107
9107
|
|
|
9108
9108
|
function SubNav(_a) {
|
|
@@ -10716,7 +10716,7 @@ styleInject(css_248z$5);
|
|
|
10716
10716
|
|
|
10717
10717
|
function InlineTextEdit(_a) {
|
|
10718
10718
|
var _b, _c;
|
|
10719
|
-
var
|
|
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(!
|
|
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 &&
|