@squiz/formatted-text-editor 2.6.0 → 2.6.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e9be63: Add focused classes to FTE
8
+
3
9
  ## 2.6.0
4
10
 
5
11
  ### Minor Changes
@@ -65,7 +65,7 @@ const Editor = ({ attributes, border = true, children, className, containers, co
65
65
  button.setAttribute('type', 'button');
66
66
  });
67
67
  }, []);
68
- return (react_1.default.createElement("div", { ref: wrapperRef, onBlurCapture: handleBlur, onFocusCapture: handleFocus, className: (0, clsx_1.default)('squiz-fte-scope', 'squiz-fte-scope__editor', !editable && 'squiz-fte-scope__editor--is-disabled', border && 'squiz-fte-scope__editor--bordered', isEmpty && 'squiz-fte-scope__editor--empty', className) },
68
+ return (react_1.default.createElement("div", { ref: wrapperRef, onBlurCapture: handleBlur, onFocusCapture: handleFocus, className: (0, clsx_1.default)('squiz-fte-scope', 'squiz-fte-scope__editor', !editable && 'squiz-fte-scope__editor--is-disabled', border && 'squiz-fte-scope__editor--bordered', isEmpty && 'squiz-fte-scope__editor--empty', isFocused && (children ? 'squiz-fte-scope__editor--focused-with-children' : 'squiz-fte-scope__editor--focused'), className) },
69
69
  react_1.default.createElement(react_2.Remirror, { manager: manager, initialContent: state, editable: editable, onChange: handleChange, placeholder: "Write something", label: label, attributes: attributes },
70
70
  editable && (react_1.default.createElement(EditorToolbar_1.Toolbar, { isVisible: isFocused, enableTableTool: enableTableTool, container: containers?.toolbar })),
71
71
  children && react_1.default.createElement("div", { className: "squiz-fte-scope__editor__children" }, children),
package/lib/index.css CHANGED
@@ -5627,6 +5627,12 @@
5627
5627
  .squiz-fte-scope .remirror-table-show-predelete.remirror-table-preselect-all th.remirror-table-controller {
5628
5628
  background-color: var(--rmr-color-table-predelete-controller) !important;
5629
5629
  }
5630
+ .squiz-fte-scope__editor--focused .remirror-table-insert-button.remirror-controllers-toggle {
5631
+ margin-top: 50px;
5632
+ }
5633
+ .squiz-fte-scope__editor--focused-with-children .remirror-table-insert-button.remirror-controllers-toggle {
5634
+ margin-top: 80px;
5635
+ }
5630
5636
  .squiz-fte-scope .editor-toolbar,
5631
5637
  .squiz-fte-scope__floating-popover {
5632
5638
  border-top-left-radius: 8px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/formatted-text-editor",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "private": false,
@@ -23,7 +23,7 @@
23
23
  "@headlessui/react": "1.7.11",
24
24
  "@mui/base": "^5.0.0-beta.40",
25
25
  "@mui/icons-material": "5.15.18",
26
- "@remirror/extension-react-tables": "^2.2.19",
26
+ "@remirror/extension-react-tables": "^2.2.21",
27
27
  "@remirror/react": "2.0.35",
28
28
  "@squiz/dam-resource-browser-plugin": "^3.0.3-rc.0",
29
29
  "@squiz/dx-json-schema-lib": "^1.74.1",
@@ -94,6 +94,7 @@ const Editor = ({
94
94
  !editable && 'squiz-fte-scope__editor--is-disabled',
95
95
  border && 'squiz-fte-scope__editor--bordered',
96
96
  isEmpty && 'squiz-fte-scope__editor--empty',
97
+ isFocused && (children ? 'squiz-fte-scope__editor--focused-with-children' : 'squiz-fte-scope__editor--focused'),
97
98
  className,
98
99
  )}
99
100
  >
@@ -433,3 +433,15 @@
433
433
  .remirror-table-show-predelete.remirror-table-preselect-all th.remirror-table-controller {
434
434
  background-color: var(--rmr-color-table-predelete-controller) !important;
435
435
  }
436
+
437
+ .squiz-fte-scope__editor--focused {
438
+ .remirror-table-insert-button.remirror-controllers-toggle {
439
+ margin-top: 50px;
440
+ }
441
+ }
442
+
443
+ .squiz-fte-scope__editor--focused-with-children {
444
+ .remirror-table-insert-button.remirror-controllers-toggle {
445
+ margin-top: 80px;
446
+ }
447
+ }