@khanacademy/wonder-blocks-cell 4.0.8 → 4.1.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/CHANGELOG.md +442 -421
- package/LICENSE +21 -0
- package/dist/es/index.js +14 -13
- package/dist/index.js +22 -29
- package/package.json +12 -13
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Khan Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/es/index.js
CHANGED
|
@@ -125,19 +125,20 @@ const CellCore = props => {
|
|
|
125
125
|
rootStyle
|
|
126
126
|
} = props;
|
|
127
127
|
if (onClick || href) {
|
|
128
|
-
return React.createElement(Clickable, {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
128
|
+
return (React.createElement(Clickable, {
|
|
129
|
+
disabled: disabled,
|
|
130
|
+
onClick: onClick,
|
|
131
|
+
href: href,
|
|
132
|
+
hideDefaultFocusRing: true,
|
|
133
|
+
"aria-label": ariaLabel ? ariaLabel : undefined,
|
|
134
|
+
"aria-selected": ariaSelected ? ariaSelected : undefined,
|
|
135
|
+
"aria-checked": ariaChecked,
|
|
136
|
+
role: role,
|
|
137
|
+
target: target,
|
|
138
|
+
style: [styles$1.wrapper, styles$1.clickable, rootStyle, active && styles$1.active, disabled && styles$1.disabled],
|
|
139
|
+
"aria-current": active ? "true" : undefined
|
|
140
|
+
}, () => React.createElement(CellInner, props))
|
|
141
|
+
);
|
|
141
142
|
}
|
|
142
143
|
return React.createElement(View, {
|
|
143
144
|
style: [styles$1.wrapper, rootStyle, active && styles$1.active],
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var wonderBlocksTypography = require('@khanacademy/wonder-blocks-typography');
|
|
@@ -12,10 +10,7 @@ var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
|
|
|
12
10
|
var wonderBlocksLayout = require('@khanacademy/wonder-blocks-layout');
|
|
13
11
|
var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
14
12
|
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function _interopNamespace(e) {
|
|
18
|
-
if (e && e.__esModule) return e;
|
|
13
|
+
function _interopNamespaceDefault(e) {
|
|
19
14
|
var n = Object.create(null);
|
|
20
15
|
if (e) {
|
|
21
16
|
Object.keys(e).forEach(function (k) {
|
|
@@ -28,14 +23,11 @@ function _interopNamespace(e) {
|
|
|
28
23
|
}
|
|
29
24
|
});
|
|
30
25
|
}
|
|
31
|
-
n
|
|
26
|
+
n.default = e;
|
|
32
27
|
return Object.freeze(n);
|
|
33
28
|
}
|
|
34
29
|
|
|
35
|
-
var
|
|
36
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
38
|
-
var Clickable__default = /*#__PURE__*/_interopDefaultLegacy(Clickable);
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
39
31
|
|
|
40
32
|
const CellMeasurements = {
|
|
41
33
|
cellMinHeight: wonderBlocksTokens.spacing.xxLarge_48,
|
|
@@ -88,7 +80,7 @@ const LeftAccessory = ({
|
|
|
88
80
|
return null;
|
|
89
81
|
}
|
|
90
82
|
return React__namespace.createElement(React__namespace.Fragment, null, React__namespace.createElement(wonderBlocksCore.View, {
|
|
91
|
-
style: [styles$1.accessory, disabled && styles$1.accessoryDisabled,
|
|
83
|
+
style: [styles$1.accessory, disabled && styles$1.accessoryDisabled, _extends({}, leftAccessoryStyle)]
|
|
92
84
|
}, leftAccessory), React__namespace.createElement(wonderBlocksLayout.Strut, {
|
|
93
85
|
size: CellMeasurements.accessoryHorizontalSpacing
|
|
94
86
|
}));
|
|
@@ -105,7 +97,7 @@ const RightAccessory = ({
|
|
|
105
97
|
return React__namespace.createElement(React__namespace.Fragment, null, React__namespace.createElement(wonderBlocksLayout.Strut, {
|
|
106
98
|
size: CellMeasurements.accessoryHorizontalSpacing
|
|
107
99
|
}), React__namespace.createElement(wonderBlocksCore.View, {
|
|
108
|
-
style: [styles$1.accessory, styles$1.accessoryRight, disabled && styles$1.accessoryDisabled,
|
|
100
|
+
style: [styles$1.accessory, styles$1.accessoryRight, disabled && styles$1.accessoryDisabled, _extends({}, rightAccessoryStyle), active && styles$1.accessoryActive]
|
|
109
101
|
}, rightAccessory));
|
|
110
102
|
};
|
|
111
103
|
function CellInner(props) {
|
|
@@ -154,19 +146,20 @@ const CellCore = props => {
|
|
|
154
146
|
rootStyle
|
|
155
147
|
} = props;
|
|
156
148
|
if (onClick || href) {
|
|
157
|
-
return React__namespace.createElement(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
149
|
+
return (React__namespace.createElement(Clickable, {
|
|
150
|
+
disabled: disabled,
|
|
151
|
+
onClick: onClick,
|
|
152
|
+
href: href,
|
|
153
|
+
hideDefaultFocusRing: true,
|
|
154
|
+
"aria-label": ariaLabel ? ariaLabel : undefined,
|
|
155
|
+
"aria-selected": ariaSelected ? ariaSelected : undefined,
|
|
156
|
+
"aria-checked": ariaChecked,
|
|
157
|
+
role: role,
|
|
158
|
+
target: target,
|
|
159
|
+
style: [styles$1.wrapper, styles$1.clickable, rootStyle, active && styles$1.active, disabled && styles$1.disabled],
|
|
160
|
+
"aria-current": active ? "true" : undefined
|
|
161
|
+
}, () => React__namespace.createElement(CellInner, props))
|
|
162
|
+
);
|
|
170
163
|
}
|
|
171
164
|
return React__namespace.createElement(wonderBlocksCore.View, {
|
|
172
165
|
style: [styles$1.wrapper, rootStyle, active && styles$1.active],
|
|
@@ -263,7 +256,7 @@ const CompactCell = function CompactCell(props) {
|
|
|
263
256
|
const {
|
|
264
257
|
title
|
|
265
258
|
} = props,
|
|
266
|
-
coreProps =
|
|
259
|
+
coreProps = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
267
260
|
return React__namespace.createElement(CellCore, coreProps, typeof title === "string" ? React__namespace.createElement(wonderBlocksTypography.LabelMedium, null, title) : title);
|
|
268
261
|
};
|
|
269
262
|
|
|
@@ -288,8 +281,8 @@ const DetailCell = function DetailCell(props) {
|
|
|
288
281
|
subtitle1,
|
|
289
282
|
subtitle2
|
|
290
283
|
} = props,
|
|
291
|
-
coreProps =
|
|
292
|
-
return React__namespace.createElement(CellCore,
|
|
284
|
+
coreProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
285
|
+
return React__namespace.createElement(CellCore, _extends({}, coreProps, {
|
|
293
286
|
innerStyle: styles.innerWrapper
|
|
294
287
|
}), React__namespace.createElement(Subtitle, {
|
|
295
288
|
subtitle: subtitle1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-cell",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,25 +9,24 @@
|
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"module": "dist/es/index.js",
|
|
11
11
|
"types": "dist/index.d.ts",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"prepublishOnly": "../../utils/publish/package-pre-publish-check.sh"
|
|
15
|
-
},
|
|
16
12
|
"dependencies": {
|
|
17
|
-
"@babel/runtime": "^7.
|
|
18
|
-
"@khanacademy/wonder-blocks-clickable": "
|
|
19
|
-
"@khanacademy/wonder-blocks-core": "
|
|
20
|
-
"@khanacademy/wonder-blocks-layout": "
|
|
21
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
22
|
-
"@khanacademy/wonder-blocks-typography": "
|
|
13
|
+
"@babel/runtime": "^7.24.5",
|
|
14
|
+
"@khanacademy/wonder-blocks-clickable": "6.1.0",
|
|
15
|
+
"@khanacademy/wonder-blocks-core": "12.1.0",
|
|
16
|
+
"@khanacademy/wonder-blocks-layout": "3.1.0",
|
|
17
|
+
"@khanacademy/wonder-blocks-tokens": "4.2.0",
|
|
18
|
+
"@khanacademy/wonder-blocks-typography": "3.1.0"
|
|
23
19
|
},
|
|
24
20
|
"peerDependencies": {
|
|
25
21
|
"aphrodite": "^1.2.5",
|
|
26
22
|
"react": "18.2.0"
|
|
27
23
|
},
|
|
28
24
|
"devDependencies": {
|
|
29
|
-
"@khanacademy/wb-dev-build-settings": "
|
|
25
|
+
"@khanacademy/wb-dev-build-settings": "2.1.0"
|
|
30
26
|
},
|
|
31
27
|
"author": "",
|
|
32
|
-
"license": "MIT"
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
|
+
}
|
|
33
32
|
}
|