@televet/kibble-ui 1.3.2-release.1 → 1.4.0-beta.3tvjp7e.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/Forms/Textarea/index.d.ts +1 -0
- package/build/components/Forms/Textarea/textarea.component.d.ts +3 -5
- package/build/components/Forms/index.d.ts +0 -4
- package/build/components/Overlay/Menu/Components/menuButton.component.d.ts +13 -0
- package/build/components/Overlay/Menu/Components/menuContainer.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuDivider.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuGroup.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuItem.component.d.ts +18 -0
- package/build/components/Overlay/Menu/Components/menuItemOption.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuList.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuOptionGroup.component.d.ts +4 -0
- package/build/components/Overlay/Menu/Components/menuSearchBar.component.d.ts +11 -0
- package/build/components/Overlay/Menu/Components/menuSelectAllButtons.component.d.ts +12 -0
- package/build/components/Overlay/Menu/index.d.ts +10 -1
- package/build/components/Overlay/Menu/menu.component.d.ts +21 -0
- package/build/components/Overlay/Menu/menu.config.d.ts +30 -0
- package/build/components/Overlay/index.d.ts +1 -0
- package/build/components/index.d.ts +0 -1
- package/build/index.js +96 -2377
- package/build/index.js.map +1 -1
- package/build/theme/theme.types.d.ts +2 -4
- package/package.json +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { TextareaProps as CTextareaProps } from '@chakra-ui/react';
|
|
3
|
-
|
|
4
|
-
export interface TextareaProps extends WithFormControlProps, CTextareaProps {
|
|
3
|
+
export interface TextareaProps extends CTextareaProps {
|
|
5
4
|
}
|
|
6
|
-
declare const
|
|
7
|
-
export { WrappedTextArea as Textarea };
|
|
5
|
+
export declare const Textarea: (props: TextareaProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconName } from '../../..';
|
|
3
|
+
import { MenuButtonProps as CMenuButtonProps } from '@chakra-ui/react';
|
|
4
|
+
import { ButtonVariantType, ButtonSizeType } from 'components/Forms';
|
|
5
|
+
interface MenuButtonProps extends CMenuButtonProps {
|
|
6
|
+
rightIconName?: IconName;
|
|
7
|
+
buttonText?: string;
|
|
8
|
+
buttonSize?: ButtonSizeType;
|
|
9
|
+
buttonIconName?: IconName;
|
|
10
|
+
variant?: ButtonVariantType;
|
|
11
|
+
}
|
|
12
|
+
declare const MenuButton: ({ rightIconName, variant, buttonSize, buttonText, buttonIconName, ...rest }: MenuButtonProps) => JSX.Element;
|
|
13
|
+
export default MenuButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode, MutableRefObject, KeyboardEvent } from 'react';
|
|
2
|
+
import { BoxProps } from '@chakra-ui/react';
|
|
3
|
+
export interface MenuItemProps extends BoxProps {
|
|
4
|
+
canSelectAll?: boolean;
|
|
5
|
+
closeOnSelect?: boolean;
|
|
6
|
+
groupLabel?: string;
|
|
7
|
+
handleKeyboardNavigation?: (e: KeyboardEvent<HTMLDivElement>, elementIsInputField: boolean) => void;
|
|
8
|
+
isMultiSelect?: boolean;
|
|
9
|
+
isSelected?: boolean;
|
|
10
|
+
itemIndex?: string;
|
|
11
|
+
label: string;
|
|
12
|
+
leftElement?: ReactNode;
|
|
13
|
+
menuItemRefs?: MutableRefObject<HTMLDivElement[] | null[]>;
|
|
14
|
+
onSelectItem?: (selectedValue: string) => void;
|
|
15
|
+
value?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const MenuItem: ({ canSelectAll, closeOnSelect, handleKeyboardNavigation, isMultiSelect, isSelected, itemIndex, label, leftElement, menuItemRefs, onSelectItem, value, }: MenuItemProps) => JSX.Element;
|
|
18
|
+
export default MenuItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEventHandler, Dispatch, RefObject, SetStateAction, KeyboardEvent } from 'react';
|
|
2
|
+
import { MenuItemProps } from './menuItem.component';
|
|
3
|
+
export interface MenuSearchBarProps {
|
|
4
|
+
handleKeyboardNavigation: (e: KeyboardEvent<HTMLInputElement>, elementIsInputField: boolean) => void;
|
|
5
|
+
menuItems: MenuItemProps[];
|
|
6
|
+
onSearchCallback?: (e: ChangeEventHandler) => void;
|
|
7
|
+
searchInputRef: RefObject<HTMLInputElement>;
|
|
8
|
+
setFilteredMenuItems: Dispatch<SetStateAction<MenuItemProps[]>>;
|
|
9
|
+
}
|
|
10
|
+
declare const MenuSearchBar: ({ handleKeyboardNavigation, menuItems, onSearchCallback, searchInputRef, setFilteredMenuItems, }: MenuSearchBarProps) => JSX.Element;
|
|
11
|
+
export default MenuSearchBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MenuSelectAllButtonsProps {
|
|
3
|
+
handleToggleAllItems: ({ groupName, clear }: {
|
|
4
|
+
groupName?: string;
|
|
5
|
+
clear?: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
hasSelectedItems: boolean;
|
|
8
|
+
isGrouped: boolean;
|
|
9
|
+
groupName?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const MenuSelectAllButtons: ({ handleToggleAllItems, hasSelectedItems, isGrouped, groupName, }: MenuSelectAllButtonsProps) => JSX.Element;
|
|
12
|
+
export default MenuSelectAllButtons;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './menu.component';
|
|
2
|
+
export * from './menu.config';
|
|
3
|
+
export * from './Components/menuButton.component';
|
|
4
|
+
export * from './Components/menuContainer.component';
|
|
5
|
+
export * from './Components/menuDivider.component';
|
|
6
|
+
export * from './Components/menuGroup.component';
|
|
7
|
+
export * from './Components/menuItem.component';
|
|
8
|
+
export * from './Components/menuItemOption.component';
|
|
9
|
+
export * from './Components/menuList.component';
|
|
10
|
+
export * from './Components/menuOptionGroup.component';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from './Components/menuItem.component';
|
|
3
|
+
import { MenuProps as CMenuProps } from '@chakra-ui/react';
|
|
4
|
+
import { IconName, ButtonVariantType, ButtonSizeType } from '../../..';
|
|
5
|
+
export interface MenuProps extends CMenuProps {
|
|
6
|
+
buttonIconName?: IconName;
|
|
7
|
+
buttonSize?: ButtonSizeType;
|
|
8
|
+
buttonText?: string;
|
|
9
|
+
buttonVariant?: ButtonVariantType;
|
|
10
|
+
canSelectAll?: boolean;
|
|
11
|
+
isGrouped?: boolean;
|
|
12
|
+
isLazy?: boolean;
|
|
13
|
+
isMultiSelect?: boolean;
|
|
14
|
+
isSearchable?: boolean;
|
|
15
|
+
menuItems: MenuItemProps[];
|
|
16
|
+
onCloseCallback: (value: (string | undefined)[]) => void;
|
|
17
|
+
onSelectCallback?: (selectedItem: MenuItemProps[] | MenuItemProps) => void;
|
|
18
|
+
shouldCloseOnSelect?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const Menu: ({ buttonIconName, buttonSize, buttonText, buttonVariant, canSelectAll, isGrouped, isLazy, isMultiSelect, isSearchable, menuItems, onCloseCallback, onSelectCallback, shouldCloseOnSelect, ...props }: MenuProps) => JSX.Element;
|
|
21
|
+
export default Menu;
|
|
@@ -0,0 +1,30 @@
|
|
|
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: string;
|
|
9
|
+
transitionDuration: string;
|
|
10
|
+
transitionProperty: string;
|
|
11
|
+
transitionTimingFunction: string;
|
|
12
|
+
_hover: {
|
|
13
|
+
bg: string;
|
|
14
|
+
};
|
|
15
|
+
_focus: {
|
|
16
|
+
bg: string;
|
|
17
|
+
};
|
|
18
|
+
_active: {
|
|
19
|
+
bg: string;
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
_expanded: {
|
|
23
|
+
bg: string;
|
|
24
|
+
};
|
|
25
|
+
_disabled: {
|
|
26
|
+
opacity: number;
|
|
27
|
+
cursor: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const MenuConfig: ComponentStyleConfig;
|