@khanacademy/wonder-blocks-cell 4.0.7 → 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/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
- 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));
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
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["default"] = e;
26
+ n.default = e;
32
27
  return Object.freeze(n);
33
28
  }
34
29
 
35
- var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
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, _extends__default["default"]({}, leftAccessoryStyle)]
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, _extends__default["default"]({}, rightAccessoryStyle), active && styles$1.accessoryActive]
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(Clickable__default["default"], {
158
- disabled: disabled,
159
- onClick: onClick,
160
- href: href,
161
- hideDefaultFocusRing: true,
162
- "aria-label": ariaLabel ? ariaLabel : undefined,
163
- "aria-selected": ariaSelected ? ariaSelected : undefined,
164
- "aria-checked": ariaChecked,
165
- role: role,
166
- target: target,
167
- style: [styles$1.wrapper, styles$1.clickable, rootStyle, active && styles$1.active, disabled && styles$1.disabled],
168
- "aria-current": active ? "true" : undefined
169
- }, () => React__namespace.createElement(CellInner, props));
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 = _objectWithoutPropertiesLoose__default["default"](props, _excluded$1);
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 = _objectWithoutPropertiesLoose__default["default"](props, _excluded);
292
- return React__namespace.createElement(CellCore, _extends__default["default"]({}, coreProps, {
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.7",
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.6",
18
- "@khanacademy/wonder-blocks-clickable": "^5.0.7",
19
- "@khanacademy/wonder-blocks-core": "^11.1.0",
20
- "@khanacademy/wonder-blocks-layout": "^3.0.7",
21
- "@khanacademy/wonder-blocks-tokens": "^4.1.0",
22
- "@khanacademy/wonder-blocks-typography": "^3.0.5"
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": "^2.0.0"
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
  }