@elliemae/ds-mini-toolbar 2.2.0-alpha.3 → 2.2.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.
- package/cjs/Components/MiniToolbar.js +49 -60
- package/cjs/Components/ToolbarShortcut.js +60 -60
- package/cjs/Components/outOfTheBox/Button.js +27 -39
- package/cjs/Components/outOfTheBox/ComboBox.js +25 -39
- package/cjs/Components/outOfTheBox/IconItem.js +30 -44
- package/cjs/Components/outOfTheBox/SearchBox.js +48 -51
- package/cjs/Components/outOfTheBox/Separator.js +18 -38
- package/cjs/Components/outOfTheBox/index.js +26 -53
- package/cjs/hooks/useGenerateItems.js +101 -87
- package/cjs/index.d.js +2 -27
- package/cjs/index.js +12 -38
- package/cjs/propTypes.js +27 -61
- package/cjs/styles.js +29 -62
- package/esm/Components/MiniToolbar.js +33 -25
- package/esm/Components/ToolbarShortcut.js +46 -26
- package/esm/Components/outOfTheBox/Button.js +18 -10
- package/esm/Components/outOfTheBox/ComboBox.js +17 -10
- package/esm/Components/outOfTheBox/IconItem.js +22 -15
- package/esm/Components/outOfTheBox/SearchBox.js +38 -22
- package/esm/Components/outOfTheBox/Separator.js +10 -9
- package/esm/Components/outOfTheBox/index.js +13 -24
- package/esm/hooks/useGenerateItems.js +85 -62
- package/esm/index.d.js +1 -2
- package/esm/index.js +2 -9
- package/esm/propTypes.js +19 -29
- package/esm/styles.js +17 -33
- package/package.json +6 -6
- package/cjs/Components/MiniToolbar.js.map +0 -7
- package/cjs/Components/ToolbarShortcut.js.map +0 -7
- package/cjs/Components/outOfTheBox/Button.js.map +0 -7
- package/cjs/Components/outOfTheBox/ComboBox.js.map +0 -7
- package/cjs/Components/outOfTheBox/IconItem.js.map +0 -7
- package/cjs/Components/outOfTheBox/SearchBox.js.map +0 -7
- package/cjs/Components/outOfTheBox/Separator.js.map +0 -7
- package/cjs/Components/outOfTheBox/index.js.map +0 -7
- package/cjs/hooks/useGenerateItems.js.map +0 -7
- package/cjs/index.d.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/propTypes.js.map +0 -7
- package/cjs/styles.js.map +0 -7
- package/esm/Components/MiniToolbar.js.map +0 -7
- package/esm/Components/ToolbarShortcut.js.map +0 -7
- package/esm/Components/outOfTheBox/Button.js.map +0 -7
- package/esm/Components/outOfTheBox/ComboBox.js.map +0 -7
- package/esm/Components/outOfTheBox/IconItem.js.map +0 -7
- package/esm/Components/outOfTheBox/SearchBox.js.map +0 -7
- package/esm/Components/outOfTheBox/Separator.js.map +0 -7
- package/esm/Components/outOfTheBox/index.js.map +0 -7
- package/esm/hooks/useGenerateItems.js.map +0 -7
- package/esm/index.d.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/propTypes.js.map +0 -7
- package/esm/styles.js.map +0 -7
package/cjs/styles.js
CHANGED
|
@@ -1,62 +1,29 @@
|
|
|
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
|
-
|
|
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 = __toESM(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
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var DSButton = require('@elliemae/ds-button');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
12
|
+
|
|
13
|
+
const Container = /*#__PURE__*/styled__default["default"].ul.withConfig({
|
|
14
|
+
componentId: "sc-18ftw1x-0"
|
|
15
|
+
})(["display:flex;align-items:center;justify-content:center;width:fit-content;padding:0 6px;"]);
|
|
16
|
+
const Separator = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
17
|
+
componentId: "sc-18ftw1x-1"
|
|
18
|
+
})(["height:24px;width:1px;margin:6px;border-left:1px solid #bbb;"]);
|
|
19
|
+
const Item = /*#__PURE__*/styled__default["default"].li.withConfig({
|
|
20
|
+
componentId: "sc-18ftw1x-2"
|
|
21
|
+
})(["display:flex;margin:6px;cursor:pointer;"]);
|
|
22
|
+
const StyledButton = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
23
|
+
componentId: "sc-18ftw1x-3"
|
|
24
|
+
})(["&:not(:focus){border-color:transparent;}"]);
|
|
25
|
+
|
|
26
|
+
exports.Container = Container;
|
|
27
|
+
exports.Item = Item;
|
|
28
|
+
exports.Separator = Separator;
|
|
29
|
+
exports.StyledButton = StyledButton;
|
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import { useState, useCallback } from 'react';
|
|
4
|
+
import { describe } from 'react-desc';
|
|
5
|
+
import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
|
|
6
|
+
import { MoreOptionsVert } from '@elliemae/ds-icons';
|
|
7
|
+
import { Container, StyledButton } from '../styles.js';
|
|
8
|
+
import { miniToolbarProps } from '../propTypes.js';
|
|
9
|
+
import { useGenerateItems } from '../hooks/useGenerateItems.js';
|
|
10
|
+
|
|
11
|
+
const Elipsis = /*#__PURE__*/_jsx(MoreOptionsVert, {
|
|
12
|
+
color: ['brand-primary', '600'],
|
|
11
13
|
size: "m"
|
|
12
14
|
});
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
const MiniToolbar = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
items,
|
|
19
|
+
overflowButtonProps
|
|
20
|
+
} = _ref;
|
|
14
21
|
const [shortcutItems, dropdownMenuItems] = useGenerateItems(items);
|
|
15
22
|
const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
|
|
16
23
|
const closeDropdownMenu = useCallback(() => setIsDropdownMenuOpen(false), []);
|
|
17
24
|
const openDropdownMenu = useCallback(() => setIsDropdownMenuOpen(true), []);
|
|
18
|
-
const openDropdownMenuKeyPress = useCallback(
|
|
19
|
-
if (e.key ===
|
|
25
|
+
const openDropdownMenuKeyPress = useCallback(e => {
|
|
26
|
+
if (e.key === ' ') {
|
|
20
27
|
setIsDropdownMenuOpen(true);
|
|
21
28
|
}
|
|
22
29
|
}, []);
|
|
23
|
-
const {
|
|
24
|
-
|
|
30
|
+
const {
|
|
31
|
+
ariaLabel,
|
|
32
|
+
style,
|
|
33
|
+
buttonType = 'secondary'
|
|
34
|
+
} = overflowButtonProps || {};
|
|
35
|
+
return /*#__PURE__*/_jsx(Container, {
|
|
25
36
|
role: "toolbar",
|
|
26
37
|
"data-testid": "ds-mini-toolbar"
|
|
27
|
-
}, shortcutItems,
|
|
38
|
+
}, void 0, shortcutItems, /*#__PURE__*/_jsx(DSDropdownMenu, {
|
|
28
39
|
"data-testid": "ds-mini-toolbar__dropdown-menu",
|
|
29
40
|
isOpen: isDropdownMenuOpen,
|
|
30
41
|
onSelectMenuItem: closeDropdownMenu,
|
|
31
42
|
onClickOutsideMenu: closeDropdownMenu,
|
|
32
43
|
options: dropdownMenuItems,
|
|
33
|
-
triggerComponent:
|
|
44
|
+
triggerComponent: /*#__PURE__*/_jsx(StyledButton, {
|
|
34
45
|
"aria-label": ariaLabel,
|
|
35
46
|
"data-testid": "ds-mini-toolbar__elipsis",
|
|
36
47
|
size: "m",
|
|
37
|
-
style,
|
|
38
|
-
buttonType,
|
|
48
|
+
style: style,
|
|
49
|
+
buttonType: buttonType,
|
|
39
50
|
onClick: openDropdownMenu,
|
|
40
51
|
onKeyPress: openDropdownMenuKeyPress,
|
|
41
52
|
leftIcon: Elipsis
|
|
42
53
|
})
|
|
43
54
|
}));
|
|
44
55
|
};
|
|
45
|
-
|
|
56
|
+
|
|
46
57
|
const MiniToolbarWithSchema = describe(MiniToolbar);
|
|
47
58
|
MiniToolbarWithSchema.propTypes = miniToolbarProps;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
MiniToolbarWithSchema
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=MiniToolbar.js.map
|
|
59
|
+
|
|
60
|
+
export { MiniToolbar, MiniToolbarWithSchema };
|
|
@@ -1,43 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
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;
|
|
6
24
|
const leftRef = useRef(null);
|
|
7
25
|
const rightRef = useRef(null);
|
|
8
26
|
const timerLeft = useRef(null);
|
|
9
27
|
const timerRight = useRef(null);
|
|
10
|
-
const {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
const {
|
|
29
|
+
position = 'left',
|
|
30
|
+
isOpen = false
|
|
31
|
+
} = contextualRegionProps || {};
|
|
32
|
+
const {
|
|
33
|
+
style
|
|
34
|
+
} = shortcutProps || {};
|
|
35
|
+
|
|
36
|
+
const mergedProps = _objectSpread(_objectSpread({}, sharedProps), shortcutProps);
|
|
37
|
+
|
|
16
38
|
useEffect(() => {
|
|
17
39
|
if (isOpen && leftRef.current) {
|
|
18
40
|
timerLeft.current = setTimeout(() => leftRef.current.focus(), 200);
|
|
19
41
|
}
|
|
42
|
+
|
|
20
43
|
if (isOpen && rightRef.current) {
|
|
21
44
|
timerRight.current = setTimeout(() => rightRef.current.focus(), 200);
|
|
22
45
|
}
|
|
46
|
+
|
|
23
47
|
return () => {
|
|
24
48
|
clearTimeout(timerLeft.current);
|
|
25
49
|
clearTimeout(timerRight.current);
|
|
26
50
|
};
|
|
27
51
|
}, [isOpen, leftRef, rightRef]);
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
...contextualRegionProps
|
|
38
|
-
})));
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
ToolbarShortcut
|
|
52
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
53
|
+
children: [isOpen && position === 'left' && /*#__PURE__*/_jsx(Item, {}, void 0, /*#__PURE__*/jsx(ContextualRegion, _objectSpread({
|
|
54
|
+
innerRef: leftRef
|
|
55
|
+
}, contextualRegionProps))), Component && /*#__PURE__*/_jsx(Item, {
|
|
56
|
+
style: style
|
|
57
|
+
}, void 0, /*#__PURE__*/jsx(Component, _objectSpread({}, mergedProps))), isOpen && position === 'right' && /*#__PURE__*/_jsx(Item, {}, void 0, /*#__PURE__*/jsx(ContextualRegion, _objectSpread({
|
|
58
|
+
innerRef: rightRef
|
|
59
|
+
}, contextualRegionProps)))]
|
|
60
|
+
});
|
|
42
61
|
};
|
|
43
|
-
|
|
62
|
+
|
|
63
|
+
export { ToolbarShortcut };
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
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), {}, {
|
|
6
16
|
"aria-label": props.ariaLabel,
|
|
7
17
|
"data-testid": "ds-mini-toolbar__shortcut"
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=Button.js.map
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export { MiniToolbarButton };
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import 'react';
|
|
8
|
+
import { DSComboBox2 } from '@elliemae/ds-form';
|
|
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 MiniToolbarComboBox = props => /*#__PURE__*/jsx(DSComboBox2, _objectSpread({}, props));
|
|
16
|
+
|
|
17
|
+
export { MiniToolbarComboBox };
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { StyledButton } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { StyledButton } from '../../styles.js';
|
|
4
|
+
|
|
5
|
+
const MiniToolbarIcon = props => {
|
|
6
|
+
const {
|
|
7
|
+
Icon,
|
|
8
|
+
size,
|
|
9
|
+
color,
|
|
9
10
|
onClick,
|
|
11
|
+
ariaLabel,
|
|
10
12
|
style,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
buttonType = 'secondary'
|
|
14
|
+
} = props;
|
|
15
|
+
return /*#__PURE__*/_jsx(StyledButton, {
|
|
16
|
+
"aria-label": ariaLabel,
|
|
17
|
+
buttonType: buttonType,
|
|
18
|
+
onClick: onClick,
|
|
19
|
+
style: style,
|
|
20
|
+
leftIcon: /*#__PURE__*/_jsx(Icon, {
|
|
21
|
+
size: size,
|
|
22
|
+
color: color
|
|
14
23
|
}),
|
|
15
24
|
"data-testid": "ds-mini-toolbar__shortcut"
|
|
16
25
|
});
|
|
17
26
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=IconItem.js.map
|
|
27
|
+
|
|
28
|
+
export { MiniToolbarIcon };
|
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
+
import 'react';
|
|
9
|
+
import { Search } from '@elliemae/ds-icons';
|
|
10
|
+
import { DSSearchBox } from '@elliemae/ds-form';
|
|
11
|
+
import { StyledButton } from '../../styles.js';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
const MiniToolbarSearchButton = props => {
|
|
19
|
+
const {
|
|
20
|
+
size,
|
|
21
|
+
color,
|
|
11
22
|
onClick,
|
|
23
|
+
ariaLabel,
|
|
12
24
|
style,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
buttonType = 'secondary'
|
|
26
|
+
} = props;
|
|
27
|
+
return /*#__PURE__*/_jsx(StyledButton, {
|
|
28
|
+
"aria-label": ariaLabel,
|
|
29
|
+
buttonType: buttonType,
|
|
30
|
+
onClick: onClick,
|
|
31
|
+
style: style,
|
|
32
|
+
leftIcon: /*#__PURE__*/_jsx(Search, {
|
|
33
|
+
size: size,
|
|
34
|
+
color: color
|
|
16
35
|
}),
|
|
17
36
|
"data-testid": "ds-mini-toolbar__shortcut"
|
|
18
37
|
});
|
|
19
38
|
};
|
|
20
|
-
|
|
39
|
+
|
|
40
|
+
const MiniToolbarSearchBox = props => /*#__PURE__*/jsx(DSSearchBox, _objectSpread({
|
|
21
41
|
clearable: true,
|
|
22
|
-
showIcon: false
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
MiniToolbarSearchBox,
|
|
27
|
-
MiniToolbarSearchButton
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=SearchBox.js.map
|
|
42
|
+
showIcon: false
|
|
43
|
+
}, props));
|
|
44
|
+
|
|
45
|
+
export { MiniToolbarSearchBox, MiniToolbarSearchButton };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Separator } from
|
|
4
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { Separator } from '../../styles.js';
|
|
4
|
+
|
|
5
|
+
var _Separator;
|
|
6
|
+
|
|
7
|
+
const MiniToolbarSeparator = () => _Separator || (_Separator = /*#__PURE__*/_jsx(Separator, {
|
|
5
8
|
"data-testid": "ds-mini-toolbar__separator"
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=Separator.js.map
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
export { MiniToolbarSeparator };
|
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const ICON_ITEM =
|
|
8
|
-
const SEPARATOR =
|
|
9
|
-
const BUTTON =
|
|
10
|
-
const SEARCH_BOX =
|
|
11
|
-
const COMBO_BOX =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
COMBO_BOX,
|
|
15
|
-
ICON_ITEM,
|
|
16
|
-
MiniToolbarButton,
|
|
17
|
-
MiniToolbarComboBox,
|
|
18
|
-
MiniToolbarIcon,
|
|
19
|
-
MiniToolbarSearchBox,
|
|
20
|
-
MiniToolbarSeparator,
|
|
21
|
-
SEARCH_BOX,
|
|
22
|
-
SEPARATOR
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { MiniToolbarButton } from './Button.js';
|
|
2
|
+
export { MiniToolbarIcon } from './IconItem.js';
|
|
3
|
+
export { MiniToolbarSearchBox } from './SearchBox.js';
|
|
4
|
+
export { MiniToolbarSeparator } from './Separator.js';
|
|
5
|
+
export { MiniToolbarComboBox } from './ComboBox.js';
|
|
6
|
+
|
|
7
|
+
const ICON_ITEM = 'ds-icon-item';
|
|
8
|
+
const SEPARATOR = 'ds-separator';
|
|
9
|
+
const BUTTON = 'ds-button';
|
|
10
|
+
const SEARCH_BOX = 'ds-search-box';
|
|
11
|
+
const COMBO_BOX = 'ds-combo-box';
|
|
12
|
+
|
|
13
|
+
export { BUTTON, COMBO_BOX, ICON_ITEM, SEARCH_BOX, SEPARATOR };
|