chop-logic-components 0.9.0 → 0.10.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.
Files changed (51) hide show
  1. package/dist/components/containers/tabs/Tabs.d.ts +12 -1
  2. package/dist/components/containers/tabs/Tabs.styled.d.ts +1 -1
  3. package/dist/components/containers/tabs/elements/TabButton.d.ts +1 -1
  4. package/dist/components/containers/tabs/elements/TabContent.d.ts +1 -1
  5. package/dist/components/containers/tabs/elements/TabList.d.ts +1 -1
  6. package/dist/components/inputs/button/Button.d.ts +10 -2
  7. package/dist/components/inputs/button/Button.styled.d.ts +1 -1
  8. package/dist/components/inputs/button/__docs__/ButtonExample.d.ts +1 -1
  9. package/dist/components/inputs/multi-select/MultiSelect.d.ts +21 -2
  10. package/dist/components/inputs/multi-select/__docs__/MultiSelectExample.d.ts +1 -1
  11. package/dist/components/inputs/multi-select/elements/Combobox.d.ts +1 -1
  12. package/dist/components/inputs/multi-select/elements/Dropdown.d.ts +1 -1
  13. package/dist/components/inputs/multi-select/elements/Option.d.ts +1 -1
  14. package/dist/components/inputs/numeric/NumericInput.d.ts +11 -0
  15. package/dist/components/inputs/numeric/NumericInput.styled.d.ts +7 -0
  16. package/dist/components/inputs/numeric/__docs__/NumericInput.stories.d.ts +7 -0
  17. package/dist/components/inputs/numeric/__docs__/NumericInputExample.d.ts +5 -0
  18. package/dist/components/inputs/numeric/__tests__/NumericInput.test.d.ts +1 -0
  19. package/dist/components/inputs/select/Select.d.ts +13 -2
  20. package/dist/components/inputs/select/__docs__/SelectExample.d.ts +1 -1
  21. package/dist/components/inputs/select/elements/Combobox.d.ts +1 -1
  22. package/dist/components/inputs/select/elements/Dropdown.d.ts +1 -1
  23. package/dist/components/inputs/select/elements/Option.d.ts +1 -1
  24. package/dist/components/inputs/text/TextInput.d.ts +7 -1
  25. package/dist/components/inputs/text/__docs__/TextInputExample.d.ts +1 -1
  26. package/dist/components/misc/icon/Icon.d.ts +22 -1
  27. package/dist/components/modals/alert/Alert.d.ts +10 -1
  28. package/dist/components/modals/alert/__docs__/Alert.stories.d.ts +1 -1
  29. package/dist/components/modals/alert/elements/Header.d.ts +2 -2
  30. package/dist/components/modals/alert/helpers/get-alert-title.d.ts +1 -1
  31. package/dist/components/modals/alert/helpers/render-alert-icon.d.ts +2 -2
  32. package/dist/components/modals/dialog/Dialog.d.ts +6 -1
  33. package/dist/components/modals/dialog/__docs__/DialogExample.d.ts +1 -1
  34. package/dist/components/modals/tooltip/Tooltip.d.ts +7 -1
  35. package/dist/components/modals/tooltip/__docs__/TooltipExample.d.ts +1 -1
  36. package/dist/constants/style-variables.d.ts +1 -0
  37. package/dist/index.cjs.js +161 -158
  38. package/dist/index.cjs.js.map +1 -1
  39. package/dist/index.es.js +5537 -5533
  40. package/dist/index.es.js.map +1 -1
  41. package/package.json +5 -5
  42. package/dist/__mocks__/select-values.d.ts +0 -5
  43. package/dist/components/containers/tabs/types.d.ts +0 -13
  44. package/dist/components/inputs/button/types.d.ts +0 -11
  45. package/dist/components/inputs/multi-select/types.d.ts +0 -21
  46. package/dist/components/inputs/select/types.d.ts +0 -13
  47. package/dist/components/inputs/text/types.d.ts +0 -8
  48. package/dist/components/misc/icon/types.d.ts +0 -22
  49. package/dist/components/modals/alert/types.d.ts +0 -11
  50. package/dist/components/modals/dialog/types.d.ts +0 -7
  51. package/dist/components/modals/tooltip/types.d.ts +0 -8
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/SavouryGin/chop-logic-components.git"
6
6
  },
7
- "version": "0.9.0",
7
+ "version": "0.10.0",
8
8
  "description": "React UI components library for Chop Logic project",
9
9
  "type": "module",
10
10
  "main": "dist/index.cjs.js",
@@ -23,7 +23,7 @@
23
23
  "coverage": "vitest run --coverage",
24
24
  "storybook": "storybook dev -p 6006",
25
25
  "build-storybook": "storybook build",
26
- "prepare": "npm run build"
26
+ "prepare": "npm run build && husky install"
27
27
  },
28
28
  "lint-staged": {
29
29
  "*.{ts,tsx}": [
@@ -69,17 +69,17 @@
69
69
  "eslint-plugin-react-hooks": "^4.6.2",
70
70
  "eslint-plugin-simple-import-sort": "^12.1.1",
71
71
  "eslint-plugin-storybook": "^0.8.0",
72
- "husky": "^9.0.11",
72
+ "husky-init": "^8.0.0",
73
73
  "jsdom": "^24.0.0",
74
74
  "lint-staged": "^15.2.2",
75
75
  "prettier": "^3.2.5",
76
- "sass": "^1.77.8",
77
76
  "storybook": "^8.2.8",
78
77
  "styled-components": "^6.1.12",
79
78
  "typescript": "^5.4.5",
80
79
  "vite": "^5.2.10",
81
80
  "vite-plugin-dts": "^3.9.0",
82
- "vitest": "^1.5.3"
81
+ "vitest": "^1.5.3",
82
+ "husky": "^8.0.0"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "^18.3.1"
@@ -1,5 +0,0 @@
1
- import { MultiSelectValue } from '../../../../../../../src/components/inputs/multi-select/types';
2
- import { SelectValue } from '../../../../../../../src/components/inputs/select/types';
3
-
4
- export declare const SELECT_LANGUAGES: SelectValue[];
5
- export declare const MULTI_SELECT_VALUES: MultiSelectValue[];
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- export type ChopLogicTabsProps = React.HTMLAttributes<HTMLDivElement> & {
3
- tabs: ChopLogicTabItem[];
4
- defaultTabId?: string;
5
- mode?: ChopLogicTabsMode;
6
- };
7
- export type ChopLogicTabItem = {
8
- content: React.ReactElement;
9
- title: string;
10
- id: string;
11
- disabled?: boolean;
12
- };
13
- export type ChopLogicTabsMode = 'vertical' | 'horizontal';
@@ -1,11 +0,0 @@
1
- import { MouseEventHandler } from 'react';
2
- import { CLIcon } from '../../../../../../../../../src/components/misc/icon/types';
3
-
4
- export type ChopLogicButtonView = 'primary' | 'secondary' | 'danger' | 'icon';
5
- export type ChopLogicButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
- onClick?: MouseEventHandler<HTMLButtonElement> | (() => void);
7
- view?: ChopLogicButtonView;
8
- label?: string;
9
- icon?: CLIcon;
10
- text?: string;
11
- };
@@ -1,21 +0,0 @@
1
- /// <reference types="react" />
2
- export type MultiSelectValue = {
3
- id: string;
4
- label: string;
5
- selected: boolean;
6
- };
7
- export type ChopLogicMultiSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
8
- id: string;
9
- name: string;
10
- label: string;
11
- values: MultiSelectValue[];
12
- onSelectChange?: (values?: MultiSelectValue[]) => void;
13
- placeholder?: string;
14
- };
15
- export type MultiSelectDropdownProps = {
16
- values: MultiSelectValue[];
17
- isOpened: boolean;
18
- dropdownId: string;
19
- onClose: () => void;
20
- onSelect: (id: string) => void;
21
- };
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- export type ChopLogicSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
3
- id: string;
4
- name: string;
5
- label: string;
6
- values: SelectValue[];
7
- onSelectChange?: (value?: SelectValue) => void;
8
- placeholder?: string;
9
- };
10
- export type SelectValue = {
11
- id: string;
12
- label: string;
13
- };
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export type ChopLogicTextInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
- id: string;
4
- name: string;
5
- label: string;
6
- valid?: boolean;
7
- errorMessage?: string;
8
- };
@@ -1,22 +0,0 @@
1
- export declare enum CLIcon {
2
- ArrowDown = "arrow-down",
3
- ArrowUp = "arrow-up",
4
- Back = "back",
5
- Cancel = "cancel",
6
- CheckboxChecked = "checkbox-checked",
7
- CheckboxUnchecked = "checkbox-unchecked",
8
- CheckMark = "check-mark",
9
- Copy = "copy",
10
- Cut = "cut",
11
- Delete = "delete",
12
- Download = "download",
13
- Error = "error",
14
- Forward = "forward",
15
- Help = "help",
16
- Info = "info",
17
- Paste = "paste",
18
- Question = "question",
19
- Save = "save",
20
- Upload = "upload",
21
- Warning = "warning"
22
- }
@@ -1,11 +0,0 @@
1
- import { CLIcon } from '../../../../../../../../../src/components/misc/icon/types';
2
-
3
- export type ChopLogicAlertMode = 'success' | 'error' | 'warning' | 'info' | 'help';
4
- export type ChopLogicAlertProps = React.HTMLAttributes<HTMLDivElement> & {
5
- isOpened: boolean;
6
- onClose: () => void;
7
- message: string;
8
- title?: string;
9
- mode?: ChopLogicAlertMode;
10
- icon?: CLIcon;
11
- };
@@ -1,7 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- export type ChopLogicModalProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement> & {
4
- isOpened: boolean;
5
- onClose: () => void;
6
- title: string;
7
- };
@@ -1,8 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- export type ChopLogicTooltipProps = PropsWithChildren & React.HTMLAttributes<HTMLElement> & {
4
- tooltipContent: string | React.ReactElement;
5
- id: string;
6
- containerTag?: 'span' | 'div' | 'p' | 'strong' | 'em';
7
- visibleOn?: 'hover' | 'click' | 'focus' | 'contextmenu';
8
- };