@fileverse-dev/fortune-react 1.0.2-mod-24 → 1.0.2-mod-25-patch-1

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.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  export declare function useDialog(): {
3
- showDialog: (content: string | React.ReactNode, type?: "ok" | "yesno", onOk?: () => void, onCancel?: () => void) => void;
3
+ showDialog: (content: string | React.ReactNode, type?: "ok" | "yesno", title?: string | React.ReactNode, onOk?: () => void, onCancel?: () => void) => void;
4
4
  hideDialog: () => void;
5
5
  };
package/dist/index.css CHANGED
@@ -1758,14 +1758,11 @@ html::-webkit-scrollbar-button {
1758
1758
  }
1759
1759
 
1760
1760
  #range-dialog {
1761
- box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
1761
+ box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
1762
1762
  background: #fff;
1763
- background-clip: padding-box;
1764
- border: 1px solid rgba(0, 0, 0, 0.333);
1763
+ border: 1px solid hsl(var(--color-border-default));
1765
1764
  outline: 0;
1766
1765
  position: absolute;
1767
- color: #000;
1768
- padding: 30px 42px;
1769
1766
  z-index: 100003;
1770
1767
  left: 50%;
1771
1768
  top: 50%;
@@ -1831,34 +1828,41 @@ html::-webkit-scrollbar-button {
1831
1828
 
1832
1829
  .condition-format-sub-menu {
1833
1830
  position: absolute;
1834
- top: -8px;
1835
- box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
1831
+ top: -12px;
1832
+ box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
1836
1833
  background: #fff;
1837
- border: 1px solid rgba(0, 0, 0, 0.2);
1834
+ border: 1px solid hsl(var(--color-border-default));
1835
+ border-radius: 8px;
1838
1836
  cursor: default;
1839
- font-size: 12px;
1837
+ font-size: 14px;
1840
1838
  z-index: 1004;
1841
1839
  box-sizing: border-box;
1842
1840
  -webkit-user-select: none;
1843
1841
  -moz-user-select: none;
1844
1842
  user-select: none;
1845
1843
  outline: none;
1844
+ padding: 8px;
1845
+ min-width: 190px;
1846
1846
  }
1847
1847
 
1848
1848
  .condition-format-item {
1849
1849
  display: flex;
1850
1850
  justify-content: space-between;
1851
- padding: 6px 18px;
1851
+ padding: 8px;
1852
1852
  z-index: 1005;
1853
+ border-radius: 4px;
1854
+ cursor: pointer;
1853
1855
  }
1854
1856
 
1855
1857
  .condition-format-item:hover {
1856
- background: #efefef;
1858
+ background: hsl(var(--color-bg-default-hover));
1859
+ transition: all 0.2s ease-in-out;
1857
1860
  }
1858
1861
 
1859
1862
  .condition-format-item span {
1860
- font-size: 10px;
1861
- color: #afafaf;
1863
+ font-size: 14px;
1864
+ color: hsl(var(--color-text-secondary));
1865
+ font-weight: 400;
1862
1866
  }
1863
1867
 
1864
1868
  .horizontal-line {
@@ -1900,8 +1904,11 @@ html::-webkit-scrollbar-button {
1900
1904
  }
1901
1905
 
1902
1906
  .condition-rules {
1903
- padding: 0px 42px 34px 42px;
1904
- font-size: 12px;
1907
+ /* padding: 0px 42px 34px 42px; */
1908
+ font-size: 14px;
1909
+ display: flex;
1910
+ flex-direction: column;
1911
+ gap: 16px;
1905
1912
  }
1906
1913
 
1907
1914
  .condition-rules-title {
@@ -1911,9 +1918,8 @@ html::-webkit-scrollbar-button {
1911
1918
  margin-bottom: 18px;
1912
1919
  }
1913
1920
 
1914
- .conditin-rules-value {
1915
- margin: 5px 0;
1916
- font-weight: 600;
1921
+ .condition-rules-value {
1922
+ margin-bottom: 4px;
1917
1923
  }
1918
1924
 
1919
1925
  .condition-rules-inpbox {
@@ -1943,40 +1949,45 @@ html::-webkit-scrollbar-button {
1943
1949
  }
1944
1950
 
1945
1951
  .condition-rules-setbox {
1946
- border: 1px solid #d4d4d4;
1952
+ display: flex;
1953
+ flex-direction: column;
1954
+ gap: 8px;
1947
1955
  }
1948
1956
 
1949
1957
  .condition-rules-set {
1950
- padding: 5px 10px;
1958
+ width: 100%;
1959
+ display: flex;
1960
+ align-items: center;
1961
+ gap: 8px;
1951
1962
  }
1952
1963
 
1953
1964
  .condition-rules-color {
1954
- height: 30px;
1955
- line-height: 30px;
1956
- position: relative;
1965
+ display: flex;
1966
+ align-items: center;
1967
+ gap: 8px;
1957
1968
  }
1958
1969
 
1959
1970
  .condition-rules-check {
1960
- float: left;
1961
- margin-top: 10px;
1971
+ /* float: left; */
1972
+ /* margin-top: 10px; */
1962
1973
  }
1963
1974
 
1964
1975
  .condition-rules-label {
1965
1976
  display: inline-block;
1966
- width: 80px;
1977
+ width: 70px;
1967
1978
  -webkit-user-select: none;
1968
1979
  -moz-user-select: none;
1969
1980
  user-select: none;
1970
1981
  }
1971
1982
 
1972
1983
  .condition-rules-select-color {
1973
- padding: 2px;
1974
- border: solid 1px #e5e5e5;
1975
- background: #f5f5f5;
1976
- position: absolute;
1977
- top: 50%;
1978
- left: 50%;
1979
- transform: translate(20%, -50%);
1984
+ background: hsl(var(--color-bg-default));
1985
+ width: 2.5rem;
1986
+ height: 1.5rem;
1987
+ border-radius: 4px;
1988
+ padding: 0;
1989
+ margin: 0;
1990
+ cursor: pointer;
1980
1991
  }
1981
1992
 
1982
1993
  .condition-rules-between-box {
@@ -2000,23 +2011,37 @@ html::-webkit-scrollbar-button {
2000
2011
  }
2001
2012
 
2002
2013
  .condition-rules-date {
2003
- width: 98%;
2004
- border: none;
2005
- line-height: 26px;
2014
+ width: 100%;
2006
2015
  }
2007
2016
 
2008
2017
  .condition-rules-select {
2009
- width: 150px;
2010
- height: 30px;
2018
+ width: 100%;
2019
+ z-index: 999999;
2011
2020
  }
2012
2021
 
2013
2022
  .condition-rules-project-box {
2014
2023
  display: flex;
2015
2024
  align-items: center;
2025
+ gap: 8px;
2016
2026
  }
2017
2027
 
2018
2028
  .condition-rules-project-input {
2019
- margin: 0px 6px;
2029
+ margin: 0px;
2030
+ width: -moz-fit-content;
2031
+ width: fit-content;
2032
+ max-width: 55px !important;
2033
+ }
2034
+
2035
+ /* Hide arrows for Chrome, Safari, Edge */
2036
+ input[type="number"].condition-rules-project-input::-webkit-outer-spin-button,
2037
+ input[type="number"].condition-rules-project-input::-webkit-inner-spin-button {
2038
+ -webkit-appearance: none;
2039
+ margin: 0;
2040
+ }
2041
+
2042
+ /* Hide arrows for Firefox */
2043
+ input[type="number"].condition-rules-project-input {
2044
+ -moz-appearance: textfield;
2020
2045
  }
2021
2046
 
2022
2047
  .fortune-toolbar {
@@ -2048,7 +2073,7 @@ html::-webkit-scrollbar-button {
2048
2073
  .fortune-toolbar-menu-divider {
2049
2074
  width: "100%";
2050
2075
  height: 1px;
2051
- margin: 2px 6px;
2076
+ margin: 8px 0px;
2052
2077
  background-color: #e0e0e0;
2053
2078
  }
2054
2079
 
@@ -2114,14 +2139,14 @@ html::-webkit-scrollbar-button {
2114
2139
  .fortune-toolbar-select,
2115
2140
  .fortune-toolbar-color-picker {
2116
2141
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
2117
- padding: 10px;
2118
- border-radius: 6px;
2142
+ padding: 0.5rem;
2143
+ border: 1px solid hsl(var(--color-border-default));
2144
+ border-radius: 8px;
2119
2145
  background: white;
2146
+ min-width: 240px;
2120
2147
  }
2121
2148
 
2122
2149
  .fortune-toolbar-select {
2123
- padding-left: 0;
2124
- padding-right: 0;
2125
2150
  overflow: auto;
2126
2151
  max-height: 75vh;
2127
2152
  }
@@ -2133,7 +2158,7 @@ html::-webkit-scrollbar-button {
2133
2158
  .fortune-toolbar-select-option {
2134
2159
  font-size: 12px;
2135
2160
  min-width: 60px;
2136
- padding: 8px 12px;
2161
+ padding: 8px;
2137
2162
  cursor: pointer;
2138
2163
  -webkit-user-select: none;
2139
2164
  -moz-user-select: none;
@@ -2141,7 +2166,9 @@ html::-webkit-scrollbar-button {
2141
2166
  }
2142
2167
 
2143
2168
  .fortune-toolbar-select-option:hover {
2144
- background: #efefef;
2169
+ background: hsl(var(--color-bg-default-hover));
2170
+ border-radius: 4px;
2171
+ transition: all 0.2s ease-in-out;
2145
2172
  }
2146
2173
 
2147
2174
  .fortune-toolbar-select::-webkit-scrollbar {
@@ -2340,71 +2367,6 @@ html::-webkit-scrollbar-button {
2340
2367
  background: #efefef;
2341
2368
  cursor: pointer;
2342
2369
  }
2343
- /*函数公式查找样式*/
2344
- #luckysheet-search-formula {
2345
- font-size: 12px;
2346
- }
2347
-
2348
- #luckysheet-search-formula .inpbox {
2349
- margin-bottom: 5px;
2350
- }
2351
-
2352
- #luckysheet-search-formula .inpbox div {
2353
- display: block;
2354
- margin-bottom: 5px;
2355
- }
2356
-
2357
- #luckysheet-search-formula .inpbox input {
2358
- width: 100%;
2359
- height: 24px;
2360
- line-height: 24px;
2361
- border: 1px solid #d4d4d4;
2362
- padding: 0 10px;
2363
- box-sizing: border-box;
2364
- font-size: 12px;
2365
- }
2366
-
2367
- #luckysheet-search-formula .selbox {
2368
- margin-bottom: 5px;
2369
- }
2370
-
2371
- #luckysheet-search-formula .selbox select {
2372
- width: 50%;
2373
- height: 24px;
2374
- line-height: 24px;
2375
- border: 1px solid #d4d4d4;
2376
- box-sizing: border-box;
2377
- font-size: 12px;
2378
- }
2379
-
2380
- #luckysheet-search-formula .listbox label {
2381
- display: block;
2382
- margin-bottom: 5px;
2383
- }
2384
-
2385
- #formulaTypeList {
2386
- width: 300px;
2387
- height: 170px;
2388
- border: 1px solid #d4d4d4;
2389
- overflow-y: scroll;
2390
- }
2391
-
2392
- .formulaList {
2393
- width: 300px;
2394
- height: 170px;
2395
- border: 1px solid #d4d4d4;
2396
- overflow-y: scroll;
2397
- }
2398
-
2399
- .listBox {
2400
- padding: 5px;
2401
- border-bottom: 1px solid #d4d4d4;
2402
- }
2403
-
2404
- .listBox.on {
2405
- background-color: #8c89fe;
2406
- color: #fff;
2407
- }
2408
2370
 
2409
2371
  #fortune-split-column {
2410
2372
  /* position: absolute;
@@ -3004,30 +2966,30 @@ label {
3004
2966
  }
3005
2967
 
3006
2968
  .fortune-context-menu {
2969
+ min-width: 240px;
3007
2970
  max-height: 100%;
3008
2971
  overflow-y: auto;
3009
2972
  border-radius: 4px;
3010
- box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.15);
2973
+ box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
3011
2974
  transition: opacity 0.218s;
3012
2975
  background: #fff;
3013
- border: 1px solid #E8EBEC;
3014
- border: 1px solid #E8EBEC;
2976
+ border: 1px solid hsl(var(--color-border-default));
3015
2977
  cursor: default;
3016
2978
  font-size: 13px;
3017
2979
  margin: 0;
3018
2980
  outline: none;
3019
- padding: 6px 0;
2981
+ padding: 8px;
3020
2982
  position: absolute;
3021
2983
  z-index: 1004;
3022
2984
  box-sizing: border-box;
3023
2985
  -webkit-user-select: none;
3024
2986
  -moz-user-select: none;
3025
2987
  user-select: none;
3026
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
2988
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
3027
2989
  font-size: 14px;
3028
2990
  max-width: 250px;
3029
2991
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1), 0px 1px 3px rgba(0, 0, 0, 0.08);
3030
- color: #363B3F;
2992
+ color: #363b3f;
3031
2993
  line-height: 20px;
3032
2994
  }
3033
2995
 
@@ -3035,8 +2997,14 @@ label {
3035
2997
  display: flex;
3036
2998
  align-items: center;
3037
2999
  height: 20px;
3000
+ cursor: pointer;
3001
+ border-radius: 4px;
3038
3002
  }
3039
3003
 
3004
+ .context-item:hover {
3005
+ background: hsl(var(--color-bg-default-hover));
3006
+ transition: all 0.2s ease-in-out;
3007
+ }
3040
3008
 
3041
3009
  .fortune-context-menu input.luckysheet-mousedown-cancel {
3042
3010
  width: 35px;
@@ -3058,20 +3026,19 @@ label {
3058
3026
  cursor: pointer;
3059
3027
  list-style: none;
3060
3028
  margin: 0;
3061
- padding: 1px 6em 1px 20px;
3062
3029
  white-space: nowrap;
3063
- padding-left: 8px;
3064
3030
  vertical-align: middle;
3065
- padding-right: 24px;
3066
3031
  -webkit-user-select: none;
3067
3032
  -moz-user-select: none;
3068
3033
  user-select: none;
3034
+ border-radius: 4px;
3069
3035
  }
3070
3036
 
3071
3037
  /* 右击菜单项目 hover背景色 */
3072
3038
  .luckysheet-cols-menu .luckysheet-cols-menuitem:hover,
3073
3039
  .luckysheet-cols-menu .luckysheet-cols-menuitem-hover {
3074
- background: #efefef;
3040
+ background: hsl(var(--color-bg-default-hover));
3041
+ transition: all 0.2s ease-in-out;
3075
3042
  }
3076
3043
 
3077
3044
  .luckysheet-cols-menu
@@ -3082,11 +3049,14 @@ label {
3082
3049
  cursor: pointer;
3083
3050
  list-style: none;
3084
3051
  margin: 0;
3085
- padding: 6px 10px 6px 10px !important;
3052
+ padding: 8px !important;
3086
3053
  white-space: nowrap;
3087
3054
  -webkit-user-select: none;
3088
3055
  -moz-user-select: none;
3089
3056
  user-select: none;
3057
+ display: flex;
3058
+ align-items: center;
3059
+ gap: 8px;
3090
3060
  }
3091
3061
 
3092
3062
  .fortune-filter-menu .luckysheet-cols-menuitem {
@@ -3305,30 +3275,10 @@ label {
3305
3275
  right: -18px;
3306
3276
  }
3307
3277
 
3308
- .fortune-sort-title {
3309
- background-color: #fff;
3310
- color: #000;
3311
- cursor: default;
3312
- font-size: 16px;
3313
- font-weight: 400;
3314
- line-height: 24px;
3315
- margin: 0 0 16px;
3316
- }
3317
-
3318
- .fortune-sort-modal > div {
3319
- margin-bottom: 10px;
3278
+ .tippy-box {
3279
+ background-color: transparent !important;
3320
3280
  }
3321
-
3322
- .fortune-sort-tablec td {
3323
- padding: 5px;
3324
- white-space: nowrap;
3325
- }
3326
-
3327
- .fortune-sort-button {
3328
- margin-top: 10px;
3329
- margin-bottom: 25px;
3330
- }
3331
-
3281
+ .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
3332
3282
  #fortune-change-color {
3333
3283
  min-width: 164px;
3334
3284
  height: 252px;