@oliasoft-open-source/react-ui-library 4.7.8-beta-3 → 4.7.9-beta-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 (134) hide show
  1. package/dist/assets/{index-CfpMPxgr.js → index-DLK3QlKd.js} +1 -2
  2. package/dist/index.d.ts +35 -30
  3. package/dist/index.html +1 -1
  4. package/dist/index.js +82 -65
  5. package/dist/index.js.map +1 -1
  6. package/dist/storybook/assets/{Color-KGDBMAHA-CgvLCgqn.js → Color-KGDBMAHA-DcdC9v0p.js} +1 -1
  7. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-Bnk9fu_p.js → DocsRenderer-PKQXORMH-CT4GlLnv.js} +1 -1
  8. package/dist/storybook/assets/{accordion.stories-BM2A9Ycz.js → accordion.stories-CH0BX_os.js} +2 -2
  9. package/dist/storybook/assets/actions-Tr0wIZve.js +39 -0
  10. package/dist/storybook/assets/{actions.stories-D0QIqnMp.js → actions.stories-CQK6PyBH.js} +1 -1
  11. package/dist/storybook/assets/{afe.stories-CcHBWifH.js → afe.stories-CSYzQy-o.js} +2 -2
  12. package/dist/storybook/assets/{badge.stories-DIrrG6P1.js → badge.stories-Blb5k20_.js} +1 -1
  13. package/dist/storybook/assets/{blowout.stories-D0pIbWxv.js → blowout.stories-hdxkqScp.js} +1 -1
  14. package/dist/storybook/assets/button-CzvLc2io.js +1 -0
  15. package/dist/storybook/assets/{button-group-Cfmdts3y.js → button-group-C1PqMW-H.js} +1 -1
  16. package/dist/storybook/assets/{button-group.stories-BLo6acO_.js → button-group.stories-QlYbfeJS.js} +1 -1
  17. package/dist/storybook/assets/{button.stories-novTlASU.js → button.stories-tM18j4A3.js} +1 -1
  18. package/dist/storybook/assets/{buttons-and-links-C60POD5w.js → buttons-and-links-CA4QaD8G.js} +1 -1
  19. package/dist/storybook/assets/{casing-loads.stories-CzZ11NBQ.js → casing-loads.stories-C-GU3_LZ.js} +2 -2
  20. package/dist/storybook/assets/{cell.stories-C2iOpdT8.js → cell.stories-CmBZ9hQL.js} +2 -2
  21. package/dist/storybook/assets/check-box-wCvXxtCz.js +13 -0
  22. package/dist/storybook/assets/{check-box.stories-BRZDXWlp.js → check-box.stories-Q_WICJ_2.js} +1 -1
  23. package/dist/storybook/assets/{chunk-HLWAVYOI-Dq4zCag0.js → chunk-HLWAVYOI-CEGCXOH9.js} +1 -1
  24. package/dist/storybook/assets/{color-D4BEIdyW.js → color-BtyLQXx1.js} +1 -1
  25. package/dist/storybook/assets/{dialog-DHZwgN1J.js → dialog-B55T_62Q.js} +1 -1
  26. package/dist/storybook/assets/{drawer-eslxDMsk.js → drawer-CNKfMbq9.js} +1 -1
  27. package/dist/storybook/assets/{drawer.stories-DEmv0seL.js → drawer.stories-BzVj2VTf.js} +1 -1
  28. package/dist/storybook/assets/{empty.stories-lm0UXceF.js → empty.stories-CVaJlnv1.js} +1 -1
  29. package/dist/storybook/assets/{field.stories-DKabKkpY.js → field.stories-DhiTcelS.js} +1 -1
  30. package/dist/storybook/assets/file-button.stories-oe6HKMH2.js +22 -0
  31. package/dist/storybook/assets/file-input-CMP44wlr.js +13 -0
  32. package/dist/storybook/assets/{file-input.stories-le1QtUvc.js → file-input.stories-DTRWZyqS.js} +1 -1
  33. package/dist/storybook/assets/{flex.stories-CpXERw-9.js → flex.stories-DtDxXdHB.js} +1 -1
  34. package/dist/storybook/assets/footer.stories-M5swlcht.js +3 -0
  35. package/dist/storybook/assets/form.stories-BCg9rFVI.js +49 -0
  36. package/dist/storybook/assets/formation.stories-CgBhz3-o.js +74 -0
  37. package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
  38. package/dist/storybook/assets/iframe-BZTJ8TMF.js +2 -0
  39. package/dist/storybook/assets/{index-CCIzIzmw.js → index-D0Yp3qUF.js} +4 -4
  40. package/dist/storybook/assets/{index-ZUqUscdi.js → index-qsNwq0s-.js} +1 -1
  41. package/dist/storybook/assets/input-DTXbDJaL.js +1 -0
  42. package/dist/storybook/assets/{input-group.stories-CNgazSNn.js → input-group.stories-M4a8AYtB.js} +3 -3
  43. package/dist/storybook/assets/{input-validation-BAauofrr.js → input-validation-CPjdS76B.js} +2 -2
  44. package/dist/storybook/assets/{input.stories-EZ7qJt4K.js → input.stories-FKl0qVhm.js} +1 -1
  45. package/dist/storybook/assets/{inputs-DDobTTLy.js → inputs-vBIiN7wa.js} +2 -2
  46. package/dist/storybook/assets/{layout-forms-GKHrAksv.js → layout-forms-CJdRAvRT.js} +4 -4
  47. package/dist/storybook/assets/{layout-general-BQ7XOkUP.js → layout-general-CrYxsfxK.js} +1 -1
  48. package/dist/storybook/assets/{list-qDLciw5I.js → list-DhjHm8bz.js} +1 -1
  49. package/dist/storybook/assets/{list.stories-C4aq5yH1.js → list.stories-2F-UkS1E.js} +1 -1
  50. package/dist/storybook/assets/{list.stories-data-Bb69C9ED.js → list.stories-data-DqFECKJF.js} +1 -1
  51. package/dist/storybook/assets/{loader.stories-CP1wsg3-.js → loader.stories-BMe1zhEL.js} +1 -1
  52. package/dist/storybook/assets/{lodash-BHd_uQHh.js → lodash-c4VUpsOs.js} +2 -2
  53. package/dist/storybook/assets/{menu.stories-Bo3KBdyY.js → menu.stories-B_1YsebS.js} +1 -1
  54. package/dist/storybook/assets/menu.stories-data-CQ59XhzU.js +1 -0
  55. package/dist/storybook/assets/{message.stories-CXvBu8Eh.js → message.stories-QYFwbrO0.js} +1 -1
  56. package/dist/storybook/assets/{meta-content-BFs3c8_I.js → meta-content-DCllGQX6.js} +1 -1
  57. package/dist/storybook/assets/{modal.stories-PN023DHW.js → modal.stories-PZXXHpu9.js} +2 -2
  58. package/dist/storybook/assets/number-input-Ct8VwJX0.js +16 -0
  59. package/dist/storybook/assets/number-input.stories-CK-pmDN5.js +110 -0
  60. package/dist/storybook/assets/option-dropdown.stories-ntKLWycS.js +52 -0
  61. package/dist/storybook/assets/{padding-and-spacing-CSlKX1Dq.js → padding-and-spacing-B-93CHYn.js} +1 -1
  62. package/dist/storybook/assets/{page.stories-C-2VKGth.js → page.stories-Dp_z8s1a.js} +1 -1
  63. package/dist/storybook/assets/{pagination-BJSFecNw.js → pagination-T__Mixkr.js} +1 -1
  64. package/dist/storybook/assets/{pagination.stories-CP4abVYK.js → pagination.stories-C_oRnFX_.js} +2 -2
  65. package/dist/storybook/assets/{pop-confirm.stories-Du0AIyKt.js → pop-confirm.stories-D-iQo6s7.js} +1 -1
  66. package/dist/storybook/assets/{popover-DYTMr1Fd.js → popover-9ZnEm5Hy.js} +1 -1
  67. package/dist/storybook/assets/popover.stories-B9slHpqQ.js +10 -0
  68. package/dist/storybook/assets/{preview-D4Rt2i6_.js → preview-3lxfqOkZ.js} +1 -1
  69. package/dist/storybook/assets/{preview-B6tlSqMG.js → preview-D0xsXs52.js} +2 -2
  70. package/dist/storybook/assets/projects.stories-CdvyNFKw.js +47 -0
  71. package/dist/storybook/assets/radio-button-C3RuBqEf.js +13 -0
  72. package/dist/storybook/assets/{radio-button.stories-BzCvj7vt.js → radio-button.stories-CAHs1mr6.js} +2 -2
  73. package/dist/storybook/assets/{reservoirs.stories-gClJhYDT.js → reservoirs.stories-zzDr9Zir.js} +2 -2
  74. package/dist/storybook/assets/{rich-text-input.stories-B74E4Tlj.js → rich-text-input.stories-DDnRLaZw.js} +3 -3
  75. package/dist/storybook/assets/{row.stories-DP3P7HwU.js → row.stories-DVq_splx.js} +2 -2
  76. package/dist/storybook/assets/select-BW0IihoR.js +61 -0
  77. package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
  78. package/dist/storybook/assets/{select.stories-CnrMfdA1.js → select.stories-CtbKVF6A.js} +2 -2
  79. package/dist/storybook/assets/{side-bar-C4b17uva.js → side-bar-BApSkmiM.js} +1 -1
  80. package/dist/storybook/assets/{side-bar.stories-DDAU8kNJ.js → side-bar.stories-BuAIJ8NV.js} +1 -1
  81. package/dist/storybook/assets/{site.stories-BLalBJdd.js → site.stories-lIyAWOdt.js} +2 -2
  82. package/dist/storybook/assets/slider-CBE03NwD.js +27 -0
  83. package/dist/storybook/assets/{slider.stories-BiZ6LYwI.js → slider.stories-7oMw2PCp.js} +1 -1
  84. package/dist/storybook/assets/{smart-upload-modal.stories-Bb1IZkrO.js → smart-upload-modal.stories-n4bjMFhq.js} +1 -1
  85. package/dist/storybook/assets/{spacer.stories-Dzaw70ig.js → spacer.stories-BC7lirqi.js} +1 -1
  86. package/dist/storybook/assets/{table-BLGCy103.js → table-Ci7MC96P.js} +1 -1
  87. package/dist/storybook/assets/{table.stories-DJKbYnBk.js → table.stories-LALh_tT_.js} +2 -2
  88. package/dist/storybook/assets/{table.stories-data-C-pC7SBY.js → table.stories-data-CYppbCAy.js} +1 -1
  89. package/dist/storybook/assets/tabs-BoToLVEP.js +13 -0
  90. package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
  91. package/dist/storybook/assets/textarea-D6ltcKhz.js +13 -0
  92. package/dist/storybook/assets/{textarea.stories-CrZgmMxl.js → textarea.stories-CJ-Oqytp.js} +1 -1
  93. package/dist/storybook/assets/{title.stories-8XzSWYTz.js → title.stories-CmYtRWA7.js} +3 -3
  94. package/dist/storybook/assets/{toaster.stories-CXX0cghy.js → toaster.stories-D1XTcQR_.js} +1 -1
  95. package/dist/storybook/assets/toggle-C0zvrIOF.js +13 -0
  96. package/dist/storybook/assets/{toggle.stories-CnNIGpMC.js → toggle.stories-DOc7uN93.js} +1 -1
  97. package/dist/storybook/assets/{tooltip.test-case.stories-CHw-bEav.js → tooltip.test-case.stories-D2SX9mkM.js} +1 -1
  98. package/dist/storybook/assets/{top-bar-CagFtK25.js → top-bar-BQzmL0IU.js} +1 -1
  99. package/dist/storybook/assets/{top-bar.stories-D7vjPFH1.js → top-bar.stories-Czza1RvB.js} +1 -1
  100. package/dist/storybook/assets/{top-bar.testcase.stories-DoycjLZo.js → top-bar.testcase.stories-DpV-QqfZ.js} +1 -1
  101. package/dist/storybook/assets/{tree.stories-DXMHMBFf.js → tree.stories-CsmZwDmr.js} +1 -1
  102. package/dist/storybook/assets/{types-UmZ4Y_CR.js → types-Dx2TtIG9.js} +1 -1
  103. package/dist/storybook/assets/unit-input.stories-ODKyfhaE.js +318 -0
  104. package/dist/storybook/assets/unit-table.stories-BLfZcK7Z.js +152 -0
  105. package/dist/storybook/iframe.html +1 -1
  106. package/dist/storybook/index.json +1 -1
  107. package/dist/storybook/project.json +1 -1
  108. package/package.json +2 -2
  109. package/dist/storybook/assets/actions-BO4Qjedk.js +0 -27
  110. package/dist/storybook/assets/button-Nl-iM4E9.js +0 -1
  111. package/dist/storybook/assets/check-box-CaSrhzev.js +0 -1
  112. package/dist/storybook/assets/file-button.stories-CfQAHpzd.js +0 -10
  113. package/dist/storybook/assets/file-input-C1USni2k.js +0 -1
  114. package/dist/storybook/assets/footer.stories-ConMG8cP.js +0 -3
  115. package/dist/storybook/assets/form.stories-C-1H9KKA.js +0 -49
  116. package/dist/storybook/assets/formation.stories-DjtPZWn7.js +0 -74
  117. package/dist/storybook/assets/iframe-veQq2fOg.js +0 -2
  118. package/dist/storybook/assets/input-DFNY9YDm.js +0 -1
  119. package/dist/storybook/assets/menu.stories-data-DeDnsKpk.js +0 -1
  120. package/dist/storybook/assets/number-input-B6I6KkcP.js +0 -4
  121. package/dist/storybook/assets/number-input.stories-DrddhbAq.js +0 -107
  122. package/dist/storybook/assets/option-dropdown.stories-On5p7o8x.js +0 -34
  123. package/dist/storybook/assets/popover.stories-BP-XWtw2.js +0 -10
  124. package/dist/storybook/assets/projects.stories-BGMIr8QG.js +0 -47
  125. package/dist/storybook/assets/radio-button-C_cV5TWA.js +0 -1
  126. package/dist/storybook/assets/select-D2oDfaf0.js +0 -40
  127. package/dist/storybook/assets/select.input-DIKP56UZ.js +0 -1
  128. package/dist/storybook/assets/slider-DPq3zf_3.js +0 -31
  129. package/dist/storybook/assets/tabs-CAZ_dHGK.js +0 -1
  130. package/dist/storybook/assets/tabs.stories-DXcDAqB2.js +0 -30
  131. package/dist/storybook/assets/textarea-D-R3vavM.js +0 -1
  132. package/dist/storybook/assets/toggle-Bo-JPbUP.js +0 -1
  133. package/dist/storybook/assets/unit-input.stories-BtbfkOqU.js +0 -295
  134. package/dist/storybook/assets/unit-table.stories-sfWkbFwA.js +0 -152
@@ -17656,9 +17656,8 @@ const Button$1 = ({
17656
17656
  }
17657
17657
  return "";
17658
17658
  })();
17659
- const RenderComponent = Component2 === "button" && url ? "a" : Component2;
17660
17659
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonTooltipWrapper, { tooltip: tooltip2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
17661
- RenderComponent,
17660
+ Component2,
17662
17661
  {
17663
17662
  type: type2 === ButtonType.SUBMIT ? ButtonType.SUBMIT : ButtonType.BUTTON,
17664
17663
  className: cx$2(
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Context } from 'react';
3
3
  import { CSSProperties } from 'react';
4
4
  import { default as default_2 } from 'react';
5
5
  import { DependencyList } from 'react';
6
+ import { ElementType as ElementType_2 } from 'react';
6
7
  import { FocusEvent as FocusEvent_2 } from 'react';
7
8
  import { FocusEventHandler } from 'react';
8
9
  import { Id } from 'react-toastify';
@@ -240,7 +241,7 @@ declare interface ICheckBoxCell extends TCommonCell {
240
241
  label?: string | null;
241
242
  checked: boolean;
242
243
  type: TCellType;
243
- onChange: (ev: default_2.ChangeEvent<HTMLInputElement>) => void;
244
+ onChange: TChangeEventHandler;
244
245
  disabled?: boolean;
245
246
  }
246
247
 
@@ -250,7 +251,7 @@ export declare interface ICheckBoxProps {
250
251
  label?: string | null;
251
252
  name?: string;
252
253
  noMargin?: boolean;
253
- onChange: (evt: default_2.ChangeEvent<HTMLInputElement>) => void;
254
+ onChange: TChangeEventHandler;
254
255
  tabIndex?: number;
255
256
  disabled?: boolean;
256
257
  small?: boolean;
@@ -405,7 +406,7 @@ export declare interface IFileButtonProps extends IButtonProps {
405
406
  accept?: string;
406
407
  multi?: boolean;
407
408
  name?: string;
408
- onChange?: (evt: any) => void;
409
+ onChange?: TChangeEventHandler;
409
410
  }
410
411
 
411
412
  export declare interface IFileInputProps {
@@ -418,7 +419,7 @@ export declare interface IFileInputProps {
418
419
  multi?: boolean;
419
420
  name?: string;
420
421
  width?: TStringOrNumber;
421
- onChange?: (evt: any) => void;
422
+ onChange?: TChangeEventHandler;
422
423
  testId?: string;
423
424
  }
424
425
 
@@ -493,7 +494,7 @@ declare interface IInputCell extends TCommonCell {
493
494
  type: TCellType;
494
495
  name?: string;
495
496
  value?: TStringOrNumber;
496
- onChange?: (ev: default_2.ChangeEvent<HTMLInputElement>) => void;
497
+ onChange?: TChangeEventHandler;
497
498
  onFocus?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
498
499
  onBlur?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
499
500
  onPaste?: default_2.ClipboardEventHandler<HTMLInputElement>;
@@ -523,7 +524,7 @@ export declare interface IInputProps {
523
524
  tooltip?: TStringOrNumber | default_2.ReactNode;
524
525
  name?: string;
525
526
  type?: string;
526
- onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
527
+ onChange?: TChangeEventHandler;
527
528
  onKeyPress?: default_2.KeyboardEventHandler<HTMLInputElement>;
528
529
  onFocus?: (evt: FocusEvent_2<HTMLInputElement>) => void;
529
530
  onBlur?: (evt: FocusEvent_2<HTMLInputElement>) => void;
@@ -773,14 +774,14 @@ declare interface IMenuSection {
773
774
  inline?: boolean;
774
775
  title?: string;
775
776
  download?: boolean;
776
- onChange?: TFunction;
777
+ onChange?: TChangeEventHandler;
777
778
  menu?: any;
778
779
  visible?: boolean;
779
780
  closeOnOptionClick?: boolean;
780
781
  actions?: any[];
781
782
  url?: string;
782
783
  upload?: boolean;
783
- component?: React.ElementType;
784
+ component?: ElementType_2;
784
785
  }
785
786
 
786
787
  declare interface IMenuShowAllButton {
@@ -892,7 +893,7 @@ declare interface INumberInputCell extends TCommonCell {
892
893
  name?: string;
893
894
  value?: TStringOrNumber;
894
895
  type: TCellType;
895
- onChange?: (ev: any) => void;
896
+ onChange?: TChangeEventHandler;
896
897
  onFocus?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
897
898
  onBlur?: (evt: default_2.FocusEvent<HTMLInputElement>) => void;
898
899
  placeholder?: string;
@@ -918,7 +919,7 @@ export declare interface INumberInputProps {
918
919
  small?: boolean;
919
920
  width?: TStringOrNumber;
920
921
  value?: TStringOrNumber;
921
- onChange?: (evt: ChangeEvent<HTMLInputElement>) => void;
922
+ onChange?: TChangeEventHandler;
922
923
  onFocus?: (evt: FocusEvent_2<HTMLInputElement>) => void;
923
924
  onBlur?: (evt: FocusEvent_2<HTMLInputElement>) => void;
924
925
  tabIndex?: number;
@@ -939,10 +940,7 @@ export declare interface IOptionDropdownProps {
939
940
  name?: string;
940
941
  label: string;
941
942
  options: IOptionType[];
942
- onChange: (evt: ChangeEvent<HTMLInputElement & {
943
- name?: string;
944
- value: IOptionType[];
945
- }>) => void;
943
+ onChange: TChangeEventHandler;
946
944
  showHeader?: boolean;
947
945
  maxHeight?: string;
948
946
  }
@@ -988,7 +986,7 @@ declare interface IPaginationOptionType {
988
986
  }
989
987
 
990
988
  declare interface IPaginationPerPageType {
991
- onChange?: (evt: default_2.ChangeEvent<HTMLInputElement>) => void;
989
+ onChange?: TChangeEventHandler;
992
990
  options?: IPaginationOptionType[];
993
991
  value?: TStringOrNumber;
994
992
  }
@@ -1085,7 +1083,7 @@ export declare interface IRadioButtonProps {
1085
1083
  inline?: boolean;
1086
1084
  disabled?: boolean;
1087
1085
  small?: boolean;
1088
- onChange?: (evt: ChangeEvent<HTMLInputElement>) => void;
1086
+ onChange?: TChangeEventHandler;
1089
1087
  noMargin?: boolean;
1090
1088
  mainLabel?: string;
1091
1089
  onClick?: (target: HTMLInputElement) => void;
@@ -1132,7 +1130,7 @@ declare interface ISelectCell extends TCommonCell {
1132
1130
  type: TCellType;
1133
1131
  name?: string;
1134
1132
  value?: TStringOrNumber;
1135
- onChange?: (ev: any) => void;
1133
+ onChange?: TChangeEventHandler;
1136
1134
  onCreate?: (ev: any) => void;
1137
1135
  error?: StringNumberOrNode;
1138
1136
  warning?: StringNumberOrNode;
@@ -1155,7 +1153,7 @@ export declare interface ISelectProps {
1155
1153
  options?: ISelectSelectedOption[];
1156
1154
  value?: any;
1157
1155
  native?: boolean;
1158
- onChange?: (value: any) => void;
1156
+ onChange?: TChangeEventHandler;
1159
1157
  deprecatedEventHandler?: boolean;
1160
1158
  autoScroll?: boolean;
1161
1159
  warning?: TStringOrNumber | ReactNode;
@@ -1212,7 +1210,7 @@ declare interface ISliderCell extends TCommonCell {
1212
1210
  max: number;
1213
1211
  step?: number;
1214
1212
  marks?: TSliderMark[];
1215
- onChange: (ev: any) => void;
1213
+ onChange: TChangeEventHandler;
1216
1214
  showArrows?: boolean;
1217
1215
  showTooltip?: boolean;
1218
1216
  tooltipFormatter?: (value: any) => any;
@@ -1240,13 +1238,7 @@ export declare interface ISliderProps {
1240
1238
  width?: string;
1241
1239
  height?: string;
1242
1240
  };
1243
- onChange: (evt: {
1244
- target: {
1245
- name?: string;
1246
- value: number | number[];
1247
- label?: TStringNumberNull | ReactNode;
1248
- };
1249
- }) => void;
1241
+ onChange: TChangeEventHandler;
1250
1242
  }
1251
1243
 
1252
1244
  export declare type ISmartUploadModalProps = {
@@ -1382,7 +1374,7 @@ export declare interface ITabsProps {
1382
1374
  options?: ITabOption[] | null;
1383
1375
  children?: any;
1384
1376
  value?: ITabSelectedOption;
1385
- onChange?: (evt: ChangeEvent<any>) => void;
1377
+ onChange?: TChangeEventHandler;
1386
1378
  padding?: boolean;
1387
1379
  margin?: boolean;
1388
1380
  contentPadding?: boolean;
@@ -1399,7 +1391,7 @@ export declare interface ITextAreaProps {
1399
1391
  cols?: number;
1400
1392
  rows?: number;
1401
1393
  disabled?: boolean;
1402
- onChange?: (evt: ChangeEvent<HTMLTextAreaElement>) => void;
1394
+ onChange?: TChangeEventHandler<HTMLTextAreaElement>;
1403
1395
  onKeyPress?: (evt: KeyboardEvent_2<HTMLTextAreaElement>) => void;
1404
1396
  onFocus?: (evt: FocusEvent_2<HTMLTextAreaElement>) => void;
1405
1397
  onBlur?: (evt: FocusEvent_2<HTMLTextAreaElement>) => void;
@@ -1450,7 +1442,7 @@ export declare interface IToggleProps {
1450
1442
  disabled?: boolean;
1451
1443
  display?: string;
1452
1444
  small?: boolean;
1453
- onChange: (evt: default_2.ChangeEvent<HTMLInputElement>) => void;
1445
+ onChange: TChangeEventHandler;
1454
1446
  noMargin?: boolean;
1455
1447
  testId?: string;
1456
1448
  helpText?: string;
@@ -1588,7 +1580,7 @@ export declare interface IUnitInputProps {
1588
1580
  disabledValidation?: boolean;
1589
1581
  allowEmpty?: boolean;
1590
1582
  autoValue?: string;
1591
- onChange: (event: ChangeEvent<HTMLInputElement> | ICustomChangeEvent) => void;
1583
+ onChange?: (event: TChangeEvent | ICustomChangeEvent) => void;
1592
1584
  onSwitchUnit?: (unit: string) => void;
1593
1585
  onClick?: MouseEventHandler<HTMLInputElement>;
1594
1586
  onFocus?: FocusEventHandler<HTMLInputElement>;
@@ -1743,6 +1735,19 @@ declare type TCellShape = IPopoverCell | IStaticCell | ISelectCell | IHelpIconCe
1743
1735
 
1744
1736
  declare type TCellType = 'Static' | 'Icon' | 'Select' | 'Input' | 'NumberInput' | 'Popover' | 'CheckBox' | 'Actions' | 'Link' | 'Slider' | 'Unit' | string;
1745
1737
 
1738
+ export declare type TChangeEvent<T extends HTMLElement = HTMLInputElement> = ChangeEvent<T> & {
1739
+ target: T | {
1740
+ name: string;
1741
+ value: any;
1742
+ label?: string;
1743
+ files?: FileList | null;
1744
+ };
1745
+ };
1746
+
1747
+ export declare type TChangeEventHandler<T extends HTMLElement = HTMLInputElement> = (event: TChangeEvent<T>, ...additionalProps: {
1748
+ [key: string]: any;
1749
+ }[]) => void;
1750
+
1746
1751
  export declare type TColor = 'danger' | 'red' | 'white' | 'success' | 'green' | 'muted';
1747
1752
 
1748
1753
  declare interface TCommonCell {
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-CfpMPxgr.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-BpSdrNXy.css"></head><body><div id="content"></div></body>
1
+ <!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-DLK3QlKd.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-BpSdrNXy.css"></head><body><div id="content"></div></body>
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import React__default, { useContext, isValidElement, useState, useRef, useEffect
15
15
  import * as PropTypes from "prop-types";
16
16
  import PropTypes__default from "prop-types";
17
17
  import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
18
- import _$1, { set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isObjectLike, has as has$1, isEqual as isEqual$4 } from "lodash";
18
+ import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isObjectLike, has as has$1, isEqual as isEqual$4 } from "lodash";
19
19
  import { roundToFixed, validateNumber, cleanNumStr, unitFromQuantity, isValueWithUnit, withUnit, convertSamePrecision, getValue as getValue$1, getUnit, KNOWN_UNITS, split as split$1, checkAndCleanDecimalComma, label as label$b, altUnitsList, getUnitsForQuantity, convertAndGetValue, isScientificStringNum, roundToPrecision, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
20
20
  import { isValueWithUnit as isValueWithUnit$1 } from "@oliasoft-open-source/units/dist/units";
21
21
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -4136,7 +4136,6 @@ const Button$1 = ({
4136
4136
  return /* @__PURE__ */ jsx(ButtonTooltipWrapper, { tooltip: tooltip2, children: /* @__PURE__ */ jsxs(
4137
4137
  Component2,
4138
4138
  {
4139
- component: "span",
4140
4139
  type: type === ButtonType.SUBMIT ? ButtonType.SUBMIT : ButtonType.BUTTON,
4141
4140
  className: cx$2(
4142
4141
  buttonStyles.button,
@@ -4271,7 +4270,7 @@ const Option$2 = ({
4271
4270
  inline: inline2,
4272
4271
  title: title2,
4273
4272
  upload,
4274
- onChange,
4273
+ onChange = noop$3,
4275
4274
  testId,
4276
4275
  component: Component2 = "a"
4277
4276
  }) => {
@@ -4287,6 +4286,22 @@ const Option$2 = ({
4287
4286
  }
4288
4287
  onClick == null ? void 0 : onClick(evt);
4289
4288
  };
4289
+ const handleFileChange = (evt) => {
4290
+ const { files } = (evt == null ? void 0 : evt.target) ?? {};
4291
+ if (files) {
4292
+ const customEvent = {
4293
+ ...evt,
4294
+ target: {
4295
+ ...evt.target,
4296
+ value: files,
4297
+ name: evt.target.name,
4298
+ files
4299
+ }
4300
+ };
4301
+ onChange == null ? void 0 : onChange(customEvent);
4302
+ close2 == null ? void 0 : close2();
4303
+ }
4304
+ };
4290
4305
  return /* @__PURE__ */ jsxs(
4291
4306
  Component2,
4292
4307
  {
@@ -4308,10 +4323,7 @@ const Option$2 = ({
4308
4323
  {
4309
4324
  type: "file",
4310
4325
  className: styles$L.fileInput,
4311
- onChange: (evt) => {
4312
- onChange == null ? void 0 : onChange(evt.target.files);
4313
- close2 == null ? void 0 : close2();
4314
- }
4326
+ onChange: handleFileChange
4315
4327
  }
4316
4328
  ),
4317
4329
  /* @__PURE__ */ jsx("span", { className: styles$L.label, title: `${title2 || label2}`, children: label2 }),
@@ -8938,8 +8950,7 @@ const FileButton = ({
8938
8950
  multi,
8939
8951
  name: name2,
8940
8952
  disabled: disabled2,
8941
- onChange = () => {
8942
- },
8953
+ onChange = noop$3,
8943
8954
  ...buttonProps
8944
8955
  }) => {
8945
8956
  const disabledContext = useContext(DisabledContext);
@@ -8951,7 +8962,15 @@ const FileButton = ({
8951
8962
  const handleChange = (evt) => {
8952
8963
  var _a2;
8953
8964
  const files = multi ? evt.target.files : (_a2 = evt.target.files) == null ? void 0 : _a2[0];
8954
- onChange({ ...evt, target: { ...evt.target, value: files } });
8965
+ const customEvent = {
8966
+ ...evt,
8967
+ target: {
8968
+ ...evt.target,
8969
+ value: files,
8970
+ name: evt.target.name
8971
+ }
8972
+ };
8973
+ onChange(customEvent);
8955
8974
  if (inputRef.current) {
8956
8975
  inputRef.current.value = "";
8957
8976
  }
@@ -9045,8 +9064,7 @@ const Input$1 = forwardRef(
9045
9064
  isInTable: isInTable2,
9046
9065
  width: propWidth = void 0,
9047
9066
  small: small2 = false,
9048
- onChange = () => {
9049
- },
9067
+ onChange = noop$3,
9050
9068
  placeholder: placeholder3 = "",
9051
9069
  value = "",
9052
9070
  onKeyPress = () => {
@@ -9178,8 +9196,7 @@ const FileInput = ({
9178
9196
  multi,
9179
9197
  name: name2,
9180
9198
  width: width2,
9181
- onChange = () => {
9182
- },
9199
+ onChange = noop$3,
9183
9200
  testId
9184
9201
  }) => {
9185
9202
  const disabledContext = useContext(DisabledContext);
@@ -9192,7 +9209,15 @@ const FileInput = ({
9192
9209
  const handleChange = (evt) => {
9193
9210
  var _a2, _b, _c;
9194
9211
  const files = multi ? (_a2 = evt == null ? void 0 : evt.target) == null ? void 0 : _a2.files : (_c = (_b = evt == null ? void 0 : evt.target) == null ? void 0 : _b.files) == null ? void 0 : _c[0];
9195
- onChange({ ...evt, target: { ...evt.target, value: files } });
9212
+ const customEvent = {
9213
+ ...evt,
9214
+ target: {
9215
+ ...evt.target,
9216
+ value: files,
9217
+ name: evt.target.name
9218
+ }
9219
+ };
9220
+ onChange(customEvent);
9196
9221
  if (inputRef.current) {
9197
9222
  inputRef.current.value = "";
9198
9223
  }
@@ -19623,12 +19648,9 @@ const NativeSelect = ({
19623
19648
  warning: warning2 = null,
19624
19649
  tooltip: tooltip2 = null,
19625
19650
  options,
19626
- onChange = () => {
19627
- },
19628
- onFocus = () => {
19629
- },
19630
- onBlur = () => {
19631
- },
19651
+ onChange = noop$3,
19652
+ onFocus = noop$3,
19653
+ onBlur = noop$3,
19632
19654
  right: right2 = false,
19633
19655
  small: small2 = false,
19634
19656
  tabIndex = 0,
@@ -20791,8 +20813,7 @@ const Input = ({
20791
20813
  selectedOptions,
20792
20814
  searchable = false,
20793
20815
  searchValue,
20794
- onChange = () => {
20795
- },
20816
+ onChange = noop$3,
20796
20817
  inputRef,
20797
20818
  error: error2,
20798
20819
  placeholder: placeholder3 = "Select...",
@@ -21517,8 +21538,8 @@ const CustomSelect = (props) => {
21517
21538
  }
21518
21539
  ) });
21519
21540
  };
21520
- const isMulti = (selectedOptions) => selectedOptions instanceof Array;
21521
21541
  const isEmptyNullOrUndefined = (value) => value === null || value === void 0 || value === "";
21542
+ const isMulti = (selectedOptions) => selectedOptions instanceof Array;
21522
21543
  const standardizeOptions = (options, simple) => {
21523
21544
  return simple && Array.isArray(options) ? options.map(
21524
21545
  (o) => typeof o === "string" || typeof o === "number" ? { label: o, value: o } : o
@@ -21606,8 +21627,7 @@ const Select = (props) => {
21606
21627
  options: rawOptions = [],
21607
21628
  value: rawSelectedOptions,
21608
21629
  native = false,
21609
- onChange = () => {
21610
- },
21630
+ onChange = noop$3,
21611
21631
  deprecatedEventHandler = false,
21612
21632
  autoScroll: autoScroll2 = true,
21613
21633
  warning: warning2,
@@ -21650,7 +21670,9 @@ const Select = (props) => {
21650
21670
  const newSelectedOptions = multi ? selectedOptions2.map(
21651
21671
  (o) => simpleInputs ? o.value : o
21652
21672
  ) : simpleInputs ? selectedOptions2.value : selectedOptions2;
21653
- onChange(newSelectedOptions);
21673
+ if (newSelectedOptions) {
21674
+ onChange(newSelectedOptions);
21675
+ }
21654
21676
  } else {
21655
21677
  const isSyntheticEvent = !(evt instanceof Event);
21656
21678
  const value = multi ? selectedOptions2 : selectedOptions2.value;
@@ -21662,17 +21684,16 @@ const Select = (props) => {
21662
21684
  }
21663
21685
  onChange(evt);
21664
21686
  } else {
21665
- onChange({
21687
+ const customEvent = {
21666
21688
  ...evt,
21667
21689
  target: {
21668
21690
  ...evt.target,
21669
21691
  name: name2,
21670
21692
  value,
21671
- ...!multi && {
21672
- label: selectedOptions2.label
21673
- }
21693
+ label: !multi ? selectedOptions2.label : void 0
21674
21694
  }
21675
- });
21695
+ };
21696
+ onChange(customEvent);
21676
21697
  }
21677
21698
  }
21678
21699
  };
@@ -55254,16 +55275,18 @@ const Slider = ({
55254
55275
  width: "100px",
55255
55276
  height: "400px"
55256
55277
  },
55257
- onChange
55278
+ onChange = noop$3
55258
55279
  }) => {
55259
55280
  const disabledContext = useContext(DisabledContext);
55260
55281
  const formattedMarks = memoizedFormatMarkers(marks);
55261
55282
  const onChangeValue = (value2) => {
55283
+ const eventLabel = typeof label2 === "string" ? label2 : String(label2);
55284
+ const eventName = name2 ?? "";
55262
55285
  onChange({
55263
55286
  target: {
55264
- name: name2,
55287
+ name: eventName,
55265
55288
  value: value2,
55266
- label: label2
55289
+ label: eventLabel
55267
55290
  }
55268
55291
  });
55269
55292
  };
@@ -55304,7 +55327,7 @@ const Slider = ({
55304
55327
  styles$c.container,
55305
55328
  small2 ? styles$c.small : "",
55306
55329
  vertical2.enabled ? styles$c.vertical : "",
55307
- !_$1.isEmpty(marks) ? styles$c.hasMarks : ""
55330
+ !isEmpty(marks) ? styles$c.hasMarks : ""
55308
55331
  ),
55309
55332
  style: vertical2.enabled ? { width: vertical2.width, height: vertical2.height } : { width: width2 },
55310
55333
  children: [
@@ -56586,8 +56609,7 @@ const Tabs = ({
56586
56609
  options: rawOptions = null,
56587
56610
  children = null,
56588
56611
  value: rawValue = void 0,
56589
- onChange = () => {
56590
- },
56612
+ onChange = noop$3,
56591
56613
  padding: padding2 = false,
56592
56614
  margin: margin2 = true,
56593
56615
  contentPadding: contentPadding2 = true,
@@ -56623,6 +56645,18 @@ const Tabs = ({
56623
56645
  const selectedValue = isDeprecated || value === void 0 || value === null ? void 0 : simpleInputs ? value : value.value;
56624
56646
  const activeTabIndexBase = rawActiveTabIndex !== void 0 ? rawActiveTabIndex : tabs2 == null ? void 0 : tabs2.findIndex((t) => t.value === selectedValue);
56625
56647
  const activeTabIndex = activeTabIndexBase === -1 ? 0 : activeTabIndexBase;
56648
+ const handleTabClick = (index2, tab2, event) => {
56649
+ if (isDeprecated) {
56650
+ const value2 = tab2.key || tab2.label || null;
56651
+ onChangeTab(index2, value2);
56652
+ } else {
56653
+ const target = event.target;
56654
+ target.name = name2;
56655
+ target.value = tab2.value;
56656
+ target.label = tab2.label;
56657
+ onChange(event);
56658
+ }
56659
+ };
56626
56660
  const renderTab = (tab2, index2) => {
56627
56661
  const {
56628
56662
  label: label2,
@@ -56646,16 +56680,7 @@ const Tabs = ({
56646
56680
  badge: badge2,
56647
56681
  right: right2,
56648
56682
  active: isDeprecated ? index2 === activeTabIndex : value2 === selectedValue,
56649
- onClick: isDeprecated ? () => {
56650
- const value3 = tab2.key || label2 || null;
56651
- onChangeTab(index2, value3);
56652
- } : (evt) => {
56653
- const target = evt.target;
56654
- target.name = name2;
56655
- target.value = tab2.value;
56656
- target.label = label2;
56657
- onChange(evt);
56658
- },
56683
+ onClick: (event) => handleTabClick(index2, tab2, event),
56659
56684
  testId: testId2
56660
56685
  },
56661
56686
  index2
@@ -56740,14 +56765,10 @@ const TextArea = ({
56740
56765
  cols,
56741
56766
  rows,
56742
56767
  disabled: disabled2 = false,
56743
- onChange = () => {
56744
- },
56745
- onKeyPress = () => {
56746
- },
56747
- onFocus = () => {
56748
- },
56749
- onBlur = () => {
56750
- },
56768
+ onChange = noop$3,
56769
+ onKeyPress = noop$3,
56770
+ onFocus = noop$3,
56771
+ onBlur = noop$3,
56751
56772
  tabIndex = 0,
56752
56773
  error: error2 = null,
56753
56774
  warning: warning2 = null,
@@ -70218,7 +70239,7 @@ const validate = (value, options) => {
70218
70239
  disabledValidation = false
70219
70240
  } = options || {};
70220
70241
  const stringValue = String(value);
70221
- if (disabledValidation || autoValue || placeholder3) {
70242
+ if (disabledValidation || autoValue || placeholder3 && isEmptyNullOrUndefined(value)) {
70222
70243
  return null;
70223
70244
  }
70224
70245
  const cleanValue = isValueWithUnit$1(stringValue) ? getValue$1(stringValue) : stringValue;
@@ -70271,14 +70292,10 @@ const UnitInput = ({
70271
70292
  unitkey = "",
70272
70293
  initUnit,
70273
70294
  noConversion = false,
70274
- onChange = () => {
70275
- },
70276
- onClick = () => {
70277
- },
70278
- onFocus = () => {
70279
- },
70280
- onSwitchUnit = () => {
70281
- },
70295
+ onChange = noop$3,
70296
+ onClick = noop$3,
70297
+ onFocus = noop$3,
70298
+ onSwitchUnit = noop$3,
70282
70299
  unitTemplate,
70283
70300
  doNotConvertValue = false,
70284
70301
  testId,