@plait/core 0.0.33 → 0.0.35

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.
@@ -1,4 +1,4 @@
1
- @use './theme.scss';
1
+ @use './theme.scss';
2
2
 
3
3
  .plait-board-container {
4
4
  display: block;
@@ -9,7 +9,7 @@
9
9
  // https://stackoverflow.com/questions/51313873/svg-foreignobject-not-working-properly-on-safari
10
10
  .plait-richtext-container {
11
11
  position: initial;
12
- &[readonly="true"] {
12
+ &[readonly='true'] {
13
13
  ::selection {
14
14
  background: none;
15
15
  }
@@ -21,42 +21,77 @@
21
21
  display: flex;
22
22
  height: 30px;
23
23
  z-index: 100;
24
-
25
- .item {
26
- flex: 1 1 auto;
27
- width: 50px;
28
- padding: 4px 10px;
29
- margin-right: 10px;
30
- cursor: pointer;
31
- border: none;
32
- border-radius: 3px;
33
- font-size: 14px;
34
-
35
- &:last-child {
36
- margin-right: 0;
37
- }
38
- }
39
24
  }
40
25
 
41
26
  .island {
42
- --padding: 2;
27
+ --padding: 1;
43
28
  background-color: var(--iscard-bg-color);
44
29
  box-shadow: var(--shadow-iscard);
45
- border-radius: var(--border-radius-lg);
30
+ border-radius: var(--border-radius-sm);
46
31
  padding: calc(var(--padding) * var(--space-factor));
47
32
  transition: box-shadow 0.5s ease-in-out;
33
+ box-shadow: 0 0 16px #00000014;
34
+ border: 1px solid #eee;
48
35
  }
36
+ }
49
37
 
50
- .zoom-toolbar {
51
- top: 20px;
52
- right: 30px;
38
+ .zoom-toolbar {
39
+ position: absolute;
40
+ top: 20px;
41
+ right: 30px;
42
+ display: flex;
43
+ align-items: center;
53
44
 
54
- .item {
55
- &.zoom-value {
56
- width: 60px;
57
- }
45
+ .zoom-value {
46
+ user-select: none;
47
+ width: 36px;
48
+ height: 20px;
49
+ padding: 0 8px;
50
+ font-size: 14px;
51
+ cursor: pointer;
52
+ color: #666;
53
+ font-weight: 400;
54
+ border-radius: 4px;
55
+ text-align: center;
56
+ }
58
57
 
59
- width: 40px;
58
+ .divider {
59
+ height: 16px;
60
+ border-left: 1px solid #ddd;
61
+ margin-left: 4px;
62
+ margin-right: 8px;
63
+ }
64
+ .toolbar-item {
65
+ margin-right: 4px;
66
+ &:last-child {
67
+ margin-right: 0;
60
68
  }
61
69
  }
62
- }
70
+ }
71
+
72
+ .plait-action-icon {
73
+ color: #999;
74
+ padding: 8px;
75
+ background-repeat: no-repeat;
76
+ fill: currentColor;
77
+ font-size: 16px;
78
+ line-height: 0;
79
+ display: inline-block;
80
+ border-radius: 4px;
81
+ cursor: pointer;
82
+ svg {
83
+ background-repeat: no-repeat;
84
+ /* 通过设置 font-size 来改变图标大小 */
85
+ width: 1em;
86
+ height: 1em;
87
+ /* 通过设置 color 来改变 SVG 的颜色/fill */
88
+ fill: currentColor;
89
+ /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 normalize.css 中也包含这行 */
90
+ overflow: hidden;
91
+ transition: transform 200ms;
92
+ }
93
+ }
94
+ .plait-action-icon:hover {
95
+ color: rgb(102, 152, 255);
96
+ background: rgba(102, 152, 255, 0.1);
97
+ }
package/styles/theme.scss CHANGED
@@ -9,6 +9,7 @@
9
9
  1px 1px 5px rgb(0 0 0 / 12%);
10
10
  --space-factor: 0.25rem;
11
11
 
12
+ --border-radius-sm: 0.25rem;
12
13
  --border-radius-md: 0.375rem;
13
14
  --border-radius-lg: 0.5rem;
14
15
  }