@khanacademy/wonder-blocks-cell 1.0.0 → 2.0.1

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,17 +1,52 @@
1
1
  # @khanacademy/wonder-blocks-cell
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 166ecc97: Use `aria-disabled` instead of disabled, fix focused + disabled styles.
8
+ - Updated dependencies [166ecc97]
9
+ - @khanacademy/wonder-blocks-clickable@2.2.4
10
+
11
+ ## 2.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - 655daa88: Renamed `BasicCell` to `CompactCell` for better clarification of this variant
16
+
17
+ ### Patch Changes
18
+
19
+ - 2630d750: DetailCell: Style tweaks (changing title from bold to regular, changing vertical padding to 16px)
20
+
21
+ ## 1.0.2
22
+
23
+ ### Patch Changes
24
+
25
+ - @khanacademy/wonder-blocks-clickable@2.2.3
26
+ - @khanacademy/wonder-blocks-core@4.2.1
27
+ - @khanacademy/wonder-blocks-layout@1.4.7
28
+ - @khanacademy/wonder-blocks-typography@1.1.29
29
+
30
+ ## 1.0.1
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [901bfe82]
35
+ - @khanacademy/wonder-blocks-clickable@2.2.2
36
+
3
37
  ## 1.0.0
38
+
4
39
  ### Major Changes
5
40
 
6
- - dc6c5f05: Add DetailCell component
41
+ - dc6c5f05: Add DetailCell component
7
42
 
8
43
  ### Minor Changes
9
44
 
10
- - dc6c5f05: Add horizontalRule, style and testId to BasicCell
11
- - dc6c5f05: Add BasicCell and also title, leftAccessory, rightAccessory props
12
- - dc6c5f05: Add states (active, disabled, hovered, focused, pressed), onClick and aria-label
13
- - dc6c5f05: Adds `wonder-blocks-cell` package
45
+ - dc6c5f05: Add horizontalRule, style and testId to BasicCell
46
+ - dc6c5f05: Add BasicCell and also title, leftAccessory, rightAccessory props
47
+ - dc6c5f05: Add states (active, disabled, hovered, focused, pressed), onClick and aria-label
48
+ - dc6c5f05: Adds `wonder-blocks-cell` package
14
49
 
15
50
  ### Patch Changes
16
51
 
17
- - 2855fa1f: Add WB layout as a dependency
52
+ - 2855fa1f: Add WB layout as a dependency
package/dist/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose';
2
2
  import * as React from 'react';
3
- import { LabelMedium, LabelLarge, LabelSmall } from '@khanacademy/wonder-blocks-typography';
3
+ import { LabelMedium, LabelSmall } from '@khanacademy/wonder-blocks-typography';
4
4
  import _extends from '@babel/runtime/helpers/extends';
5
5
  import { StyleSheet } from 'aphrodite';
6
6
  import Clickable from '@khanacademy/wonder-blocks-clickable';
@@ -20,6 +20,14 @@ const CellMeasurements = {
20
20
  paddingHorizontal: Spacing.medium_16
21
21
  },
22
22
 
23
+ /**
24
+ * The DetailCell wrapper's gap.
25
+ */
26
+ detailCellPadding: {
27
+ paddingVertical: Spacing.small_12,
28
+ paddingHorizontal: Spacing.medium_16
29
+ },
30
+
23
31
  /**
24
32
  * The extra vertical spacing added to the title/content wrapper.
25
33
  */
@@ -115,7 +123,7 @@ const RightAccessory = ({
115
123
 
116
124
  /**
117
125
  * CellCore is the base cell wrapper. It's used as the skeleton/layout that is
118
- * used by BasicCell and DetailCell (and any other variants).
126
+ * used by CompactCell and DetailCell (and any other variants).
119
127
  *
120
128
  * Both variants share how they render their accessories, and the main
121
129
  * responsibility of this component is to render the contents that are passed in
@@ -134,7 +142,8 @@ const CellCore = props => {
134
142
  rightAccessoryStyle = undefined,
135
143
  style,
136
144
  testId,
137
- "aria-label": ariaLabel
145
+ "aria-label": ariaLabel,
146
+ innerStyle
138
147
  } = props;
139
148
 
140
149
  const renderCell = eventState => {
@@ -142,11 +151,11 @@ const CellCore = props => {
142
151
  return /*#__PURE__*/React.createElement(View, {
143
152
  style: [styles$1.wrapper, // focused applied to the main wrapper to make the border
144
153
  // outline part of the wrapper
145
- (eventState == null ? void 0 : eventState.focused) && styles$1.focused, // custom styles
146
- style],
154
+ (eventState == null ? void 0 : eventState.focused) && styles$1.focused],
147
155
  "aria-current": active ? "true" : undefined
148
156
  }, /*#__PURE__*/React.createElement(View, {
149
- style: [styles$1.innerWrapper, horizontalRuleStyles, disabled && styles$1.disabled, active && styles$1.active, // other states applied to the inner wrapper to blend
157
+ style: [styles$1.innerWrapper, innerStyle, // custom styles
158
+ style, horizontalRuleStyles, disabled && styles$1.disabled, active && styles$1.active, // other states applied to the inner wrapper to blend
150
159
  // the background color properly
151
160
  !disabled && (eventState == null ? void 0 : eventState.hovered) && styles$1.hovered, // active + hovered
152
161
  active && (eventState == null ? void 0 : eventState.hovered) && styles$1.activeHovered, !disabled && (eventState == null ? void 0 : eventState.pressed) && styles$1.pressed, // active + pressed
@@ -246,7 +255,10 @@ const styles$1 = StyleSheet.create({
246
255
  background: fade(Color.blue, 0.24)
247
256
  },
248
257
  disabled: {
249
- color: Color.offBlack32
258
+ color: Color.offBlack32,
259
+ ":hover": {
260
+ cursor: "not-allowed"
261
+ }
250
262
  },
251
263
  accessoryActive: {
252
264
  color: Color.blue
@@ -260,22 +272,24 @@ const styles$1 = StyleSheet.create({
260
272
  const _excluded$1 = ["title"];
261
273
 
262
274
  /**
263
- * BasicCell is the simplest form of the Cell. It is a compacted-height Cell
264
- * with limited subviews and accessories, to be used for simple lists, like
265
- * dropdown option items, navigation items, settings dialogs, etc.
275
+ * `CompactCell` is the simplest form of the Cell. It is a compacted-height Cell
276
+ * with limited subviews and accessories. Typically they represent additional
277
+ * info or selection lists. It has a minimum height of 48px and a non-bold
278
+ * title. It does not have subtitles or a progress bar, and in general it has
279
+ * less vertical space around text and accessories.
266
280
  *
267
281
  * ### Usage
268
282
  *
269
283
  * ```jsx
270
- * import {BasicCell} from "@khanacademy/wonder-blocks-cell";
284
+ * import {CompactCell} from "@khanacademy/wonder-blocks-cell";
271
285
  *
272
- * <BasicCell
273
- * title="Basic cell"
286
+ * <CompactCell
287
+ * title="Compact cell"
274
288
  * rightAccessory={<Icon icon={icons.caretRight} size="medium" />}
275
289
  * />
276
290
  * ```
277
291
  */
278
- function BasicCell(props) {
292
+ function CompactCell(props) {
279
293
  const {
280
294
  title
281
295
  } = props,
@@ -304,8 +318,11 @@ const Subtitle = ({
304
318
  };
305
319
 
306
320
  /**
307
- * This is a variant of BasicCell that allows adding subtitles, before and after
308
- * the cell title.
321
+ * This is a variant of CompactCell that allows adding subtitles, before and
322
+ * after the cell title. They typically represent an item that can be
323
+ * clicked/tapped to view more complex details. They vary in height depending on
324
+ * the presence or absence of subtitles, and they allow for a wide range of
325
+ * functionality depending on which accessories are active.
309
326
  *
310
327
  * ### Usage
311
328
  *
@@ -329,12 +346,14 @@ function DetailCell(props) {
329
346
  } = props,
330
347
  coreProps = _objectWithoutPropertiesLoose(props, _excluded);
331
348
 
332
- return /*#__PURE__*/React.createElement(CellCore, coreProps, /*#__PURE__*/React.createElement(Subtitle, {
349
+ return /*#__PURE__*/React.createElement(CellCore, _extends({}, coreProps, {
350
+ innerStyle: styles.innerWrapper
351
+ }), /*#__PURE__*/React.createElement(Subtitle, {
333
352
  subtitle: subtitle1,
334
353
  disabled: coreProps.disabled
335
354
  }), subtitle1 && /*#__PURE__*/React.createElement(Strut, {
336
355
  size: Spacing.xxxxSmall_2
337
- }), typeof title === "string" ? /*#__PURE__*/React.createElement(LabelLarge, null, title) : title, subtitle2 && /*#__PURE__*/React.createElement(Strut, {
356
+ }), typeof title === "string" ? /*#__PURE__*/React.createElement(LabelMedium, null, title) : title, subtitle2 && /*#__PURE__*/React.createElement(Strut, {
338
357
  size: Spacing.xxxxSmall_2
339
358
  }), /*#__PURE__*/React.createElement(Subtitle, {
340
359
  subtitle: subtitle2,
@@ -345,7 +364,11 @@ function DetailCell(props) {
345
364
  const styles = StyleSheet.create({
346
365
  subtitle: {
347
366
  color: Color.offBlack64
367
+ },
368
+ // This is to override the default padding of the CellCore innerWrapper.
369
+ innerWrapper: {
370
+ padding: `${CellMeasurements.detailCellPadding.paddingVertical}px ${CellMeasurements.detailCellPadding.paddingHorizontal}px`
348
371
  }
349
372
  });
350
373
 
351
- export { BasicCell, DetailCell };
374
+ export { CompactCell, DetailCell };
package/dist/index.js CHANGED
@@ -130,6 +130,14 @@ const CellMeasurements = {
130
130
  paddingHorizontal: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16
131
131
  },
132
132
 
133
+ /**
134
+ * The DetailCell wrapper's gap.
135
+ */
136
+ detailCellPadding: {
137
+ paddingVertical: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.small_12,
138
+ paddingHorizontal: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_2___default.a.medium_16
139
+ },
140
+
133
141
  /**
134
142
  * The extra vertical spacing added to the title/content wrapper.
135
143
  */
@@ -280,7 +288,7 @@ const RightAccessory = ({
280
288
 
281
289
  /**
282
290
  * CellCore is the base cell wrapper. It's used as the skeleton/layout that is
283
- * used by BasicCell and DetailCell (and any other variants).
291
+ * used by CompactCell and DetailCell (and any other variants).
284
292
  *
285
293
  * Both variants share how they render their accessories, and the main
286
294
  * responsibility of this component is to render the contents that are passed in
@@ -299,7 +307,8 @@ const CellCore = props => {
299
307
  rightAccessoryStyle = undefined,
300
308
  style,
301
309
  testId,
302
- "aria-label": ariaLabel
310
+ "aria-label": ariaLabel,
311
+ innerStyle
303
312
  } = props;
304
313
 
305
314
  const renderCell = eventState => {
@@ -307,11 +316,11 @@ const CellCore = props => {
307
316
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
308
317
  style: [styles.wrapper, // focused applied to the main wrapper to make the border
309
318
  // outline part of the wrapper
310
- (eventState == null ? void 0 : eventState.focused) && styles.focused, // custom styles
311
- style],
319
+ (eventState == null ? void 0 : eventState.focused) && styles.focused],
312
320
  "aria-current": active ? "true" : undefined
313
321
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
314
- style: [styles.innerWrapper, horizontalRuleStyles, disabled && styles.disabled, active && styles.active, // other states applied to the inner wrapper to blend
322
+ style: [styles.innerWrapper, innerStyle, // custom styles
323
+ style, horizontalRuleStyles, disabled && styles.disabled, active && styles.active, // other states applied to the inner wrapper to blend
315
324
  // the background color properly
316
325
  !disabled && (eventState == null ? void 0 : eventState.hovered) && styles.hovered, // active + hovered
317
326
  active && (eventState == null ? void 0 : eventState.hovered) && styles.activeHovered, !disabled && (eventState == null ? void 0 : eventState.pressed) && styles.pressed, // active + pressed
@@ -411,7 +420,10 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
411
420
  background: Object(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__["fade"])(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.blue, 0.24)
412
421
  },
413
422
  disabled: {
414
- color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.offBlack32
423
+ color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.offBlack32,
424
+ ":hover": {
425
+ cursor: "not-allowed"
426
+ }
415
427
  },
416
428
  accessoryActive: {
417
429
  color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.blue
@@ -438,22 +450,24 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
438
450
 
439
451
 
440
452
  /**
441
- * BasicCell is the simplest form of the Cell. It is a compacted-height Cell
442
- * with limited subviews and accessories, to be used for simple lists, like
443
- * dropdown option items, navigation items, settings dialogs, etc.
453
+ * `CompactCell` is the simplest form of the Cell. It is a compacted-height Cell
454
+ * with limited subviews and accessories. Typically they represent additional
455
+ * info or selection lists. It has a minimum height of 48px and a non-bold
456
+ * title. It does not have subtitles or a progress bar, and in general it has
457
+ * less vertical space around text and accessories.
444
458
  *
445
459
  * ### Usage
446
460
  *
447
461
  * ```jsx
448
- * import {BasicCell} from "@khanacademy/wonder-blocks-cell";
462
+ * import {CompactCell} from "@khanacademy/wonder-blocks-cell";
449
463
  *
450
- * <BasicCell
451
- * title="Basic cell"
464
+ * <CompactCell
465
+ * title="Compact cell"
452
466
  * rightAccessory={<Icon icon={icons.caretRight} size="medium" />}
453
467
  * />
454
468
  * ```
455
469
  */
456
- function BasicCell(props) {
470
+ function CompactCell(props) {
457
471
  const {
458
472
  title,
459
473
  ...coreProps
@@ -461,7 +475,7 @@ function BasicCell(props) {
461
475
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_cell_core_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], coreProps, typeof title === "string" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_1__["LabelMedium"], null, title) : title);
462
476
  }
463
477
 
464
- /* harmony default export */ __webpack_exports__["a"] = (BasicCell);
478
+ /* harmony default export */ __webpack_exports__["a"] = (CompactCell);
465
479
 
466
480
  /***/ }),
467
481
  /* 10 */
@@ -481,6 +495,10 @@ function BasicCell(props) {
481
495
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
482
496
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__);
483
497
  /* harmony import */ var _internal_cell_core_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8);
498
+ /* harmony import */ var _internal_common_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
499
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
500
+
501
+
484
502
 
485
503
 
486
504
 
@@ -507,8 +525,11 @@ const Subtitle = ({
507
525
  };
508
526
 
509
527
  /**
510
- * This is a variant of BasicCell that allows adding subtitles, before and after
511
- * the cell title.
528
+ * This is a variant of CompactCell that allows adding subtitles, before and
529
+ * after the cell title. They typically represent an item that can be
530
+ * clicked/tapped to view more complex details. They vary in height depending on
531
+ * the presence or absence of subtitles, and they allow for a wide range of
532
+ * functionality depending on which accessories are active.
512
533
  *
513
534
  * ### Usage
514
535
  *
@@ -531,12 +552,14 @@ function DetailCell(props) {
531
552
  subtitle2,
532
553
  ...coreProps
533
554
  } = props;
534
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_cell_core_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], coreProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Subtitle, {
555
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_cell_core_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], _extends({}, coreProps, {
556
+ innerStyle: styles.innerWrapper
557
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Subtitle, {
535
558
  subtitle: subtitle1,
536
559
  disabled: coreProps.disabled
537
560
  }), subtitle1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_3__["Strut"], {
538
561
  size: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default.a.xxxxSmall_2
539
- }), typeof title === "string" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__["LabelLarge"], null, title) : title, subtitle2 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_3__["Strut"], {
562
+ }), typeof title === "string" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_5__["LabelMedium"], null, title) : title, subtitle2 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_3__["Strut"], {
540
563
  size: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_4___default.a.xxxxSmall_2
541
564
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](Subtitle, {
542
565
  subtitle: subtitle2,
@@ -547,6 +570,10 @@ function DetailCell(props) {
547
570
  const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
548
571
  subtitle: {
549
572
  color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default.a.offBlack64
573
+ },
574
+ // This is to override the default padding of the CellCore innerWrapper.
575
+ innerWrapper: {
576
+ padding: `${_internal_common_js__WEBPACK_IMPORTED_MODULE_7__[/* CellMeasurements */ "a"].detailCellPadding.paddingVertical}px ${_internal_common_js__WEBPACK_IMPORTED_MODULE_7__[/* CellMeasurements */ "a"].detailCellPadding.paddingHorizontal}px`
550
577
  }
551
578
  });
552
579
  /* harmony default export */ __webpack_exports__["a"] = (DetailCell);
@@ -563,8 +590,8 @@ module.exports = require("@khanacademy/wonder-blocks-clickable");
563
590
 
564
591
  "use strict";
565
592
  __webpack_require__.r(__webpack_exports__);
566
- /* harmony import */ var _components_basic_cell_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
567
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BasicCell", function() { return _components_basic_cell_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
593
+ /* harmony import */ var _components_compact_cell_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
594
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompactCell", function() { return _components_compact_cell_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
568
595
 
569
596
  /* harmony import */ var _components_detail_cell_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
570
597
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DetailCell", function() { return _components_detail_cell_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-cell",
3
- "version": "1.0.0",
3
+ "version": "2.0.1",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,19 +14,19 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@babel/runtime": "^7.16.3",
17
- "@khanacademy/wonder-blocks-clickable": "^2.2.1",
17
+ "@khanacademy/wonder-blocks-clickable": "^2.2.4",
18
18
  "@khanacademy/wonder-blocks-color": "^1.1.20",
19
- "@khanacademy/wonder-blocks-core": "^4.2.0",
20
- "@khanacademy/wonder-blocks-layout": "^1.4.6",
19
+ "@khanacademy/wonder-blocks-core": "^4.2.1",
20
+ "@khanacademy/wonder-blocks-layout": "^1.4.7",
21
21
  "@khanacademy/wonder-blocks-spacing": "^3.0.5",
22
- "@khanacademy/wonder-blocks-typography": "^1.1.28"
22
+ "@khanacademy/wonder-blocks-typography": "^1.1.29"
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.2.0"
29
+ "wb-dev-build-settings": "^0.3.0"
30
30
  },
31
31
  "author": "",
32
32
  "license": "MIT"
@@ -14,14 +14,16 @@ import type {IconAsset} from "@khanacademy/wonder-blocks-icon";
14
14
 
15
15
  import ComponentInfo from "../../../../../.storybook/components/component-info.js";
16
16
  import {name, version} from "../../../package.json";
17
- import BasicCellArgTypes, {AccessoryMappings} from "./basic-cell.argtypes.js";
17
+ import CompactCellArgTypes, {
18
+ AccessoryMappings,
19
+ } from "./compact-cell.argtypes.js";
18
20
 
19
- import BasicCell from "../basic-cell.js";
21
+ import CompactCell from "../compact-cell.js";
20
22
 
21
23
  export default {
22
- title: "Cell / BasicCell",
23
- component: BasicCell,
24
- argTypes: BasicCellArgTypes,
24
+ title: "Cell / CompactCell",
25
+ component: CompactCell,
26
+ argTypes: CompactCellArgTypes,
25
27
  parameters: {
26
28
  componentSubtitle: ((
27
29
  <ComponentInfo name={name} version={version} />
@@ -44,19 +46,19 @@ export default {
44
46
  };
45
47
 
46
48
  /**
47
- * Default BasicCell example. It will be rendered as the first/default story and
49
+ * Default CompactCell example. It will be rendered as the first/default story and
48
50
  * it can be interacted with the controls panel in the Browser.
49
51
  */
50
- const Template = (args) => <BasicCell {...args} />;
52
+ const Template = (args) => <CompactCell {...args} />;
51
53
 
52
- export const DefaultBasicCell: StoryComponentType = Template.bind({});
54
+ export const DefaultCompactCell: StoryComponentType = Template.bind({});
53
55
 
54
- DefaultBasicCell.args = {
56
+ DefaultCompactCell.args = {
55
57
  title: "Basic Cell",
56
58
  rightAccessory: <Icon icon={icons.caretRight} />,
57
59
  };
58
60
 
59
- DefaultBasicCell.parameters = {
61
+ DefaultCompactCell.parameters = {
60
62
  chromatic: {
61
63
  // We have screenshots of other stories that cover other variants.
62
64
  disableSnapshot: true,
@@ -66,14 +68,14 @@ DefaultBasicCell.parameters = {
66
68
  /**
67
69
  * Only including an accessory on the left.
68
70
  */
69
- export const BasicCellLeft: StoryComponentType = () => (
70
- <BasicCell
71
+ export const CompactCellLeft: StoryComponentType = () => (
72
+ <CompactCell
71
73
  title="Intro to rational & irrational numbers"
72
74
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
73
75
  />
74
76
  );
75
77
 
76
- BasicCellLeft.parameters = {
78
+ CompactCellLeft.parameters = {
77
79
  docs: {
78
80
  storyDescription:
79
81
  "You can create a minimal cell that only uses a title and an Icon that can be placed on the left or right (or both). In this case, we will place the icon on the left to show you how cell is flexible. Note that you can pass any of the existing WB components such as `Icon`, `IconButton`, `Tooltip`, etc.",
@@ -83,14 +85,14 @@ BasicCellLeft.parameters = {
83
85
  /**
84
86
  * Only including an accessory on the right.
85
87
  */
86
- export const BasicCellRight: StoryComponentType = (args) => (
87
- <BasicCell
88
+ export const CompactCellRight: StoryComponentType = (args) => (
89
+ <CompactCell
88
90
  title="Intro to rational & irrational numbers"
89
91
  rightAccessory={<Icon icon={icons.caretRight} size="medium" />}
90
92
  />
91
93
  );
92
94
 
93
- BasicCellRight.parameters = {
95
+ CompactCellRight.parameters = {
94
96
  docs: {
95
97
  storyDescription:
96
98
  "You can also create a cell with an accessory placed on the right. Note that you can pass any of the existing WB components such as `Icon`.",
@@ -100,26 +102,26 @@ BasicCellRight.parameters = {
100
102
  /**
101
103
  * Adding multiline title to verify that the cell's height is correct.
102
104
  */
103
- export const BasicCellWithDifferentHeights: StoryComponentType = (args) => (
105
+ export const CompactCellWithDifferentHeights: StoryComponentType = (args) => (
104
106
  <>
105
- <BasicCell
107
+ <CompactCell
106
108
  title="Single line with short accessory."
107
109
  rightAccessory={AccessoryMappings.withCaret}
108
110
  />
109
111
  <Strut size={Spacing.xSmall_8} />
110
- <BasicCell
112
+ <CompactCell
111
113
  title="Single line with tall accessory."
112
114
  rightAccessory={AccessoryMappings.withIconText}
113
115
  />
114
116
  <Strut size={Spacing.xSmall_8} />
115
- <BasicCell
117
+ <CompactCell
116
118
  title="Multi line title with tall accessory. Content should fit within the container and the cell height should be consistent no matter the content length."
117
119
  rightAccessory={AccessoryMappings.withIconText}
118
120
  />
119
121
  </>
120
122
  );
121
123
 
122
- BasicCellWithDifferentHeights.parameters = {
124
+ CompactCellWithDifferentHeights.parameters = {
123
125
  docs: {
124
126
  storyDescription:
125
127
  "Cells should keep a consistent height no matter the content passed in the title prop. It should also respect a `minHeight` of 48px",
@@ -127,14 +129,14 @@ BasicCellWithDifferentHeights.parameters = {
127
129
  };
128
130
 
129
131
  /**
130
- * A BasicCell example adding both accessories (left and right)
132
+ * A CompactCell example adding both accessories (left and right)
131
133
  */
132
134
  const calendarIcon: IconAsset = {
133
135
  small: `M14.22 1.6H13.33V0H11.56V1.6H4.44V0H2.67V1.6H1.78C0.79 1.6 0.01 2.32 0.01 3.2L0 14.4C0 15.28 0.79 16 1.78 16H14.22C15.2 16 16 15.28 16 14.4V3.2C16 2.32 15.2 1.6 14.22 1.6ZM14.22 14.4H1.78V5.6H14.22V14.4ZM3.56 7.2H8V11.2H3.56V7.2Z`,
134
136
  };
135
137
 
136
- export const BasicCellBoth: StoryComponentType = () => (
137
- <BasicCell
138
+ export const CompactCellBoth: StoryComponentType = () => (
139
+ <CompactCell
138
140
  title="Intro to rational & irrational numbers"
139
141
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
140
142
  rightAccessory={
@@ -143,18 +145,18 @@ export const BasicCellBoth: StoryComponentType = () => (
143
145
  />
144
146
  );
145
147
 
146
- BasicCellBoth.storyName = "BasicCell with both accessories";
148
+ CompactCellBoth.storyName = "CompactCell with both accessories";
147
149
 
148
- BasicCellBoth.parameters = {
150
+ CompactCellBoth.parameters = {
149
151
  docs: {
150
152
  storyDescription:
151
153
  "You can also create a more complex cell with accessories placed on both sides. Note that you can extend the Icon component with custom paths such as the following example.",
152
154
  },
153
155
  };
154
156
 
155
- export const BasicCellAccessoryStyles: StoryComponentType = () => (
156
- <BasicCell
157
- title="BasicCell with custom accessory styles"
157
+ export const CompactCellAccessoryStyles: StoryComponentType = () => (
158
+ <CompactCell
159
+ title="CompactCell with custom accessory styles"
158
160
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
159
161
  leftAccessoryStyle={{
160
162
  minWidth: Spacing.xxLarge_48,
@@ -170,9 +172,10 @@ export const BasicCellAccessoryStyles: StoryComponentType = () => (
170
172
  />
171
173
  );
172
174
 
173
- BasicCellAccessoryStyles.storyName = "BasicCell accessories with custom styles";
175
+ CompactCellAccessoryStyles.storyName =
176
+ "CompactCell accessories with custom styles";
174
177
 
175
- BasicCellAccessoryStyles.parameters = {
178
+ CompactCellAccessoryStyles.parameters = {
176
179
  docs: {
177
180
  storyDescription:
178
181
  "Accessories can also be customized to adapt to different sizes and alignments. In this example, we can see how a cell can be customized for both accessories.",
@@ -182,19 +185,19 @@ BasicCellAccessoryStyles.parameters = {
182
185
  /**
183
186
  * Defining horizontal rule variants
184
187
  */
185
- export const BasicCellHorizontalRules: StoryComponentType = () => (
188
+ export const CompactCellHorizontalRules: StoryComponentType = () => (
186
189
  <>
187
- <BasicCell
190
+ <CompactCell
188
191
  title="This is a basic cell with an 'inset' horizontal rule"
189
192
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
190
193
  horizontalRule="inset"
191
194
  />
192
- <BasicCell
195
+ <CompactCell
193
196
  title="This is a basic cell with a 'full-width' horizontal rule"
194
197
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
195
198
  horizontalRule="full-width"
196
199
  />
197
- <BasicCell
200
+ <CompactCell
198
201
  title="This is a basic cell without a horizontal rule"
199
202
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
200
203
  horizontalRule="none"
@@ -202,18 +205,18 @@ export const BasicCellHorizontalRules: StoryComponentType = () => (
202
205
  </>
203
206
  );
204
207
 
205
- BasicCellHorizontalRules.storyName = "Defining horizontal rule variants";
208
+ CompactCellHorizontalRules.storyName = "Defining horizontal rule variants";
206
209
 
207
- BasicCellHorizontalRules.parameters = {
210
+ CompactCellHorizontalRules.parameters = {
208
211
  docs: {
209
212
  storyDescription:
210
213
  "Cell components can use the `horizontalRule` prop to use a set of predefined variants that we can use to match our needs.",
211
214
  },
212
215
  };
213
216
 
214
- export const BasicCellWithCustomStyles: StoryComponentType = () => (
215
- <BasicCell
216
- title="BasicCell with a darkBlue background"
217
+ export const CompactCellWithCustomStyles: StoryComponentType = () => (
218
+ <CompactCell
219
+ title="CompactCell with a darkBlue background"
217
220
  leftAccessory={<Icon icon={icons.contentArticle} size="medium" />}
218
221
  rightAccessory={<Icon icon={calendarIcon} color={Color.white} />}
219
222
  style={{
@@ -224,7 +227,7 @@ export const BasicCellWithCustomStyles: StoryComponentType = () => (
224
227
  />
225
228
  );
226
229
 
227
- BasicCellWithCustomStyles.parameters = {
230
+ CompactCellWithCustomStyles.parameters = {
228
231
  docs: {
229
232
  storyDescription:
230
233
  "Cell components can also adapt to different visual needs. One example of this can be done by passing a custom style object to the `style` prop.",
@@ -232,12 +235,12 @@ BasicCellWithCustomStyles.parameters = {
232
235
  };
233
236
 
234
237
  /*
235
- * BasicCell with onClick set
238
+ * CompactCell with onClick set
236
239
 
237
240
  */
238
241
 
239
- export const ClickableBasicCell: StoryComponentType = () => (
240
- <BasicCell
242
+ export const ClickableCompactCell: StoryComponentType = () => (
243
+ <CompactCell
241
244
  title="Intro to rational & irrational numbers"
242
245
  rightAccessory={<Icon icon={icons.caretRight} />}
243
246
  onClick={() => {}}
@@ -245,7 +248,7 @@ export const ClickableBasicCell: StoryComponentType = () => (
245
248
  />
246
249
  );
247
250
 
248
- ClickableBasicCell.parameters = {
251
+ ClickableCompactCell.parameters = {
249
252
  chromatic: {
250
253
  // This only includes interactions with the clickable cell, so no need
251
254
  // to capture screenshots.
@@ -257,8 +260,8 @@ ClickableBasicCell.parameters = {
257
260
  },
258
261
  };
259
262
 
260
- export const BasicCellActive: StoryComponentType = () => (
261
- <BasicCell
263
+ export const CompactCellActive: StoryComponentType = () => (
264
+ <CompactCell
262
265
  title="Title for article item"
263
266
  leftAccessory={
264
267
  <Icon icon={icons.contentVideo} size="medium" color="black" />
@@ -269,15 +272,15 @@ export const BasicCellActive: StoryComponentType = () => (
269
272
  />
270
273
  );
271
274
 
272
- BasicCellActive.parameters = {
275
+ CompactCellActive.parameters = {
273
276
  docs: {
274
277
  storyDescription:
275
278
  "The cell also supports different states within itself. The different styles are defined internally (e.g hover, focused, pressed, active, disabled) and we allow passing some props to use the `active` or `disabled` state.",
276
279
  },
277
280
  };
278
281
 
279
- export const BasicCellDisabled: StoryComponentType = () => (
280
- <BasicCell
282
+ export const CompactCellDisabled: StoryComponentType = () => (
283
+ <CompactCell
281
284
  title="Title for article item"
282
285
  leftAccessory={AccessoryMappings.withImage}
283
286
  rightAccessory={<Icon icon={calendarIcon} size="small" />}
@@ -286,7 +289,7 @@ export const BasicCellDisabled: StoryComponentType = () => (
286
289
  />
287
290
  );
288
291
 
289
- BasicCellDisabled.parameters = {
292
+ CompactCellDisabled.parameters = {
290
293
  docs: {
291
294
  storyDescription:
292
295
  "In the following example we can see how the `disabled` state works. Note that we apply an opacity to all the elements to make it more apparent that the cell is disabled. This includes text, SVG icons, images, etc.",
@@ -1,8 +1,8 @@
1
1
  // @flow
2
- import BasicCellArgTypes from "./basic-cell.argtypes.js";
2
+ import CompactCellArgTypes from "./compact-cell.argtypes.js";
3
3
 
4
4
  export default {
5
- ...BasicCellArgTypes,
5
+ ...CompactCellArgTypes,
6
6
  subtitle1: {
7
7
  control: {
8
8
  type: "text",
@@ -5,28 +5,30 @@ import {render, screen} from "@testing-library/react";
5
5
  import Icon, {icons} from "@khanacademy/wonder-blocks-icon";
6
6
  import {HeadingMedium} from "@khanacademy/wonder-blocks-typography";
7
7
 
8
- import BasicCell from "../basic-cell.js";
8
+ import CompactCell from "../compact-cell.js";
9
9
 
10
- describe("BasicCell", () => {
11
- it("should render the default BasicCell component", () => {
10
+ describe("CompactCell", () => {
11
+ it("should render the default CompactCell component", () => {
12
12
  // Arrange
13
13
 
14
14
  // Act
15
- render(<BasicCell title="Basic cell" />);
15
+ render(<CompactCell title="Compact cell" />);
16
16
 
17
17
  // Assert
18
- expect(screen.getByText("Basic cell")).toBeInTheDocument();
18
+ expect(screen.getByText("Compact cell")).toBeInTheDocument();
19
19
  });
20
20
 
21
21
  it("should render the title using a Typography element", () => {
22
22
  // Arrange
23
23
 
24
24
  // Act
25
- render(<BasicCell title={<HeadingMedium>Basic cell</HeadingMedium>} />);
25
+ render(
26
+ <CompactCell title={<HeadingMedium>Compact cell</HeadingMedium>} />,
27
+ );
26
28
 
27
29
  // Assert
28
30
  expect(
29
- screen.getByRole("heading", {name: "Basic cell"}),
31
+ screen.getByRole("heading", {name: "Compact cell"}),
30
32
  ).toBeInTheDocument();
31
33
  });
32
34
 
@@ -35,8 +37,8 @@ describe("BasicCell", () => {
35
37
 
36
38
  // Act
37
39
  render(
38
- <BasicCell
39
- title="Basic cell"
40
+ <CompactCell
41
+ title="Compact cell"
40
42
  leftAccessory={
41
43
  <Icon icon={icons.caretRight} aria-label="Caret icon" />
42
44
  }
@@ -52,8 +54,8 @@ describe("BasicCell", () => {
52
54
 
53
55
  // Act
54
56
  render(
55
- <BasicCell
56
- title="Basic cell"
57
+ <CompactCell
58
+ title="Compact cell"
57
59
  rightAccessory={
58
60
  <Icon icon={icons.caretRight} aria-label="Caret icon" />
59
61
  }
@@ -68,17 +70,17 @@ describe("BasicCell", () => {
68
70
  // Arrange
69
71
 
70
72
  // Act
71
- render(<BasicCell title="Basic cell" testId="cellId" />);
73
+ render(<CompactCell title="Compact cell" testId="cellId" />);
72
74
 
73
75
  // Assert
74
- expect(screen.getByTestId("cellId")).toHaveTextContent("Basic cell");
76
+ expect(screen.getByTestId("cellId")).toHaveTextContent("Compact cell");
75
77
  });
76
78
 
77
79
  it("should add a button if onClick is set", () => {
78
80
  // Arrange
79
81
 
80
82
  // Act
81
- render(<BasicCell title="Basic cell" onClick={jest.fn()} />);
83
+ render(<CompactCell title="Compact cell" onClick={jest.fn()} />);
82
84
 
83
85
  // Assert
84
86
  expect(screen.getByRole("button")).toBeInTheDocument();
@@ -87,7 +89,7 @@ describe("BasicCell", () => {
87
89
  it("should allow clicking the cell if onClick is set", () => {
88
90
  // Arrange
89
91
  const onClickMock = jest.fn();
90
- render(<BasicCell title="Basic cell" onClick={onClickMock} />);
92
+ render(<CompactCell title="Compact cell" onClick={onClickMock} />);
91
93
 
92
94
  // Act
93
95
  screen.getByRole("button").click();
@@ -8,22 +8,24 @@ import CellCore from "./internal/cell-core.js";
8
8
  import type {CellProps} from "../util/types.js";
9
9
 
10
10
  /**
11
- * BasicCell is the simplest form of the Cell. It is a compacted-height Cell
12
- * with limited subviews and accessories, to be used for simple lists, like
13
- * dropdown option items, navigation items, settings dialogs, etc.
11
+ * `CompactCell` is the simplest form of the Cell. It is a compacted-height Cell
12
+ * with limited subviews and accessories. Typically they represent additional
13
+ * info or selection lists. It has a minimum height of 48px and a non-bold
14
+ * title. It does not have subtitles or a progress bar, and in general it has
15
+ * less vertical space around text and accessories.
14
16
  *
15
17
  * ### Usage
16
18
  *
17
19
  * ```jsx
18
- * import {BasicCell} from "@khanacademy/wonder-blocks-cell";
20
+ * import {CompactCell} from "@khanacademy/wonder-blocks-cell";
19
21
  *
20
- * <BasicCell
21
- * title="Basic cell"
22
+ * <CompactCell
23
+ * title="Compact cell"
22
24
  * rightAccessory={<Icon icon={icons.caretRight} size="medium" />}
23
25
  * />
24
26
  * ```
25
27
  */
26
- function BasicCell(props: CellProps): React.Node {
28
+ function CompactCell(props: CellProps): React.Node {
27
29
  const {title, ...coreProps} = props;
28
30
 
29
31
  return (
@@ -37,4 +39,4 @@ function BasicCell(props: CellProps): React.Node {
37
39
  );
38
40
  }
39
41
 
40
- export default BasicCell;
42
+ export default CompactCell;
@@ -5,9 +5,10 @@ import {StyleSheet} from "aphrodite";
5
5
  import Color from "@khanacademy/wonder-blocks-color";
6
6
  import {Strut} from "@khanacademy/wonder-blocks-layout";
7
7
  import Spacing from "@khanacademy/wonder-blocks-spacing";
8
- import {LabelSmall, LabelLarge} from "@khanacademy/wonder-blocks-typography";
8
+ import {LabelSmall, LabelMedium} from "@khanacademy/wonder-blocks-typography";
9
9
 
10
10
  import CellCore from "./internal/cell-core.js";
11
+ import {CellMeasurements} from "./internal/common.js";
11
12
 
12
13
  import type {CellProps, TypographyText} from "../util/types.js";
13
14
 
@@ -55,8 +56,11 @@ type DetailCellProps = {|
55
56
  |};
56
57
 
57
58
  /**
58
- * This is a variant of BasicCell that allows adding subtitles, before and after
59
- * the cell title.
59
+ * This is a variant of CompactCell that allows adding subtitles, before and
60
+ * after the cell title. They typically represent an item that can be
61
+ * clicked/tapped to view more complex details. They vary in height depending on
62
+ * the presence or absence of subtitles, and they allow for a wide range of
63
+ * functionality depending on which accessories are active.
60
64
  *
61
65
  * ### Usage
62
66
  *
@@ -76,11 +80,11 @@ function DetailCell(props: DetailCellProps): React.Node {
76
80
  const {title, subtitle1, subtitle2, ...coreProps} = props;
77
81
 
78
82
  return (
79
- <CellCore {...coreProps}>
83
+ <CellCore {...coreProps} innerStyle={styles.innerWrapper}>
80
84
  <Subtitle subtitle={subtitle1} disabled={coreProps.disabled} />
81
85
  {subtitle1 && <Strut size={Spacing.xxxxSmall_2} />}
82
86
  {typeof title === "string" ? (
83
- <LabelLarge>{title}</LabelLarge>
87
+ <LabelMedium>{title}</LabelMedium>
84
88
  ) : (
85
89
  title
86
90
  )}
@@ -95,6 +99,11 @@ const styles = StyleSheet.create({
95
99
  subtitle: {
96
100
  color: Color.offBlack64,
97
101
  },
102
+
103
+ // This is to override the default padding of the CellCore innerWrapper.
104
+ innerWrapper: {
105
+ padding: `${CellMeasurements.detailCellPadding.paddingVertical}px ${CellMeasurements.detailCellPadding.paddingHorizontal}px`,
106
+ },
98
107
  });
99
108
 
100
109
  export default DetailCell;
@@ -74,7 +74,10 @@ describe("CellCore", () => {
74
74
  );
75
75
 
76
76
  // Assert
77
- expect(screen.getByRole("button")).toBeDisabled();
77
+ expect(screen.getByRole("button")).toHaveAttribute(
78
+ "aria-disabled",
79
+ "true",
80
+ );
78
81
  });
79
82
 
80
83
  it("should add aria-current if active is set", () => {
@@ -2,6 +2,8 @@
2
2
  import * as React from "react";
3
3
  import {StyleSheet} from "aphrodite";
4
4
 
5
+ import type {StyleType} from "@khanacademy/wonder-blocks-core";
6
+
5
7
  import Clickable from "@khanacademy/wonder-blocks-clickable";
6
8
  import {View} from "@khanacademy/wonder-blocks-core";
7
9
  import Color, {fade} from "@khanacademy/wonder-blocks-color";
@@ -94,11 +96,19 @@ type CellCoreProps = {|
94
96
  * The content of the cell.
95
97
  */
96
98
  children: React.Node,
99
+
100
+ /**
101
+ * The optional styles applied to the inner wrapper.
102
+ *
103
+ * Note: This is not intended to be used externally, only used directly
104
+ * within the package scope.
105
+ */
106
+ innerStyle?: StyleType,
97
107
  |};
98
108
 
99
109
  /**
100
110
  * CellCore is the base cell wrapper. It's used as the skeleton/layout that is
101
- * used by BasicCell and DetailCell (and any other variants).
111
+ * used by CompactCell and DetailCell (and any other variants).
102
112
  *
103
113
  * Both variants share how they render their accessories, and the main
104
114
  * responsibility of this component is to render the contents that are passed in
@@ -118,6 +128,7 @@ const CellCore = (props: CellCoreProps): React.Node => {
118
128
  style,
119
129
  testId,
120
130
  "aria-label": ariaLabel,
131
+ innerStyle,
121
132
  } = props;
122
133
 
123
134
  const renderCell = (eventState?: ClickableState): React.Node => {
@@ -130,14 +141,15 @@ const CellCore = (props: CellCoreProps): React.Node => {
130
141
  // focused applied to the main wrapper to make the border
131
142
  // outline part of the wrapper
132
143
  eventState?.focused && styles.focused,
133
- // custom styles
134
- style,
135
144
  ]}
136
145
  aria-current={active ? "true" : undefined}
137
146
  >
138
147
  <View
139
148
  style={[
140
149
  styles.innerWrapper,
150
+ innerStyle,
151
+ // custom styles
152
+ style,
141
153
  horizontalRuleStyles,
142
154
  disabled && styles.disabled,
143
155
  active && styles.active,
@@ -273,6 +285,9 @@ const styles = StyleSheet.create({
273
285
 
274
286
  disabled: {
275
287
  color: Color.offBlack32,
288
+ ":hover": {
289
+ cursor: "not-allowed",
290
+ },
276
291
  },
277
292
 
278
293
  accessoryActive: {
@@ -18,6 +18,14 @@ export const CellMeasurements = {
18
18
  paddingHorizontal: Spacing.medium_16,
19
19
  },
20
20
 
21
+ /**
22
+ * The DetailCell wrapper's gap.
23
+ */
24
+ detailCellPadding: {
25
+ paddingVertical: Spacing.small_12,
26
+ paddingHorizontal: Spacing.medium_16,
27
+ },
28
+
21
29
  /**
22
30
  * The extra vertical spacing added to the title/content wrapper.
23
31
  */
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import BasicCell from "./components/basic-cell.js";
2
+ import CompactCell from "./components/compact-cell.js";
3
3
  import DetailCell from "./components/detail-cell.js";
4
4
 
5
- export {BasicCell, DetailCell};
5
+ export {CompactCell, DetailCell};