@oliasoft-open-source/react-ui-library 4.13.0-beta-4 → 4.13.0-beta-6

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
@@ -70374,32 +70374,27 @@ const PredefinedOptionsMenu = ({
70374
70374
  ...predefinedOptions.map(createPredefinedOption)
70375
70375
  ];
70376
70376
  return /* @__PURE__ */ jsx(
70377
- Tooltip,
70377
+ Menu,
70378
70378
  {
70379
- text: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED ? foundPredefinedMenuOption == null ? void 0 : foundPredefinedMenuOption.label : "",
70380
- children: /* @__PURE__ */ jsx(
70381
- Menu,
70382
- {
70383
- testId: testId && `${testId}-predefined-menu`,
70384
- maxHeight: 380,
70385
- groupOrder: "first",
70386
- disabled: disabled2,
70387
- menu: {
70388
- colored: true,
70389
- trigger: "Component",
70390
- component: /* @__PURE__ */ jsx(
70391
- Button$1,
70392
- {
70393
- groupOrder: "first",
70394
- active: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED,
70395
- icon: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED ? "link" : "unlink"
70396
- }
70397
- ),
70398
- small: true,
70399
- sections: sectionsPredefinedMenu
70379
+ testId: testId && `${testId}-predefined-menu`,
70380
+ maxHeight: 380,
70381
+ groupOrder: "first",
70382
+ disabled: disabled2,
70383
+ menu: {
70384
+ colored: true,
70385
+ trigger: "Component",
70386
+ component: /* @__PURE__ */ jsx(
70387
+ Button$1,
70388
+ {
70389
+ groupOrder: "first",
70390
+ active: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED,
70391
+ icon: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED ? "link" : "unlink"
70400
70392
  }
70401
- }
70402
- )
70393
+ ),
70394
+ small: true,
70395
+ sections: sectionsPredefinedMenu
70396
+ },
70397
+ tooltip: predefinedOptionsMenuState === PredefinedOptionsMenuState.PREDEFINED ? foundPredefinedMenuOption == null ? void 0 : foundPredefinedMenuOption.label : ""
70403
70398
  }
70404
70399
  );
70405
70400
  };
@@ -70576,18 +70571,18 @@ const UnitInput = ({
70576
70571
  predefinedOptions,
70577
70572
  displayLayer,
70578
70573
  onPredefinedOptionSelect: (newValue, option2) => {
70579
- if (!(option2 == null ? void 0 : option2.linked)) {
70580
- onChange({
70581
- target: {
70582
- value: newValue,
70583
- name: stringName
70584
- }
70585
- });
70586
- setDisplayLayer({
70574
+ onChange({
70575
+ target: {
70587
70576
  value: newValue,
70588
- unit: getUnit(newValue) || displayLayer.unit
70589
- });
70590
- }
70577
+ name: stringName,
70578
+ predefinedSelected: true,
70579
+ predefinedOption: option2
70580
+ }
70581
+ });
70582
+ setDisplayLayer({
70583
+ value: newValue,
70584
+ unit: getUnit(newValue) || displayLayer.unit
70585
+ });
70591
70586
  },
70592
70587
  disabled: disabled2,
70593
70588
  initialPredefinedOption,