@elliemae/ds-mini-toolbar 2.3.0-alpha.8 → 2.3.0-next.2

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 (96) hide show
  1. package/cjs/Components/MiniToolbar.js +70 -0
  2. package/cjs/Components/ToolbarShortcut.js +72 -0
  3. package/cjs/Components/outOfTheBox/Button.js +29 -0
  4. package/cjs/Components/outOfTheBox/ComboBox.js +25 -0
  5. package/cjs/Components/outOfTheBox/IconItem.js +36 -0
  6. package/cjs/Components/outOfTheBox/SearchBox.js +55 -0
  7. package/cjs/Components/outOfTheBox/Separator.js +19 -0
  8. package/cjs/Components/outOfTheBox/index.js +26 -0
  9. package/cjs/hooks/useGenerateItems.js +134 -0
  10. package/cjs/index.d.js +2 -0
  11. package/cjs/index.js +12 -0
  12. package/cjs/propTypes.js +35 -0
  13. package/cjs/styles.js +29 -0
  14. package/esm/Components/MiniToolbar.js +60 -0
  15. package/esm/Components/ToolbarShortcut.js +63 -0
  16. package/esm/Components/outOfTheBox/Button.js +20 -0
  17. package/esm/Components/outOfTheBox/ComboBox.js +17 -0
  18. package/esm/Components/outOfTheBox/IconItem.js +28 -0
  19. package/esm/Components/outOfTheBox/SearchBox.js +45 -0
  20. package/esm/Components/outOfTheBox/Separator.js +11 -0
  21. package/esm/Components/outOfTheBox/index.js +13 -0
  22. package/esm/hooks/useGenerateItems.js +125 -0
  23. package/esm/index.d.js +1 -0
  24. package/esm/index.js +2 -0
  25. package/esm/propTypes.js +30 -0
  26. package/esm/styles.js +17 -0
  27. package/package.json +43 -45
  28. package/types/Components/MiniToolbar.d.ts +21 -0
  29. package/types/Components/ToolbarShortcut.d.ts +4 -0
  30. package/types/Components/outOfTheBox/Button.d.ts +3 -0
  31. package/types/Components/outOfTheBox/ComboBox.d.ts +3 -0
  32. package/types/Components/outOfTheBox/IconItem.d.ts +4 -0
  33. package/types/Components/outOfTheBox/SearchBox.d.ts +5 -0
  34. package/types/Components/outOfTheBox/Separator.d.ts +3 -0
  35. package/types/Components/outOfTheBox/index.d.ts +10 -0
  36. package/types/hooks/useGenerateItems.d.ts +4 -0
  37. package/types/index.d.d.ts +75 -0
  38. package/types/index.d.ts +2 -0
  39. package/types/propTypes.d.ts +17 -0
  40. package/types/styles.d.ts +5 -0
  41. package/types/tests/DSMiniToolbar.events.test.d.ts +1 -0
  42. package/types/tests/DSMiniToolbar.keyboard.test.d.ts +1 -0
  43. package/types/tests/DSMiniToolbar.test.d.ts +1 -0
  44. package/types/tests/utils.test.d.ts +161 -0
  45. package/dist/cjs/Components/MiniToolbar.js +0 -81
  46. package/dist/cjs/Components/MiniToolbar.js.map +0 -7
  47. package/dist/cjs/Components/ToolbarShortcut.js +0 -72
  48. package/dist/cjs/Components/ToolbarShortcut.js.map +0 -7
  49. package/dist/cjs/Components/outOfTheBox/Button.js +0 -41
  50. package/dist/cjs/Components/outOfTheBox/Button.js.map +0 -7
  51. package/dist/cjs/Components/outOfTheBox/ComboBox.js +0 -39
  52. package/dist/cjs/Components/outOfTheBox/ComboBox.js.map +0 -7
  53. package/dist/cjs/Components/outOfTheBox/IconItem.js +0 -50
  54. package/dist/cjs/Components/outOfTheBox/IconItem.js.map +0 -7
  55. package/dist/cjs/Components/outOfTheBox/SearchBox.js +0 -58
  56. package/dist/cjs/Components/outOfTheBox/SearchBox.js.map +0 -7
  57. package/dist/cjs/Components/outOfTheBox/Separator.js +0 -39
  58. package/dist/cjs/Components/outOfTheBox/Separator.js.map +0 -7
  59. package/dist/cjs/Components/outOfTheBox/index.js +0 -53
  60. package/dist/cjs/Components/outOfTheBox/index.js.map +0 -7
  61. package/dist/cjs/hooks/useGenerateItems.js +0 -120
  62. package/dist/cjs/hooks/useGenerateItems.js.map +0 -7
  63. package/dist/cjs/index.d.js +0 -27
  64. package/dist/cjs/index.d.js.map +0 -7
  65. package/dist/cjs/index.js +0 -38
  66. package/dist/cjs/index.js.map +0 -7
  67. package/dist/cjs/propTypes.js +0 -69
  68. package/dist/cjs/propTypes.js.map +0 -7
  69. package/dist/cjs/styles.js +0 -62
  70. package/dist/cjs/styles.js.map +0 -7
  71. package/dist/esm/Components/MiniToolbar.js +0 -52
  72. package/dist/esm/Components/MiniToolbar.js.map +0 -7
  73. package/dist/esm/Components/ToolbarShortcut.js +0 -43
  74. package/dist/esm/Components/ToolbarShortcut.js.map +0 -7
  75. package/dist/esm/Components/outOfTheBox/Button.js +0 -12
  76. package/dist/esm/Components/outOfTheBox/Button.js.map +0 -7
  77. package/dist/esm/Components/outOfTheBox/ComboBox.js +0 -10
  78. package/dist/esm/Components/outOfTheBox/ComboBox.js.map +0 -7
  79. package/dist/esm/Components/outOfTheBox/IconItem.js +0 -21
  80. package/dist/esm/Components/outOfTheBox/IconItem.js.map +0 -7
  81. package/dist/esm/Components/outOfTheBox/SearchBox.js +0 -29
  82. package/dist/esm/Components/outOfTheBox/SearchBox.js.map +0 -7
  83. package/dist/esm/Components/outOfTheBox/Separator.js +0 -10
  84. package/dist/esm/Components/outOfTheBox/Separator.js.map +0 -7
  85. package/dist/esm/Components/outOfTheBox/index.js +0 -24
  86. package/dist/esm/Components/outOfTheBox/index.js.map +0 -7
  87. package/dist/esm/hooks/useGenerateItems.js +0 -102
  88. package/dist/esm/hooks/useGenerateItems.js.map +0 -7
  89. package/dist/esm/index.d.js +0 -2
  90. package/dist/esm/index.d.js.map +0 -7
  91. package/dist/esm/index.js +0 -9
  92. package/dist/esm/index.js.map +0 -7
  93. package/dist/esm/propTypes.js +0 -40
  94. package/dist/esm/propTypes.js.map +0 -7
  95. package/dist/esm/styles.js +0 -33
  96. package/dist/esm/styles.js.map +0 -7
@@ -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, []>;
@@ -1,81 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var MiniToolbar_exports = {};
29
- __export(MiniToolbar_exports, {
30
- MiniToolbar: () => MiniToolbar,
31
- MiniToolbarWithSchema: () => MiniToolbarWithSchema
32
- });
33
- var React = __toESM(require("react"));
34
- var import_react = __toESM(require("react"));
35
- var import_react_desc = require("react-desc");
36
- var import_ds_dropdownmenu = require("@elliemae/ds-dropdownmenu");
37
- var import_ds_icons = require("@elliemae/ds-icons");
38
- var import_styles = require("../styles");
39
- var import_propTypes = require("../propTypes");
40
- var import_useGenerateItems = require("../hooks/useGenerateItems");
41
- const Elipsis = /* @__PURE__ */ import_react.default.createElement(import_ds_icons.MoreOptionsVert, {
42
- color: ["brand-primary", "600"],
43
- size: "m"
44
- });
45
- const MiniToolbar = ({ items, overflowButtonProps }) => {
46
- const [shortcutItems, dropdownMenuItems] = (0, import_useGenerateItems.useGenerateItems)(items);
47
- const [isDropdownMenuOpen, setIsDropdownMenuOpen] = (0, import_react.useState)(false);
48
- const closeDropdownMenu = (0, import_react.useCallback)(() => setIsDropdownMenuOpen(false), []);
49
- const openDropdownMenu = (0, import_react.useCallback)(() => setIsDropdownMenuOpen(true), []);
50
- const openDropdownMenuKeyPress = (0, import_react.useCallback)((e) => {
51
- if (e.key === " ") {
52
- setIsDropdownMenuOpen(true);
53
- }
54
- }, []);
55
- const { ariaLabel, style, buttonType = "secondary" } = overflowButtonProps || {};
56
- return /* @__PURE__ */ import_react.default.createElement(import_styles.Container, {
57
- role: "toolbar",
58
- "data-testid": "ds-mini-toolbar"
59
- }, shortcutItems, /* @__PURE__ */ import_react.default.createElement(import_ds_dropdownmenu.DSDropdownMenu, {
60
- "data-testid": "ds-mini-toolbar__dropdown-menu",
61
- isOpen: isDropdownMenuOpen,
62
- onSelectMenuItem: closeDropdownMenu,
63
- onClickOutsideMenu: closeDropdownMenu,
64
- options: dropdownMenuItems,
65
- triggerComponent: /* @__PURE__ */ import_react.default.createElement(import_styles.StyledButton, {
66
- "aria-label": ariaLabel,
67
- "data-testid": "ds-mini-toolbar__elipsis",
68
- size: "m",
69
- style,
70
- buttonType,
71
- onClick: openDropdownMenu,
72
- onKeyPress: openDropdownMenuKeyPress,
73
- leftIcon: Elipsis
74
- })
75
- }));
76
- };
77
- MiniToolbar.propTypes = import_propTypes.miniToolbarProps;
78
- const MiniToolbarWithSchema = (0, import_react_desc.describe)(MiniToolbar);
79
- MiniToolbarWithSchema.propTypes = import_propTypes.miniToolbarProps;
80
- module.exports = __toCommonJS(MiniToolbar_exports);
81
- //# sourceMappingURL=MiniToolbar.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/Components/MiniToolbar.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useState, useCallback } from 'react';\nimport { describe } from 'react-desc';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { StyledButton, Container } from '../styles';\nimport { miniToolbarProps } from '../propTypes';\nimport { useGenerateItems } from '../hooks/useGenerateItems';\nimport { MiniToolbarPropsT } from '../index.d';\n\nconst Elipsis = <MoreOptionsVert color={['brand-primary', '600']} size=\"m\" />;\n\nconst MiniToolbar = ({ items, overflowButtonProps }: MiniToolbarPropsT): React.ReactElement => {\n const [shortcutItems, dropdownMenuItems] = useGenerateItems(items);\n const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState<boolean>(false);\n\n const closeDropdownMenu = useCallback(() => setIsDropdownMenuOpen(false), []);\n const openDropdownMenu = useCallback(() => setIsDropdownMenuOpen(true), []);\n const openDropdownMenuKeyPress = useCallback((e) => {\n if (e.key === ' ') {\n setIsDropdownMenuOpen(true);\n }\n }, []);\n\n const { ariaLabel, style, buttonType = 'secondary' } = overflowButtonProps || {};\n\n return (\n <Container role=\"toolbar\" data-testid=\"ds-mini-toolbar\">\n {shortcutItems}\n <DSDropdownMenu\n data-testid=\"ds-mini-toolbar__dropdown-menu\"\n isOpen={isDropdownMenuOpen}\n onSelectMenuItem={closeDropdownMenu}\n onClickOutsideMenu={closeDropdownMenu}\n options={dropdownMenuItems}\n triggerComponent={\n <StyledButton\n aria-label={ariaLabel}\n data-testid=\"ds-mini-toolbar__elipsis\"\n size=\"m\"\n style={style}\n buttonType={buttonType}\n onClick={openDropdownMenu}\n onKeyPress={openDropdownMenuKeyPress}\n leftIcon={Elipsis}\n />\n }\n />\n </Container>\n );\n};\n\nMiniToolbar.propTypes = miniToolbarProps;\nconst MiniToolbarWithSchema = describe(MiniToolbar);\nMiniToolbarWithSchema.propTypes = miniToolbarProps;\n\nexport { MiniToolbar, MiniToolbarWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA6C;AAC7C,wBAAyB;AACzB,6BAA+B;AAC/B,sBAAgC;AAChC,oBAAwC;AACxC,uBAAiC;AACjC,8BAAiC;AAGjC,MAAM,UAAU,mDAAC,iCAAD;AAAA,EAAiB,OAAO,CAAC,iBAAiB;AAAA,EAAQ,MAAK;AAAA;AAEvE,MAAM,cAAc,CAAC,EAAE,OAAO,0BAAiE;AAC7F,QAAM,CAAC,eAAe,qBAAqB,8CAAiB;AAC5D,QAAM,CAAC,oBAAoB,yBAAyB,2BAAkB;AAEtE,QAAM,oBAAoB,8BAAY,MAAM,sBAAsB,QAAQ;AAC1E,QAAM,mBAAmB,8BAAY,MAAM,sBAAsB,OAAO;AACxE,QAAM,2BAA2B,8BAAY,CAAC,MAAM;AAClD,QAAI,EAAE,QAAQ,KAAK;AACjB,4BAAsB;AAAA;AAAA,KAEvB;AAEH,QAAM,EAAE,WAAW,OAAO,aAAa,gBAAgB,uBAAuB;AAE9E,SACE,mDAAC,yBAAD;AAAA,IAAW,MAAK;AAAA,IAAU,eAAY;AAAA,KACnC,eACD,mDAAC,uCAAD;AAAA,IACE,eAAY;AAAA,IACZ,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,SAAS;AAAA,IACT,kBACE,mDAAC,4BAAD;AAAA,MACE,cAAY;AAAA,MACZ,eAAY;AAAA,MACZ,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,UAAU;AAAA;AAAA;AAAA;AAQtB,YAAY,YAAY;AACxB,MAAM,wBAAwB,gCAAS;AACvC,sBAAsB,YAAY;",
6
- "names": []
7
- }
@@ -1,72 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var ToolbarShortcut_exports = {};
29
- __export(ToolbarShortcut_exports, {
30
- ToolbarShortcut: () => ToolbarShortcut
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_styles = require("../styles");
35
- const ToolbarShortcut = (props) => {
36
- const { Component, shortcutProps, sharedProps, ContextualRegion, contextualRegionProps } = props;
37
- const leftRef = (0, import_react.useRef)(null);
38
- const rightRef = (0, import_react.useRef)(null);
39
- const timerLeft = (0, import_react.useRef)(null);
40
- const timerRight = (0, import_react.useRef)(null);
41
- const { position = "left", isOpen = false } = contextualRegionProps || {};
42
- const { style } = shortcutProps || {};
43
- const mergedProps = {
44
- ...sharedProps,
45
- ...shortcutProps
46
- };
47
- (0, import_react.useEffect)(() => {
48
- if (isOpen && leftRef.current) {
49
- timerLeft.current = setTimeout(() => leftRef.current.focus(), 200);
50
- }
51
- if (isOpen && rightRef.current) {
52
- timerRight.current = setTimeout(() => rightRef.current.focus(), 200);
53
- }
54
- return () => {
55
- clearTimeout(timerLeft.current);
56
- clearTimeout(timerRight.current);
57
- };
58
- }, [isOpen, leftRef, rightRef]);
59
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, isOpen && position === "left" && /* @__PURE__ */ import_react.default.createElement(import_styles.Item, null, /* @__PURE__ */ import_react.default.createElement(ContextualRegion, {
60
- innerRef: leftRef,
61
- ...contextualRegionProps
62
- })), Component && /* @__PURE__ */ import_react.default.createElement(import_styles.Item, {
63
- style
64
- }, /* @__PURE__ */ import_react.default.createElement(Component, {
65
- ...mergedProps
66
- })), isOpen && position === "right" && /* @__PURE__ */ import_react.default.createElement(import_styles.Item, null, /* @__PURE__ */ import_react.default.createElement(ContextualRegion, {
67
- innerRef: rightRef,
68
- ...contextualRegionProps
69
- })));
70
- };
71
- module.exports = __toCommonJS(ToolbarShortcut_exports);
72
- //# sourceMappingURL=ToolbarShortcut.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/Components/ToolbarShortcut.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useRef, useEffect } from 'react';\nimport { Item } from '../styles';\nimport { ToolbarShortcutPropsT } from '../index.d';\n\nconst ToolbarShortcut = (props: ToolbarShortcutPropsT): React.ReactElement => {\n const { Component, shortcutProps, sharedProps, ContextualRegion, contextualRegionProps } = props;\n const leftRef = useRef<HTMLElement | null>(null);\n const rightRef = useRef<HTMLElement | null>(null);\n const timerLeft = useRef<ReturnType<typeof setInterval> | null>(null);\n const timerRight = useRef<ReturnType<typeof setInterval> | null>(null);\n\n const { position = 'left', isOpen = false } = contextualRegionProps || {};\n const { style } = shortcutProps || {};\n\n const mergedProps = {\n ...sharedProps,\n ...shortcutProps,\n };\n\n useEffect(() => {\n if (isOpen && leftRef.current) {\n timerLeft.current = setTimeout(() => leftRef.current.focus(), 200);\n }\n if (isOpen && rightRef.current) {\n timerRight.current = setTimeout(() => rightRef.current.focus(), 200);\n }\n\n return () => {\n clearTimeout(timerLeft.current);\n clearTimeout(timerRight.current);\n };\n }, [isOpen, leftRef, rightRef]);\n\n return (\n <>\n {isOpen && position === 'left' && (\n <Item>\n <ContextualRegion innerRef={leftRef} {...contextualRegionProps} />\n </Item>\n )}\n {Component && (\n <Item style={style}>\n <Component {...mergedProps} />\n </Item>\n )}\n {isOpen && position === 'right' && (\n <Item>\n <ContextualRegion innerRef={rightRef} {...contextualRegionProps} />\n </Item>\n )}\n </>\n );\n};\n\nexport { ToolbarShortcut };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,oBAAqB;AAGrB,MAAM,kBAAkB,CAAC,UAAqD;AAC5E,QAAM,EAAE,WAAW,eAAe,aAAa,kBAAkB,0BAA0B;AAC3F,QAAM,UAAU,yBAA2B;AAC3C,QAAM,WAAW,yBAA2B;AAC5C,QAAM,YAAY,yBAA8C;AAChE,QAAM,aAAa,yBAA8C;AAEjE,QAAM,EAAE,WAAW,QAAQ,SAAS,UAAU,yBAAyB;AACvE,QAAM,EAAE,UAAU,iBAAiB;AAEnC,QAAM,cAAc;AAAA,OACf;AAAA,OACA;AAAA;AAGL,8BAAU,MAAM;AACd,QAAI,UAAU,QAAQ,SAAS;AAC7B,gBAAU,UAAU,WAAW,MAAM,QAAQ,QAAQ,SAAS;AAAA;AAEhE,QAAI,UAAU,SAAS,SAAS;AAC9B,iBAAW,UAAU,WAAW,MAAM,SAAS,QAAQ,SAAS;AAAA;AAGlE,WAAO,MAAM;AACX,mBAAa,UAAU;AACvB,mBAAa,WAAW;AAAA;AAAA,KAEzB,CAAC,QAAQ,SAAS;AAErB,SACE,wFACG,UAAU,aAAa,UACtB,mDAAC,oBAAD,MACE,mDAAC,kBAAD;AAAA,IAAkB,UAAU;AAAA,OAAa;AAAA,OAG5C,aACC,mDAAC,oBAAD;AAAA,IAAM;AAAA,KACJ,mDAAC,WAAD;AAAA,OAAe;AAAA,OAGlB,UAAU,aAAa,WACtB,mDAAC,oBAAD,MACE,mDAAC,kBAAD;AAAA,IAAkB,UAAU;AAAA,OAAc;AAAA;AAAA;",
6
- "names": []
7
- }
@@ -1,41 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var Button_exports = {};
29
- __export(Button_exports, {
30
- MiniToolbarButton: () => MiniToolbarButton
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_ds_button = require("@elliemae/ds-button");
35
- const MiniToolbarButton = (props) => /* @__PURE__ */ import_react.default.createElement(import_ds_button.DSButton, {
36
- ...props,
37
- "aria-label": props.ariaLabel,
38
- "data-testid": "ds-mini-toolbar__shortcut"
39
- });
40
- module.exports = __toCommonJS(Button_exports);
41
- //# sourceMappingURL=Button.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/Components/outOfTheBox/Button.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { DSButton } from '@elliemae/ds-button';\n\nconst MiniToolbarButton = (props: Record<string, unknown>): React.ReactElement => (\n <DSButton {...props} aria-label={props.ariaLabel} data-testid=\"ds-mini-toolbar__shortcut\" />\n);\n\nexport { MiniToolbarButton };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,uBAAyB;AAEzB,MAAM,oBAAoB,CAAC,UACzB,mDAAC,2BAAD;AAAA,KAAc;AAAA,EAAO,cAAY,MAAM;AAAA,EAAW,eAAY;AAAA;",
6
- "names": []
7
- }
@@ -1,39 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var ComboBox_exports = {};
29
- __export(ComboBox_exports, {
30
- MiniToolbarComboBox: () => MiniToolbarComboBox
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_ds_form = require("@elliemae/ds-form");
35
- const MiniToolbarComboBox = (props) => /* @__PURE__ */ import_react.default.createElement(import_ds_form.DSComboBox2, {
36
- ...props
37
- });
38
- module.exports = __toCommonJS(ComboBox_exports);
39
- //# sourceMappingURL=ComboBox.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/Components/outOfTheBox/ComboBox.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { DSComboBox2 } from '@elliemae/ds-form';\n\nconst MiniToolbarComboBox = (props: Record<string, unknown>): React.ReactElement => <DSComboBox2 {...props} />;\n\nexport { MiniToolbarComboBox };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,qBAA4B;AAE5B,MAAM,sBAAsB,CAAC,UAAuD,mDAAC,4BAAD;AAAA,KAAiB;AAAA;",
6
- "names": []
7
- }
@@ -1,50 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var IconItem_exports = {};
29
- __export(IconItem_exports, {
30
- MiniToolbarIcon: () => MiniToolbarIcon
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_styles = require("../../styles");
35
- const MiniToolbarIcon = (props) => {
36
- const { Icon, size, color, onClick, ariaLabel, style, buttonType = "secondary" } = props;
37
- return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledButton, {
38
- "aria-label": ariaLabel,
39
- buttonType,
40
- onClick,
41
- style,
42
- leftIcon: /* @__PURE__ */ import_react.default.createElement(Icon, {
43
- size,
44
- color
45
- }),
46
- "data-testid": "ds-mini-toolbar__shortcut"
47
- });
48
- };
49
- module.exports = __toCommonJS(IconItem_exports);
50
- //# sourceMappingURL=IconItem.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/Components/outOfTheBox/IconItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { StyledButton } from '../../styles';\nimport { MiniToolbarIconItemPropsT } from '../../index.d';\n\nconst MiniToolbarIcon = (props: MiniToolbarIconItemPropsT): React.ReactElement => {\n const { Icon, size, color, onClick, ariaLabel, style, buttonType = 'secondary' } = props;\n\n return (\n <StyledButton\n aria-label={ariaLabel}\n buttonType={buttonType}\n onClick={onClick}\n style={style}\n leftIcon={<Icon size={size} color={color} />}\n data-testid=\"ds-mini-toolbar__shortcut\"\n />\n );\n};\n\nexport { MiniToolbarIcon };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,oBAA6B;AAG7B,MAAM,kBAAkB,CAAC,UAAyD;AAChF,QAAM,EAAE,MAAM,MAAM,OAAO,SAAS,WAAW,OAAO,aAAa,gBAAgB;AAEnF,SACE,mDAAC,4BAAD;AAAA,IACE,cAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,mDAAC,MAAD;AAAA,MAAM;AAAA,MAAY;AAAA;AAAA,IAC5B,eAAY;AAAA;AAAA;",
6
- "names": []
7
- }