pixelize-design-library 1.0.32 → 1.0.33
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/Components/NoteTextArea/NoteTextArea.d.ts +1 -1
- package/dist/Components/NoteTextArea/NoteTextArea.js +31 -14
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +4 -0
- package/dist/Components/NoteTextArea/NoteTextAreaProps.js +5 -0
- package/dist/Layout.js +6 -2
- package/package.json +1 -1
- package/dist/.dev-server.zip +0 -0
- package/dist/@mf-types.d.ts +0 -3
- package/dist/@mf-types.zip +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NoteTextAreaProps } from "./NoteTextAreaProps";
|
|
3
|
-
export default function NoteTextArea({ width, handleSubmit, }: NoteTextAreaProps): React.JSX.Element;
|
|
3
|
+
export default function NoteTextArea({ width, handleSubmit, value, title, file, isEditable, }: NoteTextAreaProps): React.JSX.Element;
|
|
@@ -44,10 +44,12 @@ var fi_1 = require("react-icons/fi");
|
|
|
44
44
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
45
45
|
var Container = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: ", ";\n border-radius: 5px;\n box-shadow: ", ";\n"], ["\n border: ", ";\n border-radius: 5px;\n box-shadow: ", ";\n"])), function (_a) {
|
|
46
46
|
var isActive = _a.isActive;
|
|
47
|
-
return
|
|
47
|
+
return isActive ? "1px solid #3182ce" : "1px solid #c0c6cc";
|
|
48
48
|
}, function (_a) {
|
|
49
49
|
var isActive = _a.isActive;
|
|
50
|
-
return
|
|
50
|
+
return isActive
|
|
51
|
+
? "-1px 1px 8px 4px rgb(49 130 206 / 24%), 0px 2px 6px 0 rgb(49 130 206 / 19%)"
|
|
52
|
+
: "none";
|
|
51
53
|
});
|
|
52
54
|
var TextAreaContainer = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n cursor: text;\n padding: 12px 15px;\n display: ", ";\n"], ["\n width: 100%;\n cursor: text;\n padding: 12px 15px;\n display: ", ";\n"])), function (_a) {
|
|
53
55
|
var isActive = _a.isActive;
|
|
@@ -81,26 +83,41 @@ var CancelButton = styled_1.default.button(templateObject_9 || (templateObject_9
|
|
|
81
83
|
var FileViewer = styled_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 300px;\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 300px;\n"])));
|
|
82
84
|
var FileEdit = (0, styled_1.default)(fi_1.FiX)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n cursor: pointer;\n color: #ff0000;\n"], ["\n cursor: pointer;\n color: #ff0000;\n"])));
|
|
83
85
|
function NoteTextArea(_a) {
|
|
84
|
-
var _b = _a.width, width = _b === void 0 ? "100%" : _b, handleSubmit = _a.handleSubmit;
|
|
86
|
+
var _b = _a.width, width = _b === void 0 ? "100%" : _b, handleSubmit = _a.handleSubmit, value = _a.value, title = _a.title, file = _a.file, _c = _a.isEditable, isEditable = _c === void 0 ? false : _c;
|
|
85
87
|
var noteAreaRef = (0, react_1.useRef)(null);
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var
|
|
90
|
-
var
|
|
88
|
+
var _d = (0, react_1.useState)(false), isActive = _d[0], setIsActive = _d[1];
|
|
89
|
+
var _e = (0, react_1.useState)(""), noteValue = _e[0], setNoteValue = _e[1];
|
|
90
|
+
var _f = (0, react_1.useState)(""), titleValue = _f[0], setTitleValue = _f[1];
|
|
91
|
+
var _g = (0, react_1.useState)(false), titleShow = _g[0], setTitleShow = _g[1];
|
|
92
|
+
var _h = (0, react_1.useState)([]), files = _h[0], setFiles = _h[1];
|
|
93
|
+
(0, react_1.useEffect)(function () {
|
|
94
|
+
if (isEditable) {
|
|
95
|
+
if (value) {
|
|
96
|
+
setNoteValue(value);
|
|
97
|
+
setIsActive(true);
|
|
98
|
+
}
|
|
99
|
+
if (title) {
|
|
100
|
+
setTitleValue(title);
|
|
101
|
+
setTitleShow(true);
|
|
102
|
+
}
|
|
103
|
+
if (file) {
|
|
104
|
+
setFiles(file);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, [value, title, file, isEditable]);
|
|
91
108
|
var handleTextArea = function () {
|
|
92
109
|
setIsActive(!isActive);
|
|
93
110
|
setNoteValue("");
|
|
94
111
|
setTitleValue("");
|
|
95
112
|
setTitleShow(false);
|
|
96
|
-
|
|
113
|
+
setFiles([]);
|
|
97
114
|
};
|
|
98
115
|
var resetState = function () {
|
|
99
116
|
setIsActive(false);
|
|
100
117
|
setNoteValue("");
|
|
101
118
|
setTitleValue("");
|
|
102
119
|
setTitleShow(false);
|
|
103
|
-
|
|
120
|
+
setFiles([]);
|
|
104
121
|
};
|
|
105
122
|
var handleNoteChange = function (event) {
|
|
106
123
|
setNoteValue(event.target.value);
|
|
@@ -159,7 +176,7 @@ function NoteTextArea(_a) {
|
|
|
159
176
|
react_1.default.createElement("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: function (event) {
|
|
160
177
|
if (event.target.files && event.target.files.length > 0) {
|
|
161
178
|
var filesArray = Array.from(event.target.files);
|
|
162
|
-
|
|
179
|
+
setFiles(__spreadArray(__spreadArray([], files, true), filesArray, true));
|
|
163
180
|
}
|
|
164
181
|
} })),
|
|
165
182
|
!titleShow && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -174,15 +191,15 @@ function NoteTextArea(_a) {
|
|
|
174
191
|
react_1.default.createElement("div", { style: { marginLeft: "auto" } },
|
|
175
192
|
react_1.default.createElement(CancelButton, { onClick: handleTextArea }, "Cancel"),
|
|
176
193
|
react_1.default.createElement(Button, { isSaveButton: true, noteValue: noteValue, disabled: !noteValue, onClick: function () {
|
|
177
|
-
handleSubmit(noteValue, titleValue,
|
|
194
|
+
handleSubmit(noteValue, titleValue, files);
|
|
178
195
|
resetState();
|
|
179
196
|
} }, "Save"))),
|
|
180
|
-
|
|
197
|
+
files.length > 0 && (react_1.default.createElement("div", null, files.map(function (item, index) { return (react_1.default.createElement(FileViewer, { key: index },
|
|
181
198
|
react_1.default.createElement(react_1.default.Fragment, null,
|
|
182
199
|
react_1.default.createElement("span", null, shortenFileName(item.name)),
|
|
183
200
|
react_1.default.createElement("span", null, formatBytes(item.size))),
|
|
184
201
|
react_1.default.createElement(FileEdit, { onClick: function () {
|
|
185
|
-
return
|
|
202
|
+
return setFiles(files.filter(function (fileItem) { return fileItem !== item; }));
|
|
186
203
|
} }))); }))))))));
|
|
187
204
|
}
|
|
188
205
|
exports.default = NoteTextArea;
|
package/dist/Layout.js
CHANGED
|
@@ -388,8 +388,12 @@ var Layout = function () {
|
|
|
388
388
|
react_2.default.createElement("br", null),
|
|
389
389
|
react_2.default.createElement(Switch_1.default, { leftText: "left", rightText: "right", switchActive: switchActive, onSwitchToggle: handleSwitchToggle }),
|
|
390
390
|
react_2.default.createElement("br", null),
|
|
391
|
-
react_2.default.createElement(NoteTextArea_1.default, { width: "720px", handleSubmit: function (noteValue, titleValue, file) {
|
|
391
|
+
react_2.default.createElement(NoteTextArea_1.default, { width: "720px", handleSubmit: function (noteValue, titleValue, file) {
|
|
392
|
+
handleNoteValue(noteValue, titleValue, file);
|
|
393
|
+
}, value: "text", title: "hello", isEditable: true }),
|
|
392
394
|
react_2.default.createElement("br", null),
|
|
393
|
-
react_2.default.createElement(DropDown_1.default, { ButtonText: "Vibility", options: exportOptionss, handleOptionSelect: function (id) {
|
|
395
|
+
react_2.default.createElement(DropDown_1.default, { ButtonText: "Vibility", options: exportOptionss, handleOptionSelect: function (id) {
|
|
396
|
+
console.log("optionid", id);
|
|
397
|
+
} }))))));
|
|
394
398
|
};
|
|
395
399
|
exports.default = Layout;
|
package/package.json
CHANGED
package/dist/.dev-server.zip
DELETED
|
Binary file
|
package/dist/@mf-types.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export type RemoteKeys = 'REMOTE_ALIAS_IDENTIFIER/Version' | 'REMOTE_ALIAS_IDENTIFIER/TextInput' | 'REMOTE_ALIAS_IDENTIFIER/InputTextArea' | 'REMOTE_ALIAS_IDENTIFIER/Select' | 'REMOTE_ALIAS_IDENTIFIER/Checkbox' | 'REMOTE_ALIAS_IDENTIFIER/Button' | 'REMOTE_ALIAS_IDENTIFIER/Toaster' | 'REMOTE_ALIAS_IDENTIFIER/Modal' | 'REMOTE_ALIAS_IDENTIFIER/theme' | 'REMOTE_ALIAS_IDENTIFIER/Sidebar' | 'REMOTE_ALIAS_IDENTIFIER/Navbar' | 'REMOTE_ALIAS_IDENTIFIER/Loading' | 'REMOTE_ALIAS_IDENTIFIER/Skeletons' | 'REMOTE_ALIAS_IDENTIFIER/RadioButton' | 'REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon' | 'REMOTE_ALIAS_IDENTIFIER/ProgressBar' | 'REMOTE_ALIAS_IDENTIFIER/NumberInput' | 'REMOTE_ALIAS_IDENTIFIER/PinInput' | 'REMOTE_ALIAS_IDENTIFIER/ProfileCard' | 'REMOTE_ALIAS_IDENTIFIER/Breadcrumb' | 'REMOTE_ALIAS_IDENTIFIER/TableComponent' | 'REMOTE_ALIAS_IDENTIFIER/Tooltip' | 'REMOTE_ALIAS_IDENTIFIER/ApexBarChart' | 'REMOTE_ALIAS_IDENTIFIER/ApexPieChart' | 'REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer';
|
|
3
|
-
type PackageType<T> = T extends 'REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProfilePhotoViewer') :T extends 'REMOTE_ALIAS_IDENTIFIER/ApexPieChart' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ApexPieChart') :T extends 'REMOTE_ALIAS_IDENTIFIER/ApexBarChart' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ApexBarChart') :T extends 'REMOTE_ALIAS_IDENTIFIER/Tooltip' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Tooltip') :T extends 'REMOTE_ALIAS_IDENTIFIER/TableComponent' ? typeof import('REMOTE_ALIAS_IDENTIFIER/TableComponent') :T extends 'REMOTE_ALIAS_IDENTIFIER/Breadcrumb' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Breadcrumb') :T extends 'REMOTE_ALIAS_IDENTIFIER/ProfileCard' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProfileCard') :T extends 'REMOTE_ALIAS_IDENTIFIER/PinInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/PinInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/NumberInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/NumberInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/ProgressBar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ProgressBar') :T extends 'REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon' ? typeof import('REMOTE_ALIAS_IDENTIFIER/ButtonGroupIcon') :T extends 'REMOTE_ALIAS_IDENTIFIER/RadioButton' ? typeof import('REMOTE_ALIAS_IDENTIFIER/RadioButton') :T extends 'REMOTE_ALIAS_IDENTIFIER/Skeletons' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Skeletons') :T extends 'REMOTE_ALIAS_IDENTIFIER/Loading' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Loading') :T extends 'REMOTE_ALIAS_IDENTIFIER/Navbar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Navbar') :T extends 'REMOTE_ALIAS_IDENTIFIER/Sidebar' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Sidebar') :T extends 'REMOTE_ALIAS_IDENTIFIER/theme' ? typeof import('REMOTE_ALIAS_IDENTIFIER/theme') :T extends 'REMOTE_ALIAS_IDENTIFIER/Modal' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Modal') :T extends 'REMOTE_ALIAS_IDENTIFIER/Toaster' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Toaster') :T extends 'REMOTE_ALIAS_IDENTIFIER/Button' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Button') :T extends 'REMOTE_ALIAS_IDENTIFIER/Checkbox' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Checkbox') :T extends 'REMOTE_ALIAS_IDENTIFIER/Select' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Select') :T extends 'REMOTE_ALIAS_IDENTIFIER/InputTextArea' ? typeof import('REMOTE_ALIAS_IDENTIFIER/InputTextArea') :T extends 'REMOTE_ALIAS_IDENTIFIER/TextInput' ? typeof import('REMOTE_ALIAS_IDENTIFIER/TextInput') :T extends 'REMOTE_ALIAS_IDENTIFIER/Version' ? typeof import('REMOTE_ALIAS_IDENTIFIER/Version') :any;
|
package/dist/@mf-types.zip
DELETED
|
Binary file
|