@digital-ai/dot-components 4.20.3 → 4.21.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": "4.20.3",
3
+ "version": "4.21.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -1,6 +1,5 @@
1
1
  export declare const rootClassName = "dot-file-upload";
2
2
  export declare const containerClassName: string;
3
- export declare const fileClassName: string;
4
3
  export declare const dropZoneClassName: string;
5
4
  export declare const StyledFileUploadContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
5
  export declare const StyledFileUpload: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -54,6 +54,7 @@ export type { PillStatus } from './pill/Pill';
54
54
  export type { DashboardHeaderProps } from './analytics/dashboard-header/DashboardHeader';
55
55
  export type { ChipTooltipProps, ChipProps, ChipSize } from './chip/Chip';
56
56
  export type { SearchProps } from './search';
57
+ export type { ToggleSwitchProps, ToggleSwitchValue, ToggleSwitchOption, ToggleSwitchSingleValue, } from './toggle-switch';
57
58
  export { DotAccordion } from './accordion/Accordion';
58
59
  export { DotActionToolbar } from './action-toolbar/ActionToolbar';
59
60
  export { DotAlertBanner } from './alert-banner/AlertBanner';
@@ -140,4 +141,5 @@ export { DotStickyWithBorder } from './sticky-with-border';
140
141
  export { CreateUUID } from './createUUID';
141
142
  export { BoardStatusProvider, ColumnStatusProvider, DotBoard, DotBoardColumn, DotBoardColumnActionBar, DotBoardColumnCollapse, DotBoardColumnExpand, DotBoardColumnHeader, DotBoardColumnItems, DotBoardColumnSummary, useBoardStatus, useColumnStatus, } from './board';
142
143
  export { DotSearch } from './search';
144
+ export { DotToggleSwitch } from './toggle-switch';
143
145
  export { useKeyPress } from '../hooks/useKeyPress';
@@ -0,0 +1,15 @@
1
+ import { ToggleSwitchOption, ToggleSwitchValue } from './utils/models';
2
+ import { CommonProps } from '../CommonProps';
3
+ export interface ToggleSwitchProps extends CommonProps {
4
+ /** If true, the toggle switch will be disabled. */
5
+ disabled?: boolean;
6
+ /** text displayed next to the switch */
7
+ label?: string;
8
+ /** Callback function that is executed when the value changes */
9
+ onChange: (value: ToggleSwitchValue) => void;
10
+ /** Options for each toggle switch chip */
11
+ options: ToggleSwitchOption[];
12
+ /** Selected value */
13
+ value: ToggleSwitchValue;
14
+ }
15
+ export declare const DotToggleSwitch: ({ ariaLabel, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, disabled, label, onChange, options, value, }: ToggleSwitchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const rootClassName = "dot-toggle-switch";
2
+ export declare const StyledToggleSwitch: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").StackTypeMap<{}, "div">>, any, {}, never>;
@@ -0,0 +1,3 @@
1
+ export type { ToggleSwitchOption, ToggleSwitchValue, ToggleSwitchSingleValue, } from './utils/models';
2
+ export type { ToggleSwitchProps } from './ToggleSwitch';
3
+ export { DotToggleSwitch } from './ToggleSwitch';
@@ -0,0 +1,7 @@
1
+ import { CommonProps } from '../../CommonProps';
2
+ export type ToggleSwitchSingleValue = string | number | boolean;
3
+ export type ToggleSwitchValue = ToggleSwitchSingleValue | ToggleSwitchSingleValue[];
4
+ export interface ToggleSwitchOption extends CommonProps {
5
+ text: string;
6
+ value: ToggleSwitchValue;
7
+ }