@ctzhian/tiptap 1.4.0 → 1.4.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.
@@ -75,6 +75,9 @@ var EditorToolbar = function EditorToolbar(_ref) {
75
75
  input: {
76
76
  display: 'none'
77
77
  },
78
+ '&:hover': {
79
+ bgcolor: 'background.paper2'
80
+ },
78
81
  '&.tool-active': {
79
82
  bgcolor: 'background.paper2',
80
83
  color: 'primary.main',
@@ -140,7 +140,8 @@ var EditorFontSize = function EditorFontSize(_ref) {
140
140
  }, /*#__PURE__*/React.createElement(Box, {
141
141
  sx: {
142
142
  textAlign: 'center',
143
- fontSize: '0.875rem'
143
+ fontSize: '0.875rem',
144
+ width: '100%'
144
145
  }
145
146
  }, it));
146
147
  }));
@@ -42,10 +42,10 @@ var ToolbarItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
42
42
  className: className,
43
43
  disabled: disabled,
44
44
  sx: _objectSpread({
45
+ minHeight: '36px',
45
46
  minWidth: '36px',
46
47
  p: 1,
47
48
  color: 'text.primary',
48
- borderRadius: 'var(--mui-shape-borderRadius)',
49
49
  '&.tool-active': {
50
50
  bgcolor: 'background.paper2',
51
51
  color: 'primary.main'
@@ -4,10 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { Box, Stack } from "@mui/material";
7
+ import { addOpacityToColor } from "../../util";
8
+ import { Box, Stack, useTheme } from "@mui/material";
8
9
  import React, { useState } from "react";
9
10
  var TableSizePicker = function TableSizePicker(_ref) {
10
11
  var onConfirm = _ref.onConfirm;
12
+ var theme = useTheme();
11
13
  var _useState = useState(0),
12
14
  _useState2 = _slicedToArray(_useState, 2),
13
15
  cols = _useState2[0],
@@ -52,16 +54,21 @@ var TableSizePicker = function TableSizePicker(_ref) {
52
54
  return onConfirm(c, r);
53
55
  },
54
56
  sx: {
55
- width: '18px',
56
- height: '18px',
57
57
  borderRadius: '3px',
58
+ overflow: 'hidden',
59
+ cursor: 'pointer',
60
+ bgcolor: 'background.default',
58
61
  border: '1px solid',
59
- borderColor: 'divider',
60
- bgcolor: activeCell ? 'primary.main' : 'background.default',
62
+ borderColor: 'divider'
63
+ }
64
+ }, /*#__PURE__*/React.createElement(Box, {
65
+ sx: {
66
+ width: '18px',
67
+ height: '18px',
61
68
  transition: 'background-color 0.12s ease',
62
- cursor: 'pointer'
69
+ bgcolor: activeCell ? addOpacityToColor(theme.palette.primary.main, 0.5) : theme.palette.background.default
63
70
  }
64
- });
71
+ }));
65
72
  }));
66
73
  })), /*#__PURE__*/React.createElement(Box, {
67
74
  sx: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",