@digital-ai/dot-components 4.20.3 → 4.22.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/index.esm.js +500 -350
- package/package.json +1 -1
- package/src/lib/components/file-upload/FileUpload.styles.d.ts +0 -1
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/components/toggle-switch/ToggleSwitch.d.ts +15 -0
- package/src/lib/components/toggle-switch/ToggleSwitch.styles.d.ts +2 -0
- package/src/lib/components/toggle-switch/index.d.ts +3 -0
- package/src/lib/components/toggle-switch/utils/models.d.ts +7 -0
package/package.json
CHANGED
|
@@ -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,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
|
+
}
|