@salesforce/design-system-react 0.10.43 → 0.10.44

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 (51) hide show
  1. package/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
  2. package/components/brand-band/__docs__/storybook-stories.jsx +4 -2
  3. package/components/brand-band/__examples__/{lightning-blue-theme.jsx → group-image.jsx} +1 -11
  4. package/components/brand-band/__examples__/no-image.jsx +1 -2
  5. package/{lib/components/brand-band/__examples__/lightning-blue-theme.jsx → components/brand-band/__examples__/user-image.jsx} +1 -11
  6. package/components/brand-band/check-props.js +18 -0
  7. package/components/brand-band/component.json +8 -4
  8. package/components/brand-band/index.jsx +23 -66
  9. package/components/brand-band.d.ts +1 -26
  10. package/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
  11. package/components/combobox/combobox.jsx +4 -1
  12. package/components/component-docs.json +9 -38
  13. package/components/site-stories.js +8 -4
  14. package/lib/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
  15. package/lib/components/brand-band/__docs__/storybook-stories.jsx +4 -2
  16. package/lib/components/brand-band/__examples__/group-image.jsx +12 -0
  17. package/lib/components/brand-band/__examples__/no-image.jsx +1 -2
  18. package/lib/components/brand-band/__examples__/user-image.jsx +12 -0
  19. package/lib/components/brand-band/check-props.js +29 -0
  20. package/lib/components/brand-band/component.json +8 -4
  21. package/lib/components/brand-band/index.js +9 -50
  22. package/lib/components/brand-band.d.ts +1 -26
  23. package/lib/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
  24. package/lib/components/combobox/combobox.js +6 -2
  25. package/lib/components/component-docs.json +9 -38
  26. package/lib/components/site-stories.js +6 -3
  27. package/lib/package.json +10 -6
  28. package/module/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
  29. package/module/components/brand-band/__docs__/storybook-stories.js +6 -3
  30. package/module/components/brand-band/__docs__/storybook-stories.js.map +1 -1
  31. package/module/components/brand-band/__examples__/{lightning-blue-theme.js → group-image.js} +4 -9
  32. package/module/components/brand-band/__examples__/group-image.js.map +1 -0
  33. package/module/components/brand-band/__examples__/no-image.js +2 -4
  34. package/module/components/brand-band/__examples__/no-image.js.map +1 -1
  35. package/module/components/brand-band/__examples__/user-image.js +52 -0
  36. package/module/components/brand-band/__examples__/user-image.js.map +1 -0
  37. package/module/components/brand-band/check-props.js +20 -0
  38. package/module/components/brand-band/check-props.js.map +1 -0
  39. package/module/components/brand-band/component.json +8 -4
  40. package/module/components/brand-band/index.js +10 -51
  41. package/module/components/brand-band/index.js.map +1 -1
  42. package/module/components/brand-band.d.ts +1 -26
  43. package/module/components/combobox/__tests__/combobox.browser-test.js +22 -0
  44. package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
  45. package/module/components/combobox/combobox.js +6 -2
  46. package/module/components/combobox/combobox.js.map +1 -1
  47. package/module/components/component-docs.json +9 -38
  48. package/module/components/site-stories.js +6 -3
  49. package/module/components/site-stories.js.map +1 -1
  50. package/package.json +10 -6
  51. package/module/components/brand-band/__examples__/lightning-blue-theme.js.map +0 -1
@@ -1,11 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
4
-
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
-
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
-
9
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
4
 
11
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -42,25 +36,13 @@ import shortid from 'shortid'; // ### classNames
42
36
  // [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
43
37
  // A simple javascript utility for conditionally joining classNames together.
44
38
 
45
- import classNames from '../../utilities/class-names'; // ## Constants
39
+ import classNames from '../../utilities/class-names'; // This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)
40
+
41
+ import checkProps from './check-props'; // ## Constants
46
42
 
47
43
  import { BRAND_BAND } from '../../utilities/constants';
48
44
  /**
49
45
  * The brand band provides theming capability that adds personality and improves information density and contrast.
50
- *
51
- * NOTE: you may find that themes other than 'default' fail to load the appropriate styling in your application.
52
- * If this occurs the cause is very likely to be CSP settings on the server hosting your application protecting against style injections.
53
- * Changing these settings is not recommended. Instead, add the following styles to any stylesheet provided by the server itself (such as an external stylesheet):
54
- *
55
- * When using 'lightning-theme':
56
- * .slds-brand-band.dsr-brand-band_lightning-blue:before {
57
- * background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
58
- * }
59
- * .slds-brand-band.dsr-brand-band_lightning-blue:after {
60
- * background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
61
- * }
62
- *
63
- * For more information on the problem, [see this Stack Overflow question](https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security)
64
46
  */
65
47
 
66
48
  var BrandBand = /*#__PURE__*/function (_React$Component) {
@@ -74,6 +56,7 @@ var BrandBand = /*#__PURE__*/function (_React$Component) {
74
56
  _classCallCheck(this, BrandBand);
75
57
 
76
58
  _this = _super.call(this, props);
59
+ checkProps(BRAND_BAND, _this.props);
77
60
  _this.generatedId = shortid.generate();
78
61
  return _this;
79
62
  }
@@ -88,30 +71,18 @@ var BrandBand = /*#__PURE__*/function (_React$Component) {
88
71
  value: function render() {
89
72
  var props = this.props;
90
73
  return /*#__PURE__*/React.createElement("div", {
91
- style: _objectSpread({
92
- background: 'rgb(176, 196, 223)',
93
- height: '100%',
94
- position: 'relative',
95
- width: '100%',
96
- zIndex: 1
97
- }, props.styleContainer)
98
- }, BrandBand.injectLightningBlueStyles(), /*#__PURE__*/React.createElement("div", {
99
74
  className: classNames('slds-brand-band', {
100
75
  'slds-brand-band_small': props.size === 'small',
101
76
  'slds-brand-band_medium': props.size === 'medium',
102
77
  'slds-brand-band_large': props.size === 'large',
103
78
  'slds-brand-band_cover': props.backgroundSize === 'cover',
104
79
  'slds-brand-band_none': props.image === 'none',
105
- 'dsr-brand-band_lightning-blue': true
80
+ 'slds-brand-band_group': props.image === 'group',
81
+ 'slds-brand-band_user': props.image === 'user'
106
82
  }, props.className),
107
83
  id: this.getId(),
108
84
  style: props.style
109
- }, props.children));
110
- }
111
- }], [{
112
- key: "injectLightningBlueStyles",
113
- value: function injectLightningBlueStyles() {
114
- return /*#__PURE__*/React.createElement("style", null, ".slds-brand-band.dsr-brand-band_lightning-blue:before {\n\tbackground-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);\n}\n.slds-brand-band.dsr-brand-band_lightning-blue:after {\n\tbackground-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);\n}");
85
+ }, props.children);
115
86
  }
116
87
  }]);
117
88
 
@@ -138,7 +109,7 @@ BrandBand.propTypes = {
138
109
  /**
139
110
  * Image of the brand band
140
111
  */
141
- image: PropTypes.oneOf(['default', 'none']),
112
+ image: PropTypes.oneOf(['default', 'none', 'group', 'user']),
142
113
 
143
114
  /**
144
115
  * Background size of the brand band. Default is 'contain'
@@ -153,24 +124,12 @@ BrandBand.propTypes = {
153
124
  /**
154
125
  * Custom styles to be passed to the component
155
126
  */
156
- style: PropTypes.object,
157
-
158
- /**
159
- * Custom styles to be passed to the component container
160
- */
161
- styleContainer: PropTypes.object,
162
-
163
- /**
164
- * Different brand band styling.
165
- * NOTE: using 'lightning-blue' may result in incorrect styling depending on server CSP settings. See opening component documentation above for details.
166
- */
167
- theme: PropTypes.oneOf(['default', 'lightning-blue'])
127
+ style: PropTypes.object
168
128
  };
169
129
  BrandBand.defaultProps = {
170
130
  backgroundSize: 'contain',
171
131
  image: 'default',
172
- size: 'medium',
173
- theme: 'default'
132
+ size: 'medium'
174
133
  };
175
134
  export default BrandBand;
176
135
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../.tmp-es/components/brand-band/index.jsx"],"names":["React","PropTypes","shortid","classNames","BRAND_BAND","BrandBand","props","generatedId","generate","id","background","height","position","width","zIndex","styleContainer","injectLightningBlueStyles","size","backgroundSize","image","className","getId","style","children","Component","displayName","propTypes","node","oneOfType","array","object","string","oneOf","theme","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAEA;AAEA;AAEA;AAEA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB,C,CAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,SAApB,C,CAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,6BAAvB,C,CAEA;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rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Brand Band Component\n\n// Implements the [Brand Band design pattern](https://latest-216.lightningdesignsystem.com/components/brand-band/) in React.\n\n// ## Dependencies\n\n// ### React\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// ### shortid\n// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)\n// shortid is a short, non-sequential, url-friendly, unique id generator\nimport shortid from 'shortid';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from '../../utilities/class-names';\n\n// ## Constants\nimport { BRAND_BAND } from '../../utilities/constants';\n\n/**\n * The brand band provides theming capability that adds personality and improves information density and contrast.\n *\n * NOTE: you may find that themes other than 'default' fail to load the appropriate styling in your application.\n * If this occurs the cause is very likely to be CSP settings on the server hosting your application protecting against style injections.\n * Changing these settings is not recommended. Instead, add the following styles to any stylesheet provided by the server itself (such as an external stylesheet):\n *\n * When using 'lightning-theme':\n * .slds-brand-band.dsr-brand-band_lightning-blue:before {\n * background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);\n * }\n * .slds-brand-band.dsr-brand-band_lightning-blue:after {\n * background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);\n * }\n *\n * For more information on the problem, [see this Stack Overflow question](https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security)\n */\nclass BrandBand extends React.Component {\n\tstatic injectLightningBlueStyles() {\n\t\treturn (\n\t\t\t<style>{`.slds-brand-band.dsr-brand-band_lightning-blue:before {\n\tbackground-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);\n}\n.slds-brand-band.dsr-brand-band_lightning-blue:after {\n\tbackground-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);\n}`}</style>\n\t\t);\n\t}\n\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.generatedId = shortid.generate();\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\trender() {\n\t\tconst { props } = this;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tbackground: 'rgb(176, 196, 223)',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tposition: 'relative',\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t...props.styleContainer,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{BrandBand.injectLightningBlueStyles()}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-brand-band',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-brand-band_small': props.size === 'small',\n\t\t\t\t\t\t\t'slds-brand-band_medium': props.size === 'medium',\n\t\t\t\t\t\t\t'slds-brand-band_large': props.size === 'large',\n\t\t\t\t\t\t\t'slds-brand-band_cover': props.backgroundSize === 'cover',\n\t\t\t\t\t\t\t'slds-brand-band_none': props.image === 'none',\n\n\t\t\t\t\t\t\t'dsr-brand-band_lightning-blue': true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tprops.className\n\t\t\t\t\t)}\n\t\t\t\t\tid={this.getId()}\n\t\t\t\t\tstyle={props.style}\n\t\t\t\t>\n\t\t\t\t\t{props.children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nBrandBand.displayName = BRAND_BAND;\n\nBrandBand.propTypes = {\n\t/**\n\t * Primary application grid layout or a white background component such as a `Card` should be passed into this component.\n\t */\n\tchildren: PropTypes.node,\n\n\t/**\n\t * CSS classes that are applied to the component\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\n\t/**\n\t * Id of component, if desired. If not provided an id is automatically generated\n\t */\n\tid: PropTypes.string,\n\n\t/**\n\t * Image of the brand band\n\t */\n\timage: PropTypes.oneOf(['default', 'none']),\n\n\t/**\n\t * Background size of the brand band. Default is 'contain'\n\t */\n\tbackgroundSize: PropTypes.oneOf(['contain', 'cover']),\n\t/**\n\t * Size of the brand band. Default is 'medium'\n\t */\n\tsize: PropTypes.oneOf(['small', 'medium', 'large']),\n\n\t/**\n\t * Custom styles to be passed to the component\n\t */\n\tstyle: PropTypes.object,\n\n\t/**\n\t * Custom styles to be passed to the component container\n\t */\n\tstyleContainer: PropTypes.object,\n\n\t/**\n\t * Different brand band styling.\n\t * NOTE: using 'lightning-blue' may result in incorrect styling depending on server CSP settings. See opening component documentation above for details.\n\t */\n\ttheme: PropTypes.oneOf(['default', 'lightning-blue']),\n};\n\nBrandBand.defaultProps = {\n\tbackgroundSize: 'contain',\n\timage: 'default',\n\tsize: 'medium',\n\ttheme: 'default',\n};\n\nexport default BrandBand;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../.tmp-es/components/brand-band/index.jsx"],"names":["React","PropTypes","shortid","classNames","checkProps","BRAND_BAND","BrandBand","props","generatedId","generate","id","size","backgroundSize","image","className","getId","style","children","Component","displayName","propTypes","node","oneOfType","array","object","string","oneOf","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAEA;AAEA;AAEA;AAEA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB,C,CAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,SAApB,C,CAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,6BAAvB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,eAAvB,C,CAEA;;AACA,SAASC,UAAT,QAA2B,2BAA3B;AAEA;AACA;AACA;;IACMC,S;;;;;AACL,qBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AAClB,8BAAMA,KAAN;AAEAH,IAAA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;AACA;AACCZ,EAAAA,KAAK,EAAEZ,SAAS,CAACyB,KAAV,CAAgB,CAAC,SAAD,EAAY,MAAZ,EAAoB,OAApB,EAA6B,MAA7B,CAAhB,CAvBc;;AAyBrB;AACD;AACA;AACCd,EAAAA,cAAc,EAAEX,SAAS,CAACyB,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,CAAhB,CA5BK;;AA8BrB;AACD;AACA;AACCf,EAAAA,IAAI,EAAEV,SAAS,CAACyB,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,CAAhB,CAjCe;;AAmCrB;AACD;AACA;AACCV,EAAAA,KAAK,EAAEf,SAAS,CAACuB;AAtCI,CAAtB;AAyCAlB,SAAS,CAACqB,YAAV,GAAyB;AACxBf,EAAAA,cAAc,EAAE,SADQ;AAExBC,EAAAA,KAAK,EAAE,SAFiB;AAGxBF,EAAAA,IAAI,EAAE;AAHkB,CAAzB;AAMA,eAAeL,SAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Brand Band Component\n\n// Implements the [Brand Band design pattern](https://latest-216.lightningdesignsystem.com/components/brand-band/) in React.\n\n// ## Dependencies\n\n// ### React\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// ### shortid\n// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)\n// shortid is a short, non-sequential, url-friendly, unique id generator\nimport shortid from 'shortid';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from '../../utilities/class-names';\n\n// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\n\n// ## Constants\nimport { BRAND_BAND } from '../../utilities/constants';\n\n/**\n * The brand band provides theming capability that adds personality and improves information density and contrast.\n */\nclass BrandBand extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tcheckProps(BRAND_BAND, this.props);\n\t\tthis.generatedId = shortid.generate();\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\trender() {\n\t\tconst { props } = this;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-brand-band',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-brand-band_small': props.size === 'small',\n\t\t\t\t\t\t'slds-brand-band_medium': props.size === 'medium',\n\t\t\t\t\t\t'slds-brand-band_large': props.size === 'large',\n\t\t\t\t\t\t'slds-brand-band_cover': props.backgroundSize === 'cover',\n\t\t\t\t\t\t'slds-brand-band_none': props.image === 'none',\n\t\t\t\t\t\t'slds-brand-band_group': props.image === 'group',\n\t\t\t\t\t\t'slds-brand-band_user': props.image === 'user',\n\t\t\t\t\t},\n\t\t\t\t\tprops.className\n\t\t\t\t)}\n\t\t\t\tid={this.getId()}\n\t\t\t\tstyle={props.style}\n\t\t\t>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nBrandBand.displayName = BRAND_BAND;\n\nBrandBand.propTypes = {\n\t/**\n\t * Primary application grid layout or a white background component such as a `Card` should be passed into this component.\n\t */\n\tchildren: PropTypes.node,\n\n\t/**\n\t * CSS classes that are applied to the component\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\n\t/**\n\t * Id of component, if desired. If not provided an id is automatically generated\n\t */\n\tid: PropTypes.string,\n\n\t/**\n\t * Image of the brand band\n\t */\n\timage: PropTypes.oneOf(['default', 'none', 'group', 'user']),\n\n\t/**\n\t * Background size of the brand band. Default is 'contain'\n\t */\n\tbackgroundSize: PropTypes.oneOf(['contain', 'cover']),\n\n\t/**\n\t * Size of the brand band. Default is 'medium'\n\t */\n\tsize: PropTypes.oneOf(['small', 'medium', 'large']),\n\n\t/**\n\t * Custom styles to be passed to the component\n\t */\n\tstyle: PropTypes.object,\n};\n\nBrandBand.defaultProps = {\n\tbackgroundSize: 'contain',\n\timage: 'default',\n\tsize: 'medium',\n};\n\nexport default BrandBand;\n"],"file":"index.js"}
@@ -19,7 +19,7 @@ declare module '@salesforce/design-system-react/components/brand-band' {
19
19
  /**
20
20
  * Image of the brand band
21
21
  */
22
- image?: 'default' | 'none';
22
+ image?: 'default' | 'none' | 'user' | 'group';
23
23
 
24
24
  /**
25
25
  * Background size of the brand band. Default is 'contain'
@@ -34,34 +34,9 @@ declare module '@salesforce/design-system-react/components/brand-band' {
34
34
  * Custom styles to be passed to the component
35
35
  */
36
36
  style?: Record<string, any>;
37
-
38
- /**
39
- * Custom styles to be passed to the component container
40
- */
41
- styleContainer?: Record<string, any>;
42
-
43
- /**
44
- * Different brand band styling.
45
- * NOTE: using 'lightning-blue' may result in incorrect styling depending on server CSP settings. See opening component documentation above for details.
46
- */
47
- theme?: 'default' | 'lightning-blue';
48
37
  };
49
38
  /**
50
39
  * The brand band provides theming capability that adds personality and improves information density and contrast.
51
- *
52
- * NOTE: you may find that themes other than 'default' fail to load the appropriate styling in your application.
53
- * If this occurs the cause is very likely to be CSP settings on the server hosting your application protecting against style injections.
54
- * Changing these settings is not recommended. Instead, add the following styles to any stylesheet provided by the server itself (such as an external stylesheet):
55
- *
56
- * When using 'lightning-theme':
57
- * .slds-brand-band.dsr-brand-band_lightning-blue:before {
58
- * background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
59
- * }
60
- * .slds-brand-band.dsr-brand-band_lightning-blue:after {
61
- * background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
62
- * }
63
- *
64
- * For more information on the problem, [see this Stack Overflow question](https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security)
65
40
  */
66
41
  function Component(props: Props): JSX.Element;
67
42
  export default Component;
@@ -62,6 +62,9 @@ import IconSettings from '../../../components/icon-settings';
62
62
  */
63
63
 
64
64
  chai.use(chaiEnzyme());
65
+
66
+ var callbacks = require('../../../utilities/key-callbacks');
67
+
65
68
  var accounts = [{
66
69
  id: '1',
67
70
  label: 'Acme',
@@ -522,6 +525,25 @@ describe('SLDSCombobox', function describeFunction() {
522
525
 
523
526
  expect(scrollTop2 === 4 || scrollTop2 === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird
524
527
  });
528
+ it('propagates keyboard events when menu is closed', function () {
529
+ var spiedCallbacks = sinon.spy(callbacks, 'default');
530
+ wrapper = mount( /*#__PURE__*/React.createElement(DemoComponent, {
531
+ variant: "inline-listbox"
532
+ }), {
533
+ attachTo: mountNode
534
+ });
535
+ var nodes = getNodes({
536
+ wrapper: wrapper
537
+ }); // click in the input to open up menu
538
+
539
+ nodes.input.simulate('click', {}); // esc to close the menu and stop event propagation
540
+
541
+ nodes.input.simulate('keyDown', keyObjects.ESCAPE);
542
+ expect(spiedCallbacks.getCall(0).lastArg.stopPropagation).to.equal(true); // esc to propagate the events further up
543
+
544
+ nodes.input.simulate('keyDown', keyObjects.ESCAPE);
545
+ expect(spiedCallbacks.getCall(1).lastArg.stopPropagation).to.equal(false);
546
+ });
525
547
  });
526
548
  describe('Variant-specific', function () {
527
549
  beforeEach(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../.tmp-es/components/combobox/__tests__/combobox.browser-test.jsx"],"names":["React","PropTypes","chai","expect","chaiEnzyme","mount","assign","createMountNode","destroyMountNode","Combobox","Tooltip","Icon","filter","Popover","keyObjects","letterKeyObjects","IconSettings","use","accounts","id","label","subTitle","type","disabled","accountsWithIcon","map","elem","icon","defaultProps","labels","placeholder","menuPosition","onOpen","propTypes","componentDidUpdate","func","initialSelection","array","DemoComponent","props","state","inputValue","selection","onChange","event","value","setState","onRequestRemoveSelectedOption","data","onSubmit","onSelect","options","Component","displayName","getNodes","wrapper","combobox","find","input","menuListbox","removeSingleItem","selectedListbox","popover","describe","describeFunction","mountNode","beforeEach","context","afterEach","it","attachTo","nodes","attr","simulate","searchTerm","length","target","DOWN","to","have","ENTER","text","equal","done","getSelectedListboxPills","index","children","at","childAt","getFocusedPillLabel","document","activeElement","querySelector","innerText","selectionKeyedStates","removeInitialFirstPill","removeThirdInitialItem","removesLastAndInitialFifthPill","removeInitalSecondAndFourthPill","allPillsRemoved","selectionIndexedStates","Object","keys","key","counter","prevState","members","TAB","DELETE","RIGHT","LEFT","i","A","menuListItem","instance","className","search","eql","scrollTop","scrollTop1","UP","scrollTop2","not","be","present","onOpenCallback","sinon","spy","callCount","nodeInFocus","span"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,IAAeC,MAAf,QAA6B,MAA7B;AACA,OAAOC,UAAP,MAAuB,aAAvB;AACA,SAASC,KAAT,QAAsB,QAAtB;AACA,OAAOC,MAAP,MAAmB,eAAnB;AAEA;AACA;AACA;AACA;AACA;;AACA,SACCC,eADD,EAECC,gBAFD,QAGO,+BAHP,C,CAKA;;AACA,OAAOC,QAAP,MAAqB,8BAArB;AACA,OAAOC,OAAP,MAAoB,6BAApB;AACA,OAAOC,IAAP,MAAiB,0BAAjB;AACA,OAAOC,MAAP,MAAmB,qCAAnB;AACA,OAAOC,OAAP,MAAoB,6BAApB;AACA,SAASC,UAAT,QAA2B,6BAA3B;AACA,SAASA,UAAU,IAAIC,gBAAvB,QAA+C,oCAA/C;AACA,OAAOC,YAAP,MAAyB,mCAAzB;AAEA;AACA;AACA;;AACAd,IAAI,CAACe,GAAL,CAASb,UAAU,EAAnB;AAEA,IAAMc,QAAQ,GAAG,CAChB;AACCC,EAAAA,EAAE,EAAE,GADL;AAECC,EAAAA,KAAK,EAAE,MAFR;AAGCC,EAAAA,QAAQ,EAAE,yBAHX;AAICC,EAAAA,IAAI,EAAE;AAJP,CADg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N,CAAapD,EAAb,CAAgBC,IAAhB,CAAqBP,IAArB,CAA0B,eAA1B,EAA2C,MAA3C,EAjBoE,CAmBpE;;AACArE,MAAAA,MAAM,CACLoE,KAAK,CAACZ,WAAN,CAAkBF,IAAlB,CAAuB,2CAAvB,EACEkB,MAFG,CAAN,CAGEG,EAHF,CAGKI,KAHL,CAGW,CAHX;AAIA,KAxBC,CAAF;AAyBA,GAjCO,CAAR;AAkCA,CAxaO,CAAR","sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport chai, { expect } from 'chai';\nimport chaiEnzyme from 'chai-enzyme';\nimport { mount } from 'enzyme';\nimport assign from 'lodash.assign';\n\n/* Enzyme Helpers that can mount and unmount React component instances to\n * the DOM and set `this.wrapper` and `this.dom` within Mocha's `this`\n * context [full source here](tests/enzyme-helpers.js). `this` can\n * only be referenced if inside `function () {}`.\n */\nimport {\n\tcreateMountNode,\n\tdestroyMountNode,\n} from '../../../tests/enzyme-helpers';\n\n// Import your internal dependencies (for example):\nimport Combobox from '../../../components/combobox';\nimport Tooltip from '../../../components/tooltip';\nimport Icon from '../../../components/icon';\nimport filter from '../../../components/combobox/filter';\nimport Popover from '../../../components/popover';\nimport { keyObjects } from '../../../utilities/key-code';\nimport { keyObjects as letterKeyObjects } from '../../../utilities/letter-key-code';\nimport IconSettings from '../../../components/icon-settings';\n\n/* Set Chai to use chaiEnzyme for enzyme compatible assertions:\n * https://github.com/producthunt/chai-enzyme\n */\nchai.use(chaiEnzyme());\n\nconst accounts = [\n\t{\n\t\tid: '1',\n\t\tlabel: 'Acme',\n\t\tsubTitle: 'Account • San Francisco',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '2',\n\t\tlabel: 'Salesforce.com, Inc.',\n\t\tsubTitle: 'Account • San Francisco',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '3',\n\t\tlabel: \"Paddy's Pub\",\n\t\tsubTitle: 'Account • Boston, MA',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '4',\n\t\tlabel: 'Tyrell Corp',\n\t\tsubTitle: 'Account • San Francisco, CA',\n\t\ttype: 'account',\n\t\tdisabled: true,\n\t},\n\t{\n\t\tid: '5',\n\t\tlabel: 'Paper St. Soap Company',\n\t\tsubTitle: 'Account • Beloit, WI',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '6',\n\t\tlabel: 'Nakatomi Investments',\n\t\tsubTitle: 'Account • Chicago, IL',\n\t\ttype: 'account',\n\t},\n\t{ id: '7', label: 'Acme Landscaping', type: 'account' },\n\t{\n\t\tid: '8',\n\t\tlabel: 'Acme Construction',\n\t\tsubTitle: 'Account • Grand Marais, MN',\n\t\ttype: 'account',\n\t},\n];\n\nconst accountsWithIcon = accounts.map((elem) =>\n\tassign(elem, {\n\t\ticon: (\n\t\t\t<Icon\n\t\t\t\tassistiveText={{ label: 'Account' }}\n\t\t\t\tcategory=\"standard\"\n\t\t\t\tname={elem.type}\n\t\t\t/>\n\t\t),\n\t})\n);\n\nconst defaultProps = {\n\tid: 'combobox-unique-id',\n\tlabels: {\n\t\tlabel: 'Search',\n\t\tplaceholder: 'Search Salesforce',\n\t},\n\tmenuPosition: 'relative',\n\tonOpen: () => {},\n};\n\nconst propTypes = {\n\tcomponentDidUpdate: PropTypes.func,\n\tinitialSelection: PropTypes.array,\n};\n\n/* A re-usable demo component fixture outside of `describe` sections\n * can accept props within each test and be unmounted after each tests.\n * This wrapping component will be similar to your wrapping component\n * you will create in the React Storybook for manual testing.\n */\nclass DemoComponent extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tinputValue: '',\n\t\t\tselection: this.props.initialSelection || [],\n\t\t};\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.props.componentDidUpdate) {\n\t\t\tthis.props.componentDidUpdate(this.state);\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<IconSettings iconPath=\"/assets/icons\">\n\t\t\t\t<Combobox\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonChange: (event, { value }) => {\n\t\t\t\t\t\t\tthis.setState({ inputValue: value });\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonRequestRemoveSelectedOption: (event, data) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: data.selection,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSubmit: (event, { value }) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: [\n\t\t\t\t\t\t\t\t\t...this.state.selection,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: value,\n\t\t\t\t\t\t\t\t\t\tid: 'another-account',\n\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: 'Account',\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tcategory=\"standard\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"account\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSelect: (event, data) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: data.selection,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonOpen: () => {\n\t\t\t\t\t\t\tthis.props.onOpen();\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\toptions={filter({\n\t\t\t\t\t\tinputValue: this.state.inputValue,\n\t\t\t\t\t\toptions: accountsWithIcon,\n\t\t\t\t\t\tselection: this.state.selection,\n\t\t\t\t\t})}\n\t\t\t\t\tselection={this.state.selection}\n\t\t\t\t\tvalue={this.state.inputValue}\n\t\t\t\t\t{...this.props}\n\t\t\t\t/>\n\t\t\t</IconSettings>\n\t\t);\n\t}\n}\n\nDemoComponent.displayName = 'ComboboxDemoComponent';\nDemoComponent.propTypes = propTypes;\nDemoComponent.defaultProps = defaultProps;\n\nconst getNodes = ({ wrapper }) => ({\n\tcombobox: wrapper.find('.slds-combobox'),\n\tinput: wrapper.find('.slds-combobox input'),\n\tmenuListbox: wrapper.find('.slds-combobox .slds-listbox.slds-dropdown'),\n\tremoveSingleItem: wrapper.find('.slds-combobox button.slds-input__icon'),\n\tselectedListbox: wrapper.find(\n\t\t`#${defaultProps.id}-selected-listbox .slds-listbox`\n\t),\n\tpopover: wrapper.find('.slds-popover'),\n});\n\n/* All tests for component being tested should be wrapped in a root `describe`,\n * which should be named after the component being tested.\n * When read aloud, the cumulative `describe` and `it` names should form a coherent\n * sentence, eg \"Date Picker default structure and css is present with expected\n * attributes set\". If you are having trouble constructing a cumulative short\n * sentence, this may be an indicator that your test is poorly structured.\n * String provided as first parameter names the `describe` section. Limit to nouns\n * as much as possible/appropriate.`\n */\ndescribe('SLDSCombobox', function describeFunction() {\n\tlet mountNode;\n\tlet wrapper;\n\n\tdescribe('Assistive technology and keyboard interactions', () => {\n\t\t/* Detect if presence of accessibility features such as ARIA\n\t\t * roles and screen reader text is present in the DOM.\n\t\t */\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('has aria-haspopup, aria-expanded is false when closed, aria-expanded is true when open', function () {\n\t\t\twrapper = mount(<DemoComponent multiple />, { attachTo: mountNode });\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\texpect(nodes.combobox).attr('aria-haspopup', 'listbox');\n\t\t\texpect(nodes.combobox).attr('role', 'combobox');\n\t\t\t// closed\n\t\t\texpect(nodes.combobox).attr('aria-expanded', 'false');\n\t\t\t// open\n\t\t\tnodes.input.simulate('click', {});\n\t\t\texpect(nodes.combobox).attr('aria-expanded', 'true');\n\t\t});\n\n\t\tit('menu filters to second item, menu listbox menu item 2 aria-selected is true, input activedescendent has item 2 id, after pressing down arrow, enter selects item 2', function () {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent\n\t\t\t\t\tmultiple\n\t\t\t\t\tisOpen\n\t\t\t\t\toptionsSearchEntity={[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'options-search-id-1',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add' }}\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: 'Search in Salesforce',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'search-in-account-id',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add in Accounts' }}\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: (searchTerm) => (\n\t\t\t\t\t\t\t\t<React.Fragment>\n\t\t\t\t\t\t\t\t\t{searchTerm && searchTerm.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"slds-text-title_bold\">{`\"${searchTerm}\" `}</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t'Search '\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tin Accounts\n\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t]}\n\t\t\t\t\toptionsAddItem={[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'options-add-id-1',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add' }}\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tname=\"add\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: 'New Entity',\n\t\t\t\t\t\t},\n\t\t\t\t\t]}\n\t\t\t\t/>,\n\t\t\t\t{\n\t\t\t\t\tattachTo: mountNode,\n\t\t\t\t}\n\t\t\t);\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[1].label } });\n\t\t\t// pass over header item 1\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\t// pass over header item 2\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox.find('#combobox-unique-id-listbox-option-2')\n\t\t\t).to.have.attr('aria-selected', 'true');\n\t\t\texpect(nodes.input).attr(\n\t\t\t\t'aria-activedescendant',\n\t\t\t\t`${defaultProps.id}-listbox-option-2`\n\t\t\t);\n\t\t\t// select\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.input).attr('value', '');\n\t\t\texpect(nodes.selectedListbox.find('.slds-pill__label').text()).to.equal(\n\t\t\t\taccounts[1].label\n\t\t\t);\n\t\t});\n\n\t\tit('Selected Listbox: remove initial first pill, remove third initial item, cycles focus (first to last), removes last and initial fifth pill, cycles focus (last to first), remove inital second and fourth pill', function (done) {\n\t\t\tconst getSelectedListboxPills = ({ nodes, index }) =>\n\t\t\t\tnodes.selectedListbox.children().at(index).childAt(0);\n\t\t\tconst getFocusedPillLabel = () =>\n\t\t\t\tdocument.activeElement.querySelector('.slds-pill__label').innerText;\n\t\t\tconst selectionKeyedStates = {\n\t\t\t\tremoveInitialFirstPill: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[2],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t\taccountsWithIcon[4],\n\t\t\t\t],\n\t\t\t\tremoveThirdInitialItem: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t\taccountsWithIcon[4],\n\t\t\t\t],\n\t\t\t\tremovesLastAndInitialFifthPill: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t],\n\t\t\t\tremoveInitalSecondAndFourthPill: [accountsWithIcon[3]],\n\t\t\t\tallPillsRemoved: [],\n\t\t\t};\n\t\t\tconst selectionIndexedStates = Object.keys(selectionKeyedStates).map(\n\t\t\t\t(key) => selectionKeyedStates[key]\n\t\t\t);\n\n\t\t\tlet counter = 0;\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent\n\t\t\t\t\tcomponentDidUpdate={(prevState) => {\n\t\t\t\t\t\texpect(prevState.selection).to.have.members(\n\t\t\t\t\t\t\tselectionIndexedStates[counter]\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (counter === 4) {\n\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcounter += 1;\n\t\t\t\t\t}}\n\t\t\t\t\tinitialSelection={[\n\t\t\t\t\t\taccounts[0],\n\t\t\t\t\t\taccounts[1],\n\t\t\t\t\t\taccounts[2],\n\t\t\t\t\t\taccounts[3],\n\t\t\t\t\t\taccounts[4],\n\t\t\t\t\t]}\n\t\t\t\t\tmultiple\n\t\t\t\t/>,\n\t\t\t\t{ attachTo: mountNode }\n\t\t\t);\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('keyDown', keyObjects.TAB);\n\t\t\tgetSelectedListboxPills({ nodes, index: 0 }).simulate(\n\t\t\t\t'keyDown',\n\t\t\t\tkeyObjects.DELETE\n\t\t\t);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[1].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.RIGHT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[2].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[3].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.LEFT);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.LEFT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[4].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 2,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[3].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.RIGHT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[1].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keydown', keyObjects.DELETE);\n\t\t});\n\n\t\tit('selects a menu item and scrolls when a letter key is pressed in read-only mode', () => {\n\t\t\twrapper = mount(<DemoComponent variant=\"readonly\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\tfor (let i = 0; i < 3; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', letterKeyObjects.A);\n\t\t\t}\n\n\t\t\tconst menuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-8'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop === 98 || scrollTop === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\t\t});\n\n\t\tit('selects menu items and scrolls when the down/up keys are pressed', () => {\n\t\t\twrapper = mount(<DemoComponent variant=\"readonly\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tlet i;\n\t\t\tlet menuListItem;\n\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\n\t\t\tfor (i = 0; i < 8; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\t}\n\n\t\t\tmenuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-8'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop: scrollTop1 } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop1 === 98 || scrollTop1 === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\n\t\t\tfor (i = 0; i < 8; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', keyObjects.UP);\n\t\t\t}\n\n\t\t\tmenuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-1'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop: scrollTop2 } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop2 === 4 || scrollTop2 === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\t\t});\n\t});\n\n\tdescribe('Variant-specific', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('Limit to pre-defined choices', function () {\n\t\t\twrapper = mount(<DemoComponent multiple predefinedOptionsOnly />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('keyDown', letterKeyObjects.A);\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.selectedListbox).not.to.be.present;\n\t\t});\n\n\t\tit('Inline Single Selection Remove selection', function () {\n\t\t\twrapper = mount(<DemoComponent variant=\"inline-listbox\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\n\t\t\t// add selection\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[1].label } });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\texpect(nodes.input).to.have.value('Salesforce.com, Inc.');\n\t\t\tnodes = getNodes({ wrapper });\n\n\t\t\t// remove selection\n\t\t\tnodes.removeSingleItem.simulate('click');\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.input).to.have.value('');\n\t\t});\n\t});\n\n\tdescribe('Dialog variant', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('popover opens when down arrow is pressed', () => {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent variant=\"popover\" popover={<Popover />} isOpen />\n\t\t\t);\n\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.popover).to.be.present;\n\t\t});\n\n\t\tit('onOpen callback is called when dialog variant', () => {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent variant=\"popover\" popover={<Popover />} isOpen />\n\t\t\t);\n\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('click', {});\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.popover).to.be.present;\n\t\t});\n\t});\n\n\tdescribe('Optional Props', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('Displays No match found', function () {\n\t\t\twrapper = mount(<DemoComponent isOpen />, { attachTo: mountNode });\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: 'Random text' } });\n\t\t\t// nodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox\n\t\t\t\t\t.find('.slds-listbox__item.slds-listbox__status')\n\t\t\t\t\t.text()\n\t\t\t).to.equal('No matches found.');\n\t\t});\n\t});\n\n\tdescribe('Input Onclick', () => {\n\t\tconst onOpenCallback = sinon.spy();\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('onOpen callback is called', function () {\n\t\t\twrapper = mount(<DemoComponent onOpen={onOpenCallback} />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('click', {});\n\t\t\texpect(onOpenCallback.callCount).to.equal(1);\n\t\t});\n\t});\n\n\tdescribe('Combobox with items disabled', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\t\tit('Tooltip component shows when focused on menu item.', function () {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent multiple isOpen tooltipMenuItemDisabled={<Tooltip />} />,\n\t\t\t\t{\n\t\t\t\t\tattachTo: mountNode,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[3].label } });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\n\t\t\tconst nodeInFocus = nodes.menuListbox.find('.slds-tooltip-trigger');\n\t\t\tconst span = nodeInFocus.find('#combobox-unique-id-listbox-option-4');\n\n\t\t\t// verify span is aria-selected and aria-disabled\n\t\t\texpect(span).to.have.attr('aria-selected', 'true');\n\t\t\texpect(span).to.have.attr('aria-disabled', 'true');\n\n\t\t\t// verify tooltip is rendered\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox.find('#combobox-unique-id-listbox-option-help-4')\n\t\t\t\t\t.length\n\t\t\t).to.equal(1);\n\t\t});\n\t});\n});\n"],"file":"combobox.browser-test.js"}
1
+ {"version":3,"sources":["../../../../.tmp-es/components/combobox/__tests__/combobox.browser-test.jsx"],"names":["React","PropTypes","chai","expect","chaiEnzyme","mount","assign","createMountNode","destroyMountNode","Combobox","Tooltip","Icon","filter","Popover","keyObjects","letterKeyObjects","IconSettings","use","callbacks","require","accounts","id","label","subTitle","type","disabled","accountsWithIcon","map","elem","icon","defaultProps","labels","placeholder","menuPosition","onOpen","propTypes","componentDidUpdate","func","initialSelection","array","DemoComponent","props","state","inputValue","selection","onChange","event","value","setState","onRequestRemoveSelectedOption","data","onSubmit","onSelect","options","Component","displayName","getNodes","wrapper","combobox","find","input","menuListbox","removeSingleItem","selectedListbox","popover","describe","describeFunction","mountNode","beforeEach","context","afterEach","it","attachTo","nodes","attr","simulate","searchTerm","length","target","DOWN","to","have","ENTER","text","equal","done","getSelectedListboxPills","index","children","at","childAt","getFocusedPillLabel","document","activeElement","querySelector","innerText","selectionKeyedStates","removeInitialFirstPill","removeThirdInitialItem","removesLastAndInitialFifthPill","removeInitalSecondAndFourthPill","allPillsRemoved","selectionIndexedStates","Object","keys","key","counter","prevState","members","TAB","DELETE","RIGHT","LEFT","i","A","menuListItem","instance","className","search","eql","scrollTop","scrollTop1","UP","scrollTop2","spiedCallbacks","sinon","spy","ESCAPE","getCall","lastArg","stopPropagation","not","be","present","onOpenCallback","callCount","nodeInFocus","span"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAA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,QAArB,EAA+B;AAAEG,QAAAA,MAAM,EAAE;AAAE/B,UAAAA,KAAK,EAAE3B,QAAQ,CAAC,CAAD,CAAR,CAAYE;AAArB;AAAV,OAA/B;AACAmD,MAAAA,KAAK,CAACb,KAAN,CAAYe,QAAZ,CAAqB,SAArB,EAAgC7D,UAAU,CAACiE,IAA3C;AAEA,UAAMyD,WAAW,GAAG/D,KAAK,CAACZ,WAAN,CAAkBF,IAAlB,CAAuB,uBAAvB,CAApB;AACA,UAAM8E,IAAI,GAAGD,WAAW,CAAC7E,IAAZ,CAAiB,sCAAjB,CAAb,CAboE,CAepE;;AACAxD,MAAAA,MAAM,CAACsI,IAAD,CAAN,CAAazD,EAAb,CAAgBC,IAAhB,CAAqBP,IAArB,CAA0B,eAA1B,EAA2C,MAA3C;AACAvE,MAAAA,MAAM,CAACsI,IAAD,CAAN,CAAazD,EAAb,CAAgBC,IAAhB,CAAqBP,IAArB,CAA0B,eAA1B,EAA2C,MAA3C,EAjBoE,CAmBpE;;AACAvE,MAAAA,MAAM,CACLsE,KAAK,CAACZ,WAAN,CAAkBF,IAAlB,CAAuB,2CAAvB,EACEkB,MAFG,CAAN,CAGEG,EAHF,CAGKI,KAHL,CAGW,CAHX;AAIA,KAxBC,CAAF;AAyBA,GAjCO,CAAR;AAkCA,CAxbO,CAAR","sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport chai, { expect } from 'chai';\nimport chaiEnzyme from 'chai-enzyme';\nimport { mount } from 'enzyme';\nimport assign from 'lodash.assign';\n\n/* Enzyme Helpers that can mount and unmount React component instances to\n * the DOM and set `this.wrapper` and `this.dom` within Mocha's `this`\n * context [full source here](tests/enzyme-helpers.js). `this` can\n * only be referenced if inside `function () {}`.\n */\nimport {\n\tcreateMountNode,\n\tdestroyMountNode,\n} from '../../../tests/enzyme-helpers';\n\n// Import your internal dependencies (for example):\nimport Combobox from '../../../components/combobox';\nimport Tooltip from '../../../components/tooltip';\nimport Icon from '../../../components/icon';\nimport filter from '../../../components/combobox/filter';\nimport Popover from '../../../components/popover';\nimport { keyObjects } from '../../../utilities/key-code';\nimport { keyObjects as letterKeyObjects } from '../../../utilities/letter-key-code';\nimport IconSettings from '../../../components/icon-settings';\n\n/* Set Chai to use chaiEnzyme for enzyme compatible assertions:\n * https://github.com/producthunt/chai-enzyme\n */\nchai.use(chaiEnzyme());\n\nconst callbacks = require('../../../utilities/key-callbacks');\n\nconst accounts = [\n\t{\n\t\tid: '1',\n\t\tlabel: 'Acme',\n\t\tsubTitle: 'Account • San Francisco',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '2',\n\t\tlabel: 'Salesforce.com, Inc.',\n\t\tsubTitle: 'Account • San Francisco',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '3',\n\t\tlabel: \"Paddy's Pub\",\n\t\tsubTitle: 'Account • Boston, MA',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '4',\n\t\tlabel: 'Tyrell Corp',\n\t\tsubTitle: 'Account • San Francisco, CA',\n\t\ttype: 'account',\n\t\tdisabled: true,\n\t},\n\t{\n\t\tid: '5',\n\t\tlabel: 'Paper St. Soap Company',\n\t\tsubTitle: 'Account • Beloit, WI',\n\t\ttype: 'account',\n\t},\n\t{\n\t\tid: '6',\n\t\tlabel: 'Nakatomi Investments',\n\t\tsubTitle: 'Account • Chicago, IL',\n\t\ttype: 'account',\n\t},\n\t{ id: '7', label: 'Acme Landscaping', type: 'account' },\n\t{\n\t\tid: '8',\n\t\tlabel: 'Acme Construction',\n\t\tsubTitle: 'Account • Grand Marais, MN',\n\t\ttype: 'account',\n\t},\n];\n\nconst accountsWithIcon = accounts.map((elem) =>\n\tassign(elem, {\n\t\ticon: (\n\t\t\t<Icon\n\t\t\t\tassistiveText={{ label: 'Account' }}\n\t\t\t\tcategory=\"standard\"\n\t\t\t\tname={elem.type}\n\t\t\t/>\n\t\t),\n\t})\n);\n\nconst defaultProps = {\n\tid: 'combobox-unique-id',\n\tlabels: {\n\t\tlabel: 'Search',\n\t\tplaceholder: 'Search Salesforce',\n\t},\n\tmenuPosition: 'relative',\n\tonOpen: () => {},\n};\n\nconst propTypes = {\n\tcomponentDidUpdate: PropTypes.func,\n\tinitialSelection: PropTypes.array,\n};\n\n/* A re-usable demo component fixture outside of `describe` sections\n * can accept props within each test and be unmounted after each tests.\n * This wrapping component will be similar to your wrapping component\n * you will create in the React Storybook for manual testing.\n */\nclass DemoComponent extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tthis.state = {\n\t\t\tinputValue: '',\n\t\t\tselection: this.props.initialSelection || [],\n\t\t};\n\t}\n\n\tcomponentDidUpdate() {\n\t\tif (this.props.componentDidUpdate) {\n\t\t\tthis.props.componentDidUpdate(this.state);\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<IconSettings iconPath=\"/assets/icons\">\n\t\t\t\t<Combobox\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonChange: (event, { value }) => {\n\t\t\t\t\t\t\tthis.setState({ inputValue: value });\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonRequestRemoveSelectedOption: (event, data) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: data.selection,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSubmit: (event, { value }) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: [\n\t\t\t\t\t\t\t\t\t...this.state.selection,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: value,\n\t\t\t\t\t\t\t\t\t\tid: 'another-account',\n\t\t\t\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: 'Account',\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tcategory=\"standard\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"account\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSelect: (event, data) => {\n\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\tinputValue: '',\n\t\t\t\t\t\t\t\tselection: data.selection,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonOpen: () => {\n\t\t\t\t\t\t\tthis.props.onOpen();\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\toptions={filter({\n\t\t\t\t\t\tinputValue: this.state.inputValue,\n\t\t\t\t\t\toptions: accountsWithIcon,\n\t\t\t\t\t\tselection: this.state.selection,\n\t\t\t\t\t})}\n\t\t\t\t\tselection={this.state.selection}\n\t\t\t\t\tvalue={this.state.inputValue}\n\t\t\t\t\t{...this.props}\n\t\t\t\t/>\n\t\t\t</IconSettings>\n\t\t);\n\t}\n}\n\nDemoComponent.displayName = 'ComboboxDemoComponent';\nDemoComponent.propTypes = propTypes;\nDemoComponent.defaultProps = defaultProps;\n\nconst getNodes = ({ wrapper }) => ({\n\tcombobox: wrapper.find('.slds-combobox'),\n\tinput: wrapper.find('.slds-combobox input'),\n\tmenuListbox: wrapper.find('.slds-combobox .slds-listbox.slds-dropdown'),\n\tremoveSingleItem: wrapper.find('.slds-combobox button.slds-input__icon'),\n\tselectedListbox: wrapper.find(\n\t\t`#${defaultProps.id}-selected-listbox .slds-listbox`\n\t),\n\tpopover: wrapper.find('.slds-popover'),\n});\n\n/* All tests for component being tested should be wrapped in a root `describe`,\n * which should be named after the component being tested.\n * When read aloud, the cumulative `describe` and `it` names should form a coherent\n * sentence, eg \"Date Picker default structure and css is present with expected\n * attributes set\". If you are having trouble constructing a cumulative short\n * sentence, this may be an indicator that your test is poorly structured.\n * String provided as first parameter names the `describe` section. Limit to nouns\n * as much as possible/appropriate.`\n */\ndescribe('SLDSCombobox', function describeFunction() {\n\tlet mountNode;\n\tlet wrapper;\n\n\tdescribe('Assistive technology and keyboard interactions', () => {\n\t\t/* Detect if presence of accessibility features such as ARIA\n\t\t * roles and screen reader text is present in the DOM.\n\t\t */\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('has aria-haspopup, aria-expanded is false when closed, aria-expanded is true when open', function () {\n\t\t\twrapper = mount(<DemoComponent multiple />, { attachTo: mountNode });\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\texpect(nodes.combobox).attr('aria-haspopup', 'listbox');\n\t\t\texpect(nodes.combobox).attr('role', 'combobox');\n\t\t\t// closed\n\t\t\texpect(nodes.combobox).attr('aria-expanded', 'false');\n\t\t\t// open\n\t\t\tnodes.input.simulate('click', {});\n\t\t\texpect(nodes.combobox).attr('aria-expanded', 'true');\n\t\t});\n\n\t\tit('menu filters to second item, menu listbox menu item 2 aria-selected is true, input activedescendent has item 2 id, after pressing down arrow, enter selects item 2', function () {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent\n\t\t\t\t\tmultiple\n\t\t\t\t\tisOpen\n\t\t\t\t\toptionsSearchEntity={[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'options-search-id-1',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add' }}\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: 'Search in Salesforce',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'search-in-account-id',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add in Accounts' }}\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: (searchTerm) => (\n\t\t\t\t\t\t\t\t<React.Fragment>\n\t\t\t\t\t\t\t\t\t{searchTerm && searchTerm.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"slds-text-title_bold\">{`\"${searchTerm}\" `}</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t'Search '\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tin Accounts\n\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t]}\n\t\t\t\t\toptionsAddItem={[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'options-add-id-1',\n\t\t\t\t\t\t\ticon: (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tassistiveText={{ label: 'add' }}\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t\t\t\tname=\"add\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tlabel: 'New Entity',\n\t\t\t\t\t\t},\n\t\t\t\t\t]}\n\t\t\t\t/>,\n\t\t\t\t{\n\t\t\t\t\tattachTo: mountNode,\n\t\t\t\t}\n\t\t\t);\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[1].label } });\n\t\t\t// pass over header item 1\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\t// pass over header item 2\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox.find('#combobox-unique-id-listbox-option-2')\n\t\t\t).to.have.attr('aria-selected', 'true');\n\t\t\texpect(nodes.input).attr(\n\t\t\t\t'aria-activedescendant',\n\t\t\t\t`${defaultProps.id}-listbox-option-2`\n\t\t\t);\n\t\t\t// select\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.input).attr('value', '');\n\t\t\texpect(nodes.selectedListbox.find('.slds-pill__label').text()).to.equal(\n\t\t\t\taccounts[1].label\n\t\t\t);\n\t\t});\n\n\t\tit('Selected Listbox: remove initial first pill, remove third initial item, cycles focus (first to last), removes last and initial fifth pill, cycles focus (last to first), remove inital second and fourth pill', function (done) {\n\t\t\tconst getSelectedListboxPills = ({ nodes, index }) =>\n\t\t\t\tnodes.selectedListbox.children().at(index).childAt(0);\n\t\t\tconst getFocusedPillLabel = () =>\n\t\t\t\tdocument.activeElement.querySelector('.slds-pill__label').innerText;\n\t\t\tconst selectionKeyedStates = {\n\t\t\t\tremoveInitialFirstPill: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[2],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t\taccountsWithIcon[4],\n\t\t\t\t],\n\t\t\t\tremoveThirdInitialItem: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t\taccountsWithIcon[4],\n\t\t\t\t],\n\t\t\t\tremovesLastAndInitialFifthPill: [\n\t\t\t\t\taccountsWithIcon[1],\n\t\t\t\t\taccountsWithIcon[3],\n\t\t\t\t],\n\t\t\t\tremoveInitalSecondAndFourthPill: [accountsWithIcon[3]],\n\t\t\t\tallPillsRemoved: [],\n\t\t\t};\n\t\t\tconst selectionIndexedStates = Object.keys(selectionKeyedStates).map(\n\t\t\t\t(key) => selectionKeyedStates[key]\n\t\t\t);\n\n\t\t\tlet counter = 0;\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent\n\t\t\t\t\tcomponentDidUpdate={(prevState) => {\n\t\t\t\t\t\texpect(prevState.selection).to.have.members(\n\t\t\t\t\t\t\tselectionIndexedStates[counter]\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (counter === 4) {\n\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcounter += 1;\n\t\t\t\t\t}}\n\t\t\t\t\tinitialSelection={[\n\t\t\t\t\t\taccounts[0],\n\t\t\t\t\t\taccounts[1],\n\t\t\t\t\t\taccounts[2],\n\t\t\t\t\t\taccounts[3],\n\t\t\t\t\t\taccounts[4],\n\t\t\t\t\t]}\n\t\t\t\t\tmultiple\n\t\t\t\t/>,\n\t\t\t\t{ attachTo: mountNode }\n\t\t\t);\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('keyDown', keyObjects.TAB);\n\t\t\tgetSelectedListboxPills({ nodes, index: 0 }).simulate(\n\t\t\t\t'keyDown',\n\t\t\t\tkeyObjects.DELETE\n\t\t\t);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[1].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.RIGHT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[2].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[3].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.LEFT);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.LEFT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[4].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 2,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[3].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 1,\n\t\t\t}).simulate('keyDown', keyObjects.RIGHT);\n\t\t\texpect(getFocusedPillLabel()).to.equal(accountsWithIcon[1].label);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keyDown', keyObjects.DELETE);\n\t\t\tgetSelectedListboxPills({\n\t\t\t\tnodes: getNodes({ wrapper }),\n\t\t\t\tindex: 0,\n\t\t\t}).simulate('keydown', keyObjects.DELETE);\n\t\t});\n\n\t\tit('selects a menu item and scrolls when a letter key is pressed in read-only mode', () => {\n\t\t\twrapper = mount(<DemoComponent variant=\"readonly\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\tfor (let i = 0; i < 3; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', letterKeyObjects.A);\n\t\t\t}\n\n\t\t\tconst menuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-8'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop === 98 || scrollTop === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\t\t});\n\n\t\tit('selects menu items and scrolls when the down/up keys are pressed', () => {\n\t\t\twrapper = mount(<DemoComponent variant=\"readonly\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tlet i;\n\t\t\tlet menuListItem;\n\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\n\t\t\tfor (i = 0; i < 8; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\t}\n\n\t\t\tmenuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-8'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop: scrollTop1 } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop1 === 98 || scrollTop1 === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\n\t\t\tfor (i = 0; i < 8; i += 1) {\n\t\t\t\tnodes.input.simulate('keyDown', keyObjects.UP);\n\t\t\t}\n\n\t\t\tmenuListItem = nodes.menuListbox.find(\n\t\t\t\t'#combobox-unique-id-listbox-option-1'\n\t\t\t);\n\t\t\texpect(\n\t\t\t\tmenuListItem.instance().className.search('slds-has-focus') > -1\n\t\t\t).to.eql(true);\n\n\t\t\tconst { scrollTop: scrollTop2 } = nodes.menuListbox.instance();\n\t\t\texpect(scrollTop2 === 4 || scrollTop2 === 0).to.eql(true); // done because menu and menu item size in phantomjs is weird\n\t\t});\n\n\t\tit('propagates keyboard events when menu is closed', function () {\n\t\t\tconst spiedCallbacks = sinon.spy(callbacks, 'default');\n\t\t\twrapper = mount(<DemoComponent variant=\"inline-listbox\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\t// click in the input to open up menu\n\t\t\tnodes.input.simulate('click', {});\n\t\t\t// esc to close the menu and stop event propagation\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ESCAPE);\n\t\t\texpect(spiedCallbacks.getCall(0).lastArg.stopPropagation).to.equal(true);\n\t\t\t// esc to propagate the events further up\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ESCAPE);\n\t\t\texpect(spiedCallbacks.getCall(1).lastArg.stopPropagation).to.equal(false);\n\t\t});\n\t});\n\n\tdescribe('Variant-specific', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('Limit to pre-defined choices', function () {\n\t\t\twrapper = mount(<DemoComponent multiple predefinedOptionsOnly />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('keyDown', letterKeyObjects.A);\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.selectedListbox).not.to.be.present;\n\t\t});\n\n\t\tit('Inline Single Selection Remove selection', function () {\n\t\t\twrapper = mount(<DemoComponent variant=\"inline-listbox\" />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tlet nodes = getNodes({ wrapper });\n\n\t\t\t// add selection\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[1].label } });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\texpect(nodes.input).to.have.value('Salesforce.com, Inc.');\n\t\t\tnodes = getNodes({ wrapper });\n\n\t\t\t// remove selection\n\t\t\tnodes.removeSingleItem.simulate('click');\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.input).to.have.value('');\n\t\t});\n\t});\n\n\tdescribe('Dialog variant', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('popover opens when down arrow is pressed', () => {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent variant=\"popover\" popover={<Popover />} isOpen />\n\t\t\t);\n\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.popover).to.be.present;\n\t\t});\n\n\t\tit('onOpen callback is called when dialog variant', () => {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent variant=\"popover\" popover={<Popover />} isOpen />\n\t\t\t);\n\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('click', {});\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(nodes.popover).to.be.present;\n\t\t});\n\t});\n\n\tdescribe('Optional Props', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('Displays No match found', function () {\n\t\t\twrapper = mount(<DemoComponent isOpen />, { attachTo: mountNode });\n\t\t\tlet nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: 'Random text' } });\n\t\t\t// nodes.input.simulate('keyDown', keyObjects.ENTER);\n\t\t\tnodes = getNodes({ wrapper });\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox\n\t\t\t\t\t.find('.slds-listbox__item.slds-listbox__status')\n\t\t\t\t\t.text()\n\t\t\t).to.equal('No matches found.');\n\t\t});\n\t});\n\n\tdescribe('Input Onclick', () => {\n\t\tconst onOpenCallback = sinon.spy();\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\n\t\tit('onOpen callback is called', function () {\n\t\t\twrapper = mount(<DemoComponent onOpen={onOpenCallback} />, {\n\t\t\t\tattachTo: mountNode,\n\t\t\t});\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('click', {});\n\t\t\texpect(onOpenCallback.callCount).to.equal(1);\n\t\t});\n\t});\n\n\tdescribe('Combobox with items disabled', () => {\n\t\tbeforeEach(() => {\n\t\t\tmountNode = createMountNode({ context: this });\n\t\t});\n\n\t\tafterEach(() => {\n\t\t\tdestroyMountNode({ wrapper, mountNode });\n\t\t});\n\t\tit('Tooltip component shows when focused on menu item.', function () {\n\t\t\twrapper = mount(\n\t\t\t\t<DemoComponent multiple isOpen tooltipMenuItemDisabled={<Tooltip />} />,\n\t\t\t\t{\n\t\t\t\t\tattachTo: mountNode,\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst nodes = getNodes({ wrapper });\n\t\t\tnodes.input.simulate('focus');\n\t\t\tnodes.input.simulate('change', { target: { value: accounts[3].label } });\n\t\t\tnodes.input.simulate('keyDown', keyObjects.DOWN);\n\n\t\t\tconst nodeInFocus = nodes.menuListbox.find('.slds-tooltip-trigger');\n\t\t\tconst span = nodeInFocus.find('#combobox-unique-id-listbox-option-4');\n\n\t\t\t// verify span is aria-selected and aria-disabled\n\t\t\texpect(span).to.have.attr('aria-selected', 'true');\n\t\t\texpect(span).to.have.attr('aria-disabled', 'true');\n\n\t\t\t// verify tooltip is rendered\n\t\t\texpect(\n\t\t\t\tnodes.menuListbox.find('#combobox-unique-id-listbox-option-help-4')\n\t\t\t\t\t.length\n\t\t\t).to.equal(1);\n\t\t});\n\t});\n});\n"],"file":"combobox.browser-test.js"}
@@ -728,11 +728,15 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
728
728
  callback: _this.handleKeyDownOther,
729
729
  stopPropagation: false
730
730
  };
731
- } // Helper function that takes an object literal of callbacks that are triggered with a key event
731
+ } // Propagate events when menu is closed
732
+
733
+
734
+ var stopPropagation = _this.getIsOpen(); // Helper function that takes an object literal of callbacks that are triggered with a key event
732
735
 
733
736
 
734
737
  mapKeyEventCallbacks(event, {
735
- callbacks: callbacks
738
+ callbacks: callbacks,
739
+ stopPropagation: stopPropagation
736
740
  });
737
741
  });
738
742