@gamecp/ui 0.1.36 → 0.1.37

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.d.mts CHANGED
@@ -27,6 +27,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
27
27
  leftIcon?: React__default.ReactNode;
28
28
  rightIcon?: React__default.ReactNode;
29
29
  fullWidth?: boolean;
30
+ 'aria-label'?: string;
31
+ 'aria-describedby'?: string;
30
32
  }
31
33
  declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
32
34
 
@@ -690,6 +692,10 @@ interface IconButtonWithCountProps {
690
692
  }
691
693
  declare function IconButtonWithCount({ icon, label, count, onClick, onClear, showLabel, className, buttonClassName, countVariant, clearVariant, tooltipId, tooltipContent, clearTooltipId, clearTooltipContent, }: IconButtonWithCountProps): react_jsx_runtime.JSX.Element;
692
694
 
695
+ /**
696
+ * Render function that receives selection state for dynamic styling
697
+ */
698
+ type SelectionAwareRenderer = (isSelected: boolean) => ReactNode;
693
699
  /**
694
700
  * Single dropdown item - flexible to support menus, selects, filters
695
701
  */
@@ -698,10 +704,10 @@ interface DropdownItem$1 {
698
704
  value: string;
699
705
  /** Display label - string or ReactNode */
700
706
  label: ReactNode;
701
- /** Optional description/subtitle */
702
- description?: ReactNode;
703
- /** Optional icon (React component, element, or null) */
704
- icon?: ReactNode;
707
+ /** Optional description/subtitle - can be a function to receive selection state */
708
+ description?: ReactNode | SelectionAwareRenderer;
709
+ /** Optional icon - can be a function to receive selection state for dynamic styling */
710
+ icon?: ReactNode | SelectionAwareRenderer;
705
711
  /** Whether this item is disabled */
706
712
  disabled?: boolean;
707
713
  /** Visual variant for the item */
@@ -818,12 +824,14 @@ interface DropdownItemProps {
818
824
  selected?: boolean;
819
825
  multiple?: boolean;
820
826
  onClick: () => void;
827
+ focused?: boolean;
828
+ itemId?: string;
821
829
  }
822
830
  /**
823
831
  * Single dropdown item renderer
824
832
  * Supports icon, label, description, and selection state
825
833
  */
826
- declare function DropdownItem({ item, selected, multiple, onClick, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
834
+ declare function DropdownItem({ item, selected, multiple, onClick, focused, itemId, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
827
835
 
828
836
  interface SelectProps {
829
837
  /** Options to choose from */
package/dist/index.d.ts CHANGED
@@ -27,6 +27,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
27
27
  leftIcon?: React__default.ReactNode;
28
28
  rightIcon?: React__default.ReactNode;
29
29
  fullWidth?: boolean;
30
+ 'aria-label'?: string;
31
+ 'aria-describedby'?: string;
30
32
  }
31
33
  declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
32
34
 
@@ -690,6 +692,10 @@ interface IconButtonWithCountProps {
690
692
  }
691
693
  declare function IconButtonWithCount({ icon, label, count, onClick, onClear, showLabel, className, buttonClassName, countVariant, clearVariant, tooltipId, tooltipContent, clearTooltipId, clearTooltipContent, }: IconButtonWithCountProps): react_jsx_runtime.JSX.Element;
692
694
 
695
+ /**
696
+ * Render function that receives selection state for dynamic styling
697
+ */
698
+ type SelectionAwareRenderer = (isSelected: boolean) => ReactNode;
693
699
  /**
694
700
  * Single dropdown item - flexible to support menus, selects, filters
695
701
  */
@@ -698,10 +704,10 @@ interface DropdownItem$1 {
698
704
  value: string;
699
705
  /** Display label - string or ReactNode */
700
706
  label: ReactNode;
701
- /** Optional description/subtitle */
702
- description?: ReactNode;
703
- /** Optional icon (React component, element, or null) */
704
- icon?: ReactNode;
707
+ /** Optional description/subtitle - can be a function to receive selection state */
708
+ description?: ReactNode | SelectionAwareRenderer;
709
+ /** Optional icon - can be a function to receive selection state for dynamic styling */
710
+ icon?: ReactNode | SelectionAwareRenderer;
705
711
  /** Whether this item is disabled */
706
712
  disabled?: boolean;
707
713
  /** Visual variant for the item */
@@ -818,12 +824,14 @@ interface DropdownItemProps {
818
824
  selected?: boolean;
819
825
  multiple?: boolean;
820
826
  onClick: () => void;
827
+ focused?: boolean;
828
+ itemId?: string;
821
829
  }
822
830
  /**
823
831
  * Single dropdown item renderer
824
832
  * Supports icon, label, description, and selection state
825
833
  */
826
- declare function DropdownItem({ item, selected, multiple, onClick, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
834
+ declare function DropdownItem({ item, selected, multiple, onClick, focused, itemId, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
827
835
 
828
836
  interface SelectProps {
829
837
  /** Options to choose from */