@instructure/ui-selectable 8.18.0 → 8.18.1-snapshot.0
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/LICENSE.md +27 -0
- package/es/Selectable/index.js +9 -9
- package/lib/Selectable/index.js +9 -9
- package/package.json +11 -10
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The MIT License (MIT)
|
|
3
|
+
category: Getting Started
|
|
4
|
+
order: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The MIT License (MIT)
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
+
|
|
11
|
+
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions.**
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
package/es/Selectable/index.js
CHANGED
|
@@ -71,7 +71,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
71
71
|
event.preventDefault();
|
|
72
72
|
|
|
73
73
|
if (isShowingOptions) {
|
|
74
|
-
onRequestHideOptions
|
|
74
|
+
onRequestHideOptions === null || onRequestHideOptions === void 0 ? void 0 : onRequestHideOptions(event);
|
|
75
75
|
} else {
|
|
76
76
|
if (!isActiveElement(this._trigger)) {
|
|
77
77
|
;
|
|
@@ -79,7 +79,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
79
79
|
this._trigger.focus();
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
onRequestShowOptions
|
|
82
|
+
onRequestShowOptions === null || onRequestShowOptions === void 0 ? void 0 : onRequestShowOptions(event);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -106,7 +106,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
106
106
|
if (highlightedOptionId) {
|
|
107
107
|
// select highlighted option
|
|
108
108
|
event.preventDefault();
|
|
109
|
-
onRequestSelectOption
|
|
109
|
+
onRequestSelectOption === null || onRequestSelectOption === void 0 ? void 0 : onRequestSelectOption(event, {
|
|
110
110
|
id: highlightedOptionId
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -118,7 +118,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
118
118
|
|
|
119
119
|
if (isShowingOptions) {
|
|
120
120
|
// if options showing, change highlight
|
|
121
|
-
onRequestHighlightOption
|
|
121
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
122
122
|
direction: 1
|
|
123
123
|
});
|
|
124
124
|
} else {
|
|
@@ -133,7 +133,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
133
133
|
|
|
134
134
|
if (isShowingOptions) {
|
|
135
135
|
// if options showing, change highlight
|
|
136
|
-
onRequestHighlightOption
|
|
136
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
137
137
|
direction: -1
|
|
138
138
|
});
|
|
139
139
|
} else {
|
|
@@ -147,7 +147,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
147
147
|
if (isShowingOptions) {
|
|
148
148
|
// if options showing, highlight first option
|
|
149
149
|
event.preventDefault();
|
|
150
|
-
onRequestHighlightFirstOption
|
|
150
|
+
onRequestHighlightFirstOption === null || onRequestHighlightFirstOption === void 0 ? void 0 : onRequestHighlightFirstOption(event);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
break;
|
|
@@ -156,7 +156,7 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
156
156
|
if (isShowingOptions) {
|
|
157
157
|
// if options showing, highlight last option
|
|
158
158
|
event.preventDefault();
|
|
159
|
-
onRequestHighlightLastOption
|
|
159
|
+
onRequestHighlightLastOption === null || onRequestHighlightLastOption === void 0 ? void 0 : onRequestHighlightLastOption(event);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
break;
|
|
@@ -280,12 +280,12 @@ let Selectable = (_dec = withDeterministicId(), _dec(_class = (_temp = _class2 =
|
|
|
280
280
|
role: 'option',
|
|
281
281
|
'aria-selected': _this.isSelectedOption(id) ? 'true' : 'false',
|
|
282
282
|
onClick: createChainedFunction(event => {
|
|
283
|
-
onRequestSelectOption
|
|
283
|
+
onRequestSelectOption === null || onRequestSelectOption === void 0 ? void 0 : onRequestSelectOption(event, {
|
|
284
284
|
id
|
|
285
285
|
});
|
|
286
286
|
}, onClick),
|
|
287
287
|
onMouseOver: createChainedFunction(event => {
|
|
288
|
-
onRequestHighlightOption
|
|
288
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
289
289
|
id
|
|
290
290
|
});
|
|
291
291
|
}, onMouseOver),
|
package/lib/Selectable/index.js
CHANGED
|
@@ -64,7 +64,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
64
64
|
event.preventDefault();
|
|
65
65
|
|
|
66
66
|
if (isShowingOptions) {
|
|
67
|
-
onRequestHideOptions
|
|
67
|
+
onRequestHideOptions === null || onRequestHideOptions === void 0 ? void 0 : onRequestHideOptions(event);
|
|
68
68
|
} else {
|
|
69
69
|
if (!(0, _isActiveElement.isActiveElement)(this._trigger)) {
|
|
70
70
|
;
|
|
@@ -72,7 +72,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
72
72
|
this._trigger.focus();
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
onRequestShowOptions
|
|
75
|
+
onRequestShowOptions === null || onRequestShowOptions === void 0 ? void 0 : onRequestShowOptions(event);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
|
|
@@ -99,7 +99,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
99
99
|
if (highlightedOptionId) {
|
|
100
100
|
// select highlighted option
|
|
101
101
|
event.preventDefault();
|
|
102
|
-
onRequestSelectOption
|
|
102
|
+
onRequestSelectOption === null || onRequestSelectOption === void 0 ? void 0 : onRequestSelectOption(event, {
|
|
103
103
|
id: highlightedOptionId
|
|
104
104
|
});
|
|
105
105
|
}
|
|
@@ -111,7 +111,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
111
111
|
|
|
112
112
|
if (isShowingOptions) {
|
|
113
113
|
// if options showing, change highlight
|
|
114
|
-
onRequestHighlightOption
|
|
114
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
115
115
|
direction: 1
|
|
116
116
|
});
|
|
117
117
|
} else {
|
|
@@ -126,7 +126,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
126
126
|
|
|
127
127
|
if (isShowingOptions) {
|
|
128
128
|
// if options showing, change highlight
|
|
129
|
-
onRequestHighlightOption
|
|
129
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
130
130
|
direction: -1
|
|
131
131
|
});
|
|
132
132
|
} else {
|
|
@@ -140,7 +140,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
140
140
|
if (isShowingOptions) {
|
|
141
141
|
// if options showing, highlight first option
|
|
142
142
|
event.preventDefault();
|
|
143
|
-
onRequestHighlightFirstOption
|
|
143
|
+
onRequestHighlightFirstOption === null || onRequestHighlightFirstOption === void 0 ? void 0 : onRequestHighlightFirstOption(event);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
break;
|
|
@@ -149,7 +149,7 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
149
149
|
if (isShowingOptions) {
|
|
150
150
|
// if options showing, highlight last option
|
|
151
151
|
event.preventDefault();
|
|
152
|
-
onRequestHighlightLastOption
|
|
152
|
+
onRequestHighlightLastOption === null || onRequestHighlightLastOption === void 0 ? void 0 : onRequestHighlightLastOption(event);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
break;
|
|
@@ -273,12 +273,12 @@ let Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
|
|
|
273
273
|
role: 'option',
|
|
274
274
|
'aria-selected': _this.isSelectedOption(id) ? 'true' : 'false',
|
|
275
275
|
onClick: (0, _createChainedFunction.createChainedFunction)(event => {
|
|
276
|
-
onRequestSelectOption
|
|
276
|
+
onRequestSelectOption === null || onRequestSelectOption === void 0 ? void 0 : onRequestSelectOption(event, {
|
|
277
277
|
id
|
|
278
278
|
});
|
|
279
279
|
}, onClick),
|
|
280
280
|
onMouseOver: (0, _createChainedFunction.createChainedFunction)(event => {
|
|
281
|
-
onRequestHighlightOption
|
|
281
|
+
onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
|
|
282
282
|
id
|
|
283
283
|
});
|
|
284
284
|
}, onMouseOver),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-selectable",
|
|
3
|
-
"version": "8.18.0",
|
|
3
|
+
"version": "8.18.1-snapshot.0+435c9ae79",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.18.0",
|
|
28
|
-
"@instructure/ui-test-utils": "8.18.0"
|
|
27
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.0+435c9ae79",
|
|
28
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.0+435c9ae79"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.13.10",
|
|
32
|
-
"@instructure/console": "8.18.0",
|
|
33
|
-
"@instructure/shared-types": "8.18.0",
|
|
34
|
-
"@instructure/ui-dom-utils": "8.18.0",
|
|
35
|
-
"@instructure/ui-react-utils": "8.18.0",
|
|
36
|
-
"@instructure/ui-testable": "8.18.0",
|
|
37
|
-
"@instructure/ui-utils": "8.18.0",
|
|
32
|
+
"@instructure/console": "8.18.1-snapshot.0+435c9ae79",
|
|
33
|
+
"@instructure/shared-types": "8.18.1-snapshot.0+435c9ae79",
|
|
34
|
+
"@instructure/ui-dom-utils": "8.18.1-snapshot.0+435c9ae79",
|
|
35
|
+
"@instructure/ui-react-utils": "8.18.1-snapshot.0+435c9ae79",
|
|
36
|
+
"@instructure/ui-testable": "8.18.1-snapshot.0+435c9ae79",
|
|
37
|
+
"@instructure/ui-utils": "8.18.1-snapshot.0+435c9ae79",
|
|
38
38
|
"keycode": "^2",
|
|
39
39
|
"prop-types": "^15"
|
|
40
40
|
},
|
|
@@ -44,5 +44,6 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"sideEffects": false
|
|
47
|
+
"sideEffects": false,
|
|
48
|
+
"gitHead": "435c9ae794c15e2bd103f700f8c4e946d91c1b59"
|
|
48
49
|
}
|