@univerjs/ui 1.1.0 → 1.3.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 (92) hide show
  1. package/lib/cjs/index.js +912 -618
  2. package/lib/cjs/locale/ar-SA.js +16 -1
  3. package/lib/cjs/locale/ca-ES.js +16 -1
  4. package/lib/cjs/locale/de-DE.js +16 -1
  5. package/lib/cjs/locale/en-US.js +16 -1
  6. package/lib/cjs/locale/es-ES.js +16 -1
  7. package/lib/cjs/locale/fa-IR.js +16 -1
  8. package/lib/cjs/locale/fr-FR.js +16 -1
  9. package/lib/cjs/locale/id-ID.js +16 -1
  10. package/lib/cjs/locale/it-IT.js +16 -1
  11. package/lib/cjs/locale/ja-JP.js +16 -1
  12. package/lib/cjs/locale/ko-KR.js +16 -1
  13. package/lib/cjs/locale/pl-PL.js +16 -1
  14. package/lib/cjs/locale/pt-BR.js +16 -1
  15. package/lib/cjs/locale/ru-RU.js +16 -1
  16. package/lib/cjs/locale/sk-SK.js +16 -1
  17. package/lib/cjs/locale/vi-VN.js +16 -1
  18. package/lib/cjs/locale/zh-CN.js +16 -1
  19. package/lib/cjs/locale/zh-HK.js +16 -1
  20. package/lib/cjs/locale/zh-TW.js +16 -1
  21. package/lib/es/index.js +912 -619
  22. package/lib/es/locale/ar-SA.js +16 -1
  23. package/lib/es/locale/ca-ES.js +16 -1
  24. package/lib/es/locale/de-DE.js +16 -1
  25. package/lib/es/locale/en-US.js +16 -1
  26. package/lib/es/locale/es-ES.js +16 -1
  27. package/lib/es/locale/fa-IR.js +16 -1
  28. package/lib/es/locale/fr-FR.js +16 -1
  29. package/lib/es/locale/id-ID.js +16 -1
  30. package/lib/es/locale/it-IT.js +16 -1
  31. package/lib/es/locale/ja-JP.js +16 -1
  32. package/lib/es/locale/ko-KR.js +16 -1
  33. package/lib/es/locale/pl-PL.js +16 -1
  34. package/lib/es/locale/pt-BR.js +16 -1
  35. package/lib/es/locale/ru-RU.js +16 -1
  36. package/lib/es/locale/sk-SK.js +16 -1
  37. package/lib/es/locale/vi-VN.js +16 -1
  38. package/lib/es/locale/zh-CN.js +16 -1
  39. package/lib/es/locale/zh-HK.js +16 -1
  40. package/lib/es/locale/zh-TW.js +16 -1
  41. package/lib/index.css +126 -31
  42. package/lib/index.js +912 -619
  43. package/lib/locale/ar-SA.js +16 -1
  44. package/lib/locale/ca-ES.js +16 -1
  45. package/lib/locale/de-DE.js +16 -1
  46. package/lib/locale/en-US.js +16 -1
  47. package/lib/locale/es-ES.js +16 -1
  48. package/lib/locale/fa-IR.js +16 -1
  49. package/lib/locale/fr-FR.js +16 -1
  50. package/lib/locale/id-ID.js +16 -1
  51. package/lib/locale/it-IT.js +16 -1
  52. package/lib/locale/ja-JP.js +16 -1
  53. package/lib/locale/ko-KR.js +16 -1
  54. package/lib/locale/pl-PL.js +16 -1
  55. package/lib/locale/pt-BR.js +16 -1
  56. package/lib/locale/ru-RU.js +16 -1
  57. package/lib/locale/sk-SK.js +16 -1
  58. package/lib/locale/vi-VN.js +16 -1
  59. package/lib/locale/zh-CN.js +16 -1
  60. package/lib/locale/zh-HK.js +16 -1
  61. package/lib/locale/zh-TW.js +16 -1
  62. package/lib/types/facade/f-univer.d.ts +5 -3
  63. package/lib/types/index.d.ts +1 -1
  64. package/lib/types/locale/en-US.d.ts +15 -0
  65. package/lib/types/services/font.service.d.ts +9 -2
  66. package/lib/types/services/menu/menu-manager.service.d.ts +1 -1
  67. package/lib/types/views/components/ribbon/RibbonOverflow.d.ts +22 -0
  68. package/lib/types/views/components/ribbon/ToolbarItem.d.ts +1 -0
  69. package/lib/types/views/components/ribbon/hook.d.ts +2 -2
  70. package/lib/types/views/emoji-picker/EmojiPicker.d.ts +1 -1
  71. package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +1 -1
  72. package/lib/umd/index.js +19 -19
  73. package/lib/umd/locale/ar-SA.js +1 -1
  74. package/lib/umd/locale/ca-ES.js +1 -1
  75. package/lib/umd/locale/de-DE.js +1 -1
  76. package/lib/umd/locale/en-US.js +1 -1
  77. package/lib/umd/locale/es-ES.js +1 -1
  78. package/lib/umd/locale/fa-IR.js +1 -1
  79. package/lib/umd/locale/fr-FR.js +1 -1
  80. package/lib/umd/locale/id-ID.js +1 -1
  81. package/lib/umd/locale/it-IT.js +1 -1
  82. package/lib/umd/locale/ja-JP.js +1 -1
  83. package/lib/umd/locale/ko-KR.js +1 -1
  84. package/lib/umd/locale/pl-PL.js +1 -1
  85. package/lib/umd/locale/pt-BR.js +1 -1
  86. package/lib/umd/locale/ru-RU.js +1 -1
  87. package/lib/umd/locale/sk-SK.js +1 -1
  88. package/lib/umd/locale/vi-VN.js +1 -1
  89. package/lib/umd/locale/zh-CN.js +1 -1
  90. package/lib/umd/locale/zh-HK.js +1 -1
  91. package/lib/umd/locale/zh-TW.js +1 -1
  92. package/package.json +8 -8
package/lib/index.css CHANGED
@@ -206,6 +206,10 @@
206
206
  margin-bottom: 0;
207
207
  }
208
208
 
209
+ .univer-mb-1 {
210
+ margin-bottom: .25rem;
211
+ }
212
+
209
213
  .univer-ml-2 {
210
214
  margin-left: .5rem;
211
215
  }
@@ -288,11 +292,6 @@
288
292
  height: 1rem !important;
289
293
  }
290
294
 
291
- .univer-size-1\.5 {
292
- width: .375rem;
293
- height: .375rem;
294
- }
295
-
296
295
  .univer-size-10 {
297
296
  width: 2.5rem;
298
297
  height: 2.5rem;
@@ -353,6 +352,14 @@
353
352
  height: 100%;
354
353
  }
355
354
 
355
+ .\!univer-h-14 {
356
+ height: 3.5rem !important;
357
+ }
358
+
359
+ .\!univer-h-auto {
360
+ height: auto !important;
361
+ }
362
+
356
363
  .univer-h-0 {
357
364
  height: 0;
358
365
  }
@@ -389,6 +396,10 @@
389
396
  height: .5rem;
390
397
  }
391
398
 
399
+ .univer-h-3 {
400
+ height: .75rem;
401
+ }
402
+
392
403
  .univer-h-4 {
393
404
  height: 1rem;
394
405
  }
@@ -421,6 +432,10 @@
421
432
  height: 340px;
422
433
  }
423
434
 
435
+ .univer-h-\[73px\] {
436
+ height: 73px;
437
+ }
438
+
424
439
  .univer-h-full {
425
440
  height: 100%;
426
441
  }
@@ -449,6 +464,10 @@
449
464
  min-height: 5rem;
450
465
  }
451
466
 
467
+ .univer-min-h-7 {
468
+ min-height: 1.75rem;
469
+ }
470
+
452
471
  .univer-min-h-8 {
453
472
  min-height: 2rem;
454
473
  }
@@ -461,6 +480,10 @@
461
480
  min-height: 100%;
462
481
  }
463
482
 
483
+ .\!univer-w-14 {
484
+ width: 3.5rem !important;
485
+ }
486
+
464
487
  .\!univer-w-full {
465
488
  width: 100% !important;
466
489
  }
@@ -521,6 +544,10 @@
521
544
  width: 2rem;
522
545
  }
523
546
 
547
+ .univer-w-80 {
548
+ width: 20rem;
549
+ }
550
+
524
551
  .univer-w-9 {
525
552
  width: 2.25rem;
526
553
  }
@@ -605,6 +632,10 @@
605
632
  max-width: 32%;
606
633
  }
607
634
 
635
+ .univer-max-w-\[50\%\] {
636
+ max-width: 50%;
637
+ }
638
+
608
639
  .univer-max-w-\[560px\] {
609
640
  max-width: 560px;
610
641
  }
@@ -924,6 +955,10 @@
924
955
  overflow: hidden;
925
956
  }
926
957
 
958
+ .univer-whitespace-normal {
959
+ white-space: normal;
960
+ }
961
+
927
962
  .univer-whitespace-nowrap {
928
963
  white-space: nowrap;
929
964
  }
@@ -1118,14 +1153,14 @@
1118
1153
  background-color: var(--univer-gray-300);
1119
1154
  }
1120
1155
 
1121
- .univer-bg-gray-400 {
1122
- background-color: var(--univer-gray-400);
1123
- }
1124
-
1125
1156
  .univer-bg-gray-50 {
1126
1157
  background-color: var(--univer-gray-50);
1127
1158
  }
1128
1159
 
1160
+ .univer-bg-gray-600 {
1161
+ background-color: var(--univer-gray-600);
1162
+ }
1163
+
1129
1164
  .univer-bg-gray-700 {
1130
1165
  background-color: var(--univer-gray-700);
1131
1166
  }
@@ -1138,6 +1173,10 @@
1138
1173
  background-color: var(--univer-primary-50);
1139
1174
  }
1140
1175
 
1176
+ .univer-bg-primary-500 {
1177
+ background-color: var(--univer-primary-500);
1178
+ }
1179
+
1141
1180
  .univer-bg-primary-600 {
1142
1181
  background-color: var(--univer-primary-600);
1143
1182
  }
@@ -1362,6 +1401,10 @@
1362
1401
  text-align: right;
1363
1402
  }
1364
1403
 
1404
+ .univer-text-start {
1405
+ text-align: left;
1406
+ }
1407
+
1365
1408
  .univer-font-sans {
1366
1409
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
1367
1410
  }
@@ -1464,6 +1507,10 @@
1464
1507
  color: var(--univer-gray-900);
1465
1508
  }
1466
1509
 
1510
+ .univer-text-inherit {
1511
+ color: inherit;
1512
+ }
1513
+
1467
1514
  .univer-text-primary-500 {
1468
1515
  color: var(--univer-primary-500);
1469
1516
  }
@@ -1476,11 +1523,6 @@
1476
1523
  color: var(--univer-primary-700);
1477
1524
  }
1478
1525
 
1479
- .univer-text-slate-200 {
1480
- --univer-tw-text-opacity: 1;
1481
- color: rgba(226, 232, 240, var(--univer-tw-text-opacity, 1));
1482
- }
1483
-
1484
1526
  .univer-underline {
1485
1527
  text-decoration-line: underline;
1486
1528
  }
@@ -1554,15 +1596,16 @@
1554
1596
  backdrop-filter: var(--univer-tw-backdrop-blur) var(--univer-tw-backdrop-brightness) var(--univer-tw-backdrop-contrast) var(--univer-tw-backdrop-grayscale) var(--univer-tw-backdrop-hue-rotate) var(--univer-tw-backdrop-invert) var(--univer-tw-backdrop-opacity) var(--univer-tw-backdrop-saturate) var(--univer-tw-backdrop-sepia);
1555
1597
  }
1556
1598
 
1557
- .univer-backdrop-blur-xl {
1558
- --univer-tw-backdrop-blur: blur(24px);
1559
- backdrop-filter: var(--univer-tw-backdrop-blur) var(--univer-tw-backdrop-brightness) var(--univer-tw-backdrop-contrast) var(--univer-tw-backdrop-grayscale) var(--univer-tw-backdrop-hue-rotate) var(--univer-tw-backdrop-invert) var(--univer-tw-backdrop-opacity) var(--univer-tw-backdrop-saturate) var(--univer-tw-backdrop-sepia);
1560
- }
1561
-
1562
1599
  .\!univer-transition-none {
1563
1600
  transition-property: none !important;
1564
1601
  }
1565
1602
 
1603
+ .univer-transition {
1604
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
1605
+ transition-duration: .15s;
1606
+ transition-timing-function: cubic-bezier(.4, 0, .2, 1);
1607
+ }
1608
+
1566
1609
  .univer-transition-\[height\] {
1567
1610
  transition-property: height;
1568
1611
  transition-duration: .15s;
@@ -1683,6 +1726,14 @@
1683
1726
  opacity: .4;
1684
1727
  }
1685
1728
 
1729
+ .data-\[state\=open\]\:univer-bg-primary-50[data-state="open"] {
1730
+ background-color: var(--univer-primary-50);
1731
+ }
1732
+
1733
+ .data-\[state\=open\]\:univer-text-primary-600[data-state="open"] {
1734
+ color: var(--univer-primary-600);
1735
+ }
1736
+
1686
1737
  @media (hover: hover) and (pointer: fine) {
1687
1738
  .hover\:univer-border-primary-600:hover {
1688
1739
  border-color: var(--univer-primary-600);
@@ -1704,6 +1755,10 @@
1704
1755
  background-color: var(--univer-gray-50);
1705
1756
  }
1706
1757
 
1758
+ .hover\:univer-bg-primary-500:hover {
1759
+ background-color: var(--univer-primary-500);
1760
+ }
1761
+
1707
1762
  .hover\:univer-bg-transparent:hover {
1708
1763
  background-color: #0000;
1709
1764
  }
@@ -1728,14 +1783,14 @@
1728
1783
  }
1729
1784
  }
1730
1785
 
1731
- .focus\:univer-bg-gray-0:focus {
1732
- background-color: var(--univer-gray-0);
1733
- }
1734
-
1735
1786
  .focus\:univer-bg-gray-50:focus {
1736
1787
  background-color: var(--univer-gray-50);
1737
1788
  }
1738
1789
 
1790
+ .focus\:univer-bg-transparent:focus {
1791
+ background-color: #0000;
1792
+ }
1793
+
1739
1794
  .focus\:univer-outline-none:focus {
1740
1795
  outline-offset: 2px;
1741
1796
  outline: 2px solid #0000;
@@ -1748,6 +1803,10 @@
1748
1803
  box-shadow: var(--univer-tw-ring-offset-shadow), var(--univer-tw-ring-shadow), var(--univer-tw-shadow, 0 0 #0000);
1749
1804
  }
1750
1805
 
1806
+ .focus\:univer-ring-primary-500:focus {
1807
+ --univer-tw-ring-color: var(--univer-primary-500);
1808
+ }
1809
+
1751
1810
  .focus-visible\:univer-outline-none:focus-visible {
1752
1811
  outline-offset: 2px;
1753
1812
  outline: 2px solid #0000;
@@ -1795,6 +1854,10 @@
1795
1854
  background-color: var(--univer-gray-200);
1796
1855
  }
1797
1856
 
1857
+ .active\:univer-bg-primary-500:active {
1858
+ background-color: var(--univer-primary-500);
1859
+ }
1860
+
1798
1861
  .enabled\:active\:univer-scale-\[0\.98\]:active:enabled {
1799
1862
  --univer-tw-scale-x: .98;
1800
1863
  --univer-tw-scale-y: .98;
@@ -1894,6 +1957,10 @@
1894
1957
  border-bottom-right-radius: 0;
1895
1958
  }
1896
1959
 
1960
+ .rtl\:univer-pl-0:where([dir="rtl"], [dir="rtl"] *) {
1961
+ padding-left: 0;
1962
+ }
1963
+
1897
1964
  .rtl\:univer-pl-1\.5:where([dir="rtl"], [dir="rtl"] *) {
1898
1965
  padding-left: .375rem;
1899
1966
  }
@@ -1918,12 +1985,16 @@
1918
1985
  border-color: var(--univer-gray-700) !important;
1919
1986
  }
1920
1987
 
1921
- .dark\:\!univer-bg-gray-200:where(.univer-dark, .univer-dark *) {
1922
- background-color: var(--univer-gray-200) !important;
1988
+ .dark\:\!univer-border-gray-800:where(.univer-dark, .univer-dark *) {
1989
+ border-color: var(--univer-gray-800) !important;
1923
1990
  }
1924
1991
 
1925
- .dark\:\!univer-bg-gray-300:where(.univer-dark, .univer-dark *) {
1926
- background-color: var(--univer-gray-300) !important;
1992
+ .dark\:\!univer-bg-gray-100:where(.univer-dark, .univer-dark *) {
1993
+ background-color: var(--univer-gray-100) !important;
1994
+ }
1995
+
1996
+ .dark\:\!univer-bg-gray-200:where(.univer-dark, .univer-dark *) {
1997
+ background-color: var(--univer-gray-200) !important;
1927
1998
  }
1928
1999
 
1929
2000
  .dark\:\!univer-bg-gray-500:where(.univer-dark, .univer-dark *) {
@@ -2009,6 +2080,14 @@
2009
2080
  box-shadow: var(--univer-tw-ring-offset-shadow, 0 0 #0000), var(--univer-tw-ring-shadow, 0 0 #0000), var(--univer-tw-shadow) !important;
2010
2081
  }
2011
2082
 
2083
+ .dark\:data-\[state\=open\]\:\!univer-bg-gray-700[data-state="open"]:where(.univer-dark, .univer-dark *) {
2084
+ background-color: var(--univer-gray-700) !important;
2085
+ }
2086
+
2087
+ .dark\:data-\[state\=open\]\:\!univer-text-primary-300[data-state="open"]:where(.univer-dark, .univer-dark *) {
2088
+ color: var(--univer-primary-300) !important;
2089
+ }
2090
+
2012
2091
  @media (hover: hover) and (pointer: fine) {
2013
2092
  .dark\:hover\:\!univer-bg-gray-600:hover:where(.univer-dark, .univer-dark *) {
2014
2093
  background-color: var(--univer-gray-600) !important;
@@ -2043,14 +2122,18 @@
2043
2122
  background-color: var(--univer-gray-600) !important;
2044
2123
  }
2045
2124
 
2046
- .dark\:focus\:\!univer-bg-gray-800:focus:where(.univer-dark, .univer-dark *) {
2047
- background-color: var(--univer-gray-800) !important;
2048
- }
2049
-
2050
2125
  .dark\:focus\:\!univer-bg-gray-900:focus:where(.univer-dark, .univer-dark *) {
2051
2126
  background-color: var(--univer-gray-900) !important;
2052
2127
  }
2053
2128
 
2129
+ .dark\:focus\:\!univer-bg-transparent:focus:where(.univer-dark, .univer-dark *) {
2130
+ background-color: #0000 !important;
2131
+ }
2132
+
2133
+ .dark\:focus\:\!univer-ring-primary-300:focus:where(.univer-dark, .univer-dark *) {
2134
+ --univer-tw-ring-color: var(--univer-primary-300) !important;
2135
+ }
2136
+
2054
2137
  .dark\:active\:\!univer-bg-gray-600:active:where(.univer-dark, .univer-dark *) {
2055
2138
  background-color: var(--univer-gray-600) !important;
2056
2139
  }
@@ -2219,12 +2302,20 @@
2219
2302
  width: 100%;
2220
2303
  }
2221
2304
 
2305
+ .\[\&\>span\]\:univer-min-w-0 > span {
2306
+ min-width: 0;
2307
+ }
2308
+
2222
2309
  .\[\&\>span\]\:univer-truncate > span {
2223
2310
  text-overflow: ellipsis;
2224
2311
  white-space: nowrap;
2225
2312
  overflow: hidden;
2226
2313
  }
2227
2314
 
2315
+ .\[\&\>span\]\:univer-whitespace-normal > span {
2316
+ white-space: normal;
2317
+ }
2318
+
2228
2319
  .\[\&\>span\]\:univer-text-base > span {
2229
2320
  font-size: 1rem;
2230
2321
  line-height: 1.5rem;
@@ -2484,6 +2575,10 @@
2484
2575
  outline: 2px solid #0000 !important;
2485
2576
  }
2486
2577
 
2578
+ .\[\&_button\]\:\!\[font-family\:inherit\] button {
2579
+ font-family: inherit !important;
2580
+ }
2581
+
2487
2582
  .\[\&_button_svg\]\:\!univer-size-5 button svg {
2488
2583
  width: 1.25rem !important;
2489
2584
  height: 1.25rem !important;