@univerjs/ui 1.3.1 → 1.5.0

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 (90) hide show
  1. package/README.md +7 -19
  2. package/lib/cjs/facade.js +15 -26
  3. package/lib/cjs/index.js +973 -707
  4. package/lib/cjs/locale/ar-SA.js +2 -4
  5. package/lib/cjs/locale/ca-ES.js +2 -4
  6. package/lib/cjs/locale/de-DE.js +2 -4
  7. package/lib/cjs/locale/en-US.js +2 -4
  8. package/lib/cjs/locale/es-ES.js +2 -4
  9. package/lib/cjs/locale/fa-IR.js +2 -4
  10. package/lib/cjs/locale/fr-FR.js +2 -4
  11. package/lib/cjs/locale/id-ID.js +2 -4
  12. package/lib/cjs/locale/it-IT.js +2 -4
  13. package/lib/cjs/locale/ja-JP.js +2 -4
  14. package/lib/cjs/locale/ko-KR.js +2 -4
  15. package/lib/cjs/locale/pl-PL.js +2 -4
  16. package/lib/cjs/locale/pt-BR.js +2 -4
  17. package/lib/cjs/locale/ru-RU.js +2 -4
  18. package/lib/cjs/locale/sk-SK.js +2 -4
  19. package/lib/cjs/locale/vi-VN.js +2 -4
  20. package/lib/cjs/locale/zh-CN.js +2 -4
  21. package/lib/cjs/locale/zh-HK.js +2 -4
  22. package/lib/cjs/locale/zh-TW.js +2 -4
  23. package/lib/es/facade.js +15 -25
  24. package/lib/es/index.js +881 -615
  25. package/lib/es/locale/ar-SA.js +2 -4
  26. package/lib/es/locale/ca-ES.js +2 -4
  27. package/lib/es/locale/de-DE.js +2 -4
  28. package/lib/es/locale/en-US.js +2 -4
  29. package/lib/es/locale/es-ES.js +2 -4
  30. package/lib/es/locale/fa-IR.js +2 -4
  31. package/lib/es/locale/fr-FR.js +2 -4
  32. package/lib/es/locale/id-ID.js +2 -4
  33. package/lib/es/locale/it-IT.js +2 -4
  34. package/lib/es/locale/ja-JP.js +2 -4
  35. package/lib/es/locale/ko-KR.js +2 -4
  36. package/lib/es/locale/pl-PL.js +2 -4
  37. package/lib/es/locale/pt-BR.js +2 -4
  38. package/lib/es/locale/ru-RU.js +2 -4
  39. package/lib/es/locale/sk-SK.js +2 -4
  40. package/lib/es/locale/vi-VN.js +2 -4
  41. package/lib/es/locale/zh-CN.js +2 -4
  42. package/lib/es/locale/zh-HK.js +2 -4
  43. package/lib/es/locale/zh-TW.js +2 -4
  44. package/lib/facade.js +15 -25
  45. package/lib/index.css +57 -42
  46. package/lib/index.js +881 -615
  47. package/lib/locale/ar-SA.js +2 -4
  48. package/lib/locale/ca-ES.js +2 -4
  49. package/lib/locale/de-DE.js +2 -4
  50. package/lib/locale/en-US.js +2 -4
  51. package/lib/locale/es-ES.js +2 -4
  52. package/lib/locale/fa-IR.js +2 -4
  53. package/lib/locale/fr-FR.js +2 -4
  54. package/lib/locale/id-ID.js +2 -4
  55. package/lib/locale/it-IT.js +2 -4
  56. package/lib/locale/ja-JP.js +2 -4
  57. package/lib/locale/ko-KR.js +2 -4
  58. package/lib/locale/pl-PL.js +2 -4
  59. package/lib/locale/pt-BR.js +2 -4
  60. package/lib/locale/ru-RU.js +2 -4
  61. package/lib/locale/sk-SK.js +2 -4
  62. package/lib/locale/vi-VN.js +2 -4
  63. package/lib/locale/zh-CN.js +2 -4
  64. package/lib/locale/zh-HK.js +2 -4
  65. package/lib/locale/zh-TW.js +2 -4
  66. package/lib/types/menu/shortcut-panel.menu.d.ts +2 -1
  67. package/lib/types/mobile-plugin.d.ts +1 -1
  68. package/lib/types/plugin.d.ts +1 -1
  69. package/lib/types/services/contextmenu/contextmenu-host.service.d.ts +15 -2
  70. package/lib/types/services/dialog/desktop-dialog.service.d.ts +5 -3
  71. package/lib/types/services/dialog/mobile-dialog.service.d.ts +2 -1
  72. package/lib/types/services/dom/canvas-dom-layer.service.d.ts +4 -0
  73. package/lib/types/services/menu/menu-manager.service.d.ts +2 -0
  74. package/lib/types/services/menu/menu.d.ts +1 -0
  75. package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +5 -2
  76. package/lib/types/utils/di.d.ts +6 -10
  77. package/lib/types/utils/use-menu-host.d.ts +17 -0
  78. package/lib/types/views/components/mobile-drawer/MobileDrawer.d.ts +1 -0
  79. package/lib/types/views/components/popup/RectPopup.d.ts +8 -6
  80. package/lib/types/views/components/ribbon/ToolbarButton.d.ts +3 -5
  81. package/lib/types/views/components/ribbon/TooltipButtonWrapper.d.ts +2 -1
  82. package/lib/types/views/components/ribbon/ribbon-grid-layout.d.ts +2 -0
  83. package/lib/types/views/components/ribbon/ribbon-menu/use-ribbon-tabs.d.ts +18 -0
  84. package/lib/types/views/custom-label/CustomLabel.d.ts +1 -0
  85. package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +2 -2
  86. package/lib/types/views/font-family/FontFamily.d.ts +1 -1
  87. package/lib/types/views/object-permission/ObjectPermissionPanel.d.ts +1 -1
  88. package/lib/umd/facade.js +1 -1
  89. package/lib/umd/index.js +23 -22
  90. package/package.json +13 -13
package/lib/index.css CHANGED
@@ -484,6 +484,10 @@
484
484
  width: 3.5rem !important;
485
485
  }
486
486
 
487
+ .\!univer-w-auto {
488
+ width: auto !important;
489
+ }
490
+
487
491
  .\!univer-w-full {
488
492
  width: 100% !important;
489
493
  }
@@ -532,6 +536,10 @@
532
536
  width: 1.25rem;
533
537
  }
534
538
 
539
+ .univer-w-6 {
540
+ width: 1.5rem;
541
+ }
542
+
535
543
  .univer-w-60 {
536
544
  width: 15rem;
537
545
  }
@@ -604,6 +612,10 @@
604
612
  min-width: 16rem;
605
613
  }
606
614
 
615
+ .univer-min-w-7 {
616
+ min-width: 1.75rem;
617
+ }
618
+
607
619
  .univer-min-w-\[60px\] {
608
620
  min-width: 60px;
609
621
  }
@@ -656,6 +668,10 @@
656
668
  flex: 1;
657
669
  }
658
670
 
671
+ .univer-flex-initial {
672
+ flex: 0 auto;
673
+ }
674
+
659
675
  .univer-flex-shrink-0, .univer-shrink-0 {
660
676
  flex-shrink: 0;
661
677
  }
@@ -821,8 +837,8 @@
821
837
  grid-template-rows: auto 1fr auto;
822
838
  }
823
839
 
824
- .univer-grid-rows-\[repeat\(2\,1\.5rem\)\] {
825
- grid-template-rows: repeat(2, 1.5rem);
840
+ .univer-grid-rows-\[repeat\(2\,1\.75rem\)\] {
841
+ grid-template-rows: repeat(2, 1.75rem);
826
842
  }
827
843
 
828
844
  .univer-flex-row {
@@ -917,6 +933,10 @@
917
933
  gap: 1.5rem;
918
934
  }
919
935
 
936
+ .univer-gap-y-0 {
937
+ row-gap: 0;
938
+ }
939
+
920
940
  .univer-overflow-auto {
921
941
  overflow: auto;
922
942
  }
@@ -1373,8 +1393,8 @@
1373
1393
  padding-right: .5rem;
1374
1394
  }
1375
1395
 
1376
- .univer-pr-5 {
1377
- padding-right: 1.25rem;
1396
+ .univer-pr-6 {
1397
+ padding-right: 1.5rem;
1378
1398
  }
1379
1399
 
1380
1400
  .univer-pt-1 {
@@ -1389,6 +1409,10 @@
1389
1409
  padding-top: .75rem;
1390
1410
  }
1391
1411
 
1412
+ .univer-pt-4 {
1413
+ padding-top: 1rem;
1414
+ }
1415
+
1392
1416
  .univer-text-left {
1393
1417
  text-align: left;
1394
1418
  }
@@ -1700,10 +1724,6 @@
1700
1724
  animation-fill-mode: backwards;
1701
1725
  }
1702
1726
 
1703
- .univer-context-menu-hover-suppressed button:hover:not(:focus) {
1704
- background-color: #0000 !important;
1705
- }
1706
-
1707
1727
  .last\:univer-border-b-0:last-child {
1708
1728
  border-bottom-width: 0;
1709
1729
  }
@@ -1712,6 +1732,21 @@
1712
1732
  display: none;
1713
1733
  }
1714
1734
 
1735
+ .focus-within\:univer-ring-2:focus-within {
1736
+ --univer-tw-ring-offset-shadow: var(--univer-tw-ring-inset) 0 0 0 var(--univer-tw-ring-offset-width) var(--univer-tw-ring-offset-color);
1737
+ --univer-tw-ring-shadow: var(--univer-tw-ring-inset) 0 0 0 calc(2px + var(--univer-tw-ring-offset-width)) var(--univer-tw-ring-color);
1738
+ box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), 0 0 #0000;
1739
+ box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), var(--univer-tw-shadow, 0 0 #0000);
1740
+ }
1741
+
1742
+ .focus-within\:univer-ring-inset:focus-within {
1743
+ --univer-tw-ring-inset: inset;
1744
+ }
1745
+
1746
+ .focus-within\:univer-ring-primary-600:focus-within {
1747
+ --univer-tw-ring-color: var(--univer-primary-600);
1748
+ }
1749
+
1715
1750
  @media (hover: hover) and (pointer: fine) {
1716
1751
  .univer-group\/hover-track:hover .group-hover\/hover-track\:univer-opacity-100 {
1717
1752
  opacity: 1;
@@ -1937,6 +1972,10 @@
1937
1972
  margin-right: auto;
1938
1973
  }
1939
1974
 
1975
+ .rtl\:univer-divide-x-reverse:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) {
1976
+ --univer-tw-divide-x-reverse: 1;
1977
+ }
1978
+
1940
1979
  .rtl\:univer-rounded-l:where([dir="rtl"], [dir="rtl"] *) {
1941
1980
  border-top-left-radius: .25rem;
1942
1981
  border-bottom-left-radius: .25rem;
@@ -1965,8 +2004,8 @@
1965
2004
  padding-left: .375rem;
1966
2005
  }
1967
2006
 
1968
- .rtl\:univer-pl-5:where([dir="rtl"], [dir="rtl"] *) {
1969
- padding-left: 1.25rem;
2007
+ .rtl\:univer-pl-6:where([dir="rtl"], [dir="rtl"] *) {
2008
+ padding-left: 1.5rem;
1970
2009
  }
1971
2010
 
1972
2011
  .rtl\:univer-pr-0:where([dir="rtl"], [dir="rtl"] *) {
@@ -1977,6 +2016,10 @@
1977
2016
  padding-right: .5rem;
1978
2017
  }
1979
2018
 
2019
+ .rtl\:\!univer-text-right:where([dir="rtl"], [dir="rtl"] *) {
2020
+ text-align: right !important;
2021
+ }
2022
+
1980
2023
  .dark\:\!univer-border-gray-600:where(.univer-dark, .univer-dark *) {
1981
2024
  border-color: var(--univer-gray-600) !important;
1982
2025
  }
@@ -2118,10 +2161,6 @@
2118
2161
  }
2119
2162
  }
2120
2163
 
2121
- .dark\:focus\:\!univer-bg-gray-600:focus:where(.univer-dark, .univer-dark *) {
2122
- background-color: var(--univer-gray-600) !important;
2123
- }
2124
-
2125
2164
  .dark\:focus\:\!univer-bg-gray-900:focus:where(.univer-dark, .univer-dark *) {
2126
2165
  background-color: var(--univer-gray-900) !important;
2127
2166
  }
@@ -2483,22 +2522,18 @@
2483
2522
  opacity: .7 !important;
2484
2523
  }
2485
2524
 
2486
- .\[\&_button\]\:\!univer-m-0 button {
2487
- margin: 0 !important;
2525
+ .\[\&_button\:hover\:not\(\:focus\)\]\:\!univer-bg-transparent button:hover:not(:focus) {
2526
+ background-color: #0000 !important;
2488
2527
  }
2489
2528
 
2490
- .\[\&_button\]\:\!univer-h-12 button {
2491
- height: 3rem !important;
2529
+ .\[\&_button\]\:\!univer-m-0 button {
2530
+ margin: 0 !important;
2492
2531
  }
2493
2532
 
2494
2533
  .\[\&_button\]\:\!univer-h-8 button {
2495
2534
  height: 2rem !important;
2496
2535
  }
2497
2536
 
2498
- .\[\&_button\]\:\!univer-min-h-10 button {
2499
- min-height: 2.5rem !important;
2500
- }
2501
-
2502
2537
  .\[\&_button\]\:\!univer-w-full button {
2503
2538
  width: 100% !important;
2504
2539
  }
@@ -2561,11 +2596,6 @@
2561
2596
  padding-right: 1rem !important;
2562
2597
  }
2563
2598
 
2564
- .\[\&_button\]\:\!univer-text-base button {
2565
- font-size: 1rem !important;
2566
- line-height: 1.5rem !important;
2567
- }
2568
-
2569
2599
  .\[\&_button\]\:\!univer-leading-none button {
2570
2600
  line-height: 1 !important;
2571
2601
  }
@@ -2640,11 +2670,6 @@
2640
2670
  text-align: center;
2641
2671
  }
2642
2672
 
2643
- .\[\&_input\]\:\!univer-text-base input {
2644
- font-size: 1rem !important;
2645
- line-height: 1.5rem !important;
2646
- }
2647
-
2648
2673
  .\[\&_input\]\:univer-text-sm input {
2649
2674
  font-size: .875rem;
2650
2675
  line-height: 1.25rem;
@@ -2672,11 +2697,6 @@
2672
2697
  outline: 2px solid #0000 !important;
2673
2698
  }
2674
2699
 
2675
- .\[\&_select\]\:\!univer-text-base select {
2676
- font-size: 1rem !important;
2677
- line-height: 1.5rem !important;
2678
- }
2679
-
2680
2700
  .\[\&_svg\]\:univer-size-5 svg {
2681
2701
  width: 1.25rem;
2682
2702
  height: 1.25rem;
@@ -2685,8 +2705,3 @@
2685
2705
  .\[\&_svg\]\:univer-shrink-0 svg {
2686
2706
  flex-shrink: 0;
2687
2707
  }
2688
-
2689
- .\[\&_textarea\]\:\!univer-text-base textarea {
2690
- font-size: 1rem !important;
2691
- line-height: 1.5rem !important;
2692
- }