chop-logic-components 1.0.6 → 1.0.8
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/form/Form.d.ts +1 -1
- package/dist/components/containers/form/Form.styled.d.ts +4 -0
- package/dist/components/containers/form/__docs__/FormExample.d.ts +1 -1
- package/dist/components/containers/form/controller.d.ts +1 -1
- package/dist/components/containers/form/helpers.d.ts +1 -1
- package/dist/components/containers/grid/Grid.d.ts +1 -1
- package/dist/components/containers/grid/Grid.styled.d.ts +26 -7
- package/dist/components/containers/grid/__docs__/GridExample.d.ts +1 -1
- package/dist/components/containers/grid/controller.d.ts +1 -1
- package/dist/components/containers/grid/elements/Body.d.ts +2 -1
- package/dist/components/containers/grid/elements/Checkbox.d.ts +2 -0
- package/dist/components/containers/grid/elements/ColumnGroup.d.ts +2 -1
- package/dist/components/containers/grid/elements/DataCell.d.ts +2 -0
- package/dist/components/containers/grid/elements/Head.d.ts +2 -1
- package/dist/components/containers/grid/elements/HeaderCell.d.ts +2 -0
- package/dist/components/containers/grid/elements/Row.d.ts +2 -0
- package/dist/components/containers/grid/elements/SelectAllRowsCell.d.ts +2 -0
- package/dist/components/containers/grid/elements/SelectRowCell.d.ts +2 -0
- package/dist/components/containers/grid/helpers.d.ts +1 -1
- package/dist/components/containers/tabs/Tabs.d.ts +1 -1
- package/dist/components/containers/tabs/Tabs.styled.d.ts +6 -2
- package/dist/components/containers/tabs/__docs__/Tabs.stories.d.ts +1 -1
- package/dist/components/containers/tabs/__docs__/TabsExample.d.ts +4 -1
- package/dist/components/containers/tabs/elements/TabButton.d.ts +2 -1
- package/dist/components/containers/tabs/elements/TabContent.d.ts +2 -1
- package/dist/components/containers/tabs/elements/TabList.d.ts +1 -9
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputs/button/Button.d.ts +1 -1
- package/dist/components/inputs/button/Button.styled.d.ts +10 -5
- package/dist/components/inputs/button/__docs__/Button.stories.d.ts +2 -4
- package/dist/components/inputs/button/__docs__/ButtonExample.d.ts +1 -1
- package/dist/components/inputs/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/inputs/checkbox/Checkbox.styled.d.ts +4 -2
- package/dist/components/inputs/checkbox/__docs__/CheckboxExample.d.ts +1 -1
- package/dist/components/inputs/checkbox/helpers.d.ts +1 -1
- package/dist/components/inputs/multi-select/MultiSelect.d.ts +1 -1
- package/dist/components/inputs/multi-select/__docs__/MultiSelectExample.d.ts +1 -1
- package/dist/components/inputs/multi-select/controller.d.ts +1 -2
- package/dist/components/inputs/multi-select/elements/Combobox.d.ts +2 -13
- package/dist/components/inputs/multi-select/elements/Dropdown.d.ts +1 -1
- package/dist/components/inputs/multi-select/elements/Option.d.ts +2 -6
- package/dist/components/inputs/multi-select/helpers.d.ts +1 -3
- package/dist/components/inputs/numeric/NumericInput.d.ts +1 -1
- package/dist/components/inputs/numeric/NumericInput.styled.d.ts +4 -7
- package/dist/components/inputs/numeric/__docs__/NumericInputExample.d.ts +1 -1
- package/dist/components/inputs/numeric/controller.d.ts +1 -1
- package/dist/components/inputs/numeric/helpers.d.ts +1 -2
- package/dist/components/inputs/select/Select.d.ts +1 -1
- package/dist/components/inputs/select/__docs__/SelectExample.d.ts +1 -1
- package/dist/components/inputs/select/controller.d.ts +1 -1
- package/dist/components/inputs/select/elements/Combobox.d.ts +1 -12
- package/dist/components/inputs/select/elements/Dropdown.d.ts +1 -11
- package/dist/components/inputs/select/elements/Option.d.ts +1 -1
- package/dist/components/inputs/select/helpers.d.ts +1 -2
- package/dist/components/inputs/text/TextInput.d.ts +1 -1
- package/dist/components/inputs/text/TextInput.styled.d.ts +4 -7
- package/dist/components/inputs/text/__docs__/TextInputExample.d.ts +1 -1
- package/dist/components/inputs/text/controller.d.ts +1 -1
- package/dist/components/inputs/text/helpers.d.ts +1 -2
- package/dist/components/modals/alert/Alert.d.ts +1 -1
- package/dist/components/modals/alert/Alert.styled.d.ts +9 -2
- package/dist/components/modals/alert/__docs__/Alert.stories.d.ts +1 -1
- package/dist/components/modals/alert/elements/Header.d.ts +1 -1
- package/dist/components/modals/alert/helpers.d.ts +1 -2
- package/dist/components/modals/dialog/Dialog.d.ts +1 -1
- package/dist/components/modals/dialog/Dialog.styled.d.ts +12 -3
- package/dist/components/modals/dialog/__docs__/DialogExample.d.ts +1 -1
- package/dist/components/modals/dialog/elements/Header.d.ts +2 -0
- package/dist/components/modals/dialog/elements/Layout.d.ts +1 -1
- package/dist/components/modals/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/modals/tooltip/Tooltip.styled.d.ts +5 -1
- package/dist/components/modals/tooltip/__docs__/TooltipExample.d.ts +1 -1
- package/dist/{components/containers/form/FormContext.d.ts → contexts/chop-logic-form-context.d.ts} +1 -1
- package/dist/contexts/chop-logic-theme-context.d.ts +11 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/css/index.d.ts +3 -0
- package/dist/css/screen-breakpoints.d.ts +7 -0
- package/dist/{constants → css}/themes.d.ts +1 -1
- package/dist/{components/inputs/_common → elements}/error-message/ErrorMessage.d.ts +2 -0
- package/dist/{components/inputs/_common → elements}/error-message/ErrorMessage.styled.d.ts +3 -0
- package/dist/elements/icon/Icon.d.ts +7 -0
- package/dist/elements/index.d.ts +4 -0
- package/dist/{components/inputs/_common → elements}/input-inner-button/InputInnerButton.d.ts +4 -1
- package/dist/elements/input-inner-button/InputInnerButton.styled.d.ts +5 -0
- package/dist/{components/inputs/_common → elements}/label/Label.d.ts +2 -0
- package/dist/elements/label/Label.styled.d.ts +5 -0
- package/dist/elements/styled/Select.styled.d.ts +20 -0
- package/dist/enums/chop-logic-alert-mode.d.ts +7 -0
- package/dist/{components/misc/icon/Icon.d.ts → enums/chop-logic-icon-name.d.ts} +0 -6
- package/dist/enums/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/use-chop-logic-theme/index.d.ts +1 -0
- package/dist/index.cjs.js +708 -772
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +11943 -11840
- package/dist/index.es.js.map +1 -1
- package/dist/{utils/types.d.ts → types/chop-logic-theme.d.ts} +4 -22
- package/dist/types/components/_common.d.ts +15 -0
- package/dist/{components/modals/alert/types.d.ts → types/components/alert.d.ts} +4 -3
- package/dist/{components/inputs/button/types.d.ts → types/components/button.d.ts} +3 -3
- package/dist/{components/inputs/checkbox/types.d.ts → types/components/checkbox.d.ts} +1 -1
- package/dist/{components/modals/dialog/types.d.ts → types/components/dialog.d.ts} +3 -1
- package/dist/{components/containers/form/types.d.ts → types/components/form.d.ts} +1 -1
- package/dist/{components/containers/grid/types.d.ts → types/components/grid.d.ts} +1 -1
- package/dist/types/components/multi-select.d.ts +38 -0
- package/dist/{components/inputs/numeric/types.d.ts → types/components/numeric.d.ts} +1 -1
- package/dist/types/components/select.d.ts +45 -0
- package/dist/{components/containers/tabs/types.d.ts → types/components/tabs.d.ts} +11 -1
- package/dist/{components/inputs/text/types.d.ts → types/components/text.d.ts} +1 -1
- package/dist/{components/modals/tooltip/types.d.ts → types/components/tooltip.d.ts} +1 -1
- package/dist/types/index.d.ts +13 -0
- package/dist/utils/get-chop-logic-theme.d.ts +2 -2
- package/dist/utils/handle-dropdown-list-key-press.d.ts +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/package.json +14 -13
- 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 -3
- package/dist/components/inputs/multi-select/MultiSelect.styled.d.ts +0 -10
- package/dist/components/inputs/multi-select/types.d.ts +0 -18
- package/dist/components/inputs/select/Select.styled.d.ts +0 -10
- package/dist/components/inputs/select/types.d.ts +0 -14
- package/dist/constants/style-variables.d.ts +0 -51
- /package/dist/components/containers/portal/{index.d.ts → Portal.d.ts} +0 -0
- /package/dist/{constants → css}/animations.d.ts +0 -0
- /package/dist/{components/inputs/_common → elements}/error-message/__tests__/ErrorMessage.test.d.ts +0 -0
- /package/dist/{components/inputs/_common → elements}/input-inner-button/__tests__/InputInnerButton.test.d.ts +0 -0
- /package/dist/{components/inputs/_common → elements}/label/__tests__/Label.test.d.ts +0 -0
- /package/dist/{components/misc/icon/elements/ArrowDown.d.ts → icons/ArrowDownIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/ArrowUp.d.ts → icons/ArrowUpIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Back.d.ts → icons/BackIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Cancel.d.ts → icons/CancelIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/CheckMark.d.ts → icons/CheckMarkIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/CheckboxChecked.d.ts → icons/CheckboxCheckedIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/CheckboxUnchecked.d.ts → icons/CheckboxUncheckedIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/ChevronDown.d.ts → icons/ChevronDownIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/ChevronLeft.d.ts → icons/ChevronLeftIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/ChevronRight.d.ts → icons/ChevronRightIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/ChevronUp.d.ts → icons/ChevronUpIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Clear.d.ts → icons/ClearIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Copy.d.ts → icons/CopyIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Cut.d.ts → icons/CutIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Delete.d.ts → icons/DeleteIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Download.d.ts → icons/DownloadIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Error.d.ts → icons/ErrorIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Forward.d.ts → icons/ForwardIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Help.d.ts → icons/HelpIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Hide.d.ts → icons/HideIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Info.d.ts → icons/InfoIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Paste.d.ts → icons/PasteIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Question.d.ts → icons/QuestionIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Remove.d.ts → icons/RemoveIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Save.d.ts → icons/SaveIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Show.d.ts → icons/ShowIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Upload.d.ts → icons/UploadIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon/elements/Warning.d.ts → icons/WarningIcon.d.ts} +0 -0
- /package/dist/{components/misc/icon → icons}/__tests__/Icons.test.d.ts +0 -0
|
@@ -1,36 +1,18 @@
|
|
|
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
1
|
export interface ChopLogicTheme {
|
|
24
2
|
primaryColor: string;
|
|
25
3
|
secondaryColor: string;
|
|
26
4
|
tertiaryColor: string;
|
|
27
5
|
backgroundColor: string;
|
|
28
6
|
accentColor: string;
|
|
7
|
+
transparentBackgroundColor: string;
|
|
29
8
|
primaryGradient: string;
|
|
30
9
|
accentGradient: string;
|
|
31
10
|
tintGradient: string;
|
|
32
11
|
coreFontFamily: string;
|
|
33
12
|
monospaceFontFamily: string;
|
|
13
|
+
baseFontSize: string;
|
|
14
|
+
smallFontSize: string;
|
|
15
|
+
headerFontSize: string;
|
|
34
16
|
smallGap: string;
|
|
35
17
|
mediumGap: string;
|
|
36
18
|
bigGap: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ChopLogicAlertMode, ChopLogicIconName } from '../../enums';
|
|
2
|
+
import { ChopLogicTheme } from '..';
|
|
3
|
+
import { CommonComponentProps } from './_common';
|
|
3
4
|
|
|
4
|
-
export type ChopLogicAlertMode = 'success' | 'error' | 'warning' | 'info' | 'help';
|
|
5
5
|
export type ChopLogicAlertProps = CommonComponentProps & {
|
|
6
6
|
isOpened: boolean;
|
|
7
7
|
onClose: () => void;
|
|
@@ -11,6 +11,7 @@ export type ChopLogicAlertProps = CommonComponentProps & {
|
|
|
11
11
|
};
|
|
12
12
|
export type ChopLogicAlertHeaderProps = {
|
|
13
13
|
onClose: () => void;
|
|
14
|
+
theme: ChopLogicTheme;
|
|
14
15
|
mode: ChopLogicAlertMode;
|
|
15
16
|
title?: string;
|
|
16
17
|
icon?: ChopLogicIconName;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ChopLogicIconName } from '../../enums';
|
|
3
|
+
import { CommonInputProps } from './_common';
|
|
4
4
|
|
|
5
|
-
export type ChopLogicButtonView = '
|
|
5
|
+
export type ChopLogicButtonView = '3D' | 'flat' | 'icon';
|
|
6
6
|
export type ChopLogicButtonProps = Partial<CommonInputProps> & {
|
|
7
7
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
8
|
view?: ChopLogicButtonView;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ChopLogicTheme } from '..';
|
|
3
|
+
import { CommonComponentProps } from './_common';
|
|
3
4
|
|
|
4
5
|
export type ChopLogicDialogProps = CommonComponentProps & PropsWithChildren & {
|
|
5
6
|
isOpened: boolean;
|
|
@@ -10,4 +11,5 @@ export type DialogLayoutProps = PropsWithChildren & HTMLAttributes<HTMLDivElemen
|
|
|
10
11
|
title: string;
|
|
11
12
|
onClose: () => void;
|
|
12
13
|
isOpened: boolean;
|
|
14
|
+
theme: ChopLogicTheme;
|
|
13
15
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { CommonComponentProps } from '
|
|
2
|
+
import { CommonComponentProps } from './_common';
|
|
3
3
|
|
|
4
4
|
export type ChopLogicGridProps = CommonComponentProps & {
|
|
5
5
|
columns: ChopLogicGridColumn[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChopLogicTheme } from '..';
|
|
2
|
+
import { CommonInputProps } from './_common';
|
|
3
|
+
import { SelectValue } from './select';
|
|
4
|
+
|
|
5
|
+
export type MultiSelectValue = SelectValue & {
|
|
6
|
+
selected: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type ChopLogicMultiSelectProps = CommonInputProps & {
|
|
9
|
+
options: SelectValue[];
|
|
10
|
+
onChange?: (values?: SelectValue[]) => void;
|
|
11
|
+
defaultValue?: string | number | readonly string[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
};
|
|
14
|
+
export type MultiSelectDropdownProps = {
|
|
15
|
+
options: MultiSelectValue[];
|
|
16
|
+
opened: boolean;
|
|
17
|
+
dropdownId: string;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
onSelect: (id: string) => void;
|
|
20
|
+
theme: ChopLogicTheme;
|
|
21
|
+
};
|
|
22
|
+
export type MultiSelectComboboxProps = {
|
|
23
|
+
opened: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
required: boolean;
|
|
26
|
+
onClick: () => void;
|
|
27
|
+
comboboxId: string;
|
|
28
|
+
dropdownId: string;
|
|
29
|
+
values?: MultiSelectValue[];
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
name: string;
|
|
32
|
+
theme: ChopLogicTheme;
|
|
33
|
+
};
|
|
34
|
+
export type MultiSelectOptionProps = {
|
|
35
|
+
value: MultiSelectValue;
|
|
36
|
+
onSelect: (id: string) => void;
|
|
37
|
+
theme: ChopLogicTheme;
|
|
38
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler } from 'react';
|
|
2
|
-
import { CommonInputProps } from '
|
|
2
|
+
import { CommonInputProps } from './_common';
|
|
3
3
|
|
|
4
4
|
export type NumericValidationFunction = (input?: number) => boolean;
|
|
5
5
|
export type ChopLogicNumericInputProps = CommonInputProps & {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ChopLogicTheme } from '..';
|
|
2
|
+
import { CommonInputProps } from './_common';
|
|
3
|
+
|
|
4
|
+
export type SelectValue = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
} & {
|
|
8
|
+
[key in string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
export type ChopLogicSelectProps = CommonInputProps & {
|
|
11
|
+
options: SelectValue[];
|
|
12
|
+
onChange?: (value?: SelectValue) => void;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
defaultValue?: string | number | readonly string[];
|
|
15
|
+
};
|
|
16
|
+
export type SelectOptionProps = {
|
|
17
|
+
value: SelectValue;
|
|
18
|
+
isSelected: boolean;
|
|
19
|
+
onSelect: (id: string) => void;
|
|
20
|
+
onClear: () => void;
|
|
21
|
+
theme: ChopLogicTheme;
|
|
22
|
+
};
|
|
23
|
+
export type SelectComboboxProps = {
|
|
24
|
+
opened: boolean;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
required: boolean;
|
|
27
|
+
onClick: () => void;
|
|
28
|
+
comboboxId: string;
|
|
29
|
+
dropdownId: string;
|
|
30
|
+
selected?: SelectValue;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
name: string;
|
|
33
|
+
theme: ChopLogicTheme;
|
|
34
|
+
};
|
|
35
|
+
export type SelectDropdownProps = {
|
|
36
|
+
options: SelectValue[];
|
|
37
|
+
opened: boolean;
|
|
38
|
+
dropdownId: string;
|
|
39
|
+
comboboxId: string;
|
|
40
|
+
onClose: () => void;
|
|
41
|
+
selected?: SelectValue;
|
|
42
|
+
onSelect: (id: string) => void;
|
|
43
|
+
onClear: () => void;
|
|
44
|
+
theme: ChopLogicTheme;
|
|
45
|
+
};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ChopLogicTheme } from '..';
|
|
3
|
+
import { CommonComponentProps } from './_common';
|
|
3
4
|
|
|
4
5
|
export type ChopLogicTabsProps = CommonComponentProps & {
|
|
5
6
|
tabs: ChopLogicTabItem[];
|
|
6
7
|
defaultTabId?: string;
|
|
7
8
|
mode?: ChopLogicTabsMode;
|
|
8
9
|
};
|
|
10
|
+
export type ChopLogicTabListProps = {
|
|
11
|
+
tabs: ChopLogicTabItem[];
|
|
12
|
+
tabIds: string[];
|
|
13
|
+
onTabSelect: (id: string) => void;
|
|
14
|
+
selectedTabId: string;
|
|
15
|
+
tabPanelIds: string[];
|
|
16
|
+
mode: ChopLogicTabsMode;
|
|
17
|
+
theme: ChopLogicTheme;
|
|
18
|
+
};
|
|
9
19
|
export type ChopLogicTabItem = {
|
|
10
20
|
content: ReactElement;
|
|
11
21
|
title: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler, HTMLInputAutoCompleteAttribute } from 'react';
|
|
2
|
-
import { CommonInputProps } from '
|
|
2
|
+
import { CommonInputProps } from './_common';
|
|
3
3
|
|
|
4
4
|
export type RegExpWithFlags = {
|
|
5
5
|
regexp: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { CommonComponentProps } from '
|
|
2
|
+
import { CommonComponentProps } from './_common';
|
|
3
3
|
|
|
4
4
|
export type ChopLogicTooltipProps = PropsWithChildren & CommonComponentProps & {
|
|
5
5
|
tooltipContent: string | ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { ChopLogicTheme } from './chop-logic-theme.ts';
|
|
2
|
+
export * from './components/alert.ts';
|
|
3
|
+
export * from './components/button.ts';
|
|
4
|
+
export * from './components/checkbox.ts';
|
|
5
|
+
export * from './components/dialog.ts';
|
|
6
|
+
export * from './components/form.ts';
|
|
7
|
+
export * from './components/grid.ts';
|
|
8
|
+
export * from './components/multi-select.ts';
|
|
9
|
+
export * from './components/numeric.ts';
|
|
10
|
+
export * from './components/select.ts';
|
|
11
|
+
export * from './components/tabs.ts';
|
|
12
|
+
export * from './components/text.ts';
|
|
13
|
+
export * from './components/tooltip.ts';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ChopLogicTheme } from '
|
|
1
|
+
import { ChopLogicTheme } from '../types';
|
|
2
2
|
|
|
3
|
-
export declare function getChopLogicTheme(
|
|
3
|
+
export declare function getChopLogicTheme(mode?: 'dark' | 'light', customTheme?: Partial<ChopLogicTheme>): ChopLogicTheme;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent } from 'react';
|
|
2
|
-
import { SelectValue } from '
|
|
2
|
+
import { SelectValue } from '../types';
|
|
3
3
|
|
|
4
4
|
export declare function handleDropdownListKeyPress({ e, options, onClose, }: {
|
|
5
5
|
e: KeyboardEvent<HTMLUListElement>;
|
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.8",
|
|
8
8
|
"description": "React UI components library for Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.cjs.js",
|
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"keywords": [
|
|
35
|
+
"Chop Logic",
|
|
35
36
|
"React",
|
|
36
37
|
"TypeScript",
|
|
37
38
|
"Storybook",
|
|
38
|
-
"
|
|
39
|
+
"Styled components"
|
|
39
40
|
],
|
|
40
41
|
"author": "Dmitrii Suroviagin",
|
|
41
42
|
"license": "ISC",
|
|
@@ -47,16 +48,16 @@
|
|
|
47
48
|
"@chromatic-com/storybook": "^3.1.0",
|
|
48
49
|
"@commitlint/cli": "^19.3.0",
|
|
49
50
|
"@commitlint/config-conventional": "^19.2.2",
|
|
50
|
-
"@storybook/addon-essentials": "^8.4.
|
|
51
|
-
"@storybook/addon-interactions": "^8.4.
|
|
52
|
-
"@storybook/addon-links": "^8.4.
|
|
53
|
-
"@storybook/addon-mdx-gfm": "^8.4.
|
|
54
|
-
"@storybook/blocks": "^8.4.
|
|
55
|
-
"@storybook/manager-api": "^8.4.
|
|
56
|
-
"@storybook/react": "^8.4.
|
|
57
|
-
"@storybook/react-vite": "^8.4.
|
|
58
|
-
"@storybook/test": "^8.4.
|
|
59
|
-
"@storybook/theming": "^8.4.
|
|
51
|
+
"@storybook/addon-essentials": "^8.4.6",
|
|
52
|
+
"@storybook/addon-interactions": "^8.4.6",
|
|
53
|
+
"@storybook/addon-links": "^8.4.6",
|
|
54
|
+
"@storybook/addon-mdx-gfm": "^8.4.6",
|
|
55
|
+
"@storybook/blocks": "^8.4.6",
|
|
56
|
+
"@storybook/manager-api": "^8.4.6",
|
|
57
|
+
"@storybook/react": "^8.4.6",
|
|
58
|
+
"@storybook/react-vite": "^8.4.6",
|
|
59
|
+
"@storybook/test": "^8.4.6",
|
|
60
|
+
"@storybook/theming": "^8.4.6",
|
|
60
61
|
"@testing-library/jest-dom": "^6.4.2",
|
|
61
62
|
"@testing-library/react": "^15.0.6",
|
|
62
63
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"jsdom": "^24.0.0",
|
|
77
78
|
"lint-staged": "^15.2.2",
|
|
78
79
|
"prettier": "^3.2.5",
|
|
79
|
-
"storybook": "^8.4.
|
|
80
|
+
"storybook": "^8.4.6",
|
|
80
81
|
"styled-components": "^6.1.12",
|
|
81
82
|
"typescript": "^5.4.5",
|
|
82
83
|
"vite": "^5.2.10",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StyledInputInnerButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const StyledLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
2
|
-
export declare const StyledLabelText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
3
|
-
export declare const StyledRequiredSign: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const StyledMultiSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
$disabled: boolean;
|
|
3
|
-
}>> & string;
|
|
4
|
-
export declare const StyledMultiSelectCombobox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
5
|
-
export declare const StyledMultiSelectPlaceholder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
6
|
-
export declare const StyledMultiSelectLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
7
|
-
export declare const StyledMultiSelectDropdown: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
8
|
-
$opened: boolean;
|
|
9
|
-
}>> & string;
|
|
10
|
-
export declare const StyledMultiSelectOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommonInputProps, SelectValue } from '../../../../../../../../../src/utils/types';
|
|
2
|
-
|
|
3
|
-
export type MultiSelectValue = SelectValue & {
|
|
4
|
-
selected: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type ChopLogicMultiSelectProps = CommonInputProps & {
|
|
7
|
-
options: SelectValue[];
|
|
8
|
-
onChange?: (values?: SelectValue[]) => void;
|
|
9
|
-
defaultValue?: string | number | readonly string[];
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
};
|
|
12
|
-
export type MultiSelectDropdownProps = {
|
|
13
|
-
options: MultiSelectValue[];
|
|
14
|
-
opened: boolean;
|
|
15
|
-
dropdownId: string;
|
|
16
|
-
onClose: () => void;
|
|
17
|
-
onSelect: (id: string) => void;
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const StyledSelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
$disabled: boolean;
|
|
3
|
-
}>> & string;
|
|
4
|
-
export declare const StyledSelectCombobox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
5
|
-
export declare const StyledSelectPlaceholder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
6
|
-
export declare const StyledSelectLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
7
|
-
export declare const StyledSelectDropdown: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
8
|
-
$opened: boolean;
|
|
9
|
-
}>> & string;
|
|
10
|
-
export declare const StyledSelectOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CommonInputProps, SelectValue } from '../../../../../../../../../src/utils/types';
|
|
2
|
-
|
|
3
|
-
export type ChopLogicSelectProps = CommonInputProps & {
|
|
4
|
-
options: SelectValue[];
|
|
5
|
-
onChange?: (value?: SelectValue) => void;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
defaultValue?: string | number | readonly string[];
|
|
8
|
-
};
|
|
9
|
-
export type SelectOptionProps = {
|
|
10
|
-
value: SelectValue;
|
|
11
|
-
isSelected: boolean;
|
|
12
|
-
onSelect: (id: string) => void;
|
|
13
|
-
onClear: () => void;
|
|
14
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export declare const COLORS: Readonly<{
|
|
2
|
-
primary: "hsl(0, 0%, 13%)";
|
|
3
|
-
secondary: "hsl(215, 69%, 49%)";
|
|
4
|
-
tertiary: "hsl(205, 48%, 56%)";
|
|
5
|
-
background: "hsl(0, 0%, 100%)";
|
|
6
|
-
highlight: "hsl(65, 43%, 95%)";
|
|
7
|
-
shade: "hsl(206, 19%, 93%)";
|
|
8
|
-
accent: "hsl(16, 100%, 45%)";
|
|
9
|
-
transparentBackground: "hsla(0, 0%, 0%, 0.3)";
|
|
10
|
-
}>;
|
|
11
|
-
export declare const FONTS: Readonly<{
|
|
12
|
-
core: "Arial, Helvetica, sans-serif";
|
|
13
|
-
monospace: "'Courier New', Courier, monospace";
|
|
14
|
-
}>;
|
|
15
|
-
export declare const UNITS: Readonly<{
|
|
16
|
-
smallGap: "0.25rem";
|
|
17
|
-
mediumGap: "0.6rem";
|
|
18
|
-
bigGap: "1rem";
|
|
19
|
-
minElementSize: "2.75rem";
|
|
20
|
-
smallIconSize: "1.6rem";
|
|
21
|
-
blockBorderRadius: "0.375rem";
|
|
22
|
-
fieldWrapperHeight: "2.125rem";
|
|
23
|
-
}>;
|
|
24
|
-
export declare const SHADOWS: Readonly<{
|
|
25
|
-
box: "rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px";
|
|
26
|
-
text: "2.4px 2.4px 3.2px rgba(0, 0, 0, 0.3)";
|
|
27
|
-
inset: "-5px 5px 20px 5px rgba(0, 0, 0, 0.1) inset";
|
|
28
|
-
}>;
|
|
29
|
-
export declare const BORDERS: Readonly<{
|
|
30
|
-
thin: "1px solid #5998c5";
|
|
31
|
-
thick: "1px solid #266dd3";
|
|
32
|
-
accent: "1px solid #e53d00";
|
|
33
|
-
outline: "2px dashed #e53d00";
|
|
34
|
-
}>;
|
|
35
|
-
export declare const Z_INDEXES: Readonly<{
|
|
36
|
-
dropdown: 1000;
|
|
37
|
-
modal: 1000;
|
|
38
|
-
tooltip: 1000;
|
|
39
|
-
}>;
|
|
40
|
-
export declare const GRADIENTS: Readonly<{
|
|
41
|
-
primary: "linear-gradient(0deg, #222222, #266dd3)";
|
|
42
|
-
accent: "linear-gradient(0deg, #222222, #e53d00)";
|
|
43
|
-
tint: "linear-gradient(0deg, #e9edf0, #f6f7eb)";
|
|
44
|
-
}>;
|
|
45
|
-
export declare const SCREEN_BREAKPOINTS: Readonly<{
|
|
46
|
-
phones: "only screen and (max-width: 600px)";
|
|
47
|
-
portraitTablets: "only screen and (min-width: 600px)";
|
|
48
|
-
landscapeTablets: "only screen and (min-width: 768px)";
|
|
49
|
-
laptops: "only screen and (min-width: 992px)";
|
|
50
|
-
desktops: "only screen and (min-width: 1200px)";
|
|
51
|
-
}>;
|
|
File without changes
|
|
File without changes
|
/package/dist/{components/inputs/_common → elements}/error-message/__tests__/ErrorMessage.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components/misc/icon/elements/CheckboxChecked.d.ts → icons/CheckboxCheckedIcon.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components/misc/icon/elements/ChevronRight.d.ts → icons/ChevronRightIcon.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|