chop-logic-components 1.0.4 → 1.0.6
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/README.md +5 -2
- package/dist/components/containers/form/Form.styled.d.ts +0 -1
- package/dist/components/containers/form/__docs__/FormExample.d.ts +1 -0
- package/dist/components/containers/form/controller.d.ts +1 -1
- package/dist/components/containers/form/types.d.ts +5 -3
- package/dist/components/containers/grid/Grid.d.ts +1 -0
- package/dist/components/containers/grid/Grid.styled.d.ts +0 -1
- package/dist/components/containers/grid/__docs__/GridExample.d.ts +1 -0
- package/dist/components/containers/grid/elements/Body.d.ts +1 -0
- package/dist/components/containers/grid/elements/DataCell.d.ts +1 -1
- package/dist/components/containers/grid/elements/Head.d.ts +1 -0
- package/dist/components/containers/grid/elements/Row.d.ts +1 -1
- package/dist/components/containers/grid/helpers.d.ts +2 -1
- package/dist/components/containers/grid/types.d.ts +6 -8
- package/dist/components/containers/tabs/types.d.ts +5 -3
- package/dist/components/inputs/_common/error-message/ErrorMessage.styled.d.ts +0 -1
- package/dist/components/inputs/_common/input-inner-button/InputInnerButton.styled.d.ts +0 -1
- package/dist/components/inputs/_common/label/Label.styled.d.ts +0 -1
- package/dist/components/inputs/button/types.d.ts +4 -3
- package/dist/components/inputs/checkbox/Checkbox.styled.d.ts +0 -1
- package/dist/components/inputs/checkbox/controller.d.ts +2 -1
- package/dist/components/inputs/checkbox/types.d.ts +6 -4
- package/dist/components/inputs/multi-select/MultiSelect.d.ts +1 -0
- package/dist/components/inputs/multi-select/MultiSelect.styled.d.ts +0 -1
- package/dist/components/inputs/multi-select/controller.d.ts +1 -1
- package/dist/components/inputs/multi-select/elements/Combobox.d.ts +1 -0
- package/dist/components/inputs/multi-select/elements/Dropdown.d.ts +1 -0
- package/dist/components/inputs/multi-select/elements/Option.d.ts +1 -0
- package/dist/components/inputs/multi-select/helpers.d.ts +1 -1
- package/dist/components/inputs/multi-select/types.d.ts +3 -4
- package/dist/components/inputs/numeric/NumericInput.styled.d.ts +0 -1
- package/dist/components/inputs/numeric/controller.d.ts +1 -1
- package/dist/components/inputs/numeric/types.d.ts +12 -5
- package/dist/components/inputs/select/Select.d.ts +1 -0
- package/dist/components/inputs/select/Select.styled.d.ts +0 -1
- package/dist/components/inputs/select/controller.d.ts +1 -1
- package/dist/components/inputs/select/elements/Combobox.d.ts +2 -1
- package/dist/components/inputs/select/elements/Dropdown.d.ts +2 -1
- package/dist/components/inputs/select/elements/Option.d.ts +1 -0
- package/dist/components/inputs/select/helpers.d.ts +1 -1
- package/dist/components/inputs/select/types.d.ts +4 -10
- package/dist/components/inputs/text/TextInput.styled.d.ts +0 -1
- package/dist/components/inputs/text/controller.d.ts +1 -1
- package/dist/components/inputs/text/types.d.ts +13 -5
- package/dist/components/modals/alert/Alert.d.ts +1 -0
- package/dist/components/modals/alert/Alert.styled.d.ts +0 -1
- package/dist/components/modals/alert/helpers.d.ts +1 -0
- package/dist/components/modals/alert/types.d.ts +2 -2
- package/dist/components/modals/dialog/Dialog.d.ts +1 -0
- package/dist/components/modals/dialog/Dialog.styled.d.ts +0 -1
- package/dist/components/modals/dialog/types.d.ts +4 -3
- package/dist/components/modals/tooltip/Tooltip.d.ts +1 -0
- package/dist/components/modals/tooltip/Tooltip.styled.d.ts +0 -1
- package/dist/components/modals/tooltip/controller.d.ts +4 -3
- package/dist/components/modals/tooltip/types.d.ts +4 -3
- package/dist/constants/style-variables.d.ts +6 -6
- package/dist/constants/themes.d.ts +4 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/use-container-dimensions/index.d.ts +1 -0
- package/dist/hooks/use-modal-focus-trap/index.d.ts +2 -1
- package/dist/hooks/use-tooltip-position/index.d.ts +2 -1
- package/dist/index.cjs.js +155 -155
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5872 -5897
- package/dist/index.es.js.map +1 -1
- package/dist/logo.png +0 -0
- package/dist/utils/__tests__/get-chop-logic-theme.test.d.ts +1 -0
- package/dist/utils/__tests__/handle-dropdown-list-key-press.test.d.ts +1 -0
- package/dist/utils/get-chop-logic-theme.d.ts +3 -0
- package/dist/utils/handle-dropdown-list-key-press.d.ts +8 -0
- package/dist/utils/types.d.ts +49 -0
- package/package.json +19 -15
package/dist/logo.png
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
import { SelectValue } from '../../../../../../../src/utils/types.ts';
|
|
3
|
+
|
|
4
|
+
export declare function handleDropdownListKeyPress({ e, options, onClose, }: {
|
|
5
|
+
e: KeyboardEvent<HTMLUListElement>;
|
|
6
|
+
options: SelectValue[];
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export type CommonInputProps = CommonComponentProps & {
|
|
4
|
+
label: string;
|
|
5
|
+
name: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type CommonComponentProps = {
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
title?: string;
|
|
15
|
+
theme?: 'dark' | 'light';
|
|
16
|
+
};
|
|
17
|
+
export type SelectValue = {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
} & {
|
|
21
|
+
[key in string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
export interface ChopLogicTheme {
|
|
24
|
+
primaryColor: string;
|
|
25
|
+
secondaryColor: string;
|
|
26
|
+
tertiaryColor: string;
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
accentColor: string;
|
|
29
|
+
primaryGradient: string;
|
|
30
|
+
accentGradient: string;
|
|
31
|
+
tintGradient: string;
|
|
32
|
+
coreFontFamily: string;
|
|
33
|
+
monospaceFontFamily: string;
|
|
34
|
+
smallGap: string;
|
|
35
|
+
mediumGap: string;
|
|
36
|
+
bigGap: string;
|
|
37
|
+
iconSize: string;
|
|
38
|
+
blockBorderRadius: string;
|
|
39
|
+
boxShadow: string;
|
|
40
|
+
textShadow: string;
|
|
41
|
+
insetShadow: string;
|
|
42
|
+
regularBorder: string;
|
|
43
|
+
accentBorder: string;
|
|
44
|
+
outlineBorder: string;
|
|
45
|
+
baseIndex: string;
|
|
46
|
+
tooltipIndex: string;
|
|
47
|
+
dropdownIndex: string;
|
|
48
|
+
modalIndex: string;
|
|
49
|
+
}
|
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": "1.0.
|
|
7
|
+
"version": "1.0.6",
|
|
8
8
|
"description": "React UI components library for Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.cjs.js",
|
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
"check-types": "tsc --pretty --noEmit",
|
|
20
20
|
"build": "tsc && vite build",
|
|
21
21
|
"test": "vitest",
|
|
22
|
-
"test:ci": "vitest run",
|
|
23
|
-
"storybook": "storybook dev -p 6006",
|
|
22
|
+
"test:ci": "vitest run --passWithNoTests",
|
|
23
|
+
"storybook": "storybook dev -p 6006 --no-open",
|
|
24
24
|
"build-storybook": "storybook build -- -o storybook-static --quiet",
|
|
25
25
|
"prepare": "npm run build && husky install"
|
|
26
26
|
},
|
|
27
27
|
"lint-staged": {
|
|
28
|
-
"*.{ts,tsx}": [
|
|
29
|
-
"
|
|
28
|
+
"*.{js,jsx,ts,tsx,json,css,scss,md}": [
|
|
29
|
+
"prettier --write",
|
|
30
|
+
"eslint --fix",
|
|
30
31
|
"npm run test:ci"
|
|
31
32
|
]
|
|
32
33
|
},
|
|
@@ -43,16 +44,19 @@
|
|
|
43
44
|
},
|
|
44
45
|
"homepage": "https://savourygin.github.io/chop-logic-components",
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@chromatic-com/storybook": "^
|
|
47
|
+
"@chromatic-com/storybook": "^3.1.0",
|
|
47
48
|
"@commitlint/cli": "^19.3.0",
|
|
48
49
|
"@commitlint/config-conventional": "^19.2.2",
|
|
49
|
-
"@storybook/addon-essentials": "^8.
|
|
50
|
-
"@storybook/addon-interactions": "^8.
|
|
51
|
-
"@storybook/addon-links": "^8.
|
|
52
|
-
"@storybook/
|
|
53
|
-
"@storybook/
|
|
54
|
-
"@storybook/
|
|
55
|
-
"@storybook/
|
|
50
|
+
"@storybook/addon-essentials": "^8.4.2",
|
|
51
|
+
"@storybook/addon-interactions": "^8.4.2",
|
|
52
|
+
"@storybook/addon-links": "^8.4.2",
|
|
53
|
+
"@storybook/addon-mdx-gfm": "^8.4.2",
|
|
54
|
+
"@storybook/blocks": "^8.4.2",
|
|
55
|
+
"@storybook/manager-api": "^8.4.2",
|
|
56
|
+
"@storybook/react": "^8.4.2",
|
|
57
|
+
"@storybook/react-vite": "^8.4.2",
|
|
58
|
+
"@storybook/test": "^8.4.2",
|
|
59
|
+
"@storybook/theming": "^8.4.2",
|
|
56
60
|
"@testing-library/jest-dom": "^6.4.2",
|
|
57
61
|
"@testing-library/react": "^15.0.6",
|
|
58
62
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -66,13 +70,13 @@
|
|
|
66
70
|
"eslint-plugin-react": "^7.34.1",
|
|
67
71
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
68
72
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
69
|
-
"eslint-plugin-storybook": "^0.
|
|
73
|
+
"eslint-plugin-storybook": "^0.11.0",
|
|
70
74
|
"husky": "^8.0.0",
|
|
71
75
|
"husky-init": "^8.0.0",
|
|
72
76
|
"jsdom": "^24.0.0",
|
|
73
77
|
"lint-staged": "^15.2.2",
|
|
74
78
|
"prettier": "^3.2.5",
|
|
75
|
-
"storybook": "^8.
|
|
79
|
+
"storybook": "^8.4.2",
|
|
76
80
|
"styled-components": "^6.1.12",
|
|
77
81
|
"typescript": "^5.4.5",
|
|
78
82
|
"vite": "^5.2.10",
|