@televet/kibble-ui 1.12.14 → 1.13.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.
Files changed (24) hide show
  1. package/build/components/Forms/FormControl/formControl.argTypes.d.ts +13 -165
  2. package/build/components/Forms/Select/select.component.d.ts +5 -4
  3. package/build/components/Overlay/Menu/components/MenuButton/menuButton.argTypes.d.ts +9 -0
  4. package/build/components/Overlay/Menu/{Components → components}/MenuButton/menuButton.component.d.ts +2 -2
  5. package/build/components/Overlay/Menu/components/MenuContainer/menuContainer.argTypes.d.ts +14 -0
  6. package/build/components/Overlay/Menu/components/MenuContainer/menuContainer.component.d.ts +9 -0
  7. package/build/components/Overlay/Menu/components/MenuItem/menuItem.argTypes.d.ts +12 -0
  8. package/build/components/Overlay/Menu/{Components → components}/MenuItem/menuItem.component.d.ts +4 -2
  9. package/build/components/Overlay/Menu/components/MenuList/menuList.argTypes.d.ts +16 -0
  10. package/build/components/Overlay/Menu/components/MenuList/menuList.component.d.ts +21 -0
  11. package/build/components/Overlay/Menu/{Components → components}/MenuSearchBar/menuSearchBar.component.d.ts +1 -1
  12. package/build/components/Overlay/Menu/index.d.ts +5 -5
  13. package/build/components/Overlay/Menu/menu.argTypes.d.ts +78 -0
  14. package/build/components/Overlay/Menu/menu.component.d.ts +8 -9
  15. package/build/components/Overlay/Menu/menu.context.d.ts +7 -5
  16. package/build/components/Overlay/Menu/menu.storiesData.d.ts +4 -0
  17. package/build/index.js +111 -85
  18. package/build/index.js.map +1 -1
  19. package/build/utils/stories.d.ts +8 -2
  20. package/package.json +2 -2
  21. package/build/components/Overlay/Menu/Components/MenuContainer/menuContainer.component.d.ts +0 -8
  22. package/build/components/Overlay/Menu/Components/MenuList/menuList.component.d.ts +0 -19
  23. /package/build/components/Overlay/Menu/{Components → components}/MenuOptionGroup/menuOptionGroup.component.d.ts +0 -0
  24. /package/build/components/Overlay/Menu/{Components → components}/MenuSelectAllButtons/menuSelectAllButtons.component.d.ts +0 -0
@@ -1,167 +1,15 @@
1
1
  export declare const formControlArgTypes: {
2
- onChange: {
3
- type: {
4
- required: boolean;
5
- };
6
- table: {
7
- type: {
8
- summary: string;
9
- };
10
- };
11
- description: string;
12
- };
13
- size: {
14
- control: string;
15
- description: string;
16
- options: string[];
17
- table: {
18
- type: {
19
- summary: string;
20
- };
21
- defaultValue: {
22
- summary: string;
23
- };
24
- };
25
- defaultValue: string;
26
- };
27
- label: {
28
- control: string;
29
- type: {
30
- name: string;
31
- };
32
- table: {
33
- type: {
34
- summary: string;
35
- };
36
- };
37
- description: string;
38
- };
39
- helperText: {
40
- control: string;
41
- type: {
42
- name: string;
43
- };
44
- table: {
45
- type: {
46
- summary: string;
47
- };
48
- };
49
- description: string;
50
- };
51
- helperTextAlignment: {
52
- control: string;
53
- options: string[];
54
- defaultValue: string;
55
- type: {
56
- name: string;
57
- };
58
- table: {
59
- type: {
60
- summary: string;
61
- };
62
- defaultValue: {
63
- summary: string;
64
- };
65
- };
66
- description: string;
67
- };
68
- errorText: {
69
- control: string;
70
- type: {
71
- name: string;
72
- };
73
- defaultValue: string;
74
- table: {
75
- type: {
76
- summary: string;
77
- };
78
- defaultValue: {
79
- summary: string;
80
- };
81
- };
82
- description: string;
83
- };
84
- isDisabled: {
85
- type: string;
86
- description: string;
87
- table: {
88
- type: {
89
- summary: string;
90
- };
91
- defaultValue: {
92
- summary: string;
93
- };
94
- };
95
- defaultValue: boolean;
96
- };
97
- isInvalid: {
98
- type: string;
99
- description: string;
100
- table: {
101
- type: {
102
- summary: string;
103
- };
104
- defaultValue: {
105
- summary: string;
106
- };
107
- };
108
- defaultValue: boolean;
109
- };
110
- isReadOnly: {
111
- type: string;
112
- table: {
113
- type: {
114
- summary: string;
115
- };
116
- defaultValue: {
117
- summary: string;
118
- };
119
- };
120
- description: string;
121
- defaultValue: boolean;
122
- };
123
- isRequired: {
124
- type: string;
125
- description: string;
126
- table: {
127
- type: {
128
- summary: string;
129
- };
130
- defaultValue: {
131
- summary: string;
132
- };
133
- };
134
- defaultValue: boolean;
135
- };
136
- autoFocus: {
137
- type: string;
138
- table: {
139
- type: {
140
- summary: string;
141
- };
142
- defaultValue: {
143
- summary: string;
144
- };
145
- };
146
- defaultValue: boolean;
147
- description: string;
148
- };
149
- labelStyle: {
150
- type: string;
151
- description: string;
152
- table: {
153
- type: {
154
- summary: string;
155
- };
156
- };
157
- };
158
- formControlStyle: {
159
- type: string;
160
- description: string;
161
- table: {
162
- type: {
163
- summary: string;
164
- };
165
- };
166
- };
2
+ onChange: any;
3
+ size: any;
4
+ label: any;
5
+ helperText: any;
6
+ helperTextAlignment: any;
7
+ errorText: any;
8
+ isDisabled: any;
9
+ isInvalid: any;
10
+ isReadOnly: any;
11
+ isRequired: any;
12
+ autoFocus: any;
13
+ labelStyle: any;
14
+ formControlStyle: any;
167
15
  };
@@ -1,17 +1,18 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { SelectProps as CSelectProps } from '@chakra-ui/react';
3
3
  import { WithFormControlProps } from '../FormControl/formControl.component';
4
- import { SelectOptionProps } from './select.types';
4
+ import { SelectOptionProps } from 'components/Forms/Select/select.types';
5
5
  export interface SelectProps extends WithFormControlProps, CSelectProps {
6
6
  useBrowserDefaultMenu?: boolean;
7
7
  options: SelectOptionProps[];
8
- listConfig?: {
8
+ listProps?: {
9
9
  isGrouped?: boolean;
10
10
  isSearchable?: boolean;
11
- onSelectOption?: (selectedOption: SelectOptionProps) => void;
12
- onMenuClose?: (selectedOption: (string | undefined)[]) => void;
11
+ onSelect?: (selectedOption: SelectOptionProps) => void;
12
+ onClose?: (selectedOption: (SelectOptionProps | undefined)[]) => void;
13
13
  defaultLeftElement?: ReactNode;
14
14
  };
15
+ shouldTruncateText?: boolean;
15
16
  }
16
17
  declare const WrappedSelect: React.FC<SelectProps>;
17
18
  export { WrappedSelect as Select };
@@ -0,0 +1,9 @@
1
+ export declare const menuButtonArgTypes: {
2
+ leftElement: any;
3
+ leftIconName: any;
4
+ rightIconName: any;
5
+ showRightIcon: any;
6
+ size: any;
7
+ text: any;
8
+ variant: any;
9
+ };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { ButtonVariantType, ButtonSizeType } from '../../../../Forms';
3
- import { IconName } from '../../../../MediaAndIcons';
2
+ import { ButtonVariantType, ButtonSizeType } from 'components/Forms';
3
+ import { IconName } from 'components/MediaAndIcons';
4
4
  import { MenuButtonProps as CMenuButtonProps } from '@chakra-ui/react';
5
5
  export interface MenuButtonProps extends CMenuButtonProps {
6
6
  leftElement?: ReactNode;
@@ -0,0 +1,14 @@
1
+ export declare const menuContainerArgTypes: {
2
+ autoSelect: any;
3
+ closeOnBlur: any;
4
+ defaultIsOpen: any;
5
+ flip: any;
6
+ gutter: any;
7
+ isLazy: any;
8
+ isOpen: any;
9
+ matchWidth: any;
10
+ offset: any;
11
+ onOpen: any;
12
+ onClose: any;
13
+ placement: any;
14
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { MenuProps as CMenuProps } from '@chakra-ui/react';
3
+ import { MenuItemProps } from 'components/Overlay/Menu/components/MenuItem/menuItem.component';
4
+ export interface MenuContainerProps extends Omit<CMenuProps, 'children' | 'onClose'> {
5
+ children?: ReactNode;
6
+ onClose?: (value: (MenuItemProps | undefined)[]) => void;
7
+ }
8
+ declare const MenuContainer: ({ children, onClose, ...rest }: MenuContainerProps) => JSX.Element;
9
+ export default MenuContainer;
@@ -0,0 +1,12 @@
1
+ export declare const menuItemArgTypes: {
2
+ closeOnSelect: any;
3
+ groupLabel: any;
4
+ isDisabled: any;
5
+ isMultiSelect: any;
6
+ isSelected: any;
7
+ label: any;
8
+ leftElement: any;
9
+ itemOnSelect: any;
10
+ value: any;
11
+ shouldTruncateText: any;
12
+ };
@@ -12,8 +12,10 @@ export interface MenuItemProps {
12
12
  label?: string;
13
13
  leftElement?: ReactNode;
14
14
  menuItemRefs?: MutableRefObject<HTMLDivElement[] | null[]>;
15
- onSelectItem?: (selectedValue: string) => void;
15
+ onSelect?: (selectedItem: MenuItemProps) => void;
16
+ shouldRetainSelection?: boolean;
17
+ shouldTruncateText?: boolean;
16
18
  value?: string;
17
19
  }
18
- declare const MenuItem: ({ isMultiSelect, canSelectAll, children, closeOnSelect, groupLabel, handleKeyboardNavigation, isDisabled, isSelected, itemIndex, label, leftElement, menuItemRefs, onSelectItem, value, ...rest }: MenuItemProps) => JSX.Element;
20
+ declare const MenuItem: ({ isMultiSelect, canSelectAll, children, closeOnSelect, groupLabel, handleKeyboardNavigation, isDisabled, isSelected, itemIndex, label, leftElement, menuItemRefs, onSelect, shouldRetainSelection, shouldTruncateText, value, ...rest }: MenuItemProps) => JSX.Element;
19
21
  export default MenuItem;
@@ -0,0 +1,16 @@
1
+ export declare const menuListArgTypes: {
2
+ canSelectAll: any;
3
+ canSelectGroups: any;
4
+ isGrouped: any;
5
+ isMultiSelect: any;
6
+ isSearchable: any;
7
+ maxW: any;
8
+ minW: any;
9
+ maxH: any;
10
+ menuItems: any;
11
+ menuOnSelect: any;
12
+ onSelectAll: any;
13
+ searchPlaceholder: any;
14
+ shouldRetainSelection: any;
15
+ shouldTruncateText: any;
16
+ };
@@ -0,0 +1,21 @@
1
+ import { MenuListProps as CMenuListProps } from '@chakra-ui/react';
2
+ import { MenuItemProps } from 'components/Overlay/Menu/components/MenuItem/menuItem.component';
3
+ export interface MenuListProps extends Omit<CMenuListProps, 'onSelect'> {
4
+ canSelectAll?: boolean;
5
+ canSelectGroups?: boolean;
6
+ isGrouped?: boolean;
7
+ isMultiSelect?: boolean;
8
+ isSearchable?: boolean;
9
+ menuItems?: MenuItemProps[];
10
+ onSelect?: ((selectedItem: MenuItemProps, allSelectedItems?: MenuItemProps[]) => void) | ((selectedItem: MenuItemProps, allSelectedItems?: MenuItemProps[]) => Promise<void>);
11
+ onSelectAll?: ((selectedItems: MenuItemProps[]) => void) | ((selectedItems: MenuItemProps[]) => Promise<void>);
12
+ searchPlaceholder?: string;
13
+ shouldRetainSelection?: boolean;
14
+ minW?: string;
15
+ maxW?: string;
16
+ maxH?: string;
17
+ isMatchWidthSet?: boolean;
18
+ shouldTruncateText?: boolean;
19
+ }
20
+ declare const MenuList: ({ canSelectAll, canSelectGroups, children, isGrouped, isMatchWidthSet, isMultiSelect, isSearchable, menuItems, onSelect, onSelectAll, searchPlaceholder, shouldRetainSelection, shouldTruncateText, minW, maxW, maxH, ...rest }: MenuListProps) => JSX.Element;
21
+ export default MenuList;
@@ -1,5 +1,5 @@
1
1
  import { ChangeEventHandler, Dispatch, SetStateAction, KeyboardEvent, MutableRefObject } from 'react';
2
- import { MenuItemProps } from '../MenuItem/menuItem.component';
2
+ import { MenuItemProps } from 'components/Overlay/Menu/components/MenuItem/menuItem.component';
3
3
  export interface MenuSearchBarProps {
4
4
  handleKeyboardNavigation: (e: KeyboardEvent<HTMLInputElement>, elementIsInputField: boolean) => void;
5
5
  menuItems: MenuItemProps[];
@@ -1,9 +1,9 @@
1
1
  export * from './menu.component';
2
2
  export * from './menu.context';
3
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';
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
9
  export { MenuItemOption, MenuDivider, MenuGroup } from '@chakra-ui/react';
@@ -0,0 +1,78 @@
1
+ export declare const menuArgTypes: {
2
+ closeOnSelect: any;
3
+ groupLabel: any;
4
+ isDisabled: any;
5
+ isMultiSelect: any;
6
+ isSelected: any;
7
+ label: any;
8
+ leftElement: any;
9
+ itemOnSelect: any;
10
+ value: any;
11
+ shouldTruncateText: any;
12
+ canSelectAll: any;
13
+ canSelectGroups: any;
14
+ isGrouped: any;
15
+ isSearchable: any;
16
+ maxW: any;
17
+ minW: any;
18
+ maxH: any;
19
+ menuItems: any;
20
+ menuOnSelect: any;
21
+ onSelectAll: any;
22
+ searchPlaceholder: any;
23
+ shouldRetainSelection: any;
24
+ autoSelect: any;
25
+ closeOnBlur: any;
26
+ defaultIsOpen: any;
27
+ flip: any;
28
+ gutter: any;
29
+ isLazy: any;
30
+ isOpen: any;
31
+ matchWidth: any;
32
+ offset: any;
33
+ onOpen: any;
34
+ onClose: any;
35
+ placement: any;
36
+ leftIconName: any;
37
+ rightIconName: any;
38
+ showRightIcon: any;
39
+ size: any;
40
+ text: any;
41
+ variant: any;
42
+ buttonProps: {
43
+ control: {
44
+ type: string;
45
+ };
46
+ table: {
47
+ summary: {
48
+ variant: string;
49
+ size: string;
50
+ };
51
+ };
52
+ description: string;
53
+ };
54
+ listProps: {
55
+ control: {
56
+ type: string;
57
+ };
58
+ table: {
59
+ summary: {
60
+ variant: string;
61
+ size: string;
62
+ };
63
+ };
64
+ description: string;
65
+ };
66
+ containerProps: {
67
+ control: {
68
+ type: string;
69
+ };
70
+ table: {
71
+ summary: {
72
+ variant: string;
73
+ size: string;
74
+ };
75
+ };
76
+ description: string;
77
+ };
78
+ };
@@ -1,14 +1,13 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
2
  import { MenuProps as CMenuProps } from '@chakra-ui/react';
3
- import { MenuButtonProps } from './Components/MenuButton/menuButton.component';
4
- import { MenuItemProps } from './Components/MenuItem/menuItem.component';
5
- import { MenuListProps } from './Components/MenuList/menuList.component';
6
- export interface MenuProps extends Omit<CMenuProps, 'children'> {
7
- buttonConfig?: MenuButtonProps;
3
+ import { MenuContainerProps } from 'components/Overlay/Menu/components/MenuContainer/menuContainer.component';
4
+ import { MenuButtonProps } from 'components/Overlay/Menu/components/MenuButton/menuButton.component';
5
+ import { MenuListProps } from 'components/Overlay/Menu/components/MenuList/menuList.component';
6
+ export interface MenuProps extends Omit<CMenuProps, 'children' | 'onClose'> {
7
+ buttonProps?: MenuButtonProps;
8
8
  CustomTriggerElement?: FunctionComponent;
9
- listConfig?: MenuListProps;
10
- menuItems: MenuItemProps[];
11
- onMenuClose?: (value: (string | undefined)[]) => void;
9
+ listProps?: MenuListProps;
10
+ containerProps?: MenuContainerProps;
12
11
  children?: ReactNode;
13
12
  }
14
- export declare const BetaMenu: ({ buttonConfig, CustomTriggerElement, listConfig, menuItems, onMenuClose, isLazy, ...props }: MenuProps) => JSX.Element;
13
+ export declare const BetaMenu: ({ buttonProps, CustomTriggerElement, listProps, containerProps, ...props }: MenuProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode, Dispatch, SetStateAction, MutableRefObject } from 'react';
2
- import { MenuItemProps } from './Components/MenuItem/menuItem.component';
2
+ import { MenuItemProps } from 'components/Overlay/Menu/components/MenuItem/menuItem.component';
3
3
  export interface IMenuContext {
4
4
  allMenuItems?: MenuItemProps[];
5
5
  filteredMenuItems?: MenuItemProps[];
@@ -14,9 +14,11 @@ export interface IMenuContext {
14
14
  }
15
15
  export declare const MenuContext: React.Context<IMenuContext>;
16
16
  export declare const useMenuContext: () => IMenuContext;
17
- declare const MenuProvider: ({ menuItems, onMenuClose, children, }: {
18
- menuItems?: MenuItemProps[] | undefined;
19
- onMenuClose?: ((value: (string | undefined)[]) => void) | undefined;
17
+ export interface MenuProviderProps {
18
+ menuItems?: MenuItemProps[];
19
+ onClose?: (value: (MenuItemProps | undefined)[]) => void;
20
+ isMultiSelect?: boolean;
20
21
  children?: ReactNode;
21
- }) => JSX.Element;
22
+ }
23
+ declare const MenuProvider: ({ menuItems, onClose, children }: MenuProviderProps) => JSX.Element;
22
24
  export default MenuProvider;
@@ -0,0 +1,4 @@
1
+ import { MenuItemProps } from 'components/Overlay/Menu/components/MenuItem/menuItem.component';
2
+ import { MenuProps } from 'components/Overlay/Menu/menu.component';
3
+ export declare const basicMenuData: MenuItemProps[];
4
+ export declare const defaultParams: Partial<MenuProps>;