@windoc/react 0.3.12 → 0.3.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windoc/react",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
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.12"
53
+ "@windoc/core": "^0.3.13"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/react": "^19",
@@ -137,16 +137,71 @@ ul {
137
137
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
138
138
  }
139
139
 
140
- .menu-item .select::after {
141
- position: absolute;
142
- content: "";
143
- top: 12px;
144
- width: 0;
145
- height: 0;
146
- right: 8px;
147
- border-color: #667085 transparent transparent;
148
- border-style: solid solid none;
149
- border-width: 3px 3px 0;
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
+ border-right-color: #fff;
182
+ }
183
+
184
+ .menu-item__select-arrow {
185
+ width: 14px;
186
+ height: 28px;
187
+ padding-right: 2px;
188
+ display: inline-flex;
189
+ align-items: center;
190
+ justify-content: center;
191
+ border: 1px solid #d0d5dd;
192
+ border-left-color: #fff;
193
+ border-radius: 0 8px 8px 0;
194
+ background: #fff;
195
+ color: #667085;
196
+ cursor: pointer;
197
+ position: relative;
198
+ transition: all 0.2s;
199
+ flex-shrink: 0;
200
+ }
201
+
202
+ .menu-item__select-arrow:hover {
203
+ background: #f2f4f7;
204
+ border-color: #667085;
150
205
  }
151
206
 
152
207
  .menu-item .options {
@@ -190,58 +245,6 @@ ul {
190
245
  color: #3b82f6;
191
246
  }
192
247
 
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
248
 
246
249
  .menu-item__undo.no-allow,
247
250
  .menu-item__redo.no-allow,
@@ -285,71 +288,107 @@ ul {
285
288
  background-image: url("./images/italic.svg");
286
289
  }
287
290
 
288
- .menu-item .menu-item__underline {
291
+ /* Split underline button: icon + arrow as two connected buttons */
292
+ .menu-item > .menu-item__underline-group {
289
293
  width: auto;
290
- min-width: 38px;
291
294
  height: 28px;
292
- position: relative;
293
- border: 1px solid #d0d5dd;
294
- border-radius: 8px;
295
- background: #fff;
296
- padding: 0 18px 0 4px;
295
+ border: none;
296
+ border-radius: 0;
297
+ background: transparent;
298
+ padding: 0;
297
299
  margin: 0 2px;
298
300
  display: flex;
299
301
  align-items: center;
300
- transition: all 0.2s;
302
+ cursor: default;
303
+ position: relative;
301
304
  }
302
305
 
303
- .menu-item .menu-item__underline svg {
306
+ .menu-item > .menu-item__underline-group:hover {
307
+ background: transparent;
308
+ border-color: transparent;
309
+ }
310
+
311
+ .menu-item__underline-btn {
312
+ width: 28px;
313
+ height: 28px;
314
+ display: flex;
315
+ align-items: center;
316
+ justify-content: center;
317
+ border: 1px solid #d0d5dd;
318
+ border-right-color: #fff;
319
+ border-radius: 8px 0 0 8px;
320
+ background: #fff;
321
+ color: #475467;
322
+ cursor: pointer;
323
+ transition: all 0.2s;
304
324
  flex-shrink: 0;
305
- width: 16px;
306
- height: 16px;
307
325
  }
308
326
 
309
- .menu-item .menu-item__underline:hover {
327
+ .menu-item__underline-btn:hover {
310
328
  background: #f2f4f7;
311
329
  border-color: #667085;
312
330
  }
313
331
 
314
- .menu-item__underline > i {
332
+ .menu-item__underline-btn.active {
333
+ border-color: #3b82f6;
334
+ background: #eff6ff;
335
+ color: #3b82f6;
336
+ }
337
+
338
+ .menu-item__underline-arrow {
339
+ width: 14px;
340
+ padding-right: 2px;
341
+ height: 28px;
342
+ display: flex;
343
+ align-items: center;
344
+ justify-content: center;
345
+ border: 1px solid #d0d5dd;
346
+ border-left-color: #fff;
347
+ border-radius: 0 8px 8px 0;
348
+ background: #fff;
349
+ color: #667085;
350
+ cursor: pointer;
351
+ position: relative;
352
+ transition: all 0.2s;
315
353
  flex-shrink: 0;
316
- background-image: url("./images/underline.svg");
317
354
  }
318
355
 
319
- .menu-item__underline .select {
320
- width: 100%;
321
- height: 100%;
356
+ .menu-item__underline-arrow:hover {
357
+ background: #f2f4f7;
358
+ border-color: #667085;
322
359
  }
323
360
 
324
- .menu-item .menu-item__underline .options {
361
+ .menu-item__underline-arrow .options {
325
362
  width: 128px;
363
+ left: auto;
364
+ right: 0;
326
365
  }
327
366
 
328
- .menu-item .menu-item__underline li {
367
+ .menu-item__underline-arrow li {
329
368
  padding: 1px 5px;
330
369
  }
331
370
 
332
- .menu-item__underline li i {
371
+ .menu-item__underline-arrow li i {
333
372
  pointer-events: none;
334
373
  }
335
374
 
336
- .menu-item__underline li[data-decoration-style="solid"] {
375
+ .menu-item__underline-arrow li[data-decoration-style="solid"] {
337
376
  background-image: url("./images/line-single.svg");
338
377
  }
339
378
 
340
- .menu-item__underline li[data-decoration-style="double"] {
379
+ .menu-item__underline-arrow li[data-decoration-style="double"] {
341
380
  background-image: url("./images/line-double.svg");
342
381
  }
343
382
 
344
- .menu-item__underline li[data-decoration-style="dashed"] {
383
+ .menu-item__underline-arrow li[data-decoration-style="dashed"] {
345
384
  background-image: url("./images/line-dash-small-gap.svg");
346
385
  }
347
386
 
348
- .menu-item__underline li[data-decoration-style="dotted"] {
387
+ .menu-item__underline-arrow li[data-decoration-style="dotted"] {
349
388
  background-image: url("./images/line-dot.svg");
350
389
  }
351
390
 
352
- .menu-item__underline li[data-decoration-style="wavy"] {
391
+ .menu-item__underline-arrow li[data-decoration-style="wavy"] {
353
392
  background-image: url("./images/line-wavy.svg");
354
393
  }
355
394
 
@@ -366,7 +405,9 @@ ul {
366
405
  }
367
406
 
368
407
  .menu-item__color,
369
- .menu-item__highlight {
408
+ .menu-item__highlight,
409
+ .menu-item__td-bg-color,
410
+ .menu-item__td-border-color {
370
411
  display: flex;
371
412
  flex-direction: column;
372
413
  align-items: center;
@@ -384,7 +425,9 @@ ul {
384
425
  }
385
426
 
386
427
  .menu-item__color:hover,
387
- .menu-item__highlight:hover {
428
+ .menu-item__highlight:hover,
429
+ .menu-item__td-bg-color:hover,
430
+ .menu-item__td-border-color:hover {
388
431
  background: #f2f4f7;
389
432
  border-color: #667085;
390
433
  }
@@ -414,35 +457,15 @@ ul {
414
457
  background-color: #ffff00;
415
458
  }
416
459
 
417
- .menu-item .menu-item__title {
418
- width: auto;
419
- min-width: 60px;
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;
460
+ .menu-item__td-bg-color span {
461
+ background-color: transparent;
462
+ border: 1px dashed #ccc;
436
463
  }
437
464
 
438
- .menu-item__title .select {
439
- width: 100%;
440
- height: 100%;
465
+ .menu-item__td-border-color span {
466
+ background-color: #000000;
441
467
  }
442
468
 
443
- .menu-item__title .options {
444
- width: 100px;
445
- }
446
469
 
447
470
  .menu-item__left i {
448
471
  background-image: url("./images/left.svg");
@@ -472,45 +495,74 @@ ul {
472
495
  background-image: url("./images/row-margin.svg");
473
496
  }
474
497
 
475
- .menu-item__list {
498
+ /* Split list button: icon + arrow */
499
+ .menu-item > .menu-item__list-group {
500
+ width: auto;
501
+ height: 28px;
502
+ border: none;
503
+ border-radius: 0;
504
+ background: transparent;
505
+ padding: 0;
506
+ margin: 0 2px;
507
+ display: flex;
508
+ align-items: center;
509
+ cursor: default;
476
510
  position: relative;
511
+ }
512
+
513
+ .menu-item > .menu-item__list-group:hover {
514
+ background: transparent;
515
+ border-color: transparent;
516
+ }
517
+
518
+ .menu-item__list-btn {
477
519
  width: 28px;
478
520
  height: 28px;
479
521
  display: flex;
480
522
  align-items: center;
481
523
  justify-content: center;
482
524
  border: 1px solid #d0d5dd;
483
- border-radius: 8px;
525
+ border-right-color: #fff;
526
+ border-radius: 8px 0 0 8px;
484
527
  background: #fff;
485
528
  color: #475467;
486
- margin: 0 2px;
487
529
  cursor: pointer;
488
530
  transition: all 0.2s;
531
+ flex-shrink: 0;
489
532
  }
490
533
 
491
- .menu-item__list:hover {
534
+ .menu-item__list-btn:hover {
492
535
  background: #f2f4f7;
493
536
  border-color: #667085;
494
537
  }
495
538
 
496
- .menu-item__list i {
497
- background-image: url("./images/list.svg");
498
- }
499
-
500
- .menu-item__list .options {
501
- width: 110px;
502
- }
503
-
504
- .menu-item__list .options > ul > li * {
505
- pointer-events: none;
539
+ .menu-item__list-btn.active {
540
+ border-color: #3b82f6;
541
+ background: #eff6ff;
542
+ color: #3b82f6;
506
543
  }
507
544
 
508
- .menu-item__list .options > ul > li li {
509
- margin-left: 18px;
545
+ .menu-item__list-arrow {
546
+ width: 14px;
547
+ padding-right: 2px;
548
+ height: 28px;
549
+ display: flex;
550
+ align-items: center;
551
+ justify-content: center;
552
+ border: 1px solid #d0d5dd;
553
+ border-left-color: #fff;
554
+ border-radius: 0 8px 8px 0;
555
+ background: #fff;
556
+ color: #667085;
557
+ cursor: pointer;
558
+ position: relative;
559
+ transition: all 0.2s;
560
+ flex-shrink: 0;
510
561
  }
511
562
 
512
- .menu-item__list .options > ul > li[data-list-style="checkbox"] li::marker {
513
- font-size: 11px;
563
+ .menu-item__list-arrow:hover {
564
+ background: #f2f4f7;
565
+ border-color: #667085;
514
566
  }
515
567
 
516
568
  .menu-item__image i {
@@ -894,36 +946,6 @@ ul {
894
946
  background-image: url("./images/print.svg");
895
947
  }
896
948
 
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
949
 
928
950
  .option-divider {
929
951
  height: 1px;
@@ -954,36 +976,6 @@ ul {
954
976
  text-align: center;
955
977
  }
956
978
 
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
979
 
988
980
  .catalog {
989
981
  width: 250px;