@salesforce/design-system-react 0.10.45 → 0.10.48

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 (57) hide show
  1. package/components/combobox/combobox.d.ts +3 -0
  2. package/components/combobox/combobox.jsx +4 -1
  3. package/components/component-docs.json +6 -3
  4. package/components/data-table/index.jsx +6 -2
  5. package/components/modal/__tests__/modal.browser-test.jsx +5 -0
  6. package/components/modal/index.jsx +2 -2
  7. package/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
  8. package/components/pill-container/private/selected-listbox.jsx +1 -0
  9. package/components/popover/__tests__/popover.browser-test.jsx +28 -0
  10. package/components/progress-indicator.d.ts +29 -8
  11. package/components/slider.d.ts +10 -4
  12. package/design-system-react-components.js +62406 -0
  13. package/design-system-react-components.js.map +1 -0
  14. package/design-system-react-components.min.js +3 -0
  15. package/design-system-react-components.min.js.LICENSE.txt +83 -0
  16. package/design-system-react-components.min.js.map +1 -0
  17. package/design-system-react.js +73800 -0
  18. package/design-system-react.js.map +1 -0
  19. package/design-system-react.min.js +3 -0
  20. package/design-system-react.min.js.LICENSE.txt +83 -0
  21. package/design-system-react.min.js.map +1 -0
  22. package/lib/components/combobox/combobox.d.ts +3 -0
  23. package/lib/components/combobox/combobox.js +4 -1
  24. package/lib/components/component-docs.json +6 -3
  25. package/lib/components/data-table/index.js +7 -3
  26. package/lib/components/modal/__tests__/modal.browser-test.jsx +5 -0
  27. package/lib/components/modal/index.js +1 -1
  28. package/lib/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
  29. package/lib/components/pill-container/private/selected-listbox.js +3 -0
  30. package/lib/components/popover/__tests__/popover.browser-test.jsx +28 -0
  31. package/lib/components/progress-indicator.d.ts +29 -8
  32. package/lib/components/slider.d.ts +10 -4
  33. package/lib/design-system-react-components.min.js.LICENSE.txt +83 -0
  34. package/lib/design-system-react.min.js.LICENSE.txt +83 -0
  35. package/lib/package.json +2 -2
  36. package/lib/utilities/keyboard-navigable-dialog.js +6 -1
  37. package/module/components/combobox/combobox.d.ts +3 -0
  38. package/module/components/combobox/combobox.js +4 -1
  39. package/module/components/combobox/combobox.js.map +1 -1
  40. package/module/components/component-docs.json +6 -3
  41. package/module/components/data-table/index.js +7 -3
  42. package/module/components/data-table/index.js.map +1 -1
  43. package/module/components/modal/__tests__/modal.browser-test.js +4 -0
  44. package/module/components/modal/__tests__/modal.browser-test.js.map +1 -1
  45. package/module/components/modal/index.js +1 -1
  46. package/module/components/modal/index.js.map +1 -1
  47. package/module/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
  48. package/module/components/pill-container/private/selected-listbox.js +3 -0
  49. package/module/components/pill-container/private/selected-listbox.js.map +1 -1
  50. package/module/components/popover/__tests__/popover.browser-test.js +25 -0
  51. package/module/components/popover/__tests__/popover.browser-test.js.map +1 -1
  52. package/module/components/progress-indicator.d.ts +29 -8
  53. package/module/components/slider.d.ts +10 -4
  54. package/module/utilities/keyboard-navigable-dialog.js +4 -1
  55. package/module/utilities/keyboard-navigable-dialog.js.map +1 -1
  56. package/package.json +2 -2
  57. package/utilities/keyboard-navigable-dialog.js +3 -0
@@ -162,6 +162,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
162
162
  * * `id`: A unique identifier string.
163
163
  * * `label`: A primary string of text for a menu item or group separator.
164
164
  * * `subTitle`: A secondary string of text added for clarity. (optional)
165
+ * * `title`: A string of text shown as the title of the selected item (optional)
165
166
  * * `type`: 'separator' is the only type currently used
166
167
  * * `disabled`: Set to true to disable this menu item.
167
168
  * * `tooltipContent`: Content that is displayed in tooltip when item is disabled
@@ -170,6 +171,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
170
171
  * id: '2',
171
172
  * label: 'Salesforce.com, Inc.',
172
173
  * subTitle: 'Account • San Francisco',
174
+ * title: 'Salesforce',
173
175
  * type: 'account',
174
176
  * disabled: true,
175
177
  * tooltipContent: "You don't have permission to select this item."
@@ -182,6 +184,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
182
184
  icon?: React.ReactNode;
183
185
  label?: string;
184
186
  subTitle?: string;
187
+ title?: string;
185
188
  type?: string;
186
189
  disabled?: boolean;
187
190
  tooltipContent?: React.ReactNode;
@@ -302,6 +302,7 @@ var propTypes = {
302
302
  * * `id`: A unique identifier string.
303
303
  * * `label`: A primary string of text for a menu item or group separator.
304
304
  * * `subTitle`: A secondary string of text added for clarity. (optional)
305
+ * * `title`: A string of text shown as the title of the selected item (optional)
305
306
  * * `type`: 'separator' is the only type currently used
306
307
  * * `disabled`: Set to true to disable this menu item.
307
308
  * * `tooltipContent`: Content that is displayed in tooltip when item is disabled
@@ -310,6 +311,7 @@ var propTypes = {
310
311
  * id: '2',
311
312
  * label: 'Salesforce.com, Inc.',
312
313
  * subTitle: 'Account • San Francisco',
314
+ * title: 'Salesforce',
313
315
  * type: 'account',
314
316
  * disabled: true,
315
317
  * tooltipContent: "You don't have permission to select this item."
@@ -322,8 +324,9 @@ var propTypes = {
322
324
  icon: _propTypes.default.node,
323
325
  label: _propTypes.default.string,
324
326
  subTitle: _propTypes.default.string,
327
+ title: _propTypes.default.string,
325
328
  type: _propTypes.default.string,
326
- disabled: _propTypes.default.boolean,
329
+ disabled: _propTypes.default.bool,
327
330
  tooltipContent: _propTypes.default.node
328
331
  })),
329
332
 
@@ -4958,13 +4958,16 @@
4958
4958
  "name": "string",
4959
4959
  "required": false
4960
4960
  },
4961
+ "title": {
4962
+ "name": "string",
4963
+ "required": false
4964
+ },
4961
4965
  "type": {
4962
4966
  "name": "string",
4963
4967
  "required": false
4964
4968
  },
4965
4969
  "disabled": {
4966
- "name": "custom",
4967
- "raw": "PropTypes.boolean",
4970
+ "name": "bool",
4968
4971
  "required": false
4969
4972
  },
4970
4973
  "tooltipContent": {
@@ -4975,7 +4978,7 @@
4975
4978
  }
4976
4979
  },
4977
4980
  "required": false,
4978
- "description": "**Array of item objects in the dropdown menu.**\nEach object can contain:\n* `icon`: An `Icon` component. (not used in read-only variant)\n* `id`: A unique identifier string.\n* `label`: A primary string of text for a menu item or group separator.\n* `subTitle`: A secondary string of text added for clarity. (optional)\n* `type`: 'separator' is the only type currently used\n* `disabled`: Set to true to disable this menu item.\n* `tooltipContent`: Content that is displayed in tooltip when item is disabled\n```\n{\n\tid: '2',\n\tlabel: 'Salesforce.com, Inc.',\n\tsubTitle: 'Account • San Francisco',\n\ttype: 'account',\n disabled: true,\n tooltipContent: \"You don't have permission to select this item.\"\n},\n```\nNote: At the moment, Combobox does not support two consecutive separators. _Tested with snapshot testing._"
4981
+ "description": "**Array of item objects in the dropdown menu.**\nEach object can contain:\n* `icon`: An `Icon` component. (not used in read-only variant)\n* `id`: A unique identifier string.\n* `label`: A primary string of text for a menu item or group separator.\n* `subTitle`: A secondary string of text added for clarity. (optional)\n* `title`: A string of text shown as the title of the selected item (optional)\n* `type`: 'separator' is the only type currently used\n* `disabled`: Set to true to disable this menu item.\n* `tooltipContent`: Content that is displayed in tooltip when item is disabled\n```\n{\n\tid: '2',\n\tlabel: 'Salesforce.com, Inc.',\n\tsubTitle: 'Account • San Francisco',\n\ttitle: 'Salesforce',\n\ttype: 'account',\n disabled: true,\n tooltipContent: \"You don't have permission to select this item.\"\n},\n```\nNote: At the moment, Combobox does not support two consecutive separators. _Tested with snapshot testing._"
4979
4982
  },
4980
4983
  "menuItemVisibleLength": {
4981
4984
  "type": {
@@ -165,7 +165,7 @@ var getAssistiveText = (0, _memoizeOne.default)(function (assistiveText, actions
165
165
 
166
166
  return result;
167
167
  }, _lodash2.default);
168
- var getColumnsAndRowActions = (0, _memoizeOne.default)(function (children, id, fixedHeader, fixedLayout, search) {
168
+ var getColumnsAndRowActions = (0, _memoizeOne.default)(function (children, id, fixedHeader, fixedLayout, items, search) {
169
169
  var columns = [];
170
170
  var RowActions = null;
171
171
 
@@ -178,9 +178,13 @@ var getColumnsAndRowActions = (0, _memoizeOne.default)(function (children, id, f
178
178
  var props = _objectSpread({
179
179
  fixedLayout: fixedLayout,
180
180
  search: search,
181
- id: id
181
+ items: items
182
182
  }, columnProps);
183
183
 
184
+ if (id) {
185
+ props.id = id;
186
+ }
187
+
184
188
  var Cell;
185
189
 
186
190
  if (columnChildren && columnChildren.type.displayName === _constants.DATA_TABLE_CELL) {
@@ -951,7 +955,7 @@ var DataTable = /*#__PURE__*/function (_React$Component) {
951
955
  var allSelected = canSelectRows && numNonHeaderRows === numSelected;
952
956
  var indeterminateSelected = canSelectRows && numNonHeaderRows !== numSelected && numSelected !== 0;
953
957
 
954
- var _getColumnsAndRowActi = getColumnsAndRowActions(this.props.children, this.props.id, this.getFixedHeader(), this.props.fixedLayout, this.props.search),
958
+ var _getColumnsAndRowActi = getColumnsAndRowActions(this.props.children, this.props.id, this.getFixedHeader(), this.props.fixedLayout, this.props.items, this.props.search),
955
959
  columns = _getColumnsAndRowActi.columns,
956
960
  RowActions = _getColumnsAndRowActi.RowActions;
957
961
 
@@ -234,6 +234,11 @@ describe('SLDSModal: ', function () {
234
234
  modal = getModalNode(document.body);
235
235
  });
236
236
 
237
+ it('adds the default h1 heading element', () => {
238
+ const header = modal.querySelector('section .slds-modal__header h1');
239
+ expect(header).to.not.be.null;
240
+ });
241
+
237
242
  it('adds the footer', () => {
238
243
  const footer = modal.querySelector('.slds-modal__footer');
239
244
  expect(footer.className).to.include('slds-theme_default');
@@ -465,7 +465,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
465
465
  });
466
466
 
467
467
  if (!headerContent && (this.props.heading || this.props.title) || this.props.tagline) {
468
- headerContent = /*#__PURE__*/_react.default.createElement("div", null, this.props.toast, /*#__PURE__*/_react.default.createElement("h2", {
468
+ headerContent = /*#__PURE__*/_react.default.createElement("div", null, this.props.toast, /*#__PURE__*/_react.default.createElement("h1", {
469
469
  className: (0, _classnames.default)({
470
470
  'slds-text-heading_small': this.isPrompt(),
471
471
  'slds-text-heading_medium': !this.isPrompt()
@@ -43,7 +43,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
43
43
  >
44
44
  <span
45
45
  className="slds-pill__label"
46
- title="Pill Label 1"
46
+ title="Full pill label verbiage mirrored here"
47
47
  >
48
48
  Pill Label 1
49
49
  </span>
@@ -89,7 +89,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
89
89
  >
90
90
  <span
91
91
  className="slds-pill__label"
92
- title="Pill Label 2"
92
+ title="Full pill label verbiage mirrored here"
93
93
  >
94
94
  Pill Label 2
95
95
  </span>
@@ -169,7 +169,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
169
169
  >
170
170
  <span
171
171
  className="slds-pill__label"
172
- title="Pill Label 1"
172
+ title="Full pill label verbiage mirrored here"
173
173
  >
174
174
  Pill Label 1
175
175
  </span>
@@ -215,7 +215,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
215
215
  >
216
216
  <span
217
217
  className="slds-pill__label"
218
- title="Pill Label 2"
218
+ title="Full pill label verbiage mirrored here"
219
219
  >
220
220
  Pill Label 2
221
221
  </span>
@@ -311,7 +311,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
311
311
  </span>
312
312
  <span
313
313
  className="slds-pill__label"
314
- title="Pill Label 1"
314
+ title="Full pill label verbiage mirrored here"
315
315
  >
316
316
  Pill Label 1
317
317
  </span>
@@ -373,7 +373,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
373
373
  </span>
374
374
  <span
375
375
  className="slds-pill__label"
376
- title="Pill Label 2"
376
+ title="Full pill label verbiage mirrored here"
377
377
  >
378
378
  Pill Label 2
379
379
  </span>
@@ -471,7 +471,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
471
471
  </span>
472
472
  <span
473
473
  className="slds-pill__label"
474
- title="Pill Label 1"
474
+ title="Full pill label verbiage mirrored here"
475
475
  >
476
476
  Pill Label 1
477
477
  </span>
@@ -535,7 +535,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
535
535
  </span>
536
536
  <span
537
537
  className="slds-pill__label"
538
- title="Pill Label 2"
538
+ title="Full pill label verbiage mirrored here"
539
539
  >
540
540
  Pill Label 2
541
541
  </span>
@@ -598,7 +598,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
598
598
  </span>
599
599
  <span
600
600
  className="slds-pill__label"
601
- title="Pill Label 3"
601
+ title="Full pill label verbiage mirrored here"
602
602
  >
603
603
  Pill Label 3
604
604
  </span>
@@ -662,7 +662,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
662
662
  </span>
663
663
  <span
664
664
  className="slds-pill__label"
665
- title="Pill Label 4"
665
+ title="Full pill label verbiage mirrored here"
666
666
  >
667
667
  Pill Label 4
668
668
  </span>
@@ -726,7 +726,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
726
726
  </span>
727
727
  <span
728
728
  className="slds-pill__label"
729
- title="Pill Label 5"
729
+ title="Full pill label verbiage mirrored here"
730
730
  >
731
731
  Pill Label 5
732
732
  </span>
@@ -790,7 +790,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
790
790
  </span>
791
791
  <span
792
792
  className="slds-pill__label"
793
- title="Pill Label 6"
793
+ title="Full pill label verbiage mirrored here"
794
794
  >
795
795
  Pill Label 6
796
796
  </span>
@@ -854,7 +854,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
854
854
  </span>
855
855
  <span
856
856
  className="slds-pill__label"
857
- title="Pill Label 7"
857
+ title="Full pill label verbiage mirrored here"
858
858
  >
859
859
  Pill Label 7
860
860
  </span>
@@ -918,7 +918,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
918
918
  </span>
919
919
  <span
920
920
  className="slds-pill__label"
921
- title="Pill Label 8"
921
+ title="Full pill label verbiage mirrored here"
922
922
  >
923
923
  Pill Label 8
924
924
  </span>
@@ -982,7 +982,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
982
982
  </span>
983
983
  <span
984
984
  className="slds-pill__label"
985
- title="Pill Label 9"
985
+ title="Full pill label verbiage mirrored here"
986
986
  >
987
987
  Pill Label 9
988
988
  </span>
@@ -217,6 +217,8 @@ var SelectedListBox = function SelectedListBox(props) {
217
217
  role: props.listboxRole,
218
218
  "aria-orientation": props.listboxAriaOrientation
219
219
  }, props.selection.map(function (option, renderIndex) {
220
+ var _option$title;
221
+
220
222
  var hasTabIndex = renderIndex === props.activeOptionIndex;
221
223
  var icon = getIcon(option);
222
224
  var avatar = !icon ? getAvatar(option) : null;
@@ -260,6 +262,7 @@ var SelectedListBox = function SelectedListBox(props) {
260
262
  icon: icon,
261
263
  labels: {
262
264
  label: option.label,
265
+ title: (_option$title = option.title) !== null && _option$title !== void 0 ? _option$title : option.label,
263
266
  removeTitle: props.labels.removePillTitle
264
267
  },
265
268
  requestFocus: props.listboxHasFocus,
@@ -238,6 +238,34 @@ describe('SLDSPopover', function () {
238
238
  const trigger = wrapper.find(defaultIds.trigger);
239
239
  trigger.simulate('click');
240
240
  });
241
+
242
+ it('stops event propagation after closing on ESC', function (done) {
243
+ const mockEvent = {
244
+ key: 'Esc',
245
+ keyCode: 27,
246
+ which: 27,
247
+ stopPropagation: sinon.spy(),
248
+ };
249
+ wrapper = mount(
250
+ <DemoComponent
251
+ onOpen={() => {
252
+ wrapper.update();
253
+ const popover = wrapper.find(`#${defaultIds.popover}`);
254
+ popover.simulate('keyDown', mockEvent);
255
+ }}
256
+ onKeyDown={() => {
257
+ setTimeout(() => {
258
+ expect(mockEvent.stopPropagation.callCount).to.equal(1);
259
+ done();
260
+ }, 0);
261
+ }}
262
+ />,
263
+ { attachTo: mountNode }
264
+ );
265
+
266
+ const trigger = wrapper.find(defaultIds.trigger);
267
+ trigger.simulate('click');
268
+ });
241
269
  });
242
270
  });
243
271
 
@@ -1,5 +1,20 @@
1
1
  declare module '@salesforce/design-system-react/components/progress-indicator' {
2
2
  import React from 'react';
3
+
4
+ type Step = {
5
+ id: string | number;
6
+ label: string | JSX.Element;
7
+ assistiveText?: string;
8
+ };
9
+
10
+ type StepState = {
11
+ isCompleted: boolean;
12
+ isDisabled: boolean;
13
+ isError: boolean;
14
+ isSelected: boolean;
15
+ step: Step;
16
+ };
17
+
3
18
  type Props = {
4
19
  /**
5
20
  * **Assistive text for accessibility**
@@ -23,16 +38,16 @@ declare module '@salesforce/design-system-react/components/progress-indicator' {
23
38
  /**
24
39
  * Stores all completed steps. It is an array of step objects.
25
40
  */
26
- completedSteps?: any[];
41
+ completedSteps?: Step[];
27
42
  /**
28
43
  * Stores all disabled steps. It is an array of step objects. Steps are still clickable/focusable,
29
44
  * this only disables cursor change and removes onClick and onFocus event callbacks.
30
45
  */
31
- disabledSteps?: any[];
46
+ disabledSteps?: Step[];
32
47
  /**
33
48
  * Stores all error steps. It is an array of step objects and usually there is only one error step, the current step. If an error occurs a second error icon should be placed to the left of related confirmation buttons (e.g. Cancel, Save) and an Error Popover should appear indicating there are errors. These additional items are NOT part of this component. This note was included for visibility purposes. Please refer to [SLDS website](https://www.lightningdesignsystem.com/components/progress-indicator/) for full details **
34
49
  */
35
- errorSteps?: any[];
50
+ errorSteps?: Step[];
36
51
  /**
37
52
  * HTML id for component.
38
53
  */
@@ -48,7 +63,10 @@ declare module '@salesforce/design-system-react/components/progress-indicator' {
48
63
  * <ProgressIndicator onStepClick={handleStepClick} />
49
64
  * ```
50
65
  */
51
- onStepClick?: (v: any) => any;
66
+ onStepClick?: (
67
+ event: React.ChangeEvent<HTMLInputElement>,
68
+ data: StepState
69
+ ) => void;
52
70
  /**
53
71
  * Triggered when an individual step is focused. By default, it receives an event and returns step state and the step object clicked: `{ isCompleted, isDisabled, isError, isSelected, step }`. Users are able to pass a callback handleClick function in forms of: <function name>(event, data) where data is the callback result.
54
72
  * ```
@@ -56,11 +74,14 @@ declare module '@salesforce/design-system-react/components/progress-indicator' {
56
74
  * <ProgressIndicator onStepFocus={handleStepFocus} />
57
75
  * ```
58
76
  */
59
- onStepFocus?: (v: any) => any;
77
+ onStepFocus?: (
78
+ event: React.ChangeEvent<HTMLInputElement>,
79
+ data: StepState
80
+ ) => void;
60
81
  /**
61
82
  * Represents the currently selected or active step. It is a step object.
62
83
  */
63
- selectedStep: Record<string, any> /*.isRequired*/;
84
+ selectedStep: Step /* .isRequired */;
64
85
  /**
65
86
  * It is an array of step objects in the following form:
66
87
  * ```
@@ -71,11 +92,11 @@ declare module '@salesforce/design-system-react/components/progress-indicator' {
71
92
  * }],
72
93
  * ```
73
94
  */
74
- steps: any[] /*.isRequired*/;
95
+ steps: Step[] /* .isRequired */;
75
96
  /**
76
97
  * Stores all steps with opened tooltips. This property is mainly for development purposes. The tooltip should only show on hover for the user.
77
98
  */
78
- tooltipIsOpenSteps?: any[];
99
+ tooltipIsOpenSteps?: Step[];
79
100
  /**
80
101
  * Determines component style.
81
102
  */
@@ -55,13 +55,19 @@ declare module '@salesforce/design-system-react/components/slider' {
55
55
  */
56
56
  name?: string;
57
57
  /**
58
- * This event fires whenever the user has modified the data of the control. This callback recieves the following parameters `event, { value: [string] }`.
58
+ * This event fires whenever the user has modified the data of the control. This callback recieves the following parameters `event, { value: number }`.
59
59
  */
60
- onChange?: (v: any) => any;
60
+ onChange?: (
61
+ event: React.ChangeEvent<HTMLInputElement>,
62
+ { value: number }
63
+ ) => void;
61
64
  /**
62
- * This event fires when the value is committed. This callback recieves the following parameters `event, { value: [string] }`.
65
+ * This event fires when the value is committed. This callback recieves the following parameters `event, { value: number }`.
63
66
  */
64
- onInput?: (v: any) => any;
67
+ onInput?: (
68
+ event: React.ChangeEvent<HTMLInputElement>,
69
+ { value: number }
70
+ ) => void;
65
71
  /**
66
72
  * Size of the slider.
67
73
  */
@@ -0,0 +1,83 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ Copyright (c) 2015 Jed Watson.
9
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
10
+ All rights reserved.
11
+ */
12
+
13
+ /*!
14
+ Copyright (c) 2017 Jed Watson.
15
+ Licensed under the MIT License (MIT), see
16
+ http://jedwatson.github.io/classnames
17
+ */
18
+
19
+ /*!
20
+ * Adapted from jQuery UI core
21
+ *
22
+ * http://jqueryui.com
23
+ *
24
+ * Copyright 2014 jQuery Foundation and other contributors
25
+ * Released under the MIT license.
26
+ * http://jquery.org/license
27
+ *
28
+ * http://api.jqueryui.com/category/ui-core/
29
+ */
30
+
31
+ /*!
32
+ * design-system-react
33
+ * v0.10.48
34
+ * Copyright (c) 2015-present, Salesforce.com, Inc.
35
+ * All rights reserved.
36
+ *
37
+ * Redistribution and use in source and binary forms, with or without
38
+ * modification, are permitted provided that the following conditions are met:
39
+ * * Redistributions of source code must retain the above copyright
40
+ * notice, this list of conditions and the following disclaimer.
41
+ * * Redistributions in binary form must reproduce the above copyright
42
+ * notice, this list of conditions and the following disclaimer in the
43
+ * documentation and/or other materials provided with the distribution.
44
+ * * Neither the name of the Salesforce.com nor the
45
+ * names of its contributors may be used to endorse or promote products
46
+ * derived from this software without specific prior written permission.
47
+ *
48
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
49
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
52
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
53
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
54
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
57
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58
+ */
59
+
60
+ /**!
61
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
62
+ * @version 1.12.9
63
+ * @license
64
+ * Copyright (c) 2016 Federico Zivolo and contributors
65
+ *
66
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
67
+ * of this software and associated documentation files (the "Software"), to deal
68
+ * in the Software without restriction, including without limitation the rights
69
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
+ * copies of the Software, and to permit persons to whom the Software is
71
+ * furnished to do so, subject to the following conditions:
72
+ *
73
+ * The above copyright notice and this permission notice shall be included in all
74
+ * copies or substantial portions of the Software.
75
+ *
76
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
82
+ * SOFTWARE.
83
+ */
@@ -0,0 +1,83 @@
1
+ /*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
+
7
+ /*!
8
+ Copyright (c) 2015 Jed Watson.
9
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
10
+ All rights reserved.
11
+ */
12
+
13
+ /*!
14
+ Copyright (c) 2017 Jed Watson.
15
+ Licensed under the MIT License (MIT), see
16
+ http://jedwatson.github.io/classnames
17
+ */
18
+
19
+ /*!
20
+ * Adapted from jQuery UI core
21
+ *
22
+ * http://jqueryui.com
23
+ *
24
+ * Copyright 2014 jQuery Foundation and other contributors
25
+ * Released under the MIT license.
26
+ * http://jquery.org/license
27
+ *
28
+ * http://api.jqueryui.com/category/ui-core/
29
+ */
30
+
31
+ /*!
32
+ * design-system-react
33
+ * v0.10.48
34
+ * Copyright (c) 2015-present, Salesforce.com, Inc.
35
+ * All rights reserved.
36
+ *
37
+ * Redistribution and use in source and binary forms, with or without
38
+ * modification, are permitted provided that the following conditions are met:
39
+ * * Redistributions of source code must retain the above copyright
40
+ * notice, this list of conditions and the following disclaimer.
41
+ * * Redistributions in binary form must reproduce the above copyright
42
+ * notice, this list of conditions and the following disclaimer in the
43
+ * documentation and/or other materials provided with the distribution.
44
+ * * Neither the name of the Salesforce.com nor the
45
+ * names of its contributors may be used to endorse or promote products
46
+ * derived from this software without specific prior written permission.
47
+ *
48
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
49
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
52
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
53
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
54
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
57
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58
+ */
59
+
60
+ /**!
61
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
62
+ * @version 1.12.9
63
+ * @license
64
+ * Copyright (c) 2016 Federico Zivolo and contributors
65
+ *
66
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
67
+ * of this software and associated documentation files (the "Software"), to deal
68
+ * in the Software without restriction, including without limitation the rights
69
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
+ * copies of the Software, and to permit persons to whom the Software is
71
+ * furnished to do so, subject to the following conditions:
72
+ *
73
+ * The above copyright notice and this permission notice shall be included in all
74
+ * copies or substantial portions of the Software.
75
+ *
76
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
82
+ * SOFTWARE.
83
+ */
package/lib/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "design-system-react",
3
- "version": "0.10.45",
3
+ "version": "0.10.48",
4
4
  "description": "Salesforce Lightning Design System for React",
5
- "license": "SEE LICENSE IN README.md",
5
+ "license": "BSD-3-Clause",
6
6
  "engines": {},
7
7
  "husky": {
8
8
  "hooks": {
@@ -9,6 +9,8 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
9
9
 
10
10
  var _keyCode = _interopRequireDefault(require("./key-code"));
11
11
 
12
+ var _event = _interopRequireDefault(require("./event"));
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
@@ -44,7 +46,8 @@ var internalHandleClick = function internalHandleClick(_ref) {
44
46
  };
45
47
 
46
48
  var KeyboardNavigableDialog = function KeyboardNavigableDialog(_ref2) {
47
- var isOpen = _ref2.isOpen,
49
+ var event = _ref2.event,
50
+ isOpen = _ref2.isOpen,
48
51
  handleClick = _ref2.handleClick,
49
52
  keyCode = _ref2.keyCode,
50
53
  eventTarget = _ref2.eventTarget,
@@ -55,6 +58,8 @@ var KeyboardNavigableDialog = function KeyboardNavigableDialog(_ref2) {
55
58
  case _keyCode.default.ESCAPE:
56
59
  if (isOpen) {
57
60
  toggleOpen();
61
+
62
+ _event.default.trapEvent(event);
58
63
  }
59
64
 
60
65
  break;
@@ -162,6 +162,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
162
162
  * * `id`: A unique identifier string.
163
163
  * * `label`: A primary string of text for a menu item or group separator.
164
164
  * * `subTitle`: A secondary string of text added for clarity. (optional)
165
+ * * `title`: A string of text shown as the title of the selected item (optional)
165
166
  * * `type`: 'separator' is the only type currently used
166
167
  * * `disabled`: Set to true to disable this menu item.
167
168
  * * `tooltipContent`: Content that is displayed in tooltip when item is disabled
@@ -170,6 +171,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
170
171
  * id: '2',
171
172
  * label: 'Salesforce.com, Inc.',
172
173
  * subTitle: 'Account • San Francisco',
174
+ * title: 'Salesforce',
173
175
  * type: 'account',
174
176
  * disabled: true,
175
177
  * tooltipContent: "You don't have permission to select this item."
@@ -182,6 +184,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
182
184
  icon?: React.ReactNode;
183
185
  label?: string;
184
186
  subTitle?: string;
187
+ title?: string;
185
188
  type?: string;
186
189
  disabled?: boolean;
187
190
  tooltipContent?: React.ReactNode;