@khanacademy/wonder-blocks-toolbar 2.1.36 → 2.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @khanacademy/wonder-blocks-toolbar
2
2
 
3
+ ## 2.1.37
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b561425a]
8
+ - Updated dependencies [a566e232]
9
+ - Updated dependencies [d2b21a6e]
10
+ - @khanacademy/wonder-blocks-core@4.6.0
11
+ - @khanacademy/wonder-blocks-typography@1.1.35
12
+
3
13
  ## 2.1.36
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-toolbar",
3
- "version": "2.1.36",
3
+ "version": "2.1.37",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,15 +17,15 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.18.6",
19
19
  "@khanacademy/wonder-blocks-color": "^1.2.0",
20
- "@khanacademy/wonder-blocks-core": "^4.5.0",
20
+ "@khanacademy/wonder-blocks-core": "^4.6.0",
21
21
  "@khanacademy/wonder-blocks-spacing": "^3.0.5",
22
- "@khanacademy/wonder-blocks-typography": "^1.1.34"
22
+ "@khanacademy/wonder-blocks-typography": "^1.1.35"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "aphrodite": "^1.2.5",
26
26
  "react": "16.14.0"
27
27
  },
28
28
  "devDependencies": {
29
- "wb-dev-build-settings": "^0.4.0"
29
+ "wb-dev-build-settings": "^0.5.0"
30
30
  }
31
31
  }
package/dist/index.js DELETED
@@ -1,270 +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 = 7);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ([
89
- /* 0 */
90
- /***/ (function(module, exports) {
91
-
92
- module.exports = require("react");
93
-
94
- /***/ }),
95
- /* 1 */
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("@khanacademy/wonder-blocks-core");
99
-
100
- /***/ }),
101
- /* 2 */
102
- /***/ (function(module, exports) {
103
-
104
- module.exports = require("@khanacademy/wonder-blocks-color");
105
-
106
- /***/ }),
107
- /* 3 */
108
- /***/ (function(module, exports) {
109
-
110
- module.exports = require("@khanacademy/wonder-blocks-spacing");
111
-
112
- /***/ }),
113
- /* 4 */
114
- /***/ (function(module, exports) {
115
-
116
- module.exports = require("@khanacademy/wonder-blocks-typography");
117
-
118
- /***/ }),
119
- /* 5 */
120
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
121
-
122
- "use strict";
123
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Toolbar; });
124
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
125
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
126
- /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
127
- /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
128
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
129
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
130
- /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
131
- /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
132
- /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
133
- /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4__);
134
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4);
135
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__);
136
- /*
137
- * A toolbar component that often acts as a container header.
138
- */
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
- /**
147
- * The `Toolbar` component is a generic toolbar wrapper that exposes
148
- * customization options. An optional `title` and `subtitle` property can be
149
- * used along with left and right content passed as props.
150
- *
151
- * ### Usage
152
- *
153
- * ```jsx
154
- * import Toolbar from "@khanacademy/wonder-blocks-toolbar";
155
- *
156
- * <Toolbar
157
- * size="small"
158
- * leftContent={<IconButton icon={icons.dismiss} kind="tertiary" />}
159
- * rightContent={<Button>Next Video</Button>}
160
- * />
161
- * ```
162
- */
163
- class Toolbar extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
164
- render() {
165
- const {
166
- color,
167
- leftContent,
168
- rightContent,
169
- size,
170
- subtitle,
171
- title
172
- } = this.props;
173
- const TitleComponent = subtitle ? _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__["LabelLarge"] : _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__["HeadingSmall"];
174
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
175
- style: [sharedStyles.container, color === "dark" && sharedStyles.dark, size === "small" && sharedStyles.small]
176
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
177
- style: [sharedStyles.column, sharedStyles.leftColumn, title ? sharedStyles.withTitle : null]
178
- }, leftContent), title && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
179
- style: [sharedStyles.column, sharedStyles.wideColumn]
180
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
181
- style: [sharedStyles.titles, sharedStyles.center]
182
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](TitleComponent, {
183
- id: "wb-toolbar-title"
184
- }, title), subtitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__["LabelSmall"], {
185
- style: color === "light" && sharedStyles.subtitle
186
- }, subtitle))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
187
- style: [sharedStyles.column, sharedStyles.rightColumn, title ? sharedStyles.withTitle : null]
188
- }, rightContent));
189
- }
190
-
191
- }
192
- Toolbar.defaultProps = {
193
- color: "light",
194
- leftContent: null,
195
- rightContent: null,
196
- size: "medium"
197
- };
198
- const sharedStyles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
199
- container: {
200
- border: `1px solid ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default.a.offBlack16}`,
201
- flex: 1,
202
- flexDirection: "row",
203
- justifyContent: "space-between",
204
- minHeight: 66,
205
- paddingLeft: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default.a.medium_16,
206
- paddingRight: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default.a.medium_16,
207
- width: "100%"
208
- },
209
- small: {
210
- minHeight: 50
211
- },
212
- dark: {
213
- backgroundColor: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default.a.darkBlue,
214
- boxShadow: `0 1px 0 0 ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default.a.white64}`,
215
- color: "white"
216
- },
217
- column: {
218
- justifyContent: "center"
219
- },
220
- withTitle: {
221
- flex: 1
222
- },
223
- wideColumn: {
224
- flex: 1,
225
- flexBasis: "50%"
226
- },
227
- leftColumn: {
228
- alignItems: "center",
229
- flexDirection: "row",
230
- // TODO(WB-1445): Find a way to replicate this behavior with
231
- // rightContent.
232
- flexShrink: 0,
233
- justifyContent: "flex-start"
234
- },
235
- rightColumn: {
236
- alignItems: "center",
237
- flexDirection: "row",
238
- justifyContent: "flex-end"
239
- },
240
- center: {
241
- textAlign: "center"
242
- },
243
- subtitle: {
244
- color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default.a.offBlack64
245
- },
246
- titles: {
247
- padding: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default.a.small_12
248
- }
249
- });
250
-
251
- /***/ }),
252
- /* 6 */
253
- /***/ (function(module, exports) {
254
-
255
- module.exports = require("aphrodite");
256
-
257
- /***/ }),
258
- /* 7 */
259
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
260
-
261
- "use strict";
262
- __webpack_require__.r(__webpack_exports__);
263
- /* harmony import */ var _components_toolbar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
264
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _components_toolbar_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
265
-
266
-
267
-
268
-
269
- /***/ })
270
- /******/ ]);
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "../src/index.js";
package/docs.md DELETED
@@ -1,5 +0,0 @@
1
- Documentation for `@khanacademy/wonder-blocks-toolbar` is now in Storybook.
2
-
3
- Visit the [Storybook
4
- Toolbar](https://khan.github.io/wonder-blocks/?path=/docs/toolbar) docs on GitHub
5
- Pages.