chop-logic-components 2.4.0 → 2.5.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/LICENSE +21 -674
- package/README.md +2 -2
- package/dist/assets/icons/index.d.ts +1 -1
- package/dist/atoms/grid/body/GridBody.d.ts +1 -1
- package/dist/atoms/grid/column-group/GridColumnGroup.d.ts +1 -1
- package/dist/atoms/grid/head/GridHead.d.ts +1 -1
- package/dist/atoms/header/Header.d.ts +1 -1
- package/dist/atoms/icon/Icon.d.ts +1 -1
- package/dist/atoms/index.d.ts +14 -14
- package/dist/atoms/input/inner-button/InnerButton.d.ts +1 -1
- package/dist/atoms/input/multi-select/Combobox.d.ts +1 -1
- package/dist/atoms/input/multi-select/Dropdown.d.ts +1 -1
- package/dist/atoms/input/multi-select/Option.d.ts +1 -1
- package/dist/atoms/input/select/combobox/Combobox.d.ts +1 -1
- package/dist/atoms/input/select/dropdown/Dropdown.d.ts +1 -1
- package/dist/atoms/input/select/option/Option.d.ts +1 -1
- package/dist/atoms/loader/Loader.d.ts +1 -1
- package/dist/atoms/loader/__docs__/Loader.example.d.ts +1 -1
- package/dist/atoms/menu/item/MenuItem.d.ts +1 -1
- package/dist/atoms/menu/leaf/MenuLeaf.d.ts +1 -1
- package/dist/atoms/menu/sub-menu/SubMenu.d.ts +1 -1
- package/dist/atoms/tabs/button/TabButton.d.ts +1 -1
- package/dist/atoms/tabs/content/TabContent.d.ts +1 -1
- package/dist/atoms/tabs/list/TabList.d.ts +1 -1
- package/dist/atoms/tooltip/Tooltip.d.ts +1 -1
- package/dist/atoms/tooltip/__docs__/Tooltip.example.d.ts +1 -1
- package/dist/atoms/tooltip/__docs__/Tooltip.stories.d.ts +1 -1
- package/dist/chop-logic-components.css +1 -1
- package/dist/contexts/form/context.d.ts +1 -1
- package/dist/contexts/theme/provider.d.ts +1 -1
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/use-container-dimensions/use-container-dimensions.d.ts +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +765 -767
- package/dist/index.es.js.map +1 -1
- package/dist/models/button.d.ts +1 -1
- package/dist/models/dialog.d.ts +1 -1
- package/dist/models/header.d.ts +1 -1
- package/dist/models/icon.d.ts +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/tabs.d.ts +1 -1
- package/dist/models/tooltip.d.ts +1 -1
- package/dist/molecules/index.d.ts +1 -1
- package/dist/molecules/inputs/button/Button.d.ts +1 -1
- package/dist/molecules/inputs/button/__docs__/Button.example.d.ts +1 -1
- package/dist/molecules/inputs/button/__docs__/Button.stories.d.ts +3 -3
- package/dist/molecules/inputs/checkbox/Checkbox.d.ts +1 -1
- package/dist/molecules/inputs/checkbox/__docs__/Checkbox.example.d.ts +1 -1
- package/dist/molecules/inputs/checkbox/__docs__/Checkbox.stories.d.ts +3 -3
- package/dist/molecules/inputs/multi-select/MultiSelect.d.ts +1 -1
- package/dist/molecules/inputs/multi-select/__docs__/MultiSelect.example.d.ts +1 -1
- package/dist/molecules/inputs/multi-select/__docs__/MultiSelect.stories.d.ts +3 -3
- package/dist/molecules/inputs/numeric/NumericInput.controller.d.ts +1 -1
- package/dist/molecules/inputs/numeric/NumericInput.d.ts +2 -2
- package/dist/molecules/inputs/numeric/__docs__/NumericInput.example.d.ts +1 -1
- package/dist/molecules/inputs/select/Select.d.ts +1 -1
- package/dist/molecules/inputs/select/__docs__/Select.example.d.ts +1 -1
- package/dist/molecules/inputs/text/TextInput.controller.d.ts +1 -1
- package/dist/molecules/inputs/text/TextInput.d.ts +1 -1
- package/dist/molecules/inputs/text/__docs__/TextInput.example.d.ts +1 -1
- package/dist/organisms/alert/Alert.d.ts +1 -1
- package/dist/organisms/alert/__docs__/Alert.example.d.ts +1 -1
- package/dist/organisms/dialog/Dialog.d.ts +1 -1
- package/dist/organisms/dialog/__docs__/Dialog.example.d.ts +2 -3
- package/dist/organisms/dialog/__docs__/Dialog.stories.d.ts +3 -3
- package/dist/organisms/form/Form.controller.d.ts +1 -1
- package/dist/organisms/form/Form.d.ts +1 -1
- package/dist/organisms/form/__docs__/Form.example.d.ts +1 -1
- package/dist/organisms/form/__docs__/Form.stories.d.ts +3 -3
- package/dist/organisms/grid/Grid.d.ts +1 -1
- package/dist/organisms/grid/Grid.helpers.d.ts +1 -1
- package/dist/organisms/grid/__docs__/Grid.example.d.ts +1 -1
- package/dist/organisms/grid/__docs__/Grid.stories.d.ts +3 -3
- package/dist/organisms/index.d.ts +2 -2
- package/dist/organisms/menu/Menu.d.ts +1 -1
- package/dist/organisms/menu/__docs__/Menu.example.d.ts +1 -1
- package/dist/organisms/menu/__docs__/Menu.stories.d.ts +1 -1
- package/dist/organisms/tabs/Tabs.d.ts +1 -1
- package/dist/organisms/tabs/__docs__/Tabs.example.d.ts +1 -1
- package/dist/utils/handle-dropdown-list-key-press.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +6 -5
package/dist/models/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FocusEventHandler, MouseEventHandler } from 'react';
|
|
2
1
|
import { ChopLogicButtonView, ChopLogicIconName } from '../enums';
|
|
2
|
+
import { FocusEventHandler, MouseEventHandler } from 'react';
|
|
3
3
|
import { ChopLogicInputProps } from './_common';
|
|
4
4
|
export interface ChopLogicButtonProps extends Partial<ChopLogicInputProps> {
|
|
5
5
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
package/dist/models/dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ChopLogicIconName } from '../enums';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
2
3
|
import { ChopLogicComponentProps } from './_common';
|
|
3
|
-
import { ChopLogicIconName } from '../enums';
|
|
4
4
|
export interface ChopLogicDialogProps extends ChopLogicComponentProps, PropsWithChildren {
|
|
5
5
|
isOpened: boolean;
|
|
6
6
|
onClose: () => void;
|
package/dist/models/header.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
1
|
import { ChopLogicIconName } from '../enums';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
type HeaderLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
4
|
export interface ChopLogicHeaderProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
5
5
|
children: ReactNode;
|
package/dist/models/icon.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChopLogicIconName } from '../enums';
|
|
2
|
-
import { ChopLogicComponentProps } from './_common';
|
|
3
2
|
import { default as React, HTMLAttributes } from 'react';
|
|
3
|
+
import { ChopLogicComponentProps } from './_common';
|
|
4
4
|
export interface ChopLogicIconProps extends ChopLogicComponentProps, HTMLAttributes<SVGSVGElement> {
|
|
5
5
|
name?: ChopLogicIconName;
|
|
6
6
|
testId?: string;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type { ChopLogicComponentProps, ChopLogicInputProps, ChopLogicMultiSelectValue, ChopLogicNumericInputValidator, ChopLogicRegExpWithFlags, ChopLogicSelectValue, ChopLogicTextInputValidator, Dimensions, } from './_common';
|
|
2
|
-
export type { ChopLogicHeaderProps } from './header';
|
|
3
2
|
export type { ChopLogicAlertProps } from './alert';
|
|
4
3
|
export type { ChopLogicButtonProps } from './button';
|
|
5
4
|
export type { ChopLogicCheckboxProps } from './checkbox';
|
|
6
5
|
export type { ChopLogicDialogProps } from './dialog';
|
|
7
6
|
export type { ChopLogicFormData, ChopLogicFormInputParams, ChopLogicFormProps, ChopLogicFormValidationState } from './form';
|
|
8
7
|
export type { ChopLogicGridColumn, ChopLogicGridItem, ChopLogicGridProps, RenderDataItemCallback } from './grid';
|
|
8
|
+
export type { ChopLogicHeaderProps } from './header';
|
|
9
9
|
export type { ChopLogicIconProps, ChopLogicSVGElementProps } from './icon';
|
|
10
10
|
export type { ChopLogicLoaderProps } from './loader';
|
|
11
11
|
export type { ChopLogicMenuItem, ChopLogicMenuProps } from './menu';
|
package/dist/models/tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
1
|
import { ChopLogicOrientationMode } from '../enums';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
3
|
import { ChopLogicComponentProps } from './_common';
|
|
4
4
|
export interface ChopLogicTabsProps extends ChopLogicComponentProps {
|
|
5
5
|
tabs: ChopLogicTabItem[];
|
package/dist/models/tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
1
|
import { ChopLogicTooltipContainer } from '../enums';
|
|
2
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
3
3
|
import { ChopLogicComponentProps } from './_common';
|
|
4
4
|
export interface ChopLogicTooltipProps extends PropsWithChildren, ChopLogicComponentProps {
|
|
5
5
|
tooltipContent: string | ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { default as ChopLogicButton } from './inputs/button/Button';
|
|
1
2
|
export { default as ChopLogicCheckbox } from './inputs/checkbox/Checkbox';
|
|
2
3
|
export { default as ChopLogicMultiSelect } from './inputs/multi-select/MultiSelect';
|
|
3
4
|
export { default as ChopLogicNumericInput } from './inputs/numeric/NumericInput';
|
|
4
5
|
export { default as ChopLogicSelect } from './inputs/select/Select';
|
|
5
6
|
export { default as ChopLogicTextInput } from './inputs/text/TextInput';
|
|
6
|
-
export { default as ChopLogicButton } from './inputs/button/Button';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ChopLogicButtonProps } from '../../../models';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
declare const ChopLogicButton: React.FC<ChopLogicButtonProps & {
|
|
4
4
|
tooltip?: string;
|
|
5
5
|
visibleOn?: "hover" | "click" | "focus" | "contextmenu";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../../storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicButton } from '../Button';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicButton>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicButton>;
|
|
6
6
|
export declare const PrimaryButton: Story;
|
|
7
7
|
export declare const SecondaryButton: Story;
|
|
8
8
|
export declare const IconButton: Story;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../../storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicCheckbox } from '../Checkbox';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicCheckbox>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicCheckbox>;
|
|
6
6
|
export declare const LeftIconCheckbox: Story;
|
|
7
7
|
export declare const RightIconCheckbox: Story;
|
|
8
8
|
export declare const NoLabelCheckbox: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../../storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicMultiSelect } from '../MultiSelect';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicMultiSelect>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicMultiSelect>;
|
|
6
6
|
export declare const Example: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React, ChangeEventHandler } from 'react';
|
|
2
1
|
import { ChopLogicNumericInputValidator } from '../../../models';
|
|
2
|
+
import { default as React, ChangeEventHandler } from 'react';
|
|
3
3
|
export declare function useChopLogicNumericInputController({ name, defaultValue, onChange, onSpinButtonClick, min, max, step, required, validator, }: {
|
|
4
4
|
name: string;
|
|
5
5
|
defaultValue?: string | number | readonly string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ChopLogicNumericInputProps } from '../../../models';
|
|
3
|
-
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
declare const ChopLogicNumericInput: FC<ChopLogicNumericInputProps>;
|
|
4
4
|
export default ChopLogicNumericInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React, ChangeEventHandler } from 'react';
|
|
2
1
|
import { ChopLogicRegExpWithFlags, ChopLogicTextInputValidator } from '../../../models';
|
|
2
|
+
import { default as React, ChangeEventHandler } from 'react';
|
|
3
3
|
export declare function useChopLogicTextInputController({ name, defaultValue, onChange, onClear, required, validator, }: {
|
|
4
4
|
name: string;
|
|
5
5
|
required: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ChopLogicDialogProps } from '../../../models';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare const ChopLogicDialogExample: React.FC<ChopLogicDialogProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../storybook/react-vite';
|
|
2
|
-
import { default as
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicDialog } from '../Dialog';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicDialog>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicDialog>;
|
|
6
6
|
export declare const Example: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React, FormEvent } from 'react';
|
|
2
1
|
import { ChopLogicFormData, ChopLogicFormInputParams } from '../../models';
|
|
2
|
+
import { default as React, FormEvent } from 'react';
|
|
3
3
|
export declare function useChopLogicFormController({ initialValues, onReset, onSubmit, onClickSubmit, }: {
|
|
4
4
|
initialValues?: ChopLogicFormData;
|
|
5
5
|
onReset?: React.FormEventHandler<HTMLFormElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicForm } from '../Form.tsx';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicForm>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicForm>;
|
|
6
6
|
export declare const Example: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { ChopLogicGridColumn, ChopLogicGridItem, RenderDataItemCallback } from '../../models';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
export declare function getGridRowValues({ item, columns, renderDataItem, }: {
|
|
4
4
|
item: ChopLogicGridItem;
|
|
5
5
|
columns: ChopLogicGridColumn[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { default as ChopLogicGrid } from '../Grid';
|
|
3
|
+
declare const meta: Meta<typeof ChopLogicGrid>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof ChopLogicGrid>;
|
|
6
6
|
export declare const DefaultGrid: Story;
|
|
7
7
|
export declare const SelectableGrid: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export { default as ChopLogicAlert } from './alert/Alert';
|
|
2
|
+
export { default as ChopLogicDialog } from './dialog/Dialog';
|
|
1
3
|
export { default as ChopLogicForm } from './form/Form';
|
|
2
4
|
export { default as ChopLogicGrid } from './grid/Grid';
|
|
3
5
|
export { default as ChopLogicMenu } from './menu/Menu';
|
|
4
6
|
export { default as ChopLogicTabs } from './tabs/Tabs';
|
|
5
|
-
export { default as ChopLogicDialog } from './dialog/Dialog';
|
|
6
|
-
export { default as ChopLogicAlert } from './alert/Alert';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '../../../storybook/react-vite';
|
|
2
|
-
import { default as MenuExample } from './Menu.example';
|
|
3
2
|
import { default as ChopLogicMenu } from '../Menu';
|
|
3
|
+
import { default as MenuExample } from './Menu.example';
|
|
4
4
|
declare const meta: Meta<typeof ChopLogicMenu>;
|
|
5
5
|
export default meta;
|
|
6
6
|
type Story = StoryObj<typeof MenuExample>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KeyboardEvent } from 'react';
|
|
2
1
|
import { ChopLogicSelectValue } from '../models';
|
|
2
|
+
import { KeyboardEvent } from 'react';
|
|
3
3
|
export declare function handleDropdownListKeyPress({ e, options, onClose, }: {
|
|
4
4
|
e: KeyboardEvent<HTMLUListElement>;
|
|
5
5
|
options: ChopLogicSelectValue[];
|
package/dist/utils/index.d.ts
CHANGED
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": "2.
|
|
7
|
+
"version": "2.5.0",
|
|
8
8
|
"description": "React UI components library for Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.cjs.js",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@commitlint/cli": "^19.7.1",
|
|
58
58
|
"@commitlint/config-conventional": "^19.7.1",
|
|
59
59
|
"@eslint/js": "^9.20.0",
|
|
60
|
-
"@storybook/addon-docs": "^9.0
|
|
61
|
-
"@storybook/react-vite": "^9.0
|
|
60
|
+
"@storybook/addon-docs": "^9.1.0",
|
|
61
|
+
"@storybook/react-vite": "^9.1.0",
|
|
62
62
|
"@testing-library/jest-dom": "^6.6.3",
|
|
63
63
|
"@testing-library/react": "^16.2.0",
|
|
64
64
|
"@types/node": "^22.13.0",
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"eslint-plugin-react": "^7.37.4",
|
|
70
70
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
71
71
|
"eslint-plugin-react-refresh": "^0.4.18",
|
|
72
|
-
"eslint-plugin-
|
|
72
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
73
|
+
"eslint-plugin-storybook": "^9.1.0",
|
|
73
74
|
"globals": "^15.14.0",
|
|
74
75
|
"husky": "^9.1.7",
|
|
75
76
|
"husky-init": "^8.0.0",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"prettier": "^3.4.2",
|
|
78
79
|
"remark-gfm": "^4.0.1",
|
|
79
80
|
"sass": "^1.87.0",
|
|
80
|
-
"storybook": "^9.0
|
|
81
|
+
"storybook": "^9.1.0",
|
|
81
82
|
"typescript": "^5.7.3",
|
|
82
83
|
"typescript-eslint": "^8.23.0",
|
|
83
84
|
"vite": "^6.0.11",
|