@khanacademy/wonder-blocks-grid 1.0.27 → 1.0.28
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 +6 -0
- package/dist/es/index.js +14 -14
- package/dist/index.js +861 -343
- package/package.json +4 -5
- package/src/components/__tests__/row.test.js +1 -0
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 9);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -93,380 +93,910 @@ module.exports = require("react");
|
|
|
93
93
|
|
|
94
94
|
/***/ }),
|
|
95
95
|
/* 1 */
|
|
96
|
-
/***/ (function(module, exports) {
|
|
96
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
97
97
|
|
|
98
|
-
module.exports =
|
|
98
|
+
module.exports =
|
|
99
|
+
/******/
|
|
100
|
+
function (modules) {
|
|
101
|
+
// webpackBootstrap
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
103
|
+
/******/
|
|
104
|
+
// The module cache
|
|
103
105
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/* unused harmony export MEDIA_MODAL_SPEC */
|
|
108
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MediaLayout; });
|
|
109
|
-
/* unused harmony export MediaLayoutContext */
|
|
110
|
-
/* unused harmony export Spring */
|
|
111
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Strut; });
|
|
112
|
-
/* unused harmony export VALID_MEDIA_SIZES */
|
|
113
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return queryMatchesSize; });
|
|
114
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
115
|
-
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
|
116
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
|
117
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
118
|
-
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
119
|
-
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2__);
|
|
120
|
-
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
121
|
-
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_3__);
|
|
122
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
|
|
123
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// All possible valid media sizes
|
|
129
|
-
|
|
130
|
-
const VALID_MEDIA_SIZES = ["small", "medium", "large"];
|
|
131
|
-
const mediaDefaultSpecLargeMarginWidth = _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.large_24; // The default spec for media layout, currently available in
|
|
132
|
-
// three different settings (roughly mobile, tablet, and desktop).
|
|
133
|
-
|
|
134
|
-
const MEDIA_DEFAULT_SPEC = {
|
|
135
|
-
small: {
|
|
136
|
-
query: "(max-width: 767px)",
|
|
137
|
-
totalColumns: 4,
|
|
138
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16,
|
|
139
|
-
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16
|
|
140
|
-
},
|
|
141
|
-
medium: {
|
|
142
|
-
query: "(min-width: 768px) and (max-width: 1023px)",
|
|
143
|
-
totalColumns: 8,
|
|
144
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.xLarge_32,
|
|
145
|
-
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.large_24
|
|
146
|
-
},
|
|
147
|
-
large: {
|
|
148
|
-
query: "(min-width: 1024px)",
|
|
149
|
-
totalColumns: 12,
|
|
150
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.xLarge_32,
|
|
151
|
-
marginWidth: mediaDefaultSpecLargeMarginWidth,
|
|
152
|
-
maxWidth: 1120 + mediaDefaultSpecLargeMarginWidth * 2
|
|
153
|
-
}
|
|
154
|
-
}; // Used for internal tools
|
|
155
|
-
|
|
156
|
-
const MEDIA_INTERNAL_SPEC = {
|
|
157
|
-
large: {
|
|
158
|
-
query: "(min-width: 1px)",
|
|
159
|
-
totalColumns: 12,
|
|
160
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.xLarge_32,
|
|
161
|
-
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16
|
|
162
|
-
}
|
|
163
|
-
}; // The default used for modals
|
|
164
|
-
|
|
165
|
-
const MEDIA_MODAL_SPEC = {
|
|
166
|
-
small: {
|
|
167
|
-
query: "(max-width: 767px)",
|
|
168
|
-
totalColumns: 4,
|
|
169
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16,
|
|
170
|
-
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16
|
|
171
|
-
},
|
|
172
|
-
large: {
|
|
173
|
-
query: "(min-width: 768px)",
|
|
174
|
-
totalColumns: 12,
|
|
175
|
-
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.xLarge_32,
|
|
176
|
-
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.xxLarge_48
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
const defaultContext = {
|
|
180
|
-
ssrSize: "large",
|
|
181
|
-
mediaSpec: MEDIA_DEFAULT_SPEC
|
|
182
|
-
};
|
|
183
|
-
var MediaLayoutContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["createContext"])(defaultContext);
|
|
184
|
-
const queries = [].concat(Object.values(MEDIA_DEFAULT_SPEC).map(spec => spec.query), Object.values(MEDIA_INTERNAL_SPEC).map(spec => spec.query), Object.values(MEDIA_MODAL_SPEC).map(spec => spec.query));
|
|
185
|
-
const mediaQueryLists = {}; // eslint-disable-next-line flowtype/require-exact-type
|
|
186
|
-
// If for some reason we're not able to resolve the current media size we
|
|
187
|
-
// fall back to this state.
|
|
106
|
+
/******/
|
|
107
|
+
var installedModules = {};
|
|
108
|
+
/******/
|
|
188
109
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
110
|
+
/******/
|
|
111
|
+
// The require function
|
|
112
|
+
|
|
113
|
+
/******/
|
|
114
|
+
|
|
115
|
+
function __webpack_require__(moduleId) {
|
|
116
|
+
/******/
|
|
117
|
+
|
|
118
|
+
/******/
|
|
119
|
+
// Check if module is in cache
|
|
120
|
+
|
|
121
|
+
/******/
|
|
122
|
+
if (installedModules[moduleId]) {
|
|
123
|
+
/******/
|
|
124
|
+
return installedModules[moduleId].exports;
|
|
125
|
+
/******/
|
|
126
|
+
}
|
|
127
|
+
/******/
|
|
128
|
+
// Create a new module (and put it into the cache)
|
|
129
|
+
|
|
130
|
+
/******/
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
var module = installedModules[moduleId] = {
|
|
134
|
+
/******/
|
|
135
|
+
i: moduleId,
|
|
136
|
+
|
|
137
|
+
/******/
|
|
138
|
+
l: false,
|
|
139
|
+
|
|
140
|
+
/******/
|
|
141
|
+
exports: {}
|
|
142
|
+
/******/
|
|
196
143
|
|
|
197
|
-
class MediaLayoutInternal extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
198
|
-
// A collection of thunks that's used to clean up event listeners
|
|
199
|
-
// when the component is unmounted.
|
|
200
|
-
constructor(props) {
|
|
201
|
-
super(props);
|
|
202
|
-
this.state = {
|
|
203
|
-
size: undefined
|
|
204
144
|
};
|
|
205
|
-
|
|
145
|
+
/******/
|
|
146
|
+
|
|
147
|
+
/******/
|
|
148
|
+
// Execute the module function
|
|
149
|
+
|
|
150
|
+
/******/
|
|
151
|
+
|
|
152
|
+
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
153
|
+
/******/
|
|
154
|
+
|
|
155
|
+
/******/
|
|
156
|
+
// Flag the module as loaded
|
|
157
|
+
|
|
158
|
+
/******/
|
|
159
|
+
|
|
160
|
+
module.l = true;
|
|
161
|
+
/******/
|
|
162
|
+
|
|
163
|
+
/******/
|
|
164
|
+
// Return the exports of the module
|
|
165
|
+
|
|
166
|
+
/******/
|
|
167
|
+
|
|
168
|
+
return module.exports;
|
|
169
|
+
/******/
|
|
206
170
|
}
|
|
171
|
+
/******/
|
|
207
172
|
|
|
208
|
-
|
|
209
|
-
// TODO(WB-534): handle changes to mediaSpec prop
|
|
210
|
-
const entries = Object.entries(this.props.mediaSpec);
|
|
173
|
+
/******/
|
|
211
174
|
|
|
212
|
-
|
|
213
|
-
|
|
175
|
+
/******/
|
|
176
|
+
// expose the modules object (__webpack_modules__)
|
|
214
177
|
|
|
215
|
-
|
|
216
|
-
continue;
|
|
217
|
-
}
|
|
178
|
+
/******/
|
|
218
179
|
|
|
219
|
-
const listener = e => {
|
|
220
|
-
if (e.matches) {
|
|
221
|
-
this.setState({
|
|
222
|
-
size
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
180
|
|
|
227
|
-
|
|
228
|
-
|
|
181
|
+
__webpack_require__.m = modules;
|
|
182
|
+
/******/
|
|
183
|
+
|
|
184
|
+
/******/
|
|
185
|
+
// expose the module cache
|
|
186
|
+
|
|
187
|
+
/******/
|
|
188
|
+
|
|
189
|
+
__webpack_require__.c = installedModules;
|
|
190
|
+
/******/
|
|
191
|
+
|
|
192
|
+
/******/
|
|
193
|
+
// define getter function for harmony exports
|
|
194
|
+
|
|
195
|
+
/******/
|
|
196
|
+
|
|
197
|
+
__webpack_require__.d = function (exports, name, getter) {
|
|
198
|
+
/******/
|
|
199
|
+
if (!__webpack_require__.o(exports, name)) {
|
|
200
|
+
/******/
|
|
201
|
+
Object.defineProperty(exports, name, {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
get: getter
|
|
204
|
+
});
|
|
205
|
+
/******/
|
|
229
206
|
}
|
|
230
|
-
|
|
207
|
+
/******/
|
|
208
|
+
|
|
209
|
+
};
|
|
210
|
+
/******/
|
|
211
|
+
|
|
212
|
+
/******/
|
|
213
|
+
// define __esModule on exports
|
|
214
|
+
|
|
215
|
+
/******/
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
__webpack_require__.r = function (exports) {
|
|
219
|
+
/******/
|
|
220
|
+
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
221
|
+
/******/
|
|
222
|
+
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
223
|
+
value: 'Module'
|
|
224
|
+
});
|
|
225
|
+
/******/
|
|
226
|
+
}
|
|
227
|
+
/******/
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
Object.defineProperty(exports, '__esModule', {
|
|
231
|
+
value: true
|
|
232
|
+
});
|
|
233
|
+
/******/
|
|
234
|
+
};
|
|
235
|
+
/******/
|
|
236
|
+
|
|
237
|
+
/******/
|
|
238
|
+
// create a fake namespace object
|
|
239
|
+
|
|
240
|
+
/******/
|
|
241
|
+
// mode & 1: value is a module id, require it
|
|
242
|
+
|
|
243
|
+
/******/
|
|
244
|
+
// mode & 2: merge all properties of value into the ns
|
|
245
|
+
|
|
246
|
+
/******/
|
|
247
|
+
// mode & 4: return value when already ns object
|
|
248
|
+
|
|
249
|
+
/******/
|
|
250
|
+
// mode & 8|1: behave like require
|
|
251
|
+
|
|
252
|
+
/******/
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
__webpack_require__.t = function (value, mode) {
|
|
256
|
+
/******/
|
|
257
|
+
if (mode & 1) value = __webpack_require__(value);
|
|
258
|
+
/******/
|
|
259
|
+
|
|
260
|
+
if (mode & 8) return value;
|
|
261
|
+
/******/
|
|
262
|
+
|
|
263
|
+
if (mode & 4 && typeof value === 'object' && value && value.__esModule) return value;
|
|
264
|
+
/******/
|
|
265
|
+
|
|
266
|
+
var ns = Object.create(null);
|
|
267
|
+
/******/
|
|
268
|
+
|
|
269
|
+
__webpack_require__.r(ns);
|
|
270
|
+
/******/
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
Object.defineProperty(ns, 'default', {
|
|
274
|
+
enumerable: true,
|
|
275
|
+
value: value
|
|
276
|
+
});
|
|
277
|
+
/******/
|
|
278
|
+
|
|
279
|
+
if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) {
|
|
280
|
+
return value[key];
|
|
281
|
+
}.bind(null, key));
|
|
282
|
+
/******/
|
|
283
|
+
|
|
284
|
+
return ns;
|
|
285
|
+
/******/
|
|
286
|
+
};
|
|
287
|
+
/******/
|
|
288
|
+
|
|
289
|
+
/******/
|
|
290
|
+
// getDefaultExport function for compatibility with non-harmony modules
|
|
291
|
+
|
|
292
|
+
/******/
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
__webpack_require__.n = function (module) {
|
|
296
|
+
/******/
|
|
297
|
+
var getter = module && module.__esModule ?
|
|
298
|
+
/******/
|
|
299
|
+
function getDefault() {
|
|
300
|
+
return module['default'];
|
|
301
|
+
} :
|
|
302
|
+
/******/
|
|
303
|
+
function getModuleExports() {
|
|
304
|
+
return module;
|
|
305
|
+
};
|
|
306
|
+
/******/
|
|
307
|
+
|
|
308
|
+
__webpack_require__.d(getter, 'a', getter);
|
|
309
|
+
/******/
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
return getter;
|
|
313
|
+
/******/
|
|
314
|
+
};
|
|
315
|
+
/******/
|
|
316
|
+
|
|
317
|
+
/******/
|
|
318
|
+
// Object.prototype.hasOwnProperty.call
|
|
319
|
+
|
|
320
|
+
/******/
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
__webpack_require__.o = function (object, property) {
|
|
324
|
+
return Object.prototype.hasOwnProperty.call(object, property);
|
|
325
|
+
};
|
|
326
|
+
/******/
|
|
327
|
+
|
|
328
|
+
/******/
|
|
329
|
+
// __webpack_public_path__
|
|
330
|
+
|
|
331
|
+
/******/
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
__webpack_require__.p = "";
|
|
335
|
+
/******/
|
|
336
|
+
|
|
337
|
+
/******/
|
|
338
|
+
|
|
339
|
+
/******/
|
|
340
|
+
// Load entry module and return exports
|
|
341
|
+
|
|
342
|
+
/******/
|
|
343
|
+
|
|
344
|
+
return __webpack_require__(__webpack_require__.s = 10);
|
|
345
|
+
/******/
|
|
346
|
+
}
|
|
347
|
+
/************************************************************************/
|
|
348
|
+
|
|
349
|
+
/******/
|
|
350
|
+
([
|
|
351
|
+
/* 0 */
|
|
352
|
+
|
|
353
|
+
/***/
|
|
354
|
+
function (module, exports) {
|
|
355
|
+
module.exports = __webpack_require__(0);
|
|
356
|
+
/***/
|
|
357
|
+
},
|
|
358
|
+
/* 1 */
|
|
359
|
+
|
|
360
|
+
/***/
|
|
361
|
+
function (module, exports) {
|
|
362
|
+
module.exports = __webpack_require__(10);
|
|
363
|
+
/***/
|
|
364
|
+
},
|
|
365
|
+
/* 2 */
|
|
366
|
+
|
|
367
|
+
/***/
|
|
368
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
369
|
+
"use strict";
|
|
370
|
+
/* harmony export (binding) */
|
|
371
|
+
|
|
372
|
+
__webpack_require__.d(__webpack_exports__, "d", function () {
|
|
373
|
+
return VALID_MEDIA_SIZES;
|
|
374
|
+
});
|
|
375
|
+
/* harmony export (binding) */
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
379
|
+
return MEDIA_DEFAULT_SPEC;
|
|
380
|
+
});
|
|
381
|
+
/* harmony export (binding) */
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
__webpack_require__.d(__webpack_exports__, "b", function () {
|
|
385
|
+
return MEDIA_INTERNAL_SPEC;
|
|
386
|
+
});
|
|
387
|
+
/* harmony export (binding) */
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
__webpack_require__.d(__webpack_exports__, "c", function () {
|
|
391
|
+
return MEDIA_MODAL_SPEC;
|
|
392
|
+
});
|
|
393
|
+
/* harmony import */
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
397
|
+
/* harmony import */
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__); // All possible valid media sizes
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
const VALID_MEDIA_SIZES = ["small", "medium", "large"];
|
|
404
|
+
const mediaDefaultSpecLargeMarginWidth = _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.large_24; // The default spec for media layout, currently available in
|
|
405
|
+
// three different settings (roughly mobile, tablet, and desktop).
|
|
406
|
+
|
|
407
|
+
const MEDIA_DEFAULT_SPEC = {
|
|
408
|
+
small: {
|
|
409
|
+
query: "(max-width: 767px)",
|
|
410
|
+
totalColumns: 4,
|
|
411
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.medium_16,
|
|
412
|
+
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.medium_16
|
|
413
|
+
},
|
|
414
|
+
medium: {
|
|
415
|
+
query: "(min-width: 768px) and (max-width: 1023px)",
|
|
416
|
+
totalColumns: 8,
|
|
417
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xLarge_32,
|
|
418
|
+
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.large_24
|
|
419
|
+
},
|
|
420
|
+
large: {
|
|
421
|
+
query: "(min-width: 1024px)",
|
|
422
|
+
totalColumns: 12,
|
|
423
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xLarge_32,
|
|
424
|
+
marginWidth: mediaDefaultSpecLargeMarginWidth,
|
|
425
|
+
maxWidth: 1120 + mediaDefaultSpecLargeMarginWidth * 2
|
|
426
|
+
}
|
|
427
|
+
}; // Used for internal tools
|
|
428
|
+
|
|
429
|
+
const MEDIA_INTERNAL_SPEC = {
|
|
430
|
+
large: {
|
|
431
|
+
query: "(min-width: 1px)",
|
|
432
|
+
totalColumns: 12,
|
|
433
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xLarge_32,
|
|
434
|
+
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.medium_16
|
|
435
|
+
}
|
|
436
|
+
}; // The default used for modals
|
|
437
|
+
|
|
438
|
+
const MEDIA_MODAL_SPEC = {
|
|
439
|
+
small: {
|
|
440
|
+
query: "(max-width: 767px)",
|
|
441
|
+
totalColumns: 4,
|
|
442
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.medium_16,
|
|
443
|
+
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.medium_16
|
|
444
|
+
},
|
|
445
|
+
large: {
|
|
446
|
+
query: "(min-width: 768px)",
|
|
447
|
+
totalColumns: 12,
|
|
448
|
+
gutterWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xLarge_32,
|
|
449
|
+
marginWidth: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xxLarge_48
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
/***/
|
|
453
|
+
},
|
|
454
|
+
/* 3 */
|
|
231
455
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
456
|
+
/***/
|
|
457
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
458
|
+
"use strict";
|
|
459
|
+
/* harmony import */
|
|
460
|
+
|
|
461
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
462
|
+
/* harmony import */
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
466
|
+
/* harmony import */
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
var _util_specs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
470
|
+
|
|
471
|
+
const defaultContext = {
|
|
472
|
+
ssrSize: "large",
|
|
473
|
+
mediaSpec: _util_specs_js__WEBPACK_IMPORTED_MODULE_1__[
|
|
474
|
+
/* MEDIA_DEFAULT_SPEC */
|
|
475
|
+
"a"]
|
|
476
|
+
};
|
|
477
|
+
/* harmony default export */
|
|
478
|
+
|
|
479
|
+
__webpack_exports__["a"] = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](defaultContext);
|
|
480
|
+
/***/
|
|
481
|
+
},
|
|
482
|
+
/* 4 */
|
|
483
|
+
|
|
484
|
+
/***/
|
|
485
|
+
function (module, exports) {
|
|
486
|
+
module.exports = __webpack_require__(3);
|
|
487
|
+
/***/
|
|
488
|
+
},
|
|
489
|
+
/* 5 */
|
|
490
|
+
|
|
491
|
+
/***/
|
|
492
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
493
|
+
"use strict";
|
|
494
|
+
/* harmony export (binding) */
|
|
495
|
+
|
|
496
|
+
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
497
|
+
return MediaLayout;
|
|
498
|
+
});
|
|
499
|
+
/* harmony import */
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
503
|
+
/* harmony import */
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
507
|
+
/* harmony import */
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
var _media_layout_context_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
511
|
+
/* harmony import */
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
var _util_specs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
|
515
|
+
|
|
516
|
+
function _extends() {
|
|
517
|
+
_extends = Object.assign || function (target) {
|
|
518
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
519
|
+
var source = arguments[i];
|
|
520
|
+
|
|
521
|
+
for (var key in source) {
|
|
522
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
523
|
+
target[key] = source[key];
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
return target;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
return _extends.apply(this, arguments);
|
|
235
532
|
}
|
|
236
533
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
534
|
+
const queries = [].concat(Object.values(_util_specs_js__WEBPACK_IMPORTED_MODULE_2__[
|
|
535
|
+
/* MEDIA_DEFAULT_SPEC */
|
|
536
|
+
"a"]).map(spec => spec.query), Object.values(_util_specs_js__WEBPACK_IMPORTED_MODULE_2__[
|
|
537
|
+
/* MEDIA_INTERNAL_SPEC */
|
|
538
|
+
"b"]).map(spec => spec.query), Object.values(_util_specs_js__WEBPACK_IMPORTED_MODULE_2__[
|
|
539
|
+
/* MEDIA_MODAL_SPEC */
|
|
540
|
+
"c"]).map(spec => spec.query));
|
|
541
|
+
const mediaQueryLists = {}; // eslint-disable-next-line flowtype/require-exact-type
|
|
542
|
+
// If for some reason we're not able to resolve the current media size we
|
|
543
|
+
// fall back to this state.
|
|
544
|
+
|
|
545
|
+
const DEFAULT_SIZE = "large";
|
|
546
|
+
/**
|
|
547
|
+
* `MediaLayout` is responsible for changing the rendering of contents at
|
|
548
|
+
* differently sized viewports. `MediaLayoutContext.Provider` can be used
|
|
549
|
+
* to specify different breakpoint configurations. By default it uses
|
|
550
|
+
* `MEDIA_DEFAULT_SPEC`. See media-layout-context.js for additiional options.
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
class MediaLayoutInternal extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
554
|
+
// A collection of thunks that's used to clean up event listeners
|
|
555
|
+
// when the component is unmounted.
|
|
556
|
+
constructor(props) {
|
|
557
|
+
super(props);
|
|
558
|
+
this.state = {
|
|
559
|
+
size: undefined
|
|
560
|
+
};
|
|
561
|
+
this.cleanupThunks = [];
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
componentDidMount() {
|
|
565
|
+
// TODO(WB-534): handle changes to mediaSpec prop
|
|
244
566
|
const entries = Object.entries(this.props.mediaSpec);
|
|
245
567
|
|
|
246
|
-
for (const [size,
|
|
247
|
-
const mql = mediaQueryLists[
|
|
568
|
+
for (const [size, spec] of entries) {
|
|
569
|
+
const mql = mediaQueryLists[spec.query]; // during SSR there are no MediaQueryLists
|
|
248
570
|
|
|
249
|
-
if (mql
|
|
250
|
-
|
|
571
|
+
if (!mql) {
|
|
572
|
+
continue;
|
|
251
573
|
}
|
|
574
|
+
|
|
575
|
+
const listener = e => {
|
|
576
|
+
if (e.matches) {
|
|
577
|
+
this.setState({
|
|
578
|
+
size
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
mql.addListener(listener);
|
|
584
|
+
this.cleanupThunks.push(() => mql.removeListener(listener));
|
|
252
585
|
}
|
|
253
586
|
}
|
|
254
587
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
588
|
+
componentWillUnmount() {
|
|
589
|
+
// Remove our listeners.
|
|
590
|
+
this.cleanupThunks.forEach(cleaup => cleaup());
|
|
591
|
+
}
|
|
259
592
|
|
|
593
|
+
getCurrentSize(spec) {
|
|
594
|
+
// If we have a state with the current size in it then we always want
|
|
595
|
+
// to use that. This will happen if the viewport changes sizes after
|
|
596
|
+
// we've already initialized.
|
|
597
|
+
if (this.state.size) {
|
|
598
|
+
return this.state.size;
|
|
599
|
+
} else {
|
|
600
|
+
const entries = Object.entries(this.props.mediaSpec);
|
|
601
|
+
|
|
602
|
+
for (const [size, spec] of entries) {
|
|
603
|
+
const mql = mediaQueryLists[spec.query];
|
|
604
|
+
|
|
605
|
+
if (mql.matches) {
|
|
606
|
+
return size;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
260
610
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
// styleSheets prop and then all of the individual styles. We merge the
|
|
266
|
-
// styles together
|
|
267
|
-
// TODO(WB-533): move to util.js to make it easier to test
|
|
611
|
+
return DEFAULT_SIZE;
|
|
612
|
+
} // We assume that we're running on the server (or, at least, an unsupported
|
|
613
|
+
// environment) if there is no window object or matchMedia function
|
|
614
|
+
// available.
|
|
268
615
|
|
|
269
616
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
617
|
+
isServerSide() {
|
|
618
|
+
return typeof window === "undefined" || !window.matchMedia;
|
|
619
|
+
} // Generate a mock Aphrodite StyleSheet based upon the current mediaSize
|
|
620
|
+
// We do this by looking at all of the stylesheets specified in the
|
|
621
|
+
// styleSheets prop and then all of the individual styles. We merge the
|
|
622
|
+
// styles together
|
|
623
|
+
// TODO(WB-533): move to util.js to make it easier to test
|
|
275
624
|
|
|
276
|
-
if (!styleSheets) {
|
|
277
|
-
return mockStyleSheet;
|
|
278
|
-
} // Go through all of the stylesheets that were specified
|
|
279
625
|
|
|
626
|
+
getMockStyleSheet(mediaSize) {
|
|
627
|
+
const {
|
|
628
|
+
styleSheets
|
|
629
|
+
} = this.props;
|
|
630
|
+
const mockStyleSheet = {}; // If no stylesheets were specified then we just return an empty object
|
|
280
631
|
|
|
281
|
-
|
|
282
|
-
|
|
632
|
+
if (!styleSheets) {
|
|
633
|
+
return mockStyleSheet;
|
|
634
|
+
} // Go through all of the stylesheets that were specified
|
|
283
635
|
|
|
284
|
-
if (!styleSheet) {
|
|
285
|
-
continue;
|
|
286
|
-
} // And then through each key of each stylesheet
|
|
287
636
|
|
|
637
|
+
for (const styleSize of Object.keys(styleSheets)) {
|
|
638
|
+
const styleSheet = styleSheets[styleSize];
|
|
288
639
|
|
|
289
|
-
|
|
290
|
-
if ( // $FlowIgnore[method-unbinding]
|
|
291
|
-
Object.prototype.hasOwnProperty.call(mockStyleSheet, name)) {
|
|
640
|
+
if (!styleSheet) {
|
|
292
641
|
continue;
|
|
293
|
-
} //
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
642
|
+
} // And then through each key of each stylesheet
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
for (const name of Object.keys(styleSheet)) {
|
|
646
|
+
if ( // $FlowIgnore[method-unbinding]
|
|
647
|
+
Object.prototype.hasOwnProperty.call(mockStyleSheet, name)) {
|
|
648
|
+
continue;
|
|
649
|
+
} // We create an entry that combines the values from all of
|
|
650
|
+
// the stylesheets together in least-specific to most-specific
|
|
651
|
+
// priority (thus small/medium/large styles will always have
|
|
652
|
+
// precedence over "all" or mdOrSmaller/mdOrLarger/etc.).
|
|
297
653
|
|
|
298
654
|
|
|
299
|
-
|
|
655
|
+
mockStyleSheet[name] = [styleSheets.all && styleSheets.all[name], mediaSize === "small" && [styleSheets.mdOrSmaller && styleSheets.mdOrSmaller[name], styleSheets.small && styleSheets.small[name]], mediaSize === "medium" && [styleSheets.mdOrSmaller && styleSheets.mdOrSmaller[name], styleSheets.mdOrLarger && styleSheets.mdOrLarger[name], styleSheets.medium && styleSheets.medium[name]], mediaSize === "large" && [styleSheets.mdOrLarger && styleSheets.mdOrLarger[name], styleSheets.large && styleSheets.large[name]]];
|
|
656
|
+
}
|
|
300
657
|
}
|
|
658
|
+
|
|
659
|
+
return mockStyleSheet;
|
|
301
660
|
}
|
|
302
661
|
|
|
303
|
-
|
|
304
|
-
|
|
662
|
+
render() {
|
|
663
|
+
const {
|
|
664
|
+
children,
|
|
665
|
+
mediaSpec,
|
|
666
|
+
ssrSize,
|
|
667
|
+
overrideSize
|
|
668
|
+
} = this.props; // We need to create the MediaQueryLists during the first render in order
|
|
669
|
+
// to query whether any of them match.
|
|
670
|
+
|
|
671
|
+
if (!this.isServerSide()) {
|
|
672
|
+
for (const query of queries.filter(query => !mediaQueryLists[query])) {
|
|
673
|
+
mediaQueryLists[query] = window.matchMedia(query);
|
|
674
|
+
}
|
|
675
|
+
} // We need to figure out what the current media size is
|
|
676
|
+
// If an override has been specified, we use that.
|
|
677
|
+
// If we're rendering on the server then we use the default
|
|
678
|
+
// SSR rendering size.
|
|
679
|
+
// Otherwise we attempt to get the current size based on
|
|
680
|
+
// the current MediaSpec.
|
|
305
681
|
|
|
306
|
-
render() {
|
|
307
|
-
const {
|
|
308
|
-
children,
|
|
309
|
-
mediaSpec,
|
|
310
|
-
ssrSize,
|
|
311
|
-
overrideSize
|
|
312
|
-
} = this.props; // We need to create the MediaQueryLists during the first render in order
|
|
313
|
-
// to query whether any of them match.
|
|
314
|
-
|
|
315
|
-
if (!this.isServerSide()) {
|
|
316
|
-
for (const query of queries.filter(query => !mediaQueryLists[query])) {
|
|
317
|
-
mediaQueryLists[query] = window.matchMedia(query);
|
|
318
|
-
}
|
|
319
|
-
} // We need to figure out what the current media size is
|
|
320
|
-
// If an override has been specified, we use that.
|
|
321
|
-
// If we're rendering on the server then we use the default
|
|
322
|
-
// SSR rendering size.
|
|
323
|
-
// Otherwise we attempt to get the current size based on
|
|
324
|
-
// the current MediaSpec.
|
|
325
682
|
|
|
683
|
+
const mediaSize = overrideSize || this.isServerSide() && ssrSize || this.getCurrentSize(mediaSpec); // Generate a mock stylesheet
|
|
684
|
+
|
|
685
|
+
const styles = this.getMockStyleSheet(mediaSize);
|
|
686
|
+
return children({
|
|
687
|
+
mediaSize,
|
|
688
|
+
mediaSpec,
|
|
689
|
+
styles
|
|
690
|
+
});
|
|
691
|
+
}
|
|
326
692
|
|
|
327
|
-
|
|
693
|
+
} // gen-snapshot-tests.js only understands `export default class ...`
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
class MediaLayout extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
697
|
+
render() {
|
|
698
|
+
// We listen to the MediaLayoutContext to see what defaults we're
|
|
699
|
+
// being given (this can be overriden by wrapping this component in
|
|
700
|
+
// a MediaLayoutContext.Consumer).
|
|
701
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_media_layout_context_js__WEBPACK_IMPORTED_MODULE_1__[
|
|
702
|
+
/* default */
|
|
703
|
+
"a"].Consumer, null, ({
|
|
704
|
+
overrideSize,
|
|
705
|
+
ssrSize,
|
|
706
|
+
mediaSpec
|
|
707
|
+
}) => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](MediaLayoutInternal, _extends({}, this.props, {
|
|
708
|
+
overrideSize: overrideSize,
|
|
709
|
+
ssrSize: ssrSize,
|
|
710
|
+
mediaSpec: mediaSpec
|
|
711
|
+
})));
|
|
712
|
+
}
|
|
328
713
|
|
|
329
|
-
const styles = this.getMockStyleSheet(mediaSize);
|
|
330
|
-
return children({
|
|
331
|
-
mediaSize,
|
|
332
|
-
mediaSpec,
|
|
333
|
-
styles
|
|
334
|
-
});
|
|
335
714
|
}
|
|
715
|
+
/***/
|
|
336
716
|
|
|
337
|
-
}
|
|
717
|
+
},
|
|
718
|
+
/* 6 */
|
|
338
719
|
|
|
720
|
+
/***/
|
|
721
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
722
|
+
"use strict";
|
|
723
|
+
/* harmony export (binding) */
|
|
339
724
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
// a MediaLayoutContext.Consumer).
|
|
345
|
-
return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["createElement"])(MediaLayoutContext.Consumer, null, ({
|
|
346
|
-
overrideSize,
|
|
347
|
-
ssrSize,
|
|
348
|
-
mediaSpec
|
|
349
|
-
}) => /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["createElement"])(MediaLayoutInternal, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, {
|
|
350
|
-
overrideSize: overrideSize,
|
|
351
|
-
ssrSize: ssrSize,
|
|
352
|
-
mediaSpec: mediaSpec
|
|
353
|
-
})));
|
|
354
|
-
}
|
|
725
|
+
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
726
|
+
return Spring;
|
|
727
|
+
});
|
|
728
|
+
/* harmony import */
|
|
355
729
|
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Expands to fill space between sibling components.
|
|
359
|
-
*
|
|
360
|
-
* Assumes parent is a View.
|
|
361
|
-
*/
|
|
362
730
|
|
|
731
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
732
|
+
/* harmony import */
|
|
363
733
|
|
|
364
|
-
class Spring extends react__WEBPACK_IMPORTED_MODULE_1__["Component"] {
|
|
365
|
-
render() {
|
|
366
|
-
const {
|
|
367
|
-
style
|
|
368
|
-
} = this.props;
|
|
369
|
-
return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__["View"], {
|
|
370
|
-
"aria-hidden": "true",
|
|
371
|
-
style: [styles.grow, style]
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
734
|
|
|
375
|
-
|
|
735
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
736
|
+
/* harmony import */
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
740
|
+
/* harmony import */
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
744
|
+
/* harmony import */
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
748
|
+
/* harmony import */
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
752
|
+
/**
|
|
753
|
+
* Expands to fill space between sibling components.
|
|
754
|
+
*
|
|
755
|
+
* Assumes parent is a View.
|
|
756
|
+
*/
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
class Spring extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
760
|
+
render() {
|
|
761
|
+
const {
|
|
762
|
+
style
|
|
763
|
+
} = this.props;
|
|
764
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2__["View"], {
|
|
765
|
+
"aria-hidden": "true",
|
|
766
|
+
style: [styles.grow, style]
|
|
767
|
+
});
|
|
768
|
+
}
|
|
376
769
|
|
|
377
|
-
const styles = aphrodite__WEBPACK_IMPORTED_MODULE_3__["StyleSheet"].create({
|
|
378
|
-
grow: {
|
|
379
|
-
flexGrow: 1
|
|
380
770
|
}
|
|
381
|
-
});
|
|
382
|
-
/**
|
|
383
|
-
* A component for inserting fixed space between components.
|
|
384
|
-
*
|
|
385
|
-
* Assumes parent is a View.
|
|
386
|
-
*/
|
|
387
771
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
772
|
+
const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
773
|
+
grow: {
|
|
774
|
+
flexGrow: 1
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
/***/
|
|
778
|
+
},
|
|
779
|
+
/* 7 */
|
|
780
|
+
|
|
781
|
+
/***/
|
|
782
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
783
|
+
"use strict";
|
|
784
|
+
/* harmony export (binding) */
|
|
785
|
+
|
|
786
|
+
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
787
|
+
return Strut;
|
|
788
|
+
});
|
|
789
|
+
/* harmony import */
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
793
|
+
/* harmony import */
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
797
|
+
/* harmony import */
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
801
|
+
/* harmony import */
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
805
|
+
/**
|
|
806
|
+
* A component for inserting fixed space between components.
|
|
807
|
+
*
|
|
808
|
+
* Assumes parent is a View.
|
|
809
|
+
*/
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
class Strut extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
813
|
+
render() {
|
|
814
|
+
const {
|
|
815
|
+
size,
|
|
816
|
+
style
|
|
817
|
+
} = this.props;
|
|
818
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1__["View"], {
|
|
819
|
+
"aria-hidden": "true",
|
|
820
|
+
style: [strutStyle(size), style]
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
|
|
398
824
|
}
|
|
399
825
|
|
|
400
|
-
|
|
826
|
+
const strutStyle = size => {
|
|
827
|
+
return {
|
|
828
|
+
width: size,
|
|
829
|
+
MsFlexBasis: size,
|
|
830
|
+
MsFlexPreferredSize: size,
|
|
831
|
+
WebkitFlexBasis: size,
|
|
832
|
+
flexBasis: size,
|
|
833
|
+
flexShrink: 0
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
/***/
|
|
401
837
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
838
|
+
},
|
|
839
|
+
/* 8 */
|
|
840
|
+
|
|
841
|
+
/***/
|
|
842
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
843
|
+
"use strict";
|
|
844
|
+
/* harmony export (binding) */
|
|
845
|
+
|
|
846
|
+
__webpack_require__.d(__webpack_exports__, "a", function () {
|
|
847
|
+
return queryMatchesSize;
|
|
848
|
+
});
|
|
849
|
+
/**
|
|
850
|
+
* Return where a media size matches a media query.
|
|
851
|
+
*
|
|
852
|
+
* examples:
|
|
853
|
+
* - `queryMatchesSize("all", "small")` returns `true`
|
|
854
|
+
* - `queryMatchesSize("mdOrLarger", "small")` returns `false`
|
|
855
|
+
*
|
|
856
|
+
* @param {MediaQuery} mediaQuery
|
|
857
|
+
* @param {MediaSize} mediaSize
|
|
858
|
+
*/
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
const queryMatchesSize = (mediaQuery, mediaSize) => {
|
|
862
|
+
switch (mediaQuery) {
|
|
863
|
+
case "all":
|
|
864
|
+
return true;
|
|
865
|
+
|
|
866
|
+
case "small":
|
|
867
|
+
return mediaSize === "small";
|
|
868
|
+
|
|
869
|
+
case "mdOrSmaller":
|
|
870
|
+
return mediaSize === "medium" || mediaSize === "small";
|
|
871
|
+
|
|
872
|
+
case "medium":
|
|
873
|
+
return mediaSize === "medium";
|
|
874
|
+
|
|
875
|
+
case "mdOrLarger":
|
|
876
|
+
return mediaSize === "medium" || mediaSize === "large";
|
|
877
|
+
|
|
878
|
+
case "large":
|
|
879
|
+
return mediaSize === "large";
|
|
880
|
+
|
|
881
|
+
default:
|
|
882
|
+
throw new Error(`Unsupported mediaSize: ${mediaSize}`);
|
|
883
|
+
}
|
|
410
884
|
};
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Return where a media size matches a media query.
|
|
414
|
-
*
|
|
415
|
-
* examples:
|
|
416
|
-
* - `queryMatchesSize("all", "small")` returns `true`
|
|
417
|
-
* - `queryMatchesSize("mdOrLarger", "small")` returns `false`
|
|
418
|
-
*
|
|
419
|
-
* @param {MediaQuery} mediaQuery
|
|
420
|
-
* @param {MediaSize} mediaSize
|
|
421
|
-
*/
|
|
885
|
+
/***/
|
|
422
886
|
|
|
887
|
+
},
|
|
888
|
+
/* 9 */
|
|
423
889
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
890
|
+
/***/
|
|
891
|
+
function (module, exports) {
|
|
892
|
+
module.exports = __webpack_require__(5);
|
|
893
|
+
/***/
|
|
894
|
+
},
|
|
895
|
+
/* 10 */
|
|
428
896
|
|
|
429
|
-
|
|
430
|
-
|
|
897
|
+
/***/
|
|
898
|
+
function (module, __webpack_exports__, __webpack_require__) {
|
|
899
|
+
"use strict";
|
|
431
900
|
|
|
432
|
-
|
|
433
|
-
|
|
901
|
+
__webpack_require__.r(__webpack_exports__);
|
|
902
|
+
/* harmony import */
|
|
434
903
|
|
|
435
|
-
case "medium":
|
|
436
|
-
return mediaSize === "medium";
|
|
437
904
|
|
|
438
|
-
|
|
439
|
-
|
|
905
|
+
var _components_media_layout_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
906
|
+
/* harmony reexport (safe) */
|
|
440
907
|
|
|
441
|
-
case "large":
|
|
442
|
-
return mediaSize === "large";
|
|
443
908
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
|
|
909
|
+
__webpack_require__.d(__webpack_exports__, "MediaLayout", function () {
|
|
910
|
+
return _components_media_layout_js__WEBPACK_IMPORTED_MODULE_0__["a"];
|
|
911
|
+
});
|
|
912
|
+
/* harmony import */
|
|
448
913
|
|
|
449
914
|
|
|
915
|
+
var _components_media_layout_context_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
916
|
+
/* harmony reexport (safe) */
|
|
450
917
|
|
|
451
|
-
/***/ }),
|
|
452
|
-
/* 3 */
|
|
453
|
-
/***/ (function(module, exports) {
|
|
454
918
|
|
|
455
|
-
|
|
919
|
+
__webpack_require__.d(__webpack_exports__, "MediaLayoutContext", function () {
|
|
920
|
+
return _components_media_layout_context_js__WEBPACK_IMPORTED_MODULE_1__["a"];
|
|
921
|
+
});
|
|
922
|
+
/* harmony import */
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
var _components_spring_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
926
|
+
/* harmony reexport (safe) */
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
__webpack_require__.d(__webpack_exports__, "Spring", function () {
|
|
930
|
+
return _components_spring_js__WEBPACK_IMPORTED_MODULE_2__["a"];
|
|
931
|
+
});
|
|
932
|
+
/* harmony import */
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
var _components_strut_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
|
|
936
|
+
/* harmony reexport (safe) */
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
__webpack_require__.d(__webpack_exports__, "Strut", function () {
|
|
940
|
+
return _components_strut_js__WEBPACK_IMPORTED_MODULE_3__["a"];
|
|
941
|
+
});
|
|
942
|
+
/* harmony import */
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
var _util_specs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
|
|
946
|
+
/* harmony reexport (safe) */
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
__webpack_require__.d(__webpack_exports__, "VALID_MEDIA_SIZES", function () {
|
|
950
|
+
return _util_specs_js__WEBPACK_IMPORTED_MODULE_4__["d"];
|
|
951
|
+
});
|
|
952
|
+
/* harmony reexport (safe) */
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
__webpack_require__.d(__webpack_exports__, "MEDIA_DEFAULT_SPEC", function () {
|
|
956
|
+
return _util_specs_js__WEBPACK_IMPORTED_MODULE_4__["a"];
|
|
957
|
+
});
|
|
958
|
+
/* harmony reexport (safe) */
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
__webpack_require__.d(__webpack_exports__, "MEDIA_INTERNAL_SPEC", function () {
|
|
962
|
+
return _util_specs_js__WEBPACK_IMPORTED_MODULE_4__["b"];
|
|
963
|
+
});
|
|
964
|
+
/* harmony reexport (safe) */
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
__webpack_require__.d(__webpack_exports__, "MEDIA_MODAL_SPEC", function () {
|
|
968
|
+
return _util_specs_js__WEBPACK_IMPORTED_MODULE_4__["c"];
|
|
969
|
+
});
|
|
970
|
+
/* harmony import */
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
var _util_util_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
|
|
974
|
+
/* harmony reexport (safe) */
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
__webpack_require__.d(__webpack_exports__, "queryMatchesSize", function () {
|
|
978
|
+
return _util_util_js__WEBPACK_IMPORTED_MODULE_5__["a"];
|
|
979
|
+
});
|
|
980
|
+
/***/
|
|
981
|
+
|
|
982
|
+
}
|
|
983
|
+
/******/
|
|
984
|
+
]);
|
|
456
985
|
|
|
457
986
|
/***/ }),
|
|
458
|
-
/*
|
|
987
|
+
/* 2 */
|
|
459
988
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
460
989
|
|
|
461
990
|
"use strict";
|
|
462
991
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Cell; });
|
|
463
992
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
464
993
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
465
|
-
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
994
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
995
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__);
|
|
466
996
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
|
467
997
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
468
|
-
/* harmony import */ var _util_styles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
469
|
-
/* harmony import */ var _util_utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
998
|
+
/* harmony import */ var _util_styles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
999
|
+
/* harmony import */ var _util_utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
|
|
470
1000
|
|
|
471
1001
|
|
|
472
1002
|
|
|
@@ -530,7 +1060,7 @@ class Cell extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
530
1060
|
children,
|
|
531
1061
|
style
|
|
532
1062
|
} = this.props;
|
|
533
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__[
|
|
1063
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__["MediaLayout"], null, ({
|
|
534
1064
|
mediaSize,
|
|
535
1065
|
mediaSpec
|
|
536
1066
|
}) => {
|
|
@@ -594,11 +1124,17 @@ Cell.defaultProps = {
|
|
|
594
1124
|
Cell.__IS_CELL__ = true;
|
|
595
1125
|
|
|
596
1126
|
/***/ }),
|
|
597
|
-
/*
|
|
1127
|
+
/* 3 */
|
|
1128
|
+
/***/ (function(module, exports) {
|
|
1129
|
+
|
|
1130
|
+
module.exports = require("@khanacademy/wonder-blocks-core");
|
|
1131
|
+
|
|
1132
|
+
/***/ }),
|
|
1133
|
+
/* 4 */
|
|
598
1134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
599
1135
|
|
|
600
1136
|
"use strict";
|
|
601
|
-
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1137
|
+
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
602
1138
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_0__);
|
|
603
1139
|
|
|
604
1140
|
const WIDE_SCREEN = "@media (min-width: 1168px)";
|
|
@@ -623,13 +1159,13 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_0__["StyleSheet"].create({
|
|
|
623
1159
|
/* harmony default export */ __webpack_exports__["a"] = (styles);
|
|
624
1160
|
|
|
625
1161
|
/***/ }),
|
|
626
|
-
/*
|
|
1162
|
+
/* 5 */
|
|
627
1163
|
/***/ (function(module, exports) {
|
|
628
1164
|
|
|
629
1165
|
module.exports = require("aphrodite");
|
|
630
1166
|
|
|
631
1167
|
/***/ }),
|
|
632
|
-
/*
|
|
1168
|
+
/* 6 */
|
|
633
1169
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
634
1170
|
|
|
635
1171
|
"use strict";
|
|
@@ -638,10 +1174,11 @@ module.exports = require("aphrodite");
|
|
|
638
1174
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
639
1175
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
640
1176
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
641
|
-
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
642
|
-
/* harmony import */ var
|
|
643
|
-
/* harmony import */ var
|
|
644
|
-
/* harmony import */ var
|
|
1177
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
1178
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__);
|
|
1179
|
+
/* harmony import */ var _util_styles_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
|
1180
|
+
/* harmony import */ var _gutter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
|
|
1181
|
+
/* harmony import */ var _cell_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
|
|
645
1182
|
|
|
646
1183
|
|
|
647
1184
|
|
|
@@ -673,7 +1210,7 @@ class Row extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
673
1210
|
style,
|
|
674
1211
|
children
|
|
675
1212
|
} = this.props;
|
|
676
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__[
|
|
1213
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__["MediaLayout"], null, ({
|
|
677
1214
|
mediaSize,
|
|
678
1215
|
mediaSpec
|
|
679
1216
|
}) => {
|
|
@@ -688,7 +1225,7 @@ class Row extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
688
1225
|
maxWidth,
|
|
689
1226
|
totalColumns
|
|
690
1227
|
} = spec;
|
|
691
|
-
const shouldDisplay = Object(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__[
|
|
1228
|
+
const shouldDisplay = Object(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__["queryMatchesSize"])(this.props.mediaQuery, mediaSize); // Don't render the row if it's been disabled at this size
|
|
692
1229
|
|
|
693
1230
|
if (!shouldDisplay) {
|
|
694
1231
|
return null;
|
|
@@ -715,9 +1252,9 @@ class Row extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
715
1252
|
style: [_util_styles_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].row, !!maxWidth && _util_styles_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].rowMaxWidth, !!maxWidth && {
|
|
716
1253
|
maxWidth
|
|
717
1254
|
}, style]
|
|
718
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__[
|
|
1255
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__["Strut"], {
|
|
719
1256
|
size: marginWidth
|
|
720
|
-
}), filteredContents, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__[
|
|
1257
|
+
}), filteredContents, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_2__["Strut"], {
|
|
721
1258
|
size: marginWidth
|
|
722
1259
|
}));
|
|
723
1260
|
});
|
|
@@ -729,33 +1266,7 @@ Row.defaultProps = {
|
|
|
729
1266
|
};
|
|
730
1267
|
|
|
731
1268
|
/***/ }),
|
|
732
|
-
/*
|
|
733
|
-
/***/ (function(module, exports) {
|
|
734
|
-
|
|
735
|
-
function _extends() {
|
|
736
|
-
module.exports = _extends = Object.assign || function (target) {
|
|
737
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
738
|
-
var source = arguments[i];
|
|
739
|
-
|
|
740
|
-
for (var key in source) {
|
|
741
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
742
|
-
target[key] = source[key];
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
return target;
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
751
|
-
return _extends.apply(this, arguments);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
module.exports = _extends;
|
|
755
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
756
|
-
|
|
757
|
-
/***/ }),
|
|
758
|
-
/* 9 */
|
|
1269
|
+
/* 7 */
|
|
759
1270
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
760
1271
|
|
|
761
1272
|
"use strict";
|
|
@@ -770,14 +1281,15 @@ const flexBasis = size => {
|
|
|
770
1281
|
};
|
|
771
1282
|
|
|
772
1283
|
/***/ }),
|
|
773
|
-
/*
|
|
1284
|
+
/* 8 */
|
|
774
1285
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
775
1286
|
|
|
776
1287
|
"use strict";
|
|
777
1288
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Gutter; });
|
|
778
1289
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
779
1290
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
780
|
-
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1291
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
1292
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__);
|
|
781
1293
|
|
|
782
1294
|
|
|
783
1295
|
|
|
@@ -796,7 +1308,7 @@ const flexBasis = size => {
|
|
|
796
1308
|
*/
|
|
797
1309
|
class Gutter extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
798
1310
|
render() {
|
|
799
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__[
|
|
1311
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__["MediaLayout"], null, ({
|
|
800
1312
|
mediaSize,
|
|
801
1313
|
mediaSpec
|
|
802
1314
|
}) => {
|
|
@@ -810,11 +1322,11 @@ class Gutter extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
810
1322
|
gutterWidth
|
|
811
1323
|
} = spec;
|
|
812
1324
|
|
|
813
|
-
if (!Object(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__[
|
|
1325
|
+
if (!Object(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__["queryMatchesSize"])(this.props.mediaQuery, mediaSize)) {
|
|
814
1326
|
return null;
|
|
815
1327
|
}
|
|
816
1328
|
|
|
817
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__[
|
|
1329
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_1__["Strut"], {
|
|
818
1330
|
size: gutterWidth
|
|
819
1331
|
});
|
|
820
1332
|
});
|
|
@@ -826,19 +1338,25 @@ Gutter.defaultProps = {
|
|
|
826
1338
|
};
|
|
827
1339
|
|
|
828
1340
|
/***/ }),
|
|
829
|
-
/*
|
|
1341
|
+
/* 9 */
|
|
830
1342
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
831
1343
|
|
|
832
1344
|
"use strict";
|
|
833
1345
|
__webpack_require__.r(__webpack_exports__);
|
|
834
|
-
/* harmony import */ var _components_cell_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1346
|
+
/* harmony import */ var _components_cell_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
835
1347
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cell", function() { return _components_cell_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
|
|
836
1348
|
|
|
837
|
-
/* harmony import */ var _components_row_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1349
|
+
/* harmony import */ var _components_row_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
|
838
1350
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Row", function() { return _components_row_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
|
|
839
1351
|
|
|
840
1352
|
|
|
841
1353
|
|
|
842
1354
|
|
|
1355
|
+
/***/ }),
|
|
1356
|
+
/* 10 */
|
|
1357
|
+
/***/ (function(module, exports) {
|
|
1358
|
+
|
|
1359
|
+
module.exports = require("@khanacademy/wonder-blocks-spacing");
|
|
1360
|
+
|
|
843
1361
|
/***/ })
|
|
844
1362
|
/******/ ]);
|