@fileverse-dev/fortune-react 1.0.2-mod-107 → 1.0.2-mod-109

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.
@@ -6,6 +6,7 @@ type Props = {
6
6
  showArrow?: boolean;
7
7
  onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
8
8
  children: (setOpen: React.Dispatch<React.SetStateAction<boolean>>) => React.ReactNode;
9
+ fillColor?: string;
9
10
  };
10
11
  declare const Combo: React.FC<Props>;
11
12
  export default Combo;
package/dist/index.css CHANGED
@@ -1627,28 +1627,12 @@ line-height: 16px; /* 133.333% */
1627
1627
 
1628
1628
  .fortune-insert-button {
1629
1629
  width: 100% !important;
1630
- background-color: #000 !important;
1631
- color: white !important;
1632
1630
  border: none !important;
1633
1631
  border-radius: 6px !important;
1634
1632
  padding: 12px !important;
1635
1633
  font-weight: 500 !important;
1636
1634
  }
1637
1635
 
1638
- .fortune-insert-button:hover {
1639
- background-color: #333 !important;
1640
- }
1641
-
1642
- .fortune-insert-button:disabled {
1643
- background-color: #ccc !important;
1644
- color: #666 !important;
1645
- cursor: not-allowed !important;
1646
- }
1647
-
1648
- .fortune-insert-button:disabled:hover {
1649
- background-color: #ccc !important;
1650
- }
1651
-
1652
1636
  .fortune-link-modify-modal.link-toolbar {
1653
1637
  display: flex;
1654
1638
  flex-direction: row;
@@ -2672,6 +2656,10 @@ input[type="number"].condition-rules-project-input {
2672
2656
  gap: 4px;
2673
2657
  }
2674
2658
 
2659
+ .custom-color-button > svg > path:first-child {
2660
+ display: none !important;
2661
+ }
2662
+
2675
2663
  #fortune-split-column {
2676
2664
  /* position: absolute;
2677
2665
  padding: 30px 42px;
@@ -1627,28 +1627,12 @@ line-height: 16px; /* 133.333% */
1627
1627
 
1628
1628
  .fortune-insert-button {
1629
1629
  width: 100% !important;
1630
- background-color: #000 !important;
1631
- color: white !important;
1632
1630
  border: none !important;
1633
1631
  border-radius: 6px !important;
1634
1632
  padding: 12px !important;
1635
1633
  font-weight: 500 !important;
1636
1634
  }
1637
1635
 
1638
- .fortune-insert-button:hover {
1639
- background-color: #333 !important;
1640
- }
1641
-
1642
- .fortune-insert-button:disabled {
1643
- background-color: #ccc !important;
1644
- color: #666 !important;
1645
- cursor: not-allowed !important;
1646
- }
1647
-
1648
- .fortune-insert-button:disabled:hover {
1649
- background-color: #ccc !important;
1650
- }
1651
-
1652
1636
  .fortune-link-modify-modal.link-toolbar {
1653
1637
  display: flex;
1654
1638
  flex-direction: row;
@@ -2672,6 +2656,10 @@ input[type="number"].condition-rules-project-input {
2672
2656
  gap: 4px;
2673
2657
  }
2674
2658
 
2659
+ .custom-color-button > svg > path:first-child {
2660
+ display: none !important;
2661
+ }
2662
+
2675
2663
  #fortune-split-column {
2676
2664
  /* position: absolute;
2677
2665
  padding: 30px 42px;
package/dist/index.esm.js CHANGED
@@ -1110,7 +1110,7 @@ var FormulaHint = function FormulaHint(props) {
1110
1110
  style: {
1111
1111
  display: "flex",
1112
1112
  justifyContent: "end",
1113
- minWidth: "68px",
1113
+ minWidth: "75px",
1114
1114
  height: "20px",
1115
1115
  alignItems: "center",
1116
1116
  gap: "6px"
@@ -1121,6 +1121,12 @@ var FormulaHint = function FormulaHint(props) {
1121
1121
  style: {
1122
1122
  width: "16px"
1123
1123
  }
1124
+ })), fn.SECONDARY_LOGO && (/*#__PURE__*/React.createElement("img", {
1125
+ src: fn.SECONDARY_LOGO,
1126
+ alt: "Service Logo",
1127
+ style: {
1128
+ width: "16px"
1129
+ }
1124
1130
  })), fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
1125
1131
  style: {
1126
1132
  borderRadius: "4px",
@@ -1936,7 +1942,7 @@ var SearchReplace = function SearchReplace(_ref) {
1936
1942
  }), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React.createElement(Divider$2, {
1937
1943
  className: "w-full border-t-[1px]"
1938
1944
  }), /*#__PURE__*/React.createElement("div", {
1939
- className: "flex flex-row gap-2 justify-center items-center mb-4"
1945
+ className: "flex flex-row gap-2 justify-end items-center mb-4"
1940
1946
  }, /*#__PURE__*/React.createElement(Button$1, {
1941
1947
  id: "replaceAllBtn",
1942
1948
  variant: "secondary",
@@ -4558,7 +4564,7 @@ var Button = function Button(_ref) {
4558
4564
  tabIndex: 0,
4559
4565
  role: "button",
4560
4566
  style: selected ? {
4561
- backgroundColor: "#E7E5EB"
4567
+ backgroundColor: "#FFDF0A"
4562
4568
  } : style
4563
4569
  }, /*#__PURE__*/React.createElement(LucideIcon, {
4564
4570
  name: getLucideIcon(iconId),
@@ -4588,7 +4594,8 @@ var Combo = function Combo(_ref) {
4588
4594
  iconId = _ref.iconId,
4589
4595
  _ref$showArrow = _ref.showArrow,
4590
4596
  showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
4591
- children = _ref.children;
4597
+ children = _ref.children,
4598
+ fillColor = _ref.fillColor;
4592
4599
  var style = {
4593
4600
  userSelect: "none"
4594
4601
  };
@@ -4598,7 +4605,7 @@ var Combo = function Combo(_ref) {
4598
4605
  setOpen = _useState2[1];
4599
4606
  var buttonRef = useRef(null);
4600
4607
  var isLucideIcon = useMemo(function () {
4601
- return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
4608
+ return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background"].includes(iconId);
4602
4609
  }, [iconId]);
4603
4610
  var trigger = !isLucideIcon ? (/*#__PURE__*/React.createElement(Tooltip, {
4604
4611
  text: tooltip,
@@ -4629,7 +4636,12 @@ var Combo = function Combo(_ref) {
4629
4636
  onClick: function onClick() {
4630
4637
  return setOpen(!open);
4631
4638
  },
4632
- className: "fortune-toolbar-combo-button"
4639
+ className: cn("fortune-toolbar-combo-button", {
4640
+ "custom-color-button": iconId === "font-color" && fillColor
4641
+ }),
4642
+ style: {
4643
+ color: iconId === "font-color" ? fillColor : undefined
4644
+ }
4633
4645
  })));
4634
4646
  return /*#__PURE__*/React.createElement("div", {
4635
4647
  ref: buttonRef,
@@ -5336,7 +5348,7 @@ var CustomButton = function CustomButton(_ref) {
5336
5348
  tabIndex: 0,
5337
5349
  role: "button",
5338
5350
  style: selected ? {
5339
- backgroundColor: "#E7E5EB"
5351
+ backgroundColor: "#FFDF0A"
5340
5352
  } : {}
5341
5353
  }, /*#__PURE__*/React.createElement(CustomIcon, {
5342
5354
  width: 16,
@@ -5870,18 +5882,19 @@ var Toolbar = function Toolbar(_ref) {
5870
5882
  key: name
5871
5883
  }, /*#__PURE__*/React.createElement("div", {
5872
5884
  style: {
5873
- width: 17,
5874
- height: 2,
5885
+ width: 24,
5886
+ height: 4,
5875
5887
  backgroundColor: name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor,
5876
5888
  position: "absolute",
5877
- bottom: 8,
5878
- left: 9,
5889
+ bottom: 2,
5890
+ left: 3,
5879
5891
  zIndex: 100
5880
5892
  }
5881
5893
  }), /*#__PURE__*/React.createElement(Combo, {
5882
5894
  iconId: name,
5883
5895
  tooltip: tooltip,
5884
5896
  showArrow: false,
5897
+ fillColor: name === "font-color" ? refs.globalCache.recentTextColor : undefined,
5885
5898
  onClick: function onClick() {
5886
5899
  var color = name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor;
5887
5900
  if (color) pick(color);
package/dist/index.js CHANGED
@@ -1122,7 +1122,7 @@ var FormulaHint = function FormulaHint(props) {
1122
1122
  style: {
1123
1123
  display: "flex",
1124
1124
  justifyContent: "end",
1125
- minWidth: "68px",
1125
+ minWidth: "75px",
1126
1126
  height: "20px",
1127
1127
  alignItems: "center",
1128
1128
  gap: "6px"
@@ -1133,6 +1133,12 @@ var FormulaHint = function FormulaHint(props) {
1133
1133
  style: {
1134
1134
  width: "16px"
1135
1135
  }
1136
+ })), fn.SECONDARY_LOGO && (/*#__PURE__*/React__default['default'].createElement("img", {
1137
+ src: fn.SECONDARY_LOGO,
1138
+ alt: "Service Logo",
1139
+ style: {
1140
+ width: "16px"
1141
+ }
1136
1142
  })), fn.API_KEY && (/*#__PURE__*/React__default['default'].createElement("div", {
1137
1143
  style: {
1138
1144
  borderRadius: "4px",
@@ -1948,7 +1954,7 @@ var SearchReplace = function SearchReplace(_ref) {
1948
1954
  }), /*#__PURE__*/React__default['default'].createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React__default['default'].createElement(ui.Divider, {
1949
1955
  className: "w-full border-t-[1px]"
1950
1956
  }), /*#__PURE__*/React__default['default'].createElement("div", {
1951
- className: "flex flex-row gap-2 justify-center items-center mb-4"
1957
+ className: "flex flex-row gap-2 justify-end items-center mb-4"
1952
1958
  }, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
1953
1959
  id: "replaceAllBtn",
1954
1960
  variant: "secondary",
@@ -4570,7 +4576,7 @@ var Button = function Button(_ref) {
4570
4576
  tabIndex: 0,
4571
4577
  role: "button",
4572
4578
  style: selected ? {
4573
- backgroundColor: "#E7E5EB"
4579
+ backgroundColor: "#FFDF0A"
4574
4580
  } : style
4575
4581
  }, /*#__PURE__*/React__default['default'].createElement(ui.LucideIcon, {
4576
4582
  name: getLucideIcon(iconId),
@@ -4600,7 +4606,8 @@ var Combo = function Combo(_ref) {
4600
4606
  iconId = _ref.iconId,
4601
4607
  _ref$showArrow = _ref.showArrow,
4602
4608
  showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
4603
- children = _ref.children;
4609
+ children = _ref.children,
4610
+ fillColor = _ref.fillColor;
4604
4611
  var style = {
4605
4612
  userSelect: "none"
4606
4613
  };
@@ -4610,7 +4617,7 @@ var Combo = function Combo(_ref) {
4610
4617
  setOpen = _useState2[1];
4611
4618
  var buttonRef = React.useRef(null);
4612
4619
  var isLucideIcon = React.useMemo(function () {
4613
- return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
4620
+ return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background"].includes(iconId);
4614
4621
  }, [iconId]);
4615
4622
  var trigger = !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(ui.Tooltip, {
4616
4623
  text: tooltip,
@@ -4641,7 +4648,12 @@ var Combo = function Combo(_ref) {
4641
4648
  onClick: function onClick() {
4642
4649
  return setOpen(!open);
4643
4650
  },
4644
- className: "fortune-toolbar-combo-button"
4651
+ className: ui.cn("fortune-toolbar-combo-button", {
4652
+ "custom-color-button": iconId === "font-color" && fillColor
4653
+ }),
4654
+ style: {
4655
+ color: iconId === "font-color" ? fillColor : undefined
4656
+ }
4645
4657
  })));
4646
4658
  return /*#__PURE__*/React__default['default'].createElement("div", {
4647
4659
  ref: buttonRef,
@@ -5348,7 +5360,7 @@ var CustomButton = function CustomButton(_ref) {
5348
5360
  tabIndex: 0,
5349
5361
  role: "button",
5350
5362
  style: selected ? {
5351
- backgroundColor: "#E7E5EB"
5363
+ backgroundColor: "#FFDF0A"
5352
5364
  } : {}
5353
5365
  }, /*#__PURE__*/React__default['default'].createElement(CustomIcon, {
5354
5366
  width: 16,
@@ -5882,18 +5894,19 @@ var Toolbar = function Toolbar(_ref) {
5882
5894
  key: name
5883
5895
  }, /*#__PURE__*/React__default['default'].createElement("div", {
5884
5896
  style: {
5885
- width: 17,
5886
- height: 2,
5897
+ width: 24,
5898
+ height: 4,
5887
5899
  backgroundColor: name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor,
5888
5900
  position: "absolute",
5889
- bottom: 8,
5890
- left: 9,
5901
+ bottom: 2,
5902
+ left: 3,
5891
5903
  zIndex: 100
5892
5904
  }
5893
5905
  }), /*#__PURE__*/React__default['default'].createElement(Combo, {
5894
5906
  iconId: name,
5895
5907
  tooltip: tooltip,
5896
5908
  showArrow: false,
5909
+ fillColor: name === "font-color" ? refs.globalCache.recentTextColor : undefined,
5897
5910
  onClick: function onClick() {
5898
5911
  var color = name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor;
5899
5912
  if (color) pick(color);
@@ -1627,28 +1627,12 @@ line-height: 16px; /* 133.333% */
1627
1627
 
1628
1628
  .fortune-insert-button {
1629
1629
  width: 100% !important;
1630
- background-color: #000 !important;
1631
- color: white !important;
1632
1630
  border: none !important;
1633
1631
  border-radius: 6px !important;
1634
1632
  padding: 12px !important;
1635
1633
  font-weight: 500 !important;
1636
1634
  }
1637
1635
 
1638
- .fortune-insert-button:hover {
1639
- background-color: #333 !important;
1640
- }
1641
-
1642
- .fortune-insert-button:disabled {
1643
- background-color: #ccc !important;
1644
- color: #666 !important;
1645
- cursor: not-allowed !important;
1646
- }
1647
-
1648
- .fortune-insert-button:disabled:hover {
1649
- background-color: #ccc !important;
1650
- }
1651
-
1652
1636
  .fortune-link-modify-modal.link-toolbar {
1653
1637
  display: flex;
1654
1638
  flex-direction: row;
@@ -2672,6 +2656,10 @@ input[type="number"].condition-rules-project-input {
2672
2656
  gap: 4px;
2673
2657
  }
2674
2658
 
2659
+ .custom-color-button > svg > path:first-child {
2660
+ display: none !important;
2661
+ }
2662
+
2675
2663
  #fortune-split-column {
2676
2664
  /* position: absolute;
2677
2665
  padding: 30px 42px;
package/dist/index.umd.js CHANGED
@@ -105915,7 +105915,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
105915
105915
  style: {
105916
105916
  display: "flex",
105917
105917
  justifyContent: "end",
105918
- minWidth: "68px",
105918
+ minWidth: "75px",
105919
105919
  height: "20px",
105920
105920
  alignItems: "center",
105921
105921
  gap: "6px"
@@ -105926,6 +105926,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
105926
105926
  style: {
105927
105927
  width: "16px"
105928
105928
  }
105929
+ })), fn.SECONDARY_LOGO && (/*#__PURE__*/React__default['default'].createElement("img", {
105930
+ src: fn.SECONDARY_LOGO,
105931
+ alt: "Service Logo",
105932
+ style: {
105933
+ width: "16px"
105934
+ }
105929
105935
  })), fn.API_KEY && (/*#__PURE__*/React__default['default'].createElement("div", {
105930
105936
  style: {
105931
105937
  borderRadius: "4px",
@@ -106741,7 +106747,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
106741
106747
  }), /*#__PURE__*/React__default['default'].createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React__default['default'].createElement(o8, {
106742
106748
  className: "w-full border-t-[1px]"
106743
106749
  }), /*#__PURE__*/React__default['default'].createElement("div", {
106744
- className: "flex flex-row gap-2 justify-center items-center mb-4"
106750
+ className: "flex flex-row gap-2 justify-end items-center mb-4"
106745
106751
  }, /*#__PURE__*/React__default['default'].createElement(_t, {
106746
106752
  id: "replaceAllBtn",
106747
106753
  variant: "secondary",
@@ -109363,7 +109369,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109363
109369
  tabIndex: 0,
109364
109370
  role: "button",
109365
109371
  style: selected ? {
109366
- backgroundColor: "#E7E5EB"
109372
+ backgroundColor: "#FFDF0A"
109367
109373
  } : style
109368
109374
  }, /*#__PURE__*/React__default['default'].createElement(Ce, {
109369
109375
  name: getLucideIcon(iconId),
@@ -109393,7 +109399,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109393
109399
  iconId = _ref.iconId,
109394
109400
  _ref$showArrow = _ref.showArrow,
109395
109401
  showArrow = _ref$showArrow === void 0 ? true : _ref$showArrow,
109396
- children = _ref.children;
109402
+ children = _ref.children,
109403
+ fillColor = _ref.fillColor;
109397
109404
  var style = {
109398
109405
  userSelect: "none"
109399
109406
  };
@@ -109403,7 +109410,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109403
109410
  setOpen = _useState2[1];
109404
109411
  var buttonRef = React.useRef(null);
109405
109412
  var isLucideIcon = React.useMemo(function () {
109406
- return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template"].includes(iconId);
109413
+ return (iconId === null || iconId === void 0 ? void 0 : iconId.startsWith("align-")) || ["text-overflow", "text-wrap", "text-clip", "font-color", "background", "border-all", "merge-all", "format", "conditionFormat", "filter", "comment", "image", "formula-sum", "dune", "template", "font-color", "background"].includes(iconId);
109407
109414
  }, [iconId]);
109408
109415
  var trigger = !isLucideIcon ? (/*#__PURE__*/React__default['default'].createElement(Ts, {
109409
109416
  text: tooltip,
@@ -109434,7 +109441,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
109434
109441
  onClick: function onClick() {
109435
109442
  return setOpen(!open);
109436
109443
  },
109437
- className: "fortune-toolbar-combo-button"
109444
+ className: S$1("fortune-toolbar-combo-button", {
109445
+ "custom-color-button": iconId === "font-color" && fillColor
109446
+ }),
109447
+ style: {
109448
+ color: iconId === "font-color" ? fillColor : undefined
109449
+ }
109438
109450
  })));
109439
109451
  return /*#__PURE__*/React__default['default'].createElement("div", {
109440
109452
  ref: buttonRef,
@@ -110141,7 +110153,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
110141
110153
  tabIndex: 0,
110142
110154
  role: "button",
110143
110155
  style: selected ? {
110144
- backgroundColor: "#E7E5EB"
110156
+ backgroundColor: "#FFDF0A"
110145
110157
  } : {}
110146
110158
  }, /*#__PURE__*/React__default['default'].createElement(CustomIcon, {
110147
110159
  width: 16,
@@ -110675,18 +110687,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
110675
110687
  key: name
110676
110688
  }, /*#__PURE__*/React__default['default'].createElement("div", {
110677
110689
  style: {
110678
- width: 17,
110679
- height: 2,
110690
+ width: 24,
110691
+ height: 4,
110680
110692
  backgroundColor: name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor,
110681
110693
  position: "absolute",
110682
- bottom: 8,
110683
- left: 9,
110694
+ bottom: 2,
110695
+ left: 3,
110684
110696
  zIndex: 100
110685
110697
  }
110686
110698
  }), /*#__PURE__*/React__default['default'].createElement(Combo, {
110687
110699
  iconId: name,
110688
110700
  tooltip: tooltip,
110689
110701
  showArrow: false,
110702
+ fillColor: name === "font-color" ? refs.globalCache.recentTextColor : undefined,
110690
110703
  onClick: function onClick() {
110691
110704
  var color = name === "font-color" ? refs.globalCache.recentTextColor : refs.globalCache.recentBackgroundColor;
110692
110705
  if (color) pick(color);