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.
- package/dist/components/containers/tabs/Tabs.d.ts +12 -1
- package/dist/components/containers/tabs/Tabs.styled.d.ts +1 -1
- package/dist/components/containers/tabs/elements/TabButton.d.ts +1 -1
- package/dist/components/containers/tabs/elements/TabContent.d.ts +1 -1
- package/dist/components/containers/tabs/elements/TabList.d.ts +1 -1
- 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 +161 -158
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5537 -5533
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -5
- package/dist/__mocks__/select-values.d.ts +0 -5
- package/dist/components/containers/tabs/types.d.ts +0 -13
- 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
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ChopLogicTabsProps } from './types';
|
|
3
2
|
|
|
3
|
+
export type ChopLogicTabsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
tabs: ChopLogicTabItem[];
|
|
5
|
+
defaultTabId?: string;
|
|
6
|
+
mode?: ChopLogicTabsMode;
|
|
7
|
+
};
|
|
8
|
+
export type ChopLogicTabItem = {
|
|
9
|
+
content: React.ReactElement;
|
|
10
|
+
title: string;
|
|
11
|
+
id: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type ChopLogicTabsMode = 'vertical' | 'horizontal';
|
|
4
15
|
declare const ChopLogicTabs: React.FC<ChopLogicTabsProps>;
|
|
5
16
|
export default ChopLogicTabs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChopLogicTabsMode } from './
|
|
1
|
+
import { ChopLogicTabsMode } from './Tabs';
|
|
2
2
|
|
|
3
3
|
export declare const StyledTabButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
4
4
|
$selected: boolean;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React, MouseEventHandler } from 'react';
|
|
2
|
+
import { CLIcon } from '../../../../../../../../../src/components/misc/icon/Icon';
|
|
3
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
|
+
};
|
|
4
12
|
declare const ChopLogicButton: React.FC<ChopLogicButtonProps>;
|
|
5
13
|
export default ChopLogicButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChopLogicButtonView } from './
|
|
1
|
+
import { ChopLogicButtonView } from './Button';
|
|
2
2
|
|
|
3
3
|
export declare const StyledButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
4
4
|
$view: ChopLogicButtonView;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
};
|
|
3
22
|
declare const ChopLogicMultiSelect: React.FC<ChopLogicMultiSelectProps>;
|
|
4
23
|
export default ChopLogicMultiSelect;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ChopLogicNumericInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
valid?: boolean;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const NumericInput: React.FC<ChopLogicNumericInputProps>;
|
|
11
|
+
export default NumericInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledNumericInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StyledNumericInputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$disabled: boolean;
|
|
5
|
+
$invalid: boolean;
|
|
6
|
+
}>> & string;
|
|
7
|
+
export declare const StyledNumericInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as NumericInputExample } from './NumericInputExample';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof NumericInputExample>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof NumericInputExample>;
|
|
7
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
};
|
|
3
14
|
declare const ChopLogicSelect: React.FC<ChopLogicSelectProps>;
|
|
4
15
|
export default ChopLogicSelect;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ChopLogicTextInputProps } from './types';
|
|
3
2
|
|
|
3
|
+
export type ChopLogicTextInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
valid?: boolean;
|
|
8
|
+
errorMessage?: string;
|
|
9
|
+
};
|
|
4
10
|
declare const TextInput: React.FC<ChopLogicTextInputProps>;
|
|
5
11
|
export default TextInput;
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CLIcon } from './types';
|
|
3
2
|
|
|
3
|
+
export declare enum CLIcon {
|
|
4
|
+
ArrowDown = "arrow-down",
|
|
5
|
+
ArrowUp = "arrow-up",
|
|
6
|
+
Back = "back",
|
|
7
|
+
Cancel = "cancel",
|
|
8
|
+
CheckboxChecked = "checkbox-checked",
|
|
9
|
+
CheckboxUnchecked = "checkbox-unchecked",
|
|
10
|
+
CheckMark = "check-mark",
|
|
11
|
+
Copy = "copy",
|
|
12
|
+
Cut = "cut",
|
|
13
|
+
Delete = "delete",
|
|
14
|
+
Download = "download",
|
|
15
|
+
Error = "error",
|
|
16
|
+
Forward = "forward",
|
|
17
|
+
Help = "help",
|
|
18
|
+
Info = "info",
|
|
19
|
+
Paste = "paste",
|
|
20
|
+
Question = "question",
|
|
21
|
+
Save = "save",
|
|
22
|
+
Upload = "upload",
|
|
23
|
+
Warning = "warning"
|
|
24
|
+
}
|
|
4
25
|
declare const ChopLogicIcon: React.FC<{
|
|
5
26
|
name?: CLIcon;
|
|
6
27
|
}>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CLIcon } from '../../../../../../../../../src/components/misc/icon/Icon';
|
|
2
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
|
+
};
|
|
3
12
|
declare const ChopLogicAlert: React.FC<ChopLogicAlertProps>;
|
|
4
13
|
export default ChopLogicAlert;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { ChopLogicAlertProps } from '../
|
|
3
|
+
import { ChopLogicAlertProps } from '../Alert';
|
|
4
4
|
|
|
5
5
|
declare const ExampleComponent: React.FC<ChopLogicAlertProps>;
|
|
6
6
|
declare const meta: Meta<typeof ExampleComponent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CLIcon } from '../../../../../../../../../../src/components/misc/icon/
|
|
3
|
-
import { ChopLogicAlertMode } from '../
|
|
2
|
+
import { CLIcon } from '../../../../../../../../../../src/components/misc/icon/Icon';
|
|
3
|
+
import { ChopLogicAlertMode } from '../Alert';
|
|
4
4
|
|
|
5
5
|
type ChopLogicAlertHeaderProps = {
|
|
6
6
|
onClose: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLIcon } from '../../../../../../../../../../src/components/misc/icon/
|
|
2
|
-
import { ChopLogicAlertMode } from '../
|
|
1
|
+
import { CLIcon } from '../../../../../../../../../../src/components/misc/icon/Icon';
|
|
2
|
+
import { ChopLogicAlertMode } from '../Alert';
|
|
3
3
|
|
|
4
4
|
export declare function renderAlertIcon(mode: ChopLogicAlertMode, icon?: CLIcon): React.ReactElement | null;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
|
+
export type ChopLogicModalProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
isOpened: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
3
8
|
declare const ChopLogicDialog: React.FC<ChopLogicModalProps>;
|
|
4
9
|
export default ChopLogicDialog;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
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
|
+
};
|
|
3
9
|
declare const ChopLogicTooltip: React.FC<ChopLogicTooltipProps>;
|
|
4
10
|
export default ChopLogicTooltip;
|