@windoc/react 0.3.12 → 0.3.14
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/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +898 -590
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +882 -576
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/styles/editor.css +183 -192
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windoc/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "React bindings for windoc editor",
|
|
5
5
|
"homepage": "https://aliansyahfirdaus.github.io/windoc/",
|
|
6
6
|
"repository": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-dom": ">=18"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@windoc/core": "^0.3.
|
|
53
|
+
"@windoc/core": "^0.3.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/react": "^19",
|
package/src/styles/editor.css
CHANGED
|
@@ -137,16 +137,70 @@ ul {
|
|
|
137
137
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
/* Shared split select group: label + arrow */
|
|
141
|
+
.menu-item > .menu-item__select-group {
|
|
142
|
+
width: auto;
|
|
143
|
+
height: 28px;
|
|
144
|
+
border: none;
|
|
145
|
+
background: transparent;
|
|
146
|
+
padding: 0;
|
|
147
|
+
margin: 0 2px;
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: flex-start;
|
|
151
|
+
cursor: default;
|
|
152
|
+
position: relative;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.menu-item > .menu-item__select-group:hover {
|
|
156
|
+
background: transparent;
|
|
157
|
+
border-color: transparent;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.menu-item__select-text {
|
|
161
|
+
height: 28px;
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
padding: 0 8px;
|
|
165
|
+
border: 1px solid #d0d5dd;
|
|
166
|
+
border-right-color: #fff;
|
|
167
|
+
border-radius: 8px 0 0 8px;
|
|
168
|
+
background: #fff;
|
|
169
|
+
color: #344054;
|
|
170
|
+
font-size: 12px;
|
|
171
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
user-select: none;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
transition: all 0.2s;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.menu-item__select-text:hover {
|
|
179
|
+
background: #f2f4f7;
|
|
180
|
+
border-color: #667085;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.menu-item__select-arrow {
|
|
184
|
+
width: 14px;
|
|
185
|
+
height: 28px;
|
|
186
|
+
padding-right: 2px;
|
|
187
|
+
display: inline-flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
border: 1px solid #d0d5dd;
|
|
191
|
+
border-left-color: #fff;
|
|
192
|
+
border-radius: 0 8px 8px 0;
|
|
193
|
+
background: #fff;
|
|
194
|
+
color: #667085;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
position: relative;
|
|
197
|
+
transition: all 0.2s;
|
|
198
|
+
flex-shrink: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.menu-item__select-arrow:hover {
|
|
202
|
+
background: #f2f4f7;
|
|
203
|
+
border-color: #667085;
|
|
150
204
|
}
|
|
151
205
|
|
|
152
206
|
.menu-item .options {
|
|
@@ -190,58 +244,6 @@ ul {
|
|
|
190
244
|
color: #3b82f6;
|
|
191
245
|
}
|
|
192
246
|
|
|
193
|
-
.menu-item .menu-item__font {
|
|
194
|
-
width: auto;
|
|
195
|
-
min-width: 65px;
|
|
196
|
-
height: 28px;
|
|
197
|
-
position: relative;
|
|
198
|
-
border: 1px solid #d0d5dd;
|
|
199
|
-
border-radius: 8px;
|
|
200
|
-
background: #fff;
|
|
201
|
-
padding: 0 20px 0 8px;
|
|
202
|
-
margin: 0 2px;
|
|
203
|
-
cursor: pointer;
|
|
204
|
-
transition: all 0.2s;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.menu-item .menu-item__font:hover {
|
|
208
|
-
background: #f2f4f7;
|
|
209
|
-
border-color: #667085;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.menu-item .menu-item__size {
|
|
213
|
-
width: auto;
|
|
214
|
-
min-width: 45px;
|
|
215
|
-
height: 28px;
|
|
216
|
-
text-align: center;
|
|
217
|
-
position: relative;
|
|
218
|
-
border: 1px solid #d0d5dd;
|
|
219
|
-
border-radius: 8px;
|
|
220
|
-
background: #fff;
|
|
221
|
-
padding: 0 20px 0 8px;
|
|
222
|
-
margin: 0 2px;
|
|
223
|
-
cursor: pointer;
|
|
224
|
-
transition: all 0.2s;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.menu-item .menu-item__size:hover {
|
|
228
|
-
background: #f2f4f7;
|
|
229
|
-
border-color: #667085;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.menu-item__font .select,
|
|
233
|
-
.menu-item__size .select {
|
|
234
|
-
width: 100%;
|
|
235
|
-
height: 100%;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.menu-item .menu-item__font .options {
|
|
239
|
-
width: 150px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.menu-item .menu-item__size .options {
|
|
243
|
-
width: 60px;
|
|
244
|
-
}
|
|
245
247
|
|
|
246
248
|
.menu-item__undo.no-allow,
|
|
247
249
|
.menu-item__redo.no-allow,
|
|
@@ -285,71 +287,107 @@ ul {
|
|
|
285
287
|
background-image: url("./images/italic.svg");
|
|
286
288
|
}
|
|
287
289
|
|
|
288
|
-
|
|
290
|
+
/* Split underline button: icon + arrow as two connected buttons */
|
|
291
|
+
.menu-item > .menu-item__underline-group {
|
|
289
292
|
width: auto;
|
|
290
|
-
min-width: 38px;
|
|
291
293
|
height: 28px;
|
|
292
|
-
|
|
293
|
-
border:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
padding: 0 18px 0 4px;
|
|
294
|
+
border: none;
|
|
295
|
+
border-radius: 0;
|
|
296
|
+
background: transparent;
|
|
297
|
+
padding: 0;
|
|
297
298
|
margin: 0 2px;
|
|
298
299
|
display: flex;
|
|
299
300
|
align-items: center;
|
|
300
|
-
|
|
301
|
+
cursor: default;
|
|
302
|
+
position: relative;
|
|
301
303
|
}
|
|
302
304
|
|
|
303
|
-
.menu-item .menu-item__underline
|
|
305
|
+
.menu-item > .menu-item__underline-group:hover {
|
|
306
|
+
background: transparent;
|
|
307
|
+
border-color: transparent;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.menu-item__underline-btn {
|
|
311
|
+
width: 28px;
|
|
312
|
+
height: 28px;
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
border: 1px solid #d0d5dd;
|
|
317
|
+
border-right-color: #fff;
|
|
318
|
+
border-radius: 8px 0 0 8px;
|
|
319
|
+
background: #fff;
|
|
320
|
+
color: #475467;
|
|
321
|
+
cursor: pointer;
|
|
322
|
+
transition: all 0.2s;
|
|
304
323
|
flex-shrink: 0;
|
|
305
|
-
width: 16px;
|
|
306
|
-
height: 16px;
|
|
307
324
|
}
|
|
308
325
|
|
|
309
|
-
.menu-
|
|
326
|
+
.menu-item__underline-btn:hover {
|
|
310
327
|
background: #f2f4f7;
|
|
311
328
|
border-color: #667085;
|
|
312
329
|
}
|
|
313
330
|
|
|
314
|
-
.menu-item__underline
|
|
331
|
+
.menu-item__underline-btn.active {
|
|
332
|
+
border-color: #3b82f6;
|
|
333
|
+
background: #eff6ff;
|
|
334
|
+
color: #3b82f6;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.menu-item__underline-arrow {
|
|
338
|
+
width: 14px;
|
|
339
|
+
padding-right: 2px;
|
|
340
|
+
height: 28px;
|
|
341
|
+
display: flex;
|
|
342
|
+
align-items: center;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
border: 1px solid #d0d5dd;
|
|
345
|
+
border-left-color: #fff;
|
|
346
|
+
border-radius: 0 8px 8px 0;
|
|
347
|
+
background: #fff;
|
|
348
|
+
color: #667085;
|
|
349
|
+
cursor: pointer;
|
|
350
|
+
position: relative;
|
|
351
|
+
transition: all 0.2s;
|
|
315
352
|
flex-shrink: 0;
|
|
316
|
-
background-image: url("./images/underline.svg");
|
|
317
353
|
}
|
|
318
354
|
|
|
319
|
-
.menu-item__underline
|
|
320
|
-
|
|
321
|
-
|
|
355
|
+
.menu-item__underline-arrow:hover {
|
|
356
|
+
background: #f2f4f7;
|
|
357
|
+
border-color: #667085;
|
|
322
358
|
}
|
|
323
359
|
|
|
324
|
-
.menu-
|
|
360
|
+
.menu-item__underline-arrow .options {
|
|
325
361
|
width: 128px;
|
|
362
|
+
left: auto;
|
|
363
|
+
right: 0;
|
|
326
364
|
}
|
|
327
365
|
|
|
328
|
-
.menu-
|
|
366
|
+
.menu-item__underline-arrow li {
|
|
329
367
|
padding: 1px 5px;
|
|
330
368
|
}
|
|
331
369
|
|
|
332
|
-
.menu-item__underline li i {
|
|
370
|
+
.menu-item__underline-arrow li i {
|
|
333
371
|
pointer-events: none;
|
|
334
372
|
}
|
|
335
373
|
|
|
336
|
-
.menu-item__underline li[data-decoration-style="solid"] {
|
|
374
|
+
.menu-item__underline-arrow li[data-decoration-style="solid"] {
|
|
337
375
|
background-image: url("./images/line-single.svg");
|
|
338
376
|
}
|
|
339
377
|
|
|
340
|
-
.menu-item__underline li[data-decoration-style="double"] {
|
|
378
|
+
.menu-item__underline-arrow li[data-decoration-style="double"] {
|
|
341
379
|
background-image: url("./images/line-double.svg");
|
|
342
380
|
}
|
|
343
381
|
|
|
344
|
-
.menu-item__underline li[data-decoration-style="dashed"] {
|
|
382
|
+
.menu-item__underline-arrow li[data-decoration-style="dashed"] {
|
|
345
383
|
background-image: url("./images/line-dash-small-gap.svg");
|
|
346
384
|
}
|
|
347
385
|
|
|
348
|
-
.menu-item__underline li[data-decoration-style="dotted"] {
|
|
386
|
+
.menu-item__underline-arrow li[data-decoration-style="dotted"] {
|
|
349
387
|
background-image: url("./images/line-dot.svg");
|
|
350
388
|
}
|
|
351
389
|
|
|
352
|
-
.menu-item__underline li[data-decoration-style="wavy"] {
|
|
390
|
+
.menu-item__underline-arrow li[data-decoration-style="wavy"] {
|
|
353
391
|
background-image: url("./images/line-wavy.svg");
|
|
354
392
|
}
|
|
355
393
|
|
|
@@ -366,7 +404,9 @@ ul {
|
|
|
366
404
|
}
|
|
367
405
|
|
|
368
406
|
.menu-item__color,
|
|
369
|
-
.menu-item__highlight
|
|
407
|
+
.menu-item__highlight,
|
|
408
|
+
.menu-item__td-bg-color,
|
|
409
|
+
.menu-item__td-border-color {
|
|
370
410
|
display: flex;
|
|
371
411
|
flex-direction: column;
|
|
372
412
|
align-items: center;
|
|
@@ -384,7 +424,9 @@ ul {
|
|
|
384
424
|
}
|
|
385
425
|
|
|
386
426
|
.menu-item__color:hover,
|
|
387
|
-
.menu-item__highlight:hover
|
|
427
|
+
.menu-item__highlight:hover,
|
|
428
|
+
.menu-item__td-bg-color:hover,
|
|
429
|
+
.menu-item__td-border-color:hover {
|
|
388
430
|
background: #f2f4f7;
|
|
389
431
|
border-color: #667085;
|
|
390
432
|
}
|
|
@@ -414,35 +456,15 @@ ul {
|
|
|
414
456
|
background-color: #ffff00;
|
|
415
457
|
}
|
|
416
458
|
|
|
417
|
-
.menu-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
height: 28px;
|
|
421
|
-
position: relative;
|
|
422
|
-
border: 1px solid #d0d5dd;
|
|
423
|
-
border-radius: 8px;
|
|
424
|
-
background: #fff;
|
|
425
|
-
padding: 0 20px 0 8px;
|
|
426
|
-
margin: 0 2px;
|
|
427
|
-
cursor: pointer;
|
|
428
|
-
display: flex;
|
|
429
|
-
align-items: center;
|
|
430
|
-
transition: all 0.2s;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.menu-item .menu-item__title:hover {
|
|
434
|
-
background: #f2f4f7;
|
|
435
|
-
border-color: #667085;
|
|
459
|
+
.menu-item__td-bg-color span {
|
|
460
|
+
background-color: transparent;
|
|
461
|
+
border: 1px dashed #ccc;
|
|
436
462
|
}
|
|
437
463
|
|
|
438
|
-
.menu-
|
|
439
|
-
|
|
440
|
-
height: 100%;
|
|
464
|
+
.menu-item__td-border-color span {
|
|
465
|
+
background-color: #000000;
|
|
441
466
|
}
|
|
442
467
|
|
|
443
|
-
.menu-item__title .options {
|
|
444
|
-
width: 100px;
|
|
445
|
-
}
|
|
446
468
|
|
|
447
469
|
.menu-item__left i {
|
|
448
470
|
background-image: url("./images/left.svg");
|
|
@@ -472,45 +494,74 @@ ul {
|
|
|
472
494
|
background-image: url("./images/row-margin.svg");
|
|
473
495
|
}
|
|
474
496
|
|
|
475
|
-
|
|
497
|
+
/* Split list button: icon + arrow */
|
|
498
|
+
.menu-item > .menu-item__list-group {
|
|
499
|
+
width: auto;
|
|
500
|
+
height: 28px;
|
|
501
|
+
border: none;
|
|
502
|
+
border-radius: 0;
|
|
503
|
+
background: transparent;
|
|
504
|
+
padding: 0;
|
|
505
|
+
margin: 0 2px;
|
|
506
|
+
display: flex;
|
|
507
|
+
align-items: center;
|
|
508
|
+
cursor: default;
|
|
476
509
|
position: relative;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.menu-item > .menu-item__list-group:hover {
|
|
513
|
+
background: transparent;
|
|
514
|
+
border-color: transparent;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.menu-item__list-btn {
|
|
477
518
|
width: 28px;
|
|
478
519
|
height: 28px;
|
|
479
520
|
display: flex;
|
|
480
521
|
align-items: center;
|
|
481
522
|
justify-content: center;
|
|
482
523
|
border: 1px solid #d0d5dd;
|
|
483
|
-
border-
|
|
524
|
+
border-right-color: #fff;
|
|
525
|
+
border-radius: 8px 0 0 8px;
|
|
484
526
|
background: #fff;
|
|
485
527
|
color: #475467;
|
|
486
|
-
margin: 0 2px;
|
|
487
528
|
cursor: pointer;
|
|
488
529
|
transition: all 0.2s;
|
|
530
|
+
flex-shrink: 0;
|
|
489
531
|
}
|
|
490
532
|
|
|
491
|
-
.menu-item__list:hover {
|
|
533
|
+
.menu-item__list-btn:hover {
|
|
492
534
|
background: #f2f4f7;
|
|
493
535
|
border-color: #667085;
|
|
494
536
|
}
|
|
495
537
|
|
|
496
|
-
.menu-item__list
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
.menu-item__list .options {
|
|
501
|
-
width: 110px;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.menu-item__list .options > ul > li * {
|
|
505
|
-
pointer-events: none;
|
|
538
|
+
.menu-item__list-btn.active {
|
|
539
|
+
border-color: #3b82f6;
|
|
540
|
+
background: #eff6ff;
|
|
541
|
+
color: #3b82f6;
|
|
506
542
|
}
|
|
507
543
|
|
|
508
|
-
.menu-item__list
|
|
509
|
-
|
|
544
|
+
.menu-item__list-arrow {
|
|
545
|
+
width: 14px;
|
|
546
|
+
padding-right: 2px;
|
|
547
|
+
height: 28px;
|
|
548
|
+
display: flex;
|
|
549
|
+
align-items: center;
|
|
550
|
+
justify-content: center;
|
|
551
|
+
border: 1px solid #d0d5dd;
|
|
552
|
+
border-left-color: #fff;
|
|
553
|
+
border-radius: 0 8px 8px 0;
|
|
554
|
+
background: #fff;
|
|
555
|
+
color: #667085;
|
|
556
|
+
cursor: pointer;
|
|
557
|
+
position: relative;
|
|
558
|
+
transition: all 0.2s;
|
|
559
|
+
flex-shrink: 0;
|
|
510
560
|
}
|
|
511
561
|
|
|
512
|
-
.menu-item__list
|
|
513
|
-
|
|
562
|
+
.menu-item__list-arrow:hover {
|
|
563
|
+
background: #f2f4f7;
|
|
564
|
+
border-color: #667085;
|
|
514
565
|
}
|
|
515
566
|
|
|
516
567
|
.menu-item__image i {
|
|
@@ -894,36 +945,6 @@ ul {
|
|
|
894
945
|
background-image: url("./images/print.svg");
|
|
895
946
|
}
|
|
896
947
|
|
|
897
|
-
.menu-item .menu-item__column {
|
|
898
|
-
width: auto;
|
|
899
|
-
min-width: 65px;
|
|
900
|
-
height: 28px;
|
|
901
|
-
position: relative;
|
|
902
|
-
display: flex;
|
|
903
|
-
align-items: center;
|
|
904
|
-
border: 1px solid #d0d5dd;
|
|
905
|
-
border-radius: 8px;
|
|
906
|
-
background: #fff;
|
|
907
|
-
color: #475467;
|
|
908
|
-
padding: 0 20px 0 8px;
|
|
909
|
-
margin: 0 2px;
|
|
910
|
-
cursor: pointer;
|
|
911
|
-
transition: all 0.2s;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.menu-item .menu-item__column:hover {
|
|
915
|
-
background: #f2f4f7;
|
|
916
|
-
border-color: #667085;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
.menu-item__column .select {
|
|
920
|
-
width: 100%;
|
|
921
|
-
height: 100%;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
.menu-item .menu-item__column .options {
|
|
925
|
-
width: 130px;
|
|
926
|
-
}
|
|
927
948
|
|
|
928
949
|
.option-divider {
|
|
929
950
|
height: 1px;
|
|
@@ -954,36 +975,6 @@ ul {
|
|
|
954
975
|
text-align: center;
|
|
955
976
|
}
|
|
956
977
|
|
|
957
|
-
.menu-item__line-height {
|
|
958
|
-
width: auto;
|
|
959
|
-
min-width: 52px;
|
|
960
|
-
height: 28px;
|
|
961
|
-
position: relative;
|
|
962
|
-
display: flex;
|
|
963
|
-
align-items: center;
|
|
964
|
-
border: 1px solid #d0d5dd;
|
|
965
|
-
border-radius: 8px;
|
|
966
|
-
background: #fff;
|
|
967
|
-
color: #475467;
|
|
968
|
-
padding: 0 20px 0 8px;
|
|
969
|
-
margin: 0 2px;
|
|
970
|
-
cursor: pointer;
|
|
971
|
-
transition: all 0.2s;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.menu-item__line-height:hover {
|
|
975
|
-
background: #f2f4f7;
|
|
976
|
-
border-color: #667085;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.menu-item__line-height .select {
|
|
980
|
-
width: 100%;
|
|
981
|
-
height: 100%;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
.menu-item__line-height .options {
|
|
985
|
-
width: 60px;
|
|
986
|
-
}
|
|
987
978
|
|
|
988
979
|
.catalog {
|
|
989
980
|
width: 250px;
|