chop-logic-components 1.0.7 → 1.0.9

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.
Files changed (51) hide show
  1. package/dist/components/containers/form/Form.styled.d.ts +4 -0
  2. package/dist/components/containers/grid/Grid.styled.d.ts +26 -7
  3. package/dist/components/containers/grid/elements/Body.d.ts +2 -1
  4. package/dist/components/containers/grid/elements/Checkbox.d.ts +2 -0
  5. package/dist/components/containers/grid/elements/ColumnGroup.d.ts +2 -1
  6. package/dist/components/containers/grid/elements/DataCell.d.ts +2 -0
  7. package/dist/components/containers/grid/elements/Head.d.ts +2 -1
  8. package/dist/components/containers/grid/elements/HeaderCell.d.ts +2 -0
  9. package/dist/components/containers/grid/elements/Row.d.ts +2 -0
  10. package/dist/components/containers/grid/elements/SelectAllRowsCell.d.ts +2 -0
  11. package/dist/components/containers/grid/elements/SelectRowCell.d.ts +2 -0
  12. package/dist/components/containers/tabs/Tabs.styled.d.ts +6 -2
  13. package/dist/components/containers/tabs/elements/TabButton.d.ts +2 -1
  14. package/dist/components/containers/tabs/elements/TabContent.d.ts +2 -1
  15. package/dist/components/containers/tabs/elements/TabList.d.ts +1 -9
  16. package/dist/components/inputs/button/Button.styled.d.ts +7 -1
  17. package/dist/components/inputs/checkbox/Checkbox.styled.d.ts +3 -0
  18. package/dist/components/inputs/multi-select/elements/Combobox.d.ts +2 -13
  19. package/dist/components/inputs/multi-select/elements/Option.d.ts +2 -6
  20. package/dist/components/inputs/numeric/NumericInput.styled.d.ts +5 -1
  21. package/dist/components/inputs/select/elements/Combobox.d.ts +1 -12
  22. package/dist/components/inputs/select/elements/Dropdown.d.ts +1 -11
  23. package/dist/components/inputs/text/TextInput.styled.d.ts +5 -1
  24. package/dist/components/modals/alert/Alert.styled.d.ts +9 -2
  25. package/dist/components/modals/dialog/Dialog.styled.d.ts +12 -3
  26. package/dist/components/modals/dialog/elements/Header.d.ts +2 -0
  27. package/dist/components/modals/tooltip/Tooltip.styled.d.ts +5 -1
  28. package/dist/contexts/chop-logic-theme-context.d.ts +11 -0
  29. package/dist/contexts/index.d.ts +1 -0
  30. package/dist/elements/error-message/ErrorMessage.d.ts +2 -0
  31. package/dist/elements/error-message/ErrorMessage.styled.d.ts +3 -0
  32. package/dist/elements/input-inner-button/InputInnerButton.d.ts +2 -0
  33. package/dist/elements/input-inner-button/InputInnerButton.styled.d.ts +5 -1
  34. package/dist/elements/label/Label.d.ts +2 -0
  35. package/dist/elements/label/Label.styled.d.ts +5 -1
  36. package/dist/elements/styled/Select.styled.d.ts +15 -4
  37. package/dist/hooks/index.d.ts +1 -0
  38. package/dist/hooks/use-chop-logic-theme/index.d.ts +1 -0
  39. package/dist/index.cjs.js +320 -320
  40. package/dist/index.cjs.js.map +1 -1
  41. package/dist/index.d.ts +4 -0
  42. package/dist/index.es.js +8421 -8343
  43. package/dist/index.es.js.map +1 -1
  44. package/dist/types/components/_common.d.ts +0 -1
  45. package/dist/types/components/alert.d.ts +2 -0
  46. package/dist/types/components/dialog.d.ts +2 -0
  47. package/dist/types/components/multi-select.d.ts +19 -0
  48. package/dist/types/components/select.d.ts +25 -0
  49. package/dist/types/components/tabs.d.ts +10 -0
  50. package/dist/utils/get-chop-logic-theme.d.ts +1 -1
  51. package/package.json +3 -2
@@ -12,5 +12,4 @@ export type CommonComponentProps = {
12
12
  style?: CSSProperties;
13
13
  tabIndex?: number;
14
14
  title?: string;
15
- theme?: 'dark' | 'light';
16
15
  };
@@ -1,4 +1,5 @@
1
1
  import { ChopLogicAlertMode, ChopLogicIconName } from '../../enums';
2
+ import { ChopLogicTheme } from '..';
2
3
  import { CommonComponentProps } from './_common';
3
4
 
4
5
  export type ChopLogicAlertProps = CommonComponentProps & {
@@ -10,6 +11,7 @@ export type ChopLogicAlertProps = CommonComponentProps & {
10
11
  };
11
12
  export type ChopLogicAlertHeaderProps = {
12
13
  onClose: () => void;
14
+ theme: ChopLogicTheme;
13
15
  mode: ChopLogicAlertMode;
14
16
  title?: string;
15
17
  icon?: ChopLogicIconName;
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { ChopLogicTheme } from '..';
2
3
  import { CommonComponentProps } from './_common';
3
4
 
4
5
  export type ChopLogicDialogProps = CommonComponentProps & PropsWithChildren & {
@@ -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,3 +1,4 @@
1
+ import { ChopLogicTheme } from '..';
1
2
  import { CommonInputProps } from './_common';
2
3
  import { SelectValue } from './select';
3
4
 
@@ -16,4 +17,22 @@ export type MultiSelectDropdownProps = {
16
17
  dropdownId: string;
17
18
  onClose: () => void;
18
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;
19
38
  };
@@ -1,3 +1,4 @@
1
+ import { ChopLogicTheme } from '..';
1
2
  import { CommonInputProps } from './_common';
2
3
 
3
4
  export type SelectValue = {
@@ -17,4 +18,28 @@ export type SelectOptionProps = {
17
18
  isSelected: boolean;
18
19
  onSelect: (id: string) => void;
19
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;
20
45
  };
@@ -1,4 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
+ import { ChopLogicTheme } from '..';
2
3
  import { CommonComponentProps } from './_common';
3
4
 
4
5
  export type ChopLogicTabsProps = CommonComponentProps & {
@@ -6,6 +7,15 @@ export type ChopLogicTabsProps = CommonComponentProps & {
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,3 +1,3 @@
1
1
  import { ChopLogicTheme } from '../types';
2
2
 
3
- export declare function getChopLogicTheme(theme?: 'dark' | 'light', customThemeValues?: Partial<ChopLogicTheme>): ChopLogicTheme;
3
+ export declare function getChopLogicTheme(mode?: 'dark' | 'light', customTheme?: Partial<ChopLogicTheme>): ChopLogicTheme;
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",
7
+ "version": "1.0.9",
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
- "Chop Logic"
39
+ "Styled components"
39
40
  ],
40
41
  "author": "Dmitrii Suroviagin",
41
42
  "license": "ISC",