@khanacademy/wonder-blocks-clickable 2.4.0 → 2.4.2
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 +15 -0
- package/dist/es/index.js +1 -20
- package/package.json +3 -3
- package/src/components/__docs__/clickable.stories.js +7 -0
- package/src/components/__tests__/clickable-behavior.test.js +58 -28
- package/src/components/__tests__/clickable.test.js +19 -21
- package/src/components/clickable-behavior.js +2 -21
- package/dist/index.js +0 -1411
- package/dist/index.js.flow +0 -2
- package/docs.md +0 -5
package/dist/index.js
DELETED
|
@@ -1,1411 +0,0 @@
|
|
|
1
|
-
module.exports =
|
|
2
|
-
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
-
/******/ // The module cache
|
|
4
|
-
/******/ var installedModules = {};
|
|
5
|
-
/******/
|
|
6
|
-
/******/ // The require function
|
|
7
|
-
/******/ function __webpack_require__(moduleId) {
|
|
8
|
-
/******/
|
|
9
|
-
/******/ // Check if module is in cache
|
|
10
|
-
/******/ if(installedModules[moduleId]) {
|
|
11
|
-
/******/ return installedModules[moduleId].exports;
|
|
12
|
-
/******/ }
|
|
13
|
-
/******/ // Create a new module (and put it into the cache)
|
|
14
|
-
/******/ var module = installedModules[moduleId] = {
|
|
15
|
-
/******/ i: moduleId,
|
|
16
|
-
/******/ l: false,
|
|
17
|
-
/******/ exports: {}
|
|
18
|
-
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/ // Execute the module function
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 11);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ([
|
|
89
|
-
/* 0 */
|
|
90
|
-
/***/ (function(module, exports) {
|
|
91
|
-
|
|
92
|
-
module.exports = require("react");
|
|
93
|
-
|
|
94
|
-
/***/ }),
|
|
95
|
-
/* 1 */
|
|
96
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
97
|
-
|
|
98
|
-
"use strict";
|
|
99
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isClientSideUrl; });
|
|
100
|
-
/**
|
|
101
|
-
* Returns:
|
|
102
|
-
* - false for hrefs staring with http://, https://, //.
|
|
103
|
-
* - false for '#', 'javascript:...', 'mailto:...', 'tel:...', etc.
|
|
104
|
-
* - true for all other values, e.g. /foo/bar
|
|
105
|
-
*/
|
|
106
|
-
const isClientSideUrl = href => {
|
|
107
|
-
if (typeof href !== "string") {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return !/^(https?:)?\/\//i.test(href) && !/^([^#]*#[\w-]*|[\w\-.]+:)/.test(href);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/***/ }),
|
|
115
|
-
/* 2 */
|
|
116
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
117
|
-
|
|
118
|
-
"use strict";
|
|
119
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ClickableBehavior; });
|
|
120
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
121
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
122
|
-
// NOTE: Potentially add to this as more cases come up.
|
|
123
|
-
|
|
124
|
-
const getAppropriateTriggersForRole = role => {
|
|
125
|
-
switch (role) {
|
|
126
|
-
// Triggers on ENTER, but not SPACE
|
|
127
|
-
case "link":
|
|
128
|
-
return {
|
|
129
|
-
triggerOnEnter: true,
|
|
130
|
-
triggerOnSpace: false
|
|
131
|
-
};
|
|
132
|
-
// Triggers on SPACE, but not ENTER
|
|
133
|
-
|
|
134
|
-
case "checkbox":
|
|
135
|
-
case "radio":
|
|
136
|
-
case "listbox":
|
|
137
|
-
return {
|
|
138
|
-
triggerOnEnter: false,
|
|
139
|
-
triggerOnSpace: true
|
|
140
|
-
};
|
|
141
|
-
// Triggers on both ENTER and SPACE
|
|
142
|
-
|
|
143
|
-
case "button":
|
|
144
|
-
case "menuitem":
|
|
145
|
-
case "menu":
|
|
146
|
-
case "option":
|
|
147
|
-
default:
|
|
148
|
-
return {
|
|
149
|
-
triggerOnEnter: true,
|
|
150
|
-
triggerOnSpace: true
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
const disabledHandlers = {
|
|
156
|
-
onClick: () => void 0,
|
|
157
|
-
onMouseEnter: () => void 0,
|
|
158
|
-
onMouseLeave: () => void 0,
|
|
159
|
-
onMouseDown: () => void 0,
|
|
160
|
-
onMouseUp: () => void 0,
|
|
161
|
-
onDragStart: () => void 0,
|
|
162
|
-
onTouchStart: () => void 0,
|
|
163
|
-
onTouchEnd: () => void 0,
|
|
164
|
-
onTouchCancel: () => void 0,
|
|
165
|
-
onKeyDown: () => void 0,
|
|
166
|
-
onKeyUp: () => void 0
|
|
167
|
-
};
|
|
168
|
-
const keyCodes = {
|
|
169
|
-
enter: 13,
|
|
170
|
-
space: 32
|
|
171
|
-
};
|
|
172
|
-
const startState = {
|
|
173
|
-
hovered: false,
|
|
174
|
-
focused: false,
|
|
175
|
-
pressed: false,
|
|
176
|
-
waiting: false
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Add hover, focus, and active status updates to a clickable component.
|
|
180
|
-
*
|
|
181
|
-
* Via mouse:
|
|
182
|
-
*
|
|
183
|
-
* 1. Hover over button -> hover state
|
|
184
|
-
* 2. Mouse down -> active state
|
|
185
|
-
* 3. Mouse up -> default state
|
|
186
|
-
* 4. Press tab -> focus state
|
|
187
|
-
*
|
|
188
|
-
* Via touch:
|
|
189
|
-
*
|
|
190
|
-
* 1. Touch down -> press state
|
|
191
|
-
* 2. Touch up -> default state
|
|
192
|
-
*
|
|
193
|
-
* Via keyboard:
|
|
194
|
-
*
|
|
195
|
-
* 1. Tab to focus -> focus state
|
|
196
|
-
* 2. Keydown (spacebar/enter) -> active state
|
|
197
|
-
* 3. Keyup (spacebar/enter) -> focus state
|
|
198
|
-
*
|
|
199
|
-
* Warning: The event handlers returned (onClick, onMouseEnter, onMouseLeave,
|
|
200
|
-
* onMouseDown, onMouseUp, onDragStart, onTouchStart, onTouchEnd, onTouchCancel,
|
|
201
|
-
* onKeyDown, onKeyUp, onFocus, onBlur, tabIndex) should be passed on to the
|
|
202
|
-
* component that has the ClickableBehavior. You cannot override these handlers
|
|
203
|
-
* without potentially breaking the functionality of ClickableBehavior.
|
|
204
|
-
*
|
|
205
|
-
* There are internal props triggerOnEnter and triggerOnSpace that can be set to
|
|
206
|
-
* false if one of those keys shouldn't count as a click on this component. Be
|
|
207
|
-
* careful about setting those to false -- make certain that the component
|
|
208
|
-
* shouldn't process that key.
|
|
209
|
-
*
|
|
210
|
-
* See [this
|
|
211
|
-
document](https://docs.google.com/document/d/1DG5Rg2f0cawIL5R8UqnPQpd7pbdObk8OyjO5ryYQmBM/edit#)
|
|
212
|
-
for a more thorough explanation of expected behaviors and potential cavaets.
|
|
213
|
-
*
|
|
214
|
-
* `ClickableBehavior` accepts a function as `children` which is passed state
|
|
215
|
-
* and an object containing event handlers and some other props. The `children`
|
|
216
|
-
* function should return a clickable React Element of some sort.
|
|
217
|
-
*
|
|
218
|
-
* Example:
|
|
219
|
-
*
|
|
220
|
-
* ```jsx
|
|
221
|
-
* function MyClickableComponent(props: Props) {
|
|
222
|
-
* const ClickableBehavior = getClickableBehavior();
|
|
223
|
-
*
|
|
224
|
-
* return (
|
|
225
|
-
* <ClickableBehavior
|
|
226
|
-
* disabled={props.disabled}
|
|
227
|
-
* onClick={props.onClick}
|
|
228
|
-
* tabIndex={0}
|
|
229
|
-
* >
|
|
230
|
-
* {({hovered}, childrenProps) => (
|
|
231
|
-
* <RoundRect
|
|
232
|
-
* textcolor="white"
|
|
233
|
-
* backgroundColor={hovered ? "red" : "blue"}
|
|
234
|
-
* {...childrenProps}
|
|
235
|
-
* >
|
|
236
|
-
* {props.children}
|
|
237
|
-
* </RoundRect>
|
|
238
|
-
* )}
|
|
239
|
-
* </ClickableBehavior>
|
|
240
|
-
* );
|
|
241
|
-
* }
|
|
242
|
-
* ```
|
|
243
|
-
*
|
|
244
|
-
* This follows a pattern called [Function as Child
|
|
245
|
-
* Components](https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9).
|
|
246
|
-
*
|
|
247
|
-
* **WARNING:** Do not use this component directly, use getClickableBehavior
|
|
248
|
-
* instead. getClickableBehavior takes three arguments (href, directtNav, and
|
|
249
|
-
* router) and returns either the default ClickableBehavior or a react-router
|
|
250
|
-
* aware version.
|
|
251
|
-
*
|
|
252
|
-
* The react-router aware version is returned if `router` is a react-router-dom
|
|
253
|
-
* router, `skipClientNav` is not `true`, and `href` is an internal URL.
|
|
254
|
-
*
|
|
255
|
-
* The `router` can be accessed via __RouterContext (imported from
|
|
256
|
-
'react-router') from a component rendered as a descendant of a BrowserRouter.
|
|
257
|
-
See https://reacttraining.com/react-router/web/guides/basic-components.
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
class ClickableBehavior extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
261
|
-
static getDerivedStateFromProps(props, state) {
|
|
262
|
-
// If new props are disabled, reset the hovered/pressed states
|
|
263
|
-
if (props.disabled) {
|
|
264
|
-
// Keep the focused state for enabling keyboard navigation.
|
|
265
|
-
return { ...startState,
|
|
266
|
-
focused: state.focused
|
|
267
|
-
};
|
|
268
|
-
} else {
|
|
269
|
-
// Cannot return undefined
|
|
270
|
-
return null;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
constructor(props) {
|
|
275
|
-
super(props);
|
|
276
|
-
|
|
277
|
-
this.handleClick = e => {
|
|
278
|
-
const {
|
|
279
|
-
onClick = undefined,
|
|
280
|
-
beforeNav = undefined,
|
|
281
|
-
safeWithNav = undefined
|
|
282
|
-
} = this.props;
|
|
283
|
-
|
|
284
|
-
if (this.enterClick) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (onClick || beforeNav || safeWithNav) {
|
|
289
|
-
this.waitingForClick = false;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
this.runCallbackAndMaybeNavigate(e);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
this.handleMouseEnter = e => {
|
|
296
|
-
// When the left button is pressed already, we want it to be pressed
|
|
297
|
-
if (e.buttons === 1) {
|
|
298
|
-
this.dragging = true;
|
|
299
|
-
this.setState({
|
|
300
|
-
pressed: true
|
|
301
|
-
});
|
|
302
|
-
} else if (!this.waitingForClick) {
|
|
303
|
-
this.setState({
|
|
304
|
-
hovered: true
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
this.handleMouseLeave = () => {
|
|
310
|
-
if (!this.waitingForClick) {
|
|
311
|
-
this.dragging = false;
|
|
312
|
-
this.setState({
|
|
313
|
-
hovered: false,
|
|
314
|
-
pressed: false,
|
|
315
|
-
focused: false
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
this.handleMouseDown = () => {
|
|
321
|
-
this.setState({
|
|
322
|
-
pressed: true
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
this.handleMouseUp = e => {
|
|
327
|
-
if (this.dragging) {
|
|
328
|
-
this.dragging = false;
|
|
329
|
-
this.handleClick(e);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
this.setState({
|
|
333
|
-
pressed: false,
|
|
334
|
-
focused: false
|
|
335
|
-
});
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
this.handleDragStart = e => {
|
|
339
|
-
this.dragging = true;
|
|
340
|
-
e.preventDefault();
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
this.handleTouchStart = () => {
|
|
344
|
-
this.setState({
|
|
345
|
-
pressed: true
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
this.handleTouchEnd = () => {
|
|
350
|
-
this.setState({
|
|
351
|
-
pressed: false
|
|
352
|
-
});
|
|
353
|
-
this.waitingForClick = true;
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
this.handleTouchCancel = () => {
|
|
357
|
-
this.setState({
|
|
358
|
-
pressed: false
|
|
359
|
-
});
|
|
360
|
-
this.waitingForClick = true;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
this.handleKeyDown = e => {
|
|
364
|
-
const {
|
|
365
|
-
onKeyDown,
|
|
366
|
-
role
|
|
367
|
-
} = this.props;
|
|
368
|
-
|
|
369
|
-
if (onKeyDown) {
|
|
370
|
-
onKeyDown(e);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
const keyCode = e.which || e.keyCode;
|
|
374
|
-
const {
|
|
375
|
-
triggerOnEnter,
|
|
376
|
-
triggerOnSpace
|
|
377
|
-
} = getAppropriateTriggersForRole(role);
|
|
378
|
-
|
|
379
|
-
if (triggerOnEnter && keyCode === keyCodes.enter || triggerOnSpace && keyCode === keyCodes.space) {
|
|
380
|
-
// This prevents space from scrolling down. It also prevents the
|
|
381
|
-
// space and enter keys from triggering click events. We manually
|
|
382
|
-
// call the supplied onClick and handle potential navigation in
|
|
383
|
-
// handleKeyUp instead.
|
|
384
|
-
e.preventDefault();
|
|
385
|
-
this.setState({
|
|
386
|
-
pressed: true
|
|
387
|
-
});
|
|
388
|
-
} else if (!triggerOnEnter && keyCode === keyCodes.enter) {
|
|
389
|
-
// If the component isn't supposed to trigger on enter, we have to
|
|
390
|
-
// keep track of the enter keydown to negate the onClick callback
|
|
391
|
-
this.enterClick = true;
|
|
392
|
-
}
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
this.handleKeyUp = e => {
|
|
396
|
-
const {
|
|
397
|
-
onKeyUp,
|
|
398
|
-
role
|
|
399
|
-
} = this.props;
|
|
400
|
-
|
|
401
|
-
if (onKeyUp) {
|
|
402
|
-
onKeyUp(e);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
const keyCode = e.which || e.keyCode;
|
|
406
|
-
const {
|
|
407
|
-
triggerOnEnter,
|
|
408
|
-
triggerOnSpace
|
|
409
|
-
} = getAppropriateTriggersForRole(role);
|
|
410
|
-
|
|
411
|
-
if (triggerOnEnter && keyCode === keyCodes.enter || triggerOnSpace && keyCode === keyCodes.space) {
|
|
412
|
-
this.setState({
|
|
413
|
-
pressed: false,
|
|
414
|
-
focused: true
|
|
415
|
-
});
|
|
416
|
-
this.runCallbackAndMaybeNavigate(e);
|
|
417
|
-
} else if (!triggerOnEnter && keyCode === keyCodes.enter) {
|
|
418
|
-
this.enterClick = false;
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
this.handleFocus = e => {
|
|
423
|
-
this.setState({
|
|
424
|
-
focused: true
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
this.handleBlur = e => {
|
|
429
|
-
this.setState({
|
|
430
|
-
focused: false,
|
|
431
|
-
pressed: false
|
|
432
|
-
});
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
this.state = startState;
|
|
436
|
-
this.waitingForClick = false;
|
|
437
|
-
this.enterClick = false;
|
|
438
|
-
this.dragging = false;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
navigateOrReset(shouldNavigate) {
|
|
442
|
-
if (shouldNavigate) {
|
|
443
|
-
const {
|
|
444
|
-
history,
|
|
445
|
-
href,
|
|
446
|
-
skipClientNav,
|
|
447
|
-
target = undefined
|
|
448
|
-
} = this.props;
|
|
449
|
-
|
|
450
|
-
if (href) {
|
|
451
|
-
if (target === "_blank") {
|
|
452
|
-
window.open(href, "_blank");
|
|
453
|
-
this.setState({
|
|
454
|
-
waiting: false
|
|
455
|
-
});
|
|
456
|
-
} else if (history && !skipClientNav) {
|
|
457
|
-
history.push(href);
|
|
458
|
-
this.setState({
|
|
459
|
-
waiting: false
|
|
460
|
-
});
|
|
461
|
-
} else {
|
|
462
|
-
window.location.assign(href); // We don't bother clearing the waiting state, the full page
|
|
463
|
-
// load navigation will do that for us by loading a new page.
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
} else {
|
|
467
|
-
this.setState({
|
|
468
|
-
waiting: false
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
handleSafeWithNav(safeWithNav, shouldNavigate) {
|
|
474
|
-
const {
|
|
475
|
-
skipClientNav,
|
|
476
|
-
history
|
|
477
|
-
} = this.props;
|
|
478
|
-
|
|
479
|
-
if (history && !skipClientNav || this.props.target === "_blank") {
|
|
480
|
-
// client-side nav
|
|
481
|
-
safeWithNav();
|
|
482
|
-
this.navigateOrReset(shouldNavigate);
|
|
483
|
-
return Promise.resolve();
|
|
484
|
-
} else {
|
|
485
|
-
if (!this.state.waiting) {
|
|
486
|
-
// We only show the spinner for safeWithNav when doing
|
|
487
|
-
// a full page load navigation since since the spinner is
|
|
488
|
-
// indicating that we're waiting for navigation to occur.
|
|
489
|
-
this.setState({
|
|
490
|
-
waiting: true
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
return safeWithNav().then(() => {
|
|
495
|
-
if (!this.state.waiting) {
|
|
496
|
-
// We only show the spinner for safeWithNav when doing
|
|
497
|
-
// a full page load navigation since since the spinner is
|
|
498
|
-
// indicating that we're waiting for navigation to occur.
|
|
499
|
-
this.setState({
|
|
500
|
-
waiting: true
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
return;
|
|
505
|
-
}).catch(error => {// We ignore the error here so that we always
|
|
506
|
-
// navigate when using safeWithNav regardless of
|
|
507
|
-
// whether we're doing a client-side nav or not.
|
|
508
|
-
}).finally(() => {
|
|
509
|
-
this.navigateOrReset(shouldNavigate);
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
runCallbackAndMaybeNavigate(e) {
|
|
515
|
-
const {
|
|
516
|
-
onClick = undefined,
|
|
517
|
-
beforeNav = undefined,
|
|
518
|
-
safeWithNav = undefined,
|
|
519
|
-
href,
|
|
520
|
-
type
|
|
521
|
-
} = this.props;
|
|
522
|
-
let shouldNavigate = true;
|
|
523
|
-
let canSubmit = true;
|
|
524
|
-
|
|
525
|
-
if (onClick) {
|
|
526
|
-
onClick(e);
|
|
527
|
-
} // If onClick() has called e.preventDefault() then we shouldn't
|
|
528
|
-
// navigate.
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
if (e.defaultPrevented) {
|
|
532
|
-
shouldNavigate = false;
|
|
533
|
-
canSubmit = false;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
e.preventDefault();
|
|
537
|
-
|
|
538
|
-
if (!href && type === "submit" && canSubmit) {
|
|
539
|
-
let target = e.currentTarget;
|
|
540
|
-
|
|
541
|
-
while (target) {
|
|
542
|
-
if (target instanceof window.HTMLFormElement) {
|
|
543
|
-
// This event must be marked as cancelable otherwise calling
|
|
544
|
-
// e.preventDefault() on it won't do anything in Firefox.
|
|
545
|
-
// Chrome and Safari allow calling e.preventDefault() on
|
|
546
|
-
// non-cancelable events, but really they shouldn't.
|
|
547
|
-
const event = new window.Event("submit", {
|
|
548
|
-
cancelable: true
|
|
549
|
-
});
|
|
550
|
-
target.dispatchEvent(event);
|
|
551
|
-
break;
|
|
552
|
-
} // All events should be typed as SyntheticEvent<HTMLElement>.
|
|
553
|
-
// Updating all of the places will take some time so I'll do
|
|
554
|
-
// this later
|
|
555
|
-
// $FlowFixMe[prop-missing]
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
target = target.parentElement;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
if (beforeNav) {
|
|
563
|
-
this.setState({
|
|
564
|
-
waiting: true
|
|
565
|
-
});
|
|
566
|
-
beforeNav().then(() => {
|
|
567
|
-
if (safeWithNav) {
|
|
568
|
-
return this.handleSafeWithNav(safeWithNav, shouldNavigate);
|
|
569
|
-
} else {
|
|
570
|
-
return this.navigateOrReset(shouldNavigate);
|
|
571
|
-
}
|
|
572
|
-
}).catch(() => {});
|
|
573
|
-
} else if (safeWithNav) {
|
|
574
|
-
return this.handleSafeWithNav(safeWithNav, shouldNavigate);
|
|
575
|
-
} else {
|
|
576
|
-
this.navigateOrReset(shouldNavigate);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
render() {
|
|
581
|
-
const childrenProps = this.props.disabled ? { ...disabledHandlers,
|
|
582
|
-
// Keep these handlers for keyboard accessibility.
|
|
583
|
-
onFocus: this.handleFocus,
|
|
584
|
-
onBlur: this.handleBlur,
|
|
585
|
-
tabIndex: this.props.tabIndex
|
|
586
|
-
} : {
|
|
587
|
-
onClick: this.handleClick,
|
|
588
|
-
onMouseEnter: this.handleMouseEnter,
|
|
589
|
-
onMouseLeave: this.handleMouseLeave,
|
|
590
|
-
onMouseDown: this.handleMouseDown,
|
|
591
|
-
onMouseUp: this.handleMouseUp,
|
|
592
|
-
onDragStart: this.handleDragStart,
|
|
593
|
-
onTouchStart: this.handleTouchStart,
|
|
594
|
-
onTouchEnd: this.handleTouchEnd,
|
|
595
|
-
onTouchCancel: this.handleTouchCancel,
|
|
596
|
-
onKeyDown: this.handleKeyDown,
|
|
597
|
-
onKeyUp: this.handleKeyUp,
|
|
598
|
-
onFocus: this.handleFocus,
|
|
599
|
-
onBlur: this.handleBlur,
|
|
600
|
-
tabIndex: this.props.tabIndex
|
|
601
|
-
}; // When the link is set to open in a new window, we want to set some
|
|
602
|
-
// `rel` attributes. This is to ensure that the links we're sending folks
|
|
603
|
-
// to can't hijack the existing page. These defaults can be overriden
|
|
604
|
-
// by passing in a different value for the `rel` prop.
|
|
605
|
-
// More info: https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
|
|
606
|
-
|
|
607
|
-
childrenProps.rel = this.props.rel || (this.props.target === "_blank" ? "noopener noreferrer" : undefined);
|
|
608
|
-
const {
|
|
609
|
-
children
|
|
610
|
-
} = this.props;
|
|
611
|
-
return children && children(this.state, childrenProps);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
}
|
|
615
|
-
ClickableBehavior.defaultProps = {
|
|
616
|
-
disabled: false
|
|
617
|
-
};
|
|
618
|
-
|
|
619
|
-
/***/ }),
|
|
620
|
-
/* 3 */
|
|
621
|
-
/***/ (function(module, exports) {
|
|
622
|
-
|
|
623
|
-
module.exports =
|
|
624
|
-
/******/
|
|
625
|
-
function (modules) {
|
|
626
|
-
// webpackBootstrap
|
|
627
|
-
|
|
628
|
-
/******/
|
|
629
|
-
// The module cache
|
|
630
|
-
|
|
631
|
-
/******/
|
|
632
|
-
var installedModules = {};
|
|
633
|
-
/******/
|
|
634
|
-
|
|
635
|
-
/******/
|
|
636
|
-
// The require function
|
|
637
|
-
|
|
638
|
-
/******/
|
|
639
|
-
|
|
640
|
-
function __webpack_require__(moduleId) {
|
|
641
|
-
/******/
|
|
642
|
-
|
|
643
|
-
/******/
|
|
644
|
-
// Check if module is in cache
|
|
645
|
-
|
|
646
|
-
/******/
|
|
647
|
-
if (installedModules[moduleId]) {
|
|
648
|
-
/******/
|
|
649
|
-
return installedModules[moduleId].exports;
|
|
650
|
-
/******/
|
|
651
|
-
}
|
|
652
|
-
/******/
|
|
653
|
-
// Create a new module (and put it into the cache)
|
|
654
|
-
|
|
655
|
-
/******/
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
var module = installedModules[moduleId] = {
|
|
659
|
-
/******/
|
|
660
|
-
i: moduleId,
|
|
661
|
-
|
|
662
|
-
/******/
|
|
663
|
-
l: false,
|
|
664
|
-
|
|
665
|
-
/******/
|
|
666
|
-
exports: {}
|
|
667
|
-
/******/
|
|
668
|
-
|
|
669
|
-
};
|
|
670
|
-
/******/
|
|
671
|
-
|
|
672
|
-
/******/
|
|
673
|
-
// Execute the module function
|
|
674
|
-
|
|
675
|
-
/******/
|
|
676
|
-
|
|
677
|
-
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
678
|
-
/******/
|
|
679
|
-
|
|
680
|
-
/******/
|
|
681
|
-
// Flag the module as loaded
|
|
682
|
-
|
|
683
|
-
/******/
|
|
684
|
-
|
|
685
|
-
module.l = true;
|
|
686
|
-
/******/
|
|
687
|
-
|
|
688
|
-
/******/
|
|
689
|
-
// Return the exports of the module
|
|
690
|
-
|
|
691
|
-
/******/
|
|
692
|
-
|
|
693
|
-
return module.exports;
|
|
694
|
-
/******/
|
|
695
|
-
}
|
|
696
|
-
/******/
|
|
697
|
-
|
|
698
|
-
/******/
|
|
699
|
-
|
|
700
|
-
/******/
|
|
701
|
-
// expose the modules object (__webpack_modules__)
|
|
702
|
-
|
|
703
|
-
/******/
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
__webpack_require__.m = modules;
|
|
707
|
-
/******/
|
|
708
|
-
|
|
709
|
-
/******/
|
|
710
|
-
// expose the module cache
|
|
711
|
-
|
|
712
|
-
/******/
|
|
713
|
-
|
|
714
|
-
__webpack_require__.c = installedModules;
|
|
715
|
-
/******/
|
|
716
|
-
|
|
717
|
-
/******/
|
|
718
|
-
// define getter function for harmony exports
|
|
719
|
-
|
|
720
|
-
/******/
|
|
721
|
-
|
|
722
|
-
__webpack_require__.d = function (exports, name, getter) {
|
|
723
|
-
/******/
|
|
724
|
-
if (!__webpack_require__.o(exports, name)) {
|
|
725
|
-
/******/
|
|
726
|
-
Object.defineProperty(exports, name, {
|
|
727
|
-
enumerable: true,
|
|
728
|
-
get: getter
|
|
729
|
-
});
|
|
730
|
-
/******/
|
|
731
|
-
}
|
|
732
|
-
/******/
|
|
733
|
-
|
|
734
|
-
};
|
|
735
|
-
/******/
|
|
736
|
-
|
|
737
|
-
/******/
|
|
738
|
-
// define __esModule on exports
|
|
739
|
-
|
|
740
|
-
/******/
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
__webpack_require__.r = function (exports) {
|
|
744
|
-
/******/
|
|
745
|
-
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
746
|
-
/******/
|
|
747
|
-
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
748
|
-
value: 'Module'
|
|
749
|
-
});
|
|
750
|
-
/******/
|
|
751
|
-
}
|
|
752
|
-
/******/
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
Object.defineProperty(exports, '__esModule', {
|
|
756
|
-
value: true
|
|
757
|
-
});
|
|
758
|
-
/******/
|
|
759
|
-
};
|
|
760
|
-
/******/
|
|
761
|
-
|
|
762
|
-
/******/
|
|
763
|
-
// create a fake namespace object
|
|
764
|
-
|
|
765
|
-
/******/
|
|
766
|
-
// mode & 1: value is a module id, require it
|
|
767
|
-
|
|
768
|
-
/******/
|
|
769
|
-
// mode & 2: merge all properties of value into the ns
|
|
770
|
-
|
|
771
|
-
/******/
|
|
772
|
-
// mode & 4: return value when already ns object
|
|
773
|
-
|
|
774
|
-
/******/
|
|
775
|
-
// mode & 8|1: behave like require
|
|
776
|
-
|
|
777
|
-
/******/
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
__webpack_require__.t = function (value, mode) {
|
|
781
|
-
/******/
|
|
782
|
-
if (mode & 1) value = __webpack_require__(value);
|
|
783
|
-
/******/
|
|
784
|
-
|
|
785
|
-
if (mode & 8) return value;
|
|
786
|
-
/******/
|
|
787
|
-
|
|
788
|
-
if (mode & 4 && typeof value === 'object' && value && value.__esModule) return value;
|
|
789
|
-
/******/
|
|
790
|
-
|
|
791
|
-
var ns = Object.create(null);
|
|
792
|
-
/******/
|
|
793
|
-
|
|
794
|
-
__webpack_require__.r(ns);
|
|
795
|
-
/******/
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
Object.defineProperty(ns, 'default', {
|
|
799
|
-
enumerable: true,
|
|
800
|
-
value: value
|
|
801
|
-
});
|
|
802
|
-
/******/
|
|
803
|
-
|
|
804
|
-
if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) {
|
|
805
|
-
return value[key];
|
|
806
|
-
}.bind(null, key));
|
|
807
|
-
/******/
|
|
808
|
-
|
|
809
|
-
return ns;
|
|
810
|
-
/******/
|
|
811
|
-
};
|
|
812
|
-
/******/
|
|
813
|
-
|
|
814
|
-
/******/
|
|
815
|
-
// getDefaultExport function for compatibility with non-harmony modules
|
|
816
|
-
|
|
817
|
-
/******/
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
__webpack_require__.n = function (module) {
|
|
821
|
-
/******/
|
|
822
|
-
var getter = module && module.__esModule ?
|
|
823
|
-
/******/
|
|
824
|
-
function getDefault() {
|
|
825
|
-
return module['default'];
|
|
826
|
-
} :
|
|
827
|
-
/******/
|
|
828
|
-
function getModuleExports() {
|
|
829
|
-
return module;
|
|
830
|
-
};
|
|
831
|
-
/******/
|
|
832
|
-
|
|
833
|
-
__webpack_require__.d(getter, 'a', getter);
|
|
834
|
-
/******/
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
return getter;
|
|
838
|
-
/******/
|
|
839
|
-
};
|
|
840
|
-
/******/
|
|
841
|
-
|
|
842
|
-
/******/
|
|
843
|
-
// Object.prototype.hasOwnProperty.call
|
|
844
|
-
|
|
845
|
-
/******/
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
__webpack_require__.o = function (object, property) {
|
|
849
|
-
return Object.prototype.hasOwnProperty.call(object, property);
|
|
850
|
-
};
|
|
851
|
-
/******/
|
|
852
|
-
|
|
853
|
-
/******/
|
|
854
|
-
// __webpack_public_path__
|
|
855
|
-
|
|
856
|
-
/******/
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
__webpack_require__.p = "";
|
|
860
|
-
/******/
|
|
861
|
-
|
|
862
|
-
/******/
|
|
863
|
-
|
|
864
|
-
/******/
|
|
865
|
-
// Load entry module and return exports
|
|
866
|
-
|
|
867
|
-
/******/
|
|
868
|
-
|
|
869
|
-
return __webpack_require__(__webpack_require__.s = 1);
|
|
870
|
-
/******/
|
|
871
|
-
}
|
|
872
|
-
/************************************************************************/
|
|
873
|
-
|
|
874
|
-
/******/
|
|
875
|
-
([
|
|
876
|
-
/* 0 */
|
|
877
|
-
|
|
878
|
-
/***/
|
|
879
|
-
function (module, __webpack_exports__, __webpack_require__) {
|
|
880
|
-
"use strict";
|
|
881
|
-
/* harmony export (binding) */
|
|
882
|
-
|
|
883
|
-
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
884
|
-
return fade;
|
|
885
|
-
});
|
|
886
|
-
/* harmony export (binding) */
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
__webpack_require__.d(__webpack_exports__, "b", function () {
|
|
890
|
-
return mix;
|
|
891
|
-
});
|
|
892
|
-
/**
|
|
893
|
-
* A color manipulation library useful for dynamically
|
|
894
|
-
* mixing colors together.
|
|
895
|
-
*/
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
const color6Regexp = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
|
|
899
|
-
const color3Regexp = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i;
|
|
900
|
-
const rgbaRegexp = /^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)$/i; // Parse a color in #abcdef, rgb(...), or rgba(...) form into an object
|
|
901
|
-
// with r,g,b,a keys.
|
|
902
|
-
|
|
903
|
-
const parse = color => {
|
|
904
|
-
if (typeof color !== "string") {
|
|
905
|
-
throw new Error(`Failed to parse color: ${color}`);
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
const color3Match = color.match(color3Regexp);
|
|
909
|
-
|
|
910
|
-
if (color3Match) {
|
|
911
|
-
return {
|
|
912
|
-
r: parseInt(`${color3Match[1]}${color3Match[1]}`, 16),
|
|
913
|
-
g: parseInt(`${color3Match[2]}${color3Match[2]}`, 16),
|
|
914
|
-
b: parseInt(`${color3Match[3]}${color3Match[3]}`, 16),
|
|
915
|
-
a: 1
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
const color6Match = color.match(color6Regexp);
|
|
920
|
-
|
|
921
|
-
if (color6Match) {
|
|
922
|
-
return {
|
|
923
|
-
r: parseInt(color6Match[1], 16),
|
|
924
|
-
g: parseInt(color6Match[2], 16),
|
|
925
|
-
b: parseInt(color6Match[3], 16),
|
|
926
|
-
a: 1
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
const rgbaMatch = color.match(rgbaRegexp);
|
|
931
|
-
|
|
932
|
-
if (rgbaMatch) {
|
|
933
|
-
return {
|
|
934
|
-
r: parseFloat(rgbaMatch[1]),
|
|
935
|
-
g: parseFloat(rgbaMatch[2]),
|
|
936
|
-
b: parseFloat(rgbaMatch[3]),
|
|
937
|
-
a: rgbaMatch[4] ? parseFloat(rgbaMatch[4]) : 1
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
throw new Error(`Failed to parse color: ${color}`);
|
|
942
|
-
}; // Stringify the color in an `rgba()` or `#abcdef` format.
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
const format = color => {
|
|
946
|
-
const r = Math.round(color.r);
|
|
947
|
-
const g = Math.round(color.g);
|
|
948
|
-
const b = Math.round(color.b);
|
|
949
|
-
|
|
950
|
-
if (color.a === 1) {
|
|
951
|
-
const _s = c => {
|
|
952
|
-
const asString = c.toString(16);
|
|
953
|
-
return asString.length === 1 ? asString + asString : asString;
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
return `#${_s(r)}${_s(g)}${_s(b)}`;
|
|
957
|
-
} else {
|
|
958
|
-
return `rgba(${r},${g},${b},${color.a.toFixed(2)})`;
|
|
959
|
-
}
|
|
960
|
-
}; // Adjust the alpha value of a color.
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
const fade = (color, percentage) => {
|
|
964
|
-
if (percentage < 0 || percentage > 1) {
|
|
965
|
-
throw new Error("Percentage must be between 0 and 1");
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
const components = parse(color);
|
|
969
|
-
return format({ ...components,
|
|
970
|
-
a: components.a * percentage
|
|
971
|
-
});
|
|
972
|
-
}; // Mix a color into a background color, using the alpha channel of the base
|
|
973
|
-
// color to determine the linear blend.
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
const mix = (color, background) => {
|
|
977
|
-
const colorObj = parse(color);
|
|
978
|
-
const bgObj = parse(background);
|
|
979
|
-
return format({
|
|
980
|
-
r: colorObj.r * colorObj.a + bgObj.r * (1 - colorObj.a),
|
|
981
|
-
g: colorObj.g * colorObj.a + bgObj.g * (1 - colorObj.a),
|
|
982
|
-
b: colorObj.b * colorObj.a + bgObj.b * (1 - colorObj.a),
|
|
983
|
-
a: bgObj.a
|
|
984
|
-
});
|
|
985
|
-
};
|
|
986
|
-
/***/
|
|
987
|
-
|
|
988
|
-
},
|
|
989
|
-
/* 1 */
|
|
990
|
-
|
|
991
|
-
/***/
|
|
992
|
-
function (module, __webpack_exports__, __webpack_require__) {
|
|
993
|
-
"use strict";
|
|
994
|
-
|
|
995
|
-
__webpack_require__.r(__webpack_exports__);
|
|
996
|
-
/* harmony export (binding) */
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
__webpack_require__.d(__webpack_exports__, "default", function () {
|
|
1000
|
-
return Color;
|
|
1001
|
-
});
|
|
1002
|
-
/* harmony export (binding) */
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
__webpack_require__.d(__webpack_exports__, "SemanticColor", function () {
|
|
1006
|
-
return SemanticColor;
|
|
1007
|
-
});
|
|
1008
|
-
/* harmony import */
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
var _util_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1012
|
-
/* harmony reexport (safe) */
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
__webpack_require__.d(__webpack_exports__, "mix", function () {
|
|
1016
|
-
return _util_utils_js__WEBPACK_IMPORTED_MODULE_0__["b"];
|
|
1017
|
-
});
|
|
1018
|
-
/* harmony reexport (safe) */
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
__webpack_require__.d(__webpack_exports__, "fade", function () {
|
|
1022
|
-
return _util_utils_js__WEBPACK_IMPORTED_MODULE_0__["a"];
|
|
1023
|
-
});
|
|
1024
|
-
|
|
1025
|
-
const offBlack = "#21242c";
|
|
1026
|
-
const white = "#ffffff";
|
|
1027
|
-
const Color = {
|
|
1028
|
-
// Product
|
|
1029
|
-
blue: "#1865f2",
|
|
1030
|
-
purple: "#9059ff",
|
|
1031
|
-
green: "#00a60e",
|
|
1032
|
-
gold: "#ffb100",
|
|
1033
|
-
red: "#d92916",
|
|
1034
|
-
// Neutral
|
|
1035
|
-
offBlack,
|
|
1036
|
-
offBlack64: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1037
|
-
/* fade */
|
|
1038
|
-
"a"])(offBlack, 0.64),
|
|
1039
|
-
offBlack50: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1040
|
-
/* fade */
|
|
1041
|
-
"a"])(offBlack, 0.5),
|
|
1042
|
-
offBlack32: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1043
|
-
/* fade */
|
|
1044
|
-
"a"])(offBlack, 0.32),
|
|
1045
|
-
offBlack16: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1046
|
-
/* fade */
|
|
1047
|
-
"a"])(offBlack, 0.16),
|
|
1048
|
-
offBlack8: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1049
|
-
/* fade */
|
|
1050
|
-
"a"])(offBlack, 0.08),
|
|
1051
|
-
offWhite: "#f7f8fa",
|
|
1052
|
-
white,
|
|
1053
|
-
white64: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1054
|
-
/* fade */
|
|
1055
|
-
"a"])(white, 0.64),
|
|
1056
|
-
white50: Object(_util_utils_js__WEBPACK_IMPORTED_MODULE_0__[
|
|
1057
|
-
/* fade */
|
|
1058
|
-
"a"])(white, 0.5),
|
|
1059
|
-
// Brand
|
|
1060
|
-
darkBlue: "#0b2149",
|
|
1061
|
-
teal: "#14bf96",
|
|
1062
|
-
lightBlue: "#37c5fd",
|
|
1063
|
-
pink: "#fa50ae"
|
|
1064
|
-
};
|
|
1065
|
-
const SemanticColor = {
|
|
1066
|
-
controlDefault: Color.blue,
|
|
1067
|
-
controlDestructive: Color.red
|
|
1068
|
-
};
|
|
1069
|
-
/***/
|
|
1070
|
-
}
|
|
1071
|
-
/******/
|
|
1072
|
-
]);
|
|
1073
|
-
|
|
1074
|
-
/***/ }),
|
|
1075
|
-
/* 4 */
|
|
1076
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1077
|
-
|
|
1078
|
-
"use strict";
|
|
1079
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getClickableBehavior; });
|
|
1080
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1081
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1082
|
-
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
|
1083
|
-
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
1084
|
-
/* harmony import */ var _components_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
|
1085
|
-
/* harmony import */ var _is_client_side_url_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
1086
|
-
/**
|
|
1087
|
-
* Returns either the default ClickableBehavior or a react-router aware version.
|
|
1088
|
-
*
|
|
1089
|
-
* The react-router aware version is returned if `router` is a react-router-dom
|
|
1090
|
-
* router, `skipClientNav` is not `true`, and `href` is an internal URL.
|
|
1091
|
-
*
|
|
1092
|
-
* The `router` can be accessed via __RouterContext (imported from 'react-router')
|
|
1093
|
-
* from a component rendered as a descendant of a BrowserRouter.
|
|
1094
|
-
* See https://reacttraining.com/react-router/web/guides/basic-components.
|
|
1095
|
-
*/
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
const ClickableBehaviorWithRouter = Object(react_router_dom__WEBPACK_IMPORTED_MODULE_1__["withRouter"])(_components_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"]);
|
|
1101
|
-
function getClickableBehavior(
|
|
1102
|
-
/**
|
|
1103
|
-
* The URL to navigate to.
|
|
1104
|
-
*/
|
|
1105
|
-
href,
|
|
1106
|
-
/**
|
|
1107
|
-
* Should we skip using the react router and go to the page directly.
|
|
1108
|
-
*/
|
|
1109
|
-
skipClientNav,
|
|
1110
|
-
/**
|
|
1111
|
-
* router object added to the React context object by react-router-dom.
|
|
1112
|
-
*/
|
|
1113
|
-
router) {
|
|
1114
|
-
if (router && skipClientNav !== true && href && Object(_is_client_side_url_js__WEBPACK_IMPORTED_MODULE_3__[/* isClientSideUrl */ "a"])(href)) {
|
|
1115
|
-
// We cast to `any` here since the type of ClickableBehaviorWithRouter
|
|
1116
|
-
// is slightly different from the return type of this function.
|
|
1117
|
-
// TODO(WB-1037): Always return the wrapped version once all routes have
|
|
1118
|
-
// been ported to the app-shell in webapp.
|
|
1119
|
-
return ClickableBehaviorWithRouter;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return _components_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"];
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
/***/ }),
|
|
1126
|
-
/* 5 */
|
|
1127
|
-
/***/ (function(module, exports) {
|
|
1128
|
-
|
|
1129
|
-
module.exports = require("react-router-dom");
|
|
1130
|
-
|
|
1131
|
-
/***/ }),
|
|
1132
|
-
/* 6 */
|
|
1133
|
-
/***/ (function(module, exports) {
|
|
1134
|
-
|
|
1135
|
-
function _extends() {
|
|
1136
|
-
module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1137
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1138
|
-
var source = arguments[i];
|
|
1139
|
-
|
|
1140
|
-
for (var key in source) {
|
|
1141
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1142
|
-
target[key] = source[key];
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
return target;
|
|
1148
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1149
|
-
return _extends.apply(this, arguments);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1153
|
-
|
|
1154
|
-
/***/ }),
|
|
1155
|
-
/* 7 */
|
|
1156
|
-
/***/ (function(module, exports) {
|
|
1157
|
-
|
|
1158
|
-
module.exports = require("@khanacademy/wonder-blocks-core");
|
|
1159
|
-
|
|
1160
|
-
/***/ }),
|
|
1161
|
-
/* 8 */
|
|
1162
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1163
|
-
|
|
1164
|
-
"use strict";
|
|
1165
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Clickable; });
|
|
1166
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
|
|
1167
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
1168
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
1169
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
1170
|
-
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
|
1171
|
-
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
|
|
1172
|
-
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
1173
|
-
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_3__);
|
|
1174
|
-
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
|
|
1175
|
-
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_router__WEBPACK_IMPORTED_MODULE_4__);
|
|
1176
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
|
|
1177
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__);
|
|
1178
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
1179
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__);
|
|
1180
|
-
/* harmony import */ var _util_get_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4);
|
|
1181
|
-
/* harmony import */ var _util_is_client_side_url_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
const StyledAnchor = Object(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__["addStyle"])("a");
|
|
1192
|
-
const StyledButton = Object(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__["addStyle"])("button");
|
|
1193
|
-
const StyledLink = Object(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__["addStyle"])(react_router_dom__WEBPACK_IMPORTED_MODULE_3__["Link"]);
|
|
1194
|
-
/**
|
|
1195
|
-
* A component to turn any custom component into a clickable one.
|
|
1196
|
-
*
|
|
1197
|
-
* Works by wrapping `ClickableBehavior` around the child element and styling
|
|
1198
|
-
* the child appropriately and encapsulates routing logic which can be
|
|
1199
|
-
* customized. Expects a function which returns an element as its child.
|
|
1200
|
-
*
|
|
1201
|
-
* Clickable allows your components to:
|
|
1202
|
-
*
|
|
1203
|
-
* - Handle mouse / touch / keyboard events
|
|
1204
|
-
* - Match the standard behavior of the given role
|
|
1205
|
-
* - Apply custom styles based on pressed / focused / hovered state
|
|
1206
|
-
* - Perform Client Side Navigation when href is passed and the component is a
|
|
1207
|
-
* descendent of a react-router Router.
|
|
1208
|
-
*
|
|
1209
|
-
* ### Usage
|
|
1210
|
-
*
|
|
1211
|
-
* ```jsx
|
|
1212
|
-
* <Clickable onClick={() => alert("You clicked me!")}>
|
|
1213
|
-
* {({hovered, focused, pressed}) =>
|
|
1214
|
-
* <div
|
|
1215
|
-
* style={[
|
|
1216
|
-
* hovered && styles.hovered,
|
|
1217
|
-
* focused && styles.focused,
|
|
1218
|
-
* pressed && styles.pressed,
|
|
1219
|
-
* ]}
|
|
1220
|
-
* >
|
|
1221
|
-
* Click Me!
|
|
1222
|
-
* </div>
|
|
1223
|
-
* }
|
|
1224
|
-
* </Clickable>
|
|
1225
|
-
* ```
|
|
1226
|
-
*/
|
|
1227
|
-
|
|
1228
|
-
class Clickable extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
1229
|
-
constructor(...args) {
|
|
1230
|
-
super(...args);
|
|
1231
|
-
|
|
1232
|
-
this.getCorrectTag = (clickableState, router, commonProps) => {
|
|
1233
|
-
const activeHref = this.props.href && !this.props.disabled;
|
|
1234
|
-
const useClient = router && !this.props.skipClientNav && Object(_util_is_client_side_url_js__WEBPACK_IMPORTED_MODULE_8__[/* isClientSideUrl */ "a"])(this.props.href || ""); // NOTE: checking this.props.href here is redundant, but flow
|
|
1235
|
-
// needs it to refine this.props.href to a string.
|
|
1236
|
-
|
|
1237
|
-
if (activeHref && useClient && this.props.href) {
|
|
1238
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](StyledLink, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, commonProps, {
|
|
1239
|
-
to: this.props.href,
|
|
1240
|
-
role: this.props.role,
|
|
1241
|
-
target: this.props.target || undefined,
|
|
1242
|
-
"aria-disabled": this.props.disabled ? "true" : undefined
|
|
1243
|
-
}), this.props.children(clickableState));
|
|
1244
|
-
} else if (activeHref && !useClient) {
|
|
1245
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](StyledAnchor, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, commonProps, {
|
|
1246
|
-
href: this.props.href,
|
|
1247
|
-
role: this.props.role,
|
|
1248
|
-
target: this.props.target || undefined,
|
|
1249
|
-
"aria-disabled": this.props.disabled ? "true" : undefined
|
|
1250
|
-
}), this.props.children(clickableState));
|
|
1251
|
-
} else {
|
|
1252
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](StyledButton, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, commonProps, {
|
|
1253
|
-
type: "button",
|
|
1254
|
-
"aria-disabled": this.props.disabled
|
|
1255
|
-
}), this.props.children(clickableState));
|
|
1256
|
-
}
|
|
1257
|
-
};
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
renderClickableBehavior(router) {
|
|
1261
|
-
const {
|
|
1262
|
-
href,
|
|
1263
|
-
onClick,
|
|
1264
|
-
skipClientNav,
|
|
1265
|
-
beforeNav = undefined,
|
|
1266
|
-
safeWithNav = undefined,
|
|
1267
|
-
style,
|
|
1268
|
-
target = undefined,
|
|
1269
|
-
testId,
|
|
1270
|
-
onKeyDown,
|
|
1271
|
-
onKeyUp,
|
|
1272
|
-
hideDefaultFocusRing,
|
|
1273
|
-
light,
|
|
1274
|
-
disabled,
|
|
1275
|
-
...restProps
|
|
1276
|
-
} = this.props;
|
|
1277
|
-
const ClickableBehavior = Object(_util_get_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(href, skipClientNav, router);
|
|
1278
|
-
|
|
1279
|
-
const getStyle = state => [styles.reset, styles.link, !hideDefaultFocusRing && state.focused && (light ? styles.focusedLight : styles.focused), disabled && styles.disabled, style];
|
|
1280
|
-
|
|
1281
|
-
if (beforeNav) {
|
|
1282
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](ClickableBehavior, {
|
|
1283
|
-
href: href,
|
|
1284
|
-
onClick: onClick,
|
|
1285
|
-
beforeNav: beforeNav,
|
|
1286
|
-
safeWithNav: safeWithNav,
|
|
1287
|
-
onKeyDown: onKeyDown,
|
|
1288
|
-
onKeyUp: onKeyUp,
|
|
1289
|
-
disabled: disabled
|
|
1290
|
-
}, (state, childrenProps) => this.getCorrectTag(state, router, { ...restProps,
|
|
1291
|
-
"data-test-id": testId,
|
|
1292
|
-
style: getStyle(state),
|
|
1293
|
-
...childrenProps
|
|
1294
|
-
}));
|
|
1295
|
-
} else {
|
|
1296
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](ClickableBehavior, {
|
|
1297
|
-
href: href,
|
|
1298
|
-
onClick: onClick,
|
|
1299
|
-
safeWithNav: safeWithNav,
|
|
1300
|
-
onKeyDown: onKeyDown,
|
|
1301
|
-
onKeyUp: onKeyUp,
|
|
1302
|
-
target: target,
|
|
1303
|
-
disabled: disabled
|
|
1304
|
-
}, (state, childrenProps) => this.getCorrectTag(state, router, { ...restProps,
|
|
1305
|
-
"data-test-id": testId,
|
|
1306
|
-
style: getStyle(state),
|
|
1307
|
-
...childrenProps
|
|
1308
|
-
}));
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
render() {
|
|
1313
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react_router__WEBPACK_IMPORTED_MODULE_4__["__RouterContext"].Consumer, null, router => this.renderClickableBehavior(router));
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
} // Source: https://gist.github.com/MoOx/9137295
|
|
1317
|
-
|
|
1318
|
-
Clickable.defaultProps = {
|
|
1319
|
-
light: false,
|
|
1320
|
-
disabled: false
|
|
1321
|
-
};
|
|
1322
|
-
const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
1323
|
-
reset: {
|
|
1324
|
-
border: "none",
|
|
1325
|
-
margin: 0,
|
|
1326
|
-
padding: 0,
|
|
1327
|
-
width: "auto",
|
|
1328
|
-
overflow: "visible",
|
|
1329
|
-
background: "transparent",
|
|
1330
|
-
textDecoration: "none",
|
|
1331
|
-
|
|
1332
|
-
/* inherit font & color from ancestor */
|
|
1333
|
-
color: "inherit",
|
|
1334
|
-
font: "inherit",
|
|
1335
|
-
boxSizing: "border-box",
|
|
1336
|
-
// This removes the 300ms click delay on mobile browsers by indicating that
|
|
1337
|
-
// "double-tap to zoom" shouldn't be used on this element.
|
|
1338
|
-
touchAction: "manipulation",
|
|
1339
|
-
userSelect: "none",
|
|
1340
|
-
// This is usual frowned upon b/c of accessibility. We expect users of Clickable
|
|
1341
|
-
// to define their own focus styles.
|
|
1342
|
-
outline: "none",
|
|
1343
|
-
|
|
1344
|
-
/* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */
|
|
1345
|
-
lineHeight: "normal",
|
|
1346
|
-
|
|
1347
|
-
/* Corrects font smoothing for webkit */
|
|
1348
|
-
WebkitFontSmoothing: "inherit",
|
|
1349
|
-
MozOsxFontSmoothing: "inherit"
|
|
1350
|
-
},
|
|
1351
|
-
link: {
|
|
1352
|
-
cursor: "pointer"
|
|
1353
|
-
},
|
|
1354
|
-
focused: {
|
|
1355
|
-
":focus": {
|
|
1356
|
-
outline: `solid 2px ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.blue}`
|
|
1357
|
-
}
|
|
1358
|
-
},
|
|
1359
|
-
focusedLight: {
|
|
1360
|
-
outline: `solid 2px ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.white}`
|
|
1361
|
-
},
|
|
1362
|
-
disabled: {
|
|
1363
|
-
color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack32,
|
|
1364
|
-
cursor: "not-allowed",
|
|
1365
|
-
":focus": {
|
|
1366
|
-
outline: "none"
|
|
1367
|
-
},
|
|
1368
|
-
":focus-visible": {
|
|
1369
|
-
outline: `solid 2px ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.blue}`
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
});
|
|
1373
|
-
|
|
1374
|
-
/***/ }),
|
|
1375
|
-
/* 9 */
|
|
1376
|
-
/***/ (function(module, exports) {
|
|
1377
|
-
|
|
1378
|
-
module.exports = require("aphrodite");
|
|
1379
|
-
|
|
1380
|
-
/***/ }),
|
|
1381
|
-
/* 10 */
|
|
1382
|
-
/***/ (function(module, exports) {
|
|
1383
|
-
|
|
1384
|
-
module.exports = require("react-router");
|
|
1385
|
-
|
|
1386
|
-
/***/ }),
|
|
1387
|
-
/* 11 */
|
|
1388
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1389
|
-
|
|
1390
|
-
"use strict";
|
|
1391
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1392
|
-
/* harmony import */ var _components_clickable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
1393
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _components_clickable_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
|
|
1394
|
-
|
|
1395
|
-
/* harmony import */ var _components_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
1396
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClickableBehavior", function() { return _components_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
|
|
1397
|
-
|
|
1398
|
-
/* harmony import */ var _util_get_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
1399
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getClickableBehavior", function() { return _util_get_clickable_behavior_js__WEBPACK_IMPORTED_MODULE_2__["a"]; });
|
|
1400
|
-
|
|
1401
|
-
/* harmony import */ var _util_is_client_side_url_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
1402
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isClientSideUrl", function() { return _util_is_client_side_url_js__WEBPACK_IMPORTED_MODULE_3__["a"]; });
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
/***/ })
|
|
1411
|
-
/******/ ]);
|