@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.
- package/components/combobox/combobox.d.ts +3 -0
- package/components/combobox/combobox.jsx +4 -1
- package/components/component-docs.json +6 -3
- package/components/data-table/index.jsx +6 -2
- package/components/modal/__tests__/modal.browser-test.jsx +5 -0
- package/components/modal/index.jsx +2 -2
- package/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/components/pill-container/private/selected-listbox.jsx +1 -0
- package/components/popover/__tests__/popover.browser-test.jsx +28 -0
- package/components/progress-indicator.d.ts +29 -8
- package/components/slider.d.ts +10 -4
- package/design-system-react-components.js +62406 -0
- package/design-system-react-components.js.map +1 -0
- package/design-system-react-components.min.js +3 -0
- package/design-system-react-components.min.js.LICENSE.txt +83 -0
- package/design-system-react-components.min.js.map +1 -0
- package/design-system-react.js +73800 -0
- package/design-system-react.js.map +1 -0
- package/design-system-react.min.js +3 -0
- package/design-system-react.min.js.LICENSE.txt +83 -0
- package/design-system-react.min.js.map +1 -0
- package/lib/components/combobox/combobox.d.ts +3 -0
- package/lib/components/combobox/combobox.js +4 -1
- package/lib/components/component-docs.json +6 -3
- package/lib/components/data-table/index.js +7 -3
- package/lib/components/modal/__tests__/modal.browser-test.jsx +5 -0
- package/lib/components/modal/index.js +1 -1
- package/lib/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/lib/components/pill-container/private/selected-listbox.js +3 -0
- package/lib/components/popover/__tests__/popover.browser-test.jsx +28 -0
- package/lib/components/progress-indicator.d.ts +29 -8
- package/lib/components/slider.d.ts +10 -4
- package/lib/design-system-react-components.min.js.LICENSE.txt +83 -0
- package/lib/design-system-react.min.js.LICENSE.txt +83 -0
- package/lib/package.json +2 -2
- package/lib/utilities/keyboard-navigable-dialog.js +6 -1
- package/module/components/combobox/combobox.d.ts +3 -0
- package/module/components/combobox/combobox.js +4 -1
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +6 -3
- package/module/components/data-table/index.js +7 -3
- package/module/components/data-table/index.js.map +1 -1
- package/module/components/modal/__tests__/modal.browser-test.js +4 -0
- package/module/components/modal/__tests__/modal.browser-test.js.map +1 -1
- package/module/components/modal/index.js +1 -1
- package/module/components/modal/index.js.map +1 -1
- package/module/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/module/components/pill-container/private/selected-listbox.js +3 -0
- package/module/components/pill-container/private/selected-listbox.js.map +1 -1
- package/module/components/popover/__tests__/popover.browser-test.js +25 -0
- package/module/components/popover/__tests__/popover.browser-test.js.map +1 -1
- package/module/components/progress-indicator.d.ts +29 -8
- package/module/components/slider.d.ts +10 -4
- package/module/utilities/keyboard-navigable-dialog.js +4 -1
- package/module/utilities/keyboard-navigable-dialog.js.map +1 -1
- package/package.json +2 -2
- package/utilities/keyboard-navigable-dialog.js +3 -0
|
@@ -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:
|
|
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?: (
|
|
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:
|
|
65
|
+
* This event fires when the value is committed. This callback recieves the following parameters `event, { value: number }`.
|
|
63
66
|
*/
|
|
64
|
-
onInput?: (
|
|
67
|
+
onInput?: (
|
|
68
|
+
event: React.ChangeEvent<HTMLInputElement>,
|
|
69
|
+
{ value: number }
|
|
70
|
+
) => void;
|
|
65
71
|
/**
|
|
66
72
|
* Size of the slider.
|
|
67
73
|
*/
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
import ReactDOM from 'react-dom'; // ### Event Helpers
|
|
20
20
|
|
|
21
21
|
import KEYS from './key-code';
|
|
22
|
+
import EventUtil from './event';
|
|
22
23
|
/* eslint-disable react/no-find-dom-node */
|
|
23
24
|
|
|
24
25
|
var internalHandleClick = function internalHandleClick(_ref) {
|
|
@@ -33,7 +34,8 @@ var internalHandleClick = function internalHandleClick(_ref) {
|
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
var KeyboardNavigableDialog = function KeyboardNavigableDialog(_ref2) {
|
|
36
|
-
var
|
|
37
|
+
var event = _ref2.event,
|
|
38
|
+
isOpen = _ref2.isOpen,
|
|
37
39
|
handleClick = _ref2.handleClick,
|
|
38
40
|
keyCode = _ref2.keyCode,
|
|
39
41
|
eventTarget = _ref2.eventTarget,
|
|
@@ -44,6 +46,7 @@ var KeyboardNavigableDialog = function KeyboardNavigableDialog(_ref2) {
|
|
|
44
46
|
case KEYS.ESCAPE:
|
|
45
47
|
if (isOpen) {
|
|
46
48
|
toggleOpen();
|
|
49
|
+
EventUtil.trapEvent(event);
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../.tmp-es/utilities/keyboard-navigable-dialog.js"],"names":["ReactDOM","KEYS","internalHandleClick","trigger","eventTarget","handleClick","findDOMNode","event","KeyboardNavigableDialog","isOpen","keyCode","toggleOpen","ESCAPE","ENTER"],"mappings":"AAAA;;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA,OAAOA,QAAP,MAAqB,WAArB,C,CAEA;;AACA,OAAOC,IAAP,MAAiB,YAAjB;AAEA;;AAEA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,OAA2C;AAAA,MAAxCC,OAAwC,QAAxCA,OAAwC;AAAA,MAA/BC,WAA+B,QAA/BA,WAA+B;AAAA,MAAlBC,WAAkB,QAAlBA,WAAkB;;AACtE,MAAIF,OAAO,
|
|
1
|
+
{"version":3,"sources":["../../.tmp-es/utilities/keyboard-navigable-dialog.js"],"names":["ReactDOM","KEYS","EventUtil","internalHandleClick","trigger","eventTarget","handleClick","findDOMNode","event","KeyboardNavigableDialog","isOpen","keyCode","toggleOpen","ESCAPE","trapEvent","ENTER"],"mappings":"AAAA;;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA,OAAOA,QAAP,MAAqB,WAArB,C,CAEA;;AACA,OAAOC,IAAP,MAAiB,YAAjB;AACA,OAAOC,SAAP,MAAsB,SAAtB;AAEA;;AAEA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,OAA2C;AAAA,MAAxCC,OAAwC,QAAxCA,OAAwC;AAAA,MAA/BC,WAA+B,QAA/BA,WAA+B;AAAA,MAAlBC,WAAkB,QAAlBA,WAAkB;;AACtE,MAAIF,OAAO,IAAIJ,QAAQ,CAACO,WAAT,CAAqBH,OAArB,MAAkCC,WAAjD,EAA8D;AAC7D;AACAC,IAAAA,WAAW,CAACE,KAAD,CAAX;AACA;AACD,CALD;;AAOA,IAAMC,uBAAuB,GAAG,SAA1BA,uBAA0B,QAQ1B;AAAA,MAPLD,KAOK,SAPLA,KAOK;AAAA,MANLE,MAMK,SANLA,MAMK;AAAA,MALLJ,WAKK,SALLA,WAKK;AAAA,MAJLK,OAIK,SAJLA,OAIK;AAAA,MAHLN,WAGK,SAHLA,WAGK;AAAA,MAFLD,OAEK,SAFLA,OAEK;AAAA,MADLQ,UACK,SADLA,UACK;;AACL,UAAQD,OAAR;AACC,SAAKV,IAAI,CAACY,MAAV;AACC,UAAIH,MAAJ,EAAY;AACXE,QAAAA,UAAU;AACVV,QAAAA,SAAS,CAACY,SAAV,CAAoBN,KAApB;AACA;;AACD;;AACD,SAAKP,IAAI,CAACc,KAAV;AACC,UAAI,CAACL,MAAL,EAAa;AACZP,QAAAA,mBAAmB,CAAC;AACnBC,UAAAA,OAAO,EAAPA,OADmB;AAEnBC,UAAAA,WAAW,EAAXA,WAFmB;AAGnBC,UAAAA,WAAW,EAAXA;AAHmB,SAAD,CAAnB;AAKA;;AACD;;AACD;AACC;AAjBF;AAmBA,CA5BD;;AA8BA,eAAeG,uBAAf","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// # Assistive Technology / Keyboard Navigable Trait for Dialogs with Tabbable content\n\n/*\n * Guidelines for Popover\n *\n * - Focus is trapped. Tabbing to an index outside of the dialog is not allowed. Popover must be closed first via ESC.\n * - There should always be a focusable element inside, to place user focus on such as a close button\n * - Must be dismissible via ESC and a close button\n * - Uses tabIndex in wrapper and has tabbable items within it despite being outside document flow.\n * - Entire popover receives focus when opened and has a aria-labelledby that points to the header id, so it will read the heading,\n * - Must return focus to trigger after closing.\n * - F6 will allow the user to keep popover open and go back to tabbing in “app-context” instead of “dialog-context.” (not implemented, yet)\n */\n\n// ## Dependencies\n\n// ### React\nimport ReactDOM from 'react-dom';\n\n// ### Event Helpers\nimport KEYS from './key-code';\nimport EventUtil from './event';\n\n/* eslint-disable react/no-find-dom-node */\n\nconst internalHandleClick = ({ trigger, eventTarget, handleClick }) => {\n\tif (trigger && ReactDOM.findDOMNode(trigger) === eventTarget) {\n\t\t// eslint-disable-line react/no-find-dom-node\n\t\thandleClick(event);\n\t}\n};\n\nconst KeyboardNavigableDialog = ({\n\tevent,\n\tisOpen,\n\thandleClick,\n\tkeyCode,\n\teventTarget,\n\ttrigger,\n\ttoggleOpen,\n}) => {\n\tswitch (keyCode) {\n\t\tcase KEYS.ESCAPE:\n\t\t\tif (isOpen) {\n\t\t\t\ttoggleOpen();\n\t\t\t\tEventUtil.trapEvent(event);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase KEYS.ENTER:\n\t\t\tif (!isOpen) {\n\t\t\t\tinternalHandleClick({\n\t\t\t\t\ttrigger,\n\t\t\t\t\teventTarget,\n\t\t\t\t\thandleClick,\n\t\t\t\t});\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n};\n\nexport default KeyboardNavigableDialog;\n"],"file":"keyboard-navigable-dialog.js"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/design-system-react",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.48",
|
|
4
4
|
"description": "Salesforce Lightning Design System for React",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
6
|
"engines": {},
|
|
7
7
|
"husky": {
|
|
8
8
|
"hooks": {
|
|
@@ -22,6 +22,7 @@ import ReactDOM from 'react-dom';
|
|
|
22
22
|
|
|
23
23
|
// ### Event Helpers
|
|
24
24
|
import KEYS from './key-code';
|
|
25
|
+
import EventUtil from './event';
|
|
25
26
|
|
|
26
27
|
/* eslint-disable react/no-find-dom-node */
|
|
27
28
|
|
|
@@ -33,6 +34,7 @@ const internalHandleClick = ({ trigger, eventTarget, handleClick }) => {
|
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
const KeyboardNavigableDialog = ({
|
|
37
|
+
event,
|
|
36
38
|
isOpen,
|
|
37
39
|
handleClick,
|
|
38
40
|
keyCode,
|
|
@@ -44,6 +46,7 @@ const KeyboardNavigableDialog = ({
|
|
|
44
46
|
case KEYS.ESCAPE:
|
|
45
47
|
if (isOpen) {
|
|
46
48
|
toggleOpen();
|
|
49
|
+
EventUtil.trapEvent(event);
|
|
47
50
|
}
|
|
48
51
|
break;
|
|
49
52
|
case KEYS.ENTER:
|