@lumx/react 4.1.0 → 4.1.1-alpha.0

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
@@ -1,7 +1,7 @@
1
1
  import { Kind as Kind$1, HorizontalAlignment, Size as Size$1, ColorPalette as ColorPalette$1, Emphasis, Alignment, VerticalAlignment, Orientation, ColorWithVariants as ColorWithVariants$1, ColorVariant as ColorVariant$1, Typography as Typography$1, WhiteSpace, AspectRatio, GlobalSize, TypographyInterface as TypographyInterface$1, Theme as Theme$1 } from '@lumx/core/js/constants';
2
2
  export * from '@lumx/core/js/constants';
3
3
  import * as _lumx_core_js_types from '@lumx/core/js/types';
4
- import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf, HasCloseMode, TextElement, HeadingElement, Falsy, HasClassName as HasClassName$1, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
4
+ import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf, HasCloseMode, TextElement, HeadingElement, Falsy, HasClassName as HasClassName$1, HasRequiredLinkHref, HasAriaLabelOrLabelledBy } from '@lumx/core/js/types';
5
5
  export * from '@lumx/core/js/types';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, DetailedHTMLProps, ButtonHTMLAttributes, InputHTMLAttributes, RefObject, ImgHTMLAttributes, CSSProperties, SetStateAction, Key, ElementType, ComponentProps } from 'react';
@@ -31,10 +31,6 @@ type ComponentRef<C> = C extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElem
31
31
  ref?: infer R;
32
32
  }> ? R : never;
33
33
 
34
- type HasRequiredLinkHref<E> = E extends 'a' ? {
35
- href: string;
36
- } : Record<string, unknown>;
37
-
38
34
  interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
39
35
  /** Message variant. */
40
36
  kind?: Kind$1;
package/index.js CHANGED
@@ -861,7 +861,7 @@ const forwardRefPolymorphic = React__default.forwardRef;
861
861
  * Render clickable element (link, button or custom element)
862
862
  * (also does some basic disabled state handling)
863
863
  */
864
- const RawClickable = forwardRefPolymorphic((props, ref) => {
864
+ const RawClickable$1 = props => {
865
865
  const {
866
866
  children,
867
867
  onClick,
@@ -885,7 +885,6 @@ const RawClickable = forwardRefPolymorphic((props, ref) => {
885
885
  };
886
886
  }
887
887
  return /*#__PURE__*/jsx(Component, {
888
- ref: ref,
889
888
  "aria-disabled": isAnyDisabled || undefined,
890
889
  ...forwardedProps,
891
890
  ...clickableProps,
@@ -899,6 +898,17 @@ const RawClickable = forwardRefPolymorphic((props, ref) => {
899
898
  },
900
899
  children: children
901
900
  });
901
+ };
902
+
903
+ /**
904
+ * Render clickable element (link, button or custom element)
905
+ * (also does some basic disabled state handling)
906
+ */
907
+ const RawClickable = forwardRefPolymorphic((props, ref) => {
908
+ return RawClickable$1({
909
+ ref,
910
+ ...props
911
+ });
902
912
  });
903
913
 
904
914
  /**
@@ -6736,7 +6746,6 @@ const DEFAULT_PROPS$J = {};
6736
6746
  * Icon component.
6737
6747
  *
6738
6748
  * @param props Component props.
6739
- * @param ref Component ref.
6740
6749
  */
6741
6750
  const Icon$1 = props => {
6742
6751
  const {