@elliemae/ds-global-header 2.0.0-alpha.9 → 2.0.0-next.4

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.
@@ -63,7 +63,7 @@ const GlobalHeaderBreadcrumb = () => {
63
63
  isSelected: isSelected,
64
64
  onClick: onClick,
65
65
  length: breadcrumb.length
66
- }, `${instanceUID}-breadcrumb-item-${label}`);
66
+ }, "".concat(instanceUID, "-breadcrumb-item-").concat(label));
67
67
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
68
68
  id: "global-header-flex-region",
69
69
  ref: flexRegion
@@ -30,12 +30,12 @@ const Label = /*#__PURE__*/styled__default["default"].p.withConfig({
30
30
  }) => theme.colors.neutral['000'], ({
31
31
  theme,
32
32
  isSelected
33
- }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`, ({
33
+ }) => "-webkit-text-stroke: 0.4px ".concat(isSelected ? theme.colors.neutral['000'] : 'transparent'), ({
34
34
  isSelected,
35
35
  isOnlyItem
36
- }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`, ({
36
+ }) => "2px solid ".concat(isSelected && !isOnlyItem ? '#FFF' : 'transparent'), ({
37
37
  theme
38
- }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`);
38
+ }) => "-webkit-text-stroke: 0.4px ".concat(theme.colors.neutral['000']));
39
39
 
40
40
  exports.BreadcrumbItem = BreadcrumbItem;
41
41
  exports.Label = Label;
@@ -44,7 +44,7 @@ const ToolbarItems = () => {
44
44
  Icon: Icon,
45
45
  options: options,
46
46
  closeOnClick: closeOnClick
47
- }, `${instanceUID}-ds-popup-menu-${label}`);
47
+ }, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
48
48
 
49
49
  case 'ds-app-picker':
50
50
  const {
@@ -64,14 +64,14 @@ const ToolbarItems = () => {
64
64
  customSectionTitle: customSectionTitle,
65
65
  actionRef: actionRef,
66
66
  onKeyDown: onKeyDown
67
- }, `${instanceUID}-ds-app-picker-${label}`);
67
+ }, "".concat(instanceUID, "-ds-app-picker-").concat(label));
68
68
 
69
69
  default:
70
70
  return /*#__PURE__*/_jsx__default["default"](styles.Button, {
71
71
  onClick: onClick,
72
72
  title: label,
73
73
  "data-testid": "gh-toolbar-item"
74
- }, `${instanceUID}-ds-toolbar-button-${label}`, _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {
74
+ }, "".concat(instanceUID, "-ds-toolbar-button-").concat(label), _Icon || (_Icon = /*#__PURE__*/_jsx__default["default"](Icon, {
75
75
  fill: "#FFF",
76
76
  size: "m"
77
77
  })));
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/web.dom-collections.iterator.js');
5
6
  var React = require('react');
6
7
  var uid = require('uid');
7
8
  var useGetPropsWithDefaults = require('./useGetPropsWithDefaults.js');
@@ -30,42 +30,19 @@ const getVariableType = arg => {
30
30
  };
31
31
  const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu';
32
32
  const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
33
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a breadcrumb item, please provide a valid type.
34
-
35
- Received: ${invalidProp} (${typeof invalidProp})
36
- Expected: (${breadcrumbProps[validPropKey]})
37
- `);
33
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
38
34
  };
39
35
  const throwToolbarPopupItemError = (validPropKey, invalidProp) => {
40
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-popup-menu
41
- toolbar item, please provide a valid type.
42
-
43
- Received: ${invalidProp} (${getVariableType(invalidProp)})
44
- Expected: (${toolbarProps[validPropKey]})
45
- `);
36
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
46
37
  };
47
38
  const throwToolbarAppPickerItemError = (validPropKey, invalidProp) => {
48
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-app-picker
49
- toolbar item, please provide a valid type.
50
-
51
- Received: ${invalidProp} (${getVariableType(invalidProp)})
52
- Expected: (${toolbarProps[validPropKey]})
53
- `);
39
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
54
40
  };
55
41
  const throwToolbarItemGenericError = (validPropKey, invalidProp) => {
56
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a toolbar item, please provide a valid type.
57
-
58
- Received: ${invalidProp} (${getVariableType(invalidProp)})
59
- Expected: (${toolbarProps[validPropKey]})
60
- `);
42
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
61
43
  };
62
44
  const throwLogoError = (validPropKey, invalidProp) => {
63
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a global header,
64
- remember to provide both Logo and LogoWithBrand properties with a valid type.
65
-
66
- Received: ${invalidProp} (${getVariableType(invalidProp)}).
67
- Expected: (react component).
68
- `);
45
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ").\n Expected: (react component).\n "));
69
46
  };
70
47
 
71
48
  exports.breadcrumbProps = breadcrumbProps;
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
6
7
  var React = require('react');
7
8
  var dsAppPicker = require('@elliemae/ds-app-picker');
8
9
  var MenuPicker = require('@elliemae/ds-icons/MenuPicker');
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
6
7
  var React = require('react');
7
8
  var Popover = require('@elliemae/ds-popover');
8
9
  var PopupMenuContent = require('./PopupMenuContent.js');
@@ -49,19 +49,19 @@ const PopupMenuContent = /*#__PURE__*/React__default["default"].memo(({
49
49
 
50
50
  switch (type) {
51
51
  case 'separator':
52
- return /*#__PURE__*/_jsx__default["default"](styles.Separator, {}, `${instanceUID}-separator-${label}`);
52
+ return /*#__PURE__*/_jsx__default["default"](styles.Separator, {}, "".concat(instanceUID, "-separator-").concat(label));
53
53
 
54
54
  case 'custom':
55
55
  return /*#__PURE__*/_jsx__default["default"](styles.ItemWrapper, {
56
56
  onClick: handleClick,
57
57
  onKeyDown: handleKeyDown
58
- }, `${instanceUID}-popup-${label}`, _Content || (_Content = /*#__PURE__*/_jsx__default["default"](Content, {})));
58
+ }, "".concat(instanceUID, "-popup-").concat(label), _Content || (_Content = /*#__PURE__*/_jsx__default["default"](Content, {})));
59
59
 
60
60
  default:
61
61
  return /*#__PURE__*/_jsx__default["default"](styles.ItemWrapper, {
62
62
  onClick: handleClick,
63
63
  onKeyDown: handleKeyDown
64
- }, `${instanceUID}-popup-${label}`, icon, styles.Label && /*#__PURE__*/_jsx__default["default"](styles.Label, {}, void 0, label));
64
+ }, "".concat(instanceUID, "-popup-").concat(label), icon, styles.Label && /*#__PURE__*/_jsx__default["default"](styles.Label, {}, void 0, label));
65
65
  }
66
66
  }), [onClose, onItemClick, options, instanceUID]);
67
67
  return /*#__PURE__*/jsxRuntime.jsx(styles.List, {
@@ -15,7 +15,7 @@ const ItemWrapper = /*#__PURE__*/styled__default["default"].button.withConfig({
15
15
  componentId: "sc-snqcgs-1"
16
16
  })(["display:flex;align-items:center;justify-content:center;width:100%;padding:0 20px;cursor:pointer;border:1px solid transparent;background-color:transparent;outline:none;:hover,:focus{border:", ";}"], ({
17
17
  theme
18
- }) => `1px solid ${theme.colors.brand[600]}`);
18
+ }) => "1px solid ".concat(theme.colors.brand[600]));
19
19
  const Label = /*#__PURE__*/styled__default["default"].p.withConfig({
20
20
  componentId: "sc-snqcgs-2"
21
21
  })(["width:100%;font-size:14px;margin:10px;"]);
@@ -55,7 +55,7 @@ const GlobalHeaderBreadcrumb = () => {
55
55
  isSelected: isSelected,
56
56
  onClick: onClick,
57
57
  length: breadcrumb.length
58
- }, `${instanceUID}-breadcrumb-item-${label}`);
58
+ }, "".concat(instanceUID, "-breadcrumb-item-").concat(label));
59
59
  }), /*#__PURE__*/jsx("div", {
60
60
  id: "global-header-flex-region",
61
61
  ref: flexRegion
@@ -22,11 +22,11 @@ const Label = /*#__PURE__*/styled.p.withConfig({
22
22
  }) => theme.colors.neutral['000'], ({
23
23
  theme,
24
24
  isSelected
25
- }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`, ({
25
+ }) => "-webkit-text-stroke: 0.4px ".concat(isSelected ? theme.colors.neutral['000'] : 'transparent'), ({
26
26
  isSelected,
27
27
  isOnlyItem
28
- }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`, ({
28
+ }) => "2px solid ".concat(isSelected && !isOnlyItem ? '#FFF' : 'transparent'), ({
29
29
  theme
30
- }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`);
30
+ }) => "-webkit-text-stroke: 0.4px ".concat(theme.colors.neutral['000']));
31
31
 
32
32
  export { BreadcrumbItem, Label, LabelButton, Pipe };
@@ -36,7 +36,7 @@ const ToolbarItems = () => {
36
36
  Icon: Icon,
37
37
  options: options,
38
38
  closeOnClick: closeOnClick
39
- }, `${instanceUID}-ds-popup-menu-${label}`);
39
+ }, "".concat(instanceUID, "-ds-popup-menu-").concat(label));
40
40
 
41
41
  case 'ds-app-picker':
42
42
  const {
@@ -56,14 +56,14 @@ const ToolbarItems = () => {
56
56
  customSectionTitle: customSectionTitle,
57
57
  actionRef: actionRef,
58
58
  onKeyDown: onKeyDown
59
- }, `${instanceUID}-ds-app-picker-${label}`);
59
+ }, "".concat(instanceUID, "-ds-app-picker-").concat(label));
60
60
 
61
61
  default:
62
62
  return /*#__PURE__*/_jsx(Button, {
63
63
  onClick: onClick,
64
64
  title: label,
65
65
  "data-testid": "gh-toolbar-item"
66
- }, `${instanceUID}-ds-toolbar-button-${label}`, _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
66
+ }, "".concat(instanceUID, "-ds-toolbar-button-").concat(label), _Icon || (_Icon = /*#__PURE__*/_jsx(Icon, {
67
67
  fill: "#FFF",
68
68
  size: "m"
69
69
  })));
@@ -1,3 +1,4 @@
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
1
2
  import React, { useState, useMemo } from 'react';
2
3
  import { uid } from 'uid';
3
4
  import { useGetPropsWithDefaults } from './useGetPropsWithDefaults.js';
@@ -26,42 +26,19 @@ const getVariableType = arg => {
26
26
  };
27
27
  const isValidToolbarType = string => string === 'ds-app-picker' || string === 'ds-popup-menu';
28
28
  const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
29
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a breadcrumb item, please provide a valid type.
30
-
31
- Received: ${invalidProp} (${typeof invalidProp})
32
- Expected: (${breadcrumbProps[validPropKey]})
33
- `);
29
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a breadcrumb item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(typeof invalidProp, ")\n Expected: (").concat(breadcrumbProps[validPropKey], ")\n "));
34
30
  };
35
31
  const throwToolbarPopupItemError = (validPropKey, invalidProp) => {
36
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-popup-menu
37
- toolbar item, please provide a valid type.
38
-
39
- Received: ${invalidProp} (${getVariableType(invalidProp)})
40
- Expected: (${toolbarProps[validPropKey]})
41
- `);
32
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
42
33
  };
43
34
  const throwToolbarAppPickerItemError = (validPropKey, invalidProp) => {
44
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-app-picker
45
- toolbar item, please provide a valid type.
46
-
47
- Received: ${invalidProp} (${getVariableType(invalidProp)})
48
- Expected: (${toolbarProps[validPropKey]})
49
- `);
35
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
50
36
  };
51
37
  const throwToolbarItemGenericError = (validPropKey, invalidProp) => {
52
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a toolbar item, please provide a valid type.
53
-
54
- Received: ${invalidProp} (${getVariableType(invalidProp)})
55
- Expected: (${toolbarProps[validPropKey]})
56
- `);
38
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a toolbar item, please provide a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ")\n Expected: (").concat(toolbarProps[validPropKey], ")\n "));
57
39
  };
58
40
  const throwLogoError = (validPropKey, invalidProp) => {
59
- throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a global header,
60
- remember to provide both Logo and LogoWithBrand properties with a valid type.
61
-
62
- Received: ${invalidProp} (${getVariableType(invalidProp)}).
63
- Expected: (react component).
64
- `);
41
+ throw new Error("You are trying to pass a not valid \"".concat(validPropKey, "\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ").concat(invalidProp, " (").concat(getVariableType(invalidProp), ").\n Expected: (react component).\n "));
65
42
  };
66
43
 
67
44
  export { breadcrumbProps, getVariableType, isObject, isValidToolbarType, throwBreadcrumbItemError, throwLogoError, throwToolbarAppPickerItemError, throwToolbarItemGenericError, throwToolbarPopupItemError, toolbarProps };
@@ -1,4 +1,5 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState, useRef, useCallback, useMemo } from 'react';
3
4
  import { DSAppPicker } from '@elliemae/ds-app-picker';
4
5
  import MenuPicker from '@elliemae/ds-icons/MenuPicker';
@@ -1,4 +1,5 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState, useRef, useCallback, useMemo } from 'react';
3
4
  import Popover from '@elliemae/ds-popover';
4
5
  import { PopupMenuContent } from './PopupMenuContent.js';
@@ -40,19 +40,19 @@ const PopupMenuContent = /*#__PURE__*/React.memo(({
40
40
 
41
41
  switch (type) {
42
42
  case 'separator':
43
- return /*#__PURE__*/_jsx(Separator, {}, `${instanceUID}-separator-${label}`);
43
+ return /*#__PURE__*/_jsx(Separator, {}, "".concat(instanceUID, "-separator-").concat(label));
44
44
 
45
45
  case 'custom':
46
46
  return /*#__PURE__*/_jsx(ItemWrapper, {
47
47
  onClick: handleClick,
48
48
  onKeyDown: handleKeyDown
49
- }, `${instanceUID}-popup-${label}`, _Content || (_Content = /*#__PURE__*/_jsx(Content, {})));
49
+ }, "".concat(instanceUID, "-popup-").concat(label), _Content || (_Content = /*#__PURE__*/_jsx(Content, {})));
50
50
 
51
51
  default:
52
52
  return /*#__PURE__*/_jsx(ItemWrapper, {
53
53
  onClick: handleClick,
54
54
  onKeyDown: handleKeyDown
55
- }, `${instanceUID}-popup-${label}`, icon, Label && /*#__PURE__*/_jsx(Label, {}, void 0, label));
55
+ }, "".concat(instanceUID, "-popup-").concat(label), icon, Label && /*#__PURE__*/_jsx(Label, {}, void 0, label));
56
56
  }
57
57
  }), [onClose, onItemClick, options, instanceUID]);
58
58
  return /*#__PURE__*/jsx(List, {
@@ -7,7 +7,7 @@ const ItemWrapper = /*#__PURE__*/styled.button.withConfig({
7
7
  componentId: "sc-snqcgs-1"
8
8
  })(["display:flex;align-items:center;justify-content:center;width:100%;padding:0 20px;cursor:pointer;border:1px solid transparent;background-color:transparent;outline:none;:hover,:focus{border:", ";}"], ({
9
9
  theme
10
- }) => `1px solid ${theme.colors.brand[600]}`);
10
+ }) => "1px solid ".concat(theme.colors.brand[600]));
11
11
  const Label = /*#__PURE__*/styled.p.withConfig({
12
12
  componentId: "sc-snqcgs-2"
13
13
  })(["width:100%;font-size:14px;margin:10px;"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-global-header",
3
- "version": "2.0.0-alpha.9",
3
+ "version": "2.0.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Global Header",
6
6
  "module": "./esm/index.js",
@@ -120,12 +120,12 @@
120
120
  "build": "node ../../scripts/build/build.js"
121
121
  },
122
122
  "dependencies": {
123
- "@elliemae/ds-app-picker": "2.0.0-alpha.9",
124
- "@elliemae/ds-classnames": "2.0.0-alpha.9",
125
- "@elliemae/ds-grid": "2.0.0-alpha.9",
126
- "@elliemae/ds-icons": "2.0.0-alpha.9",
127
- "@elliemae/ds-popover": "2.0.0-alpha.9",
128
- "@elliemae/ds-utilities": "2.0.0-alpha.9",
123
+ "@elliemae/ds-app-picker": "2.0.0-next.4",
124
+ "@elliemae/ds-classnames": "2.0.0-next.4",
125
+ "@elliemae/ds-grid": "2.0.0-next.4",
126
+ "@elliemae/ds-icons": "2.0.0-next.4",
127
+ "@elliemae/ds-popover": "2.0.0-next.4",
128
+ "@elliemae/ds-utilities": "2.0.0-next.4",
129
129
  "react-desc": "~4.1.3",
130
130
  "uid": "~2.0.0"
131
131
  },
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }