@juspay/blend-design-system 0.0.36 → 0.0.37-beta.1
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/dist/components/BreadcrumbV2/BreadcrumbV2.d.ts +3 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2Icon.d.ts +6 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2Item.d.ts +6 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2List.d.ts +15 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2OverflowMenu.d.ts +11 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2Page.d.ts +9 -0
- package/dist/components/BreadcrumbV2/BreadcrumbV2Separator.d.ts +6 -0
- package/dist/components/BreadcrumbV2/breadcrumbV2.dark.tokens.d.ts +3 -0
- package/dist/components/BreadcrumbV2/breadcrumbV2.light.tokens.d.ts +3 -0
- package/dist/components/BreadcrumbV2/breadcrumbV2.tokens.d.ts +31 -0
- package/dist/components/BreadcrumbV2/breadcrumbV2.types.d.ts +46 -0
- package/dist/components/BreadcrumbV2/index.d.ts +3 -0
- package/dist/components/BreadcrumbV2/utils.d.ts +27 -0
- package/dist/components/CodeBlock/CodeBlockDiffView/CodeBlockDiffView.d.ts +6 -0
- package/dist/components/CodeBlock/CodeBlockDiffView/types.d.ts +16 -0
- package/dist/components/CodeBlock/CodeBlockDiffView/utils.d.ts +4 -0
- package/dist/components/CodeBlock/CodeBlockLineParts.d.ts +56 -0
- package/dist/components/CodeBlock/codeBlock.token.d.ts +18 -0
- package/dist/components/CodeBlock/types.d.ts +25 -0
- package/dist/components/CodeBlock/utils.d.ts +16 -1
- package/dist/components/CodeEditorV2/CodeEditorV2.d.ts +28 -0
- package/dist/components/CodeEditorV2/CodeEditorV2Header.d.ts +2 -0
- package/dist/components/CodeEditorV2/MonacoEditor/MonacoEditorWrapper.d.ts +2 -0
- package/dist/components/CodeEditorV2/MonacoEditor/monacoTheme.d.ts +3 -0
- package/dist/components/CodeEditorV2/codeEditorV2.dark.tokens.d.ts +3 -0
- package/dist/components/CodeEditorV2/codeEditorV2.light.token.d.ts +3 -0
- package/dist/components/CodeEditorV2/codeEditorV2.tokens.d.ts +94 -0
- package/dist/components/CodeEditorV2/codeEditorV2.types.d.ts +112 -0
- package/dist/components/CodeEditorV2/index.d.ts +3 -0
- package/dist/components/CodeEditorV2/utils.d.ts +78 -0
- package/dist/components/DataTable/TableBody/types.d.ts +2 -0
- package/dist/components/DataTable/TableHeader/FilterComponents.d.ts +7 -0
- package/dist/components/DataTable/TableHeader/types.d.ts +5 -0
- package/dist/components/DataTable/TableHeader/utils.d.ts +2 -0
- package/dist/components/DataTable/types.d.ts +6 -0
- package/dist/components/DateRangePicker/types.d.ts +1 -0
- package/dist/components/DrawerV2/index.d.ts +3 -0
- package/dist/components/DrawerV2/types.d.ts +26 -0
- package/dist/components/Menu/types.d.ts +2 -1
- package/dist/components/MenuV2/MenuV2.d.ts +4 -0
- package/dist/components/MenuV2/MenuV2Content.d.ts +29 -0
- package/dist/components/MenuV2/MenuV2Item.d.ts +9 -0
- package/dist/components/MenuV2/MenuV2SubMenu.d.ts +12 -0
- package/dist/components/MenuV2/index.d.ts +7 -0
- package/dist/components/MenuV2/menuV2.animations.d.ts +2 -0
- package/dist/components/MenuV2/menuV2.dark.tokens.d.ts +3 -0
- package/dist/components/MenuV2/menuV2.light.tokens.d.ts +3 -0
- package/dist/components/MenuV2/menuV2.tokens.d.ts +92 -0
- package/dist/components/MenuV2/menuV2.types.d.ts +86 -0
- package/dist/components/MenuV2/menuV2.utils.d.ts +26 -0
- package/dist/components/Modal/modal.tokens.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectTrigger.d.ts +2 -2
- package/dist/components/MultiSelect/types.d.ts +2 -3
- package/dist/components/ProgressBarV2/CircularProgressBarV2.d.ts +2 -0
- package/dist/components/ProgressBarV2/LinearProgressBarV2.d.ts +2 -0
- package/dist/components/ProgressBarV2/ProgressBarV2.d.ts +11 -0
- package/dist/components/ProgressBarV2/index.d.ts +3 -0
- package/dist/components/ProgressBarV2/progressBarV2.dark.tokens.d.ts +3 -0
- package/dist/components/ProgressBarV2/progressBarV2.light.tokens.d.ts +3 -0
- package/dist/components/ProgressBarV2/progressBarV2.tokens.d.ts +63 -0
- package/dist/components/ProgressBarV2/progressBarV2.types.d.ts +45 -0
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectTrigger.d.ts +1 -1
- package/dist/components/SingleSelect/types.d.ts +2 -3
- package/dist/components/StatCardV2/StatCardV2.chartConfig.d.ts +2 -0
- package/dist/components/StatCardV2/StatCardV2.d.ts +16 -0
- package/dist/components/StatCardV2/StatCardV2Change.d.ts +3 -0
- package/dist/components/StatCardV2/StatCardV2NoData.d.ts +10 -0
- package/dist/components/StatCardV2/StatCardV2Skeleton.d.ts +7 -0
- package/dist/components/StatCardV2/StatCardV2Subtitle.d.ts +3 -0
- package/dist/components/StatCardV2/StatCardV2Title.d.ts +3 -0
- package/dist/components/StatCardV2/StatCardV2Value.d.ts +11 -0
- package/dist/components/StatCardV2/index.d.ts +3 -0
- package/dist/components/StatCardV2/statcardV2.dark.tokens.d.ts +3 -0
- package/dist/components/StatCardV2/statcardV2.light.tokens.d.ts +3 -0
- package/dist/components/StatCardV2/statcardV2.tokens.d.ts +81 -0
- package/dist/components/StatCardV2/statcardV2.types.d.ts +78 -0
- package/dist/components/StatCardV2/utils.d.ts +7 -0
- package/dist/components/TabsV2/StyledTabsV2.d.ts +26 -0
- package/dist/components/TabsV2/TabsV2.d.ts +15 -0
- package/dist/components/TabsV2/TabsV2Content.d.ts +2 -0
- package/dist/components/TabsV2/TabsV2List.d.ts +14 -0
- package/dist/components/TabsV2/TabsV2Trigger.d.ts +19 -0
- package/dist/components/TabsV2/index.d.ts +8 -0
- package/dist/components/TabsV2/tabsV2.context.d.ts +21 -0
- package/dist/components/TabsV2/tabsV2.dark.tokens.d.ts +3 -0
- package/dist/components/TabsV2/tabsV2.light.tokens.d.ts +3 -0
- package/dist/components/TabsV2/tabsV2.tokens.d.ts +97 -0
- package/dist/components/TabsV2/tabsV2.types.d.ts +68 -0
- package/dist/components/TabsV2/tabsV2.utils.d.ts +18 -0
- package/dist/components/common/virtualViewport.d.ts +12 -0
- package/dist/context/ShadowAware.d.ts +16 -0
- package/dist/context/ThemeContext.d.ts +12 -0
- package/dist/context/ThemeProvider.d.ts +10 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/useComponentToken.d.ts +7 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +43159 -37911
- package/dist/tokens/font.tokens.d.ts +2 -0
- package/dist/tokens/zIndex.tokens.d.ts +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
import { CodeEditorV2Variant } from './codeEditorV2.types';
|
|
3
|
+
import { CodeEditorV2Tokens } from './codeEditorV2.tokens';
|
|
4
|
+
import { CSSObject } from 'styled-components';
|
|
5
|
+
import type * as Monaco from 'monaco-editor';
|
|
6
|
+
/** Delay before focusing the editor after mount (ms). */
|
|
7
|
+
export declare const EDITOR_FOCUS_DELAY_MS = 100;
|
|
8
|
+
/** How long the “copied” state stays visible after copy (ms). */
|
|
9
|
+
export declare const COPY_FEEDBACK_RESET_MS = 2000;
|
|
10
|
+
/** Minimum Monaco vertical/horizontal scrollbar thickness (px). */
|
|
11
|
+
export declare const MIN_SCROLLBAR_SIZE = 8;
|
|
12
|
+
/** Ref must be stable across renders (e.g. from `useRef`) so timeout ids persist. */
|
|
13
|
+
export type CopyFeedbackTimeoutRef = MutableRefObject<ReturnType<typeof setTimeout> | null>;
|
|
14
|
+
/**
|
|
15
|
+
* Writes `code` to the clipboard, sets copied feedback to true, and schedules
|
|
16
|
+
* resetting it after `resetMs`. Clears any previous reset timeout on the same ref.
|
|
17
|
+
*/
|
|
18
|
+
export declare const copyToClipboardWithTemporaryFeedback: (code: string, setIsCopied: Dispatch<SetStateAction<boolean>>, feedbackTimeoutRef: CopyFeedbackTimeoutRef, resetMs?: number) => void;
|
|
19
|
+
export declare const shouldShowLineNumbers: (showLineNumbers: boolean | undefined, variant: CodeEditorV2Variant) => boolean;
|
|
20
|
+
/** True when Monaco should render the diff editor (either explicit `diff` or `variant="diff"`). */
|
|
21
|
+
export declare const isDiffEditorMode: (diff: boolean | undefined, variant: CodeEditorV2Variant) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Calculates container styles with min/max height
|
|
24
|
+
*/
|
|
25
|
+
export declare const getContainerStyles: (minHeight?: string | number, maxHeight?: string | number) => React.CSSProperties;
|
|
26
|
+
export declare const toCssValue: (value?: string | number) => string | undefined;
|
|
27
|
+
export declare const toNumericValue: (value: string | number | undefined, fallback?: number) => number;
|
|
28
|
+
export type EditorMetrics = {
|
|
29
|
+
fontSize: number;
|
|
30
|
+
lineHeight: number;
|
|
31
|
+
verticalPadding: number;
|
|
32
|
+
codePaddingLeft: number;
|
|
33
|
+
gutterWidth: number;
|
|
34
|
+
lineDecorationsWidth: number;
|
|
35
|
+
lineNumbersMinChars: number;
|
|
36
|
+
scrollbarSize: number;
|
|
37
|
+
};
|
|
38
|
+
export declare function getEditorMetrics(tokens: CodeEditorV2Tokens, showLineNumbers: boolean): EditorMetrics;
|
|
39
|
+
export declare function getContainerDimensions(height: CSSObject['height'] | undefined, minHeight: CSSObject['minHeight'], maxHeight?: CSSObject['maxHeight']): {
|
|
40
|
+
minHeight?: CSSObject['minHeight'];
|
|
41
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
42
|
+
height?: CSSObject['height'];
|
|
43
|
+
};
|
|
44
|
+
export declare function getPlaceholderPosition(metrics: EditorMetrics, showLineNumbers: boolean): {
|
|
45
|
+
top: string;
|
|
46
|
+
left: string;
|
|
47
|
+
};
|
|
48
|
+
export declare function configureLanguageDefaults(monaco: typeof import('monaco-editor')): void;
|
|
49
|
+
/** Options applied on editor mount (full set) */
|
|
50
|
+
export declare function getMountEditorOptions(metrics: EditorMetrics, tokens: CodeEditorV2Tokens, showLineNumbers: boolean, readOnly: boolean, disabled: boolean): Monaco.editor.IStandaloneEditorConstructionOptions;
|
|
51
|
+
/** Options applied when props change (subset) */
|
|
52
|
+
export declare function getUpdateEditorOptions(metrics: EditorMetrics, showLineNumbers: boolean, readOnly: boolean, disabled: boolean): Monaco.editor.IEditorOptions;
|
|
53
|
+
export declare function getDiffEditorOptions(metrics: EditorMetrics, tokens: CodeEditorV2Tokens, showLineNumbers: boolean, renderSideBySide: boolean, readOnly: boolean, disabled: boolean, isDiffUnchangedCollapsed: boolean, diffContextLines: number, diffExpandChunk: number): Monaco.editor.IDiffEditorConstructionOptions;
|
|
54
|
+
export declare function getInitialEditorOptions(metrics: EditorMetrics, tokens: CodeEditorV2Tokens, showLineNumbers: boolean, readOnly: boolean, disabled: boolean): Monaco.editor.IStandaloneEditorConstructionOptions;
|
|
55
|
+
export declare const backupColor: {
|
|
56
|
+
body: {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
gutter: {
|
|
59
|
+
color: string;
|
|
60
|
+
backgroundColor: {
|
|
61
|
+
added: string;
|
|
62
|
+
removed: string;
|
|
63
|
+
unchanged: string;
|
|
64
|
+
};
|
|
65
|
+
borderColor: {
|
|
66
|
+
added: string;
|
|
67
|
+
removed: string;
|
|
68
|
+
unchanged: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
highlightedLine: {
|
|
72
|
+
backgroundColor: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
header: {
|
|
76
|
+
backgroundColor: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -16,6 +16,8 @@ export type TableBodyProps<T extends Record<string, unknown>> = {
|
|
|
16
16
|
enableRowSelection?: boolean;
|
|
17
17
|
rowActions?: RowActionsConfig<T>;
|
|
18
18
|
columnFreeze?: number;
|
|
19
|
+
/** Freeze last N columns on the right side (sticky right). */
|
|
20
|
+
columnFreezeRight?: number;
|
|
19
21
|
/** Measured pixel widths of frozen columns (from header ResizeObserver). Used for sticky left offset. */
|
|
20
22
|
measuredFrozenWidths?: number[];
|
|
21
23
|
mobileConfig?: MobileDataTableConfig;
|
|
@@ -11,6 +11,11 @@ type FilterComponentsProps = {
|
|
|
11
11
|
filterState: FilterState;
|
|
12
12
|
sortState: SortState;
|
|
13
13
|
onColumnFilter?: ColumnFilterHandler;
|
|
14
|
+
onRenameHeader?: () => void;
|
|
15
|
+
onOperations?: () => void;
|
|
16
|
+
onInsertLeft?: () => void;
|
|
17
|
+
onInsertRight?: () => void;
|
|
18
|
+
onDeleteColumn?: () => void;
|
|
14
19
|
onPopoverClose?: () => void;
|
|
15
20
|
onFilterApplied?: () => void;
|
|
16
21
|
};
|
|
@@ -20,6 +25,8 @@ export declare const SortOptions: React.FC<{
|
|
|
20
25
|
tableToken: TableTokenType;
|
|
21
26
|
sortHandlers: SortHandlers;
|
|
22
27
|
sortState: SortState;
|
|
28
|
+
nestedSortOpen: boolean;
|
|
29
|
+
setNestedSortOpen: (open: boolean) => void;
|
|
23
30
|
onFilterApplied?: () => void;
|
|
24
31
|
onPopoverClose?: () => void;
|
|
25
32
|
}>;
|
|
@@ -31,6 +31,7 @@ export type TableHeaderProps<T extends Record<string, unknown>> = {
|
|
|
31
31
|
rowActions?: RowActionsConfig<T>;
|
|
32
32
|
data?: T[];
|
|
33
33
|
columnFreeze?: number;
|
|
34
|
+
columnFreezeRight?: number;
|
|
34
35
|
mobileConfig?: MobileDataTableConfig;
|
|
35
36
|
mobileOverflowColumns?: ColumnDefinition<T>[];
|
|
36
37
|
onMobileOverflowClick?: (row: T) => void;
|
|
@@ -54,6 +55,10 @@ export type TableHeaderProps<T extends Record<string, unknown>> = {
|
|
|
54
55
|
operator?: string;
|
|
55
56
|
}>;
|
|
56
57
|
onHeaderChange?: (field: keyof T, newHeader: string) => void;
|
|
58
|
+
onOperations?: (field: keyof T) => void;
|
|
59
|
+
onInsertLeft?: (field: keyof T) => void;
|
|
60
|
+
onInsertRight?: (field: keyof T) => void;
|
|
61
|
+
onDeleteColumn?: (field: keyof T) => void;
|
|
57
62
|
getColumnWidth: (column: ColumnDefinition<T>, index: number) => React.CSSProperties;
|
|
58
63
|
/** Measured pixel widths of frozen columns (from ResizeObserver). Used for sticky left offset. */
|
|
59
64
|
measuredFrozenWidths?: number[];
|
|
@@ -18,6 +18,8 @@ export declare const filterItemsBySearch: (items: Array<{
|
|
|
18
18
|
}>;
|
|
19
19
|
export declare const getPopoverAlignment: (index: number, totalColumns: number) => "start" | "center" | "end";
|
|
20
20
|
export declare function getFrozenLeftOffset(index: number, _columnFreeze: number, enableRowExpansion: boolean, enableRowSelection: boolean, visibleColumns: ColumnDefinition<Record<string, unknown>>[], getColumnWidth: (column: ColumnDefinition<Record<string, unknown>>, i: number) => React.CSSProperties, measuredFrozenWidths?: number[]): number;
|
|
21
|
+
export declare function getFrozenRightOffset(index: number, columnFreezeRight: number, visibleColumns: ColumnDefinition<Record<string, unknown>>[], getColumnWidth: (column: ColumnDefinition<Record<string, unknown>>, i: number) => React.CSSProperties, rightStickyOffsetPx: number): number;
|
|
22
|
+
export declare const getFrozenRightColumnStyles: (index: number, columnFreezeRight: number, visibleColumns: ColumnDefinition<Record<string, unknown>>[], getColumnWidth: (column: ColumnDefinition<Record<string, unknown>>, index: number) => React.CSSProperties, backgroundColor: string, rightStickyOffsetPx: number) => {};
|
|
21
23
|
export declare const getFrozenColumnStyles: (index: number, columnFreeze: number, enableRowExpansion: boolean, enableRowSelection: boolean, visibleColumns: ColumnDefinition<Record<string, unknown>>[], getColumnWidth: (column: ColumnDefinition<Record<string, unknown>>, index: number) => React.CSSProperties, backgroundColor: string, measuredFrozenWidths?: number[]) => {
|
|
22
24
|
padding: string;
|
|
23
25
|
} | {
|
|
@@ -289,6 +289,8 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
289
289
|
onFilterChange?: (filters: ColumnFilter[]) => void;
|
|
290
290
|
onAdvancedFiltersChange?: (filters: unknown[]) => void;
|
|
291
291
|
columnFreeze?: number;
|
|
292
|
+
/** Freeze last N columns on the right side (sticky right). */
|
|
293
|
+
columnFreezeRight?: number;
|
|
292
294
|
enableColumnManager?: boolean;
|
|
293
295
|
enableColumnReordering?: boolean;
|
|
294
296
|
onColumnReorder?: (columns: ColumnDefinition<T>[]) => void;
|
|
@@ -340,6 +342,10 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
340
342
|
onRowSelectionChange?: (selectedRowIds: string[], isSelected: boolean, rowId: string, rowData: T) => void;
|
|
341
343
|
bulkActions?: BulkActionsConfig;
|
|
342
344
|
rowActions?: RowActionsConfig<T>;
|
|
345
|
+
onOperations?: (field: keyof T) => void;
|
|
346
|
+
onInsertLeft?: (field: keyof T) => void;
|
|
347
|
+
onInsertRight?: (field: keyof T) => void;
|
|
348
|
+
onDeleteColumn?: (field: keyof T) => void;
|
|
343
349
|
getRowStyle?: (row: T, index: number) => React.CSSProperties;
|
|
344
350
|
tableBodyHeight?: string | number;
|
|
345
351
|
mobileColumnsToShow?: number;
|
|
@@ -248,6 +248,7 @@ export type DateRangePickerProps = {
|
|
|
248
248
|
onChange?: (range: DateRange) => void;
|
|
249
249
|
onPresetSelection?: (data: PresetSelectionData) => void;
|
|
250
250
|
showDateTimePicker?: boolean;
|
|
251
|
+
showDateInput?: boolean;
|
|
251
252
|
showPresets?: boolean;
|
|
252
253
|
customPresets?: PresetsConfig;
|
|
253
254
|
placeholder?: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as DrawerV2 } from './DrawerV2';
|
|
2
|
+
export { DrawerV2Body, DrawerV2Close, DrawerV2Content, DrawerV2Description, DrawerV2Footer, DrawerV2Header, DrawerV2NestedRoot, DrawerV2Overlay, DrawerV2Portal, DrawerV2Title, DrawerV2Trigger, } from './DrawerV2';
|
|
3
|
+
export * from './types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Drawer as VaulDrawer } from 'vaul';
|
|
3
|
+
export type DrawerV2RootRef = unknown;
|
|
4
|
+
export type DrawerV2RootProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Root>;
|
|
5
|
+
export type DrawerV2NestedRootRef = unknown;
|
|
6
|
+
export type DrawerV2NestedRootProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.NestedRoot>;
|
|
7
|
+
export type DrawerV2TriggerRef = React.ComponentRef<typeof VaulDrawer.Trigger>;
|
|
8
|
+
export type DrawerV2TriggerProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Trigger>;
|
|
9
|
+
export type DrawerV2PortalRef = unknown;
|
|
10
|
+
export type DrawerV2PortalProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Portal>;
|
|
11
|
+
export type DrawerV2OverlayRef = React.ElementRef<typeof VaulDrawer.Overlay>;
|
|
12
|
+
export type DrawerV2OverlayProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Overlay>;
|
|
13
|
+
export type DrawerV2ContentRef = React.ComponentRef<typeof VaulDrawer.Content>;
|
|
14
|
+
export type DrawerV2ContentProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Content>;
|
|
15
|
+
export type DrawerV2TitleRef = React.ComponentRef<typeof VaulDrawer.Title>;
|
|
16
|
+
export type DrawerV2TitleProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Title>;
|
|
17
|
+
export type DrawerV2DescriptionRef = React.ComponentRef<typeof VaulDrawer.Description>;
|
|
18
|
+
export type DrawerV2DescriptionProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Description>;
|
|
19
|
+
export type DrawerV2CloseRef = React.ComponentRef<typeof VaulDrawer.Close>;
|
|
20
|
+
export type DrawerV2CloseProps = React.ComponentPropsWithoutRef<typeof VaulDrawer.Close>;
|
|
21
|
+
export type DrawerV2HeaderRef = HTMLDivElement;
|
|
22
|
+
export type DrawerV2HeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
23
|
+
export type DrawerV2BodyRef = HTMLDivElement;
|
|
24
|
+
export type DrawerV2BodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
export type DrawerV2FooterRef = HTMLDivElement;
|
|
26
|
+
export type DrawerV2FooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { SkeletonVariant } from '../Skeleton';
|
|
2
3
|
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
3
4
|
export declare enum MenuAlignment {
|
|
@@ -38,7 +39,7 @@ export type MenuProps = {
|
|
|
38
39
|
alignOffset?: number;
|
|
39
40
|
collisonBoundaryRef?: Element | null | Array<Element | null>;
|
|
40
41
|
skeleton?: MenuSkeletonProps;
|
|
41
|
-
}
|
|
42
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'slot'>;
|
|
42
43
|
export type SubMenuVirtualScrollProps = {
|
|
43
44
|
enableVirtualScrolling?: boolean;
|
|
44
45
|
virtualItemHeight?: number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FocusEvent, KeyboardEvent, default as React } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { MenuV2GroupType, MenuV2VirtualScrollingConfig } from './menuV2.types';
|
|
4
|
+
import { MenuV2TokensType } from './menuV2.tokens';
|
|
5
|
+
export type MenuV2ContentProps = {
|
|
6
|
+
filteredItems: MenuV2GroupType[];
|
|
7
|
+
menuTokens: MenuV2TokensType;
|
|
8
|
+
enableSearch: boolean;
|
|
9
|
+
searchPlaceholder: string;
|
|
10
|
+
searchText: string;
|
|
11
|
+
onSearchTextChange: (value: string) => void;
|
|
12
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
13
|
+
minHeight?: CSSObject['minHeight'];
|
|
14
|
+
minWidth?: CSSObject['minWidth'];
|
|
15
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
16
|
+
enableVirtualScrolling?: boolean;
|
|
17
|
+
virtualScrolling?: MenuV2VirtualScrollingConfig;
|
|
18
|
+
alignment?: 'start' | 'center' | 'end';
|
|
19
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
20
|
+
sideOffset?: number;
|
|
21
|
+
alignOffset?: number;
|
|
22
|
+
collisionBoundaryRef?: HTMLElement | null | (HTMLElement | null)[];
|
|
23
|
+
onInteractOutside?: (e: unknown) => void;
|
|
24
|
+
onPointerDownOutside?: (e: unknown) => void;
|
|
25
|
+
onFocusCapture?: (e: FocusEvent<HTMLDivElement>) => void;
|
|
26
|
+
onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
|
|
27
|
+
};
|
|
28
|
+
declare const MenuV2Content: React.ForwardRefExoticComponent<MenuV2ContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export default MenuV2Content;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MenuV2ItemType } from './menuV2.types';
|
|
2
|
+
import { MenuV2TokensType } from './menuV2.tokens';
|
|
3
|
+
type MenuV2ItemProps = {
|
|
4
|
+
item: MenuV2ItemType;
|
|
5
|
+
index: number;
|
|
6
|
+
itemTokens: MenuV2TokensType['group']['item'];
|
|
7
|
+
};
|
|
8
|
+
declare const MenuV2Item: import('react').ForwardRefExoticComponent<MenuV2ItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default MenuV2Item;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { MenuV2ItemType } from './menuV2.types';
|
|
3
|
+
type MenuV2SubMenuProps = {
|
|
4
|
+
item: MenuV2ItemType;
|
|
5
|
+
index: number;
|
|
6
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
7
|
+
};
|
|
8
|
+
declare const MenuV2SubMenu: {
|
|
9
|
+
({ item, index, maxHeight }: MenuV2SubMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default MenuV2SubMenu;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as MenuV2 } from './MenuV2';
|
|
2
|
+
export { default as MenuV2Content } from './MenuV2Content';
|
|
3
|
+
export { default as MenuV2Item } from './MenuV2Item';
|
|
4
|
+
export { default as MenuV2SubMenu } from './MenuV2SubMenu';
|
|
5
|
+
export * from './menuV2.types';
|
|
6
|
+
export * from './menuV2.tokens';
|
|
7
|
+
export * from './menuV2.utils';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const menuV2ContentAnimations = "\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n\n &[data-side='bottom'][data-state='open'] {\n animation: menuV2SlideInFromTop 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='bottom'][data-state='closed'] {\n animation: menuV2SlideOutToTop 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n &[data-side='top'][data-state='open'] {\n animation: menuV2SlideInFromBottom 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='top'][data-state='closed'] {\n animation: menuV2SlideOutToBottom 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n &[data-side='right'][data-state='open'] {\n animation: menuV2SlideInFromLeft 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='right'][data-state='closed'] {\n animation: menuV2SlideOutToLeft 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n &[data-side='left'][data-state='open'] {\n animation: menuV2SlideInFromRight 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='left'][data-state='closed'] {\n animation: menuV2SlideOutToRight 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n\n @keyframes menuV2SlideInFromTop {\n from { opacity: 0; transform: translateY(-8px) scale(0.95); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n }\n @keyframes menuV2SlideOutToTop {\n from { opacity: 1; transform: translateY(0) scale(1); }\n to { opacity: 0; transform: translateY(-8px) scale(0.95); }\n }\n @keyframes menuV2SlideInFromBottom {\n from { opacity: 0; transform: translateY(8px) scale(0.95); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n }\n @keyframes menuV2SlideOutToBottom {\n from { opacity: 1; transform: translateY(0) scale(1); }\n to { opacity: 0; transform: translateY(8px) scale(0.95); }\n }\n @keyframes menuV2SlideInFromLeft {\n from { opacity: 0; transform: translateX(-8px) scale(0.95); }\n to { opacity: 1; transform: translateX(0) scale(1); }\n }\n @keyframes menuV2SlideOutToLeft {\n from { opacity: 1; transform: translateX(0) scale(1); }\n to { opacity: 0; transform: translateX(-8px) scale(0.95); }\n }\n @keyframes menuV2SlideInFromRight {\n from { opacity: 0; transform: translateX(8px) scale(0.95); }\n to { opacity: 1; transform: translateX(0) scale(1); }\n }\n @keyframes menuV2SlideOutToRight {\n from { opacity: 1; transform: translateX(0) scale(1); }\n to { opacity: 0; transform: translateX(8px) scale(0.95); }\n }\n";
|
|
2
|
+
export declare const menuV2SubmenuContentAnimations = "\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n\n &[data-side='right'][data-state='open'] {\n animation: menuV2SlideInFromLeft 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='right'][data-state='closed'] {\n animation: menuV2SlideOutToLeft 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='left'][data-state='open'] {\n animation: menuV2SlideInFromRight 400ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n &[data-side='left'][data-state='closed'] {\n animation: menuV2SlideOutToRight 300ms cubic-bezier(0.16, 1, 0.3, 1);\n }\n";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
import { Theme } from '../../context/theme.enum';
|
|
5
|
+
import { SelectV2ItemStates } from '../SelectV2/selectV2.tokenStates';
|
|
6
|
+
import { MenuV2ItemActionType, MenuV2ItemVariant } from './menuV2.types';
|
|
7
|
+
export type { SelectV2ItemStates as MenuV2ItemStates } from '../SelectV2/selectV2.tokenStates';
|
|
8
|
+
type StateToken<T> = Record<SelectV2ItemStates, T>;
|
|
9
|
+
type MenuV2VariantToken<T> = {
|
|
10
|
+
[MenuV2ItemVariant.DEFAULT]: T;
|
|
11
|
+
[MenuV2ItemVariant.ACTION]: {
|
|
12
|
+
[MenuV2ItemActionType.PRIMARY]: T;
|
|
13
|
+
[MenuV2ItemActionType.DANGER]: T;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type MenuV2TokensType = {
|
|
17
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
18
|
+
border: CSSObject['border'];
|
|
19
|
+
borderRadius: CSSObject['borderRadius'];
|
|
20
|
+
boxShadow: CSSObject['boxShadow'];
|
|
21
|
+
zIndex: CSSObject['zIndex'];
|
|
22
|
+
minWidth: CSSObject['minWidth'];
|
|
23
|
+
maxWidth: CSSObject['maxWidth'];
|
|
24
|
+
paddingTop: CSSObject['paddingTop'];
|
|
25
|
+
paddingRight: CSSObject['paddingRight'];
|
|
26
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
27
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
28
|
+
searchIcon: {
|
|
29
|
+
width: CSSObject['width'];
|
|
30
|
+
};
|
|
31
|
+
group: {
|
|
32
|
+
label: {
|
|
33
|
+
fontSize: CSSObject['fontSize'];
|
|
34
|
+
fontWeight: CSSObject['fontWeight'];
|
|
35
|
+
lineHeight: CSSObject['lineHeight'];
|
|
36
|
+
color: CSSObject['color'];
|
|
37
|
+
paddingTop: CSSObject['paddingTop'];
|
|
38
|
+
paddingRight: CSSObject['paddingRight'];
|
|
39
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
40
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
41
|
+
marginTop: CSSObject['marginTop'];
|
|
42
|
+
marginRight: CSSObject['marginRight'];
|
|
43
|
+
marginBottom: CSSObject['marginBottom'];
|
|
44
|
+
marginLeft: CSSObject['marginLeft'];
|
|
45
|
+
};
|
|
46
|
+
item: {
|
|
47
|
+
paddingTop: CSSObject['paddingTop'];
|
|
48
|
+
paddingRight: CSSObject['paddingRight'];
|
|
49
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
50
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
51
|
+
marginTop: CSSObject['marginTop'];
|
|
52
|
+
marginRight: CSSObject['marginRight'];
|
|
53
|
+
marginBottom: CSSObject['marginBottom'];
|
|
54
|
+
marginLeft: CSSObject['marginLeft'];
|
|
55
|
+
gap: CSSObject['gap'];
|
|
56
|
+
borderRadius: CSSObject['borderRadius'];
|
|
57
|
+
backgroundColor: MenuV2VariantToken<StateToken<CSSObject['backgroundColor']>>;
|
|
58
|
+
text: {
|
|
59
|
+
fontSize: CSSObject['fontSize'];
|
|
60
|
+
fontWeight: CSSObject['fontWeight'];
|
|
61
|
+
lineHeight: CSSObject['lineHeight'];
|
|
62
|
+
color: MenuV2VariantToken<StateToken<CSSObject['color']>>;
|
|
63
|
+
subText: {
|
|
64
|
+
fontSize: CSSObject['fontSize'];
|
|
65
|
+
fontWeight: CSSObject['fontWeight'];
|
|
66
|
+
lineHeight: CSSObject['lineHeight'];
|
|
67
|
+
color: MenuV2VariantToken<StateToken<CSSObject['color']>>;
|
|
68
|
+
};
|
|
69
|
+
leftSlot: {
|
|
70
|
+
maxWidth: CSSObject['maxWidth'];
|
|
71
|
+
maxHeight: CSSObject['maxHeight'];
|
|
72
|
+
};
|
|
73
|
+
rightChevron: {
|
|
74
|
+
color: CSSObject['color'];
|
|
75
|
+
width: CSSObject['width'];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
separator: {
|
|
81
|
+
color: CSSObject['color'];
|
|
82
|
+
height: CSSObject['height'];
|
|
83
|
+
marginTop: CSSObject['marginTop'];
|
|
84
|
+
marginRight: CSSObject['marginRight'];
|
|
85
|
+
marginBottom: CSSObject['marginBottom'];
|
|
86
|
+
marginLeft: CSSObject['marginLeft'];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type ResponsiveMenuV2TokensType = {
|
|
90
|
+
[key in keyof BreakpointType]: MenuV2TokensType;
|
|
91
|
+
};
|
|
92
|
+
export declare const getMenuV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveMenuV2TokensType;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
3
|
+
import { CSSObject } from 'styled-components';
|
|
4
|
+
export declare enum MenuV2Alignment {
|
|
5
|
+
START = "start",
|
|
6
|
+
CENTER = "center",
|
|
7
|
+
END = "end"
|
|
8
|
+
}
|
|
9
|
+
export declare enum MenuV2Side {
|
|
10
|
+
TOP = "top",
|
|
11
|
+
LEFT = "left",
|
|
12
|
+
RIGHT = "right",
|
|
13
|
+
BOTTOM = "bottom"
|
|
14
|
+
}
|
|
15
|
+
export declare enum MenuV2ItemVariant {
|
|
16
|
+
DEFAULT = "default",
|
|
17
|
+
ACTION = "action"
|
|
18
|
+
}
|
|
19
|
+
export declare enum MenuV2ItemActionType {
|
|
20
|
+
PRIMARY = "primary",
|
|
21
|
+
DANGER = "danger"
|
|
22
|
+
}
|
|
23
|
+
export type MenuV2ItemTooltipProps = {
|
|
24
|
+
side?: TooltipSide;
|
|
25
|
+
align?: TooltipAlign;
|
|
26
|
+
size?: TooltipSize;
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
delayDuration?: number;
|
|
29
|
+
offset?: number;
|
|
30
|
+
};
|
|
31
|
+
export type MenuV2ItemLabel = {
|
|
32
|
+
text: string;
|
|
33
|
+
leftSlot?: React.ReactElement;
|
|
34
|
+
};
|
|
35
|
+
export type MenuV2ItemType = {
|
|
36
|
+
id?: string;
|
|
37
|
+
label: MenuV2ItemLabel;
|
|
38
|
+
subLabel?: string;
|
|
39
|
+
variant?: MenuV2ItemVariant;
|
|
40
|
+
actionType?: MenuV2ItemActionType;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
onClick?: () => void;
|
|
43
|
+
subMenu?: MenuV2ItemType[];
|
|
44
|
+
enableSubMenuSearch?: boolean;
|
|
45
|
+
subMenuSearchPlaceholder?: string;
|
|
46
|
+
tooltip?: string | ReactNode;
|
|
47
|
+
tooltipProps?: MenuV2ItemTooltipProps;
|
|
48
|
+
};
|
|
49
|
+
export type MenuV2GroupType = {
|
|
50
|
+
id?: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
items: MenuV2ItemType[];
|
|
53
|
+
showSeparator?: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type MenuV2VirtualScrollingConfig = {
|
|
56
|
+
/** Estimated height per item (px). Used by useVirtualizer. */
|
|
57
|
+
itemHeight?: number;
|
|
58
|
+
/** Number of items to render outside visible area. */
|
|
59
|
+
overscan?: number;
|
|
60
|
+
/** Min number of items to enable virtual scrolling. Default 30. */
|
|
61
|
+
threshold?: number;
|
|
62
|
+
};
|
|
63
|
+
export type MenuV2Dimensions = {
|
|
64
|
+
minWidth?: CSSObject['minWidth'];
|
|
65
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
66
|
+
minHeight?: CSSObject['minHeight'];
|
|
67
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
68
|
+
};
|
|
69
|
+
export type MenuV2Props = {
|
|
70
|
+
trigger: React.ReactElement;
|
|
71
|
+
items?: MenuV2GroupType[];
|
|
72
|
+
dimensions?: MenuV2Dimensions;
|
|
73
|
+
enableSearch?: boolean;
|
|
74
|
+
searchPlaceholder?: string;
|
|
75
|
+
enableVirtualScrolling?: boolean;
|
|
76
|
+
virtualScrolling?: MenuV2VirtualScrollingConfig;
|
|
77
|
+
open?: boolean;
|
|
78
|
+
onOpenChange?: (open: boolean) => void;
|
|
79
|
+
asModal?: boolean;
|
|
80
|
+
alignment?: MenuV2Alignment;
|
|
81
|
+
side?: MenuV2Side;
|
|
82
|
+
sideOffset?: number;
|
|
83
|
+
alignOffset?: number;
|
|
84
|
+
collisionBoundaryRef?: HTMLElement | null | (HTMLElement | null)[];
|
|
85
|
+
triggerProps?: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'>;
|
|
86
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MenuV2GroupType, MenuV2ItemType } from './menuV2.types';
|
|
3
|
+
import { MenuV2TokensType, MenuV2ItemStates } from './menuV2.tokens';
|
|
4
|
+
type MenuV2ItemTokens = MenuV2TokensType['group']['item'];
|
|
5
|
+
export declare const getItemSlots: (item: MenuV2ItemType) => [ReactNode?];
|
|
6
|
+
export declare const filterMenuItem: (item: MenuV2ItemType, lower: string) => MenuV2ItemType | null;
|
|
7
|
+
export declare const getMenuItemBackgroundColor: (state: MenuV2ItemStates, itemTokens: MenuV2ItemTokens, item: MenuV2ItemType) => string | undefined;
|
|
8
|
+
export declare const getMenuItemOptionColor: (state: MenuV2ItemStates, itemTokens: MenuV2ItemTokens, item: MenuV2ItemType) => string | undefined;
|
|
9
|
+
export declare const getMenuItemDescriptionColor: (state: MenuV2ItemStates, itemTokens: MenuV2ItemTokens, item: MenuV2ItemType) => string | undefined;
|
|
10
|
+
export type MenuV2FlatRow = {
|
|
11
|
+
type: 'label';
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: 'separator';
|
|
16
|
+
id: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'item';
|
|
19
|
+
id: string;
|
|
20
|
+
item: MenuV2ItemType;
|
|
21
|
+
groupId: number;
|
|
22
|
+
itemIndex: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const flattenMenuV2Groups: (groups: MenuV2GroupType[]) => MenuV2FlatRow[];
|
|
25
|
+
export declare const filterMenuGroups: (groups: MenuV2GroupType[], searchText: string) => MenuV2GroupType[];
|
|
26
|
+
export {};
|
|
@@ -34,6 +34,9 @@ export type ModalState = 'default';
|
|
|
34
34
|
export type ModalTokensType = {
|
|
35
35
|
boxShadow: CSSObject['boxShadow'];
|
|
36
36
|
borderRadius: CSSObject['borderRadius'];
|
|
37
|
+
overlay: {
|
|
38
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
39
|
+
};
|
|
37
40
|
header: {
|
|
38
41
|
padding: {
|
|
39
42
|
x: CSSObject['padding'];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from './types';
|
|
2
|
-
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline,
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, maxTriggerWidth, minTriggerWidth, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, multiSelectGroupPosition, ...rest }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -15,13 +15,13 @@ export type MultiSelectTriggerProps = {
|
|
|
15
15
|
selectionTagType: MultiSelectSelectionTagType;
|
|
16
16
|
valueLabelMap: Record<string, string>;
|
|
17
17
|
open: boolean;
|
|
18
|
-
onClick?:
|
|
18
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
19
19
|
multiSelectTokens: MultiSelectTokensType;
|
|
20
20
|
inline?: boolean;
|
|
21
21
|
error?: boolean;
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
maxTriggerWidth?: number;
|
|
24
24
|
minTriggerWidth?: number;
|
|
25
|
-
}
|
|
25
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'slot' | 'onClick' | 'name' | 'disabled' | 'onChange'>;
|
|
26
26
|
declare const MultiSelectTrigger: ({ selectedValues, slot, variant, size, isSmallScreen, onChange, name, label, placeholder, required, open, onClick, multiSelectTokens, inline, error, maxTriggerWidth, minTriggerWidth, }: MultiSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export default MultiSelectTrigger;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { SkeletonVariant } from '../Skeleton';
|
|
2
3
|
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
3
4
|
export declare enum MultiSelectVariant {
|
|
@@ -92,8 +93,6 @@ export type MultiSelectProps = {
|
|
|
92
93
|
sideOffset?: number;
|
|
93
94
|
alignOffset?: number;
|
|
94
95
|
inline?: boolean;
|
|
95
|
-
onBlur?: () => void;
|
|
96
|
-
onFocus?: () => void;
|
|
97
96
|
onOpenChange?: (open: boolean) => void;
|
|
98
97
|
error?: boolean;
|
|
99
98
|
errorMessage?: string;
|
|
@@ -127,7 +126,7 @@ export type MultiSelectProps = {
|
|
|
127
126
|
showClearButton?: boolean;
|
|
128
127
|
onClearAllClick?: () => void;
|
|
129
128
|
multiSelectGroupPosition?: 'center' | 'left' | 'right';
|
|
130
|
-
}
|
|
129
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'slot' | 'onChange'>;
|
|
131
130
|
export type MultiSelectMenuProps = {
|
|
132
131
|
items: MultiSelectMenuGroupType[];
|
|
133
132
|
selected: string[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProgressBarV2Appearance, ProgressBarV2Size, ProgressBarV2Variant } from './progressBarV2.types';
|
|
2
|
+
declare const ProgressBarV2: import('react').ForwardRefExoticComponent<{
|
|
3
|
+
value: number;
|
|
4
|
+
size?: ProgressBarV2Size;
|
|
5
|
+
variant?: ProgressBarV2Variant;
|
|
6
|
+
appearance?: ProgressBarV2Appearance;
|
|
7
|
+
showLabel?: boolean;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "style" | "className" | "children"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default ProgressBarV2;
|