@elliemae/ds-mini-toolbar 2.3.0-alpha.8 → 2.3.0-alpha.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.
@@ -0,0 +1,21 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
+ import React from 'react';
3
+ import { MiniToolbarPropsT } from '../index.d';
4
+ declare const MiniToolbar: {
5
+ ({ items, overflowButtonProps }: MiniToolbarPropsT): React.ReactElement;
6
+ propTypes: {
7
+ items: import("react-desc").PropTypesDescValue;
8
+ overflowButtonProps: {
9
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
10
+ deprecated: import("react-desc").PropTypesDescValidator;
11
+ };
12
+ isRequired: import("react-desc").PropTypesDescValue;
13
+ };
14
+ };
15
+ };
16
+ declare const MiniToolbarWithSchema: {
17
+ (props?: unknown): JSX.Element;
18
+ propTypes: unknown;
19
+ toTypescript: () => import("react-desc").TypescriptSchema;
20
+ };
21
+ export { MiniToolbar, MiniToolbarWithSchema };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { 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 { 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 { 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 { GeneratedDropdownItemT, MiniToolbarItemT } from '../index.d';
3
+ declare const useGenerateItems: (items: MiniToolbarItemT[]) => [React.ReactElement[], GeneratedDropdownItemT[]];
4
+ export { useGenerateItems };
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ declare type SvgIconSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
+ declare type SvgIconColorType = ['neutral', '900'] | ['neutral', '500'] | ['neutral', '0'] | ['danger', '900'] | ['warning', '600'] | ['success', '900'] | ['brand-primary', '600'];
4
+ declare 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
+ declare type ShortcutProps = {
11
+ style?: React.CSSProperties;
12
+ } & Record<string, unknown>;
13
+ declare type ContextualRegionProps = {
14
+ position?: 'left' | 'right';
15
+ isOpen: boolean;
16
+ } & Record<string, unknown>;
17
+ declare 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
+ declare 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
+ declare type MiniToolbarIconItemPropsT = DefaultIconItemProps & Record<string, unknown>;
41
+ declare 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
+ declare 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 { 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,17 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
+ /// <reference types="react" />
3
+ declare const miniToolbarProps: {
4
+ items: import("react-desc").PropTypesDescValue;
5
+ overflowButtonProps: {
6
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
7
+ deprecated: import("react-desc").PropTypesDescValidator;
8
+ };
9
+ isRequired: import("react-desc").PropTypesDescValue;
10
+ };
11
+ };
12
+ declare const ToolbarItemWithSchema: {
13
+ (props?: unknown): JSX.Element;
14
+ propTypes: unknown;
15
+ toTypescript: () => import("react-desc").TypescriptSchema;
16
+ };
17
+ export { ToolbarItemWithSchema, miniToolbarProps };
@@ -0,0 +1,5 @@
1
+ declare const Container: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
2
+ declare const Separator: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
3
+ declare const Item: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
4
+ declare const StyledButton: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, 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, []>;
7
+ ariaLabel: string;
8
+ };
9
+ dropdownComponentProps: {
10
+ label: string;
11
+ size: string;
12
+ onClick: jest.Mock<null, []>;
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, []>;
35
+ color: string[];
36
+ };
37
+ } | {
38
+ component: string;
39
+ hasShortcut: boolean;
40
+ shortcutProps: {
41
+ size: string;
42
+ onClick: jest.Mock<null, []>;
43
+ ariaLabel?: undefined;
44
+ };
45
+ dropdownComponentProps: {
46
+ label: string;
47
+ size: string;
48
+ onClick: jest.Mock<null, []>;
49
+ };
50
+ sharedProps: {
51
+ Icon: (rest: any) => JSX.Element;
52
+ color: string[];
53
+ onClick: jest.Mock<null, []>;
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, []>;
86
+ ariaLabel: string;
87
+ };
88
+ dropdownComponentProps: {
89
+ label: string;
90
+ size: string;
91
+ onClick: jest.Mock<null, []>;
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, []>;
114
+ color: string[];
115
+ };
116
+ } | {
117
+ component: string;
118
+ hasShortcut: boolean;
119
+ shortcutProps: {
120
+ size: string;
121
+ onClick: jest.Mock<null, []>;
122
+ ariaLabel?: undefined;
123
+ };
124
+ dropdownComponentProps: {
125
+ label: string;
126
+ size: string;
127
+ onClick: jest.Mock<null, []>;
128
+ };
129
+ sharedProps: {
130
+ Icon: (rest: any) => JSX.Element;
131
+ color: string[];
132
+ onClick: jest.Mock<null, []>;
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, []>;
160
+ export const dropdownCb: jest.Mock<null, []>;
161
+ export const sharedCb: jest.Mock<null, []>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-mini-toolbar",
3
- "version": "2.3.0-alpha.8",
3
+ "version": "2.3.0-alpha.9",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - MiniToolbar",
6
6
  "files": [
@@ -69,11 +69,11 @@
69
69
  },
70
70
  "author": "ICE MT",
71
71
  "dependencies": {
72
- "@elliemae/ds-button": "2.3.0-alpha.8",
73
- "@elliemae/ds-dropdownmenu": "2.3.0-alpha.8",
74
- "@elliemae/ds-form": "2.3.0-alpha.8",
75
- "@elliemae/ds-icons": "2.3.0-alpha.8",
76
- "@elliemae/ds-system": "2.3.0-alpha.8",
72
+ "@elliemae/ds-button": "2.3.0-alpha.9",
73
+ "@elliemae/ds-dropdownmenu": "2.3.0-alpha.9",
74
+ "@elliemae/ds-form": "2.3.0-alpha.9",
75
+ "@elliemae/ds-icons": "2.3.0-alpha.9",
76
+ "@elliemae/ds-system": "2.3.0-alpha.9",
77
77
  "react-desc": "~4.1.3",
78
78
  "uid": "~2.0.0"
79
79
  },