@elliemae/ds-mini-toolbar 2.2.0 → 2.3.0-alpha.3
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/cjs/Components/MiniToolbar.js +60 -49
- package/cjs/Components/MiniToolbar.js.map +7 -0
- package/cjs/Components/ToolbarShortcut.js +60 -60
- package/cjs/Components/ToolbarShortcut.js.map +7 -0
- package/cjs/Components/outOfTheBox/Button.js +39 -27
- package/cjs/Components/outOfTheBox/Button.js.map +7 -0
- package/cjs/Components/outOfTheBox/ComboBox.js +39 -25
- package/cjs/Components/outOfTheBox/ComboBox.js.map +7 -0
- package/cjs/Components/outOfTheBox/IconItem.js +44 -30
- package/cjs/Components/outOfTheBox/IconItem.js.map +7 -0
- package/cjs/Components/outOfTheBox/SearchBox.js +51 -48
- package/cjs/Components/outOfTheBox/SearchBox.js.map +7 -0
- package/cjs/Components/outOfTheBox/Separator.js +38 -18
- package/cjs/Components/outOfTheBox/Separator.js.map +7 -0
- package/cjs/Components/outOfTheBox/index.js +53 -26
- package/cjs/Components/outOfTheBox/index.js.map +7 -0
- package/cjs/hooks/useGenerateItems.js +87 -101
- package/cjs/hooks/useGenerateItems.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +38 -12
- package/cjs/index.js.map +7 -0
- package/cjs/propTypes.js +61 -27
- package/cjs/propTypes.js.map +7 -0
- package/cjs/styles.js +62 -29
- package/cjs/styles.js.map +7 -0
- package/esm/Components/MiniToolbar.js +25 -33
- package/esm/Components/MiniToolbar.js.map +7 -0
- package/esm/Components/ToolbarShortcut.js +26 -46
- package/esm/Components/ToolbarShortcut.js.map +7 -0
- package/esm/Components/outOfTheBox/Button.js +10 -18
- package/esm/Components/outOfTheBox/Button.js.map +7 -0
- package/esm/Components/outOfTheBox/ComboBox.js +10 -17
- package/esm/Components/outOfTheBox/ComboBox.js.map +7 -0
- package/esm/Components/outOfTheBox/IconItem.js +15 -22
- package/esm/Components/outOfTheBox/IconItem.js.map +7 -0
- package/esm/Components/outOfTheBox/SearchBox.js +22 -38
- package/esm/Components/outOfTheBox/SearchBox.js.map +7 -0
- package/esm/Components/outOfTheBox/Separator.js +9 -10
- package/esm/Components/outOfTheBox/Separator.js.map +7 -0
- package/esm/Components/outOfTheBox/index.js +24 -13
- package/esm/Components/outOfTheBox/index.js.map +7 -0
- package/esm/hooks/useGenerateItems.js +62 -85
- package/esm/hooks/useGenerateItems.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +9 -2
- package/esm/index.js.map +7 -0
- package/esm/propTypes.js +29 -19
- package/esm/propTypes.js.map +7 -0
- package/esm/styles.js +33 -17
- package/esm/styles.js.map +7 -0
- package/package.json +6 -6
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { MiniToolbar, MiniToolbarWithSchema } from './Components/MiniToolbar';\nexport { ToolbarItemWithSchema } from './propTypes';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAmD;AACnD,uBAAsC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/propTypes.js
CHANGED
|
@@ -1,35 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
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 propTypes_exports = {};
|
|
29
|
+
__export(propTypes_exports, {
|
|
30
|
+
ToolbarItemWithSchema: () => ToolbarItemWithSchema,
|
|
31
|
+
miniToolbarProps: () => miniToolbarProps
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_react_desc = require("react-desc");
|
|
35
|
+
const outOfTheBoxType = import_react_desc.PropTypes.oneOf([
|
|
36
|
+
"ds-button",
|
|
37
|
+
"ds-icon-item",
|
|
38
|
+
"ds-separator",
|
|
39
|
+
"ds-search-box",
|
|
40
|
+
"ds-combo-box"
|
|
41
|
+
]).description("out-of-the-box toolbar components");
|
|
8
42
|
const toolbarItemProps = {
|
|
9
|
-
component:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
43
|
+
component: import_react_desc.PropTypes.oneOfType([
|
|
44
|
+
outOfTheBoxType,
|
|
45
|
+
import_react_desc.PropTypes.element
|
|
46
|
+
]).description("Main component").isRequired,
|
|
47
|
+
hasShortcut: import_react_desc.PropTypes.bool.description("Whether to include the component as a shortcut in the toolbar or not").defaultValue(false),
|
|
48
|
+
shortcutComponent: import_react_desc.PropTypes.element.description("Component to render as a shortcut in the toolbar"),
|
|
49
|
+
shortcutProps: import_react_desc.PropTypes.object.description("Shortcut component props"),
|
|
50
|
+
dropdownComponentProps: import_react_desc.PropTypes.object.description("Dropdown component props"),
|
|
51
|
+
sharedProps: import_react_desc.PropTypes.object.description("Props shared by shortcut component and dropdown component"),
|
|
52
|
+
contextualRegion: import_react_desc.PropTypes.element.description("Component that can be rendered as an adjacent region to the shortcut component"),
|
|
53
|
+
contextualRegionProps: import_react_desc.PropTypes.object.description("Contextual region component props")
|
|
17
54
|
};
|
|
18
|
-
const itemPropTypes =
|
|
55
|
+
const itemPropTypes = import_react_desc.PropTypes.shape(toolbarItemProps).description("Items props");
|
|
19
56
|
const overflowButtonPropTypes = {
|
|
20
|
-
ariaLabel:
|
|
21
|
-
buttonType:
|
|
22
|
-
style:
|
|
57
|
+
ariaLabel: import_react_desc.PropTypes.string,
|
|
58
|
+
buttonType: import_react_desc.PropTypes.oneOf(["secondary", "text"]),
|
|
59
|
+
style: import_react_desc.PropTypes.object
|
|
23
60
|
};
|
|
24
61
|
const miniToolbarProps = {
|
|
25
|
-
items:
|
|
26
|
-
overflowButtonProps:
|
|
62
|
+
items: import_react_desc.PropTypes.arrayOf(itemPropTypes).description("Array of items").isRequired,
|
|
63
|
+
overflowButtonProps: import_react_desc.PropTypes.shape(overflowButtonPropTypes).description("Overflow button props")
|
|
27
64
|
};
|
|
28
|
-
|
|
29
65
|
const ToolbarItem = () => null;
|
|
30
|
-
|
|
31
|
-
const ToolbarItemWithSchema = reactDesc.describe(ToolbarItem);
|
|
66
|
+
const ToolbarItemWithSchema = (0, import_react_desc.describe)(ToolbarItem);
|
|
32
67
|
ToolbarItemWithSchema.propTypes = toolbarItemProps;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.miniToolbarProps = miniToolbarProps;
|
|
68
|
+
module.exports = __toCommonJS(propTypes_exports);
|
|
69
|
+
//# sourceMappingURL=propTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes, describe } from 'react-desc';\n\nconst outOfTheBoxType = PropTypes.oneOf([\n 'ds-button',\n 'ds-icon-item',\n 'ds-separator',\n 'ds-search-box',\n 'ds-combo-box',\n]).description('out-of-the-box toolbar components');\n\nconst toolbarItemProps = {\n component: PropTypes.oneOfType([\n outOfTheBoxType,\n PropTypes.element,\n ]).description('Main component').isRequired,\n hasShortcut: PropTypes.bool\n .description(\n 'Whether to include the component as a shortcut in the toolbar or not',\n )\n .defaultValue(false),\n shortcutComponent: PropTypes.element.description(\n 'Component to render as a shortcut in the toolbar',\n ),\n shortcutProps: PropTypes.object.description('Shortcut component props'),\n dropdownComponentProps: PropTypes.object.description(\n 'Dropdown component props',\n ),\n sharedProps: PropTypes.object.description(\n 'Props shared by shortcut component and dropdown component',\n ),\n contextualRegion: PropTypes.element.description(\n 'Component that can be rendered as an adjacent region to the shortcut component',\n ),\n contextualRegionProps: PropTypes.object.description(\n 'Contextual region component props',\n ),\n};\n\nconst itemPropTypes = PropTypes.shape(toolbarItemProps).description(\n 'Items props',\n);\n\nconst overflowButtonPropTypes = {\n ariaLabel: PropTypes.string,\n buttonType: PropTypes.oneOf(['secondary', 'text']),\n style: PropTypes.object,\n};\n\nconst miniToolbarProps = {\n items: PropTypes.arrayOf(itemPropTypes).description('Array of items')\n .isRequired,\n overflowButtonProps: PropTypes.shape(overflowButtonPropTypes).description(\n 'Overflow button props',\n ),\n};\n\nconst ToolbarItem = () => null;\n\nconst ToolbarItemWithSchema = describe(ToolbarItem);\nToolbarItemWithSchema.propTypes = toolbarItemProps;\nexport { ToolbarItemWithSchema, miniToolbarProps };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAoC;AAEpC,MAAM,kBAAkB,4BAAU,MAAM;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GACC,YAAY;AAEf,MAAM,mBAAmB;AAAA,EACvB,WAAW,4BAAU,UAAU;AAAA,IAC7B;AAAA,IACA,4BAAU;AAAA,KACT,YAAY,kBAAkB;AAAA,EACjC,aAAa,4BAAU,KACpB,YACC,wEAED,aAAa;AAAA,EAChB,mBAAmB,4BAAU,QAAQ,YACnC;AAAA,EAEF,eAAe,4BAAU,OAAO,YAAY;AAAA,EAC5C,wBAAwB,4BAAU,OAAO,YACvC;AAAA,EAEF,aAAa,4BAAU,OAAO,YAC5B;AAAA,EAEF,kBAAkB,4BAAU,QAAQ,YAClC;AAAA,EAEF,uBAAuB,4BAAU,OAAO,YACtC;AAAA;AAIJ,MAAM,gBAAgB,4BAAU,MAAM,kBAAkB,YACtD;AAGF,MAAM,0BAA0B;AAAA,EAC9B,WAAW,4BAAU;AAAA,EACrB,YAAY,4BAAU,MAAM,CAAC,aAAa;AAAA,EAC1C,OAAO,4BAAU;AAAA;AAGnB,MAAM,mBAAmB;AAAA,EACvB,OAAO,4BAAU,QAAQ,eAAe,YAAY,kBACjD;AAAA,EACH,qBAAqB,4BAAU,MAAM,yBAAyB,YAC5D;AAAA;AAIJ,MAAM,cAAc,MAAM;AAE1B,MAAM,wBAAwB,gCAAS;AACvC,sBAAsB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/styles.js
CHANGED
|
@@ -1,29 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 styles_exports = {};
|
|
29
|
+
__export(styles_exports, {
|
|
30
|
+
Container: () => Container,
|
|
31
|
+
Item: () => Item,
|
|
32
|
+
Separator: () => Separator,
|
|
33
|
+
StyledButton: () => StyledButton
|
|
34
|
+
});
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_ds_button = require("@elliemae/ds-button");
|
|
38
|
+
const Container = import_styled_components.default.ul`
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
padding: 0 6px;
|
|
44
|
+
`;
|
|
45
|
+
const Separator = import_styled_components.default.span`
|
|
46
|
+
height: 24px;
|
|
47
|
+
width: 1px;
|
|
48
|
+
margin: 6px;
|
|
49
|
+
border-left: 1px solid #bbb;
|
|
50
|
+
`;
|
|
51
|
+
const Item = import_styled_components.default.li`
|
|
52
|
+
display: flex;
|
|
53
|
+
margin: 6px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
`;
|
|
56
|
+
const StyledButton = (0, import_styled_components.default)(import_ds_button.DSButton)`
|
|
57
|
+
&:not(:focus) {
|
|
58
|
+
border-color: transparent;
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
module.exports = __toCommonJS(styles_exports);
|
|
62
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import styled from 'styled-components';\nimport { DSButton } from '@elliemae/ds-button';\n\nconst Container = styled.ul`\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n padding: 0 6px;\n`;\n\nconst Separator = styled.span`\n height: 24px;\n width: 1px;\n margin: 6px;\n border-left: 1px solid #bbb;\n`;\n\nconst Item = styled.li`\n display: flex;\n margin: 6px;\n cursor: pointer;\n`;\n\nconst StyledButton = styled(DSButton)`\n &:not(:focus) {\n border-color: transparent;\n }\n`;\n\nexport { Container, Separator, Item, StyledButton };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,uBAAyB;AAEzB,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQzB,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOzB,MAAM,OAAO,iCAAO;AAAA;AAAA;AAAA;AAAA;AAMpB,MAAM,eAAe,sCAAO;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,60 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Elipsis = /*#__PURE__*/_jsx(MoreOptionsVert, {
|
|
12
|
-
color: ['brand-primary', '600'],
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useState, useCallback } from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { DSDropdownMenu } from "@elliemae/ds-dropdownmenu";
|
|
5
|
+
import { MoreOptionsVert } from "@elliemae/ds-icons";
|
|
6
|
+
import { StyledButton, Container } from "../styles";
|
|
7
|
+
import { miniToolbarProps } from "../propTypes";
|
|
8
|
+
import { useGenerateItems } from "../hooks/useGenerateItems";
|
|
9
|
+
const Elipsis = /* @__PURE__ */ React2.createElement(MoreOptionsVert, {
|
|
10
|
+
color: ["brand-primary", "600"],
|
|
13
11
|
size: "m"
|
|
14
12
|
});
|
|
15
|
-
|
|
16
|
-
const MiniToolbar = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
items,
|
|
19
|
-
overflowButtonProps
|
|
20
|
-
} = _ref;
|
|
13
|
+
const MiniToolbar = ({ items, overflowButtonProps }) => {
|
|
21
14
|
const [shortcutItems, dropdownMenuItems] = useGenerateItems(items);
|
|
22
15
|
const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
|
|
23
16
|
const closeDropdownMenu = useCallback(() => setIsDropdownMenuOpen(false), []);
|
|
24
17
|
const openDropdownMenu = useCallback(() => setIsDropdownMenuOpen(true), []);
|
|
25
|
-
const openDropdownMenuKeyPress = useCallback(e => {
|
|
26
|
-
if (e.key ===
|
|
18
|
+
const openDropdownMenuKeyPress = useCallback((e) => {
|
|
19
|
+
if (e.key === " ") {
|
|
27
20
|
setIsDropdownMenuOpen(true);
|
|
28
21
|
}
|
|
29
22
|
}, []);
|
|
30
|
-
const {
|
|
31
|
-
|
|
32
|
-
style,
|
|
33
|
-
buttonType = 'secondary'
|
|
34
|
-
} = overflowButtonProps || {};
|
|
35
|
-
return /*#__PURE__*/_jsx(Container, {
|
|
23
|
+
const { ariaLabel, style, buttonType = "secondary" } = overflowButtonProps || {};
|
|
24
|
+
return /* @__PURE__ */ React2.createElement(Container, {
|
|
36
25
|
role: "toolbar",
|
|
37
26
|
"data-testid": "ds-mini-toolbar"
|
|
38
|
-
},
|
|
27
|
+
}, shortcutItems, /* @__PURE__ */ React2.createElement(DSDropdownMenu, {
|
|
39
28
|
"data-testid": "ds-mini-toolbar__dropdown-menu",
|
|
40
29
|
isOpen: isDropdownMenuOpen,
|
|
41
30
|
onSelectMenuItem: closeDropdownMenu,
|
|
42
31
|
onClickOutsideMenu: closeDropdownMenu,
|
|
43
32
|
options: dropdownMenuItems,
|
|
44
|
-
triggerComponent:
|
|
33
|
+
triggerComponent: /* @__PURE__ */ React2.createElement(StyledButton, {
|
|
45
34
|
"aria-label": ariaLabel,
|
|
46
35
|
"data-testid": "ds-mini-toolbar__elipsis",
|
|
47
36
|
size: "m",
|
|
48
|
-
style
|
|
49
|
-
buttonType
|
|
37
|
+
style,
|
|
38
|
+
buttonType,
|
|
50
39
|
onClick: openDropdownMenu,
|
|
51
40
|
onKeyPress: openDropdownMenuKeyPress,
|
|
52
41
|
leftIcon: Elipsis
|
|
53
42
|
})
|
|
54
43
|
}));
|
|
55
44
|
};
|
|
56
|
-
|
|
45
|
+
MiniToolbar.propTypes = miniToolbarProps;
|
|
57
46
|
const MiniToolbarWithSchema = describe(MiniToolbar);
|
|
58
47
|
MiniToolbarWithSchema.propTypes = miniToolbarProps;
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
export {
|
|
49
|
+
MiniToolbar,
|
|
50
|
+
MiniToolbarWithSchema
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=MiniToolbar.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Components/MiniToolbar.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,UAAU,qCAAC,iBAAD;AAAA,EAAiB,OAAO,CAAC,iBAAiB;AAAA,EAAQ,MAAK;AAAA;AAEvE,MAAM,cAAc,CAAC,EAAE,OAAO,0BAAiE;AAC7F,QAAM,CAAC,eAAe,qBAAqB,iBAAiB;AAC5D,QAAM,CAAC,oBAAoB,yBAAyB,SAAkB;AAEtE,QAAM,oBAAoB,YAAY,MAAM,sBAAsB,QAAQ;AAC1E,QAAM,mBAAmB,YAAY,MAAM,sBAAsB,OAAO;AACxE,QAAM,2BAA2B,YAAY,CAAC,MAAM;AAClD,QAAI,EAAE,QAAQ,KAAK;AACjB,4BAAsB;AAAA;AAAA,KAEvB;AAEH,QAAM,EAAE,WAAW,OAAO,aAAa,gBAAgB,uBAAuB;AAE9E,SACE,qCAAC,WAAD;AAAA,IAAW,MAAK;AAAA,IAAU,eAAY;AAAA,KACnC,eACD,qCAAC,gBAAD;AAAA,IACE,eAAY;AAAA,IACZ,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,SAAS;AAAA,IACT,kBACE,qCAAC,cAAD;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,SAAS;AACvC,sBAAsB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,63 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
-
import { useRef, useEffect } from 'react';
|
|
9
|
-
import { Item } from '../styles.js';
|
|
10
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
|
-
const ToolbarShortcut = props => {
|
|
17
|
-
const {
|
|
18
|
-
Component,
|
|
19
|
-
shortcutProps,
|
|
20
|
-
sharedProps,
|
|
21
|
-
ContextualRegion,
|
|
22
|
-
contextualRegionProps
|
|
23
|
-
} = props;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useRef, useEffect } from "react";
|
|
3
|
+
import { Item } from "../styles";
|
|
4
|
+
const ToolbarShortcut = (props) => {
|
|
5
|
+
const { Component, shortcutProps, sharedProps, ContextualRegion, contextualRegionProps } = props;
|
|
24
6
|
const leftRef = useRef(null);
|
|
25
7
|
const rightRef = useRef(null);
|
|
26
8
|
const timerLeft = useRef(null);
|
|
27
9
|
const timerRight = useRef(null);
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = shortcutProps || {};
|
|
35
|
-
|
|
36
|
-
const mergedProps = _objectSpread(_objectSpread({}, sharedProps), shortcutProps);
|
|
37
|
-
|
|
10
|
+
const { position = "left", isOpen = false } = contextualRegionProps || {};
|
|
11
|
+
const { style } = shortcutProps || {};
|
|
12
|
+
const mergedProps = {
|
|
13
|
+
...sharedProps,
|
|
14
|
+
...shortcutProps
|
|
15
|
+
};
|
|
38
16
|
useEffect(() => {
|
|
39
17
|
if (isOpen && leftRef.current) {
|
|
40
18
|
timerLeft.current = setTimeout(() => leftRef.current.focus(), 200);
|
|
41
19
|
}
|
|
42
|
-
|
|
43
20
|
if (isOpen && rightRef.current) {
|
|
44
21
|
timerRight.current = setTimeout(() => rightRef.current.focus(), 200);
|
|
45
22
|
}
|
|
46
|
-
|
|
47
23
|
return () => {
|
|
48
24
|
clearTimeout(timerLeft.current);
|
|
49
25
|
clearTimeout(timerRight.current);
|
|
50
26
|
};
|
|
51
27
|
}, [isOpen, leftRef, rightRef]);
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
28
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, isOpen && position === "left" && /* @__PURE__ */ React2.createElement(Item, null, /* @__PURE__ */ React2.createElement(ContextualRegion, {
|
|
29
|
+
innerRef: leftRef,
|
|
30
|
+
...contextualRegionProps
|
|
31
|
+
})), Component && /* @__PURE__ */ React2.createElement(Item, {
|
|
32
|
+
style
|
|
33
|
+
}, /* @__PURE__ */ React2.createElement(Component, {
|
|
34
|
+
...mergedProps
|
|
35
|
+
})), isOpen && position === "right" && /* @__PURE__ */ React2.createElement(Item, null, /* @__PURE__ */ React2.createElement(ContextualRegion, {
|
|
36
|
+
innerRef: rightRef,
|
|
37
|
+
...contextualRegionProps
|
|
38
|
+
})));
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
ToolbarShortcut
|
|
61
42
|
};
|
|
62
|
-
|
|
63
|
-
export { ToolbarShortcut };
|
|
43
|
+
//# sourceMappingURL=ToolbarShortcut.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Components/ToolbarShortcut.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,kBAAkB,CAAC,UAAqD;AAC5E,QAAM,EAAE,WAAW,eAAe,aAAa,kBAAkB,0BAA0B;AAC3F,QAAM,UAAU,OAA2B;AAC3C,QAAM,WAAW,OAA2B;AAC5C,QAAM,YAAY,OAA8C;AAChE,QAAM,aAAa,OAA8C;AAEjE,QAAM,EAAE,WAAW,QAAQ,SAAS,UAAU,yBAAyB;AACvE,QAAM,EAAE,UAAU,iBAAiB;AAEnC,QAAM,cAAc;AAAA,OACf;AAAA,OACA;AAAA;AAGL,YAAU,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,4DACG,UAAU,aAAa,UACtB,qCAAC,MAAD,MACE,qCAAC,kBAAD;AAAA,IAAkB,UAAU;AAAA,OAAa;AAAA,OAG5C,aACC,qCAAC,MAAD;AAAA,IAAM;AAAA,KACJ,qCAAC,WAAD;AAAA,OAAe;AAAA,OAGlB,UAAU,aAAa,WACtB,qCAAC,MAAD,MACE,qCAAC,kBAAD;AAAA,IAAkB,UAAU;AAAA,OAAc;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'react';
|
|
8
|
-
import DSButton from '@elliemae/ds-button';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
10
|
-
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
-
|
|
15
|
-
const MiniToolbarButton = props => /*#__PURE__*/jsx(DSButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { DSButton } from "@elliemae/ds-button";
|
|
4
|
+
const MiniToolbarButton = (props) => /* @__PURE__ */ React2.createElement(DSButton, {
|
|
5
|
+
...props,
|
|
16
6
|
"aria-label": props.ariaLabel,
|
|
17
7
|
"data-testid": "ds-mini-toolbar__shortcut"
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
MiniToolbarButton
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/Components/outOfTheBox/Button.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,oBAAoB,CAAC,UACzB,qCAAC,UAAD;AAAA,KAAc;AAAA,EAAO,cAAY,MAAM;AAAA,EAAW,eAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
-
|
|
15
|
-
const MiniToolbarComboBox = props => /*#__PURE__*/jsx(DSComboBox2, _objectSpread({}, props));
|
|
16
|
-
|
|
17
|
-
export { MiniToolbarComboBox };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { DSComboBox2 } from "@elliemae/ds-form";
|
|
4
|
+
const MiniToolbarComboBox = (props) => /* @__PURE__ */ React2.createElement(DSComboBox2, {
|
|
5
|
+
...props
|
|
6
|
+
});
|
|
7
|
+
export {
|
|
8
|
+
MiniToolbarComboBox
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/Components/outOfTheBox/ComboBox.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,sBAAsB,CAAC,UAAuD,qCAAC,aAAD;AAAA,KAAiB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { StyledButton } from
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
color,
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { StyledButton } from "../../styles";
|
|
4
|
+
const MiniToolbarIcon = (props) => {
|
|
5
|
+
const { Icon, size, color, onClick, ariaLabel, style, buttonType = "secondary" } = props;
|
|
6
|
+
return /* @__PURE__ */ React2.createElement(StyledButton, {
|
|
7
|
+
"aria-label": ariaLabel,
|
|
8
|
+
buttonType,
|
|
10
9
|
onClick,
|
|
11
|
-
ariaLabel,
|
|
12
10
|
style,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"aria-label": ariaLabel,
|
|
17
|
-
buttonType: buttonType,
|
|
18
|
-
onClick: onClick,
|
|
19
|
-
style: style,
|
|
20
|
-
leftIcon: /*#__PURE__*/_jsx(Icon, {
|
|
21
|
-
size: size,
|
|
22
|
-
color: color
|
|
11
|
+
leftIcon: /* @__PURE__ */ React2.createElement(Icon, {
|
|
12
|
+
size,
|
|
13
|
+
color
|
|
23
14
|
}),
|
|
24
15
|
"data-testid": "ds-mini-toolbar__shortcut"
|
|
25
16
|
});
|
|
26
17
|
};
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
export {
|
|
19
|
+
MiniToolbarIcon
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=IconItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/Components/outOfTheBox/IconItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,kBAAkB,CAAC,UAAyD;AAChF,QAAM,EAAE,MAAM,MAAM,OAAO,SAAS,WAAW,OAAO,aAAa,gBAAgB;AAEnF,SACE,qCAAC,cAAD;AAAA,IACE,cAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,qCAAC,MAAD;AAAA,MAAM;AAAA,MAAY;AAAA;AAAA,IAC5B,eAAY;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|