@lumx/react 4.3.2-alpha.37 → 4.3.2-alpha.38

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/index.d.ts CHANGED
@@ -39,7 +39,6 @@ interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
39
39
  title?: string;
40
40
  /** Props forwarded to the confirm button */
41
41
  confirmProps: ButtonProps & {
42
- onClick(): void;
43
42
  label: string;
44
43
  };
45
44
  /**
@@ -47,7 +46,6 @@ interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
47
46
  * Will not render a cancel button if undefined.
48
47
  */
49
48
  cancelProps?: ButtonProps & {
50
- onClick(): void;
51
49
  label: string;
52
50
  };
53
51
  /**
@@ -726,7 +724,7 @@ declare const DEFAULT_PROPS: Partial<ButtonProps$1>;
726
724
 
727
725
  interface ButtonProps extends GenericProps$1, ReactToJSX<ButtonProps$1> {
728
726
  /** callback for clicking on the button */
729
- onClick?: (event: React.MouseEvent) => void;
727
+ onClick?: (event?: React.MouseEvent) => void;
730
728
  }
731
729
  /**
732
730
  * Button component.
@@ -766,7 +764,7 @@ interface IconButtonProps extends GenericProps$1, ReactToJSX<IconButtonProps$1,
766
764
  /** Whether the tooltip should be hidden or not. */
767
765
  hideTooltip?: boolean;
768
766
  /** callback for clicking on the button */
769
- onClick?: (event: React.MouseEvent) => void;
767
+ onClick?: (event?: React.MouseEvent) => void;
770
768
  }
771
769
  /**
772
770
  * IconButton component.
@@ -2852,7 +2850,7 @@ interface CoreSelectProps extends GenericProps$1, HasTheme$1 {
2852
2850
  /** Select variant. */
2853
2851
  variant?: SelectVariant;
2854
2852
  /** On clear callback. */
2855
- onClear?(event: SyntheticEvent, value?: string): void;
2853
+ onClear?(event?: SyntheticEvent, value?: string): void;
2856
2854
  /** On blur callback. */
2857
2855
  onBlur?(): void;
2858
2856
  /** On filter text change callback (with 500ms debounce). */
package/index.js CHANGED
@@ -9707,7 +9707,7 @@ const Notification = forwardRef((props, ref) => {
9707
9707
  if (isFunction(onActionClick)) {
9708
9708
  onActionClick();
9709
9709
  }
9710
- evt.stopPropagation();
9710
+ evt?.stopPropagation();
9711
9711
  };
9712
9712
  if (!type || !isVisible) {
9713
9713
  return null;
@@ -14143,9 +14143,9 @@ const TextField = forwardRef((props, ref) => {
14143
14143
  * @param evt On clear event.
14144
14144
  */
14145
14145
  const handleClear = evt => {
14146
- evt.nativeEvent.preventDefault();
14147
- evt.nativeEvent.stopPropagation();
14148
- evt.currentTarget.blur();
14146
+ evt?.nativeEvent.preventDefault();
14147
+ evt?.nativeEvent.stopPropagation();
14148
+ (evt?.currentTarget).blur();
14149
14149
  onChange('');
14150
14150
  if (onClear) {
14151
14151
  onClear(evt);