@lumx/react 4.2.1-alpha.4 → 4.2.1-alpha.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/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as _lumx_core_js_types from '@lumx/core/js/types';
4
4
  import { GenericProps, HasTheme as HasTheme$1, ValueOf, HasAriaDisabled as HasAriaDisabled$1, HasCloseMode, Falsy, HasClassName as HasClassName$1, HeadingElement as HeadingElement$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
- import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, InputHTMLAttributes, RefObject, CSSProperties, ImgHTMLAttributes, SetStateAction, Key, ElementType, ComponentProps } from 'react';
7
+ import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, InputHTMLAttributes, RefObject, CSSProperties, ImgHTMLAttributes, AriaAttributes as AriaAttributes$1, SetStateAction, Key, ElementType, ComponentProps } from 'react';
8
8
  import { GenericProps as GenericProps$2 } from '@lumx/core/js/utils/disabledState';
9
9
 
10
10
  /** LumX Component Type. */
@@ -528,20 +528,37 @@ interface HasAriaDisabled {
528
528
  'aria-disabled'?: Booleanish;
529
529
  }
530
530
 
531
- type BaseClickableProps = {
531
+ interface AriaAttributes {
532
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
533
+ 'aria-expanded'?: Booleanish | undefined;
534
+ /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
535
+ 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;
536
+ /**
537
+ * Defines a string value that labels the current element.
538
+ * @see aria-labelledby.
539
+ */
540
+ 'aria-label'?: string | undefined;
541
+ /**
542
+ * Indicates the current "pressed" state of toggle buttons.
543
+ * @see aria-checked @see aria-selected.
544
+ */
545
+ 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined;
546
+ }
547
+
548
+ interface BaseClickableProps {
532
549
  children?: JSXElement;
533
550
  isDisabled?: boolean;
534
551
  disabled?: boolean;
535
552
  'aria-disabled'?: Booleanish;
536
553
  onClick?: (event?: any) => void;
537
554
  ref?: CommonRef;
538
- };
555
+ }
539
556
 
540
557
  /**
541
558
  * Button size definition.
542
559
  */
543
560
  type ButtonSize = Extract<Size, 's' | 'm'>;
544
- interface BaseButtonProps extends Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>, HasClassName, HasTheme, HasAriaDisabled, BaseClickableProps {
561
+ interface BaseButtonProps extends AriaAttributes, HasClassName, HasTheme, HasAriaDisabled, BaseClickableProps {
545
562
  /** Color variant. */
546
563
  color?: ColorPalette;
547
564
  /** Emphasis variant. */
@@ -586,7 +603,7 @@ declare const ButtonEmphasis: {
586
603
  /**
587
604
  * Defines the props of the component.
588
605
  */
589
- interface ButtonProps$1 extends /* @vue-ignore */ BaseButtonProps {
606
+ interface ButtonProps$1 extends BaseButtonProps {
590
607
  /** Left icon (SVG path). */
591
608
  leftIcon?: string;
592
609
  /** Right icon (SVG path). */
@@ -609,8 +626,7 @@ declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
609
626
  */
610
627
  declare const DEFAULT_PROPS: Partial<ButtonProps$1>;
611
628
 
612
- interface ButtonProps extends ButtonProps$1 {
613
- [propName: string]: any;
629
+ interface ButtonProps extends GenericProps$1, ButtonProps$1 {
614
630
  }
615
631
  /**
616
632
  * Button component.
@@ -1907,7 +1923,7 @@ declare const InputLabel: Comp<InputLabelProps, HTMLLabelElement>;
1907
1923
  /**
1908
1924
  * Defines the props of the component.
1909
1925
  */
1910
- interface LightboxProps extends GenericProps, HasTheme$1, Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {
1926
+ interface LightboxProps extends GenericProps, HasTheme$1, Pick<AriaAttributes$1, 'aria-label' | 'aria-labelledby'> {
1911
1927
  /** Props to pass to the close button (minus those already set by the Lightbox props). */
1912
1928
  closeButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
1913
1929
  /** Whether the component is open or not. */