chop-logic-components 4.1.0 → 4.1.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 (159) hide show
  1. package/README.md +11 -0
  2. package/dist/components/atoms/button/Button.d.ts +7 -0
  3. package/dist/components/atoms/button/icon-button/IconButton.d.ts +3 -0
  4. package/dist/components/atoms/button/inner-button/InnerButton.d.ts +3 -0
  5. package/dist/components/atoms/button/primary-button/PrimaryButton.d.ts +3 -0
  6. package/dist/components/atoms/button/secondary-button/SecondaryButton.d.ts +3 -0
  7. package/dist/components/atoms/editable-text/EditView.d.ts +14 -0
  8. package/dist/components/atoms/editable-text/EditableText.d.ts +4 -0
  9. package/dist/components/atoms/editable-text/ReadView.d.ts +10 -0
  10. package/dist/components/atoms/editable-text/useEditModeState.d.ts +6 -0
  11. package/dist/components/atoms/editable-text/useInputFocus.d.ts +2 -0
  12. package/dist/components/atoms/editable-text/useValueState.d.ts +6 -0
  13. package/dist/components/atoms/error-message/ErrorMessage.d.ts +10 -0
  14. package/dist/components/atoms/header/Header.d.ts +4 -0
  15. package/dist/components/atoms/icon/Icon.d.ts +11 -0
  16. package/dist/components/atoms/image/BasicImage.d.ts +13 -0
  17. package/dist/components/atoms/image/FallBackImage.d.ts +2 -0
  18. package/dist/components/atoms/image/Image.d.ts +6 -0
  19. package/dist/components/atoms/image/ResponsivePicture.d.ts +15 -0
  20. package/dist/components/atoms/index.d.ts +11 -0
  21. package/dist/components/atoms/input/Input.d.ts +5 -0
  22. package/dist/components/atoms/label/Label.d.ts +16 -0
  23. package/dist/components/atoms/link/Link.d.ts +4 -0
  24. package/dist/components/atoms/portal/Portal.d.ts +5 -0
  25. package/dist/components/atoms/tooltip/Tooltip.controller.d.ts +19 -0
  26. package/dist/components/atoms/tooltip/Tooltip.d.ts +4 -0
  27. package/dist/components/contexts/form/FormContext.d.ts +7 -0
  28. package/dist/components/contexts/index.d.ts +4 -0
  29. package/dist/components/contexts/theme/ThemeContext.d.ts +8 -0
  30. package/dist/components/contexts/theme/ThemeProvider.d.ts +8 -0
  31. package/dist/components/hocs/index.d.ts +3 -0
  32. package/dist/components/hocs/with-error-boundary/with-error-boundary.d.ts +6 -0
  33. package/dist/components/hocs/with-figure-caption/with-figure-caption.d.ts +6 -0
  34. package/dist/components/hocs/with-tooltip/with-tooltip.d.ts +7 -0
  35. package/dist/components/molecules/accordion/Accordion.d.ts +4 -0
  36. package/dist/components/molecules/accordion/AccordionItem.d.ts +3 -0
  37. package/dist/components/molecules/alert/Alert.d.ts +4 -0
  38. package/dist/components/molecules/alert/Alert.helpers.d.ts +3 -0
  39. package/dist/components/molecules/alert/AlertProgressBar.d.ts +4 -0
  40. package/dist/components/molecules/breadcrumbs/BreadcrumbItem.d.ts +7 -0
  41. package/dist/components/molecules/breadcrumbs/BreadcrumbList.d.ts +6 -0
  42. package/dist/components/molecules/breadcrumbs/Breadcrumbs.d.ts +4 -0
  43. package/dist/components/molecules/checkbox/Checkbox.controller.d.ts +9 -0
  44. package/dist/components/molecules/checkbox/Checkbox.d.ts +9 -0
  45. package/dist/components/molecules/checkbox/Checkbox.helpers.d.ts +6 -0
  46. package/dist/components/molecules/checkbox/CheckboxStateful.d.ts +4 -0
  47. package/dist/components/molecules/checkbox/CheckboxStateless.d.ts +4 -0
  48. package/dist/components/molecules/index.d.ts +10 -0
  49. package/dist/components/molecules/multi-select/MultiSelect.Combobox.d.ts +15 -0
  50. package/dist/components/molecules/multi-select/MultiSelect.Dropdown.d.ts +11 -0
  51. package/dist/components/molecules/multi-select/MultiSelect.controller.d.ts +13 -0
  52. package/dist/components/molecules/multi-select/MultiSelect.d.ts +4 -0
  53. package/dist/components/molecules/multi-select/MultiSelect.helpers.d.ts +9 -0
  54. package/dist/components/molecules/multi-select/MultiSelectComboboxSelectedValues.d.ts +8 -0
  55. package/dist/components/molecules/multi-select/Option.d.ts +8 -0
  56. package/dist/components/molecules/numeric-input/NumericInput.controller.d.ts +22 -0
  57. package/dist/components/molecules/numeric-input/NumericInput.d.ts +9 -0
  58. package/dist/components/molecules/numeric-input/NumericInput.helpers.d.ts +13 -0
  59. package/dist/components/molecules/numeric-input/NumericInputStateful.d.ts +4 -0
  60. package/dist/components/molecules/numeric-input/NumericInputStateless.d.ts +4 -0
  61. package/dist/components/molecules/search/Search.controller.d.ts +12 -0
  62. package/dist/components/molecules/search/Search.d.ts +4 -0
  63. package/dist/components/molecules/select/Select.controller.d.ts +14 -0
  64. package/dist/components/molecules/select/Select.d.ts +4 -0
  65. package/dist/components/molecules/select/Select.helpers.d.ts +7 -0
  66. package/dist/components/molecules/select/combobox/Combobox.d.ts +15 -0
  67. package/dist/components/molecules/select/dropdown/Dropdown.d.ts +14 -0
  68. package/dist/components/molecules/select/option/Option.d.ts +10 -0
  69. package/dist/components/molecules/switch/Switch.controller.d.ts +10 -0
  70. package/dist/components/molecules/switch/Switch.d.ts +4 -0
  71. package/dist/components/molecules/switch/Switch.helpers.d.ts +6 -0
  72. package/dist/components/molecules/text-input/TextInput.controller.d.ts +17 -0
  73. package/dist/components/molecules/text-input/TextInput.d.ts +9 -0
  74. package/dist/components/molecules/text-input/TextInput.helpers.d.ts +11 -0
  75. package/dist/components/molecules/text-input/TextInputButtons.d.ts +11 -0
  76. package/dist/components/molecules/text-input/TextInputStateful.d.ts +4 -0
  77. package/dist/components/molecules/text-input/TextInputStateless.d.ts +4 -0
  78. package/dist/components/organisms/dialog/Dialog.d.ts +4 -0
  79. package/dist/components/organisms/form/Form.controller.d.ts +14 -0
  80. package/dist/components/organisms/form/Form.d.ts +4 -0
  81. package/dist/components/organisms/form/Form.helpers.d.ts +4 -0
  82. package/dist/components/organisms/grid/Grid.controller.d.ts +15 -0
  83. package/dist/components/organisms/grid/Grid.d.ts +4 -0
  84. package/dist/components/organisms/grid/Grid.helpers.d.ts +6 -0
  85. package/dist/components/organisms/grid/body/GridBody.d.ts +13 -0
  86. package/dist/components/organisms/grid/checkbox/GridCheckbox.d.ts +6 -0
  87. package/dist/components/organisms/grid/column-group/GridColumnGroup.d.ts +6 -0
  88. package/dist/components/organisms/grid/data-cell/GridDataCell.d.ts +4 -0
  89. package/dist/components/organisms/grid/grid-row/GridRow.d.ts +13 -0
  90. package/dist/components/organisms/grid/head/GridHead.d.ts +13 -0
  91. package/dist/components/organisms/grid/header-cell/HeaderCell.d.ts +5 -0
  92. package/dist/components/organisms/grid/select-all-grid-rows-cell/SelectAllGridRowsCell.d.ts +10 -0
  93. package/dist/components/organisms/grid/select-grid-row-cell/SelectGridRowCell.d.ts +10 -0
  94. package/dist/components/organisms/index.d.ts +5 -0
  95. package/dist/components/organisms/menu/Menu.d.ts +4 -0
  96. package/dist/components/organisms/menu/leaf/MenuLeaf.d.ts +5 -0
  97. package/dist/components/organisms/menu/list-item/MenuListItem.d.ts +10 -0
  98. package/dist/components/organisms/menu/sub-menu/SubMenu.d.ts +14 -0
  99. package/dist/components/organisms/tabs/Tabs.d.ts +4 -0
  100. package/dist/components/organisms/tabs/button/TabButton.d.ts +18 -0
  101. package/dist/components/organisms/tabs/content/TabContent.d.ts +8 -0
  102. package/dist/components/organisms/tabs/edit-input/TabEditInput.d.ts +14 -0
  103. package/dist/components/organisms/tabs/list/TabList.d.ts +19 -0
  104. package/dist/enums/alert-mode.d.ts +7 -0
  105. package/dist/enums/button-view.d.ts +6 -0
  106. package/dist/enums/element-size.d.ts +8 -0
  107. package/dist/enums/icon-name.d.ts +284 -0
  108. package/dist/enums/index.d.ts +8 -0
  109. package/dist/enums/loader-view.d.ts +11 -0
  110. package/dist/enums/orientation-mode.d.ts +4 -0
  111. package/dist/enums/semantic-color.d.ts +7 -0
  112. package/dist/enums/tooltip-container.d.ts +7 -0
  113. package/dist/hooks/index.d.ts +15 -0
  114. package/dist/hooks/use-auto-close/use-auto-close.d.ts +6 -0
  115. package/dist/hooks/use-click-outside/use-click-outside.d.ts +8 -0
  116. package/dist/hooks/use-container-dimensions/use-container-dimensions.d.ts +8 -0
  117. package/dist/hooks/use-debounce/use-debounce.d.ts +1 -0
  118. package/dist/hooks/use-element-ids/use-element-ids.d.ts +5 -0
  119. package/dist/hooks/use-is-hovered/use-is-hovered.d.ts +2 -0
  120. package/dist/hooks/use-is-mounted/use-is-mounted.d.ts +1 -0
  121. package/dist/hooks/use-is-overflow/use-is-overflow.d.ts +6 -0
  122. package/dist/hooks/use-key-press/use-key-press.d.ts +8 -0
  123. package/dist/hooks/use-modal-focus-trap/use-modal-focus-trap.d.ts +7 -0
  124. package/dist/hooks/use-remaining-timer/use-remaining-timer.d.ts +9 -0
  125. package/dist/hooks/use-reset-form-input/use-reset-form-input.d.ts +1 -0
  126. package/dist/hooks/use-theme/use-theme.d.ts +4 -0
  127. package/dist/hooks/use-tooltip-position/use-tooltip-position.d.ts +12 -0
  128. package/dist/hooks/use-window-dimensions/use-window-dimensions.d.ts +2 -0
  129. package/dist/index.d.ts +2 -924
  130. package/dist/main.d.ts +8 -0
  131. package/dist/types/_common.d.ts +35 -0
  132. package/dist/types/accordion.d.ts +8 -0
  133. package/dist/types/alert.d.ts +11 -0
  134. package/dist/types/breadcrumbs.d.ts +10 -0
  135. package/dist/types/button.d.ts +11 -0
  136. package/dist/types/checkbox.d.ts +9 -0
  137. package/dist/types/dialog.d.ts +9 -0
  138. package/dist/types/editable-text.d.ts +12 -0
  139. package/dist/types/form.d.ts +18 -0
  140. package/dist/types/grid.d.ts +27 -0
  141. package/dist/types/header.d.ts +9 -0
  142. package/dist/types/image.d.ts +21 -0
  143. package/dist/types/index.d.ts +23 -0
  144. package/dist/types/link.d.ts +9 -0
  145. package/dist/types/loader.d.ts +6 -0
  146. package/dist/types/menu.d.ts +17 -0
  147. package/dist/types/multi-select.d.ts +7 -0
  148. package/dist/types/numeric.d.ts +19 -0
  149. package/dist/types/search.d.ts +16 -0
  150. package/dist/types/select.d.ts +7 -0
  151. package/dist/types/switch.d.ts +13 -0
  152. package/dist/types/tabs.d.ts +23 -0
  153. package/dist/types/text.d.ts +17 -0
  154. package/dist/types/tooltip.d.ts +11 -0
  155. package/dist/utils/get-class-name.d.ts +5 -0
  156. package/dist/utils/handle-dropdown-list-key-press.d.ts +7 -0
  157. package/dist/utils/index.d.ts +3 -0
  158. package/dist/utils/move-focus-on-element-by-id.d.ts +1 -0
  159. package/package.json +17 -13
@@ -0,0 +1,7 @@
1
+ import { FormValues, SelectValue } from '../../../types';
2
+ export declare function getSelectInitialValue({ name, options, initialValues, defaultValue, }: {
3
+ name: string;
4
+ options: SelectValue[];
5
+ initialValues?: FormValues;
6
+ defaultValue?: string | number | readonly string[];
7
+ }): SelectValue | undefined;
@@ -0,0 +1,15 @@
1
+ import { SelectValue } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ opened: boolean;
5
+ disabled: boolean;
6
+ required: boolean;
7
+ onClick: () => void;
8
+ comboboxId: string;
9
+ dropdownId: string;
10
+ selected?: SelectValue;
11
+ placeholder?: string;
12
+ name: string;
13
+ };
14
+ export declare const SelectCombobox: FC<Props>;
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { SelectValue } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ options: SelectValue[];
5
+ opened: boolean;
6
+ dropdownId: string;
7
+ comboboxId: string;
8
+ onClose: () => void;
9
+ selected?: SelectValue;
10
+ onSelect: (id: string) => void;
11
+ onClear: () => void;
12
+ };
13
+ export declare const SelectDropdown: FC<Props>;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SelectValue } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ value: SelectValue;
5
+ selected: boolean;
6
+ onSelect: (id: string) => void;
7
+ onClear: () => void;
8
+ };
9
+ export declare const SelectOption: FC<Props>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { KeyboardEvent } from 'react';
2
+ export declare function useSwitchController({ name, defaultChecked, onChange, }: {
3
+ name: string;
4
+ defaultChecked?: boolean;
5
+ onChange?: (checked: boolean) => void;
6
+ }): {
7
+ checked: boolean;
8
+ handleChange: (checked: boolean) => void;
9
+ handleKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
10
+ };
@@ -0,0 +1,4 @@
1
+ import { SwitchProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Switch: FC<SwitchProps>;
4
+ export default Switch;
@@ -0,0 +1,6 @@
1
+ import { FormValues } from '../../../types';
2
+ export declare function getSwitchInitialValue({ defaultChecked, initialValues, name, }: {
3
+ defaultChecked?: boolean;
4
+ initialValues?: FormValues;
5
+ name: string;
6
+ }): boolean;
@@ -0,0 +1,17 @@
1
+ import { ChopLogicRegExpWithFlags, TextInputValidator } from '../../../types';
2
+ import { ChangeEvent, ChangeEventHandler } from 'react';
3
+ export declare function useTextInputController({ name, defaultValue, onChange, onClear, required, validator, }: {
4
+ name: string;
5
+ required: boolean;
6
+ validator?: ChopLogicRegExpWithFlags | TextInputValidator;
7
+ defaultValue?: string | number | readonly string[];
8
+ onChange?: ChangeEventHandler<HTMLInputElement>;
9
+ onClear?: () => void;
10
+ }): {
11
+ value: string;
12
+ valid: boolean;
13
+ passwordShown: boolean;
14
+ handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
15
+ handleClear: () => void;
16
+ togglePassword: () => void;
17
+ };
@@ -0,0 +1,9 @@
1
+ import { TextInputProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ /**
4
+ * TextInput component factory
5
+ * Renders either a stateful or stateless component
6
+ * based on the `stateless` prop.
7
+ */
8
+ declare const TextInput: FC<TextInputProps>;
9
+ export default TextInput;
@@ -0,0 +1,11 @@
1
+ import { ChopLogicRegExpWithFlags, FormValues, TextInputValidator } from '../../../types';
2
+ export declare function validateTextInputValue({ value, required, validator, }: {
3
+ value: string;
4
+ required: boolean;
5
+ validator?: ChopLogicRegExpWithFlags | TextInputValidator;
6
+ }): boolean;
7
+ export declare function getTextInputInitialValue({ name, initialValues, defaultValue, }: {
8
+ name: string;
9
+ initialValues?: FormValues;
10
+ defaultValue?: string | number | readonly string[];
11
+ }): string;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ declare const TextInputButtons: FC<{
3
+ clearable: boolean;
4
+ isPasswordButtonVisible: boolean;
5
+ handleClear: () => void;
6
+ togglePassword: () => void;
7
+ passwordShown: boolean;
8
+ label: string;
9
+ disabled: boolean;
10
+ }>;
11
+ export default TextInputButtons;
@@ -0,0 +1,4 @@
1
+ import { TextInputProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const TextInputStateful: FC<TextInputProps>;
4
+ export default TextInputStateful;
@@ -0,0 +1,4 @@
1
+ import { TextInputProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const TextInputStateless: FC<TextInputProps>;
4
+ export default TextInputStateless;
@@ -0,0 +1,4 @@
1
+ import { DialogProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Dialog: FC<DialogProps>;
4
+ export default Dialog;
@@ -0,0 +1,14 @@
1
+ import { FormInputParams, FormValues } from '../../../types';
2
+ import { FormEvent, FormEventHandler } from 'react';
3
+ export declare function useFormController({ initialValues, onReset, onSubmit, onClickSubmit, }: {
4
+ initialValues?: FormValues;
5
+ onReset?: FormEventHandler<HTMLFormElement>;
6
+ onSubmit?: FormEventHandler<HTMLFormElement>;
7
+ onClickSubmit?: (data: FormValues) => void;
8
+ }): {
9
+ handleInputChange: (params: FormInputParams) => void;
10
+ handleSubmit: (event: FormEvent<HTMLFormElement>) => void;
11
+ handleReset: (event: FormEvent<HTMLFormElement>) => void;
12
+ resetSignal: number;
13
+ valid: boolean;
14
+ };
@@ -0,0 +1,4 @@
1
+ import { FormProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Form: FC<FormProps>;
4
+ export default Form;
@@ -0,0 +1,4 @@
1
+ import { FormInputParams, FormValidationState, FormValues } from '../../../types';
2
+ export declare function getInitialValidationState(data?: FormValues): FormValidationState;
3
+ export declare function updateValidationState(state: FormValidationState, params: FormInputParams): FormValidationState;
4
+ export declare function isFormDataValid(state: FormValidationState): boolean;
@@ -0,0 +1,15 @@
1
+ import { GridItem } from '../../../types';
2
+ export declare const useGridController: ({ data, id, onSelect, }: {
3
+ data: GridItem[];
4
+ id?: string;
5
+ onSelect?: (ids: string[]) => void;
6
+ }) => {
7
+ elementId: string;
8
+ isAllSelected: boolean;
9
+ isAllCheckboxDisabled: boolean;
10
+ selectedIds: string[];
11
+ handleSelectAll: () => void;
12
+ handleDeselectAll: () => void;
13
+ handleSelectRowById: (id: string) => void;
14
+ handleDeselectRowById: (id: string) => void;
15
+ };
@@ -0,0 +1,4 @@
1
+ import { GridProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Grid: FC<GridProps>;
4
+ export default Grid;
@@ -0,0 +1,6 @@
1
+ import { GridColumn, GridItem, GridRowValue, RenderDataItemCallback } from '../../../types';
2
+ export declare function getGridRowValues({ item, columns, renderDataItem, }: {
3
+ item: GridItem;
4
+ columns: GridColumn[];
5
+ renderDataItem?: RenderDataItemCallback;
6
+ }): GridRowValue[];
@@ -0,0 +1,13 @@
1
+ import { GridColumn, GridItem, RenderDataItemCallback } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ data: GridItem[];
5
+ columns: GridColumn[];
6
+ selectedIds: string[];
7
+ selectRowById: (id: string) => void;
8
+ deselectRowById: (id: string) => void;
9
+ renderDataItem?: RenderDataItemCallback;
10
+ selectable: boolean;
11
+ };
12
+ export declare const GridBody: FC<Props>;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ import { FC, InputHTMLAttributes } from 'react';
2
+ type Props = InputHTMLAttributes<HTMLInputElement> & {
3
+ label: string;
4
+ };
5
+ export declare const GridCheckbox: FC<Props>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { GridColumn } from '../../../../types';
2
+ import { FC } from 'react';
3
+ export declare const GridColumnGroup: FC<{
4
+ columns: GridColumn[];
5
+ selectable: boolean;
6
+ }>;
@@ -0,0 +1,4 @@
1
+ import { FC, ReactElement } from 'react';
2
+ export declare const GridDataCell: FC<{
3
+ value: ReactElement | string;
4
+ }>;
@@ -0,0 +1,13 @@
1
+ import { GridRowValue } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ rowId: string;
5
+ selectedIds: string[];
6
+ selectRowById: (id: string) => void;
7
+ deselectRowById: (id: string) => void;
8
+ selectable: boolean;
9
+ values: GridRowValue[];
10
+ disabled?: boolean;
11
+ };
12
+ export declare const GridRow: FC<Props>;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { GridColumn } from '../../../../types';
2
+ import { FC } from 'react';
3
+ type GridHeadProps = {
4
+ columns: GridColumn[];
5
+ gridId: string;
6
+ selectable: boolean;
7
+ isAllSelected: boolean;
8
+ isAllCheckboxDisabled?: boolean;
9
+ selectAll: () => void;
10
+ deselectAll: () => void;
11
+ };
12
+ export declare const GridHead: FC<GridHeadProps>;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ export declare const GridHeaderCell: FC<{
3
+ title?: string;
4
+ component?: React.ReactElement;
5
+ }>;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ gridId: string;
4
+ isAllSelected: boolean;
5
+ selectAll: () => void;
6
+ deselectAll: () => void;
7
+ disabled?: boolean;
8
+ };
9
+ export declare const SelectAllGridRowsCell: FC<Props>;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ rowId: string;
4
+ isRowSelected: boolean;
5
+ selectRowById: (id: string) => void;
6
+ deselectRowById: (id: string) => void;
7
+ disabled?: boolean;
8
+ };
9
+ export declare const SelectGridRowCell: FC<Props>;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ export { default as Dialog } from './dialog/Dialog';
2
+ export { default as Form } from './form/Form';
3
+ export { default as Grid } from './grid/Grid';
4
+ export { default as Menu } from './menu/Menu';
5
+ export { default as Tabs } from './tabs/Tabs';
@@ -0,0 +1,4 @@
1
+ import { MenuProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Menu: FC<MenuProps>;
4
+ export default Menu;
@@ -0,0 +1,5 @@
1
+ import { MenuItem } from '../../../../types';
2
+ import { ReactElement } from 'react';
3
+ export declare const MenuLeaf: ({ item }: {
4
+ item: MenuItem;
5
+ }) => ReactElement;
@@ -0,0 +1,10 @@
1
+ import { OrientationMode } from '../../../../enums';
2
+ import { MenuItem } from '../../../../types';
3
+ import { FC, PropsWithChildren } from 'react';
4
+ type Props = PropsWithChildren & {
5
+ item: MenuItem;
6
+ mode: OrientationMode;
7
+ openedOn?: 'hover' | 'click';
8
+ };
9
+ export declare const MenuListItem: FC<Props>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { OrientationMode } from '../../../../enums';
2
+ import { MenuItem } from '../../../../types';
3
+ import { FC, PropsWithChildren } from 'react';
4
+ type Props = PropsWithChildren & {
5
+ item: MenuItem;
6
+ isSubMenuOpened: boolean;
7
+ mode: OrientationMode;
8
+ toggleSubMenu: () => void;
9
+ closeSubMenu: () => void;
10
+ openSubMenu: () => void;
11
+ openedOn?: 'hover' | 'click';
12
+ };
13
+ export declare const SubMenu: FC<Props>;
14
+ export {};
@@ -0,0 +1,4 @@
1
+ import { TabsProps } from '../../../types';
2
+ import { FC } from 'react';
3
+ declare const Tabs: FC<TabsProps>;
4
+ export default Tabs;
@@ -0,0 +1,18 @@
1
+ import { OrientationMode } from '../../../../enums';
2
+ import { FC } from 'react';
3
+ type Props = {
4
+ title: string;
5
+ tabId: string;
6
+ onTabSelect: (id: string) => void;
7
+ tabPanelId: string;
8
+ isSelected: boolean;
9
+ mode: OrientationMode;
10
+ isDisabled?: boolean;
11
+ stretched?: boolean;
12
+ editable?: boolean;
13
+ onTabTitleChange?: (newTitle: string) => void;
14
+ onTabDelete?: (id: string) => void;
15
+ extendable?: boolean;
16
+ };
17
+ export declare const TabButton: FC<Props>;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ChopLogicTabItem } from '../../../../types';
2
+ import { FC, ReactElement } from 'react';
3
+ export declare const TabContent: FC<{
4
+ tabs: ChopLogicTabItem[];
5
+ selectedTabId: string;
6
+ extendable?: boolean;
7
+ extendedTabContent?: ReactElement;
8
+ }>;
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ type Props = {
3
+ tabId: string;
4
+ isEditMode: boolean;
5
+ editValue: string;
6
+ onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
+ onInputBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
8
+ onInputKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
9
+ onSave: () => void;
10
+ onCancel: () => void;
11
+ cancelButtonId: string;
12
+ };
13
+ export declare const TabEditInput: FC<Props>;
14
+ export {};
@@ -0,0 +1,19 @@
1
+ import { OrientationMode } from '../../../../enums';
2
+ import { ChopLogicTabItem } from '../../../../types';
3
+ import { FC } from 'react';
4
+ type Props = {
5
+ tabs: ChopLogicTabItem[];
6
+ tabIds: string[];
7
+ onTabSelect: (id: string) => void;
8
+ selectedTabId: string;
9
+ tabPanelIds: string[];
10
+ mode: OrientationMode;
11
+ onTabTitleChange?: (tabId: string, newTitle: string) => void;
12
+ stretched?: boolean;
13
+ editable?: boolean;
14
+ extendable?: boolean;
15
+ onTabAdd?: () => void;
16
+ onTabDelete?: (id: string) => void;
17
+ };
18
+ export declare const TabList: FC<Props>;
19
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare enum AlertMode {
2
+ Success = "success",
3
+ Error = "error",
4
+ Warning = "warning",
5
+ Info = "info",
6
+ Help = "help"
7
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ButtonView {
2
+ Primary = "primary",
3
+ Secondary = "secondary",
4
+ Icon = "icon",
5
+ Inner = "inner"
6
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum ElementSize {
2
+ ExtraSmall = "xs",
3
+ Small = "s",
4
+ Medium = "m",
5
+ Large = "l",
6
+ ExtraLarge = "xl",
7
+ ExtraExtraLarge = "2xl"
8
+ }