@elliemae/ds-mini-toolbar 3.14.0-next.8 → 3.14.0-rc.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.
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { MiniToolbarPropsT } from '../index.d';
3
+ declare const MiniToolbar: {
4
+ ({ items, overflowButtonProps }: MiniToolbarPropsT): React.ReactElement;
5
+ propTypes: {
6
+ items: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
7
+ overflowButtonProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
8
+ };
9
+ displayName: string;
10
+ };
11
+ declare const MiniToolbarWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<MiniToolbarPropsT>;
12
+ export { MiniToolbar, MiniToolbarWithSchema };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ToolbarShortcutPropsT } from '../index.d';
3
+ declare const ToolbarShortcut: (props: ToolbarShortcutPropsT) => React.ReactElement;
4
+ export { ToolbarShortcut };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MiniToolbarButton: (props: Record<string, unknown>) => React.ReactElement;
3
+ export { MiniToolbarButton };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MiniToolbarComboBox: (props: Record<string, unknown>) => React.ReactElement;
3
+ export { MiniToolbarComboBox };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { MiniToolbarIconItemPropsT } from '../../index.d';
3
+ declare const MiniToolbarIcon: (props: MiniToolbarIconItemPropsT) => React.ReactElement;
4
+ export { MiniToolbarIcon };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { MiniToolbarIconItemPropsT } from '../../index.d';
3
+ declare const MiniToolbarSearchButton: (props: MiniToolbarIconItemPropsT) => React.ReactElement;
4
+ declare const MiniToolbarSearchBox: (props: Record<string, unknown>) => JSX.Element;
5
+ export { MiniToolbarSearchButton, MiniToolbarSearchBox };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MiniToolbarSeparator: () => React.ReactElement;
3
+ export { MiniToolbarSeparator };
@@ -0,0 +1,10 @@
1
+ export { MiniToolbarButton } from './Button';
2
+ export { MiniToolbarIcon } from './IconItem';
3
+ export { MiniToolbarSearchBox } from './SearchBox';
4
+ export { MiniToolbarSeparator } from './Separator';
5
+ export { MiniToolbarComboBox } from './ComboBox';
6
+ export declare const ICON_ITEM = "ds-icon-item";
7
+ export declare const SEPARATOR = "ds-separator";
8
+ export declare const BUTTON = "ds-button";
9
+ export declare const SEARCH_BOX = "ds-search-box";
10
+ export declare const COMBO_BOX = "ds-combo-box";
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { GeneratedDropdownItemT, MiniToolbarItemT } from '../index.d';
3
+ declare const useGenerateItems: (items: MiniToolbarItemT[]) => [React.ReactElement[], GeneratedDropdownItemT[]];
4
+ export { useGenerateItems };
@@ -0,0 +1,75 @@
1
+ import type React from 'react';
2
+ type SvgIconSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
+ type SvgIconColorType = ['neutral', '900'] | ['neutral', '500'] | ['neutral', '0'] | ['danger', '900'] | ['warning', '600'] | ['success', '900'] | ['brand-primary', '600'];
4
+ type SharedProps = {
5
+ options?: Record<string, unknown>[];
6
+ onClick?: (item: MiniToolbarItemT) => void;
7
+ Icon?: React.ComponentType<Record<string, unknown>>;
8
+ label?: string;
9
+ } & Record<string, unknown>;
10
+ type ShortcutProps = {
11
+ style?: React.CSSProperties;
12
+ } & Record<string, unknown>;
13
+ type ContextualRegionProps = {
14
+ position?: 'left' | 'right';
15
+ isOpen: boolean;
16
+ } & Record<string, unknown>;
17
+ type DropdownComponentProps = {
18
+ onClick?: (item: MiniToolbarItemT) => void;
19
+ label?: string;
20
+ Icon?: React.ComponentType<Record<string, unknown>>;
21
+ color?: SvgIconColorType;
22
+ onSelectMenuItem: (option: Record<string, unknown>) => void;
23
+ } & Record<string, unknown>;
24
+ type OverflowButtonProps = {
25
+ ariaLabel?: string;
26
+ style?: React.CSSProperties;
27
+ buttonType?: 'secondary' | 'text';
28
+ };
29
+ interface DefaultIconItemProps {
30
+ Icon: React.ComponentType<{
31
+ size: SvgIconSizeType;
32
+ color: SvgIconColorType;
33
+ }>;
34
+ size?: SvgIconSizeType;
35
+ color?: SvgIconColorType;
36
+ onClick?: (item: MiniToolbarItemT) => void;
37
+ ariaLabel?: string;
38
+ style?: React.CSSProperties;
39
+ }
40
+ type MiniToolbarIconItemPropsT = DefaultIconItemProps & Record<string, unknown>;
41
+ type MiniToolbarButtonPropsT = {
42
+ ariaLabel: string;
43
+ } & Record<string, unknown>;
44
+ interface MiniToolbarItemT {
45
+ component: 'ds-button' | 'ds-icon-item' | 'ds-separator' | 'ds-search-box' | 'ds-combo-box' | React.ReactElement;
46
+ hasShortcut?: boolean;
47
+ shortcutComponent?: React.ReactElement;
48
+ shortcutProps?: ShortcutProps;
49
+ dropdownComponentProps?: DropdownComponentProps;
50
+ sharedProps?: SharedProps;
51
+ contextualRegion?: React.ReactElement;
52
+ contextualRegionProps?: ContextualRegionProps;
53
+ [key: string]: unknown;
54
+ }
55
+ interface ToolbarShortcutPropsT {
56
+ Component: React.ComponentType<Record<string, unknown>>;
57
+ shortcutProps: ShortcutProps;
58
+ sharedProps: SharedProps;
59
+ ContextualRegion: React.ComponentType<Record<string, unknown>>;
60
+ contextualRegionProps: ContextualRegionProps;
61
+ }
62
+ interface MiniToolbarPropsT {
63
+ items: MiniToolbarItemT[];
64
+ overflowButtonProps?: OverflowButtonProps;
65
+ }
66
+ type GeneratedDropdownItemT = {
67
+ id?: string;
68
+ label?: string;
69
+ onClick?: (item: MiniToolbarItemT) => void;
70
+ onKeyDown?: (e: React.KeyboardEvent) => void;
71
+ leftAddon?: React.ReactElement;
72
+ subItems?: Record<string, unknown>[];
73
+ type?: 'separator' | 'subMenu';
74
+ };
75
+ export type { MiniToolbarIconItemPropsT, MiniToolbarButtonPropsT, MiniToolbarItemT, ToolbarShortcutPropsT, MiniToolbarPropsT, GeneratedDropdownItemT, };
@@ -0,0 +1,2 @@
1
+ export { MiniToolbar, MiniToolbarWithSchema } from './Components/MiniToolbar';
2
+ export { ToolbarItemWithSchema } from './propTypes';
@@ -0,0 +1,6 @@
1
+ declare const miniToolbarProps: {
2
+ items: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
3
+ overflowButtonProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
4
+ };
5
+ declare const ToolbarItemWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<unknown>;
6
+ export { ToolbarItemWithSchema, miniToolbarProps };
@@ -0,0 +1,5 @@
1
+ declare const Container: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
2
+ declare const Separator: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
3
+ declare const Item: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
4
+ declare const StyledButton: import("styled-components").StyledComponent<any, import("@elliemae/ds-system").Theme, any, any>;
5
+ export { Container, Separator, Item, StyledButton };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,161 @@
1
+ export const testItems: ({
2
+ component: string;
3
+ hasShortcut: boolean;
4
+ shortcutProps: {
5
+ size: string;
6
+ onClick: jest.Mock<null, [], any>;
7
+ ariaLabel: string;
8
+ };
9
+ dropdownComponentProps: {
10
+ label: string;
11
+ size: string;
12
+ onClick: jest.Mock<null, [], any>;
13
+ };
14
+ sharedProps: {
15
+ Icon: (rest: any) => JSX.Element;
16
+ color: string[];
17
+ onClick?: undefined;
18
+ };
19
+ } | {
20
+ component: string;
21
+ hasShortcut: boolean;
22
+ shortcutProps: {
23
+ size: string;
24
+ onClick?: undefined;
25
+ ariaLabel?: undefined;
26
+ };
27
+ dropdownComponentProps: {
28
+ label: string;
29
+ size: string;
30
+ onClick?: undefined;
31
+ };
32
+ sharedProps: {
33
+ Icon: (rest: any) => JSX.Element;
34
+ onClick: jest.Mock<null, [], any>;
35
+ color: string[];
36
+ };
37
+ } | {
38
+ component: string;
39
+ hasShortcut: boolean;
40
+ shortcutProps: {
41
+ size: string;
42
+ onClick: jest.Mock<null, [], any>;
43
+ ariaLabel?: undefined;
44
+ };
45
+ dropdownComponentProps: {
46
+ label: string;
47
+ size: string;
48
+ onClick: jest.Mock<null, [], any>;
49
+ };
50
+ sharedProps: {
51
+ Icon: (rest: any) => JSX.Element;
52
+ color: string[];
53
+ onClick: jest.Mock<null, [], any>;
54
+ };
55
+ } | {
56
+ component: string;
57
+ hasShortcut: boolean;
58
+ shortcutProps?: undefined;
59
+ dropdownComponentProps?: undefined;
60
+ sharedProps?: undefined;
61
+ } | {
62
+ component: string;
63
+ hasShortcut: boolean;
64
+ shortcutProps: {
65
+ size: string;
66
+ onClick?: undefined;
67
+ ariaLabel?: undefined;
68
+ };
69
+ dropdownComponentProps: {
70
+ label: string;
71
+ size: string;
72
+ onClick?: undefined;
73
+ };
74
+ sharedProps: {
75
+ Icon: (rest: any) => JSX.Element;
76
+ color: string[];
77
+ onClick?: undefined;
78
+ };
79
+ })[];
80
+ export function addContextualRegionToItems(isOpen: any): ({
81
+ component: string;
82
+ hasShortcut: boolean;
83
+ shortcutProps: {
84
+ size: string;
85
+ onClick: jest.Mock<null, [], any>;
86
+ ariaLabel: string;
87
+ };
88
+ dropdownComponentProps: {
89
+ label: string;
90
+ size: string;
91
+ onClick: jest.Mock<null, [], any>;
92
+ };
93
+ sharedProps: {
94
+ Icon: (rest: any) => JSX.Element;
95
+ color: string[];
96
+ onClick?: undefined;
97
+ };
98
+ } | {
99
+ component: string;
100
+ hasShortcut: boolean;
101
+ shortcutProps: {
102
+ size: string;
103
+ onClick?: undefined;
104
+ ariaLabel?: undefined;
105
+ };
106
+ dropdownComponentProps: {
107
+ label: string;
108
+ size: string;
109
+ onClick?: undefined;
110
+ };
111
+ sharedProps: {
112
+ Icon: (rest: any) => JSX.Element;
113
+ onClick: jest.Mock<null, [], any>;
114
+ color: string[];
115
+ };
116
+ } | {
117
+ component: string;
118
+ hasShortcut: boolean;
119
+ shortcutProps: {
120
+ size: string;
121
+ onClick: jest.Mock<null, [], any>;
122
+ ariaLabel?: undefined;
123
+ };
124
+ dropdownComponentProps: {
125
+ label: string;
126
+ size: string;
127
+ onClick: jest.Mock<null, [], any>;
128
+ };
129
+ sharedProps: {
130
+ Icon: (rest: any) => JSX.Element;
131
+ color: string[];
132
+ onClick: jest.Mock<null, [], any>;
133
+ };
134
+ } | {
135
+ component: string;
136
+ hasShortcut: boolean;
137
+ shortcutProps?: undefined;
138
+ dropdownComponentProps?: undefined;
139
+ sharedProps?: undefined;
140
+ } | {
141
+ component: string;
142
+ hasShortcut: boolean;
143
+ shortcutProps: {
144
+ size: string;
145
+ onClick?: undefined;
146
+ ariaLabel?: undefined;
147
+ };
148
+ dropdownComponentProps: {
149
+ label: string;
150
+ size: string;
151
+ onClick?: undefined;
152
+ };
153
+ sharedProps: {
154
+ Icon: (rest: any) => JSX.Element;
155
+ color: string[];
156
+ onClick?: undefined;
157
+ };
158
+ })[];
159
+ export const shortcutCb: jest.Mock<null, [], any>;
160
+ export const dropdownCb: jest.Mock<null, [], any>;
161
+ export const sharedCb: jest.Mock<null, [], any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-mini-toolbar",
3
- "version": "3.14.0-next.8",
3
+ "version": "3.14.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - MiniToolbar",
6
6
  "files": [
@@ -76,12 +76,12 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "uid": "~2.0.0",
79
- "@elliemae/ds-button": "3.14.0-next.8",
80
- "@elliemae/ds-form": "3.14.0-next.8",
81
- "@elliemae/ds-system": "3.14.0-next.8",
82
- "@elliemae/ds-icons": "3.14.0-next.8",
83
- "@elliemae/ds-utilities": "3.14.0-next.8",
84
- "@elliemae/ds-dropdownmenu": "3.14.0-next.8"
79
+ "@elliemae/ds-dropdownmenu": "3.14.0-rc.0",
80
+ "@elliemae/ds-form": "3.14.0-rc.0",
81
+ "@elliemae/ds-icons": "3.14.0-rc.0",
82
+ "@elliemae/ds-system": "3.14.0-rc.0",
83
+ "@elliemae/ds-button": "3.14.0-rc.0",
84
+ "@elliemae/ds-utilities": "3.14.0-rc.0"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@testing-library/react": "~12.1.3",