@lumx/react 4.11.0-next.6 → 4.11.0-next.7

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 (4) hide show
  1. package/index.d.ts +32 -43
  2. package/index.js +4429 -4313
  3. package/index.js.map +1 -1
  4. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Theme as Theme$1, Orientation as Orientation$1, Alignment as Alignment$1, Size as Size$1, AspectRatio as AspectRatio$1, Emphasis as Emphasis$1 } from '@lumx/core/js/constants';
1
+ import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Orientation as Orientation$1, Alignment as Alignment$1, Size as Size$1, AspectRatio as AspectRatio$1, Emphasis as Emphasis$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
4
  import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf as ValueOf$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
@@ -1018,61 +1018,50 @@ declare const ChipGroup: Comp<ChipGroupProps, HTMLDivElement> & {
1018
1018
  useChipGroupNavigation: useChipGroupNavigationType<any>;
1019
1019
  };
1020
1020
 
1021
- interface SelectionChipGroupProps<O> extends GenericProps$1 {
1022
- /**
1023
- * Option object id selector (either the property name or a function to get the id)
1024
- */
1021
+ /**
1022
+ * Defines the props of the component.
1023
+ */
1024
+ interface SelectionChipGroupProps$1<O> extends HasClassName, HasTheme {
1025
+ /** Option object id selector (either a property name or a function to get the id) */
1025
1026
  getOptionId: Selector<O>;
1026
- /**
1027
- * Option object name selector (either the property name or a function to get the name)
1028
- * Fallbacks on the ID if not defined
1029
- */
1027
+ /** Option object name selector. Falls back to the id if not defined */
1030
1028
  getOptionName?: Selector<O, string | undefined | null>;
1031
- /**
1032
- * Selected options array
1033
- */
1029
+ /** Selected options array */
1034
1030
  value?: O[];
1035
- /**
1036
- * Callback on option array selected
1037
- */
1031
+ /** Label for accessibility (aria-label on the listbox) */
1032
+ label: string;
1033
+ /** Label for the remove action (visually hidden text appended to each chip) */
1034
+ chipRemoveLabel?: string;
1035
+ /** Disabled state for all chips */
1036
+ isDisabled?: boolean;
1037
+ /** Customize chip props per option */
1038
+ getChipProps?: (option: O) => Partial<ChipProps$1>;
1039
+ /** Ref for the container element */
1040
+ ref?: any;
1041
+ }
1042
+
1043
+ /**
1044
+ * Defines the props of the component.
1045
+ */
1046
+ interface SelectionChipGroupProps<O> extends GenericProps$1, ReactToJSX<SelectionChipGroupProps$1<O>> {
1047
+ /** Callback on option array selected */
1038
1048
  onChange?(newValue?: O[]): void;
1039
- /**
1040
- * Input ref to restore focus
1041
- */
1049
+ /** Input ref to restore focus */
1042
1050
  inputRef?: React__default.RefObject<HTMLInputElement>;
1043
- /**
1044
- * Input label, used to generate the chip group aria description
1045
- */
1046
- inputLabel?: string;
1047
- /**
1048
- * Customize how chips should render
1049
- */
1051
+ /** Customize how chips should render (return a <Chip> element to override chip props) */
1050
1052
  renderChip?: (option: O) => React__default.ReactNode;
1051
- /**
1052
- * Scope for tracking purposes
1053
- */
1054
- scope?: string;
1055
- /**
1056
- * LumX theme
1057
- */
1058
- theme?: Theme$1;
1059
- /**
1060
- * Disabled state
1061
- */
1062
- isDisabled?: boolean;
1063
- /** label to be used for accessibility purposes */
1064
- label: string;
1065
- /** callback for generating the tooltip for each individual chip */
1066
- chipTooltipLabel: (chip: string) => string;
1067
1053
  }
1068
1054
  /**
1069
1055
  * SelectionChipGroup component.
1070
1056
  *
1071
1057
  * @param props Component props.
1072
- * @param ref Component ref.
1073
1058
  * @return React element.
1074
1059
  */
1075
- declare const SelectionChipGroup: <O>({ onChange, value, getOptionId, getOptionName, inputRef, inputLabel, renderChip, theme, isDisabled, chipTooltipLabel, label, ...forwardedProps }: SelectionChipGroupProps<O>) => react_jsx_runtime.JSX.Element;
1060
+ declare const SelectionChipGroup: {
1061
+ <O>({ onChange, value, getOptionId, getOptionName, inputRef, renderChip, getChipProps: getChipPropsProp, theme, isDisabled, label, chipRemoveLabel, ...forwardedProps }: SelectionChipGroupProps<O>): react_jsx_runtime.JSX.Element | null;
1062
+ displayName: string;
1063
+ className: "lumx-selection-chip-group";
1064
+ };
1076
1065
 
1077
1066
  type Listener = (evt: KeyboardEvent) => void;
1078
1067
  interface UseKeyboardListNavigationType {