@leankylin-sheet/react 3.1.42 → 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.
package/dist/index.esm.js CHANGED
@@ -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
@@ -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, {
@@ -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;
@@ -2663,10 +2663,10 @@ label {
2663
2663
  .luckysheet-sheet-area {
2664
2664
  width: 100%;
2665
2665
  box-sizing: border-box;
2666
- background-color: #fafafc;
2666
+ background-color: #fff;
2667
2667
  color: #444;
2668
- height: 31px;
2669
- padding: 0 30px 0 44px;
2668
+ height: 36px;
2669
+ padding: 4px 30px 4px 44px;
2670
2670
  margin: 0;
2671
2671
  -webkit-touch-callout: none;
2672
2672
  cursor: default;
@@ -2675,6 +2675,7 @@ label {
2675
2675
  align-items: center;
2676
2676
  justify-content: space-between;
2677
2677
  position: relative;
2678
+ border-top: 1px solid rgb(227, 229, 234);
2678
2679
  }
2679
2680
 
2680
2681
  #luckysheet-sheet-content {
@@ -2693,7 +2694,7 @@ label {
2693
2694
  white-space: nowrap;
2694
2695
  }
2695
2696
 
2696
- .luckysheet-sheet-area>div,
2697
+ .luckysheet-sheet-area > div,
2697
2698
  .luckysheet-sheet-area .luckysheet-sheets-item {
2698
2699
  display: inline-block;
2699
2700
  /* margin-right: 6px;
@@ -2754,23 +2755,21 @@ label {
2754
2755
  }
2755
2756
 
2756
2757
  .luckysheet-sheet-area div.luckysheet-sheets-item {
2757
- padding: 2px 6px;
2758
- height: 29px;
2759
- line-height: 29px;
2760
- background-color: #fafafc;
2758
+ height: 28px;
2759
+ line-height: 28px;
2760
+ background-color: #fff;
2761
2761
  color: #676464;
2762
2762
  min-width: 30px;
2763
2763
  top: 0px;
2764
2764
  position: relative;
2765
- margin-right: -1px;
2766
2765
  cursor: pointer;
2767
2766
  transition: all 0.1s;
2768
2767
  font-size: 13px;
2769
- padding: 2px 19px 0px 5px;
2770
2768
  box-sizing: border-box;
2771
- border-left: 1px solid #e0e0e0;
2772
- border-right: 1px solid #e0e0e0;
2773
2769
  vertical-align: middle;
2770
+ margin: 0 6px;
2771
+ border-radius: 4px;
2772
+ padding: 0 6px;
2774
2773
  }
2775
2774
 
2776
2775
  .luckysheet-sheet-area div.luckysheet-sheets-item:last-child {
@@ -2796,7 +2795,9 @@ label {
2796
2795
  text-align: center;
2797
2796
  }
2798
2797
 
2799
- .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 {
2800
2801
  color: #2a2a2a;
2801
2802
  cursor: pointer;
2802
2803
  }
@@ -2813,7 +2814,9 @@ label {
2813
2814
  left: 0;
2814
2815
  }
2815
2816
 
2816
- .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"] {
2817
2820
  border: 1px solid #d9d9d9;
2818
2821
  display: inline-block;
2819
2822
  height: 18px;
@@ -2827,7 +2830,9 @@ label {
2827
2830
  -webkit-user-select: text !important;
2828
2831
  }
2829
2832
 
2830
- .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 {
2831
2836
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
2832
2837
  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
2833
2838
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
@@ -2837,8 +2842,8 @@ label {
2837
2842
 
2838
2843
  .luckysheet-sheet-area div.luckysheet-sheets-item-active {
2839
2844
  /* padding: 2px 8px; */
2840
- height: 29px;
2841
- line-height: 29px;
2845
+ height: 28px;
2846
+ line-height: 28px;
2842
2847
  background-color: #efefef;
2843
2848
  /* border-color: #aaa; */
2844
2849
  border-top-color: #fff;
@@ -2860,16 +2865,19 @@ label {
2860
2865
  display: flex;
2861
2866
  align-items: center;
2862
2867
  justify-content: center;
2863
- height: 29px;
2864
- width: 29px;
2868
+ height: 28px;
2869
+ width: 28px;
2870
+ cursor: pointer;
2871
+ border-radius: 4px;
2872
+ margin: 0 6px;
2865
2873
  }
2866
2874
 
2867
2875
  .leankylin-sheettab-button:hover {
2868
2876
  display: flex;
2869
2877
  align-items: center;
2870
2878
  justify-content: center;
2871
- height: 29px;
2872
- width: 29px;
2879
+ height: 28px;
2880
+ width: 28px;
2873
2881
  background-color: #efefef;
2874
2882
  }
2875
2883
 
@@ -2885,7 +2893,7 @@ label {
2885
2893
  display: flex;
2886
2894
  align-items: center;
2887
2895
  padding: 0 5px;
2888
- height: 29px;
2896
+ height: 28px;
2889
2897
  cursor: pointer;
2890
2898
  }
2891
2899
 
@@ -2896,8 +2904,8 @@ label {
2896
2904
  .leankylin-sheettab-placeholder {
2897
2905
  display: inline-block;
2898
2906
  width: 30px;
2899
- height: 29px;
2900
- line-height: 29px;
2907
+ height: 28px;
2908
+ line-height: 28px;
2901
2909
  vertical-align: middle;
2902
2910
  }
2903
2911
 
@@ -2924,16 +2932,23 @@ label {
2924
2932
  }
2925
2933
 
2926
2934
  .luckysheet-sheets-item-function {
2927
- width: 12px;
2928
- height: 24px;
2935
+ display: none;
2936
+ width: 28px;
2937
+ height: 28px;
2929
2938
  position: absolute;
2939
+ text-align: center;
2930
2940
  top: 4px;
2931
2941
  right: 2px;
2942
+ cursor: pointer;
2943
+ }
2944
+ .luckysheet-sheets-item-function:hover {
2945
+ background-color: #f1f1f1;
2932
2946
  }
2933
2947
 
2934
2948
  .leankylin-sheet-area-right {
2935
2949
  display: flex !important;
2936
2950
  }
2951
+
2937
2952
  .leankylin-zoom-container {
2938
2953
  white-space: nowrap;
2939
2954
  overflow: visible;
@@ -2951,6 +2966,8 @@ label {
2951
2966
  justify-content: center;
2952
2967
  width: 24px;
2953
2968
  height: 24px;
2969
+ border-radius: 4px;
2970
+ margin: 0 6px;
2954
2971
  }
2955
2972
 
2956
2973
  .leankylin-zoom-button:hover {
@@ -2961,14 +2978,14 @@ label {
2961
2978
  position: relative;
2962
2979
  display: flex;
2963
2980
  justify-content: center;
2964
- width: 48px;
2965
2981
  color: #1e1e1f;
2966
2982
  font-size: 12px;
2967
2983
  cursor: pointer;
2968
2984
  }
2969
2985
 
2970
2986
  .leankylin-zoom-ratio-current {
2971
- width: 100%;
2987
+ padding: 0 12px;
2988
+ margin: 0;
2972
2989
  }
2973
2990
 
2974
2991
  .leankylin-zoom-ratio-item:hover {
@@ -2995,7 +3012,6 @@ label {
2995
3012
  max-height: 100%;
2996
3013
  overflow-y: auto;
2997
3014
  border-radius: 4px;
2998
- box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.15);
2999
3015
  transition: opacity 0.218s;
3000
3016
  background: #fff;
3001
3017
  cursor: default;
@@ -3010,8 +3026,13 @@ label {
3010
3026
  -moz-user-select: none;
3011
3027
  user-select: none;
3012
3028
  border: none;
3029
+ width: 248px;
3013
3030
  border-radius: 8px;
3014
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;
3015
3036
  }
3016
3037
 
3017
3038
  .leankylin-context-menu input.luckysheet-mousedown-cancel {
@@ -3044,12 +3065,13 @@ label {
3044
3065
  -webkit-user-select: none;
3045
3066
  -moz-user-select: none;
3046
3067
  user-select: none;
3068
+ border-radius: 4px;
3047
3069
  }
3048
3070
 
3049
3071
  /* 右击菜单项目 hover背景色 */
3050
3072
  .luckysheet-cols-menu .luckysheet-cols-menuitem:hover,
3051
3073
  .luckysheet-cols-menu .luckysheet-cols-menuitem-hover {
3052
- background: #efefef;
3074
+ background: #f9fafb;
3053
3075
  }
3054
3076
 
3055
3077
  .luckysheet-cols-menu
@@ -3283,6 +3305,12 @@ label {
3283
3305
  right: -18px;
3284
3306
  }
3285
3307
 
3308
+ .leankylin-sheet-color-change {
3309
+ position: absolute;
3310
+ left: 200px;
3311
+ bottom: -100px;
3312
+ }
3313
+
3286
3314
  .leankylin-sort-title {
3287
3315
  background-color: #fff;
3288
3316
  color: #000;
@@ -3307,76 +3335,6 @@ label {
3307
3335
  margin-bottom: 25px;
3308
3336
  }
3309
3337
 
3310
- #leankylin-change-color {
3311
- min-width: 164px;
3312
- height: 252px;
3313
- background: rgb(240, 240, 240);
3314
- position: absolute;
3315
- bottom: -110px;
3316
- left: 197px;
3317
- border-radius: 6px;
3318
- box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
3319
- border: 1px solid rgba(0, 0, 0, .2);
3320
- }
3321
-
3322
- #leankylin-change-color .color-reset {
3323
- position: relative;
3324
- color: #333;
3325
- cursor: pointer;
3326
- list-style: none;
3327
- padding: 10px;
3328
- white-space: nowrap;
3329
- padding-left: 8px;
3330
- vertical-align: middle;
3331
- padding-right: 24px;
3332
- -webkit-user-select: none;
3333
- -moz-user-select: none;
3334
- user-select: none;
3335
- border-radius: 6px;
3336
- background: white;
3337
- }
3338
-
3339
- #leankylin-change-color .color-reset:hover {
3340
- background: rgb(230, 230, 230);
3341
- }
3342
-
3343
- #leankylin-change-color .custom-color {
3344
- position: relative;
3345
- margin: auto;
3346
- padding: 10px;
3347
- border-radius: 6px;
3348
- background: white;
3349
- display: flex;
3350
- align-items: center;
3351
- margin: 1px 0px;
3352
- display: flex;
3353
- justify-content: space-around;
3354
- }
3355
-
3356
- .button-basic {
3357
- display: inline-block;
3358
- margin-bottom: 0;
3359
- font-weight: 400;
3360
- text-align: center;
3361
- vertical-align: middle;
3362
- touch-action: manipulation;
3363
- cursor: pointer;
3364
- white-space: nowrap;
3365
- padding: 4px 8px;
3366
- font-size: 12px;
3367
- line-height: 1.42857143;
3368
- border-radius: 2px;
3369
- -webkit-user-select: none;
3370
- -moz-user-select: none;
3371
- user-select: none;
3372
- }
3373
-
3374
- .button-primary {
3375
- background: #0188fb;
3376
- border: 1px solid #0188fb;
3377
- color: #fff;
3378
- margin-right: -4px;
3379
- }
3380
3338
  .leankylin-sheet-list {
3381
3339
  overflow-y: auto;
3382
3340
  overflow-x: hidden;
package/dist/index.umd.js CHANGED
@@ -102775,67 +102775,6 @@
102775
102775
  }))));
102776
102776
  };
102777
102777
 
102778
- var ChangeColor = function ChangeColor(_ref) {
102779
- var triggerParentUpdate = _ref.triggerParentUpdate;
102780
- var _useContext = React.useContext(WorkbookContext),
102781
- context = _useContext.context,
102782
- setContext = _useContext.setContext;
102783
- var _locale = locale(context),
102784
- toolbar = _locale.toolbar,
102785
- sheetconfig = _locale.sheetconfig,
102786
- button = _locale.button;
102787
- var _useState = React.useState("#000000"),
102788
- _useState2 = _slicedToArray(_useState, 2),
102789
- inputColor = _useState2[0],
102790
- setInputColor = _useState2[1];
102791
- var _useState3 = React.useState(context.luckysheetfile[getSheetIndex(context, context.currentSheetId)].color),
102792
- _useState4 = _slicedToArray(_useState3, 2),
102793
- selectColor = _useState4[0],
102794
- setSelectColor = _useState4[1];
102795
- var certainBtn = React.useCallback(function () {
102796
- setSelectColor(inputColor);
102797
- }, [inputColor]);
102798
- React.useEffect(function () {
102799
- setContext(function (ctx) {
102800
- if (ctx.allowEdit === false) return;
102801
- var index = getSheetIndex(ctx, ctx.currentSheetId);
102802
- ctx.luckysheetfile[index].color = selectColor;
102803
- });
102804
- }, [selectColor, setContext]);
102805
- return /*#__PURE__*/React__default['default'].createElement("div", {
102806
- id: "leankylin-change-color"
102807
- }, /*#__PURE__*/React__default['default'].createElement("div", {
102808
- className: "color-reset",
102809
- onClick: function onClick() {
102810
- return setSelectColor(undefined);
102811
- }
102812
- }, sheetconfig.resetColor), /*#__PURE__*/React__default['default'].createElement("div", {
102813
- className: "custom-color"
102814
- }, /*#__PURE__*/React__default['default'].createElement("div", null, toolbar.customColor, ":"), /*#__PURE__*/React__default['default'].createElement("input", {
102815
- type: "color",
102816
- value: inputColor,
102817
- onChange: function onChange(e) {
102818
- return setInputColor(e.target.value);
102819
- },
102820
- onFocus: function onFocus() {
102821
- triggerParentUpdate(true);
102822
- },
102823
- onBlur: function onBlur() {
102824
- triggerParentUpdate(false);
102825
- }
102826
- }), /*#__PURE__*/React__default['default'].createElement("div", {
102827
- className: "button-basic button-primary",
102828
- onClick: function onClick() {
102829
- certainBtn();
102830
- }
102831
- }, button.confirm)), /*#__PURE__*/React__default['default'].createElement(ColorPicker, {
102832
- onPick: function onPick(color) {
102833
- setInputColor(color);
102834
- setSelectColor(color);
102835
- }
102836
- }));
102837
- };
102838
-
102839
102778
  var SheetTabContextMenu = function SheetTabContextMenu() {
102840
102779
  var _settings$sheetTabCon;
102841
102780
  var _useContext = React.useContext(WorkbookContext),
@@ -102933,6 +102872,13 @@
102933
102872
  });
102934
102873
  });
102935
102874
  }, [context.allowEdit, setContext, sheet === null || sheet === void 0 ? void 0 : sheet.id]);
102875
+ var changeColor = function changeColor(selectColor) {
102876
+ setContext(function (ctx) {
102877
+ if (ctx.allowEdit === false) return;
102878
+ var index = getSheetIndex(ctx, ctx.currentSheetId);
102879
+ ctx.luckysheetfile[index].color = selectColor;
102880
+ });
102881
+ };
102936
102882
  if (!sheet || x == null || y == null) return null;
102937
102883
  return /*#__PURE__*/React__default['default'].createElement("div", {
102938
102884
  className: "leankylin-context-menu luckysheet-cols-menu",
@@ -103029,9 +102975,15 @@
103029
102975
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
103030
102976
  name: "rightArrow",
103031
102977
  width: 18
103032
- })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React__default['default'].createElement(ChangeColor, {
103033
- triggerParentUpdate: updateShowInputColor
103034
- })));
102978
+ })), isShowChangeColor && context.allowEdit && ( /*#__PURE__*/React__default['default'].createElement("div", {
102979
+ className: "leankylin-sheet-color-change"
102980
+ }, /*#__PURE__*/React__default['default'].createElement(CustomColor, {
102981
+ onCustomPick: function onCustomPick(color) {
102982
+ changeColor(color);
102983
+ setIsShowChangeColor(false);
102984
+ },
102985
+ onColorPick: changeColor
102986
+ }))));
103035
102987
  }
103036
102988
  if (name === "focus") {
103037
102989
  return /*#__PURE__*/React__default['default'].createElement(Menu, {