chop-logic-components 1.0.3 → 1.0.5

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 (41) hide show
  1. package/README.md +71 -26
  2. package/dist/components/containers/form/Form.styled.d.ts +0 -1
  3. package/dist/components/containers/form/types.d.ts +4 -1
  4. package/dist/components/containers/grid/Grid.styled.d.ts +0 -1
  5. package/dist/components/containers/grid/types.d.ts +3 -6
  6. package/dist/components/containers/tabs/types.d.ts +3 -2
  7. package/dist/components/inputs/_common/error-message/ErrorMessage.styled.d.ts +0 -1
  8. package/dist/components/inputs/_common/input-inner-button/InputInnerButton.styled.d.ts +0 -1
  9. package/dist/components/inputs/_common/label/Label.styled.d.ts +0 -1
  10. package/dist/components/inputs/button/types.d.ts +3 -2
  11. package/dist/components/inputs/checkbox/Checkbox.styled.d.ts +0 -1
  12. package/dist/components/inputs/checkbox/controller.d.ts +0 -1
  13. package/dist/components/inputs/checkbox/types.d.ts +5 -4
  14. package/dist/components/inputs/multi-select/MultiSelect.styled.d.ts +0 -1
  15. package/dist/components/inputs/multi-select/types.d.ts +3 -3
  16. package/dist/components/inputs/numeric/NumericInput.styled.d.ts +0 -1
  17. package/dist/components/inputs/numeric/types.d.ts +11 -5
  18. package/dist/components/inputs/select/Select.styled.d.ts +0 -1
  19. package/dist/components/inputs/select/types.d.ts +4 -4
  20. package/dist/components/inputs/text/TextInput.styled.d.ts +0 -1
  21. package/dist/components/inputs/text/types.d.ts +11 -2
  22. package/dist/components/modals/alert/Alert.styled.d.ts +0 -1
  23. package/dist/components/modals/alert/types.d.ts +2 -2
  24. package/dist/components/modals/dialog/Dialog.styled.d.ts +0 -1
  25. package/dist/components/modals/dialog/types.d.ts +2 -1
  26. package/dist/components/modals/tooltip/Tooltip.styled.d.ts +0 -1
  27. package/dist/components/modals/tooltip/controller.d.ts +0 -1
  28. package/dist/components/modals/tooltip/types.d.ts +2 -1
  29. package/dist/constants/style-variables.d.ts +2 -2
  30. package/dist/favicon.ico +0 -0
  31. package/dist/hooks/use-modal-focus-trap/index.d.ts +0 -1
  32. package/dist/hooks/use-tooltip-position/index.d.ts +0 -1
  33. package/dist/index.cjs.js +92 -92
  34. package/dist/index.cjs.js.map +1 -1
  35. package/dist/index.es.js +3026 -3050
  36. package/dist/index.es.js.map +1 -1
  37. package/dist/logo.png +0 -0
  38. package/dist/utils/__tests__/get-initial-color-mode.test.d.ts +1 -0
  39. package/dist/utils/get-initial-color-mode.d.ts +1 -0
  40. package/dist/utils/types.d.ts +13 -0
  41. package/package.json +14 -15
package/README.md CHANGED
@@ -4,48 +4,93 @@ Welcome to **Chop Logic Components**, a comprehensive React components library p
4
4
 
5
5
  ## About the Library
6
6
 
7
- Chop Logic is designed to speed up development by providing reusable, accessible, and highly customizable components. Whether you're building complex forms, creating dynamic layouts, or managing component logic with hooks, Chop Logic has the tools to make it easier.
7
+ Chop Logic is designed to speed up development by providing reusable, accessible, and highly customizable components. Whether you're building complex forms, creating dynamic layouts, or managing component logic with hooks, Chop Logic Components has the tools to make it easier.
8
8
 
9
- ### Why Choose Chop Logic?
9
+ ## Links
10
10
 
11
- Here's what makes Chop Logic an excellent addition to your React project:
11
+ - [Storybook Playground](https://savourygin.github.io/chop-logic-components)
12
+ - [Npm](https://www.npmjs.com/package/chop-logic-components)
12
13
 
13
- - **Styled Components:** All components are styled using a consistent, modern design language and can easily adapt to your project's look and feel. Each component offers a flexible API, making them simple to extend and customize.
14
+ ## Getting Started
14
15
 
15
- - **Custom Hooks:** Simplify your component logic by using the custom hooks provided. From managing form input to handling asynchronous data fetching, Chop Logic's hooks cover common scenarios that developers face daily.
16
+ To get started with Chop Logic, install it via npm or yarn:
16
17
 
17
- - **Built for Reusability:** Every component and hook is designed with reusability in mind, reducing repetitive code and enabling faster development cycles.
18
+ ```bash
19
+ npm install chop-logic-components
20
+ # or
21
+ yarn add chop-logic-components
22
+ ```
18
23
 
19
- - **Ease of Use:** Chop Logic follows best practices in API design, ensuring that components and hooks are easy to learn and work seamlessly with each other.
24
+ ## Scripts
20
25
 
21
- - **Storybook Integration:** This library includes comprehensive Storybook documentation for each component and hook, allowing you to explore usage examples, try props in real-time, and see how each feature behaves in isolation.
26
+ ### `format`
22
27
 
23
- ## Key Features
28
+ Runs [Prettier](https://prettier.io/) to automatically format TypeScript files (`.ts` and `.tsx`) in the project. This script will write changes directly to the files.
24
29
 
25
- ### Components
30
+ ```bash
31
+ npm run format
32
+ ```
26
33
 
27
- Chop Logic includes a wide range of styled components that are ready to use in your projects:
34
+ ### `lint`
28
35
 
29
- - **Inputs:** Beautifully styled input controllers with customization options.
30
- - **Containers:** Easily customizable container elements like text grids, forms, and tabs.
31
- - **Modals:** Flexible modal windows and accessible tooltips, perfect for enhancing user interactions.
32
- - **More Components Coming Soon!**
36
+ Runs ESLint to analyze the TypeScript code for potential errors and enforce coding standards. It automatically fixes issues where possible and uses the .gitignore file to ignore certain paths.
37
+
38
+ ```bash
39
+ npm run lint
40
+ ```
33
41
 
34
- ### Hooks
42
+ ### `check-types`
35
43
 
36
- In addition to UI components, Chop Logic offers a collection of custom hooks to help you manage complex logic:
44
+ Runs the TypeScript compiler (tsc) to perform type checking without generating output files. This script helps ensure that the code adheres to TypeScript's type safety.
37
45
 
38
- - **useModalFocusTrap:** A hook that traps focus within an open modal, ensuring accessibility compliance.
39
- - **useKeyPress:** Easily manage keyboard interactions and trigger actions based on keypress events.
40
- - **useContainerDimensions:** Get the dimensions of any HTML element to dynamically adjust your UI.
41
- - **More Hooks Coming Soon!**
46
+ ```bash
47
+ npm run check-types
48
+ ```
42
49
 
43
- ## Getting Started
50
+ ### `build`
44
51
 
45
- To get started with Chop Logic, install it via npm or yarn:
52
+ Compiles the TypeScript code into JavaScript using the TypeScript compiler (tsc) and then builds the project using Vite.
46
53
 
47
54
  ```bash
48
- npm install chop-logic-components
49
- # or
50
- yarn add chop-logic-components
55
+ npm run build
56
+ ```
57
+
58
+ ### `test`
59
+
60
+ Runs unit tests using Vitest, a fast testing framework designed for Vite projects.
61
+
62
+ ```bash
63
+ npm run test
64
+ ```
65
+
66
+ ### `test:ci`
67
+
68
+ Runs the tests in continuous integration (CI) mode with Vitest, providing a streamlined output suitable for automated environments.
69
+
70
+ ```bash
71
+ npm run test:ci
72
+ ```
73
+
74
+ ### `storybook`
75
+
76
+ Starts a local instance of Storybook for developing UI components. The Storybook interface will be available at http://localhost:6006.
77
+
78
+ ```bash
79
+ npm run storybook
80
+ ```
81
+
82
+ ### `build-storybook`
83
+
84
+ Builds the static version of the Storybook for deployment, outputting the files to the storybook-static directory. The --quiet flag suppresses the build logs.
85
+
86
+ ```bash
87
+ npm run build-storybook
88
+ ```
89
+
90
+ ### `prepare`
91
+
92
+ Runs the build script and then installs Husky hooks for managing Git hooks in the project.
93
+
94
+ ```bash
95
+ npm run prepare
51
96
  ```
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledForm: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, {
3
2
  $columns: number;
4
3
  }>> & string;
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
2
3
 
3
4
  export type ChopLogicFormData = {
4
5
  [key: string]: unknown;
@@ -15,9 +16,11 @@ export type ChopLogicFormContextProps = {
15
16
  initialValues?: ChopLogicFormData;
16
17
  resetSignal?: number;
17
18
  };
18
- export type ChopLogicFormProps = PropsWithChildren & React.HTMLAttributes<HTMLFormElement> & {
19
+ export type ChopLogicFormProps = PropsWithChildren & CommonComponentProps & {
19
20
  columns?: number;
20
21
  initialValues?: ChopLogicFormData;
21
22
  hasReset?: boolean;
22
23
  onClickSubmit?: (data: ChopLogicFormData) => void;
24
+ onReset?: React.FormEventHandler<HTMLFormElement>;
25
+ onSubmit?: React.FormEventHandler<HTMLFormElement>;
23
26
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
3
2
  export declare const StyledGridHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
4
3
  export declare const StyledGridBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, never>> & string;
@@ -1,13 +1,10 @@
1
- /// <reference types="react" />
2
- export type ChopLogicGridProps = {
1
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
2
+
3
+ export type ChopLogicGridProps = CommonComponentProps & {
3
4
  columns: ChopLogicGridColumn[];
4
5
  data: ChopLogicGridItem[];
5
6
  caption?: string;
6
- id?: string;
7
7
  selectable?: boolean;
8
- tabIndex?: number;
9
- className?: string;
10
- style?: React.CSSProperties;
11
8
  renderDataItem?: RenderDataItemCallback;
12
9
  onSelect?: (ids: string[]) => void;
13
10
  };
@@ -1,5 +1,6 @@
1
- /// <reference types="react" />
2
- export type ChopLogicTabsProps = React.HTMLAttributes<HTMLDivElement> & {
1
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
2
+
3
+ export type ChopLogicTabsProps = CommonComponentProps & {
3
4
  tabs: ChopLogicTabItem[];
4
5
  defaultTabId?: string;
5
6
  mode?: ChopLogicTabsMode;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledErrorMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
3
2
  $visible: boolean;
4
3
  }>> & string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledInputInnerButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
3
2
  export declare const StyledLabelText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
3
  export declare const StyledRequiredSign: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -1,12 +1,13 @@
1
1
  import { MouseEventHandler } from 'react';
2
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
2
3
  import { ChopLogicIconName } from '../../../../../../../../../src/components/misc/icon/Icon';
3
4
 
4
5
  export type ChopLogicButtonView = 'primary' | 'secondary' | 'danger' | 'icon';
5
- export type ChopLogicButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
+ export type ChopLogicButtonProps = Partial<CommonInputProps> & {
6
7
  onClick?: MouseEventHandler<HTMLButtonElement> | (() => void);
7
8
  view?: ChopLogicButtonView;
8
- label?: string;
9
9
  icon?: ChopLogicIconName;
10
10
  text?: string;
11
11
  extended?: boolean;
12
+ type?: 'button' | 'reset' | 'submit';
12
13
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledCheckboxWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
2
  $disabled: boolean;
4
3
  }>> & string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare function useChopLogicCheckboxController({ name, defaultChecked, onChange, }: {
3
2
  name: string;
4
3
  defaultChecked?: boolean;
@@ -1,7 +1,8 @@
1
- /// <reference types="react" />
2
- export type ChopLogicCheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
- name: string;
4
- label: string;
1
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
2
+
3
+ export type ChopLogicCheckboxProps = CommonInputProps & {
5
4
  noLabel?: boolean;
6
5
  iconPosition?: 'left' | 'right';
6
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
7
+ defaultChecked?: boolean;
7
8
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledMultiSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
2
  $disabled: boolean;
4
3
  }>> & string;
@@ -1,13 +1,13 @@
1
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
1
2
  import { SelectValue } from '../select/types';
2
3
 
3
4
  export type MultiSelectValue = SelectValue & {
4
5
  selected: boolean;
5
6
  };
6
- export type ChopLogicMultiSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
7
- name: string;
8
- label: string;
7
+ export type ChopLogicMultiSelectProps = CommonInputProps & {
9
8
  options: SelectValue[];
10
9
  onChange?: (values?: SelectValue[]) => void;
10
+ defaultValue?: string | number | readonly string[];
11
11
  placeholder?: string;
12
12
  };
13
13
  export type MultiSelectDropdownProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledNumericInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
2
  export declare const StyledNumericInputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
3
  $disabled: boolean;
@@ -1,11 +1,17 @@
1
- /// <reference types="react" />
1
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
2
+
2
3
  export type NumericValidationFunction = (input?: number) => boolean;
3
- export type ChopLogicNumericInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
4
- name: string;
5
- label: string;
4
+ export type ChopLogicNumericInputProps = CommonInputProps & {
6
5
  errorMessage?: string;
7
6
  validator?: NumericValidationFunction;
8
- onClear?: () => void;
9
7
  hasSpinButtons?: boolean;
8
+ min?: number;
9
+ max?: number;
10
+ step?: number;
11
+ readOnly?: boolean;
12
+ defaultValue?: number;
10
13
  onSpinButtonClick?: (value?: number) => void;
14
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
15
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
16
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
11
17
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
2
  $disabled: boolean;
4
3
  }>> & string;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- export type ChopLogicSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
3
- name: string;
4
- label: string;
1
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
2
+
3
+ export type ChopLogicSelectProps = CommonInputProps & {
5
4
  options: SelectValue[];
6
5
  onChange?: (value?: SelectValue) => void;
7
6
  placeholder?: string;
7
+ defaultValue?: string | number | readonly string[];
8
8
  };
9
9
  export type SelectValue = {
10
10
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledTextInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
2
  export declare const StyledTextInputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
3
  $disabled: boolean;
@@ -1,15 +1,24 @@
1
- /// <reference types="react" />
1
+ import { CommonInputProps } from '../../../../../../../../../src/utils/types';
2
+
2
3
  export type RegExpWithFlags = {
3
4
  regexp: string;
4
5
  flags?: string;
5
6
  };
6
7
  export type TextValidationFunction = (input: string) => boolean;
7
- export type ChopLogicTextInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
8
+ export type ChopLogicTextInputProps = CommonInputProps & {
8
9
  name: string;
9
10
  label: string;
10
11
  errorMessage?: string;
11
12
  clearable?: boolean;
13
+ readOnly?: boolean;
12
14
  onClear?: () => void;
13
15
  type?: 'text' | 'email' | 'password';
14
16
  validator?: RegExpWithFlags | TextValidationFunction;
17
+ maxLength?: number;
18
+ placeholder?: string;
19
+ defaultValue?: string;
20
+ autoComplete?: React.HTMLInputAutoCompleteAttribute;
21
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
22
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
23
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
15
24
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledAlertHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
3
2
  export declare const StyledAlertWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
3
  $isClosing: boolean;
@@ -1,11 +1,11 @@
1
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
1
2
  import { ChopLogicIconName } from '../../../../../../../../../src/components/misc/icon/Icon';
2
3
 
3
4
  export type ChopLogicAlertMode = 'success' | 'error' | 'warning' | 'info' | 'help';
4
- export type ChopLogicAlertProps = React.HTMLAttributes<HTMLDivElement> & {
5
+ export type ChopLogicAlertProps = CommonComponentProps & {
5
6
  isOpened: boolean;
6
7
  onClose: () => void;
7
8
  message: string;
8
- title?: string;
9
9
  mode?: ChopLogicAlertMode;
10
10
  icon?: ChopLogicIconName;
11
11
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledDialogLayout: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
2
  export declare const StyledDialogBackground: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
3
  $isClosing: boolean;
@@ -1,6 +1,7 @@
1
1
  import { PropsWithChildren } from 'react';
2
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
2
3
 
3
- export type ChopLogicDialogProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement> & {
4
+ export type ChopLogicDialogProps = CommonComponentProps & PropsWithChildren & {
4
5
  isOpened: boolean;
5
6
  onClose: () => void;
6
7
  title: string;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const StyledTooltip: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const useChopLogicTooltipController: ({ id }: {
3
2
  id?: string;
4
3
  }) => {
@@ -1,6 +1,7 @@
1
1
  import { PropsWithChildren } from 'react';
2
+ import { CommonComponentProps } from '../../../../../../../../../src/utils/types';
2
3
 
3
- export type ChopLogicTooltipProps = PropsWithChildren & React.HTMLAttributes<HTMLElement> & {
4
+ export type ChopLogicTooltipProps = PropsWithChildren & CommonComponentProps & {
4
5
  tooltipContent: string | React.ReactElement;
5
6
  containerTag?: TooltipContainerTag;
6
7
  visibleOn?: 'hover' | 'click' | 'focus' | 'contextmenu';
@@ -27,8 +27,8 @@ export declare const SHADOWS: Readonly<{
27
27
  inset: "-5px 5px 20px 5px rgba(0, 0, 0, 0.1) inset";
28
28
  }>;
29
29
  export declare const BORDERS: Readonly<{
30
- light: "1px solid #5998c5";
31
- heavy: "1px solid #266dd3";
30
+ thin: "1px solid #5998c5";
31
+ thick: "1px solid #266dd3";
32
32
  accent: "1px solid #e53d00";
33
33
  outline: "2px dashed #e53d00";
34
34
  }>;
Binary file
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ModalFocusTrapParams = {
3
2
  modalRef: React.RefObject<HTMLDivElement>;
4
3
  isOpened: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type useTooltipPositionParams = {
3
2
  wrapperRef: React.RefObject<HTMLSpanElement | HTMLDivElement>;
4
3
  tooltipRef: React.RefObject<HTMLSpanElement | HTMLDivElement>;