@televet/kibble-ui 1.6.3 → 1.7.0-beta.3chctp9.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/build/components/Avatar/avatar.component.d.ts +26 -0
- package/build/components/Avatar/avatar.config.d.ts +2 -0
- package/build/components/Avatar/avatar.types.d.ts +1 -0
- package/build/components/Avatar/index.d.ts +3 -0
- package/build/components/AvatarGroup/avatarGroup.component.d.ts +13 -0
- package/build/components/AvatarGroup/avatarGroup.utilities.d.ts +6 -0
- package/build/components/AvatarGroup/index.d.ts +1 -0
- package/build/components/Button/button.component.d.ts +13 -0
- package/build/components/Button/button.config.d.ts +16 -0
- package/build/components/Button/button.types.d.ts +8 -0
- package/build/components/Button/index.d.ts +3 -0
- package/build/components/Drawer/drawer.config.d.ts +13 -0
- package/build/components/Drawer/index.d.ts +1 -0
- package/build/components/FormControl/formControl.argTypes.d.ts +125 -0
- package/build/components/FormControl/formControl.component.d.ts +12 -0
- package/build/components/FormControl/formControl.config.d.ts +2 -0
- package/build/components/Forms/RatingDots/ratingDots.component.d.ts +4 -1
- package/build/components/Forms/Switch/switch.component.d.ts +1 -0
- package/build/components/Forms/TextInput/textInput.component.d.ts +4 -3
- package/build/components/Icon/icon.component.d.ts +8 -0
- package/build/components/Icon/icon.records.d.ts +3 -0
- package/build/components/Icon/icon.types.d.ts +3 -0
- package/build/components/Icon/index.d.ts +2 -0
- package/build/components/Logo/index.d.ts +2 -0
- package/build/components/Logo/logo.component.d.ts +14 -0
- package/build/components/Logo/logo.config.d.ts +6 -0
- package/build/components/Logo/logo.types.d.ts +3 -0
- package/build/components/Logo/logos.d.ts +22 -0
- package/build/components/MediaAndIcons/Icon/icon.types.d.ts +1 -1
- package/build/components/Overlay/Menu/Components/MenuButton/menuButton.component.d.ts +15 -0
- package/build/components/Overlay/Menu/Components/MenuContainer/menuContainer.component.d.ts +7 -0
- package/build/components/Overlay/Menu/Components/MenuItem/menuItem.component.d.ts +19 -0
- package/build/components/Overlay/Menu/Components/MenuList/menuList.component.d.ts +16 -0
- package/build/components/Overlay/Menu/Components/MenuOptionGroup/menuOptionGroup.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/MenuSearchBar/menuSearchBar.component.d.ts +12 -0
- package/build/components/Overlay/Menu/Components/MenuSelectAllButtons/menuSelectAllButtons.component.d.ts +12 -0
- package/build/components/Overlay/Menu/index.d.ts +9 -0
- package/build/components/Overlay/Menu/menu.component.d.ts +16 -0
- package/build/components/Overlay/Menu/menu.config.d.ts +31 -0
- package/build/components/Overlay/Menu/menu.context.d.ts +22 -0
- package/build/components/Overlay/index.d.ts +1 -0
- package/build/components/RatingDots/index.d.ts +2 -0
- package/build/components/RatingDots/ratingDot.component.d.ts +9 -0
- package/build/components/RatingDots/ratingDots.component.d.ts +10 -0
- package/build/components/Select/index.d.ts +3 -0
- package/build/components/Select/select.component.d.ts +9 -0
- package/build/components/Select/select.config.d.ts +2 -0
- package/build/components/Select/select.types.d.ts +4 -0
- package/build/components/Switch/index.d.ts +2 -0
- package/build/components/Switch/switch.component.d.ts +7 -0
- package/build/components/Switch/switch.config.d.ts +2 -0
- package/build/components/TextInput/index.d.ts +2 -0
- package/build/components/TextInput/textInput.component.d.ts +7 -0
- package/build/components/TextInput/textInput.config.d.ts +2 -0
- package/build/components/Textarea/index.d.ts +2 -0
- package/build/components/Textarea/textarea.component.d.ts +7 -0
- package/build/components/Textarea/textarea.config.d.ts +2 -0
- package/build/components/Tooltip/index.d.ts +3 -0
- package/build/components/Tooltip/tooltip.component.d.ts +8 -0
- package/build/components/Tooltip/tooltip.config.d.ts +8 -0
- package/build/components/Tooltip/tooltip.types.d.ts +4 -0
- package/build/index.d.ts +0 -1
- package/build/index.js +904 -472
- package/build/index.js.map +1 -1
- package/build/theme/index.d.ts +1 -0
- package/build/theme/theme.provider.d.ts +4 -0
- package/build/theme/tokens/shadows.d.ts +14 -0
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AvatarProps as CAvatarProps, Placement } from '@chakra-ui/react';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { AvatarSize } from './avatar.types';
|
|
4
|
+
export declare enum AvatarVariant {
|
|
5
|
+
Green = "green",
|
|
6
|
+
Red = "red",
|
|
7
|
+
Blue = "blue",
|
|
8
|
+
Comet = "comet",
|
|
9
|
+
Number = "number",
|
|
10
|
+
Dashed = "dashed",
|
|
11
|
+
Image = "image"
|
|
12
|
+
}
|
|
13
|
+
export interface AvatarProps extends CAvatarProps {
|
|
14
|
+
name: string;
|
|
15
|
+
size?: AvatarSize;
|
|
16
|
+
isClinic?: boolean;
|
|
17
|
+
showTooltip?: boolean;
|
|
18
|
+
tooltipPlacement?: Placement;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
handleClick?: () => void;
|
|
21
|
+
showRemoveButton?: boolean;
|
|
22
|
+
handleRemoveButtonClick?: () => void;
|
|
23
|
+
variant?: AvatarVariant;
|
|
24
|
+
tooltipText?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const Avatar: ({ name, src, isClinic, size, showTooltip, tooltipPlacement, style, handleClick, showRemoveButton, handleRemoveButtonClick, variant, tooltipText, ...rest }: AvatarProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AvatarProps, AvatarSize } from 'components/Avatar';
|
|
3
|
+
export interface AvatarGroupProps {
|
|
4
|
+
avatars: AvatarProps[];
|
|
5
|
+
max?: number;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
handleAddButtonClick?: () => void;
|
|
8
|
+
showAddButton?: boolean;
|
|
9
|
+
addButtonTooltipText?: string;
|
|
10
|
+
showRemoveAvatarButton?: boolean;
|
|
11
|
+
handleRemoveButtonClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const AvatarGroup: ({ avatars, max, size, handleAddButtonClick, showAddButton, addButtonTooltipText, showRemoveAvatarButton, handleRemoveButtonClick, }: AvatarGroupProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './avatarGroup.component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps as ChakraButtonProps } from '@chakra-ui/react';
|
|
3
|
+
import { IconName } from '../Icon';
|
|
4
|
+
import { ButtonSizeType, ButtonVariantType } from './button.types';
|
|
5
|
+
export interface ButtonProps extends ChakraButtonProps {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
variant?: ButtonVariantType;
|
|
8
|
+
size?: ButtonSizeType;
|
|
9
|
+
iconName?: IconName;
|
|
10
|
+
iconPosition?: 'left' | 'right';
|
|
11
|
+
darkMode?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonStyleType } from './button.types';
|
|
2
|
+
export declare const ButtonVariantConfig: ButtonStyleType;
|
|
3
|
+
export declare const ButtonSizeConfig: {
|
|
4
|
+
lg: {
|
|
5
|
+
p: string;
|
|
6
|
+
};
|
|
7
|
+
md: {
|
|
8
|
+
p: string;
|
|
9
|
+
};
|
|
10
|
+
sm: {
|
|
11
|
+
p: string;
|
|
12
|
+
};
|
|
13
|
+
xs: {
|
|
14
|
+
p: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AdaptiveColorMap } from '../../theme/tokens';
|
|
2
|
+
export interface ButtonVariantConfigType extends AdaptiveColorMap<ButtonColorOptionsType> {
|
|
3
|
+
variant: 'solid' | 'outline' | 'ghost';
|
|
4
|
+
}
|
|
5
|
+
export declare type ButtonVariantType = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive';
|
|
6
|
+
export declare type ButtonColorOptionsType = 'content' | 'default' | 'hover' | 'active' | 'border';
|
|
7
|
+
export declare type ButtonSizeType = 'xs' | 'sm' | 'md' | 'lg';
|
|
8
|
+
export declare type ButtonStyleType = Record<ButtonVariantType, ButtonVariantConfigType>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drawer.config';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export declare const formControlArgTypes: {
|
|
2
|
+
onChange: {
|
|
3
|
+
type: {
|
|
4
|
+
required: boolean;
|
|
5
|
+
};
|
|
6
|
+
table: {
|
|
7
|
+
type: {
|
|
8
|
+
summary: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
control: string;
|
|
14
|
+
description: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
table: {
|
|
17
|
+
type: {
|
|
18
|
+
summary: string;
|
|
19
|
+
};
|
|
20
|
+
defaultValue: {
|
|
21
|
+
summary: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
defaultValue: string;
|
|
25
|
+
};
|
|
26
|
+
label: {
|
|
27
|
+
control: string;
|
|
28
|
+
type: {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
table: {
|
|
32
|
+
type: {
|
|
33
|
+
summary: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
helperText: {
|
|
38
|
+
control: string;
|
|
39
|
+
type: {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
table: {
|
|
43
|
+
type: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
errorText: {
|
|
52
|
+
control: string;
|
|
53
|
+
type: {
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
table: {
|
|
57
|
+
type: {
|
|
58
|
+
summary: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
isDisabled: {
|
|
63
|
+
type: string;
|
|
64
|
+
description: string;
|
|
65
|
+
table: {
|
|
66
|
+
type: {
|
|
67
|
+
summary: string;
|
|
68
|
+
};
|
|
69
|
+
defaultValue: {
|
|
70
|
+
summary: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
defaultValue: boolean;
|
|
74
|
+
};
|
|
75
|
+
isInvalid: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
table: {
|
|
79
|
+
type: {
|
|
80
|
+
summary: string;
|
|
81
|
+
};
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
defaultValue: boolean;
|
|
87
|
+
};
|
|
88
|
+
isReadOnly: {
|
|
89
|
+
type: string;
|
|
90
|
+
table: {
|
|
91
|
+
type: {
|
|
92
|
+
summary: string;
|
|
93
|
+
};
|
|
94
|
+
defaultValue: {
|
|
95
|
+
summary: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
defaultValue: boolean;
|
|
99
|
+
};
|
|
100
|
+
isRequired: {
|
|
101
|
+
type: string;
|
|
102
|
+
description: string;
|
|
103
|
+
table: {
|
|
104
|
+
type: {
|
|
105
|
+
summary: string;
|
|
106
|
+
};
|
|
107
|
+
defaultValue: {
|
|
108
|
+
summary: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
defaultValue: boolean;
|
|
112
|
+
};
|
|
113
|
+
autoFocus: {
|
|
114
|
+
type: string;
|
|
115
|
+
table: {
|
|
116
|
+
type: {
|
|
117
|
+
summary: string;
|
|
118
|
+
};
|
|
119
|
+
defaultValue: {
|
|
120
|
+
summary: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
defaultValue: boolean;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface WithFormControlProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
errorText?: string;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
isInvalid?: boolean;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
isReadOnly?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function withFormControl<P extends object>(Component: React.ComponentType<P>): React.FC<P & WithFormControlProps>;
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
export interface IRatingDotsProps {
|
|
3
3
|
minValue: number;
|
|
4
4
|
maxValue: number;
|
|
5
|
+
minLabel?: string;
|
|
6
|
+
maxLabel?: string;
|
|
7
|
+
centeredLabel?: string;
|
|
5
8
|
isInteractive?: boolean;
|
|
6
9
|
isDisabled?: boolean;
|
|
7
10
|
onClick?: (value: number) => void;
|
|
8
11
|
selected?: number;
|
|
9
12
|
}
|
|
10
|
-
export declare const RatingDots: ({ minValue, maxValue, isDisabled, isInteractive, onClick, selected, }: IRatingDotsProps) => JSX.Element;
|
|
13
|
+
export declare const RatingDots: ({ minValue, maxValue, minLabel, maxLabel, centeredLabel, isDisabled, isInteractive, onClick, selected, }: IRatingDotsProps) => JSX.Element;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { SwitchProps as CSwitchProps } from '@chakra-ui/react';
|
|
3
3
|
import { WithFormControlProps } from '../FormControl/formControl.component';
|
|
4
4
|
export interface SwitchProps extends WithFormControlProps, CSwitchProps {
|
|
5
|
+
$isFieldInline?: boolean;
|
|
5
6
|
}
|
|
6
7
|
declare const WrappedSwitch: React.FC<SwitchProps & WithFormControlProps>;
|
|
7
8
|
export { WrappedSwitch as Switch };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
1
|
+
import React, { ForwardedRef, ReactElement } from 'react';
|
|
2
2
|
import { InputProps as CInputProps } from '@chakra-ui/react';
|
|
3
|
-
import { WithFormControlProps } from '
|
|
3
|
+
import { WithFormControlProps } from '../FormControl/formControl.component';
|
|
4
4
|
export interface TextInputProps extends WithFormControlProps, CInputProps {
|
|
5
5
|
leftElement?: ReactElement;
|
|
6
6
|
rightElement?: ReactElement;
|
|
7
|
+
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
7
8
|
}
|
|
8
|
-
declare const WrappedTextInput: React.
|
|
9
|
+
declare const WrappedTextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
10
|
export { WrappedTextInput as TextInput };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconColor, IconName, IconsSize } from './icon.types';
|
|
3
|
+
export interface IconProps {
|
|
4
|
+
name: IconName;
|
|
5
|
+
size?: IconsSize;
|
|
6
|
+
color?: IconColor;
|
|
7
|
+
}
|
|
8
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare type IconName = 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'arrowCircle' | 'arrowDown' | 'arrowDownRight' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'asterisk' | 'bell' | 'bellRinging' | 'bookmarkFilled' | 'bookmarkOutlined' | 'brush' | 'bulkSelect' | 'caduceus' | 'calendarDate' | 'calendarCheck' | 'calendarInfo' | 'calendarPen' | 'calendarOutlined' | 'camera' | 'cameraFlip' | 'cameraOff' | 'cancel' | 'cellphone' | 'cellphoneAlert' | 'chainLink' | 'chatBubbleFilled' | 'chatBubbleOutlined' | 'checkmark' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmarkList' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'chevronUpDown' | 'circleDotted' | 'clock' | 'close' | 'closeCircle' | 'code' | 'conversation' | 'creditCardHand' | 'crossClipboard' | 'crossPaw' | 'crossHatPerson' | 'dogHouse' | 'dogHouseOutlined' | 'dollar' | 'dollarCircle' | 'dotsCircle' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'dragDrop' | 'emailSend' | 'envelopeFilled' | 'envelopeOutlined' | 'eyedropper' | 'eyeOpen' | 'eyeSlash' | 'externalLink' | 'faceScreen' | 'formsFilled' | 'formsOutlined' | 'funnelFilled' | 'funnelOutlined' | 'gear' | 'grid' | 'horizontalLines' | 'house' | 'infoCircleFilled' | 'infoCircleOutlined' | 'input' | 'invoice' | 'invoiceOutlined' | 'kanbanBoard' | 'largeTextInput' | 'list' | 'locationMarker' | 'locationMarkerGround' | 'lockRectangle' | 'lockRound' | 'loudspeaker' | 'magnifyingGlass' | 'mailbox' | 'manHeadset' | 'message' | 'messages' | 'messageClipboard' | 'messageEllipses' | 'messageGear' | 'messageLink' | 'microphone' | 'microphoneMute' | 'minus' | 'moveLeft' | 'moveRight' | 'multipleChoice' | 'notification' | 'paperAirplane' | 'paperAirplane2' | 'paperAirplaneRight' | 'paperclip' | 'paperPen' | 'paw' | 'paw2' | 'pawMagnifyingGlass' | 'pawOutlined' | 'pdfLogo' | 'pen' | 'penSquare' | 'person' | 'personAdd' | 'phone' | 'phoneButtons' | 'phoneDown' | 'phoneRing' | 'pill' | 'pillHand' | 'playingCards' | 'plus' | 'questionMark' | 'questionMarkCircle' | 'quilInk' | 'reactLogo' | 'record' | 'report' | 'robot' | 'smileyFace' | 'smileyFacePlus' | 'star' | 'star2' | 'star2Outlined' | 'starCircle' | 'team' | 'textEdit' | 'thumbsUp' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website';
|
|
2
|
+
export declare type IconsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
export declare type IconColor = 'default' | 'subtle' | 'inactive' | 'active' | 'success' | 'warning' | 'error' | 'currentColor';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LogoHoliday, LogoType, LogoColor } from './logo.types';
|
|
3
|
+
export interface ILogoProps {
|
|
4
|
+
type?: LogoType;
|
|
5
|
+
color?: LogoColor;
|
|
6
|
+
holiday?: LogoHoliday;
|
|
7
|
+
height?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
handleClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Logo: {
|
|
12
|
+
({ type, color, holiday, height, width, handleClick, }: ILogoProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from 'framer-motion/types/types';
|
|
3
|
+
import { LogoColor, LogoHoliday } from './logo.types';
|
|
4
|
+
export declare const holidaysLogoIconMap: Record<LogoHoliday, React.FC<Props>>;
|
|
5
|
+
export declare const logoIconMap: Record<LogoColor, React.FC<Props>>;
|
|
6
|
+
export declare const fullLogoMap: Record<LogoColor, React.FC<Props>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare type LogoHoliday = 'newYears' | 'valentines' | 'stPatricks' | 'easter1' | 'easter2' | 'easter3' | 'easter4' | 'easter5' | 'easter6' | 'mothersDay' | 'memorialDay' | 'fathersDay' | 'halloween' | 'thanksgiving' | 'christmas';
|
|
2
|
+
export declare type LogoType = 'full' | 'icon';
|
|
3
|
+
export declare type LogoColor = 'teal' | 'black' | 'white';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactComponent as TealLogo } from '../../assets/logos/teal.svg';
|
|
2
|
+
import { ReactComponent as TealLogoIcon } from '../../assets/logos/tealIcon.svg';
|
|
3
|
+
import { ReactComponent as BlackLogo } from '../../assets/logos/black.svg';
|
|
4
|
+
import { ReactComponent as BlackLogoIcon } from '../../assets/logos/blackIcon.svg';
|
|
5
|
+
import { ReactComponent as WhiteLogo } from '../../assets/logos/white.svg';
|
|
6
|
+
import { ReactComponent as WhiteLogoIcon } from '../../assets/logos/whiteIcon.svg';
|
|
7
|
+
import { ReactComponent as NewYearsLogoIcon } from '../../assets/logos/holidays/newYears.svg';
|
|
8
|
+
import { ReactComponent as ValentinesLogoIcon } from '../../assets/logos/holidays/valentines.svg';
|
|
9
|
+
import { ReactComponent as StPatricksLogoIcon } from '../../assets/logos/holidays/stPatricks.svg';
|
|
10
|
+
import { ReactComponent as Easter1LogoIcon } from '../../assets/logos/holidays/easter1.svg';
|
|
11
|
+
import { ReactComponent as Easter2LogoIcon } from '../../assets/logos/holidays/easter2.svg';
|
|
12
|
+
import { ReactComponent as Easter3LogoIcon } from '../../assets/logos/holidays/easter3.svg';
|
|
13
|
+
import { ReactComponent as Easter4LogoIcon } from '../../assets/logos/holidays/easter4.svg';
|
|
14
|
+
import { ReactComponent as Easter5LogoIcon } from '../../assets/logos/holidays/easter5.svg';
|
|
15
|
+
import { ReactComponent as Easter6LogoIcon } from '../../assets/logos/holidays/easter6.svg';
|
|
16
|
+
import { ReactComponent as MothersDayLogoIcon } from '../../assets/logos/holidays/mothersDay.svg';
|
|
17
|
+
import { ReactComponent as MemorialDayLogoIcon } from '../../assets/logos/holidays/memorialDay.svg';
|
|
18
|
+
import { ReactComponent as FathersDayLogoIcon } from '../../assets/logos/holidays/fathersDay.svg';
|
|
19
|
+
import { ReactComponent as HalloweenLogoIcon } from '../../assets/logos/holidays/halloween.svg';
|
|
20
|
+
import { ReactComponent as ThanksgivingLogoIcon } from '../../assets/logos/holidays/thanksgiving.svg';
|
|
21
|
+
import { ReactComponent as ChristmasLogoIcon } from '../../assets/logos/holidays/christmas.svg';
|
|
22
|
+
export { TealLogo, TealLogoIcon, BlackLogo, BlackLogoIcon, WhiteLogo, WhiteLogoIcon, NewYearsLogoIcon, ValentinesLogoIcon, StPatricksLogoIcon, Easter1LogoIcon, Easter2LogoIcon, Easter3LogoIcon, Easter4LogoIcon, Easter5LogoIcon, Easter6LogoIcon, MothersDayLogoIcon, MemorialDayLogoIcon, FathersDayLogoIcon, HalloweenLogoIcon, ThanksgivingLogoIcon, ChristmasLogoIcon, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type IconName = 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'arrowCircle' | 'arrowDown' | 'arrowDownRight' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'asterisk' | 'bell' | 'bone' | 'bellRinging' | 'bookmarkFilled' | 'bookmarkOutlined' | 'brush' | 'bulkSelect' | 'buttons' | 'caduceus' | 'calendarDate' | 'calendarCheck' | 'calendarInfo' | 'calendarPen' | 'calendarOutlined' | 'camera' | 'cameraFlip' | 'cameraOff' | 'cancel' | 'cellphone' | 'cellphoneAlert' | 'chainLink' | 'chatBubbleFilled' | 'chatBubbleOutlined' | 'checkmark' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmarkList' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'chevronUpDown' | 'circleDotted' | 'clockGear' | 'clock' | 'close' | 'closeCircle' | 'code' | 'conversation' | 'creditCardHand' | 'crossClipboard' | 'crossPaw' | 'crossHatPerson' | 'dogHouse' | 'dogHouseOutlined' | 'dollar' | 'dollarCircle' | 'dotsCircle' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'dragDrop' | 'emailSend' | 'envelopeFilled' | 'envelopeOutlined' | 'eyedropper' | 'eyeOpen' | 'eyeSlash' | 'externalLink' | 'faceScreen' | 'formsFilled' | 'formsOutlined' | 'funnelFilled' | 'funnelOutlined' | 'gear' | 'grid' | 'horizontalLines' | 'house' | 'infoCircleFilled' | 'infoCircleOutlined' | 'input' | 'invoice' | 'invoiceOutlined' | 'kanbanBoard' | 'largeTextInput' | 'list' | 'locationMarker' | 'locationMarkerGround' | 'lockRectangle' | 'lockRound' | 'loudspeaker' | 'magnifyingGlass' | 'mailbox' | 'manHeadset' | 'mergeTags' | 'message' | 'messages' | 'messageClipboard' | 'messageEllipses' | 'messageGearOutlined' | 'messageGear' | 'messageLink' | 'microphone' | 'microphoneMute' | 'minus' | 'moveLeft' | 'moveRight' | 'multipleChoice' | 'notification' | 'paperAirplane' | 'paperAirplane2' | 'paperAirplaneRight' | 'paperclip' | 'paperPen' | 'paw' | 'paw2' | 'pawMagnifyingGlass' | 'pawOutlined' | 'pdfLogo' | 'pen' | 'penSquare' | 'person' | 'personAdd' | 'phone' | 'phoneButtons' | 'phoneDown' | 'phoneRing' | 'pill' | 'pillHand' | 'playingCards' | 'plus' | 'questionMark' | 'questionMarkCircle' | 'quilInk' | 'reactLogo' | 'record' | 'report' | 'robot' | 'smileyFace' | 'smileyFacePlus' | 'star' | 'star2' | 'star2Outlined' | 'starCircle' | 'team' | 'televetV' | 'textEdit' | 'thumbsUp' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website' | 'wrench';
|
|
1
|
+
export declare type IconName = 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'arrowCircle' | 'arrowDown' | 'arrowDownRight' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'asterisk' | 'award' | 'bell' | 'bone' | 'bellRinging' | 'bookmarkFilled' | 'bookmarkOutlined' | 'brush' | 'bulkSelect' | 'buttons' | 'caduceus' | 'calendarDate' | 'calendarCheck' | 'calendarInfo' | 'calendarPen' | 'calendarOutlined' | 'camera' | 'cameraFlip' | 'cameraOff' | 'cancel' | 'cellphone' | 'cellphoneAlert' | 'chainLink' | 'chatBubbleFilled' | 'chatBubbleOutlined' | 'checkmark' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmarkList' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'chevronUpDown' | 'circleDotted' | 'clockGear' | 'clock' | 'close' | 'closeCircle' | 'closedSign' | 'code' | 'conversation' | 'creditCardHand' | 'crossClipboard' | 'crossPaw' | 'crossHatPerson' | 'dogHouse' | 'dogHouseOutlined' | 'dollar' | 'dollarCircle' | 'dotsCircle' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'dragDrop' | 'emailSend' | 'envelopeFilled' | 'envelopeOutlined' | 'eyedropper' | 'eyeOpen' | 'eyeSlash' | 'externalLink' | 'faceScreen' | 'formsFilled' | 'formsOutlined' | 'funnelFilled' | 'funnelOutlined' | 'gear' | 'grid' | 'horizontalLines' | 'house' | 'infoCircleFilled' | 'infoCircleOutlined' | 'input' | 'invoice' | 'invoiceOutlined' | 'kanbanBoard' | 'largeTextInput' | 'list' | 'locationMarker' | 'locationMarkerGround' | 'lockRectangle' | 'lockRound' | 'loudspeaker' | 'magnifyingGlass' | 'mailbox' | 'manHeadset' | 'mergeTags' | 'message' | 'messages' | 'messageClipboard' | 'messageEllipses' | 'messageGearOutlined' | 'messageGear' | 'messageLink' | 'microphone' | 'microphoneMute' | 'minus' | 'moveLeft' | 'moveRight' | 'multipleChoice' | 'notification' | 'paperAirplane' | 'paperAirplane2' | 'paperAirplaneRight' | 'paperclip' | 'paperPen' | 'paw' | 'paw2' | 'pawMagnifyingGlass' | 'pawOutlined' | 'pdfLogo' | 'pen' | 'penSquare' | 'person' | 'personAdd' | 'phone' | 'phoneButtons' | 'phoneDown' | 'phoneRing' | 'pill' | 'pillHand' | 'playingCards' | 'plus' | 'questionMark' | 'questionMarkCircle' | 'quilInk' | 'reactLogo' | 'record' | 'report' | 'robot' | 'robotOutlined' | 'smileyFace' | 'smileyFacePlus' | 'sort' | 'star' | 'star2' | 'star2Outlined' | 'starCircle' | 'stop' | 'stopRecording' | 'team' | 'televetV' | 'textEdit' | 'thumbsUp' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website' | 'wrench';
|
|
2
2
|
export declare type IconsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
3
|
export declare type IconColor = 'default' | 'subtle' | 'inactive' | 'active' | 'success' | 'warning' | 'error' | 'currentColor';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariantType, ButtonSizeType } from '../../../../Forms';
|
|
3
|
+
import { IconName } from '../../../../MediaAndIcons';
|
|
4
|
+
import { MenuButtonProps as CMenuButtonProps } from '@chakra-ui/react';
|
|
5
|
+
export interface MenuButtonProps extends CMenuButtonProps {
|
|
6
|
+
leftElement?: ReactNode;
|
|
7
|
+
leftIconName?: IconName;
|
|
8
|
+
rightIconName?: IconName;
|
|
9
|
+
showRightIcon?: boolean;
|
|
10
|
+
size?: ButtonSizeType;
|
|
11
|
+
text?: string;
|
|
12
|
+
variant?: ButtonVariantType;
|
|
13
|
+
}
|
|
14
|
+
declare const MenuButton: ({ leftElement, leftIconName, rightIconName, showRightIcon, size, text, variant, ...rest }: MenuButtonProps) => JSX.Element;
|
|
15
|
+
export default MenuButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MenuProps as CMenuProps } from '@chakra-ui/react';
|
|
3
|
+
export interface MenuContainerProps extends Omit<CMenuProps, 'children'> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const MenuContainer: ({ children, ...rest }: MenuContainerProps) => JSX.Element;
|
|
7
|
+
export default MenuContainer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode, MutableRefObject, KeyboardEvent } from 'react';
|
|
2
|
+
export interface MenuItemProps {
|
|
3
|
+
canSelectAll?: boolean;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
closeOnSelect?: boolean;
|
|
6
|
+
groupLabel?: string;
|
|
7
|
+
handleKeyboardNavigation?: (e: KeyboardEvent<HTMLDivElement>, elementIsInputField: boolean) => void;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isMultiSelect?: boolean;
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
itemIndex?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
leftElement?: ReactNode;
|
|
14
|
+
menuItemRefs?: MutableRefObject<HTMLDivElement[] | null[]>;
|
|
15
|
+
onSelectItem?: (selectedValue: string) => void;
|
|
16
|
+
value?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const MenuItem: ({ isMultiSelect, canSelectAll, children, closeOnSelect, groupLabel, handleKeyboardNavigation, isDisabled, isSelected, itemIndex, label, leftElement, menuItemRefs, onSelectItem, value, ...rest }: MenuItemProps) => JSX.Element;
|
|
19
|
+
export default MenuItem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuListProps as CMenuListProps } from '@chakra-ui/react';
|
|
3
|
+
import { MenuItemProps } from '../MenuItem/menuItem.component';
|
|
4
|
+
export interface MenuListProps extends CMenuListProps {
|
|
5
|
+
canSelectAll?: boolean;
|
|
6
|
+
canSelectGroups?: boolean;
|
|
7
|
+
isGrouped?: boolean;
|
|
8
|
+
isMultiSelect?: boolean;
|
|
9
|
+
isSearchable?: boolean;
|
|
10
|
+
menuItems?: MenuItemProps[];
|
|
11
|
+
onMenuItemSelect?: ((selectedItem: MenuItemProps) => void) | ((selectedItem: MenuItemProps) => Promise<void>);
|
|
12
|
+
onMenuItemSelectAll?: ((selectedItems: MenuItemProps[]) => void) | ((selectedItems: MenuItemProps[]) => Promise<void>);
|
|
13
|
+
searchPlaceholder?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const MenuList: ({ canSelectAll, canSelectGroups, children, isGrouped, isMultiSelect, isSearchable, menuItems, onMenuItemSelect, onMenuItemSelectAll, searchPlaceholder, ...rest }: MenuListProps) => JSX.Element;
|
|
16
|
+
export default MenuList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeEventHandler, Dispatch, SetStateAction, KeyboardEvent, MutableRefObject } from 'react';
|
|
2
|
+
import { MenuItemProps } from '../MenuItem/menuItem.component';
|
|
3
|
+
export interface MenuSearchBarProps {
|
|
4
|
+
handleKeyboardNavigation: (e: KeyboardEvent<HTMLInputElement>, elementIsInputField: boolean) => void;
|
|
5
|
+
menuItems: MenuItemProps[];
|
|
6
|
+
onSearchCallback?: (e: ChangeEventHandler) => void;
|
|
7
|
+
searchInputRef?: MutableRefObject<HTMLInputElement | null>;
|
|
8
|
+
setFilteredMenuItems: Dispatch<SetStateAction<MenuItemProps[]>>;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const MenuSearchBar: ({ handleKeyboardNavigation, menuItems, onSearchCallback, searchInputRef, setFilteredMenuItems, placeholder, }: MenuSearchBarProps) => JSX.Element;
|
|
12
|
+
export default MenuSearchBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MenuSelectAllButtonsProps {
|
|
3
|
+
groupName?: string;
|
|
4
|
+
handleToggleAllItems: ({ groupName, clear }: {
|
|
5
|
+
groupName?: string;
|
|
6
|
+
clear?: boolean;
|
|
7
|
+
}) => void;
|
|
8
|
+
hasSelectedItems: boolean;
|
|
9
|
+
isGrouped: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const MenuSelectAllButtons: ({ groupName, handleToggleAllItems, hasSelectedItems, isGrouped, }: MenuSelectAllButtonsProps) => JSX.Element;
|
|
12
|
+
export default MenuSelectAllButtons;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './menu.component';
|
|
2
|
+
export * from './menu.context';
|
|
3
|
+
export * from './menu.config';
|
|
4
|
+
export * from './Components/MenuButton/menuButton.component';
|
|
5
|
+
export * from './Components/MenuContainer/menuContainer.component';
|
|
6
|
+
export * from './Components/MenuItem/menuItem.component';
|
|
7
|
+
export * from './Components/MenuList/menuList.component';
|
|
8
|
+
export * from './Components/MenuOptionGroup/menuOptionGroup.component';
|
|
9
|
+
export { MenuItemOption, MenuDivider, MenuGroup } from '@chakra-ui/react';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { MenuProps as CMenuProps } from '@chakra-ui/react';
|
|
3
|
+
import { MenuContainerProps } from './Components/MenuContainer/menuContainer.component';
|
|
4
|
+
import { MenuButtonProps } from './Components/MenuButton/menuButton.component';
|
|
5
|
+
import { MenuItemProps } from './Components/MenuItem/menuItem.component';
|
|
6
|
+
import { MenuListProps } from './Components/MenuList/menuList.component';
|
|
7
|
+
export interface MenuProps extends Omit<CMenuProps, 'children'> {
|
|
8
|
+
buttonConfig?: MenuButtonProps;
|
|
9
|
+
containerConfig?: MenuContainerProps;
|
|
10
|
+
CustomTriggerElement?: FunctionComponent;
|
|
11
|
+
listConfig?: MenuListProps;
|
|
12
|
+
menuItems: MenuItemProps[];
|
|
13
|
+
onMenuClose?: (value: (string | undefined)[]) => void;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const BetaMenu: ({ buttonConfig, containerConfig, CustomTriggerElement, listConfig, menuItems, onMenuClose, ...props }: MenuProps) => JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentStyleConfig } from '@chakra-ui/react';
|
|
2
|
+
export declare const MenuItemConfig: {
|
|
3
|
+
color: string;
|
|
4
|
+
cursor: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
px: string;
|
|
7
|
+
py: string;
|
|
8
|
+
outline: number;
|
|
9
|
+
transitionDuration: string;
|
|
10
|
+
transitionProperty: string;
|
|
11
|
+
transitionTimingFunction: string;
|
|
12
|
+
_hover: {
|
|
13
|
+
bg: string;
|
|
14
|
+
};
|
|
15
|
+
_focus: {
|
|
16
|
+
bg: string;
|
|
17
|
+
};
|
|
18
|
+
_active: {
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
_expanded: {
|
|
22
|
+
bg: string;
|
|
23
|
+
};
|
|
24
|
+
_disabled: {
|
|
25
|
+
opacity: number;
|
|
26
|
+
cursor: string;
|
|
27
|
+
bg: string;
|
|
28
|
+
color: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const MenuConfig: ComponentStyleConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactNode, Dispatch, SetStateAction, MutableRefObject } from 'react';
|
|
2
|
+
import { MenuItemProps } from './Components/MenuItem/menuItem.component';
|
|
3
|
+
export interface IMenuContext {
|
|
4
|
+
allMenuItems?: MenuItemProps[];
|
|
5
|
+
filteredMenuItems?: MenuItemProps[];
|
|
6
|
+
focusedItemIndex: number;
|
|
7
|
+
groups: (string | undefined)[] | null;
|
|
8
|
+
menuItemRefs?: MutableRefObject<HTMLDivElement[] | null[]>;
|
|
9
|
+
handleOnClose: (value: (string | undefined)[]) => void;
|
|
10
|
+
searchInputRef?: MutableRefObject<HTMLInputElement | null>;
|
|
11
|
+
setFilteredMenuItems: Dispatch<SetStateAction<MenuItemProps[]>>;
|
|
12
|
+
setFocusedItemIndex: Dispatch<SetStateAction<number>>;
|
|
13
|
+
setGroups: Dispatch<SetStateAction<(string | undefined)[] | null>>;
|
|
14
|
+
}
|
|
15
|
+
export declare const MenuContext: React.Context<IMenuContext>;
|
|
16
|
+
export declare const useMenuContext: () => IMenuContext;
|
|
17
|
+
declare const MenuProvider: ({ menuItems, onMenuClose, children, }: {
|
|
18
|
+
menuItems?: MenuItemProps[] | undefined;
|
|
19
|
+
onMenuClose?: ((value: (string | undefined)[]) => void) | undefined;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}) => JSX.Element;
|
|
22
|
+
export default MenuProvider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IRatingDotProps {
|
|
3
|
+
number: number;
|
|
4
|
+
isInteractive?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
onClick?: (value: number) => void;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const RatingDot: ({ number, isInteractive, isDisabled, onClick, selected }: IRatingDotProps) => JSX.Element;
|