@salesforce/design-system-react 0.10.36 → 0.10.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/builder-header/utilities.d.ts +20 -0
- package/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/components/combobox/combobox.d.ts +11 -11
- package/components/combobox/combobox.jsx +20 -18
- package/components/component-docs.json +1 -1
- package/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +93 -89
- package/components/data-table/__examples__/joined-with-page-header.jsx +1 -2
- package/components/data-table/__examples__/resizable-columns.jsx +0 -2
- package/components/data-table/__tests__/data-table.browser-test.jsx +2 -1
- package/components/data-table/component.json +0 -4
- package/components/data-table/index.jsx +26 -9
- package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/components/index.d.ts +2 -0
- package/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
- package/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
- package/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
- package/components/menu-dropdown/menu-dropdown.jsx +5 -8
- package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/components/setup-assistant.d.ts +1 -1
- package/components/site-stories.js +0 -4
- package/components/utilities/menu-list/index.jsx +3 -0
- package/components/utilities/menu-list/item.jsx +5 -2
- package/lib/components/builder-header/utilities.d.ts +20 -0
- package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
- package/lib/components/combobox/combobox.d.ts +11 -11
- package/lib/components/combobox/combobox.js +27 -23
- package/lib/components/component-docs.json +1 -1
- package/lib/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +93 -89
- package/lib/components/data-table/__examples__/joined-with-page-header.jsx +1 -2
- package/lib/components/data-table/__examples__/resizable-columns.jsx +0 -2
- package/lib/components/data-table/__tests__/data-table.browser-test.jsx +2 -1
- package/lib/components/data-table/component.json +0 -4
- package/lib/components/data-table/index.js +29 -10
- package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/lib/components/index.d.ts +2 -0
- package/lib/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/lib/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
- package/lib/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
- package/lib/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
- package/lib/components/menu-dropdown/menu-dropdown.js +3 -5
- package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/lib/components/setup-assistant.d.ts +1 -1
- package/lib/components/site-stories.js +0 -3
- package/lib/components/utilities/menu-list/index.js +5 -2
- package/lib/components/utilities/menu-list/item.js +3 -2
- package/lib/package.json +1 -5
- package/module/components/builder-header/utilities.d.ts +20 -0
- package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
- package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
- package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
- package/module/components/combobox/combobox.d.ts +11 -11
- package/module/components/combobox/combobox.js +27 -23
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +1 -1
- package/module/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +93 -89
- package/module/components/data-table/__examples__/joined-with-page-header.js +1 -2
- package/module/components/data-table/__examples__/joined-with-page-header.js.map +1 -1
- package/module/components/data-table/__examples__/resizable-columns.js +0 -2
- package/module/components/data-table/__examples__/resizable-columns.js.map +1 -1
- package/module/components/data-table/__tests__/data-table.browser-test.js +3 -2
- package/module/components/data-table/__tests__/data-table.browser-test.js.map +1 -1
- package/module/components/data-table/component.json +0 -4
- package/module/components/data-table/index.js +29 -10
- package/module/components/data-table/index.js.map +1 -1
- package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
- package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
- package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
- package/module/components/index.d.ts +2 -0
- package/module/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
- package/module/components/menu-dropdown/__docs__/storybook-stories.js +9 -15
- package/module/components/menu-dropdown/__docs__/storybook-stories.js.map +1 -1
- package/module/components/menu-dropdown/__examples__/checkmark.js +53 -33
- package/module/components/menu-dropdown/__examples__/checkmark.js.map +1 -1
- package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js +7 -4
- package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js.map +1 -1
- package/module/components/menu-dropdown/menu-dropdown.js +3 -5
- package/module/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
- package/module/components/setup-assistant.d.ts +1 -1
- package/module/components/site-stories.js +0 -3
- package/module/components/site-stories.js.map +1 -1
- package/module/components/utilities/menu-list/index.js +5 -2
- package/module/components/utilities/menu-list/index.js.map +1 -1
- package/module/components/utilities/menu-list/item.js +3 -2
- package/module/components/utilities/menu-list/item.js.map +1 -1
- package/package.json +1 -5
- package/design-system-react-components.js +0 -63056
- package/design-system-react-components.js.map +0 -1
- package/design-system-react-components.min.js +0 -3
- package/design-system-react-components.min.js.LICENSE.txt +0 -83
- package/design-system-react-components.min.js.map +0 -1
- package/design-system-react.js +0 -73841
- package/design-system-react.js.map +0 -1
- package/design-system-react.min.js +0 -3
- package/design-system-react.min.js.LICENSE.txt +0 -83
- package/design-system-react.min.js.map +0 -1
- package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
- 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,
|
|
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.
|
|
234
|
+
expect(nodes.combobox).attr('aria-expanded', 'false');
|
|
236
235
|
// open
|
|
237
236
|
nodes.input.simulate('click', {});
|
|
238
|
-
expect(nodes.
|
|
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 () {
|
|
@@ -58,16 +58,16 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
|
|
|
58
58
|
* _Tested with Mocha testing._
|
|
59
59
|
*/
|
|
60
60
|
events?: Partial<{
|
|
61
|
-
onBlur?: (
|
|
62
|
-
onChange?: (v: any) => any;
|
|
63
|
-
onClose?: (v: any) => any;
|
|
64
|
-
onFocus?: (v: any) => any;
|
|
65
|
-
onOpen?: (v: any) => any;
|
|
66
|
-
onRequestClose?: (v: any) => any;
|
|
67
|
-
onRequestOpen?: (v: any) => any;
|
|
68
|
-
onRequestRemoveSelectedOption?: (v: any) => any;
|
|
69
|
-
onSelect?: (v: any) => any;
|
|
70
|
-
onSubmit?: (v: any) => any;
|
|
61
|
+
onBlur?: (event: React.SyntheticEvent) => any;
|
|
62
|
+
onChange?: (event: React.SyntheticEvent, v: any) => any;
|
|
63
|
+
onClose?: (event: React.SyntheticEvent, v: any) => any;
|
|
64
|
+
onFocus?: (event: React.SyntheticEvent, v: any) => any;
|
|
65
|
+
onOpen?: (event: React.SyntheticEvent, v: any) => any;
|
|
66
|
+
onRequestClose?: (event: React.SyntheticEvent, v: any) => any;
|
|
67
|
+
onRequestOpen?: (event: React.SyntheticEvent, v: any) => any;
|
|
68
|
+
onRequestRemoveSelectedOption?: (event: React.SyntheticEvent, v: any) => any;
|
|
69
|
+
onSelect?: (event: React.SyntheticEvent, v: any) => any;
|
|
70
|
+
onSubmit?: (event: React.SyntheticEvent, v: any) => any;
|
|
71
71
|
}>;
|
|
72
72
|
/**
|
|
73
73
|
* Message to display when the input is in an error state. When this is present, also visually highlights the component as in error. _Tested with snapshot testing._
|
|
@@ -183,7 +183,7 @@ declare module '@salesforce/design-system-react/components/combobox/combobox' {
|
|
|
183
183
|
label?: string;
|
|
184
184
|
subTitle?: string;
|
|
185
185
|
type?: string;
|
|
186
|
-
disabled?:
|
|
186
|
+
disabled?: boolean;
|
|
187
187
|
tooltipContent?: React.ReactNode;
|
|
188
188
|
}>[];
|
|
189
189
|
/**
|
|
@@ -1110,6 +1110,10 @@ class Combobox extends React.Component {
|
|
|
1110
1110
|
)}
|
|
1111
1111
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1112
1112
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1113
|
+
aria-expanded={this.getIsOpen()}
|
|
1114
|
+
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1115
|
+
// used on menu's listbox
|
|
1116
|
+
aria-owns={this.getIsOpen() ? `${this.getId()}-listbox` : undefined} // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1113
1117
|
>
|
|
1114
1118
|
<InnerInput
|
|
1115
1119
|
aria-autocomplete="list"
|
|
@@ -1122,9 +1126,6 @@ class Combobox extends React.Component {
|
|
|
1122
1126
|
: null
|
|
1123
1127
|
}
|
|
1124
1128
|
aria-describedby={this.getErrorId()}
|
|
1125
|
-
aria-expanded={this.getIsOpen()}
|
|
1126
|
-
aria-haspopup="listbox"
|
|
1127
|
-
role="combobox"
|
|
1128
1129
|
autoComplete="off"
|
|
1129
1130
|
className="slds-combobox__input"
|
|
1130
1131
|
containerProps={{
|
|
@@ -1154,6 +1155,7 @@ class Combobox extends React.Component {
|
|
|
1154
1155
|
!!(props.predefinedOptionsOnly && this.state.activeOption)
|
|
1155
1156
|
}
|
|
1156
1157
|
required={props.required}
|
|
1158
|
+
role="textbox"
|
|
1157
1159
|
value={
|
|
1158
1160
|
props.predefinedOptionsOnly
|
|
1159
1161
|
? (this.state.activeOption && this.state.activeOption.label) ||
|
|
@@ -1250,6 +1252,8 @@ class Combobox extends React.Component {
|
|
|
1250
1252
|
)}
|
|
1251
1253
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1252
1254
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1255
|
+
aria-expanded={this.getIsOpen()}
|
|
1256
|
+
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1253
1257
|
>
|
|
1254
1258
|
<InnerInput
|
|
1255
1259
|
aria-autocomplete="list"
|
|
@@ -1262,9 +1266,6 @@ class Combobox extends React.Component {
|
|
|
1262
1266
|
: null
|
|
1263
1267
|
}
|
|
1264
1268
|
aria-describedby={this.getErrorId()}
|
|
1265
|
-
aria-expanded={this.getIsOpen()}
|
|
1266
|
-
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1267
|
-
role="combobox"
|
|
1268
1269
|
defaultValue={props.defaultValue}
|
|
1269
1270
|
autoComplete="off"
|
|
1270
1271
|
className="slds-combobox__input"
|
|
@@ -1294,6 +1295,7 @@ class Combobox extends React.Component {
|
|
|
1294
1295
|
!!(props.predefinedOptionsOnly && this.state.activeOption)
|
|
1295
1296
|
}
|
|
1296
1297
|
required={props.required}
|
|
1298
|
+
role="textbox"
|
|
1297
1299
|
value={
|
|
1298
1300
|
props.predefinedOptionsOnly
|
|
1299
1301
|
? (this.state.activeOption && this.state.activeOption.label) ||
|
|
@@ -1351,6 +1353,8 @@ class Combobox extends React.Component {
|
|
|
1351
1353
|
)}
|
|
1352
1354
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1353
1355
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1356
|
+
aria-expanded={this.getIsOpen()}
|
|
1357
|
+
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1354
1358
|
>
|
|
1355
1359
|
<InnerInput
|
|
1356
1360
|
defaultValue={props.defaultValue}
|
|
@@ -1366,9 +1370,6 @@ class Combobox extends React.Component {
|
|
|
1366
1370
|
: null
|
|
1367
1371
|
}
|
|
1368
1372
|
aria-describedby={this.getErrorId()}
|
|
1369
|
-
aria-expanded={this.getIsOpen()}
|
|
1370
|
-
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1371
|
-
role="combobox"
|
|
1372
1373
|
autoComplete="off"
|
|
1373
1374
|
className="slds-combobox__input"
|
|
1374
1375
|
containerProps={{
|
|
@@ -1419,6 +1420,7 @@ class Combobox extends React.Component {
|
|
|
1419
1420
|
!!props.selection.length
|
|
1420
1421
|
}
|
|
1421
1422
|
required={props.required}
|
|
1423
|
+
role="textbox"
|
|
1422
1424
|
value={
|
|
1423
1425
|
props.predefinedOptionsOnly
|
|
1424
1426
|
? (this.state.activeOption &&
|
|
@@ -1519,6 +1521,8 @@ class Combobox extends React.Component {
|
|
|
1519
1521
|
)}
|
|
1520
1522
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1521
1523
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1524
|
+
aria-expanded={this.getIsOpen()}
|
|
1525
|
+
aria-haspopup="dialog" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1522
1526
|
>
|
|
1523
1527
|
<Popover {...popoverProps}>
|
|
1524
1528
|
<InnerInput
|
|
@@ -1527,9 +1531,6 @@ class Combobox extends React.Component {
|
|
|
1527
1531
|
this.getIsOpen() ? `${this.getId()}-popover` : undefined
|
|
1528
1532
|
}
|
|
1529
1533
|
aria-describedby={this.getErrorId()}
|
|
1530
|
-
aria-expanded={this.getIsOpen()}
|
|
1531
|
-
aria-haspopup="dialog" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1532
|
-
role="combobox"
|
|
1533
1534
|
autoComplete="off"
|
|
1534
1535
|
className="slds-combobox__input"
|
|
1535
1536
|
containerProps={{
|
|
@@ -1555,6 +1556,7 @@ class Combobox extends React.Component {
|
|
|
1555
1556
|
placeholder={labels.placeholder}
|
|
1556
1557
|
readOnly
|
|
1557
1558
|
required={props.required}
|
|
1559
|
+
role="textbox"
|
|
1558
1560
|
value={props.value}
|
|
1559
1561
|
/>
|
|
1560
1562
|
</Popover>
|
|
@@ -1605,6 +1607,8 @@ class Combobox extends React.Component {
|
|
|
1605
1607
|
)}
|
|
1606
1608
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1607
1609
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1610
|
+
aria-expanded={this.getIsOpen()}
|
|
1611
|
+
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1608
1612
|
>
|
|
1609
1613
|
<InnerInput
|
|
1610
1614
|
defaultValue={props.defaultValue}
|
|
@@ -1620,9 +1624,6 @@ class Combobox extends React.Component {
|
|
|
1620
1624
|
: null
|
|
1621
1625
|
}
|
|
1622
1626
|
aria-describedby={this.getErrorId()}
|
|
1623
|
-
aria-expanded={this.getIsOpen()}
|
|
1624
|
-
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1625
|
-
role="combobox"
|
|
1626
1627
|
autoComplete="off"
|
|
1627
1628
|
className="slds-combobox__input"
|
|
1628
1629
|
containerProps={{
|
|
@@ -1648,6 +1649,7 @@ class Combobox extends React.Component {
|
|
|
1648
1649
|
placeholder={labels.placeholderReadOnly}
|
|
1649
1650
|
readOnly
|
|
1650
1651
|
required={props.required}
|
|
1652
|
+
role="textbox"
|
|
1651
1653
|
value={value}
|
|
1652
1654
|
{...userDefinedProps.input}
|
|
1653
1655
|
/>
|
|
@@ -1724,6 +1726,8 @@ class Combobox extends React.Component {
|
|
|
1724
1726
|
)}
|
|
1725
1727
|
// Not in ARIA 1.2 spec, temporary for SLDS styles
|
|
1726
1728
|
role="combobox" // eslint-disable-line jsx-a11y/role-supports-aria-props, jsx-a11y/role-has-required-aria-props
|
|
1729
|
+
aria-expanded={this.getIsOpen()}
|
|
1730
|
+
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1727
1731
|
>
|
|
1728
1732
|
<InnerInput
|
|
1729
1733
|
defaultValue={props.defaultValue}
|
|
@@ -1739,9 +1743,6 @@ class Combobox extends React.Component {
|
|
|
1739
1743
|
: null
|
|
1740
1744
|
}
|
|
1741
1745
|
aria-describedby={this.getErrorId()}
|
|
1742
|
-
aria-expanded={this.getIsOpen()}
|
|
1743
|
-
aria-haspopup="listbox" // eslint-disable-line jsx-a11y/aria-proptypes
|
|
1744
|
-
role="combobox"
|
|
1745
1746
|
autoComplete="off"
|
|
1746
1747
|
className="slds-combobox__input"
|
|
1747
1748
|
containerProps={{
|
|
@@ -1768,6 +1769,7 @@ class Combobox extends React.Component {
|
|
|
1768
1769
|
placeholder={labels.placeholderReadOnly}
|
|
1769
1770
|
readOnly
|
|
1770
1771
|
required={props.required}
|
|
1772
|
+
role="textbox"
|
|
1771
1773
|
value={inputValue}
|
|
1772
1774
|
{...userDefinedProps.input}
|
|
1773
1775
|
/>
|
|
@@ -5882,7 +5882,7 @@
|
|
|
5882
5882
|
"required": false,
|
|
5883
5883
|
"description": "Object with properties to be used in case of resizable: true\n\nresizeMode: It is used to set how the resize method works. Those are the possible values: 'fit', 'flex' and 'overflow'\nonResize: Callback function to be fired when the user has ended dragging a column\n`@salesforce/design-system-react/assets/styles/table.css` to be loaded. This prop is in prototype` state. a) It may change within a minor release. (b) Web Content Accessibility Guidelines may not be met. (c) CSS imports may be required.",
|
|
5884
5884
|
"defaultValue": {
|
|
5885
|
-
"value": "{\n\tresizeMode: '
|
|
5885
|
+
"value": "{\n\tresizeMode: 'fit',\n\tdraggingClass: 'slds-table-column-resizer',\n}",
|
|
5886
5886
|
"computed": false
|
|
5887
5887
|
}
|
|
5888
5888
|
}
|