chop-logic-components 0.6.3 → 0.7.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/__mocks__/select-values.d.ts +2 -2
- package/dist/components/controls/button/Button.d.ts +2 -2
- package/dist/components/inputs/checkbox/Checkbox.d.ts +1 -6
- package/dist/components/inputs/checkbox/__docs__/CheckboxExample.d.ts +1 -1
- package/dist/components/inputs/checkbox/types.d.ts +6 -0
- package/dist/components/inputs/multi-select/MultiSelect.d.ts +1 -13
- 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 +2 -9
- package/dist/components/inputs/multi-select/elements/Option.d.ts +1 -1
- package/dist/components/inputs/multi-select/types.d.ts +20 -0
- package/dist/components/inputs/select/Select.d.ts +1 -12
- 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/select/types.d.ts +12 -0
- package/dist/components/inputs/text/TextInput.d.ts +1 -7
- package/dist/components/inputs/text/__docs__/TextInputExample.d.ts +1 -1
- package/dist/components/inputs/text/types.d.ts +7 -0
- package/dist/components/modals/alert/Alert.d.ts +4 -0
- package/dist/components/modals/alert/__docs__/Alert.stories.d.ts +9 -0
- package/dist/components/modals/alert/__docs__/AlertExample.d.ts +2 -0
- package/dist/components/modals/alert/__tests__/Alert.test.d.ts +1 -0
- package/dist/components/modals/alert/elements/Header.d.ts +10 -0
- package/dist/components/modals/alert/helpers/get-alert-icon.d.ts +4 -0
- package/dist/components/modals/alert/helpers/get-alert-title.d.ts +3 -0
- package/dist/components/modals/alert/types.d.ts +8 -0
- package/dist/components/modals/dialog/Dialog.d.ts +1 -6
- package/dist/components/modals/dialog/__docs__/DialogExample.d.ts +1 -1
- package/dist/components/modals/dialog/types.d.ts +7 -0
- package/dist/components/modals/tooltip/Tooltip.d.ts +1 -7
- package/dist/components/modals/tooltip/__docs__/TooltipExample.d.ts +1 -1
- package/dist/components/modals/tooltip/types.d.ts +8 -0
- package/dist/enums/icon.d.ts +6 -1
- package/dist/index.cjs.js +23 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +359 -350
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/styles/index.d.ts +0 -1
- /package/dist/components/elements/__tests__/{error-message.test.d.ts → ErrorMessage.test.d.ts} +0 -0
- /package/dist/components/elements/__tests__/{label.test.d.ts → Label.test.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SelectValue } from '../../../../../../../src/components/inputs/select/
|
|
2
|
-
import { MultiSelectValue } from '../../../../../../../src/components/inputs/multi-select/
|
|
1
|
+
import { SelectValue } from '../../../../../../../src/components/inputs/select/types';
|
|
2
|
+
import { MultiSelectValue } from '../../../../../../../src/components/inputs/multi-select/types';
|
|
3
3
|
|
|
4
4
|
export declare const SELECT_LANGUAGES: SelectValue[];
|
|
5
5
|
export declare const MULTI_SELECT_VALUES: MultiSelectValue[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChopLogicButtonProps } from './types';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const ChopLogicButton: React.FC<ChopLogicButtonProps>;
|
|
5
|
+
export default ChopLogicButton;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import { ChopLogicCheckboxProps } from './types';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
|
-
export type ChopLogicCheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
label: string;
|
|
7
|
-
isLabelHidden?: boolean;
|
|
8
|
-
};
|
|
9
4
|
declare const ChopLogicCheckbox: React.FC<ChopLogicCheckboxProps>;
|
|
10
5
|
export default ChopLogicCheckbox;
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
+
import { ChopLogicMultiSelectProps } from './types';
|
|
1
2
|
|
|
2
|
-
export type ChopLogicMultiSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
label: string;
|
|
6
|
-
values: MultiSelectValue[];
|
|
7
|
-
onSelectChange?: (values?: MultiSelectValue[]) => void;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
};
|
|
10
|
-
export type MultiSelectValue = {
|
|
11
|
-
id: string;
|
|
12
|
-
label: string;
|
|
13
|
-
selected: boolean;
|
|
14
|
-
};
|
|
15
3
|
declare const ChopLogicMultiSelect: React.FC<ChopLogicMultiSelectProps>;
|
|
16
4
|
export default ChopLogicMultiSelect;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MultiSelectDropdownProps } from '../types';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
values: MultiSelectValue[];
|
|
5
|
-
isOpened: boolean;
|
|
6
|
-
dropdownId: string;
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
onSelect: (id: string) => void;
|
|
9
|
-
};
|
|
10
|
-
declare const SelectDropdown: React.FC<SelectDropdownProps>;
|
|
3
|
+
declare const SelectDropdown: React.FC<MultiSelectDropdownProps>;
|
|
11
4
|
export default SelectDropdown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type MultiSelectValue = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ChopLogicMultiSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
values: MultiSelectValue[];
|
|
11
|
+
onSelectChange?: (values?: MultiSelectValue[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
};
|
|
14
|
+
export type MultiSelectDropdownProps = {
|
|
15
|
+
values: MultiSelectValue[];
|
|
16
|
+
isOpened: boolean;
|
|
17
|
+
dropdownId: string;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
onSelect: (id: string) => void;
|
|
20
|
+
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
+
import { ChopLogicSelectProps } from './types';
|
|
1
2
|
|
|
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
|
-
};
|
|
14
3
|
declare const ChopLogicSelect: React.FC<ChopLogicSelectProps>;
|
|
15
4
|
export default ChopLogicSelect;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ChopLogicSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
values: SelectValue[];
|
|
6
|
+
onSelectChange?: (value?: SelectValue) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
};
|
|
9
|
+
export type SelectValue = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
+
import { ChopLogicTextInputProps } from './types';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
|
-
export type ChopLogicTextInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
label: string;
|
|
7
|
-
valid?: boolean;
|
|
8
|
-
errorMessage?: string;
|
|
9
|
-
};
|
|
10
4
|
declare const TextInput: React.FC<ChopLogicTextInputProps>;
|
|
11
5
|
export default TextInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChopLogicAlertProps } from '../types';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const ExampleComponent: React.FC<ChopLogicAlertProps>;
|
|
6
|
+
declare const meta: Meta<typeof ExampleComponent>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof ExampleComponent>;
|
|
9
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChopLogicAlertMode } from '../types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
type ChopLogicAlertHeaderProps = {
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
mode: ChopLogicAlertMode;
|
|
8
|
+
};
|
|
9
|
+
declare const ChopLogicAlertHeader: React.FC<ChopLogicAlertHeaderProps>;
|
|
10
|
+
export default ChopLogicAlertHeader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ChopLogicAlertMode = 'success' | 'error' | 'warning' | 'info' | 'help';
|
|
2
|
+
export type ChopLogicAlertProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
isOpened: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
message: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
mode?: ChopLogicAlertMode;
|
|
8
|
+
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChopLogicModalProps } from './types';
|
|
2
2
|
|
|
3
|
-
export type ChopLogicModalProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
-
isOpened: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
title: string;
|
|
7
|
-
};
|
|
8
3
|
declare const ChopLogicDialog: React.FC<ChopLogicModalProps>;
|
|
9
4
|
export default ChopLogicDialog;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChopLogicTooltipProps } from './types';
|
|
2
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
|
-
};
|
|
9
3
|
declare const ChopLogicTooltip: React.FC<ChopLogicTooltipProps>;
|
|
10
4
|
export default ChopLogicTooltip;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
package/dist/enums/icon.d.ts
CHANGED
|
@@ -43,5 +43,10 @@ export declare enum Icon {
|
|
|
43
43
|
Paste = "cl-icon__paste",
|
|
44
44
|
Cut = "cl-icon__scissors",
|
|
45
45
|
Reset = "cl-icon__trash",
|
|
46
|
-
Clear = "cl-icon__cross"
|
|
46
|
+
Clear = "cl-icon__cross",
|
|
47
|
+
Support = "cl-icon__support",
|
|
48
|
+
Bomb = "cl-icon__bomb",
|
|
49
|
+
Quill = "cl-icon__quill",
|
|
50
|
+
Warning = "cl-icon__warning",
|
|
51
|
+
Notification = "cl-icon__notification"
|
|
47
52
|
}
|