@khanacademy/wonder-blocks-search-field 2.2.19 → 2.2.20
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/CHANGELOG.md +13 -0
- package/dist/es/index.js +2 -28
- package/dist/index.js +20 -44
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-search-field
|
|
2
2
|
|
|
3
|
+
## 2.2.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 559e82d5: Update to build tooling, generating smaller output
|
|
8
|
+
- Updated dependencies [559e82d5]
|
|
9
|
+
- @khanacademy/wonder-blocks-core@6.4.3
|
|
10
|
+
- @khanacademy/wonder-blocks-form@4.7.5
|
|
11
|
+
- @khanacademy/wonder-blocks-icon@4.1.3
|
|
12
|
+
- @khanacademy/wonder-blocks-icon-button@5.3.3
|
|
13
|
+
- @khanacademy/wonder-blocks-tokens@1.3.1
|
|
14
|
+
- @khanacademy/wonder-blocks-typography@2.1.14
|
|
15
|
+
|
|
3
16
|
## 2.2.19
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose';
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { StyleSheet } from 'aphrodite';
|
|
3
5
|
import xIcon from '@phosphor-icons/core/regular/x.svg';
|
|
@@ -9,34 +11,6 @@ import { TextField } from '@khanacademy/wonder-blocks-form';
|
|
|
9
11
|
import { PhosphorIcon } from '@khanacademy/wonder-blocks-icon';
|
|
10
12
|
import { color, spacing } from '@khanacademy/wonder-blocks-tokens';
|
|
11
13
|
|
|
12
|
-
function _extends() {
|
|
13
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
15
|
-
var source = arguments[i];
|
|
16
|
-
for (var key in source) {
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18
|
-
target[key] = source[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
return _extends.apply(this, arguments);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
28
|
-
if (source == null) return {};
|
|
29
|
-
var target = {};
|
|
30
|
-
var sourceKeys = Object.keys(source);
|
|
31
|
-
var key, i;
|
|
32
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
33
|
-
key = sourceKeys[i];
|
|
34
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
35
|
-
target[key] = source[key];
|
|
36
|
-
}
|
|
37
|
-
return target;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
14
|
const defaultLabels = {
|
|
41
15
|
clearSearch: "Clear search"
|
|
42
16
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
4
|
+
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
|
|
3
5
|
var React = require('react');
|
|
4
6
|
var aphrodite = require('aphrodite');
|
|
5
7
|
var xIcon = require('@phosphor-icons/core/regular/x.svg');
|
|
@@ -14,56 +16,30 @@ var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
|
14
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
17
|
|
|
16
18
|
function _interopNamespace(e) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
26
30
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
n["default"] = e;
|
|
31
|
-
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
n["default"] = e;
|
|
33
|
+
return Object.freeze(n);
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
37
|
+
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
|
|
34
38
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
39
|
var xIcon__default = /*#__PURE__*/_interopDefaultLegacy(xIcon);
|
|
36
40
|
var magnifyingGlassIcon__default = /*#__PURE__*/_interopDefaultLegacy(magnifyingGlassIcon);
|
|
37
41
|
var IconButton__default = /*#__PURE__*/_interopDefaultLegacy(IconButton);
|
|
38
42
|
|
|
39
|
-
function _extends() {
|
|
40
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
41
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = arguments[i];
|
|
43
|
-
for (var key in source) {
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
45
|
-
target[key] = source[key];
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return target;
|
|
50
|
-
};
|
|
51
|
-
return _extends.apply(this, arguments);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
55
|
-
if (source == null) return {};
|
|
56
|
-
var target = {};
|
|
57
|
-
var sourceKeys = Object.keys(source);
|
|
58
|
-
var key, i;
|
|
59
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
60
|
-
key = sourceKeys[i];
|
|
61
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
62
|
-
target[key] = source[key];
|
|
63
|
-
}
|
|
64
|
-
return target;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
43
|
const defaultLabels = {
|
|
68
44
|
clearSearch: "Clear search"
|
|
69
45
|
};
|
|
@@ -85,7 +61,7 @@ const SearchField = React__namespace.forwardRef(function SearchField(props, ref)
|
|
|
85
61
|
onFocus,
|
|
86
62
|
onBlur
|
|
87
63
|
} = props,
|
|
88
|
-
otherProps =
|
|
64
|
+
otherProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded);
|
|
89
65
|
const innerRef = React__namespace.useRef(null);
|
|
90
66
|
const handleClear = () => {
|
|
91
67
|
var _innerRef$current;
|
|
@@ -116,7 +92,7 @@ const SearchField = React__namespace.forwardRef(function SearchField(props, ref)
|
|
|
116
92
|
color: wonderBlocksTokens.color.offBlack64,
|
|
117
93
|
style: styles.searchIcon,
|
|
118
94
|
"aria-hidden": "true"
|
|
119
|
-
}), React__namespace.createElement(wonderBlocksForm.TextField,
|
|
95
|
+
}), React__namespace.createElement(wonderBlocksForm.TextField, _extends__default["default"]({
|
|
120
96
|
id: `${uniqueId}-field`,
|
|
121
97
|
type: "text",
|
|
122
98
|
autoFocus: autoFocus,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-search-field",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.20",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Search Field components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.18.6",
|
|
19
|
-
"@khanacademy/wonder-blocks-core": "^6.4.
|
|
20
|
-
"@khanacademy/wonder-blocks-form": "^4.7.
|
|
21
|
-
"@khanacademy/wonder-blocks-icon": "^4.1.
|
|
22
|
-
"@khanacademy/wonder-blocks-icon-button": "^5.3.
|
|
23
|
-
"@khanacademy/wonder-blocks-tokens": "^1.3.
|
|
24
|
-
"@khanacademy/wonder-blocks-typography": "^2.1.
|
|
19
|
+
"@khanacademy/wonder-blocks-core": "^6.4.3",
|
|
20
|
+
"@khanacademy/wonder-blocks-form": "^4.7.5",
|
|
21
|
+
"@khanacademy/wonder-blocks-icon": "^4.1.3",
|
|
22
|
+
"@khanacademy/wonder-blocks-icon-button": "^5.3.3",
|
|
23
|
+
"@khanacademy/wonder-blocks-tokens": "^1.3.1",
|
|
24
|
+
"@khanacademy/wonder-blocks-typography": "^2.1.14"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@phosphor-icons/core": "^2.0.2",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"react": "16.14.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@khanacademy/wb-dev-build-settings": "^1.0.
|
|
32
|
+
"@khanacademy/wb-dev-build-settings": "^1.0.1"
|
|
33
33
|
}
|
|
34
34
|
}
|