@fileverse-dev/fortune-react 1.2.9 → 1.2.10-oc-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.
Files changed (31) hide show
  1. package/es/components/ConditionFormat/index.css +2 -0
  2. package/es/components/ContextMenu/Menu.d.ts +1 -0
  3. package/es/components/ContextMenu/Menu.js +5 -2
  4. package/es/components/ContextMenu/index.css +4 -1
  5. package/es/components/ContextMenu/index.js +35 -8
  6. package/es/components/LinkEidtCard/index.js +66 -16
  7. package/es/components/NotationBoxes/index.js +2 -11
  8. package/es/components/SheetOverlay/ColumnHeader.js +1 -2
  9. package/es/components/SheetOverlay/FormulaSearch/index.css +0 -1
  10. package/es/components/SheetOverlay/FormulaSearch/index.js +1 -1
  11. package/es/components/SheetOverlay/RowHeader.js +1 -2
  12. package/es/components/SheetOverlay/index.css +2 -6
  13. package/es/components/Toolbar/Combo.js +5 -2
  14. package/es/components/Toolbar/Select.js +1 -1
  15. package/es/components/Toolbar/index.css +21 -1
  16. package/lib/components/ConditionFormat/index.css +2 -0
  17. package/lib/components/ContextMenu/Menu.d.ts +1 -0
  18. package/lib/components/ContextMenu/Menu.js +5 -2
  19. package/lib/components/ContextMenu/index.css +4 -1
  20. package/lib/components/ContextMenu/index.js +34 -7
  21. package/lib/components/LinkEidtCard/index.js +65 -15
  22. package/lib/components/NotationBoxes/index.js +2 -11
  23. package/lib/components/SheetOverlay/ColumnHeader.js +1 -2
  24. package/lib/components/SheetOverlay/FormulaSearch/index.css +0 -1
  25. package/lib/components/SheetOverlay/FormulaSearch/index.js +1 -1
  26. package/lib/components/SheetOverlay/RowHeader.js +1 -2
  27. package/lib/components/SheetOverlay/index.css +2 -6
  28. package/lib/components/Toolbar/Combo.js +4 -1
  29. package/lib/components/Toolbar/Select.js +1 -1
  30. package/lib/components/Toolbar/index.css +21 -1
  31. package/package.json +2 -2
@@ -22,6 +22,8 @@
22
22
  z-index: 1005;
23
23
  border-radius: 4px;
24
24
  cursor: pointer;
25
+ align-items: center;
26
+ height: 32px;
25
27
  }
26
28
 
27
29
  .condition-format-item:hover {
@@ -3,6 +3,7 @@ type Props = React.PropsWithChildren<{
3
3
  onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
4
4
  onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
5
5
  onMouseEnter?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
6
+ isActive?: boolean;
6
7
  }>;
7
8
  declare const Menu: React.FC<Props>;
8
9
  export default Menu;
@@ -1,13 +1,16 @@
1
+ import { cn } from "@fileverse/ui";
1
2
  import React, { useRef } from "react";
2
3
  var Menu = function Menu(_a) {
3
4
  var _onClick = _a.onClick,
4
5
  _onMouseLeave = _a.onMouseLeave,
5
6
  _onMouseEnter = _a.onMouseEnter,
6
- children = _a.children;
7
+ children = _a.children,
8
+ _b = _a.isActive,
9
+ isActive = _b === void 0 ? false : _b;
7
10
  var containerRef = useRef(null);
8
11
  return /*#__PURE__*/React.createElement("div", {
9
12
  ref: containerRef,
10
- className: "luckysheet-cols-menuitem luckysheet-mousedown-cancel",
13
+ className: cn("luckysheet-cols-menuitem luckysheet-mousedown-cancel", isActive && "color-bg-default-hover"),
11
14
  onClick: function onClick(e) {
12
15
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(e, containerRef.current);
13
16
  },
@@ -82,7 +82,10 @@
82
82
  cursor: pointer;
83
83
  list-style: none;
84
84
  margin: 0;
85
- padding: 8px !important;
85
+ padding-right: 8px !important;
86
+ padding-left: 8px !important;
87
+ padding-top: 6px !important;
88
+ padding-bottom: 6px !important;
86
89
  white-space: nowrap;
87
90
  user-select: none;
88
91
  display: flex;
@@ -115,7 +115,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
115
115
  };
116
116
  import { locale, handleCopy, handlePasteByClick, deleteRowCol, insertRowCol, removeActiveImage, deleteSelectedCellText, sortSelection, createFilter, showImgChooser, handleLink, hideSelected, showSelected, getSheetIndex, api, isAllowEdit, jfrefreshgrid, newComment, getFreezeState, toggleFreeze, clearFilter, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat } from "@fileverse-dev/fortune-core";
117
117
  import _ from "lodash";
118
- import React, { useContext, useRef, useCallback, useLayoutEffect } from "react";
118
+ import React, { useContext, useRef, useCallback, useLayoutEffect, useState } from "react";
119
119
  import regeneratorRuntime from "regenerator-runtime";
120
120
  import Tippy from "@tippyjs/react";
121
121
  import { LucideIcon } from "@fileverse/ui";
@@ -149,6 +149,9 @@ var ContextMenu = function ContextMenu() {
149
149
  info = _b.info,
150
150
  toolbar = _b.toolbar,
151
151
  splitText = _b.splitText;
152
+ var _c = useState(""),
153
+ activeMenu = _c[0],
154
+ setActiveMenu = _c[1];
152
155
  var addRowColRightAvobe = function addRowColRightAvobe(type, direction) {
153
156
  var _a, _b, _c, _d, _e, _f;
154
157
  var positionCol = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c[0];
@@ -829,6 +832,12 @@ var ContextMenu = function ContextMenu() {
829
832
  arrow: false,
830
833
  zIndex: 3000,
831
834
  appendTo: document.body,
835
+ onShow: function onShow() {
836
+ setActiveMenu("sort");
837
+ },
838
+ onHide: function onHide() {
839
+ if (activeMenu === "sort") setActiveMenu("");
840
+ },
832
841
  content: /*#__PURE__*/React.createElement("div", {
833
842
  className: "fortune-toolbar-select",
834
843
  style: {
@@ -867,7 +876,9 @@ var ContextMenu = function ContextMenu() {
867
876
  }), /*#__PURE__*/React.createElement("p", null, sort.desc))))),
868
877
  trigger: "mouseenter focus",
869
878
  hideOnClick: false
870
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
879
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
880
+ isActive: activeMenu === "sort"
881
+ }, /*#__PURE__*/React.createElement("div", {
871
882
  className: "flex items-center justify-between w-full"
872
883
  }, /*#__PURE__*/React.createElement("div", {
873
884
  className: "context-item"
@@ -907,7 +918,7 @@ var ContextMenu = function ContextMenu() {
907
918
  }, /*#__PURE__*/React.createElement("div", {
908
919
  className: "context-item p-2 w-full",
909
920
  style: {
910
- height: "40px"
921
+ height: "32px"
911
922
  }
912
923
  }, /*#__PURE__*/React.createElement(LucideIcon, {
913
924
  name: "Filter",
@@ -922,14 +933,22 @@ var ContextMenu = function ContextMenu() {
922
933
  }, /*#__PURE__*/React.createElement("div", {
923
934
  className: "context-item p-2 w-full",
924
935
  style: {
925
- height: "40px"
936
+ height: "32px"
926
937
  }
927
938
  }, /*#__PURE__*/React.createElement(LucideIcon, {
928
939
  name: "Eraser"
929
940
  }), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
930
941
  trigger: "mouseenter focus",
931
- hideOnClick: false
932
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
942
+ hideOnClick: false,
943
+ onShow: function onShow() {
944
+ setActiveMenu("filter");
945
+ },
946
+ onHide: function onHide() {
947
+ if (activeMenu === "filter") setActiveMenu("");
948
+ }
949
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
950
+ isActive: activeMenu === "filter"
951
+ }, /*#__PURE__*/React.createElement("div", {
933
952
  className: "flex items-center justify-between w-full"
934
953
  }, /*#__PURE__*/React.createElement("div", {
935
954
  className: "context-item"
@@ -983,6 +1002,12 @@ var ContextMenu = function ContextMenu() {
983
1002
  arrow: false,
984
1003
  zIndex: 3000,
985
1004
  appendTo: document.body,
1005
+ onShow: function onShow() {
1006
+ setActiveMenu("conditionFormat");
1007
+ },
1008
+ onHide: function onHide() {
1009
+ if (activeMenu === "conditionFormat") setActiveMenu("");
1010
+ },
986
1011
  content: /*#__PURE__*/React.createElement("div", {
987
1012
  style: {
988
1013
  minWidth: 220
@@ -993,7 +1018,9 @@ var ContextMenu = function ContextMenu() {
993
1018
  })),
994
1019
  trigger: "mouseenter focus",
995
1020
  hideOnClick: false
996
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
1021
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
1022
+ isActive: activeMenu === "conditionFormat"
1023
+ }, /*#__PURE__*/React.createElement("div", {
997
1024
  className: "flex items-center justify-between w-full"
998
1025
  }, /*#__PURE__*/React.createElement("div", {
999
1026
  className: "flex items-center gap-2 context-item"
@@ -1029,7 +1056,7 @@ var ContextMenu = function ContextMenu() {
1029
1056
  }), /*#__PURE__*/React.createElement("p", null, "Clear formatting")));
1030
1057
  }
1031
1058
  return null;
1032
- }, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError]);
1059
+ }, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError, activeMenu]);
1033
1060
  useLayoutEffect(function () {
1034
1061
  var _a;
1035
1062
  if (!containerRef.current) {
@@ -8,7 +8,7 @@ var __assign = this && this.__assign || function () {
8
8
  };
9
9
  return __assign.apply(this, arguments);
10
10
  };
11
- import React, { useContext, useState, useMemo, useCallback, useLayoutEffect } from "react";
11
+ import React, { useContext, useState, useMemo, useCallback, useLayoutEffect, useRef, useEffect } from "react";
12
12
  import { locale, saveHyperlink, removeHyperlink, replaceHtml, goToLink, isLinkValid } from "@fileverse-dev/fortune-core";
13
13
  import { Button, TextField, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, LucideIcon } from "@fileverse/ui";
14
14
  import "./index.css";
@@ -28,18 +28,24 @@ export var LinkEditCard = function LinkEditCard(_a) {
28
28
  context = _b.context,
29
29
  setContext = _b.setContext,
30
30
  refs = _b.refs;
31
- var _c = useState(originText),
32
- linkText = _c[0],
33
- setLinkText = _c[1];
34
- var _d = useState(originAddress),
35
- linkAddress = _d[0],
36
- setLinkAddress = _d[1];
37
- var _e = useState(originType),
38
- linkType = _e[0],
39
- setLinkType = _e[1];
40
- var _f = locale(context),
41
- insertLink = _f.insertLink,
42
- linkTypeList = _f.linkTypeList;
31
+ var cardRef = useRef(null);
32
+ var linkAddressRef = useRef(null);
33
+ var linkTextRef = useRef(null);
34
+ var _c = useState(position.cellBottom),
35
+ cardTop = _c[0],
36
+ setCardTop = _c[1];
37
+ var _d = useState(originText),
38
+ linkText = _d[0],
39
+ setLinkText = _d[1];
40
+ var _e = useState(originAddress),
41
+ linkAddress = _e[0],
42
+ setLinkAddress = _e[1];
43
+ var _f = useState(originType),
44
+ linkType = _f[0],
45
+ setLinkType = _f[1];
46
+ var _g = locale(context),
47
+ insertLink = _g.insertLink,
48
+ linkTypeList = _g.linkTypeList;
43
49
  var isLinkAddressValid = isLinkValid(context, linkType, linkAddress);
44
50
  var isButtonDisabled = useMemo(function () {
45
51
  if (!linkText.trim()) return true;
@@ -75,13 +81,20 @@ export var LinkEditCard = function LinkEditCard(_a) {
75
81
  return e.stopPropagation();
76
82
  },
77
83
  onKeyDown: function onKeyDown(e) {
78
- return e.stopPropagation();
84
+ e.stopPropagation();
85
+ if (isButtonDisabled) return;
86
+ if (e.key === "Enter") {
87
+ _.set(refs.globalCache, "linkCard.mouseEnter", false);
88
+ setContext(function (draftCtx) {
89
+ return saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
90
+ });
91
+ }
79
92
  },
80
93
  onDoubleClick: function onDoubleClick(e) {
81
94
  return e.stopPropagation();
82
95
  }
83
96
  };
84
- }, [refs.globalCache]);
97
+ }, [refs.globalCache, isButtonDisabled]);
85
98
  var renderToolbarButton = useCallback(function (iconId, onClick) {
86
99
  return /*#__PURE__*/React.createElement("div", {
87
100
  className: "fortune-toolbar-button",
@@ -100,6 +113,40 @@ export var LinkEditCard = function LinkEditCard(_a) {
100
113
  setLinkText(originText);
101
114
  setLinkType(originType);
102
115
  }, [rc, originAddress, originText, originType]);
116
+ useEffect(function () {
117
+ var dragHandle = document.querySelector(".luckysheet-cs-draghandle-top.luckysheet-cs-draghandle");
118
+ var card = cardRef.current;
119
+ if (!dragHandle || !card) {
120
+ setCardTop(position.cellBottom + 8);
121
+ return;
122
+ }
123
+ var dragRect = dragHandle.getBoundingClientRect();
124
+ var cardRect = card.getBoundingClientRect();
125
+ var viewportHeight = window.innerHeight;
126
+ var spaceBelow = viewportHeight - dragRect.bottom;
127
+ var spaceAbove = dragRect.top;
128
+ var newTop;
129
+ if (spaceBelow < cardRect.height + 16 && spaceAbove > cardRect.height + 16) {
130
+ var cellTop = position.cellBottom - 30;
131
+ newTop = cellTop - cardRect.height - 8;
132
+ } else {
133
+ newTop = position.cellBottom + 8;
134
+ }
135
+ setCardTop(newTop);
136
+ }, [position.cellBottom, isEditing]);
137
+ useEffect(function () {
138
+ var _a, _b;
139
+ if (linkAddressRef.current && !linkAddress && isEditing) {
140
+ (_a = linkAddressRef.current) === null || _a === void 0 ? void 0 : _a.focus({
141
+ preventScroll: true
142
+ });
143
+ }
144
+ if (linkTextRef.current && !linkText && isEditing) {
145
+ (_b = linkTextRef.current) === null || _b === void 0 ? void 0 : _b.focus({
146
+ preventScroll: true
147
+ });
148
+ }
149
+ }, [linkAddressRef, isEditing, linkTextRef]);
103
150
  if (!isEditing) {
104
151
  return /*#__PURE__*/React.createElement("div", __assign({}, containerEvent, {
105
152
  onKeyDown: function onKeyDown(e) {
@@ -142,9 +189,10 @@ export var LinkEditCard = function LinkEditCard(_a) {
142
189
  }
143
190
  return /*#__PURE__*/React.createElement("div", __assign({
144
191
  className: "fortune-link-card",
192
+ ref: cardRef,
145
193
  style: {
146
194
  left: position.cellLeft + 20,
147
- top: position.cellBottom
195
+ top: cardTop
148
196
  }
149
197
  }, containerEvent), /*#__PURE__*/React.createElement(Select, {
150
198
  value: linkType,
@@ -177,6 +225,7 @@ export var LinkEditCard = function LinkEditCard(_a) {
177
225
  }, /*#__PURE__*/React.createElement(LucideIcon, {
178
226
  name: "ALargeSmall"
179
227
  })), /*#__PURE__*/React.createElement(TextField, {
228
+ ref: linkTextRef,
180
229
  placeholder: "Display text",
181
230
  value: linkText,
182
231
  onChange: function onChange(e) {
@@ -192,6 +241,7 @@ export var LinkEditCard = function LinkEditCard(_a) {
192
241
  width: 16,
193
242
  height: 16
194
243
  })), /*#__PURE__*/React.createElement(TextField, {
244
+ ref: linkAddressRef,
195
245
  placeholder: "Paste URL",
196
246
  value: linkAddress,
197
247
  onChange: function onChange(e) {
@@ -44,8 +44,6 @@ var NotationBoxes = function NotationBoxes() {
44
44
  rc = commentBox.rc,
45
45
  left = commentBox.left,
46
46
  top = commentBox.top,
47
- width = commentBox.width,
48
- height = commentBox.height,
49
47
  size = commentBox.size;
50
48
  var isEditing = ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc) === rc;
51
49
  var commentId = "comment-box-".concat(rc);
@@ -65,19 +63,12 @@ var NotationBoxes = function NotationBoxes() {
65
63
  }
66
64
  }), /*#__PURE__*/React.createElement("div", {
67
65
  id: commentId,
68
- className: "luckysheet-postil-show-main",
69
66
  style: {
70
- width: width,
71
- height: height,
72
- color: "#000",
73
- padding: 5,
74
- border: "1px solid #000",
75
- backgroundColor: "rgb(255,255,225)",
76
67
  position: "absolute",
77
68
  left: left,
78
69
  top: top,
79
- boxSizing: "border-box",
80
- zIndex: isEditing ? 200 : 100
70
+ zIndex: isEditing ? 200 : 100,
71
+ boxShadow: "0 1px 1px #0000002e,0 4px 8px #0000001a"
81
72
  },
82
73
  onMouseDown: function onMouseDown(e) {
83
74
  var nativeEvent = e.nativeEvent;
@@ -329,13 +329,12 @@ var ColumnHeader = function ColumnHeader() {
329
329
  c1 = _a.c1,
330
330
  c2 = _a.c2;
331
331
  return /*#__PURE__*/React.createElement("div", {
332
- className: "fortune-col-header-selected",
332
+ className: "fortune-col-header-selected color-bg-tertiary",
333
333
  key: i,
334
334
  style: _.assign({
335
335
  left: col_pre,
336
336
  width: col - col_pre - 1,
337
337
  display: "block",
338
- backgroundColor: "#EFC703",
339
338
  mixBlendMode: "multiply"
340
339
  }, fixColumnStyleOverflowInFreeze(context, c1, c2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
341
340
  });
@@ -6,7 +6,6 @@
6
6
  background: #fff;
7
7
  z-index: 1003;
8
8
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
9
- border: 1px solid lavender;
10
9
  border-radius: 10px;
11
10
  }
12
11
 
@@ -53,7 +53,7 @@ var FormulaSearch = function FormulaSearch(props) {
53
53
  });
54
54
  if (_.isEmpty(context.functionCandidates) && _.isEmpty(context.defaultCandidates)) return null;
55
55
  return /*#__PURE__*/React.createElement("div", {
56
- className: "flex flex-col luckysheet-formula-search-c-p custom-scroll",
56
+ className: "flex color-border-default border flex-col luckysheet-formula-search-c-p custom-scroll",
57
57
  id: "luckysheet-formula-search-c-p",
58
58
  style: {
59
59
  top: top
@@ -300,13 +300,12 @@ var RowHeader = function RowHeader() {
300
300
  r1 = _a.r1,
301
301
  r2 = _a.r2;
302
302
  return /*#__PURE__*/React.createElement("div", {
303
- className: "fortune-row-header-selected",
303
+ className: "fortune-row-header-selected color-bg-tertiary",
304
304
  key: i,
305
305
  style: _.assign({
306
306
  top: row_pre,
307
307
  height: row - row_pre - 1,
308
308
  display: "block",
309
- backgroundColor: "#EFC703",
310
309
  mixBlendMode: "multiply"
311
310
  }, fixRowStyleOverflowInFreeze(context, r1, r2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
312
311
  });
@@ -45,12 +45,10 @@
45
45
  .fortune-row-header-selected {
46
46
  position: absolute;
47
47
  z-index: 10;
48
- border-right: 1px solid #0188fb;
49
48
  right: 0;
50
49
  width: 100%;
51
50
  margin-top: 2px;
52
51
  display: none;
53
- background-color: rgba(76, 76, 76, 0.1);
54
52
  }
55
53
 
56
54
  .fortune-col-header-wrap {
@@ -94,12 +92,10 @@
94
92
  cursor: default;
95
93
  position: absolute;
96
94
  z-index: 10;
97
- border-bottom: 1px solid #0188fb;
98
95
  bottom: 0;
99
96
  height: 100%;
100
97
  margin-left: 0px;
101
98
  display: none;
102
- background-color: rgba(76, 76, 76, 0.1);
103
99
  }
104
100
 
105
101
  .fortune-left-top {
@@ -137,7 +133,7 @@
137
133
  z-index: 14;
138
134
  /*border:1px solid #fff;*/
139
135
  margin: 0px 0 0 0px;
140
- background: rgba(0, 80, 208, 0.15);
136
+ /* background: rgba(0, 80, 208, 0.15); */
141
137
  display: none;
142
138
  }
143
139
 
@@ -199,9 +195,9 @@
199
195
  z-index: 15;
200
196
  border: 2.5px solid #efc703;
201
197
  margin: -1px 0 0 -1px;
202
- background: rgba(1, 136, 251, 0.15);
203
198
  display: none;
204
199
  box-sizing: content-box;
200
+ background: rgba(239, 199, 5, 0.02);
205
201
  }
206
202
 
207
203
  .luckysheet-cs-inner-border {
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo, useRef, useState } from "react";
2
- import { IconButton, Tooltip, Popover, PopoverContent, PopoverTrigger, cn, Button } from "@fileverse/ui";
2
+ import { IconButton, Tooltip, Popover, PopoverContent, PopoverTrigger, cn, Button, LucideIcon } from "@fileverse/ui";
3
3
  import SVGIcon from "../SVGIcon";
4
4
  import { getLucideIcon } from ".";
5
5
  var Combo = function Combo(_a) {
@@ -49,7 +49,10 @@ var Combo = function Combo(_a) {
49
49
  height: 16
50
50
  })) : (/*#__PURE__*/React.createElement("span", {
51
51
  className: "fortune-toolbar-combo-text"
52
- }, text !== undefined ? text : ""))))) : (/*#__PURE__*/React.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/React.createElement(Tooltip, {
52
+ }, text !== undefined ? text : "")), /*#__PURE__*/React.createElement(LucideIcon, {
53
+ className: "w-[16px] h-[16px]",
54
+ name: "ChevronDown"
55
+ })))) : (/*#__PURE__*/React.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/React.createElement(Tooltip, {
53
56
  text: tooltip,
54
57
  placement: "bottom"
55
58
  }, /*#__PURE__*/React.createElement(Button, {
@@ -27,7 +27,7 @@ var Option = function Option(_a) {
27
27
  }, iconId && /*#__PURE__*/React.createElement(SVGIcon, {
28
28
  name: iconId
29
29
  }), /*#__PURE__*/React.createElement("div", {
30
- className: "fortuen-toolbar-text color-text-default text-body-sm"
30
+ className: "fortuen-toolbar-text color-text-default text-body-sm w-full"
31
31
  }, children));
32
32
  };
33
33
  export { Option };
@@ -141,14 +141,30 @@
141
141
 
142
142
  .fortune-toolbar-combo-button {
143
143
  font-size: 12px;
144
+ padding-top: 4px;
145
+ padding-bottom: 4px;
146
+ padding-left: 8px;
147
+ padding-right: 8px;
148
+ border-radius: 4px;
149
+ gap: 8px;
150
+ }
151
+ .fortune-toolbar-combo-button:hover {
152
+ background: hsl(var(--color-bg-default-hover));
144
153
  }
145
154
 
146
155
  .fortune-toolbar-select-option {
147
156
  font-size: 12px;
148
157
  min-width: 60px;
149
- padding: 8px;
158
+ padding-left: 8px;
159
+ padding-right: 8px;
160
+ padding-top: 6px;
161
+ padding-bottom: 6px;
150
162
  cursor: pointer;
151
163
  user-select: none;
164
+ height: 32px;
165
+ display: flex;
166
+ align-items: center;
167
+
152
168
  }
153
169
 
154
170
  .fortune-toolbar-select-option:hover {
@@ -171,6 +187,10 @@
171
187
  font-weight: 500;
172
188
  font-size: 14px;
173
189
  line-height: 20px;
190
+ max-width: 56px;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ white-space: nowrap;
174
194
  }
175
195
 
176
196
  .fortune-toolbar-color-picker-item {
@@ -22,6 +22,8 @@
22
22
  z-index: 1005;
23
23
  border-radius: 4px;
24
24
  cursor: pointer;
25
+ align-items: center;
26
+ height: 32px;
25
27
  }
26
28
 
27
29
  .condition-format-item:hover {
@@ -3,6 +3,7 @@ type Props = React.PropsWithChildren<{
3
3
  onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
4
4
  onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
5
5
  onMouseEnter?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
6
+ isActive?: boolean;
6
7
  }>;
7
8
  declare const Menu: React.FC<Props>;
8
9
  export default Menu;
@@ -5,17 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _ui = require("@fileverse/ui");
8
9
  var _react = _interopRequireWildcard(require("react"));
9
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
10
11
  var Menu = function Menu(_a) {
11
12
  var _onClick = _a.onClick,
12
13
  _onMouseLeave = _a.onMouseLeave,
13
14
  _onMouseEnter = _a.onMouseEnter,
14
- children = _a.children;
15
+ children = _a.children,
16
+ _b = _a.isActive,
17
+ isActive = _b === void 0 ? false : _b;
15
18
  var containerRef = (0, _react.useRef)(null);
16
19
  return /*#__PURE__*/_react.default.createElement("div", {
17
20
  ref: containerRef,
18
- className: "luckysheet-cols-menuitem luckysheet-mousedown-cancel",
21
+ className: (0, _ui.cn)("luckysheet-cols-menuitem luckysheet-mousedown-cancel", isActive && "color-bg-default-hover"),
19
22
  onClick: function onClick(e) {
20
23
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(e, containerRef.current);
21
24
  },
@@ -82,7 +82,10 @@
82
82
  cursor: pointer;
83
83
  list-style: none;
84
84
  margin: 0;
85
- padding: 8px !important;
85
+ padding-right: 8px !important;
86
+ padding-left: 8px !important;
87
+ padding-top: 6px !important;
88
+ padding-bottom: 6px !important;
86
89
  white-space: nowrap;
87
90
  user-select: none;
88
91
  display: flex;
@@ -158,6 +158,9 @@ var ContextMenu = function ContextMenu() {
158
158
  info = _b.info,
159
159
  toolbar = _b.toolbar,
160
160
  splitText = _b.splitText;
161
+ var _c = (0, _react.useState)(""),
162
+ activeMenu = _c[0],
163
+ setActiveMenu = _c[1];
161
164
  var addRowColRightAvobe = function addRowColRightAvobe(type, direction) {
162
165
  var _a, _b, _c, _d, _e, _f;
163
166
  var positionCol = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c[0];
@@ -838,6 +841,12 @@ var ContextMenu = function ContextMenu() {
838
841
  arrow: false,
839
842
  zIndex: 3000,
840
843
  appendTo: document.body,
844
+ onShow: function onShow() {
845
+ setActiveMenu("sort");
846
+ },
847
+ onHide: function onHide() {
848
+ if (activeMenu === "sort") setActiveMenu("");
849
+ },
841
850
  content: /*#__PURE__*/_react.default.createElement("div", {
842
851
  className: "fortune-toolbar-select",
843
852
  style: {
@@ -876,7 +885,9 @@ var ContextMenu = function ContextMenu() {
876
885
  }), /*#__PURE__*/_react.default.createElement("p", null, sort.desc))))),
877
886
  trigger: "mouseenter focus",
878
887
  hideOnClick: false
879
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, null, /*#__PURE__*/_react.default.createElement("div", {
888
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
889
+ isActive: activeMenu === "sort"
890
+ }, /*#__PURE__*/_react.default.createElement("div", {
880
891
  className: "flex items-center justify-between w-full"
881
892
  }, /*#__PURE__*/_react.default.createElement("div", {
882
893
  className: "context-item"
@@ -916,7 +927,7 @@ var ContextMenu = function ContextMenu() {
916
927
  }, /*#__PURE__*/_react.default.createElement("div", {
917
928
  className: "context-item p-2 w-full",
918
929
  style: {
919
- height: "40px"
930
+ height: "32px"
920
931
  }
921
932
  }, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
922
933
  name: "Filter",
@@ -931,14 +942,22 @@ var ContextMenu = function ContextMenu() {
931
942
  }, /*#__PURE__*/_react.default.createElement("div", {
932
943
  className: "context-item p-2 w-full",
933
944
  style: {
934
- height: "40px"
945
+ height: "32px"
935
946
  }
936
947
  }, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
937
948
  name: "Eraser"
938
949
  }), /*#__PURE__*/_react.default.createElement("p", null, filter.clearFilter))))),
939
950
  trigger: "mouseenter focus",
940
- hideOnClick: false
941
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, null, /*#__PURE__*/_react.default.createElement("div", {
951
+ hideOnClick: false,
952
+ onShow: function onShow() {
953
+ setActiveMenu("filter");
954
+ },
955
+ onHide: function onHide() {
956
+ if (activeMenu === "filter") setActiveMenu("");
957
+ }
958
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
959
+ isActive: activeMenu === "filter"
960
+ }, /*#__PURE__*/_react.default.createElement("div", {
942
961
  className: "flex items-center justify-between w-full"
943
962
  }, /*#__PURE__*/_react.default.createElement("div", {
944
963
  className: "context-item"
@@ -992,6 +1011,12 @@ var ContextMenu = function ContextMenu() {
992
1011
  arrow: false,
993
1012
  zIndex: 3000,
994
1013
  appendTo: document.body,
1014
+ onShow: function onShow() {
1015
+ setActiveMenu("conditionFormat");
1016
+ },
1017
+ onHide: function onHide() {
1018
+ if (activeMenu === "conditionFormat") setActiveMenu("");
1019
+ },
995
1020
  content: /*#__PURE__*/_react.default.createElement("div", {
996
1021
  style: {
997
1022
  minWidth: 220
@@ -1002,7 +1027,9 @@ var ContextMenu = function ContextMenu() {
1002
1027
  })),
1003
1028
  trigger: "mouseenter focus",
1004
1029
  hideOnClick: false
1005
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, null, /*#__PURE__*/_react.default.createElement("div", {
1030
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
1031
+ isActive: activeMenu === "conditionFormat"
1032
+ }, /*#__PURE__*/_react.default.createElement("div", {
1006
1033
  className: "flex items-center justify-between w-full"
1007
1034
  }, /*#__PURE__*/_react.default.createElement("div", {
1008
1035
  className: "flex items-center gap-2 context-item"
@@ -1038,7 +1065,7 @@ var ContextMenu = function ContextMenu() {
1038
1065
  }), /*#__PURE__*/_react.default.createElement("p", null, "Clear formatting")));
1039
1066
  }
1040
1067
  return null;
1041
- }, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError]);
1068
+ }, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError, activeMenu]);
1042
1069
  (0, _react.useLayoutEffect)(function () {
1043
1070
  var _a;
1044
1071
  if (!containerRef.current) {
@@ -37,18 +37,24 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
37
37
  context = _b.context,
38
38
  setContext = _b.setContext,
39
39
  refs = _b.refs;
40
- var _c = (0, _react.useState)(originText),
41
- linkText = _c[0],
42
- setLinkText = _c[1];
43
- var _d = (0, _react.useState)(originAddress),
44
- linkAddress = _d[0],
45
- setLinkAddress = _d[1];
46
- var _e = (0, _react.useState)(originType),
47
- linkType = _e[0],
48
- setLinkType = _e[1];
49
- var _f = (0, _fortuneCore.locale)(context),
50
- insertLink = _f.insertLink,
51
- linkTypeList = _f.linkTypeList;
40
+ var cardRef = (0, _react.useRef)(null);
41
+ var linkAddressRef = (0, _react.useRef)(null);
42
+ var linkTextRef = (0, _react.useRef)(null);
43
+ var _c = (0, _react.useState)(position.cellBottom),
44
+ cardTop = _c[0],
45
+ setCardTop = _c[1];
46
+ var _d = (0, _react.useState)(originText),
47
+ linkText = _d[0],
48
+ setLinkText = _d[1];
49
+ var _e = (0, _react.useState)(originAddress),
50
+ linkAddress = _e[0],
51
+ setLinkAddress = _e[1];
52
+ var _f = (0, _react.useState)(originType),
53
+ linkType = _f[0],
54
+ setLinkType = _f[1];
55
+ var _g = (0, _fortuneCore.locale)(context),
56
+ insertLink = _g.insertLink,
57
+ linkTypeList = _g.linkTypeList;
52
58
  var isLinkAddressValid = (0, _fortuneCore.isLinkValid)(context, linkType, linkAddress);
53
59
  var isButtonDisabled = (0, _react.useMemo)(function () {
54
60
  if (!linkText.trim()) return true;
@@ -84,13 +90,20 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
84
90
  return e.stopPropagation();
85
91
  },
86
92
  onKeyDown: function onKeyDown(e) {
87
- return e.stopPropagation();
93
+ e.stopPropagation();
94
+ if (isButtonDisabled) return;
95
+ if (e.key === "Enter") {
96
+ _lodash.default.set(refs.globalCache, "linkCard.mouseEnter", false);
97
+ setContext(function (draftCtx) {
98
+ return (0, _fortuneCore.saveHyperlink)(draftCtx, r, c, linkText, linkType, linkAddress);
99
+ });
100
+ }
88
101
  },
89
102
  onDoubleClick: function onDoubleClick(e) {
90
103
  return e.stopPropagation();
91
104
  }
92
105
  };
93
- }, [refs.globalCache]);
106
+ }, [refs.globalCache, isButtonDisabled]);
94
107
  var renderToolbarButton = (0, _react.useCallback)(function (iconId, onClick) {
95
108
  return /*#__PURE__*/_react.default.createElement("div", {
96
109
  className: "fortune-toolbar-button",
@@ -109,6 +122,40 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
109
122
  setLinkText(originText);
110
123
  setLinkType(originType);
111
124
  }, [rc, originAddress, originText, originType]);
125
+ (0, _react.useEffect)(function () {
126
+ var dragHandle = document.querySelector(".luckysheet-cs-draghandle-top.luckysheet-cs-draghandle");
127
+ var card = cardRef.current;
128
+ if (!dragHandle || !card) {
129
+ setCardTop(position.cellBottom + 8);
130
+ return;
131
+ }
132
+ var dragRect = dragHandle.getBoundingClientRect();
133
+ var cardRect = card.getBoundingClientRect();
134
+ var viewportHeight = window.innerHeight;
135
+ var spaceBelow = viewportHeight - dragRect.bottom;
136
+ var spaceAbove = dragRect.top;
137
+ var newTop;
138
+ if (spaceBelow < cardRect.height + 16 && spaceAbove > cardRect.height + 16) {
139
+ var cellTop = position.cellBottom - 30;
140
+ newTop = cellTop - cardRect.height - 8;
141
+ } else {
142
+ newTop = position.cellBottom + 8;
143
+ }
144
+ setCardTop(newTop);
145
+ }, [position.cellBottom, isEditing]);
146
+ (0, _react.useEffect)(function () {
147
+ var _a, _b;
148
+ if (linkAddressRef.current && !linkAddress && isEditing) {
149
+ (_a = linkAddressRef.current) === null || _a === void 0 ? void 0 : _a.focus({
150
+ preventScroll: true
151
+ });
152
+ }
153
+ if (linkTextRef.current && !linkText && isEditing) {
154
+ (_b = linkTextRef.current) === null || _b === void 0 ? void 0 : _b.focus({
155
+ preventScroll: true
156
+ });
157
+ }
158
+ }, [linkAddressRef, isEditing, linkTextRef]);
112
159
  if (!isEditing) {
113
160
  return /*#__PURE__*/_react.default.createElement("div", __assign({}, containerEvent, {
114
161
  onKeyDown: function onKeyDown(e) {
@@ -151,9 +198,10 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
151
198
  }
152
199
  return /*#__PURE__*/_react.default.createElement("div", __assign({
153
200
  className: "fortune-link-card",
201
+ ref: cardRef,
154
202
  style: {
155
203
  left: position.cellLeft + 20,
156
- top: position.cellBottom
204
+ top: cardTop
157
205
  }
158
206
  }, containerEvent), /*#__PURE__*/_react.default.createElement(_ui.Select, {
159
207
  value: linkType,
@@ -186,6 +234,7 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
186
234
  }, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
187
235
  name: "ALargeSmall"
188
236
  })), /*#__PURE__*/_react.default.createElement(_ui.TextField, {
237
+ ref: linkTextRef,
189
238
  placeholder: "Display text",
190
239
  value: linkText,
191
240
  onChange: function onChange(e) {
@@ -201,6 +250,7 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
201
250
  width: 16,
202
251
  height: 16
203
252
  })), /*#__PURE__*/_react.default.createElement(_ui.TextField, {
253
+ ref: linkAddressRef,
204
254
  placeholder: "Paste URL",
205
255
  value: linkAddress,
206
256
  onChange: function onChange(e) {
@@ -53,8 +53,6 @@ var NotationBoxes = function NotationBoxes() {
53
53
  rc = commentBox.rc,
54
54
  left = commentBox.left,
55
55
  top = commentBox.top,
56
- width = commentBox.width,
57
- height = commentBox.height,
58
56
  size = commentBox.size;
59
57
  var isEditing = ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc) === rc;
60
58
  var commentId = "comment-box-".concat(rc);
@@ -74,19 +72,12 @@ var NotationBoxes = function NotationBoxes() {
74
72
  }
75
73
  }), /*#__PURE__*/_react.default.createElement("div", {
76
74
  id: commentId,
77
- className: "luckysheet-postil-show-main",
78
75
  style: {
79
- width: width,
80
- height: height,
81
- color: "#000",
82
- padding: 5,
83
- border: "1px solid #000",
84
- backgroundColor: "rgb(255,255,225)",
85
76
  position: "absolute",
86
77
  left: left,
87
78
  top: top,
88
- boxSizing: "border-box",
89
- zIndex: isEditing ? 200 : 100
79
+ zIndex: isEditing ? 200 : 100,
80
+ boxShadow: "0 1px 1px #0000002e,0 4px 8px #0000001a"
90
81
  },
91
82
  onMouseDown: function onMouseDown(e) {
92
83
  var nativeEvent = e.nativeEvent;
@@ -338,13 +338,12 @@ var ColumnHeader = function ColumnHeader() {
338
338
  c1 = _a.c1,
339
339
  c2 = _a.c2;
340
340
  return /*#__PURE__*/_react.default.createElement("div", {
341
- className: "fortune-col-header-selected",
341
+ className: "fortune-col-header-selected color-bg-tertiary",
342
342
  key: i,
343
343
  style: _lodash.default.assign({
344
344
  left: col_pre,
345
345
  width: col - col_pre - 1,
346
346
  display: "block",
347
- backgroundColor: "#EFC703",
348
347
  mixBlendMode: "multiply"
349
348
  }, (0, _fortuneCore.fixColumnStyleOverflowInFreeze)(context, c1, c2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
350
349
  });
@@ -6,7 +6,6 @@
6
6
  background: #fff;
7
7
  z-index: 1003;
8
8
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
9
- border: 1px solid lavender;
10
9
  border-radius: 10px;
11
10
  }
12
11
 
@@ -62,7 +62,7 @@ var FormulaSearch = function FormulaSearch(props) {
62
62
  });
63
63
  if (_lodash.default.isEmpty(context.functionCandidates) && _lodash.default.isEmpty(context.defaultCandidates)) return null;
64
64
  return /*#__PURE__*/_react.default.createElement("div", {
65
- className: "flex flex-col luckysheet-formula-search-c-p custom-scroll",
65
+ className: "flex color-border-default border flex-col luckysheet-formula-search-c-p custom-scroll",
66
66
  id: "luckysheet-formula-search-c-p",
67
67
  style: {
68
68
  top: top
@@ -309,13 +309,12 @@ var RowHeader = function RowHeader() {
309
309
  r1 = _a.r1,
310
310
  r2 = _a.r2;
311
311
  return /*#__PURE__*/_react.default.createElement("div", {
312
- className: "fortune-row-header-selected",
312
+ className: "fortune-row-header-selected color-bg-tertiary",
313
313
  key: i,
314
314
  style: _lodash.default.assign({
315
315
  top: row_pre,
316
316
  height: row - row_pre - 1,
317
317
  display: "block",
318
- backgroundColor: "#EFC703",
319
318
  mixBlendMode: "multiply"
320
319
  }, (0, _fortuneCore.fixRowStyleOverflowInFreeze)(context, r1, r2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
321
320
  });
@@ -45,12 +45,10 @@
45
45
  .fortune-row-header-selected {
46
46
  position: absolute;
47
47
  z-index: 10;
48
- border-right: 1px solid #0188fb;
49
48
  right: 0;
50
49
  width: 100%;
51
50
  margin-top: 2px;
52
51
  display: none;
53
- background-color: rgba(76, 76, 76, 0.1);
54
52
  }
55
53
 
56
54
  .fortune-col-header-wrap {
@@ -94,12 +92,10 @@
94
92
  cursor: default;
95
93
  position: absolute;
96
94
  z-index: 10;
97
- border-bottom: 1px solid #0188fb;
98
95
  bottom: 0;
99
96
  height: 100%;
100
97
  margin-left: 0px;
101
98
  display: none;
102
- background-color: rgba(76, 76, 76, 0.1);
103
99
  }
104
100
 
105
101
  .fortune-left-top {
@@ -137,7 +133,7 @@
137
133
  z-index: 14;
138
134
  /*border:1px solid #fff;*/
139
135
  margin: 0px 0 0 0px;
140
- background: rgba(0, 80, 208, 0.15);
136
+ /* background: rgba(0, 80, 208, 0.15); */
141
137
  display: none;
142
138
  }
143
139
 
@@ -199,9 +195,9 @@
199
195
  z-index: 15;
200
196
  border: 2.5px solid #efc703;
201
197
  margin: -1px 0 0 -1px;
202
- background: rgba(1, 136, 251, 0.15);
203
198
  display: none;
204
199
  box-sizing: content-box;
200
+ background: rgba(239, 199, 5, 0.02);
205
201
  }
206
202
 
207
203
  .luckysheet-cs-inner-border {
@@ -58,7 +58,10 @@ var Combo = function Combo(_a) {
58
58
  height: 16
59
59
  })) : (/*#__PURE__*/_react.default.createElement("span", {
60
60
  className: "fortune-toolbar-combo-text"
61
- }, text !== undefined ? text : ""))))) : (/*#__PURE__*/_react.default.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
61
+ }, text !== undefined ? text : "")), /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
62
+ className: "w-[16px] h-[16px]",
63
+ name: "ChevronDown"
64
+ })))) : (/*#__PURE__*/_react.default.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
62
65
  text: tooltip,
63
66
  placement: "bottom"
64
67
  }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
@@ -34,7 +34,7 @@ var Option = exports.Option = function Option(_a) {
34
34
  }, iconId && /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
35
35
  name: iconId
36
36
  }), /*#__PURE__*/_react.default.createElement("div", {
37
- className: "fortuen-toolbar-text color-text-default text-body-sm"
37
+ className: "fortuen-toolbar-text color-text-default text-body-sm w-full"
38
38
  }, children));
39
39
  };
40
40
  var _default = exports.default = Select;
@@ -141,14 +141,30 @@
141
141
 
142
142
  .fortune-toolbar-combo-button {
143
143
  font-size: 12px;
144
+ padding-top: 4px;
145
+ padding-bottom: 4px;
146
+ padding-left: 8px;
147
+ padding-right: 8px;
148
+ border-radius: 4px;
149
+ gap: 8px;
150
+ }
151
+ .fortune-toolbar-combo-button:hover {
152
+ background: hsl(var(--color-bg-default-hover));
144
153
  }
145
154
 
146
155
  .fortune-toolbar-select-option {
147
156
  font-size: 12px;
148
157
  min-width: 60px;
149
- padding: 8px;
158
+ padding-left: 8px;
159
+ padding-right: 8px;
160
+ padding-top: 6px;
161
+ padding-bottom: 6px;
150
162
  cursor: pointer;
151
163
  user-select: none;
164
+ height: 32px;
165
+ display: flex;
166
+ align-items: center;
167
+
152
168
  }
153
169
 
154
170
  .fortune-toolbar-select-option:hover {
@@ -171,6 +187,10 @@
171
187
  font-weight: 500;
172
188
  font-size: 14px;
173
189
  line-height: 20px;
190
+ max-width: 56px;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ white-space: nowrap;
174
194
  }
175
195
 
176
196
  .fortune-toolbar-color-picker-item {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.9",
3
+ "version": "1.2.10-oc-1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.2.9",
19
+ "@fileverse-dev/fortune-core": "1.2.10-oc-1",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",