@leankylin-sheet/react 3.1.41 → 3.1.43

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.
@@ -2017,7 +2017,7 @@ html::-webkit-scrollbar-button {
2017
2017
  .leankylin-toolbar {
2018
2018
  display: flex;
2019
2019
  flex-direction: row;
2020
- background: #fafafc;
2020
+ background: #fff;
2021
2021
  position: relative;
2022
2022
  padding: 5px 0px 3px 15px;
2023
2023
  border-bottom: 1px solid #d4d4d4;
@@ -2071,6 +2071,7 @@ html::-webkit-scrollbar-button {
2071
2071
  .leankylin-toolbar-combo-arrow {
2072
2072
  display: flex;
2073
2073
  align-items: center;
2074
+ padding: 0 6px;
2074
2075
  }
2075
2076
 
2076
2077
  .leankylin-toolbar-button:hover,
@@ -2103,7 +2104,7 @@ html::-webkit-scrollbar-button {
2103
2104
  }
2104
2105
 
2105
2106
  .leankylin-toolbar-select::-webkit-scrollbar {
2106
- display: none ;
2107
+ display: none;
2107
2108
  }
2108
2109
 
2109
2110
  .leankylin-toolbar-select,
@@ -2203,7 +2204,7 @@ html::-webkit-scrollbar-button {
2203
2204
  padding-top: 1px;
2204
2205
  padding-left: 24px;
2205
2206
  text-align: right;
2206
- opacity: .5;
2207
+ opacity: 0.5;
2207
2208
  filter: alpha(opacity=50);
2208
2209
  color: #000;
2209
2210
  -webkit-user-select: none;
@@ -2217,7 +2218,7 @@ html::-webkit-scrollbar-button {
2217
2218
  position: absolute;
2218
2219
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
2219
2220
  background: #fff;
2220
- border: 1px solid rgba(0, 0, 0, .2);
2221
+ border: 1px solid rgba(0, 0, 0, 0.2);
2221
2222
  cursor: default;
2222
2223
  font-size: 12px;
2223
2224
  z-index: 1004;
@@ -2234,7 +2235,7 @@ html::-webkit-scrollbar-button {
2234
2235
  background: rgb(240, 240, 240);
2235
2236
  border-radius: 6px;
2236
2237
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
2237
- border: 1px solid rgba(0, 0, 0, .2);
2238
+ border: 1px solid rgba(0, 0, 0, 0.2);
2238
2239
  font-size: 12px;
2239
2240
  }
2240
2241
 
@@ -2297,9 +2298,9 @@ html::-webkit-scrollbar-button {
2297
2298
  margin-right: -4px;
2298
2299
  }
2299
2300
 
2300
- .leankylin-border-select-menu{
2301
- position: absolute;
2302
- bottom: 0px;
2301
+ .leankylin-border-select-menu {
2302
+ position: absolute;
2303
+ bottom: 0px;
2303
2304
  }
2304
2305
 
2305
2306
  .leankylin-border-color-preview {
@@ -2319,16 +2320,16 @@ html::-webkit-scrollbar-button {
2319
2320
  cursor: pointer;
2320
2321
  }
2321
2322
 
2322
- .leankylin-border-style-preview{
2323
+ .leankylin-border-style-preview {
2323
2324
  height: 3px;
2324
2325
  overflow: hidden;
2325
2326
  }
2326
2327
 
2327
- .leankylin-border-style-picker-menu{
2328
+ .leankylin-border-style-picker-menu {
2328
2329
  padding: 0px 10px;
2329
2330
  }
2330
2331
 
2331
- .leankylin-border-style-picker-menu:hover{
2332
+ .leankylin-border-style-picker-menu:hover {
2332
2333
  background: #efefef;
2333
2334
  cursor: pointer;
2334
2335
  }
@@ -2662,10 +2663,10 @@ label {
2662
2663
  .luckysheet-sheet-area {
2663
2664
  width: 100%;
2664
2665
  box-sizing: border-box;
2665
- background-color: #fafafc;
2666
+ background-color: #fff;
2666
2667
  color: #444;
2667
- height: 31px;
2668
- padding: 0 30px 0 44px;
2668
+ height: 36px;
2669
+ padding: 4px 30px 4px 44px;
2669
2670
  margin: 0;
2670
2671
  -webkit-touch-callout: none;
2671
2672
  cursor: default;
@@ -2674,6 +2675,7 @@ label {
2674
2675
  align-items: center;
2675
2676
  justify-content: space-between;
2676
2677
  position: relative;
2678
+ border-top: 1px solid rgb(227, 229, 234);
2677
2679
  }
2678
2680
 
2679
2681
  #luckysheet-sheet-content {
@@ -2692,7 +2694,7 @@ label {
2692
2694
  white-space: nowrap;
2693
2695
  }
2694
2696
 
2695
- .luckysheet-sheet-area>div,
2697
+ .luckysheet-sheet-area > div,
2696
2698
  .luckysheet-sheet-area .luckysheet-sheets-item {
2697
2699
  display: inline-block;
2698
2700
  /* margin-right: 6px;
@@ -2753,23 +2755,21 @@ label {
2753
2755
  }
2754
2756
 
2755
2757
  .luckysheet-sheet-area div.luckysheet-sheets-item {
2756
- padding: 2px 6px;
2757
- height: 29px;
2758
- line-height: 29px;
2759
- background-color: #fafafc;
2758
+ height: 28px;
2759
+ line-height: 28px;
2760
+ background-color: #fff;
2760
2761
  color: #676464;
2761
2762
  min-width: 30px;
2762
2763
  top: 0px;
2763
2764
  position: relative;
2764
- margin-right: -1px;
2765
2765
  cursor: pointer;
2766
2766
  transition: all 0.1s;
2767
2767
  font-size: 13px;
2768
- padding: 2px 19px 0px 5px;
2769
2768
  box-sizing: border-box;
2770
- border-left: 1px solid #e0e0e0;
2771
- border-right: 1px solid #e0e0e0;
2772
2769
  vertical-align: middle;
2770
+ margin: 0 6px;
2771
+ border-radius: 4px;
2772
+ padding: 0 6px;
2773
2773
  }
2774
2774
 
2775
2775
  .luckysheet-sheet-area div.luckysheet-sheets-item:last-child {
@@ -2795,7 +2795,9 @@ label {
2795
2795
  text-align: center;
2796
2796
  }
2797
2797
 
2798
- .luckysheet-sheet-area div.luckysheet-sheets-item .luckysheet-sheets-item-menu:hover {
2798
+ .luckysheet-sheet-area
2799
+ div.luckysheet-sheets-item
2800
+ .luckysheet-sheets-item-menu:hover {
2799
2801
  color: #2a2a2a;
2800
2802
  cursor: pointer;
2801
2803
  }
@@ -2812,7 +2814,9 @@ label {
2812
2814
  left: 0;
2813
2815
  }
2814
2816
 
2815
- .luckysheet-sheet-area div.luckysheet-sheets-item .luckysheet-sheets-item-name[contenteditable="true"] {
2817
+ .luckysheet-sheet-area
2818
+ div.luckysheet-sheets-item
2819
+ .luckysheet-sheets-item-name[contenteditable="true"] {
2816
2820
  border: 1px solid #d9d9d9;
2817
2821
  display: inline-block;
2818
2822
  height: 18px;
@@ -2826,7 +2830,9 @@ label {
2826
2830
  -webkit-user-select: text !important;
2827
2831
  }
2828
2832
 
2829
- .luckysheet-sheet-area div.luckysheet-sheets-item .luckysheet-sheets-item-name[contenteditable="true"]:focus {
2833
+ .luckysheet-sheet-area
2834
+ div.luckysheet-sheets-item
2835
+ .luckysheet-sheets-item-name[contenteditable="true"]:focus {
2830
2836
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
2831
2837
  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
2832
2838
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
@@ -2836,8 +2842,8 @@ label {
2836
2842
 
2837
2843
  .luckysheet-sheet-area div.luckysheet-sheets-item-active {
2838
2844
  /* padding: 2px 8px; */
2839
- height: 29px;
2840
- line-height: 29px;
2845
+ height: 28px;
2846
+ line-height: 28px;
2841
2847
  background-color: #efefef;
2842
2848
  /* border-color: #aaa; */
2843
2849
  border-top-color: #fff;
@@ -2859,16 +2865,19 @@ label {
2859
2865
  display: flex;
2860
2866
  align-items: center;
2861
2867
  justify-content: center;
2862
- height: 29px;
2863
- width: 29px;
2868
+ height: 28px;
2869
+ width: 28px;
2870
+ cursor: pointer;
2871
+ border-radius: 4px;
2872
+ margin: 0 6px;
2864
2873
  }
2865
2874
 
2866
2875
  .leankylin-sheettab-button:hover {
2867
2876
  display: flex;
2868
2877
  align-items: center;
2869
2878
  justify-content: center;
2870
- height: 29px;
2871
- width: 29px;
2879
+ height: 28px;
2880
+ width: 28px;
2872
2881
  background-color: #efefef;
2873
2882
  }
2874
2883
 
@@ -2884,7 +2893,7 @@ label {
2884
2893
  display: flex;
2885
2894
  align-items: center;
2886
2895
  padding: 0 5px;
2887
- height: 29px;
2896
+ height: 28px;
2888
2897
  cursor: pointer;
2889
2898
  }
2890
2899
 
@@ -2895,8 +2904,8 @@ label {
2895
2904
  .leankylin-sheettab-placeholder {
2896
2905
  display: inline-block;
2897
2906
  width: 30px;
2898
- height: 29px;
2899
- line-height: 29px;
2907
+ height: 28px;
2908
+ line-height: 28px;
2900
2909
  vertical-align: middle;
2901
2910
  }
2902
2911
 
@@ -2923,16 +2932,23 @@ label {
2923
2932
  }
2924
2933
 
2925
2934
  .luckysheet-sheets-item-function {
2926
- width: 12px;
2927
- height: 24px;
2935
+ display: none;
2936
+ width: 28px;
2937
+ height: 28px;
2928
2938
  position: absolute;
2939
+ text-align: center;
2929
2940
  top: 4px;
2930
2941
  right: 2px;
2942
+ cursor: pointer;
2943
+ }
2944
+ .luckysheet-sheets-item-function:hover {
2945
+ background-color: #f1f1f1;
2931
2946
  }
2932
2947
 
2933
2948
  .leankylin-sheet-area-right {
2934
2949
  display: flex !important;
2935
2950
  }
2951
+
2936
2952
  .leankylin-zoom-container {
2937
2953
  white-space: nowrap;
2938
2954
  overflow: visible;
@@ -2950,6 +2966,8 @@ label {
2950
2966
  justify-content: center;
2951
2967
  width: 24px;
2952
2968
  height: 24px;
2969
+ border-radius: 4px;
2970
+ margin: 0 6px;
2953
2971
  }
2954
2972
 
2955
2973
  .leankylin-zoom-button:hover {
@@ -2960,14 +2978,14 @@ label {
2960
2978
  position: relative;
2961
2979
  display: flex;
2962
2980
  justify-content: center;
2963
- width: 48px;
2964
2981
  color: #1e1e1f;
2965
2982
  font-size: 12px;
2966
2983
  cursor: pointer;
2967
2984
  }
2968
2985
 
2969
2986
  .leankylin-zoom-ratio-current {
2970
- width: 100%;
2987
+ padding: 0 12px;
2988
+ margin: 0;
2971
2989
  }
2972
2990
 
2973
2991
  .leankylin-zoom-ratio-item:hover {
@@ -2994,7 +3012,6 @@ label {
2994
3012
  max-height: 100%;
2995
3013
  overflow-y: auto;
2996
3014
  border-radius: 4px;
2997
- box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.15);
2998
3015
  transition: opacity 0.218s;
2999
3016
  background: #fff;
3000
3017
  cursor: default;
@@ -3009,8 +3026,13 @@ label {
3009
3026
  -moz-user-select: none;
3010
3027
  user-select: none;
3011
3028
  border: none;
3029
+ width: 248px;
3012
3030
  border-radius: 8px;
3013
3031
  line-height: 22px;
3032
+ padding: 4px 8px;
3033
+ border: 1px solid #e3e5ea;
3034
+ box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px,
3035
+ rgba(0, 0, 0, 0) 0px 0px 0px 0px;
3014
3036
  }
3015
3037
 
3016
3038
  .leankylin-context-menu input.luckysheet-mousedown-cancel {
@@ -3043,12 +3065,13 @@ label {
3043
3065
  -webkit-user-select: none;
3044
3066
  -moz-user-select: none;
3045
3067
  user-select: none;
3068
+ border-radius: 4px;
3046
3069
  }
3047
3070
 
3048
3071
  /* 右击菜单项目 hover背景色 */
3049
3072
  .luckysheet-cols-menu .luckysheet-cols-menuitem:hover,
3050
3073
  .luckysheet-cols-menu .luckysheet-cols-menuitem-hover {
3051
- background: #efefef;
3074
+ background: #f9fafb;
3052
3075
  }
3053
3076
 
3054
3077
  .luckysheet-cols-menu
@@ -3282,6 +3305,12 @@ label {
3282
3305
  right: -18px;
3283
3306
  }
3284
3307
 
3308
+ .leankylin-sheet-color-change {
3309
+ position: absolute;
3310
+ left: 200px;
3311
+ bottom: -100px;
3312
+ }
3313
+
3285
3314
  .leankylin-sort-title {
3286
3315
  background-color: #fff;
3287
3316
  color: #000;
@@ -3306,76 +3335,6 @@ label {
3306
3335
  margin-bottom: 25px;
3307
3336
  }
3308
3337
 
3309
- #leankylin-change-color {
3310
- min-width: 164px;
3311
- height: 252px;
3312
- background: rgb(240, 240, 240);
3313
- position: absolute;
3314
- bottom: -110px;
3315
- left: 197px;
3316
- border-radius: 6px;
3317
- box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
3318
- border: 1px solid rgba(0, 0, 0, .2);
3319
- }
3320
-
3321
- #leankylin-change-color .color-reset {
3322
- position: relative;
3323
- color: #333;
3324
- cursor: pointer;
3325
- list-style: none;
3326
- padding: 10px;
3327
- white-space: nowrap;
3328
- padding-left: 8px;
3329
- vertical-align: middle;
3330
- padding-right: 24px;
3331
- -webkit-user-select: none;
3332
- -moz-user-select: none;
3333
- user-select: none;
3334
- border-radius: 6px;
3335
- background: white;
3336
- }
3337
-
3338
- #leankylin-change-color .color-reset:hover {
3339
- background: rgb(230, 230, 230);
3340
- }
3341
-
3342
- #leankylin-change-color .custom-color {
3343
- position: relative;
3344
- margin: auto;
3345
- padding: 10px;
3346
- border-radius: 6px;
3347
- background: white;
3348
- display: flex;
3349
- align-items: center;
3350
- margin: 1px 0px;
3351
- display: flex;
3352
- justify-content: space-around;
3353
- }
3354
-
3355
- .button-basic {
3356
- display: inline-block;
3357
- margin-bottom: 0;
3358
- font-weight: 400;
3359
- text-align: center;
3360
- vertical-align: middle;
3361
- touch-action: manipulation;
3362
- cursor: pointer;
3363
- white-space: nowrap;
3364
- padding: 4px 8px;
3365
- font-size: 12px;
3366
- line-height: 1.42857143;
3367
- border-radius: 2px;
3368
- -webkit-user-select: none;
3369
- -moz-user-select: none;
3370
- user-select: none;
3371
- }
3372
-
3373
- .button-primary {
3374
- background: #0188fb;
3375
- border: 1px solid #0188fb;
3376
- color: #fff;
3377
- margin-right: -4px;
3378
- }
3379
3338
  .leankylin-sheet-list {
3380
3339
  overflow-y: auto;
3381
3340
  overflow-x: hidden;
package/dist/index.esm.js CHANGED
@@ -5564,7 +5564,7 @@ var Toolbar = function Toolbar(_ref) {
5564
5564
  key: name
5565
5565
  }, /*#__PURE__*/React.createElement("div", {
5566
5566
  style: {
5567
- width: 17,
5567
+ width: 30,
5568
5568
  height: 2,
5569
5569
  backgroundColor: name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor,
5570
5570
  position: "absolute",
@@ -9453,67 +9453,6 @@ var SVGDefines = function SVGDefines() {
9453
9453
  }))));
9454
9454
  };
9455
9455
 
9456
- var ChangeColor = function ChangeColor(_ref) {
9457
- var triggerParentUpdate = _ref.triggerParentUpdate;
9458
- var _useContext = useContext(WorkbookContext),
9459
- context = _useContext.context,
9460
- setContext = _useContext.setContext;
9461
- var _locale = locale(context),
9462
- toolbar = _locale.toolbar,
9463
- sheetconfig = _locale.sheetconfig,
9464
- button = _locale.button;
9465
- var _useState = useState("#000000"),
9466
- _useState2 = _slicedToArray(_useState, 2),
9467
- inputColor = _useState2[0],
9468
- setInputColor = _useState2[1];
9469
- var _useState3 = useState(context.luckysheetfile[getSheetIndex(context, context.currentSheetId)].color),
9470
- _useState4 = _slicedToArray(_useState3, 2),
9471
- selectColor = _useState4[0],
9472
- setSelectColor = _useState4[1];
9473
- var certainBtn = useCallback(function () {
9474
- setSelectColor(inputColor);
9475
- }, [inputColor]);
9476
- useEffect(function () {
9477
- setContext(function (ctx) {
9478
- if (ctx.allowEdit === false) return;
9479
- var index = getSheetIndex(ctx, ctx.currentSheetId);
9480
- ctx.luckysheetfile[index].color = selectColor;
9481
- });
9482
- }, [selectColor, setContext]);
9483
- return /*#__PURE__*/React.createElement("div", {
9484
- id: "leankylin-change-color"
9485
- }, /*#__PURE__*/React.createElement("div", {
9486
- className: "color-reset",
9487
- onClick: function onClick() {
9488
- return setSelectColor(undefined);
9489
- }
9490
- }, sheetconfig.resetColor), /*#__PURE__*/React.createElement("div", {
9491
- className: "custom-color"
9492
- }, /*#__PURE__*/React.createElement("div", null, toolbar.customColor, ":"), /*#__PURE__*/React.createElement("input", {
9493
- type: "color",
9494
- value: inputColor,
9495
- onChange: function onChange(e) {
9496
- return setInputColor(e.target.value);
9497
- },
9498
- onFocus: function onFocus() {
9499
- triggerParentUpdate(true);
9500
- },
9501
- onBlur: function onBlur() {
9502
- triggerParentUpdate(false);
9503
- }
9504
- }), /*#__PURE__*/React.createElement("div", {
9505
- className: "button-basic button-primary",
9506
- onClick: function onClick() {
9507
- certainBtn();
9508
- }
9509
- }, button.confirm)), /*#__PURE__*/React.createElement(ColorPicker, {
9510
- onPick: function onPick(color) {
9511
- setInputColor(color);
9512
- setSelectColor(color);
9513
- }
9514
- }));
9515
- };
9516
-
9517
9456
  var SheetTabContextMenu = function SheetTabContextMenu() {
9518
9457
  var _settings$sheetTabCon;
9519
9458
  var _useContext = useContext(WorkbookContext),
@@ -9611,6 +9550,13 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9611
9550
  });
9612
9551
  });
9613
9552
  }, [context.allowEdit, setContext, sheet === null || sheet === void 0 ? void 0 : sheet.id]);
9553
+ var changeColor = function changeColor(selectColor) {
9554
+ setContext(function (ctx) {
9555
+ if (ctx.allowEdit === false) return;
9556
+ var index = getSheetIndex(ctx, ctx.currentSheetId);
9557
+ ctx.luckysheetfile[index].color = selectColor;
9558
+ });
9559
+ };
9614
9560
  if (!sheet || x == null || y == null) return null;
9615
9561
  return /*#__PURE__*/React.createElement("div", {
9616
9562
  className: "leankylin-context-menu luckysheet-cols-menu",
@@ -9707,9 +9653,15 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9707
9653
  }, /*#__PURE__*/React.createElement(SVGIcon, {
9708
9654
  name: "rightArrow",
9709
9655
  width: 18
9710
- })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React.createElement(ChangeColor, {
9711
- triggerParentUpdate: updateShowInputColor
9712
- })));
9656
+ })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React.createElement("div", {
9657
+ className: "leankylin-sheet-color-change"
9658
+ }, /*#__PURE__*/React.createElement(CustomColor, {
9659
+ onCustomPick: function onCustomPick(color) {
9660
+ changeColor(color);
9661
+ setIsShowChangeColor(false);
9662
+ },
9663
+ onColorPick: changeColor
9664
+ }))));
9713
9665
  }
9714
9666
  if (name === "focus") {
9715
9667
  return /*#__PURE__*/React.createElement(Menu, {
package/dist/index.js CHANGED
@@ -5574,7 +5574,7 @@ var Toolbar = function Toolbar(_ref) {
5574
5574
  key: name
5575
5575
  }, /*#__PURE__*/React__default['default'].createElement("div", {
5576
5576
  style: {
5577
- width: 17,
5577
+ width: 30,
5578
5578
  height: 2,
5579
5579
  backgroundColor: name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor,
5580
5580
  position: "absolute",
@@ -9463,67 +9463,6 @@ var SVGDefines = function SVGDefines() {
9463
9463
  }))));
9464
9464
  };
9465
9465
 
9466
- var ChangeColor = function ChangeColor(_ref) {
9467
- var triggerParentUpdate = _ref.triggerParentUpdate;
9468
- var _useContext = React.useContext(WorkbookContext),
9469
- context = _useContext.context,
9470
- setContext = _useContext.setContext;
9471
- var _locale = core.locale(context),
9472
- toolbar = _locale.toolbar,
9473
- sheetconfig = _locale.sheetconfig,
9474
- button = _locale.button;
9475
- var _useState = React.useState("#000000"),
9476
- _useState2 = _slicedToArray(_useState, 2),
9477
- inputColor = _useState2[0],
9478
- setInputColor = _useState2[1];
9479
- var _useState3 = React.useState(context.luckysheetfile[core.getSheetIndex(context, context.currentSheetId)].color),
9480
- _useState4 = _slicedToArray(_useState3, 2),
9481
- selectColor = _useState4[0],
9482
- setSelectColor = _useState4[1];
9483
- var certainBtn = React.useCallback(function () {
9484
- setSelectColor(inputColor);
9485
- }, [inputColor]);
9486
- React.useEffect(function () {
9487
- setContext(function (ctx) {
9488
- if (ctx.allowEdit === false) return;
9489
- var index = core.getSheetIndex(ctx, ctx.currentSheetId);
9490
- ctx.luckysheetfile[index].color = selectColor;
9491
- });
9492
- }, [selectColor, setContext]);
9493
- return /*#__PURE__*/React__default['default'].createElement("div", {
9494
- id: "leankylin-change-color"
9495
- }, /*#__PURE__*/React__default['default'].createElement("div", {
9496
- className: "color-reset",
9497
- onClick: function onClick() {
9498
- return setSelectColor(undefined);
9499
- }
9500
- }, sheetconfig.resetColor), /*#__PURE__*/React__default['default'].createElement("div", {
9501
- className: "custom-color"
9502
- }, /*#__PURE__*/React__default['default'].createElement("div", null, toolbar.customColor, ":"), /*#__PURE__*/React__default['default'].createElement("input", {
9503
- type: "color",
9504
- value: inputColor,
9505
- onChange: function onChange(e) {
9506
- return setInputColor(e.target.value);
9507
- },
9508
- onFocus: function onFocus() {
9509
- triggerParentUpdate(true);
9510
- },
9511
- onBlur: function onBlur() {
9512
- triggerParentUpdate(false);
9513
- }
9514
- }), /*#__PURE__*/React__default['default'].createElement("div", {
9515
- className: "button-basic button-primary",
9516
- onClick: function onClick() {
9517
- certainBtn();
9518
- }
9519
- }, button.confirm)), /*#__PURE__*/React__default['default'].createElement(ColorPicker, {
9520
- onPick: function onPick(color) {
9521
- setInputColor(color);
9522
- setSelectColor(color);
9523
- }
9524
- }));
9525
- };
9526
-
9527
9466
  var SheetTabContextMenu = function SheetTabContextMenu() {
9528
9467
  var _settings$sheetTabCon;
9529
9468
  var _useContext = React.useContext(WorkbookContext),
@@ -9621,6 +9560,13 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9621
9560
  });
9622
9561
  });
9623
9562
  }, [context.allowEdit, setContext, sheet === null || sheet === void 0 ? void 0 : sheet.id]);
9563
+ var changeColor = function changeColor(selectColor) {
9564
+ setContext(function (ctx) {
9565
+ if (ctx.allowEdit === false) return;
9566
+ var index = core.getSheetIndex(ctx, ctx.currentSheetId);
9567
+ ctx.luckysheetfile[index].color = selectColor;
9568
+ });
9569
+ };
9624
9570
  if (!sheet || x == null || y == null) return null;
9625
9571
  return /*#__PURE__*/React__default['default'].createElement("div", {
9626
9572
  className: "leankylin-context-menu luckysheet-cols-menu",
@@ -9717,9 +9663,15 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9717
9663
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
9718
9664
  name: "rightArrow",
9719
9665
  width: 18
9720
- })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React__default['default'].createElement(ChangeColor, {
9721
- triggerParentUpdate: updateShowInputColor
9722
- })));
9666
+ })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React__default['default'].createElement("div", {
9667
+ className: "leankylin-sheet-color-change"
9668
+ }, /*#__PURE__*/React__default['default'].createElement(CustomColor, {
9669
+ onCustomPick: function onCustomPick(color) {
9670
+ changeColor(color);
9671
+ setIsShowChangeColor(false);
9672
+ },
9673
+ onColorPick: changeColor
9674
+ }))));
9723
9675
  }
9724
9676
  if (name === "focus") {
9725
9677
  return /*#__PURE__*/React__default['default'].createElement(Menu, {