@fileverse-dev/fortune-react 1.0.2-mod-41-patch-1 → 1.0.2-mod-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.js CHANGED
@@ -2035,8 +2035,8 @@ var LinkEditCard = function LinkEditCard(_ref) {
2035
2035
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
2036
2036
  name: iconId,
2037
2037
  style: {
2038
- width: 18,
2039
- height: 18
2038
+ width: 16,
2039
+ height: 16
2040
2040
  }
2041
2041
  }));
2042
2042
  }, []);
@@ -2133,7 +2133,9 @@ var LinkEditCard = function LinkEditCard(_ref) {
2133
2133
  }, /*#__PURE__*/React__default['default'].createElement("div", {
2134
2134
  className: "input-icon"
2135
2135
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
2136
- name: "link"
2136
+ name: "link",
2137
+ width: 16,
2138
+ height: 16
2137
2139
  })), /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
2138
2140
  placeholder: "Paste URL",
2139
2141
  value: linkAddress,
@@ -2146,7 +2148,9 @@ var LinkEditCard = function LinkEditCard(_ref) {
2146
2148
  }, /*#__PURE__*/React__default['default'].createElement("div", {
2147
2149
  className: "input-icon"
2148
2150
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
2149
- name: "link"
2151
+ name: "link",
2152
+ width: 16,
2153
+ height: 16
2150
2154
  })), /*#__PURE__*/React__default['default'].createElement(ui.Select, {
2151
2155
  onValueChange: function onValueChange(value) {
2152
2156
  if (!linkText) setLinkText(value);
@@ -4421,6 +4425,8 @@ var Button = function Button(_ref) {
4421
4425
  } : {}
4422
4426
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
4423
4427
  name: iconId,
4428
+ width: 16,
4429
+ height: 16,
4424
4430
  style: disabled ? {
4425
4431
  opacity: 0.3
4426
4432
  } : {}
@@ -4509,7 +4515,9 @@ var Combo = function Combo(_ref) {
4509
4515
  "aria-label": "".concat(tooltip, ": ").concat(text !== undefined ? text : ""),
4510
4516
  style: style
4511
4517
  }, iconId ? (/*#__PURE__*/React__default['default'].createElement(SVGIcon, {
4512
- name: iconId
4518
+ name: iconId,
4519
+ width: 16,
4520
+ height: 16
4513
4521
  })) : (/*#__PURE__*/React__default['default'].createElement("span", {
4514
4522
  className: "fortune-toolbar-combo-text"
4515
4523
  }, text !== undefined ? text : "")))) : (/*#__PURE__*/React__default['default'].createElement(ui.IconButton, {
@@ -5225,6 +5233,8 @@ var CustomButton = function CustomButton(_ref) {
5225
5233
  backgroundColor: "#E7E5EB"
5226
5234
  } : {}
5227
5235
  }, /*#__PURE__*/React__default['default'].createElement(CustomIcon, {
5236
+ width: 16,
5237
+ height: 16,
5228
5238
  iconName: iconName,
5229
5239
  content: icon
5230
5240
  }), tooltip && /*#__PURE__*/React__default['default'].createElement("div", {
@@ -5527,7 +5537,7 @@ var getIcon = function getIcon(title) {
5527
5537
  case "align-middle":
5528
5538
  return "AlignVerticalMiddle";
5529
5539
  case "align-bottom":
5530
- return "ArrowDownFromLine";
5540
+ return "ArrowDownToLine";
5531
5541
  case "text-overflow":
5532
5542
  return "TextOverflow";
5533
5543
  case "text-wrap":
@@ -5650,9 +5660,11 @@ var Toolbar = function Toolbar(_ref) {
5650
5660
  var container = containerRef.current;
5651
5661
  if (!container) return;
5652
5662
  var moreButtonWidth = 50;
5663
+ var containerWidth = container.getBoundingClientRect().width;
5664
+ var availableWidth = containerWidth - 30;
5653
5665
  for (var i = itemLocations.length - 1; i >= 0; i -= 1) {
5654
5666
  var loc = itemLocations[i];
5655
- if (loc + moreButtonWidth < container.clientWidth) {
5667
+ if (loc + moreButtonWidth < availableWidth) {
5656
5668
  setToolbarWrapIndex(i - itemLocations.length + settings.toolbarItems.length);
5657
5669
  if (i === itemLocations.length - 1) {
5658
5670
  setMoreItems(null);
@@ -5756,7 +5768,8 @@ var Toolbar = function Toolbar(_ref) {
5756
5768
  className: "fortune-toolbar-menu-line"
5757
5769
  }, /*#__PURE__*/React__default['default'].createElement("div", null, text), /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
5758
5770
  name: "rightArrow",
5759
- width: 14
5771
+ width: 16,
5772
+ height: 16
5760
5773
  })), /*#__PURE__*/React__default['default'].createElement("div", {
5761
5774
  className: "more-format toolbar-item-sub-menu fortune-toolbar-select",
5762
5775
  style: {
@@ -6327,16 +6340,20 @@ var Toolbar = function Toolbar(_ref) {
6327
6340
  if (name === "merge-cell") {
6328
6341
  var itemdata = [{
6329
6342
  text: merge.mergeAll,
6330
- value: "merge-all"
6343
+ value: "merge-all",
6344
+ icon: "MergeAll"
6331
6345
  }, {
6332
6346
  text: merge.mergeV,
6333
- value: "merge-vertical"
6347
+ value: "merge-vertical",
6348
+ icon: "MergeVertical"
6334
6349
  }, {
6335
6350
  text: merge.mergeH,
6336
- value: "merge-horizontal"
6351
+ value: "merge-horizontal",
6352
+ icon: "MergeHorizontal"
6337
6353
  }, {
6338
6354
  text: merge.mergeCancel,
6339
- value: "merge-cancel"
6355
+ value: "merge-cancel",
6356
+ icon: "Unmerge"
6340
6357
  }];
6341
6358
  return /*#__PURE__*/React__default['default'].createElement(Combo, {
6342
6359
  iconId: "merge-all",
@@ -6351,7 +6368,8 @@ var Toolbar = function Toolbar(_ref) {
6351
6368
  }, function (setOpen) {
6352
6369
  return /*#__PURE__*/React__default['default'].createElement(Select, null, itemdata.map(function (_ref8) {
6353
6370
  var text = _ref8.text,
6354
- value = _ref8.value;
6371
+ value = _ref8.value,
6372
+ icon = _ref8.icon;
6355
6373
  return /*#__PURE__*/React__default['default'].createElement(Option, {
6356
6374
  key: value,
6357
6375
  onClick: function onClick() {
@@ -6366,8 +6384,10 @@ var Toolbar = function Toolbar(_ref) {
6366
6384
  alignItems: "center",
6367
6385
  gap: 6
6368
6386
  }
6369
- }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
6370
- name: value
6387
+ }, /*#__PURE__*/React__default['default'].createElement(ui.LucideIcon, {
6388
+ name: icon,
6389
+ width: 16,
6390
+ height: 16
6371
6391
  }), text));
6372
6392
  }));
6373
6393
  });
@@ -6375,37 +6395,44 @@ var Toolbar = function Toolbar(_ref) {
6375
6395
  if (name === "border") {
6376
6396
  var _items4 = [{
6377
6397
  text: border.borderTop,
6378
- value: "border-top"
6398
+ value: "border-top",
6399
+ icon: "BorderTop"
6379
6400
  }, {
6380
6401
  text: border.borderBottom,
6381
- value: "border-bottom"
6402
+ value: "border-bottom",
6403
+ icon: "BorderBottom"
6382
6404
  }, {
6383
6405
  text: border.borderLeft,
6384
- value: "border-left"
6406
+ value: "border-left",
6407
+ icon: "BorderLeft"
6385
6408
  }, {
6386
6409
  text: border.borderRight,
6387
- value: "border-right"
6410
+ value: "border-right",
6411
+ icon: "BorderRight"
6388
6412
  }, {
6389
6413
  text: border.borderNone,
6390
- value: "border-none"
6414
+ value: "border-none",
6415
+ icon: "NoBorder"
6391
6416
  }, {
6392
6417
  text: border.borderAll,
6393
- value: "border-all"
6418
+ value: "border-all",
6419
+ icon: "Border"
6394
6420
  }, {
6395
6421
  text: border.borderOutside,
6396
- value: "border-outside"
6422
+ value: "border-outside",
6423
+ icon: "BorderOutside"
6397
6424
  }, {
6398
6425
  text: border.borderInside,
6399
- value: "border-inside"
6426
+ value: "border-inside",
6427
+ icon: "BorderInside"
6400
6428
  }, {
6401
6429
  text: border.borderHorizontal,
6402
- value: "border-horizontal"
6430
+ value: "border-horizontal",
6431
+ icon: "BorderHorizontal"
6403
6432
  }, {
6404
6433
  text: border.borderVertical,
6405
- value: "border-vertical"
6406
- }, {
6407
- text: border.borderSlash,
6408
- value: "border-slash"
6434
+ value: "border-vertical",
6435
+ icon: "BorderVertical"
6409
6436
  }];
6410
6437
  return /*#__PURE__*/React__default['default'].createElement(Combo, {
6411
6438
  iconId: "border-all",
@@ -6422,7 +6449,8 @@ var Toolbar = function Toolbar(_ref) {
6422
6449
  return /*#__PURE__*/React__default['default'].createElement("div", {
6423
6450
  className: "fortune-toolbar-select fortune-border-grid"
6424
6451
  }, _items4.map(function (_ref9) {
6425
- var value = _ref9.value;
6452
+ var value = _ref9.value,
6453
+ icon = _ref9.icon;
6426
6454
  return /*#__PURE__*/React__default['default'].createElement("div", {
6427
6455
  key: value,
6428
6456
  className: "fortune-border-grid-item",
@@ -6432,8 +6460,10 @@ var Toolbar = function Toolbar(_ref) {
6432
6460
  });
6433
6461
  setOpen(false);
6434
6462
  }
6435
- }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
6436
- name: value
6463
+ }, /*#__PURE__*/React__default['default'].createElement(ui.LucideIcon, {
6464
+ name: icon,
6465
+ width: 16,
6466
+ height: 16
6437
6467
  }));
6438
6468
  }));
6439
6469
  });
@@ -6477,7 +6507,9 @@ var Toolbar = function Toolbar(_ref) {
6477
6507
  }, /*#__PURE__*/React__default['default'].createElement("div", {
6478
6508
  className: "fortune-toolbar-menu-line"
6479
6509
  }, text, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
6480
- name: value
6510
+ name: value,
6511
+ width: 16,
6512
+ height: 16
6481
6513
  })));
6482
6514
  }));
6483
6515
  });
@@ -6589,7 +6621,9 @@ var Toolbar = function Toolbar(_ref) {
6589
6621
  }, /*#__PURE__*/React__default['default'].createElement("div", {
6590
6622
  className: "fortune-toolbar-menu-line"
6591
6623
  }, text, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
6592
- name: iconId
6624
+ name: iconId,
6625
+ width: 16,
6626
+ height: 16
6593
6627
  })));
6594
6628
  }));
6595
6629
  });
@@ -6663,8 +6697,8 @@ var Toolbar = function Toolbar(_ref) {
6663
6697
  }
6664
6698
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
6665
6699
  name: iconId,
6666
- width: 24,
6667
- height: 18
6700
+ width: 16,
6701
+ height: 16
6668
6702
  }), text))) : (/*#__PURE__*/React__default['default'].createElement(MenuDivider, {
6669
6703
  key: "divider-".concat(index)
6670
6704
  }));
@@ -6688,6 +6722,8 @@ var Toolbar = function Toolbar(_ref) {
6688
6722
  ref: containerRef,
6689
6723
  className: "fortune-toolbar",
6690
6724
  "aria-label": toolbar.toolbar
6725
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
6726
+ className: "fortune-toolbar-left"
6691
6727
  }, settings.customToolbarItems.filter(function (n) {
6692
6728
  return n.key === "import-export";
6693
6729
  }).map(function (n) {
@@ -6714,9 +6750,9 @@ var Toolbar = function Toolbar(_ref) {
6714
6750
  }));
6715
6751
  }
6716
6752
  }
6717
- })) : null, /*#__PURE__*/React__default['default'].createElement(Divider, {
6718
- key: "templateDivider"
6719
- }), settings.customToolbarItems.filter(function (n) {
6753
+ })) : null), /*#__PURE__*/React__default['default'].createElement("div", {
6754
+ className: "fortune-toolbar-right"
6755
+ }, settings.customToolbarItems.filter(function (n) {
6720
6756
  return n.key === "templates";
6721
6757
  }).map(function (n) {
6722
6758
  return /*#__PURE__*/React__default['default'].createElement(CustomButton, {
@@ -6726,8 +6762,6 @@ var Toolbar = function Toolbar(_ref) {
6726
6762
  icon: n.icon,
6727
6763
  iconName: n.iconName
6728
6764
  }, n.children);
6729
- }), /*#__PURE__*/React__default['default'].createElement(Divider, {
6730
- key: "customDivider"
6731
6765
  }), settings.customToolbarItems.filter(function (n) {
6732
6766
  return n.key !== "templates" && n.key !== "import-export";
6733
6767
  }).map(function (n) {
@@ -6760,7 +6794,7 @@ var Toolbar = function Toolbar(_ref) {
6760
6794
  icon: "dune-logo",
6761
6795
  placeholder: "Add Dune chart link to embed",
6762
6796
  submitText: "Embed Dune chart"
6763
- })));
6797
+ }))));
6764
6798
  };
6765
6799
 
6766
6800
  var LocationBox = function LocationBox() {
@@ -7503,8 +7537,8 @@ var ContextMenu = function ContextMenu() {
7503
7537
  className: "context-item"
7504
7538
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
7505
7539
  name: "freeze-flv",
7506
- width: 18,
7507
- height: 18,
7540
+ width: 16,
7541
+ height: 16,
7508
7542
  style: {
7509
7543
  marginTop: "4px",
7510
7544
  marginRight: "4px"
@@ -8175,10 +8209,12 @@ var ContextMenu = function ContextMenu() {
8175
8209
  className: "flex items-center gap-2"
8176
8210
  }, /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
8177
8211
  name: "conditionFormat",
8178
- width: 18
8212
+ width: 16,
8213
+ height: 16
8179
8214
  }), /*#__PURE__*/React__default['default'].createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/React__default['default'].createElement(SVGIcon, {
8180
8215
  name: "rightArrow",
8181
- width: 18
8216
+ width: 16,
8217
+ height: 16
8182
8218
  })))));
8183
8219
  }
8184
8220
  return null;
@@ -2254,6 +2254,8 @@ input[type="number"].condition-rules-project-input {
2254
2254
  border-bottom: 1px solid #d4d4d4;
2255
2255
  white-space: nowrap;
2256
2256
  align-items: center;
2257
+ flex-wrap: wrap;
2258
+ gap: 4px;
2257
2259
  }
2258
2260
 
2259
2261
  .fortune-toolbar-divider {
@@ -2289,13 +2291,21 @@ input[type="number"].condition-rules-project-input {
2289
2291
  user-select: none;
2290
2292
  background: 0;
2291
2293
  outline: none;
2292
- padding: 0;
2294
+ padding: 2px;
2293
2295
  list-style: none;
2294
2296
  text-decoration: none;
2295
2297
  display: flex;
2298
+ justify-content: center;
2296
2299
  align-items: center;
2297
- padding: 2px;
2298
- margin: 2px 8px;
2300
+ min-width: 30px;
2301
+ height: 30px;
2302
+ margin: 0;
2303
+ }
2304
+
2305
+ .fortune-toolbar-button svg,
2306
+ .fortune-toolbar-combo svg {
2307
+ width: 16px !important;
2308
+ height: 16px !important;
2299
2309
  }
2300
2310
 
2301
2311
  .fortune-toolbar-combo-button,
@@ -2306,12 +2316,12 @@ input[type="number"].condition-rules-project-input {
2306
2316
 
2307
2317
  .fortune-toolbar-button:hover,
2308
2318
  .fortune-toolbar-combo:hover {
2309
- background-color: rgba(0, 0, 0, 0.06);
2319
+ background-color: #f2f4f5;
2310
2320
  cursor: pointer;
2311
2321
  }
2312
2322
 
2313
2323
  .fortune-toolbar-combo-arrow:hover {
2314
- background-color: rgba(0, 0, 0, 0.06);
2324
+ background-color: #f2f4f5;
2315
2325
  cursor: pointer;
2316
2326
  }
2317
2327
 
@@ -2385,6 +2395,7 @@ input[type="number"].condition-rules-project-input {
2385
2395
  margin: 0 4px;
2386
2396
  font-weight: 500;
2387
2397
  font-size: 14px;
2398
+ line-height: 20px;
2388
2399
  }
2389
2400
 
2390
2401
  .fortune-toolbar-color-picker-item {
@@ -2592,6 +2603,20 @@ input[type="number"].condition-rules-project-input {
2592
2603
  background-color: hsl(var(--color-bg-default-hover));
2593
2604
  }
2594
2605
 
2606
+ .fortune-toolbar-left {
2607
+ display: flex;
2608
+ flex-direction: row;
2609
+ align-items: center;
2610
+ gap: 4px;
2611
+ }
2612
+
2613
+ .fortune-toolbar-right {
2614
+ display: flex;
2615
+ flex-direction: row;
2616
+ align-items: center;
2617
+ gap: 4px;
2618
+ }
2619
+
2595
2620
  #fortune-split-column {
2596
2621
  /* position: absolute;
2597
2622
  padding: 30px 42px;