@vonaffenfels/slate-editor 1.0.77 → 1.0.78
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/BlockEditor.css +2 -2
- package/dist/BlockEditor.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/scss/sidebarEditor.scss +1 -0
- package/scss/toolbar.scss +19 -0
- package/src/SidebarEditor.js +8 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cssnano": "^5.0.1",
|
|
72
72
|
"escape-html": "^1.0.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d9a15e949b3c97d57e927366ab4063e3f83618ef",
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
package/scss/sidebarEditor.scss
CHANGED
package/scss/toolbar.scss
CHANGED
|
@@ -9,6 +9,25 @@
|
|
|
9
9
|
position: absolute;
|
|
10
10
|
z-index: 500;
|
|
11
11
|
|
|
12
|
+
input[type="text"],
|
|
13
|
+
input[type="number"],
|
|
14
|
+
input[type="color"],
|
|
15
|
+
input[type="datetime-local"],
|
|
16
|
+
input[type="search"],
|
|
17
|
+
select,
|
|
18
|
+
textarea {
|
|
19
|
+
display: block;
|
|
20
|
+
font-size: 0.875rem !important;
|
|
21
|
+
color: rgb(90, 101, 124) !important;
|
|
22
|
+
background-color: white !important;
|
|
23
|
+
border: 1px solid #cfd9e0 !important;
|
|
24
|
+
border-radius: 6px !important;
|
|
25
|
+
box-shadow: none !important;
|
|
26
|
+
filter: none !important;
|
|
27
|
+
width: 100% !important;
|
|
28
|
+
padding: 8px 0.75rem !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
12
31
|
&.toolbar-static {
|
|
13
32
|
display: block;
|
|
14
33
|
position: fixed;
|
package/src/SidebarEditor.js
CHANGED
|
@@ -157,14 +157,6 @@ const SidebarEditor = ({
|
|
|
157
157
|
setVersions([]);
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
const handleBlockSelectChange = (block) => {
|
|
161
|
-
if (onChange) {
|
|
162
|
-
setLastChangedProperty(null);
|
|
163
|
-
addVersion(storybookElement);
|
|
164
|
-
onChange(block);
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
|
|
168
160
|
const handleVariantSelectChange = (variant) => {
|
|
169
161
|
if (onChange) {
|
|
170
162
|
setLastChangedProperty(null);
|
|
@@ -228,6 +220,13 @@ const SidebarEditor = ({
|
|
|
228
220
|
|
|
229
221
|
return (
|
|
230
222
|
<>
|
|
223
|
+
<input
|
|
224
|
+
type="text"
|
|
225
|
+
placeholder="🔍 Feld suchen..."
|
|
226
|
+
onChange={e => setPropertySearch(e.target.value)}
|
|
227
|
+
value={propertySearch}
|
|
228
|
+
className="mb-2"
|
|
229
|
+
/>
|
|
231
230
|
{Object.keys(fields.fields).map(key => {
|
|
232
231
|
const field = fields.fields[key];
|
|
233
232
|
|
|
@@ -356,13 +355,6 @@ const SidebarEditor = ({
|
|
|
356
355
|
<hr className="my-4" style={{borderColor: "#cfd9e0"}}/>
|
|
357
356
|
</div>
|
|
358
357
|
)}
|
|
359
|
-
<input
|
|
360
|
-
type="text"
|
|
361
|
-
placeholder="🔍 Eigenschaft suchen..."
|
|
362
|
-
onChange={e => setPropertySearch(e.target.value)}
|
|
363
|
-
value={propertySearch}
|
|
364
|
-
className="mb-2"
|
|
365
|
-
/>
|
|
366
358
|
{renderFields()}
|
|
367
359
|
</div>
|
|
368
360
|
</>
|
|
@@ -450,6 +442,7 @@ const VariantSelect = ({
|
|
|
450
442
|
onChange={e => onChange && onChange({
|
|
451
443
|
block: story.id,
|
|
452
444
|
attributes: {...stories.find(s => s.title === e.target.value)?.args || {}},
|
|
445
|
+
type: "storybook",
|
|
453
446
|
})}>
|
|
454
447
|
<option>Preset wählen</option>
|
|
455
448
|
{stories.map(s => (
|