chop-logic-components 0.8.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.
- package/dist/components/containers/tabs/Tabs.d.ts +16 -0
- package/dist/components/containers/tabs/Tabs.styled.d.ts +14 -0
- package/dist/components/containers/tabs/__docs__/Tabs.stories.d.ts +8 -0
- package/dist/components/containers/tabs/__docs__/TabsExample.d.ts +2 -0
- package/dist/components/containers/tabs/__tests__/TabList.test.d.ts +1 -0
- package/dist/components/containers/tabs/__tests__/Tabs.test.d.ts +1 -0
- package/dist/components/containers/tabs/elements/TabButton.d.ts +14 -0
- package/dist/components/containers/tabs/elements/TabContent.d.ts +9 -0
- package/dist/components/containers/tabs/elements/TabList.d.ts +13 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/button/Button.d.ts +10 -2
- package/dist/components/inputs/button/Button.styled.d.ts +1 -1
- package/dist/components/inputs/button/__docs__/ButtonExample.d.ts +1 -1
- package/dist/components/inputs/multi-select/MultiSelect.d.ts +21 -2
- package/dist/components/inputs/multi-select/__docs__/MultiSelectExample.d.ts +1 -1
- package/dist/components/inputs/multi-select/elements/Combobox.d.ts +1 -1
- package/dist/components/inputs/multi-select/elements/Dropdown.d.ts +1 -1
- package/dist/components/inputs/multi-select/elements/Option.d.ts +1 -1
- package/dist/components/inputs/numeric/NumericInput.d.ts +11 -0
- package/dist/components/inputs/numeric/NumericInput.styled.d.ts +7 -0
- package/dist/components/inputs/numeric/__docs__/NumericInput.stories.d.ts +7 -0
- package/dist/components/inputs/numeric/__docs__/NumericInputExample.d.ts +5 -0
- package/dist/components/inputs/numeric/__tests__/NumericInput.test.d.ts +1 -0
- package/dist/components/inputs/select/Select.d.ts +13 -2
- package/dist/components/inputs/select/__docs__/SelectExample.d.ts +1 -1
- package/dist/components/inputs/select/elements/Combobox.d.ts +1 -1
- package/dist/components/inputs/select/elements/Dropdown.d.ts +1 -1
- package/dist/components/inputs/select/elements/Option.d.ts +1 -1
- package/dist/components/inputs/text/TextInput.d.ts +7 -1
- package/dist/components/inputs/text/__docs__/TextInputExample.d.ts +1 -1
- package/dist/components/misc/icon/Icon.d.ts +22 -1
- package/dist/components/modals/alert/Alert.d.ts +10 -1
- package/dist/components/modals/alert/__docs__/Alert.stories.d.ts +1 -1
- package/dist/components/modals/alert/elements/Header.d.ts +2 -2
- package/dist/components/modals/alert/helpers/get-alert-title.d.ts +1 -1
- package/dist/components/modals/alert/helpers/render-alert-icon.d.ts +2 -2
- package/dist/components/modals/dialog/Dialog.d.ts +6 -1
- package/dist/components/modals/dialog/__docs__/DialogExample.d.ts +1 -1
- package/dist/components/modals/tooltip/Tooltip.d.ts +7 -1
- package/dist/components/modals/tooltip/__docs__/TooltipExample.d.ts +1 -1
- package/dist/constants/style-variables.d.ts +1 -0
- package/dist/index.cjs.js +299 -218
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5727 -5566
- package/dist/index.es.js.map +1 -1
- package/package.json +14 -14
- package/dist/__mocks__/select-values.d.ts +0 -5
- package/dist/components/inputs/button/types.d.ts +0 -11
- package/dist/components/inputs/multi-select/types.d.ts +0 -21
- package/dist/components/inputs/select/types.d.ts +0 -13
- package/dist/components/inputs/text/types.d.ts +0 -8
- package/dist/components/misc/icon/types.d.ts +0 -22
- package/dist/components/modals/alert/types.d.ts +0 -11
- package/dist/components/modals/dialog/types.d.ts +0 -7
- 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.
|
|
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}": [
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"@chromatic-com/storybook": "^1.6.1",
|
|
48
48
|
"@commitlint/cli": "^19.3.0",
|
|
49
49
|
"@commitlint/config-conventional": "^19.2.2",
|
|
50
|
-
"@storybook/addon-essentials": "^8.2.
|
|
51
|
-
"@storybook/addon-interactions": "^8.2.
|
|
52
|
-
"@storybook/addon-links": "^8.2.
|
|
53
|
-
"@storybook/addon-onboarding": "^8.2.
|
|
54
|
-
"@storybook/blocks": "^8.2.
|
|
55
|
-
"@storybook/react": "^8.2.
|
|
56
|
-
"@storybook/react-vite": "^8.2.
|
|
57
|
-
"@storybook/test": "^8.2.
|
|
50
|
+
"@storybook/addon-essentials": "^8.2.8",
|
|
51
|
+
"@storybook/addon-interactions": "^8.2.8",
|
|
52
|
+
"@storybook/addon-links": "^8.2.8",
|
|
53
|
+
"@storybook/addon-onboarding": "^8.2.8",
|
|
54
|
+
"@storybook/blocks": "^8.2.8",
|
|
55
|
+
"@storybook/react": "^8.2.8",
|
|
56
|
+
"@storybook/react-vite": "^8.2.8",
|
|
57
|
+
"@storybook/test": "^8.2.8",
|
|
58
58
|
"@testing-library/jest-dom": "^6.4.2",
|
|
59
59
|
"@testing-library/react": "^15.0.6",
|
|
60
60
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -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": "^
|
|
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
|
-
"
|
|
77
|
-
"storybook": "^8.2.6",
|
|
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,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,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,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
|
-
};
|