@salesforce/design-system-react 0.10.38 → 0.10.39

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 (37) hide show
  1. package/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  2. package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  3. package/components/combobox/combobox.jsx +20 -18
  4. package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  5. package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  6. package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  7. package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  8. package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  9. package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  10. package/lib/components/combobox/combobox.js +27 -23
  11. package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  12. package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  13. package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  14. package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  15. package/lib/package.json +1 -1
  16. package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  17. package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
  18. package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
  19. package/module/components/combobox/combobox.js +27 -23
  20. package/module/components/combobox/combobox.js.map +1 -1
  21. package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  22. package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  23. package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  24. package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  25. package/package.json +1 -1
  26. package/design-system-react-components.js +0 -63079
  27. package/design-system-react-components.js.map +0 -1
  28. package/design-system-react-components.min.js +0 -3
  29. package/design-system-react-components.min.js.LICENSE.txt +0 -83
  30. package/design-system-react-components.min.js.map +0 -1
  31. package/design-system-react.js +0 -73864
  32. package/design-system-react.js.map +0 -1
  33. package/design-system-react.min.js +0 -3
  34. package/design-system-react.min.js.LICENSE.txt +0 -83
  35. package/design-system-react.min.js.map +0 -1
  36. package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
  37. package/lib/design-system-react.min.js.LICENSE.txt +0 -83
@@ -225,17 +225,16 @@ describe('SLDSCombobox', function describeFunction() {
225
225
  destroyMountNode({ wrapper, mountNode });
226
226
  });
227
227
 
228
- it('has aria-haspopup, role is combobox, aria-expanded is false when closed, aria-expanded is true when open', function () {
228
+ it('has aria-haspopup, aria-expanded is false when closed, aria-expanded is true when open', function () {
229
229
  wrapper = mount(<DemoComponent multiple />, { attachTo: mountNode });
230
230
  const nodes = getNodes({ wrapper });
231
+ expect(nodes.combobox).attr('aria-haspopup', 'listbox');
231
232
  expect(nodes.combobox).attr('role', 'combobox');
232
- expect(nodes.input).attr('aria-haspopup', 'listbox');
233
- expect(nodes.input).attr('role', 'combobox');
234
233
  // closed
235
- expect(nodes.input).attr('aria-expanded', 'false');
234
+ expect(nodes.combobox).attr('aria-expanded', 'false');
236
235
  // open
237
236
  nodes.input.simulate('click', {});
238
- expect(nodes.input).attr('aria-expanded', 'true');
237
+ expect(nodes.combobox).attr('aria-expanded', 'true');
239
238
  });
240
239
 
241
240
  it('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 () {
@@ -1075,15 +1075,18 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1075
1075
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1076
1076
  ,
1077
1077
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1078
+ ,
1079
+ "aria-expanded": _this.getIsOpen(),
1080
+ "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1081
+ // used on menu's listbox
1082
+ ,
1083
+ "aria-owns": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined // eslint-disable-line jsx-a11y/aria-proptypes
1078
1084
 
1079
1085
  }, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
1080
1086
  "aria-autocomplete": "list",
1081
1087
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
1082
1088
  "aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
1083
1089
  "aria-describedby": _this.getErrorId(),
1084
- "aria-expanded": _this.getIsOpen(),
1085
- "aria-haspopup": "listbox",
1086
- role: "combobox",
1087
1090
  autoComplete: "off",
1088
1091
  className: "slds-combobox__input",
1089
1092
  containerProps: {
@@ -1109,6 +1112,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1109
1112
  defaultValue: props.defaultValue,
1110
1113
  readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption),
1111
1114
  required: props.required,
1115
+ role: "textbox",
1112
1116
  value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : props.value
1113
1117
  }, userDefinedProps.input)), _this.getDialog({
1114
1118
  menuRenderer: _this.renderMenu({
@@ -1180,16 +1184,15 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1180
1184
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1181
1185
  ,
1182
1186
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1187
+ ,
1188
+ "aria-expanded": _this.getIsOpen(),
1189
+ "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1183
1190
 
1184
1191
  }, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
1185
1192
  "aria-autocomplete": "list",
1186
1193
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
1187
1194
  "aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
1188
1195
  "aria-describedby": _this.getErrorId(),
1189
- "aria-expanded": _this.getIsOpen(),
1190
- "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1191
- ,
1192
- role: "combobox",
1193
1196
  defaultValue: props.defaultValue,
1194
1197
  autoComplete: "off",
1195
1198
  className: "slds-combobox__input",
@@ -1215,6 +1218,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1215
1218
  placeholder: labels.placeholder,
1216
1219
  readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption),
1217
1220
  required: props.required,
1221
+ role: "textbox",
1218
1222
  value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : props.value
1219
1223
  }, userDefinedProps.input)), _this.getDialog({
1220
1224
  menuRenderer: _this.renderMenu({
@@ -1250,6 +1254,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1250
1254
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1251
1255
  ,
1252
1256
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1257
+ ,
1258
+ "aria-expanded": _this.getIsOpen(),
1259
+ "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1253
1260
 
1254
1261
  }, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
1255
1262
  defaultValue: props.defaultValue,
@@ -1257,10 +1264,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1257
1264
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
1258
1265
  "aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
1259
1266
  "aria-describedby": _this.getErrorId(),
1260
- "aria-expanded": _this.getIsOpen(),
1261
- "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1262
- ,
1263
- role: "combobox",
1264
1267
  autoComplete: "off",
1265
1268
  className: "slds-combobox__input",
1266
1269
  containerProps: {
@@ -1305,6 +1308,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1305
1308
  placeholder: labels.placeholder,
1306
1309
  readOnly: !!(props.predefinedOptionsOnly && _this.state.activeOption) || !!props.selection.length,
1307
1310
  required: props.required,
1311
+ role: "textbox",
1308
1312
  value: props.predefinedOptionsOnly ? _this.state.activeOption && _this.state.activeOption.label || props.value : value
1309
1313
  }, userDefinedProps.input)), _this.getDialog({
1310
1314
  menuRenderer: _this.renderMenu({
@@ -1382,15 +1386,14 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1382
1386
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1383
1387
  ,
1384
1388
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1389
+ ,
1390
+ "aria-expanded": _this.getIsOpen(),
1391
+ "aria-haspopup": "dialog" // eslint-disable-line jsx-a11y/aria-proptypes
1385
1392
 
1386
1393
  }, /*#__PURE__*/_react.default.createElement(_popover.default, popoverProps, /*#__PURE__*/_react.default.createElement(_innerInput.default, {
1387
1394
  "aria-autocomplete": "none",
1388
1395
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-popover") : undefined,
1389
1396
  "aria-describedby": _this.getErrorId(),
1390
- "aria-expanded": _this.getIsOpen(),
1391
- "aria-haspopup": "dialog" // eslint-disable-line jsx-a11y/aria-proptypes
1392
- ,
1393
- role: "combobox",
1394
1397
  autoComplete: "off",
1395
1398
  className: "slds-combobox__input",
1396
1399
  containerProps: {
@@ -1414,6 +1417,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1414
1417
  placeholder: labels.placeholder,
1415
1418
  readOnly: true,
1416
1419
  required: props.required,
1420
+ role: "textbox",
1417
1421
  value: props.value
1418
1422
  })))), props.errorText && /*#__PURE__*/_react.default.createElement("div", {
1419
1423
  className: "slds-has-error"
@@ -1441,6 +1445,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1441
1445
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1442
1446
  ,
1443
1447
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1448
+ ,
1449
+ "aria-expanded": _this.getIsOpen(),
1450
+ "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1444
1451
 
1445
1452
  }, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
1446
1453
  defaultValue: props.defaultValue,
@@ -1448,10 +1455,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1448
1455
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
1449
1456
  "aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
1450
1457
  "aria-describedby": _this.getErrorId(),
1451
- "aria-expanded": _this.getIsOpen(),
1452
- "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1453
- ,
1454
- role: "combobox",
1455
1458
  autoComplete: "off",
1456
1459
  className: "slds-combobox__input",
1457
1460
  containerProps: {
@@ -1479,6 +1482,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1479
1482
  placeholder: labels.placeholderReadOnly,
1480
1483
  readOnly: true,
1481
1484
  required: props.required,
1485
+ role: "textbox",
1482
1486
  value: value
1483
1487
  }, userDefinedProps.input)), _this.getDialog({
1484
1488
  menuRenderer: _this.renderMenu({
@@ -1538,6 +1542,9 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1538
1542
  }, props.className) // Not in ARIA 1.2 spec, temporary for SLDS styles
1539
1543
  ,
1540
1544
  role: "combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
1545
+ ,
1546
+ "aria-expanded": _this.getIsOpen(),
1547
+ "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1541
1548
 
1542
1549
  }, /*#__PURE__*/_react.default.createElement(_innerInput.default, _extends({
1543
1550
  defaultValue: props.defaultValue,
@@ -1545,10 +1552,6 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1545
1552
  "aria-controls": _this.getIsOpen() ? "".concat(_this.getId(), "-listbox") : undefined,
1546
1553
  "aria-activedescendant": _this.state.activeOption ? "".concat(_this.getId(), "-listbox-option-").concat(_this.state.activeOption.id) : null,
1547
1554
  "aria-describedby": _this.getErrorId(),
1548
- "aria-expanded": _this.getIsOpen(),
1549
- "aria-haspopup": "listbox" // eslint-disable-line jsx-a11y/aria-proptypes
1550
- ,
1551
- role: "combobox",
1552
1555
  autoComplete: "off",
1553
1556
  className: "slds-combobox__input",
1554
1557
  containerProps: {
@@ -1577,6 +1580,7 @@ var Combobox = /*#__PURE__*/function (_React$Component) {
1577
1580
  placeholder: labels.placeholderReadOnly,
1578
1581
  readOnly: true,
1579
1582
  required: props.required,
1583
+ role: "textbox",
1580
1584
  value: inputValue
1581
1585
  }, userDefinedProps.input)), _this.getDialog({
1582
1586
  menuRenderer: _this.renderMenu({
@@ -170,6 +170,8 @@ exports[`Datepicker
170
170
  className="slds-combobox_container"
171
171
  >
172
172
  <div
173
+ aria-expanded={false}
174
+ aria-haspopup="listbox"
173
175
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
174
176
  role="combobox"
175
177
  >
@@ -180,8 +182,6 @@ exports[`Datepicker
180
182
  <input
181
183
  aria-activedescendant={null}
182
184
  aria-autocomplete="list"
183
- aria-expanded={false}
184
- aria-haspopup="listbox"
185
185
  autoComplete="off"
186
186
  className="slds-input slds-combobox__input"
187
187
  disabled={false}
@@ -194,7 +194,7 @@ exports[`Datepicker
194
194
  placeholder="Select an Option"
195
195
  readOnly={true}
196
196
  required={false}
197
- role="combobox"
197
+ role="textbox"
198
198
  type="text"
199
199
  value="2007"
200
200
  />
@@ -1034,6 +1034,8 @@ exports[`Datepicker
1034
1034
  className="slds-combobox_container"
1035
1035
  >
1036
1036
  <div
1037
+ aria-expanded={false}
1038
+ aria-haspopup="listbox"
1037
1039
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
1038
1040
  role="combobox"
1039
1041
  >
@@ -1044,8 +1046,6 @@ exports[`Datepicker
1044
1046
  <input
1045
1047
  aria-activedescendant={null}
1046
1048
  aria-autocomplete="list"
1047
- aria-expanded={false}
1048
- aria-haspopup="listbox"
1049
1049
  autoComplete="off"
1050
1050
  className="slds-input slds-combobox__input"
1051
1051
  disabled={false}
@@ -1058,7 +1058,7 @@ exports[`Datepicker
1058
1058
  placeholder="Select an Option"
1059
1059
  readOnly={true}
1060
1060
  required={false}
1061
- role="combobox"
1061
+ role="textbox"
1062
1062
  type="text"
1063
1063
  value="2007"
1064
1064
  />
@@ -1897,6 +1897,8 @@ exports[`Datepicker
1897
1897
  className="slds-combobox_container"
1898
1898
  >
1899
1899
  <div
1900
+ aria-expanded={false}
1901
+ aria-haspopup="listbox"
1900
1902
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
1901
1903
  role="combobox"
1902
1904
  >
@@ -1907,8 +1909,6 @@ exports[`Datepicker
1907
1909
  <input
1908
1910
  aria-activedescendant={null}
1909
1911
  aria-autocomplete="list"
1910
- aria-expanded={false}
1911
- aria-haspopup="listbox"
1912
1912
  autoComplete="off"
1913
1913
  className="slds-input slds-combobox__input"
1914
1914
  disabled={false}
@@ -1921,7 +1921,7 @@ exports[`Datepicker
1921
1921
  placeholder="Select an Option"
1922
1922
  readOnly={true}
1923
1923
  required={false}
1924
- role="combobox"
1924
+ role="textbox"
1925
1925
  type="text"
1926
1926
  value="2014"
1927
1927
  />
@@ -2757,6 +2757,8 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2757
2757
  className="slds-combobox_container"
2758
2758
  >
2759
2759
  <div
2760
+ aria-expanded={false}
2761
+ aria-haspopup="listbox"
2760
2762
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
2761
2763
  role="combobox"
2762
2764
  >
@@ -2767,8 +2769,6 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2767
2769
  <input
2768
2770
  aria-activedescendant={null}
2769
2771
  aria-autocomplete="list"
2770
- aria-expanded={false}
2771
- aria-haspopup="listbox"
2772
2772
  autoComplete="off"
2773
2773
  className="slds-input slds-combobox__input"
2774
2774
  disabled={false}
@@ -2781,7 +2781,7 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
2781
2781
  placeholder="Select an Option"
2782
2782
  readOnly={true}
2783
2783
  required={false}
2784
- role="combobox"
2784
+ role="textbox"
2785
2785
  type="text"
2786
2786
  value="2014"
2787
2787
  />
@@ -3485,8 +3485,8 @@ exports[`Datepicker Default HTML Snapshot 1`] = `
3485
3485
  <div class=\\"slds-form-element\\"><label class=\\"slds-form-element__label slds-assistive-text\\" for=\\"sample-datepicker-year-picklist\\">Year</label>
3486
3486
  <div class=\\"slds-form-element__control\\">
3487
3487
  <div class=\\"slds-combobox_container\\">
3488
- <div class=\\"slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none\\" role=\\"combobox\\">
3489
- <div class=\\"slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right\\" role=\\"none\\"><input type=\\"text\\" autoComplete=\\"off\\" class=\\"slds-input slds-combobox__input\\" id=\\"sample-datepicker-year-picklist\\" placeholder=\\"Select an Option\\" readonly=\\"\\" role=\\"combobox\\" aria-autocomplete=\\"list\\" aria-expanded=\\"false\\" aria-haspopup=\\"listbox\\" value=\\"2014\\" /><span class=\\"slds-icon_container slds-input__icon slds-input__icon_right\\"><svg aria-hidden=\\"true\\" class=\\"slds-icon slds-icon_x-small slds-icon-text-default\\">
3488
+ <div class=\\"slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none\\" role=\\"combobox\\" aria-expanded=\\"false\\" aria-haspopup=\\"listbox\\">
3489
+ <div class=\\"slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right\\" role=\\"none\\"><input type=\\"text\\" autoComplete=\\"off\\" class=\\"slds-input slds-combobox__input\\" id=\\"sample-datepicker-year-picklist\\" placeholder=\\"Select an Option\\" readonly=\\"\\" role=\\"textbox\\" aria-autocomplete=\\"list\\" value=\\"2014\\" /><span class=\\"slds-icon_container slds-input__icon slds-input__icon_right\\"><svg aria-hidden=\\"true\\" class=\\"slds-icon slds-icon_x-small slds-icon-text-default\\">
3490
3490
  <use href=\\"/assets/icons/utility-sprite/svg/symbols.svg#down\\"></use>
3491
3491
  </svg></span></div>
3492
3492
  </div>
@@ -3723,6 +3723,8 @@ exports[`ErrorPicker 1`] = `
3723
3723
  className="slds-combobox_container"
3724
3724
  >
3725
3725
  <div
3726
+ aria-expanded={false}
3727
+ aria-haspopup="listbox"
3726
3728
  className="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click ignore-react-onclickoutside slds-shrink-none"
3727
3729
  role="combobox"
3728
3730
  >
@@ -3733,8 +3735,6 @@ exports[`ErrorPicker 1`] = `
3733
3735
  <input
3734
3736
  aria-activedescendant={null}
3735
3737
  aria-autocomplete="list"
3736
- aria-expanded={false}
3737
- aria-haspopup="listbox"
3738
3738
  autoComplete="off"
3739
3739
  className="slds-input slds-combobox__input"
3740
3740
  disabled={false}
@@ -3747,7 +3747,7 @@ exports[`ErrorPicker 1`] = `
3747
3747
  placeholder="Select an Option"
3748
3748
  readOnly={true}
3749
3749
  required={false}
3750
- role="combobox"
3750
+ role="textbox"
3751
3751
  type="text"
3752
3752
  value="2014"
3753
3753
  />