@digital-ai/dot-components 5.6.0 → 5.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "5.6.0",
3
+ "version": "5.7.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -57,6 +57,7 @@ export type { ChipTooltipProps, ChipProps, ChipSize } from './chip/Chip';
57
57
  export type { SearchProps } from './search';
58
58
  export type { ToggleSwitchProps, ToggleSwitchValue, ToggleSwitchOption, ToggleSwitchSingleValue, } from './toggle-switch';
59
59
  export type { ColorPickerProps, ColorResult, HsvaColor, SwatchPresetColor, } from './color-picker';
60
+ export type { SelectProps, SelectOption } from './select';
60
61
  export { DotAccordion } from './accordion/Accordion';
61
62
  export { DotActionToolbar } from './action-toolbar/ActionToolbar';
62
63
  export { DotAlertBanner } from './alert-banner/AlertBanner';
@@ -147,3 +148,4 @@ export { DotSearch } from './search';
147
148
  export { DotToggleSwitch } from './toggle-switch';
148
149
  export { DotColorPicker } from './color-picker';
149
150
  export { useKeyPress } from '../hooks/useKeyPress';
151
+ export { DotSelect } from './select';
@@ -7,19 +7,21 @@ export interface RailItem {
7
7
  ariaLabel?: string;
8
8
  /** Optional badge which will be displayed over an icon **/
9
9
  iconBadge?: RailIconBadge;
10
- /** Id of the icon shown in the rail item */
10
+ /** ID of the icon shown in the rail item */
11
11
  iconId: string;
12
12
  /** text displayed or title text if icon used */
13
13
  title: string;
14
14
  }
15
15
  export interface NavigationRailProps extends CommonProps {
16
+ /** default rail index (use when component is not controlled) */
17
+ defaultIndex?: number;
16
18
  /** onChange callback */
17
19
  onChange?: (index: number) => void;
18
20
  /** controls the position of the rail items */
19
21
  railItemPosition?: RailItemsPosition;
20
22
  /** list of rail items */
21
23
  railItems: Array<RailItem>;
22
- /** index of selected rail item */
24
+ /** index of selected rail item (use in controlled mode) */
23
25
  selectedIndex?: number;
24
26
  }
25
- export declare const DotNavigationRail: ({ ariaLabel, className, "data-testid": dataTestId, onChange, railItemPosition, railItems, selectedIndex, }: NavigationRailProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const DotNavigationRail: ({ ariaLabel, className, "data-testid": dataTestId, defaultIndex, onChange, railItemPosition, railItems, selectedIndex, }: NavigationRailProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { SelectChangeEvent } from '@mui/material';
3
+ import { InputProps } from '../input-form-fields/InputFormFields.propTypes';
4
+ export interface SelectOption {
5
+ /** options that appear in dropdown */
6
+ option: string;
7
+ /** value of input field when option is selected */
8
+ value: string;
9
+ }
10
+ export interface SelectProps extends Omit<InputProps, 'ai' | 'endIcon' | 'endText' | 'max' | 'maxLength' | 'min' | 'minLength' | 'onChange' | 'shrink' | 'startIcon' | 'success' | 'type' | 'warning'> {
11
+ minWidth?: number;
12
+ onChange?: (event: SelectChangeEvent) => void;
13
+ /** options of select dropdown */
14
+ options: Array<SelectOption>;
15
+ /** render the option */
16
+ renderOption?: (option: SelectOption) => ReactNode;
17
+ }
18
+ export declare const DotSelect: ({ ariaLabel, autoFocus, className, defaultValue, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, error, fullWidth, helperText, id, inputRef, label, minWidth, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, size, readOnly, required, value, options, renderOption, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { inputSizeOptions } from '../input-form-fields/InputFormFields.propTypes';
2
+ export declare const rootClassName = "dot-select";
3
+ interface StyledSelectContainerProps {
4
+ persistentLabel?: boolean;
5
+ size?: inputSizeOptions;
6
+ }
7
+ export declare const StyledSelectContainer: import("styled-components").StyledComponent<"div", any, StyledSelectContainerProps, never>;
8
+ export declare const StyledMenuItem: import("styled-components").StyledComponent<import("@mui/material").ExtendButtonBase<import("@mui/material").MenuItemTypeMap<{}, "li">>, any, {}, never>;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export type { SelectProps, SelectOption } from './Select';
2
+ export { DotSelect } from './Select';