@indico-data/design-system 3.10.0 → 3.11.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.
@@ -17,5 +17,7 @@ export interface SelectProps<OptionType extends SelectOption> extends ReactSelec
17
17
  /** Event handler for when the selected value changes */
18
18
  onChange?: (newValue: any, actionMeta: any) => void;
19
19
  }
20
- declare const LabeledSelect: React.ForwardRefExoticComponent<SelectProps<SelectOption> & import("../subcomponents/Label").LabelProps & React.RefAttributes<any>>;
20
+ declare const LabeledSelect: React.ForwardRefExoticComponent<Omit<SelectProps<SelectOption> & {
21
+ ref?: React.Ref<any>;
22
+ } & import("../subcomponents/Label").LabelProps, "ref"> & React.RefAttributes<any>>;
21
23
  export { LabeledSelect as Select };
@@ -1,6 +1,7 @@
1
+ import { ReactNode } from 'react';
1
2
  export type SelectOption = {
2
3
  label: string;
3
4
  value: string;
4
- detail?: string;
5
+ detail?: ReactNode;
5
6
  [key: string]: any;
6
7
  };
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { UseFloatingOptions } from '@floating-ui/react-dom';
3
3
  export * from '@floating-ui/react-dom';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ContainerProps, RowProps, ColProps } from 'react-grid-system';
6
- import React$1, { CSSProperties, MouseEventHandler, ReactElement, ReactNode } from 'react';
6
+ import React$1, { CSSProperties, MouseEventHandler, ReactNode, ReactElement } from 'react';
7
7
  import { IDataTableProps, Direction as Direction$1, TableColumn as TableColumn$1 } from 'react-data-table-component';
8
8
  import { CSSObject } from 'styled-components';
9
9
  import { Props as Props$4 } from 'react-select';
@@ -200,7 +200,7 @@ type IconProps = PermafrostComponent & {
200
200
  type SelectOption = {
201
201
  label: string;
202
202
  value: string;
203
- detail?: string;
203
+ detail?: ReactNode;
204
204
  [key: string]: any;
205
205
  };
206
206
 
@@ -483,7 +483,9 @@ interface SelectProps<OptionType extends SelectOption> extends Props$4<OptionTyp
483
483
  /** Event handler for when the selected value changes */
484
484
  onChange?: (newValue: any, actionMeta: any) => void;
485
485
  }
486
- declare const LabeledSelect: React$1.ForwardRefExoticComponent<SelectProps<SelectOption> & LabelProps & React$1.RefAttributes<any>>;
486
+ declare const LabeledSelect: React$1.ForwardRefExoticComponent<Omit<SelectProps<SelectOption> & {
487
+ ref?: React$1.Ref<any>;
488
+ } & LabelProps, "ref"> & React$1.RefAttributes<any>>;
487
489
 
488
490
  interface DatePickerProps {
489
491
  ref?: React.LegacyRef<HTMLInputElement>;
package/lib/index.esm.js CHANGED
@@ -5816,14 +5816,14 @@ const OptionComponent = (_a) => {
5816
5816
  var props = __rest(_a, []);
5817
5817
  return (jsx(components$1.Option, Object.assign({}, props, { children: jsxs("div", { className: "select__items", children: [jsx("div", { className: "select__item-value", children: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.label }), ((_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.detail) && jsx("div", { className: "select__item-detail", children: (_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.detail })] }) })));
5818
5818
  };
5819
- const Select$1 = (_a) => {
5819
+ const Select$1 = React__default.forwardRef((_a, ref) => {
5820
5820
  var { classNamePrefix = 'select', className, components: customComponents, label, hasHiddenLabel, name } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name"]);
5821
5821
  const defaultComponents = {
5822
5822
  Option: OptionComponent,
5823
5823
  };
5824
5824
  const mergedComponents = Object.assign(Object.assign({}, defaultComponents), customComponents);
5825
- return (jsx(ReactSelect, Object.assign({ classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents }, props)));
5826
- };
5825
+ return (jsx(ReactSelect, Object.assign({ ref: ref, classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents }, props)));
5826
+ });
5827
5827
  const LabeledSelect = withLabel(Select$1);
5828
5828
 
5829
5829
  /**