@khanacademy/wonder-blocks-link 4.0.5 → 4.0.7

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @khanacademy/wonder-blocks-link
2
2
 
3
+ ## 4.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - @khanacademy/wonder-blocks-clickable@3.0.7
8
+
9
+ ## 4.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - c20f48f3: Don't transpile classes when building bundles
14
+ - Updated dependencies [c20f48f3]
15
+ - @khanacademy/wonder-blocks-clickable@3.0.6
16
+ - @khanacademy/wonder-blocks-core@5.0.4
17
+
3
18
  ## 4.0.5
4
19
 
5
20
  ### Patch Changes
@@ -13,7 +13,7 @@ export type SharedProps = {|
13
13
  /**
14
14
  * Text to appear on the link. It can be a plain text or a Typography element.
15
15
  */
16
- children: string | React.Element<React.ElementProps<Typography>>,
16
+ children: string | React.Element<Typography>,
17
17
 
18
18
  /**
19
19
  * URL to navigate to.
package/dist/es/index.js CHANGED
@@ -38,30 +38,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
38
38
  return target;
39
39
  }
40
40
 
41
- function _setPrototypeOf(o, p) {
42
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
43
- o.__proto__ = p;
44
- return o;
45
- };
46
- return _setPrototypeOf(o, p);
47
- }
48
-
49
- function _inheritsLoose(subClass, superClass) {
50
- subClass.prototype = Object.create(superClass.prototype);
51
- subClass.prototype.constructor = subClass;
52
- _setPrototypeOf(subClass, superClass);
53
- }
54
-
55
41
  const _excluded$1 = ["children", "skipClientNav", "focused", "hovered", "href", "inline", "kind", "light", "visitable", "pressed", "style", "testId", "waiting"];
56
42
  const StyledAnchor = addStyle("a");
57
43
  const StyledLink = addStyle(Link$1);
58
- let LinkCore = function (_React$Component) {
59
- _inheritsLoose(LinkCore, _React$Component);
60
- function LinkCore() {
61
- return _React$Component.apply(this, arguments) || this;
62
- }
63
- var _proto = LinkCore.prototype;
64
- _proto.renderInner = function renderInner(router) {
44
+ class LinkCore extends React.Component {
45
+ renderInner(router) {
65
46
  const _this$props = this.props,
66
47
  {
67
48
  children,
@@ -90,12 +71,11 @@ let LinkCore = function (_React$Component) {
90
71
  }), children) : React.createElement(StyledAnchor, _extends({}, commonProps, {
91
72
  href: href
92
73
  }), children);
93
- };
94
- _proto.render = function render() {
74
+ }
75
+ render() {
95
76
  return React.createElement(__RouterContext.Consumer, null, router => this.renderInner(router));
96
- };
97
- return LinkCore;
98
- }(React.Component);
77
+ }
78
+ }
99
79
  const styles = {};
100
80
  const sharedStyles = StyleSheet.create({
101
81
  shared: {
@@ -172,13 +152,8 @@ const _generateStyles = (inline, kind, light, visitable) => {
172
152
  };
173
153
 
174
154
  const _excluded = ["onClick", "beforeNav", "safeWithNav", "href", "skipClientNav", "children", "tabIndex", "onKeyDown", "onKeyUp", "target"];
175
- let Link = function (_React$Component) {
176
- _inheritsLoose(Link, _React$Component);
177
- function Link() {
178
- return _React$Component.apply(this, arguments) || this;
179
- }
180
- var _proto = Link.prototype;
181
- _proto.renderClickableBehavior = function renderClickableBehavior(router) {
155
+ class Link extends React.Component {
156
+ renderClickableBehavior(router) {
182
157
  const _this$props = this.props,
183
158
  {
184
159
  onClick,
@@ -233,12 +208,11 @@ let Link = function (_React$Component) {
233
208
  }), children);
234
209
  });
235
210
  }
236
- };
237
- _proto.render = function render() {
211
+ }
212
+ render() {
238
213
  return React.createElement(__RouterContext.Consumer, null, router => this.renderClickableBehavior(router));
239
- };
240
- return Link;
241
- }(React.Component);
214
+ }
215
+ }
242
216
  Link.defaultProps = {
243
217
  inline: false,
244
218
  kind: "primary",
package/dist/index.js CHANGED
@@ -63,30 +63,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
63
63
  return target;
64
64
  }
65
65
 
66
- function _setPrototypeOf(o, p) {
67
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
68
- o.__proto__ = p;
69
- return o;
70
- };
71
- return _setPrototypeOf(o, p);
72
- }
73
-
74
- function _inheritsLoose(subClass, superClass) {
75
- subClass.prototype = Object.create(superClass.prototype);
76
- subClass.prototype.constructor = subClass;
77
- _setPrototypeOf(subClass, superClass);
78
- }
79
-
80
66
  const _excluded$1 = ["children", "skipClientNav", "focused", "hovered", "href", "inline", "kind", "light", "visitable", "pressed", "style", "testId", "waiting"];
81
67
  const StyledAnchor = wonderBlocksCore.addStyle("a");
82
68
  const StyledLink = wonderBlocksCore.addStyle(reactRouterDom.Link);
83
- let LinkCore = function (_React$Component) {
84
- _inheritsLoose(LinkCore, _React$Component);
85
- function LinkCore() {
86
- return _React$Component.apply(this, arguments) || this;
87
- }
88
- var _proto = LinkCore.prototype;
89
- _proto.renderInner = function renderInner(router) {
69
+ class LinkCore extends React__namespace.Component {
70
+ renderInner(router) {
90
71
  const _this$props = this.props,
91
72
  {
92
73
  children,
@@ -115,12 +96,11 @@ let LinkCore = function (_React$Component) {
115
96
  }), children) : React__namespace.createElement(StyledAnchor, _extends({}, commonProps, {
116
97
  href: href
117
98
  }), children);
118
- };
119
- _proto.render = function render() {
99
+ }
100
+ render() {
120
101
  return React__namespace.createElement(reactRouter.__RouterContext.Consumer, null, router => this.renderInner(router));
121
- };
122
- return LinkCore;
123
- }(React__namespace.Component);
102
+ }
103
+ }
124
104
  const styles = {};
125
105
  const sharedStyles = aphrodite.StyleSheet.create({
126
106
  shared: {
@@ -197,13 +177,8 @@ const _generateStyles = (inline, kind, light, visitable) => {
197
177
  };
198
178
 
199
179
  const _excluded = ["onClick", "beforeNav", "safeWithNav", "href", "skipClientNav", "children", "tabIndex", "onKeyDown", "onKeyUp", "target"];
200
- let Link = function (_React$Component) {
201
- _inheritsLoose(Link, _React$Component);
202
- function Link() {
203
- return _React$Component.apply(this, arguments) || this;
204
- }
205
- var _proto = Link.prototype;
206
- _proto.renderClickableBehavior = function renderClickableBehavior(router) {
180
+ class Link extends React__namespace.Component {
181
+ renderClickableBehavior(router) {
207
182
  const _this$props = this.props,
208
183
  {
209
184
  onClick,
@@ -258,12 +233,11 @@ let Link = function (_React$Component) {
258
233
  }), children);
259
234
  });
260
235
  }
261
- };
262
- _proto.render = function render() {
236
+ }
237
+ render() {
263
238
  return React__namespace.createElement(reactRouter.__RouterContext.Consumer, null, router => this.renderClickableBehavior(router));
264
- };
265
- return Link;
266
- }(React__namespace.Component);
239
+ }
240
+ }
267
241
  Link.defaultProps = {
268
242
  inline: false,
269
243
  kind: "primary",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-link",
3
- "version": "4.0.5",
3
+ "version": "4.0.7",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,9 +16,9 @@
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.18.6",
19
- "@khanacademy/wonder-blocks-clickable": "^3.0.5",
19
+ "@khanacademy/wonder-blocks-clickable": "^3.0.7",
20
20
  "@khanacademy/wonder-blocks-color": "^2.0.1",
21
- "@khanacademy/wonder-blocks-core": "^5.0.3"
21
+ "@khanacademy/wonder-blocks-core": "^5.0.4"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "aphrodite": "^1.2.5",
@@ -27,6 +27,6 @@
27
27
  "react-router-dom": "5.3.0"
28
28
  },
29
29
  "devDependencies": {
30
- "wb-dev-build-settings": "^0.9.4"
30
+ "wb-dev-build-settings": "^0.9.6"
31
31
  }
32
32
  }