@univerjs/ui 1.0.0-alpha.6 → 1.0.0-alpha.8

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.
Files changed (119) hide show
  1. package/lib/cjs/facade.js +9 -41
  2. package/lib/cjs/index.js +1434 -470
  3. package/lib/cjs/locale/ar-SA.js +12 -0
  4. package/lib/cjs/locale/ca-ES.js +12 -0
  5. package/lib/cjs/locale/de-DE.js +12 -0
  6. package/lib/cjs/locale/en-US.js +12 -0
  7. package/lib/cjs/locale/es-ES.js +12 -0
  8. package/lib/cjs/locale/fa-IR.js +12 -0
  9. package/lib/cjs/locale/fr-FR.js +12 -0
  10. package/lib/cjs/locale/id-ID.js +12 -0
  11. package/lib/cjs/locale/it-IT.js +12 -0
  12. package/lib/cjs/locale/ja-JP.js +12 -0
  13. package/lib/cjs/locale/ko-KR.js +12 -0
  14. package/lib/cjs/locale/pl-PL.js +12 -0
  15. package/lib/cjs/locale/pt-BR.js +12 -0
  16. package/lib/cjs/locale/ru-RU.js +12 -0
  17. package/lib/cjs/locale/sk-SK.js +12 -0
  18. package/lib/cjs/locale/vi-VN.js +12 -0
  19. package/lib/cjs/locale/zh-CN.js +12 -0
  20. package/lib/cjs/locale/zh-HK.js +12 -0
  21. package/lib/cjs/locale/zh-TW.js +12 -0
  22. package/lib/es/facade.js +11 -43
  23. package/lib/es/index.js +1431 -475
  24. package/lib/es/locale/ar-SA.js +12 -0
  25. package/lib/es/locale/ca-ES.js +12 -0
  26. package/lib/es/locale/de-DE.js +12 -0
  27. package/lib/es/locale/en-US.js +12 -0
  28. package/lib/es/locale/es-ES.js +12 -0
  29. package/lib/es/locale/fa-IR.js +12 -0
  30. package/lib/es/locale/fr-FR.js +12 -0
  31. package/lib/es/locale/id-ID.js +12 -0
  32. package/lib/es/locale/it-IT.js +12 -0
  33. package/lib/es/locale/ja-JP.js +12 -0
  34. package/lib/es/locale/ko-KR.js +12 -0
  35. package/lib/es/locale/pl-PL.js +12 -0
  36. package/lib/es/locale/pt-BR.js +12 -0
  37. package/lib/es/locale/ru-RU.js +12 -0
  38. package/lib/es/locale/sk-SK.js +12 -0
  39. package/lib/es/locale/vi-VN.js +12 -0
  40. package/lib/es/locale/zh-CN.js +12 -0
  41. package/lib/es/locale/zh-HK.js +12 -0
  42. package/lib/es/locale/zh-TW.js +12 -0
  43. package/lib/facade.js +11 -43
  44. package/lib/index.css +224 -6
  45. package/lib/index.js +1431 -475
  46. package/lib/locale/ar-SA.js +12 -0
  47. package/lib/locale/ca-ES.js +12 -0
  48. package/lib/locale/de-DE.js +12 -0
  49. package/lib/locale/en-US.js +12 -0
  50. package/lib/locale/es-ES.js +12 -0
  51. package/lib/locale/fa-IR.js +12 -0
  52. package/lib/locale/fr-FR.js +12 -0
  53. package/lib/locale/id-ID.js +12 -0
  54. package/lib/locale/it-IT.js +12 -0
  55. package/lib/locale/ja-JP.js +12 -0
  56. package/lib/locale/ko-KR.js +12 -0
  57. package/lib/locale/pl-PL.js +12 -0
  58. package/lib/locale/pt-BR.js +12 -0
  59. package/lib/locale/ru-RU.js +12 -0
  60. package/lib/locale/sk-SK.js +12 -0
  61. package/lib/locale/vi-VN.js +12 -0
  62. package/lib/locale/zh-CN.js +12 -0
  63. package/lib/locale/zh-HK.js +12 -0
  64. package/lib/locale/zh-TW.js +12 -0
  65. package/lib/types/commands/operations/open-feature-search.operation.d.ts +17 -0
  66. package/lib/types/controllers/feature-search/feature-search.controller.d.ts +20 -0
  67. package/lib/types/controllers/ui/ui.controller.d.ts +1 -1
  68. package/lib/types/facade/f-univer.d.ts +0 -8
  69. package/lib/types/facade/index.d.ts +0 -2
  70. package/lib/types/index.d.ts +4 -4
  71. package/lib/types/locale/en-US.d.ts +12 -0
  72. package/lib/types/menu/feature-search.menu.d.ts +18 -0
  73. package/lib/types/{controllers/menus/menus.d.ts → menu/history.menu.d.ts} +2 -2
  74. package/lib/types/{controllers/shortcut-display/menu.d.ts → menu/shortcut-panel.menu.d.ts} +2 -2
  75. package/lib/types/services/contextmenu/contextmenu-host.service.d.ts +5 -1
  76. package/lib/types/services/menu/menu-manager.service.d.ts +11 -0
  77. package/lib/types/services/menu/types.d.ts +1 -0
  78. package/lib/types/services/parts/parts.service.d.ts +3 -0
  79. package/lib/types/services/shortcut/shortcut.service.d.ts +21 -1
  80. package/lib/types/services/workbench/workbench.service.d.ts +30 -0
  81. package/lib/types/utils/embed-boundary.d.ts +2 -0
  82. package/lib/types/views/components/feature-search/FeatureSearch.d.ts +29 -0
  83. package/lib/types/views/components/ribbon/RibbonGrid.d.ts +23 -0
  84. package/lib/types/views/components/ribbon/ToolbarItem.d.ts +10 -1
  85. package/lib/types/views/components/ribbon/ribbon-grid-layout.d.ts +27 -0
  86. package/lib/types/views/components/ribbon/ribbon-menu/RibbonGridMenu.d.ts +21 -0
  87. package/lib/types/views/components/sidebar/Sidebar.d.ts +0 -2
  88. package/lib/types/views/components/workbench-skeleton/WorkbenchSkeleton.d.ts +22 -0
  89. package/lib/types/views/custom-label/CustomLabel.d.ts +1 -0
  90. package/lib/types/views/emoji-picker/EmojiPicker.d.ts +7 -3
  91. package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +1 -1
  92. package/lib/types/views/emoji-picker/index.d.ts +0 -1
  93. package/lib/types/views/index.d.ts +1 -0
  94. package/lib/types/views/symbol-picker/SymbolPicker.d.ts +31 -0
  95. package/lib/types/views/symbol-picker/index.d.ts +18 -0
  96. package/lib/types/views/symbol-picker/symbols.d.ts +23 -0
  97. package/lib/umd/facade.js +1 -1
  98. package/lib/umd/index.js +16 -13
  99. package/lib/umd/locale/ar-SA.js +1 -1
  100. package/lib/umd/locale/ca-ES.js +1 -1
  101. package/lib/umd/locale/de-DE.js +1 -1
  102. package/lib/umd/locale/en-US.js +1 -1
  103. package/lib/umd/locale/es-ES.js +1 -1
  104. package/lib/umd/locale/fa-IR.js +1 -1
  105. package/lib/umd/locale/fr-FR.js +1 -1
  106. package/lib/umd/locale/id-ID.js +1 -1
  107. package/lib/umd/locale/it-IT.js +1 -1
  108. package/lib/umd/locale/ja-JP.js +1 -1
  109. package/lib/umd/locale/ko-KR.js +1 -1
  110. package/lib/umd/locale/pl-PL.js +1 -1
  111. package/lib/umd/locale/pt-BR.js +1 -1
  112. package/lib/umd/locale/ru-RU.js +1 -1
  113. package/lib/umd/locale/sk-SK.js +1 -1
  114. package/lib/umd/locale/vi-VN.js +1 -1
  115. package/lib/umd/locale/zh-CN.js +1 -1
  116. package/lib/umd/locale/zh-HK.js +1 -1
  117. package/lib/umd/locale/zh-TW.js +1 -1
  118. package/package.json +8 -8
  119. package/lib/types/facade/f-hooks.d.ts +0 -63
package/lib/index.css CHANGED
@@ -33,6 +33,10 @@
33
33
  right: 0;
34
34
  }
35
35
 
36
+ .\!univer-top-auto {
37
+ top: auto !important;
38
+ }
39
+
36
40
  .-univer-left-\[99999\] {
37
41
  left: -99999px;
38
42
  }
@@ -45,6 +49,10 @@
45
49
  bottom: 0;
46
50
  }
47
51
 
52
+ .univer-bottom-1\.5 {
53
+ bottom: .375rem;
54
+ }
55
+
48
56
  .univer-left-0 {
49
57
  left: 0;
50
58
  }
@@ -73,6 +81,10 @@
73
81
  top: 50%;
74
82
  }
75
83
 
84
+ .univer-top-3\.5 {
85
+ top: .875rem;
86
+ }
87
+
76
88
  .univer-top-\[-9999px\] {
77
89
  top: -9999px;
78
90
  }
@@ -85,6 +97,10 @@
85
97
  z-index: 20;
86
98
  }
87
99
 
100
+ .univer-z-50 {
101
+ z-index: 50;
102
+ }
103
+
88
104
  .univer-z-\[100\] {
89
105
  z-index: 100;
90
106
  }
@@ -119,6 +135,10 @@
119
135
  margin-bottom: 0;
120
136
  }
121
137
 
138
+ .univer-ml-2 {
139
+ margin-left: .5rem;
140
+ }
141
+
122
142
  .univer-ml-auto {
123
143
  margin-left: auto;
124
144
  }
@@ -127,6 +147,10 @@
127
147
  margin-right: .5rem;
128
148
  }
129
149
 
150
+ .univer-mr-auto {
151
+ margin-right: auto;
152
+ }
153
+
130
154
  .univer-mt-2 {
131
155
  margin-top: .5rem;
132
156
  }
@@ -256,6 +280,22 @@
256
280
  height: 2.5rem;
257
281
  }
258
282
 
283
+ .univer-h-11 {
284
+ height: 2.75rem;
285
+ }
286
+
287
+ .univer-h-2 {
288
+ height: .5rem;
289
+ }
290
+
291
+ .univer-h-4 {
292
+ height: 1rem;
293
+ }
294
+
295
+ .univer-h-5 {
296
+ height: 1.25rem;
297
+ }
298
+
259
299
  .univer-h-6 {
260
300
  height: 1.5rem;
261
301
  }
@@ -280,6 +320,10 @@
280
320
  height: 340px;
281
321
  }
282
322
 
323
+ .univer-h-\[88px\] {
324
+ height: 88px;
325
+ }
326
+
283
327
  .univer-h-full {
284
328
  height: 100%;
285
329
  }
@@ -320,6 +364,10 @@
320
364
  min-height: 100%;
321
365
  }
322
366
 
367
+ .\!univer-w-full {
368
+ width: 100% !important;
369
+ }
370
+
323
371
  .univer-w-0 {
324
372
  width: 0;
325
373
  }
@@ -328,10 +376,18 @@
328
376
  width: .25rem;
329
377
  }
330
378
 
379
+ .univer-w-1\/3 {
380
+ width: 33.3333%;
381
+ }
382
+
331
383
  .univer-w-10 {
332
384
  width: 2.5rem;
333
385
  }
334
386
 
387
+ .univer-w-14 {
388
+ width: 3.5rem;
389
+ }
390
+
335
391
  .univer-w-24 {
336
392
  width: 6rem;
337
393
  }
@@ -368,10 +424,6 @@
368
424
  width: 420px;
369
425
  }
370
426
 
371
- .univer-w-\[52px\] {
372
- width: 52px;
373
- }
374
-
375
427
  .univer-w-\[68px\] {
376
428
  width: 68px;
377
429
  }
@@ -392,6 +444,14 @@
392
444
  min-width: 0;
393
445
  }
394
446
 
447
+ .univer-min-w-14 {
448
+ min-width: 3.5rem;
449
+ }
450
+
451
+ .univer-min-w-16 {
452
+ min-width: 4rem;
453
+ }
454
+
395
455
  .univer-min-w-44 {
396
456
  min-width: 11rem;
397
457
  }
@@ -408,6 +468,10 @@
408
468
  min-width: 16rem;
409
469
  }
410
470
 
471
+ .univer-min-w-8 {
472
+ min-width: 2rem;
473
+ }
474
+
411
475
  .univer-min-w-min {
412
476
  min-width: min-content;
413
477
  }
@@ -493,6 +557,16 @@
493
557
  transform: translate(var(--univer-tw-translate-x), var(--univer-tw-translate-y)) rotate(var(--univer-tw-rotate)) skewX(var(--univer-tw-skew-x)) skewY(var(--univer-tw-skew-y)) scaleX(var(--univer-tw-scale-x)) scaleY(var(--univer-tw-scale-y));
494
558
  }
495
559
 
560
+ @keyframes univer-pulse {
561
+ 50% {
562
+ opacity: .5;
563
+ }
564
+ }
565
+
566
+ .univer-animate-pulse {
567
+ animation: 2s cubic-bezier(.4, 0, .6, 1) infinite univer-pulse;
568
+ }
569
+
496
570
  .univer-cursor-col-resize {
497
571
  cursor: col-resize;
498
572
  }
@@ -562,6 +636,10 @@
562
636
  grid-template-columns: auto 1fr auto;
563
637
  }
564
638
 
639
+ .univer-grid-rows-2 {
640
+ grid-template-rows: repeat(2, minmax(0, 1fr));
641
+ }
642
+
565
643
  .univer-grid-rows-\[100\%\] {
566
644
  grid-template-rows: 100%;
567
645
  }
@@ -586,6 +664,10 @@
586
664
  flex-wrap: wrap;
587
665
  }
588
666
 
667
+ .univer-content-center {
668
+ align-content: center;
669
+ }
670
+
589
671
  .univer-items-end {
590
672
  align-items: flex-end;
591
673
  }
@@ -594,6 +676,14 @@
594
676
  align-items: center;
595
677
  }
596
678
 
679
+ .univer-items-stretch {
680
+ align-items: stretch;
681
+ }
682
+
683
+ .univer-justify-start {
684
+ justify-content: flex-start;
685
+ }
686
+
597
687
  .univer-justify-end {
598
688
  justify-content: flex-end;
599
689
  }
@@ -646,10 +736,23 @@
646
736
  gap: 1rem;
647
737
  }
648
738
 
739
+ .univer-gap-5 {
740
+ gap: 1.25rem;
741
+ }
742
+
649
743
  .univer-gap-6 {
650
744
  gap: 1.5rem;
651
745
  }
652
746
 
747
+ .univer-gap-x-1 {
748
+ -moz-column-gap: .25rem;
749
+ column-gap: .25rem;
750
+ }
751
+
752
+ .univer-gap-y-2 {
753
+ row-gap: .5rem;
754
+ }
755
+
653
756
  .univer-overflow-hidden {
654
757
  overflow: hidden;
655
758
  }
@@ -662,6 +765,10 @@
662
765
  overflow-y: auto;
663
766
  }
664
767
 
768
+ .univer-overflow-y-hidden {
769
+ overflow-y: hidden;
770
+ }
771
+
665
772
  .univer-overscroll-contain {
666
773
  overscroll-behavior: contain;
667
774
  }
@@ -732,6 +839,11 @@
732
839
  border-radius: .75rem;
733
840
  }
734
841
 
842
+ .univer-rounded-b {
843
+ border-bottom-right-radius: .25rem;
844
+ border-bottom-left-radius: .25rem;
845
+ }
846
+
735
847
  .univer-rounded-l {
736
848
  border-top-left-radius: .25rem;
737
849
  border-bottom-left-radius: .25rem;
@@ -752,6 +864,11 @@
752
864
  border-top-right-radius: 28px;
753
865
  }
754
866
 
867
+ .univer-rounded-t-none {
868
+ border-top-left-radius: 0;
869
+ border-top-right-radius: 0;
870
+ }
871
+
755
872
  .univer-border {
756
873
  border-width: 1px;
757
874
  }
@@ -764,6 +881,14 @@
764
881
  border-bottom-width: 1px;
765
882
  }
766
883
 
884
+ .univer-border-b-\[3px\] {
885
+ border-bottom-width: 3px;
886
+ }
887
+
888
+ .univer-border-t {
889
+ border-top-width: 1px;
890
+ }
891
+
767
892
  .univer-border-solid {
768
893
  border-style: solid;
769
894
  }
@@ -772,6 +897,10 @@
772
897
  border-style: none;
773
898
  }
774
899
 
900
+ .\!univer-border-gray-300 {
901
+ border-color: var(--univer-gray-300) !important;
902
+ }
903
+
775
904
  .univer-border-gray-200 {
776
905
  border-color: var(--univer-gray-200);
777
906
  }
@@ -784,6 +913,10 @@
784
913
  border-color: var(--univer-primary-600);
785
914
  }
786
915
 
916
+ .univer-border-transparent {
917
+ border-color: #0000;
918
+ }
919
+
787
920
  .univer-border-white {
788
921
  border-color: var(--univer-white);
789
922
  }
@@ -792,6 +925,10 @@
792
925
  background-color: var(--univer-gray-200) !important;
793
926
  }
794
927
 
928
+ .\!univer-bg-gray-800 {
929
+ background-color: var(--univer-gray-800) !important;
930
+ }
931
+
795
932
  .univer-bg-\[rgba\(15\,23\,42\,0\.32\)\] {
796
933
  background-color: #0f172a52;
797
934
  }
@@ -855,6 +992,10 @@
855
992
  --univer-tw-gradient-to: #164e63 var(--univer-tw-gradient-to-position);
856
993
  }
857
994
 
995
+ .\!univer-p-0 {
996
+ padding: 0 !important;
997
+ }
998
+
858
999
  .univer-p-0 {
859
1000
  padding: 0;
860
1001
  }
@@ -883,6 +1024,11 @@
883
1024
  padding: 2rem;
884
1025
  }
885
1026
 
1027
+ .\!univer-px-0 {
1028
+ padding-left: 0 !important;
1029
+ padding-right: 0 !important;
1030
+ }
1031
+
886
1032
  .univer-px-0 {
887
1033
  padding-left: 0;
888
1034
  padding-right: 0;
@@ -953,6 +1099,10 @@
953
1099
  padding-bottom: 1.75rem;
954
1100
  }
955
1101
 
1102
+ .\!univer-pr-0 {
1103
+ padding-right: 0 !important;
1104
+ }
1105
+
956
1106
  .univer-pb-1 {
957
1107
  padding-bottom: .25rem;
958
1108
  }
@@ -965,6 +1115,10 @@
965
1115
  padding-bottom: .75rem;
966
1116
  }
967
1117
 
1118
+ .univer-pb-4 {
1119
+ padding-bottom: 1rem;
1120
+ }
1121
+
968
1122
  .univer-pl-2 {
969
1123
  padding-left: .5rem;
970
1124
  }
@@ -1151,6 +1305,10 @@
1151
1305
  opacity: .4;
1152
1306
  }
1153
1307
 
1308
+ .univer-opacity-50 {
1309
+ opacity: .5;
1310
+ }
1311
+
1154
1312
  .univer-opacity-60 {
1155
1313
  opacity: .6;
1156
1314
  }
@@ -1310,6 +1468,10 @@
1310
1468
  color: var(--univer-gray-700);
1311
1469
  }
1312
1470
 
1471
+ .hover\:univer-text-gray-900:hover {
1472
+ color: var(--univer-gray-900);
1473
+ }
1474
+
1313
1475
  .hover\:univer-opacity-50:hover {
1314
1476
  opacity: .5;
1315
1477
  }
@@ -1353,10 +1515,18 @@
1353
1515
  box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), var(--univer-tw-shadow, 0 0 #0000);
1354
1516
  }
1355
1517
 
1518
+ .focus-visible\:univer-ring-inset:focus-visible {
1519
+ --univer-tw-ring-inset: inset;
1520
+ }
1521
+
1356
1522
  .focus-visible\:univer-ring-primary-100:focus-visible {
1357
1523
  --univer-tw-ring-color: var(--univer-primary-100);
1358
1524
  }
1359
1525
 
1526
+ .focus-visible\:univer-ring-primary-500:focus-visible {
1527
+ --univer-tw-ring-color: var(--univer-primary-500);
1528
+ }
1529
+
1360
1530
  .focus-visible\:univer-ring-primary-600:focus-visible {
1361
1531
  --univer-tw-ring-color: var(--univer-primary-600);
1362
1532
  }
@@ -1393,6 +1563,12 @@
1393
1563
  background-color: #0000;
1394
1564
  }
1395
1565
 
1566
+ @media (prefers-reduced-motion: reduce) {
1567
+ .motion-reduce\:univer-animate-none {
1568
+ animation: none;
1569
+ }
1570
+ }
1571
+
1396
1572
  @media (min-width: 640px) {
1397
1573
  .sm\:\!univer-flex {
1398
1574
  display: flex !important;
@@ -1411,6 +1587,14 @@
1411
1587
  right: auto;
1412
1588
  }
1413
1589
 
1590
+ .rtl\:univer-ml-0:where([dir="rtl"], [dir="rtl"] *) {
1591
+ margin-left: 0;
1592
+ }
1593
+
1594
+ .rtl\:univer-mr-auto:where([dir="rtl"], [dir="rtl"] *) {
1595
+ margin-right: auto;
1596
+ }
1597
+
1414
1598
  .rtl\:univer-rounded-l:where([dir="rtl"], [dir="rtl"] *) {
1415
1599
  border-top-left-radius: .25rem;
1416
1600
  border-bottom-left-radius: .25rem;
@@ -1566,6 +1750,10 @@
1566
1750
  color: var(--univer-gray-300) !important;
1567
1751
  }
1568
1752
 
1753
+ .dark\:hover\:\!univer-text-white:hover:where(.univer-dark, .univer-dark *) {
1754
+ color: var(--univer-white) !important;
1755
+ }
1756
+
1569
1757
  .dark\:focus\:\!univer-bg-gray-600:focus:where(.univer-dark, .univer-dark *) {
1570
1758
  background-color: var(--univer-gray-600) !important;
1571
1759
  }
@@ -1660,6 +1848,22 @@
1660
1848
  background-color: var(--univer-gray-100);
1661
1849
  }
1662
1850
 
1851
+ .\[\&\>div\>span\>span\]\:univer-h-full > div > span > span, .\[\&\>span\>button\]\:univer-h-full > span > button {
1852
+ height: 100%;
1853
+ }
1854
+
1855
+ .\[\&\>span\>span\]\:univer-w-full > span > span {
1856
+ width: 100%;
1857
+ }
1858
+
1859
+ .\[\&\>span\]\:univer-h-full > span {
1860
+ height: 100%;
1861
+ }
1862
+
1863
+ .\[\&\>span\]\:univer-w-full > span {
1864
+ width: 100%;
1865
+ }
1866
+
1663
1867
  .\[\&\>span\]\:univer-truncate > span {
1664
1868
  text-overflow: ellipsis;
1665
1869
  white-space: nowrap;
@@ -1675,6 +1879,16 @@
1675
1879
  font-weight: 500;
1676
1880
  }
1677
1881
 
1882
+ .\[\&\>svg\]\:univer-size-4 > svg {
1883
+ width: 1rem;
1884
+ height: 1rem;
1885
+ }
1886
+
1887
+ .\[\&\>svg\]\:univer-size-8 > svg {
1888
+ width: 2rem;
1889
+ height: 2rem;
1890
+ }
1891
+
1678
1892
  .\[\&\>svg\]\:univer-shrink-0 > svg {
1679
1893
  flex-shrink: 0;
1680
1894
  }
@@ -1797,6 +2011,10 @@
1797
2011
  min-height: 2rem !important;
1798
2012
  }
1799
2013
 
2014
+ .\[\&_\[data-u-command\]\]\:univer-w-full [data-u-command] {
2015
+ width: 100%;
2016
+ }
2017
+
1800
2018
  .\[\&_\[data-u-command\]\]\:\!univer-rounded-md [data-u-command] {
1801
2019
  border-radius: .375rem !important;
1802
2020
  }
@@ -1872,8 +2090,8 @@
1872
2090
  width: 1.75rem;
1873
2091
  }
1874
2092
 
1875
- .\[\&_input\]\:univer-w-\[52px\] input {
1876
- width: 52px;
2093
+ .\[\&_input\]\:univer-w-full input {
2094
+ width: 100%;
1877
2095
  }
1878
2096
 
1879
2097
  .\[\&_input\]\:\!univer-appearance-none input {