@juspay/blend-design-system 0.0.36-beta.2 → 0.0.37-beta.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/dist/components/DateRangePicker/types.d.ts +1 -0
- package/dist/components/Menu/types.d.ts +2 -1
- 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/MultiSelectV2/MobileMultiSelectV2.d.ts +1 -0
- package/dist/components/MultiSelectV2/MultiSelectV2.d.ts +6 -0
- package/dist/components/MultiSelectV2/MultiSelectV2Menu.d.ts +6 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuActions.d.ts +23 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuHeader.d.ts +25 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuItem.d.ts +11 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuItems.d.ts +17 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuSearch.d.ts +14 -0
- package/dist/components/MultiSelectV2/MultiSelectV2MenuVirtualList.d.ts +22 -0
- package/dist/components/MultiSelectV2/MultiSelectV2SelectAllItem.d.ts +9 -0
- package/dist/components/MultiSelectV2/MultiSelectV2Skeleton.d.ts +8 -0
- package/dist/components/MultiSelectV2/MultiSelectV2SubMenu.d.ts +9 -0
- package/dist/components/MultiSelectV2/MultiSelectV2Trigger.d.ts +30 -0
- package/dist/components/MultiSelectV2/index.d.ts +14 -0
- package/dist/components/MultiSelectV2/mobile/MobileMultiSelectV2.d.ts +3 -0
- package/dist/components/MultiSelectV2/mobile/mobileMultiSelectV2.utils.d.ts +8 -0
- package/dist/components/MultiSelectV2/multiSelectV2.dark.tokens.d.ts +3 -0
- package/dist/components/MultiSelectV2/multiSelectV2.light.tokens.d.ts +3 -0
- package/dist/components/MultiSelectV2/multiSelectV2.tokens.d.ts +216 -0
- package/dist/components/MultiSelectV2/multiSelectV2.types.d.ts +124 -0
- package/dist/components/MultiSelectV2/utils.d.ts +23 -0
- package/dist/components/PopoverV2/MobilePopoverV2.d.ts +7 -0
- package/dist/components/PopoverV2/PopoverV2.d.ts +23 -0
- package/dist/components/PopoverV2/PopoverV2Footer.d.ts +12 -0
- package/dist/components/PopoverV2/PopoverV2Header.d.ts +14 -0
- package/dist/components/PopoverV2/PopoverV2Skeleton.d.ts +21 -0
- package/dist/components/PopoverV2/index.d.ts +3 -0
- package/dist/components/PopoverV2/popoverV2.dark.tokens.d.ts +3 -0
- package/dist/components/PopoverV2/popoverV2.light.tokens.d.ts +3 -0
- package/dist/components/PopoverV2/popoverV2.token.d.ts +72 -0
- package/dist/components/PopoverV2/popoverV2.types.d.ts +59 -0
- package/dist/components/Select/SelectItem/types.d.ts +2 -0
- package/dist/components/SelectV2/SelectItemV2.d.ts +3 -0
- package/dist/components/SelectV2/index.d.ts +4 -0
- package/dist/components/SelectV2/selectV2.constants.d.ts +7 -0
- package/dist/components/SelectV2/selectV2.shared.types.d.ts +96 -0
- package/dist/components/SelectV2/selectV2.tokenStates.d.ts +2 -0
- package/dist/components/SelectV2/types.d.ts +89 -0
- package/dist/components/SelectV2/useSelectV2MenuBehavior.d.ts +24 -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/SingleSelectV2/MobileSingleSelectV2.d.ts +5 -0
- package/dist/components/SingleSelectV2/SingleSelectV2.d.ts +6 -0
- package/dist/components/SingleSelectV2/SingleSelectV2List.d.ts +3 -0
- package/dist/components/SingleSelectV2/SingleSelectV2Menu.d.ts +6 -0
- package/dist/components/SingleSelectV2/SingleSelectV2MenuItems.d.ts +17 -0
- package/dist/components/SingleSelectV2/SingleSelectV2Search.d.ts +3 -0
- package/dist/components/SingleSelectV2/SingleSelectV2Skeleton.d.ts +8 -0
- package/dist/components/SingleSelectV2/SingleSelectV2Trigger.d.ts +28 -0
- package/dist/components/SingleSelectV2/SingleSelectV2VirtualList.d.ts +3 -0
- package/dist/components/SingleSelectV2/index.d.ts +11 -0
- package/dist/components/SingleSelectV2/mobile/SingleSelectV2MobileItem.d.ts +10 -0
- package/dist/components/SingleSelectV2/mobile/singleSelectV2.mobile.utils.d.ts +3 -0
- package/dist/components/SingleSelectV2/singleSelectV2.animations.d.ts +3 -0
- package/dist/components/SingleSelectV2/singleSelectV2.dark.tokens.d.ts +3 -0
- package/dist/components/SingleSelectV2/singleSelectV2.light.tokens.d.ts +3 -0
- package/dist/components/SingleSelectV2/singleSelectV2.tokens.d.ts +162 -0
- package/dist/components/SingleSelectV2/singleSelectV2.types.d.ts +142 -0
- package/dist/components/SingleSelectV2/utils.d.ts +78 -0
- package/dist/context/ShadowAware.d.ts +16 -0
- package/dist/context/ThemeContext.d.ts +6 -0
- package/dist/context/ThemeProvider.d.ts +10 -1
- package/dist/context/index.d.ts +1 -0
- package/dist/context/useComponentToken.d.ts +4 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +37303 -34883
- package/package.json +5 -3
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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 @@
|
|
|
1
|
+
export { default } from './mobile/MobileMultiSelectV2';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MultiSelectV2Props } from './multiSelectV2.types';
|
|
2
|
+
declare const MultiSelectV2: {
|
|
3
|
+
({ selectedValues, onChange, items, label, subLabel, helpIconText, required, variant, selectionTagType, slot, hintText, placeholder, size, search, enableSelectAll, selectAllText, maxSelections, customTrigger, usePanelOnMobile, triggerDimensions, menuDimensions, menuPosition, inline, error, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, allowCustomValue, customValueLabel, showClearButton, onClearAllClick, onOpenChange, multiSelectGroupPosition, ...rest }: MultiSelectV2Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default MultiSelectV2;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MultiSelectV2MenuProps } from './multiSelectV2.types';
|
|
2
|
+
declare const MultiSelectV2Menu: {
|
|
3
|
+
({ items, selected, onSelect, trigger, menuDimensions, disabled, search, enableSelectAll, selectAllText, maxSelections, onSelectAll, menuPosition, collisionBoundary, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, size, variant, allowCustomValue, customValueLabel, menuId, }: MultiSelectV2MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default MultiSelectV2Menu;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
2
|
+
export type MultiSelectV2MenuActionsProps = {
|
|
3
|
+
tokens: MultiSelectV2TokensType;
|
|
4
|
+
primaryAction?: {
|
|
5
|
+
text: string;
|
|
6
|
+
onClick: (selectedValues: string[]) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
};
|
|
10
|
+
secondaryAction?: {
|
|
11
|
+
text: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
};
|
|
16
|
+
selected: string[];
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
};
|
|
19
|
+
declare const MultiSelectV2MenuActions: {
|
|
20
|
+
({ tokens, primaryAction, secondaryAction, selected, onClose, }: MultiSelectV2MenuActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default MultiSelectV2MenuActions;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
3
|
+
import { MultiSelectV2GroupType } from './multiSelectV2.types';
|
|
4
|
+
export type MultiSelectV2MenuHeaderProps = {
|
|
5
|
+
tokens: MultiSelectV2TokensType;
|
|
6
|
+
showSearch: boolean;
|
|
7
|
+
itemsCount: number;
|
|
8
|
+
searchValue: string;
|
|
9
|
+
searchPlaceholder?: string;
|
|
10
|
+
searchInputRef: React.RefObject<HTMLInputElement | null>;
|
|
11
|
+
onSearchChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
onSearchArrowKeyToFirst: () => void;
|
|
13
|
+
showSelectAll: boolean;
|
|
14
|
+
selected: string[];
|
|
15
|
+
availableValues: string[];
|
|
16
|
+
filteredItems: MultiSelectV2GroupType[];
|
|
17
|
+
onSelectAll?: (selectAll: boolean, filteredItems: MultiSelectV2GroupType[]) => void;
|
|
18
|
+
selectAllText?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare const MultiSelectV2MenuHeader: {
|
|
22
|
+
({ tokens, showSearch, itemsCount, searchValue, searchPlaceholder, searchInputRef, onSearchChange, onSearchArrowKeyToFirst, showSelectAll, selected, availableValues, filteredItems, onSelectAll, selectAllText, disabled, }: MultiSelectV2MenuHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
export default MultiSelectV2MenuHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MultiSelectV2ItemType } from './multiSelectV2.types';
|
|
2
|
+
type MultiSelectV2MenuItemProps = {
|
|
3
|
+
item: MultiSelectV2ItemType;
|
|
4
|
+
onSelect: (value: string) => void;
|
|
5
|
+
selected: string[];
|
|
6
|
+
maxSelections?: number;
|
|
7
|
+
allItems?: MultiSelectV2ItemType[];
|
|
8
|
+
index?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const MultiSelectV2MenuItem: ({ item, onSelect, selected, maxSelections, allItems, index, }: MultiSelectV2MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default MultiSelectV2MenuItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
2
|
+
import { MultiSelectV2Size, MultiSelectV2Variant, MultiSelectV2GroupType, MultiSelectV2ItemType } from './multiSelectV2.types';
|
|
3
|
+
export type MultiSelectV2MenuItemsProps = {
|
|
4
|
+
filteredItems: MultiSelectV2GroupType[];
|
|
5
|
+
allItemsFlat: MultiSelectV2ItemType[];
|
|
6
|
+
selected: string[];
|
|
7
|
+
onSelect: (value: string) => void;
|
|
8
|
+
maxSelections?: number;
|
|
9
|
+
tokens: MultiSelectV2TokensType;
|
|
10
|
+
size: MultiSelectV2Size;
|
|
11
|
+
variant: MultiSelectV2Variant;
|
|
12
|
+
};
|
|
13
|
+
declare const MultiSelectV2MenuItems: {
|
|
14
|
+
({ filteredItems, allItemsFlat, selected, onSelect, maxSelections, tokens, size, variant, }: MultiSelectV2MenuItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export default MultiSelectV2MenuItems;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React, RefObject } from 'react';
|
|
2
|
+
export type MultiSelectV2MenuSearchProps = {
|
|
3
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
onArrowKeyToFirstOption?: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare const MultiSelectV2MenuSearch: {
|
|
11
|
+
({ inputRef, value, onChange, placeholder, ariaLabel, onArrowKeyToFirstOption, }: MultiSelectV2MenuSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default MultiSelectV2MenuSearch;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
2
|
+
import { FlattenedMultiSelectV2Item, MultiSelectV2ItemType } from './multiSelectV2.types';
|
|
3
|
+
export type MultiSelectV2MenuVirtualListProps = {
|
|
4
|
+
flattenedItems: FlattenedMultiSelectV2Item[];
|
|
5
|
+
itemIndexMap: Map<string, number>;
|
|
6
|
+
allItemsFlat: MultiSelectV2ItemType[];
|
|
7
|
+
selected: string[];
|
|
8
|
+
onSelect: (value: string) => void;
|
|
9
|
+
maxSelections?: number;
|
|
10
|
+
tokens: MultiSelectV2TokensType;
|
|
11
|
+
height: number;
|
|
12
|
+
itemHeight: number;
|
|
13
|
+
overscan?: number;
|
|
14
|
+
onEndReached?: () => void;
|
|
15
|
+
endReachedThreshold?: number;
|
|
16
|
+
hasMore?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const MultiSelectV2MenuVirtualList: {
|
|
19
|
+
({ flattenedItems, itemIndexMap, allItemsFlat, selected, onSelect, maxSelections, tokens, height, itemHeight, overscan, onEndReached, endReachedThreshold, hasMore, }: MultiSelectV2MenuVirtualListProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export default MultiSelectV2MenuVirtualList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type MultiSelectV2SelectAllItemProps = {
|
|
2
|
+
selected: string[];
|
|
3
|
+
availableValues: string[];
|
|
4
|
+
onSelectAll: (selectAll: boolean) => void;
|
|
5
|
+
selectAllText: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const MultiSelectV2SelectAllItem: ({ selected, availableValues, onSelectAll, selectAllText, disabled, }: MultiSelectV2SelectAllItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MultiSelectV2SelectAllItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
2
|
+
import { SelectV2SkeletonProps } from '../SelectV2/selectV2.shared.types';
|
|
3
|
+
export type MultiSelectV2SkeletonComponentProps = {
|
|
4
|
+
multiSelectTokens: MultiSelectV2TokensType;
|
|
5
|
+
skeleton: SelectV2SkeletonProps;
|
|
6
|
+
};
|
|
7
|
+
declare const MultiSelectV2Skeleton: import('react').ForwardRefExoticComponent<MultiSelectV2SkeletonComponentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default MultiSelectV2Skeleton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MultiSelectV2ItemType } from './multiSelectV2.types';
|
|
2
|
+
type MultiSelectV2SubMenuProps = {
|
|
3
|
+
item: MultiSelectV2ItemType;
|
|
4
|
+
onSelect: (value: string) => void;
|
|
5
|
+
selected: string[];
|
|
6
|
+
maxSelections?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const MultiSelectV2SubMenu: ({ item, onSelect, selected, maxSelections, }: MultiSelectV2SubMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MultiSelectV2SubMenu;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MultiSelectV2SelectionTagType, MultiSelectV2Size, MultiSelectV2Variant, SelectV2TriggerDimensions } from './multiSelectV2.types';
|
|
3
|
+
import { MultiSelectV2TokensType } from './multiSelectV2.tokens';
|
|
4
|
+
export type MultiSelectV2TriggerProps = {
|
|
5
|
+
selectedValues: string[];
|
|
6
|
+
slot?: React.ReactNode;
|
|
7
|
+
variant: MultiSelectV2Variant;
|
|
8
|
+
size: MultiSelectV2Size;
|
|
9
|
+
isSmallScreen: boolean;
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
required: boolean;
|
|
14
|
+
selectionTagType: MultiSelectV2SelectionTagType;
|
|
15
|
+
valueLabelMap: Record<string, string>;
|
|
16
|
+
open: boolean;
|
|
17
|
+
multiSelectTokens: MultiSelectV2TokensType;
|
|
18
|
+
inline?: boolean;
|
|
19
|
+
error?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
triggerDimensions?: SelectV2TriggerDimensions;
|
|
22
|
+
borderRadius: string;
|
|
23
|
+
borderRight?: string;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
declare const MultiSelectV2Trigger: {
|
|
27
|
+
({ selectedValues, slot, variant, size, isSmallScreen, name, label, placeholder, required, selectionTagType, valueLabelMap, open, multiSelectTokens, inline, error, disabled, triggerDimensions, borderRadius, borderRight, ...rest }: MultiSelectV2TriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export default MultiSelectV2Trigger;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as MultiSelectV2 } from './MultiSelectV2';
|
|
2
|
+
export { default as MultiSelectV2Skeleton } from './MultiSelectV2Skeleton';
|
|
3
|
+
export { default as MultiSelectV2Menu } from './MultiSelectV2Menu';
|
|
4
|
+
export { default as MultiSelectV2MenuHeader } from './MultiSelectV2MenuHeader';
|
|
5
|
+
export { default as MultiSelectV2MenuSearch } from './MultiSelectV2MenuSearch';
|
|
6
|
+
export { default as MultiSelectV2MenuVirtualList } from './MultiSelectV2MenuVirtualList';
|
|
7
|
+
export { default as MultiSelectV2MenuItems } from './MultiSelectV2MenuItems';
|
|
8
|
+
export { default as MultiSelectV2MenuActions } from './MultiSelectV2MenuActions';
|
|
9
|
+
export { default as MultiSelectV2Trigger } from './MultiSelectV2Trigger';
|
|
10
|
+
export { default as MobileMultiSelectV2 } from './MobileMultiSelectV2';
|
|
11
|
+
export type { MultiSelectV2Props } from './multiSelectV2.types';
|
|
12
|
+
export * from './multiSelectV2.types';
|
|
13
|
+
export * from './multiSelectV2.tokens';
|
|
14
|
+
export * from './utils';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MultiSelectV2Props } from '../multiSelectV2.types';
|
|
2
|
+
declare const MobileMultiSelectV2: ({ selectedValues, onChange, items, label, subLabel, helpIconText, required, variant, selectionTagType, slot, hintText, placeholder, size, search, enableSelectAll, selectAllText, maxSelections, customTrigger, error, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, skeleton, allowCustomValue, customValueLabel, onOpenChange, triggerDimensions, inline, disabled, name, ...buttonRest }: MultiSelectV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default MobileMultiSelectV2;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VirtualListItem } from '../../VirtualList/types';
|
|
2
|
+
import { FlattenedMultiSelectV2Item, MultiSelectV2GroupType } from '../multiSelectV2.types';
|
|
3
|
+
export type FlattenedMobileMultiSelectV2Item = Omit<FlattenedMultiSelectV2Item, 'type'> & {
|
|
4
|
+
type: FlattenedMultiSelectV2Item['type'] | 'selectAll';
|
|
5
|
+
};
|
|
6
|
+
export declare const flattenMobileMultiSelectV2Groups: (groups: MultiSelectV2GroupType[], enableSelectAll: boolean) => FlattenedMobileMultiSelectV2Item[];
|
|
7
|
+
export declare const isSelectableItem: (value: string, groups: MultiSelectV2GroupType[]) => boolean;
|
|
8
|
+
export declare const toVirtualListItems: (items: FlattenedMobileMultiSelectV2Item[]) => VirtualListItem[];
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
import { MultiSelectV2Size, MultiSelectV2SelectionTagType, MultiSelectV2Variant } from './multiSelectV2.types';
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
|
+
import { SelectV2ItemStates, SelectV2TriggerStates } from '../SelectV2/selectV2.tokenStates';
|
|
7
|
+
type StateToken<T> = Record<SelectV2ItemStates, T>;
|
|
8
|
+
type TriggerStateToken<T> = Record<SelectV2TriggerStates, T>;
|
|
9
|
+
type VariantToken<T> = Record<MultiSelectV2Variant, T>;
|
|
10
|
+
type SizeToken<T> = Record<MultiSelectV2Size, T>;
|
|
11
|
+
type SelectionTagTypeToken<T> = Record<MultiSelectV2SelectionTagType, T>;
|
|
12
|
+
export type MultiSelectV2TriggerStates = SelectV2TriggerStates;
|
|
13
|
+
export type MultiSelectV2ItemStates = SelectV2ItemStates;
|
|
14
|
+
export type MultiSelectV2TokensType = {
|
|
15
|
+
gap: CSSObject['gap'];
|
|
16
|
+
label: {
|
|
17
|
+
fontSize: CSSObject['fontSize'];
|
|
18
|
+
fontWeight: CSSObject['fontWeight'];
|
|
19
|
+
color: StateToken<CSSObject['color']>;
|
|
20
|
+
};
|
|
21
|
+
subLabel: {
|
|
22
|
+
fontSize: CSSObject['fontSize'];
|
|
23
|
+
fontWeight: CSSObject['fontWeight'];
|
|
24
|
+
color: StateToken<CSSObject['color']>;
|
|
25
|
+
};
|
|
26
|
+
hintText: {
|
|
27
|
+
fontSize: CSSObject['fontSize'];
|
|
28
|
+
fontWeight: CSSObject['fontWeight'];
|
|
29
|
+
color: StateToken<CSSObject['color']>;
|
|
30
|
+
};
|
|
31
|
+
errorMessage: {
|
|
32
|
+
fontSize: CSSObject['fontSize'];
|
|
33
|
+
fontWeight: CSSObject['fontWeight'];
|
|
34
|
+
color: CSSObject['color'];
|
|
35
|
+
};
|
|
36
|
+
required: {
|
|
37
|
+
color: CSSObject['color'];
|
|
38
|
+
};
|
|
39
|
+
trigger: {
|
|
40
|
+
height: SizeToken<VariantToken<CSSObject['height']>>;
|
|
41
|
+
padding: SizeToken<VariantToken<{
|
|
42
|
+
top: CSSObject['paddingTop'];
|
|
43
|
+
right: CSSObject['paddingRight'];
|
|
44
|
+
bottom: CSSObject['paddingBottom'];
|
|
45
|
+
left: CSSObject['paddingLeft'];
|
|
46
|
+
}>>;
|
|
47
|
+
borderRadius: SizeToken<VariantToken<CSSObject['borderRadius']>>;
|
|
48
|
+
boxShadow: VariantToken<CSSObject['boxShadow']>;
|
|
49
|
+
backgroundColor: VariantToken<TriggerStateToken<CSSObject['backgroundColor']>>;
|
|
50
|
+
outline: VariantToken<TriggerStateToken<CSSObject['outline']>>;
|
|
51
|
+
slot: {
|
|
52
|
+
gap: CSSObject['gap'];
|
|
53
|
+
width: CSSObject['width'];
|
|
54
|
+
};
|
|
55
|
+
selectionTag: VariantToken<SelectionTagTypeToken<{
|
|
56
|
+
color: CSSObject['color'];
|
|
57
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
58
|
+
fontWeight: CSSObject['fontWeight'];
|
|
59
|
+
paddingTop: CSSObject['paddingTop'];
|
|
60
|
+
paddingRight: CSSObject['paddingRight'];
|
|
61
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
62
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
63
|
+
}>> & {
|
|
64
|
+
marginLeft: CSSObject['margin'];
|
|
65
|
+
borderRadius: CSSObject['borderRadius'];
|
|
66
|
+
};
|
|
67
|
+
chevron: {
|
|
68
|
+
gap: CSSObject['gap'];
|
|
69
|
+
width: CSSObject['width'];
|
|
70
|
+
height: CSSObject['height'];
|
|
71
|
+
iconSize?: number;
|
|
72
|
+
};
|
|
73
|
+
clearButton?: {
|
|
74
|
+
backgroundColor: TriggerStateToken<CSSObject['backgroundColor']>;
|
|
75
|
+
outline: TriggerStateToken<CSSObject['outline']>;
|
|
76
|
+
color: CSSObject['color'];
|
|
77
|
+
width?: CSSObject['width'];
|
|
78
|
+
};
|
|
79
|
+
floatingLabel: {
|
|
80
|
+
paddingTop: CSSObject['paddingTop'];
|
|
81
|
+
paddingRight: CSSObject['paddingRight'];
|
|
82
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
83
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
84
|
+
};
|
|
85
|
+
placeholder: {
|
|
86
|
+
color: CSSObject['color'];
|
|
87
|
+
fontSize: CSSObject['fontSize'];
|
|
88
|
+
fontWeight: CSSObject['fontWeight'];
|
|
89
|
+
};
|
|
90
|
+
selectedValue: {
|
|
91
|
+
color: CSSObject['color'];
|
|
92
|
+
fontSize: CSSObject['fontSize'];
|
|
93
|
+
fontWeight: CSSObject['fontWeight'];
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
menu: {
|
|
97
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
98
|
+
border: CSSObject['border'];
|
|
99
|
+
borderRadius: CSSObject['borderRadius'];
|
|
100
|
+
padding: SizeToken<VariantToken<{
|
|
101
|
+
top: CSSObject['paddingTop'];
|
|
102
|
+
right: CSSObject['paddingRight'];
|
|
103
|
+
bottom: CSSObject['paddingBottom'];
|
|
104
|
+
left: CSSObject['paddingLeft'];
|
|
105
|
+
}>>;
|
|
106
|
+
minWidth: CSSObject['minWidth'];
|
|
107
|
+
scroll: {
|
|
108
|
+
height: CSSObject['height'];
|
|
109
|
+
maxHeight: CSSObject['maxHeight'];
|
|
110
|
+
};
|
|
111
|
+
header: {
|
|
112
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
113
|
+
borderBottom: CSSObject['borderBottom'];
|
|
114
|
+
selectAllRowPaddingLeft: CSSObject['paddingLeft'];
|
|
115
|
+
selectAllRowPaddingRight: CSSObject['paddingRight'];
|
|
116
|
+
};
|
|
117
|
+
selectAll: {
|
|
118
|
+
paddingTop: CSSObject['paddingTop'];
|
|
119
|
+
paddingRight: CSSObject['paddingRight'];
|
|
120
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
121
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
122
|
+
borderRadius: CSSObject['borderRadius'];
|
|
123
|
+
};
|
|
124
|
+
list: {
|
|
125
|
+
paddingTop: CSSObject['paddingTop'];
|
|
126
|
+
paddingRight: CSSObject['paddingRight'];
|
|
127
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
128
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
129
|
+
};
|
|
130
|
+
actions: {
|
|
131
|
+
paddingTop: CSSObject['paddingTop'];
|
|
132
|
+
paddingRight: CSSObject['paddingRight'];
|
|
133
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
134
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
135
|
+
gap: CSSObject['gap'];
|
|
136
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
137
|
+
borderTop: CSSObject['borderTop'];
|
|
138
|
+
};
|
|
139
|
+
item: {
|
|
140
|
+
paddingTop: CSSObject['paddingTop'];
|
|
141
|
+
paddingRight: CSSObject['paddingRight'];
|
|
142
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
143
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
144
|
+
margin: CSSObject['margin'];
|
|
145
|
+
borderRadius: CSSObject['borderRadius'];
|
|
146
|
+
gap: CSSObject['gap'];
|
|
147
|
+
backgroundColor: StateToken<CSSObject['backgroundColor']>;
|
|
148
|
+
optionsLabel: {
|
|
149
|
+
fontSize: CSSObject['fontSize'];
|
|
150
|
+
fontWeight: CSSObject['fontWeight'];
|
|
151
|
+
color: StateToken<CSSObject['color']>;
|
|
152
|
+
paddingTop: CSSObject['paddingTop'];
|
|
153
|
+
paddingRight: CSSObject['paddingRight'];
|
|
154
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
155
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
156
|
+
};
|
|
157
|
+
option: {
|
|
158
|
+
fontSize: CSSObject['fontSize'];
|
|
159
|
+
fontWeight: CSSObject['fontWeight'];
|
|
160
|
+
color: StateToken<CSSObject['color']>;
|
|
161
|
+
};
|
|
162
|
+
description: {
|
|
163
|
+
fontSize: CSSObject['fontSize'];
|
|
164
|
+
fontWeight: CSSObject['fontWeight'];
|
|
165
|
+
color: StateToken<CSSObject['color']>;
|
|
166
|
+
};
|
|
167
|
+
seperator: {
|
|
168
|
+
color: CSSObject['color'];
|
|
169
|
+
height: CSSObject['height'];
|
|
170
|
+
margin: CSSObject['margin'];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
subMenu: {
|
|
175
|
+
trigger: {
|
|
176
|
+
paddingTop: CSSObject['paddingTop'];
|
|
177
|
+
paddingRight: CSSObject['paddingRight'];
|
|
178
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
179
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
180
|
+
margin: CSSObject['margin'];
|
|
181
|
+
borderRadius: CSSObject['borderRadius'];
|
|
182
|
+
};
|
|
183
|
+
content: {
|
|
184
|
+
borderRadius: CSSObject['borderRadius'];
|
|
185
|
+
paddingTop: CSSObject['paddingTop'];
|
|
186
|
+
paddingRight: CSSObject['paddingRight'];
|
|
187
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
188
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
drawer: {
|
|
192
|
+
header: {
|
|
193
|
+
paddingTop: CSSObject['paddingTop'];
|
|
194
|
+
paddingRight: CSSObject['paddingRight'];
|
|
195
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
196
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
197
|
+
borderBottom: CSSObject['borderBottom'];
|
|
198
|
+
};
|
|
199
|
+
search: {
|
|
200
|
+
paddingTop: CSSObject['paddingTop'];
|
|
201
|
+
paddingRight: CSSObject['paddingRight'];
|
|
202
|
+
paddingBottom: CSSObject['paddingBottom'];
|
|
203
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
204
|
+
marginTop: CSSObject['margin'];
|
|
205
|
+
marginBottom: CSSObject['margin'];
|
|
206
|
+
};
|
|
207
|
+
content: {
|
|
208
|
+
gap: CSSObject['gap'];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
export type ResponsiveMultiSelectV2Tokens = {
|
|
213
|
+
[key in keyof BreakpointType]: MultiSelectV2TokensType;
|
|
214
|
+
};
|
|
215
|
+
export declare const getMultiSelectV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveMultiSelectV2Tokens;
|
|
216
|
+
export {};
|