kamotive_ui 14.1.26 → 15.1.26

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.
@@ -528,16 +528,12 @@ export const TextEditor = ({ defaultValue, attachedFiles, label, onSubmit, onCan
528
528
  height: '25px',
529
529
  padding: '5px',
530
530
  backgroundColor: 'white',
531
- cursor: 'pointer',
532
- opacity: 0.5,
533
531
  }, color: "var(--blue-main)" }),
534
532
  React.createElement(IconButton, { ref: submitButtonRef, title: lng === 'ru' ? 'Отправить' : 'Submit', icon: React.createElement(IconSubmit, { width: '10', height: '10', htmlColor: 'blue', strokeWidth: '1' }), onClick: handleSubmit, style: {
535
533
  width: '25px',
536
534
  height: '25px',
537
535
  padding: '5px',
538
536
  backgroundColor: 'var(--blue-main)',
539
- opacity: 0.5,
540
- cursor: 'pointer'
541
537
  }, color: "white" })));
542
538
  }
543
539
  const buttons = editorRef.current.querySelectorAll(`.${styles.pellButton}`);
@@ -621,11 +617,14 @@ export const TextEditor = ({ defaultValue, attachedFiles, label, onSubmit, onCan
621
617
  if (submitButtonRef.current) {
622
618
  submitButtonRef.current.disabled = hasNoChanges || isTextEmpty || hasErrorsInFiles;
623
619
  submitButtonRef.current.style.opacity = hasNoChanges || isTextEmpty || hasErrorsInFiles ? '0.5' : '1';
620
+ submitButtonRef.current.style.cursor = hasNoChanges || isTextEmpty || hasErrorsInFiles ? 'default' : 'pointer';
624
621
  }
625
622
  if (cancelButtonRef.current) {
626
- cancelButtonRef.current.style.opacity = hasNoChanges ? '0.5' : '1';
623
+ cancelButtonRef.current.disabled = !isEditMode && hasNoChanges;
624
+ cancelButtonRef.current.style.opacity = isEditMode ? '1' : hasNoChanges ? '0.5' : '1';
625
+ cancelButtonRef.current.style.cursor = isEditMode ? 'pointer' : hasNoChanges ? 'default' : 'pointer';
627
626
  }
628
- }, [editorHtml, defaultValue, temporaryFiles]);
627
+ }, [editorHtml, defaultValue, temporaryFiles, submitButtonRef.current, cancelButtonRef.current, isEditMode]);
629
628
  const handleKeyDown = (e) => {
630
629
  if (e.ctrlKey || e.metaKey) {
631
630
  switch (e.key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kamotive_ui",
3
- "version": "14.01.26",
3
+ "version": "15.01.26",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [