@khanacademy/perseus 4.0.1 → 5.0.0

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.
Files changed (210) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/components/highlighting/highlightable-content.d.ts +4 -4
  3. package/dist/components/highlighting/highlightable-content.js.flow +4 -7
  4. package/dist/components/highlighting/ui/highlight-renderer.d.ts +6 -6
  5. package/dist/components/highlighting/ui/highlight-renderer.js.flow +6 -8
  6. package/dist/components/highlighting/ui/highlight-set-renderer.d.ts +5 -5
  7. package/dist/components/highlighting/ui/highlight-set-renderer.js.flow +5 -8
  8. package/dist/components/highlighting/ui/highlight-tooltip.d.ts +2 -2
  9. package/dist/components/highlighting/ui/highlight-tooltip.js.flow +2 -4
  10. package/dist/components/highlighting/ui/highlighting-ui.d.ts +3 -3
  11. package/dist/components/highlighting/ui/highlighting-ui.js.flow +2 -2
  12. package/dist/components/highlighting/ui/selection-tracker.d.ts +5 -5
  13. package/dist/components/highlighting/ui/selection-tracker.js.flow +5 -7
  14. package/dist/components/highlighting/word-indexer.d.ts +2 -2
  15. package/dist/components/highlighting/word-indexer.js.flow +2 -2
  16. package/dist/components/inline-icon.d.ts +35 -1
  17. package/dist/components/inline-icon.js.flow +11 -1
  18. package/dist/components/simple-keypad-input.d.ts +1 -1
  19. package/dist/components/simple-keypad-input.js.flow +1 -1
  20. package/dist/components/tex-buttons.d.ts +2 -2
  21. package/dist/components/tex-buttons.js.flow +2 -2
  22. package/dist/error-boundary.d.ts +4 -4
  23. package/dist/error-boundary.js.flow +4 -6
  24. package/dist/es/index.js +53 -233
  25. package/dist/es/index.js.map +1 -1
  26. package/dist/index.js +53 -233
  27. package/dist/index.js.map +1 -1
  28. package/dist/multi-items/multi-renderer.d.ts +1 -1
  29. package/dist/multi-items/multi-renderer.js.flow +1 -1
  30. package/dist/multi-items/prop-type-builders.d.ts +1 -1
  31. package/dist/multi-items/shape-types.d.ts +1 -1
  32. package/dist/multi-items/shape-types.js.flow +1 -1
  33. package/dist/multi-items/tree-types.d.ts +1 -1
  34. package/dist/multi-items/tree-types.js.flow +1 -1
  35. package/dist/perseus-types.d.ts +0 -1
  36. package/dist/perseus-types.js.flow +0 -1
  37. package/dist/widgets/__stories__/test-keypad-context-wrapper.d.ts +6 -0
  38. package/dist/widgets/__stories__/test-keypad-context-wrapper.js.flow +12 -0
  39. package/dist/widgets/expression.d.ts +2 -2
  40. package/dist/widgets/expression.js.flow +2 -2
  41. package/dist/widgets/interaction/element-container.d.ts +5 -4
  42. package/dist/widgets/interaction/element-container.js.flow +6 -11
  43. package/dist/widgets/label-image/marker.d.ts +4 -4
  44. package/dist/widgets/label-image/marker.js.flow +4 -6
  45. package/dist/widgets/numeric-input.d.ts +0 -2
  46. package/dist/widgets/numeric-input.js.flow +0 -4
  47. package/dist/widgets/radio/base-radio.d.ts +7 -1
  48. package/dist/widgets/radio/base-radio.js.flow +7 -1
  49. package/dist/widgets/radio/choice-icon/choice-icon.d.ts +1 -1
  50. package/dist/widgets/radio/choice-icon/choice-icon.js.flow +1 -1
  51. package/dist/widgets/radio/choice-icon/cross-out-line.d.ts +2 -2
  52. package/dist/widgets/radio/choice-icon/cross-out-line.js.flow +2 -2
  53. package/dist/widgets/radio/focus-ring.d.ts +8 -1
  54. package/dist/widgets/radio/focus-ring.js.flow +8 -1
  55. package/dist/widgets/radio/option-status.d.ts +2 -2
  56. package/dist/widgets/radio/option-status.js.flow +2 -2
  57. package/dist/widgets/video-transcript-link.d.ts +1 -1
  58. package/dist/widgets/video-transcript-link.js.flow +1 -1
  59. package/package.json +4 -4
  60. package/src/__stories__/item-renderer.stories.tsx +2 -6
  61. package/src/__stories__/server-item-renderer.stories.tsx +2 -6
  62. package/src/__testdata__/item-renderer.testdata.ts +1 -1
  63. package/src/__testdata__/renderer.testdata.ts +1 -1
  64. package/src/__tests__/item-renderer.test.tsx +1 -2
  65. package/src/__tests__/renderer-api.test.tsx +1 -5
  66. package/src/__tests__/renderer.test.tsx +1 -1
  67. package/src/components/__stories__/button-group.stories.tsx +2 -6
  68. package/src/components/__stories__/fixed-to-responsive.stories.tsx +14 -16
  69. package/src/components/__stories__/graph.stories.tsx +3 -5
  70. package/src/components/__stories__/graphie.stories.tsx +3 -5
  71. package/src/components/__stories__/hud.stories.tsx +2 -6
  72. package/src/components/__stories__/icon.stories.tsx +1 -1
  73. package/src/components/__stories__/image-loader.stories.tsx +4 -4
  74. package/src/components/__stories__/info-tip.stories.tsx +2 -6
  75. package/src/components/__stories__/inline-icon.stories.tsx +4 -8
  76. package/src/components/__stories__/input-with-examples.stories.tsx +6 -10
  77. package/src/components/__stories__/lint.stories.tsx +12 -12
  78. package/src/components/__stories__/math-input.stories.tsx +4 -8
  79. package/src/components/__stories__/math-output.stories.tsx +3 -5
  80. package/src/components/__stories__/multi-button-group.stories.tsx +2 -6
  81. package/src/components/__stories__/number-input.stories.tsx +6 -8
  82. package/src/components/__stories__/prop-check-box.stories.tsx +9 -9
  83. package/src/components/__stories__/range-input.stories.tsx +4 -6
  84. package/src/components/__stories__/simple-keypad-input.stories.tsx +2 -4
  85. package/src/components/__stories__/sortable.stories.tsx +15 -15
  86. package/src/components/__stories__/stub-tag-editor.stories.tsx +5 -9
  87. package/src/components/__stories__/svg-image.stories.tsx +10 -18
  88. package/src/components/__stories__/tex.stories.tsx +1 -3
  89. package/src/components/__stories__/text-buttons.stories.tsx +10 -22
  90. package/src/components/__stories__/text-input.stories.tsx +4 -10
  91. package/src/components/__stories__/text-list-editor.stories.tsx +1 -3
  92. package/src/components/__stories__/zoomable-tex.stories.tsx +6 -4
  93. package/src/components/__stories__/zoomable.stories.tsx +1 -3
  94. package/src/components/fixed-to-responsive.tsx +0 -1
  95. package/src/components/graph.tsx +0 -4
  96. package/src/components/highlighting/highlightable-content.tsx +4 -7
  97. package/src/components/highlighting/ui/highlight-renderer.tsx +6 -9
  98. package/src/components/highlighting/ui/highlight-set-renderer.tsx +5 -8
  99. package/src/components/highlighting/ui/highlight-tooltip.tsx +2 -2
  100. package/src/components/highlighting/ui/highlighting-ui.tsx +5 -15
  101. package/src/components/highlighting/ui/selection-tracker.tsx +6 -9
  102. package/src/components/highlighting/word-indexer.tsx +2 -6
  103. package/src/components/inline-icon.tsx +2 -2
  104. package/src/components/math-input.tsx +0 -2
  105. package/src/components/number-input.tsx +0 -2
  106. package/src/components/simple-keypad-input.tsx +2 -2
  107. package/src/components/tex-buttons.tsx +2 -2
  108. package/src/components/text-list-editor.tsx +0 -4
  109. package/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx +1 -3
  110. package/src/components/zoomable-tex.tsx +0 -2
  111. package/src/components/zoomable.tsx +0 -4
  112. package/src/definition-context.tsx +0 -1
  113. package/src/error-boundary.tsx +4 -7
  114. package/src/hints-renderer.tsx +1 -1
  115. package/src/interactive2/__tests__/movable-point.test.ts +0 -1
  116. package/src/item-renderer.tsx +0 -5
  117. package/src/mixins/changeable.ts +1 -1
  118. package/src/multi-items/__stories__/multi-renderer.stories.tsx +1 -5
  119. package/src/multi-items/__tests__/items.test.ts +3 -13
  120. package/src/multi-items/__tests__/multi-renderer.test.tsx +3 -4
  121. package/src/multi-items/__tests__/prop-type-builders.test.ts +1 -1
  122. package/src/multi-items/__tests__/trees.test.ts +2 -10
  123. package/src/multi-items/multi-renderer.tsx +7 -10
  124. package/src/multi-items/prop-type-builders.ts +1 -1
  125. package/src/multi-items/shape-types.ts +1 -1
  126. package/src/multi-items/tree-types.ts +1 -1
  127. package/src/perseus-markdown.tsx +0 -2
  128. package/src/perseus-types.ts +1 -4
  129. package/src/renderer.tsx +2 -5
  130. package/src/server-item-renderer.tsx +0 -3
  131. package/src/util/graphie.ts +3 -3
  132. package/src/util/interactive.ts +0 -4
  133. package/src/util/math.ts +0 -3
  134. package/src/widgets/__stories__/categorizer.stories.tsx +1 -1
  135. package/src/widgets/__stories__/cs-program.stories.tsx +1 -1
  136. package/src/widgets/__stories__/definition.stories.tsx +3 -7
  137. package/src/widgets/__stories__/dropdown.stories.tsx +1 -1
  138. package/src/widgets/__stories__/explanation.stories.tsx +2 -2
  139. package/src/widgets/__stories__/expression.stories.tsx +113 -13
  140. package/src/widgets/__stories__/graded-group-set.stories.tsx +1 -1
  141. package/src/widgets/__stories__/graded-group.stories.tsx +1 -1
  142. package/src/widgets/__stories__/grapher.stories.tsx +7 -21
  143. package/src/widgets/__stories__/group.stories.tsx +1 -1
  144. package/src/widgets/__stories__/iframe.stories.tsx +1 -1
  145. package/src/widgets/__stories__/image.stories.tsx +2 -2
  146. package/src/widgets/__stories__/input-number.stories.tsx +3 -12
  147. package/src/widgets/__stories__/interaction.stories.tsx +1 -1
  148. package/src/widgets/__stories__/interactive-graph.stories.tsx +9 -9
  149. package/src/widgets/__stories__/matcher.stories.tsx +1 -1
  150. package/src/widgets/__stories__/matrix.stories.tsx +1 -1
  151. package/src/widgets/__stories__/number-line.stories.tsx +1 -1
  152. package/src/widgets/__stories__/numeric-input.stories.tsx +3 -5
  153. package/src/widgets/__stories__/orderer.stories.tsx +1 -1
  154. package/src/widgets/__stories__/passage-ref.stories.tsx +2 -2
  155. package/src/widgets/__stories__/passage.stories.tsx +3 -9
  156. package/src/widgets/__stories__/radio.stories.tsx +3 -5
  157. package/src/widgets/__stories__/sorter.stories.tsx +1 -1
  158. package/src/widgets/__stories__/{on-screen-keypad.stories.tsx → test-keypad-context-wrapper.tsx} +15 -57
  159. package/src/widgets/__stories__/transformer.stories.tsx +1 -1
  160. package/src/widgets/__stories__/unit.stories.tsx +1 -3
  161. package/src/widgets/__stories__/video-transcript-link.stories.tsx +2 -6
  162. package/src/widgets/__stories__/video.stories.tsx +1 -1
  163. package/src/widgets/__testdata__/expression.testdata.ts +16 -12
  164. package/src/widgets/__testdata__/group.testdata.ts +0 -2
  165. package/src/widgets/__testdata__/numeric-input.testdata.ts +0 -1
  166. package/src/widgets/__testdata__/transformer.testdata.ts +0 -1
  167. package/src/widgets/__tests__/group.test.tsx +0 -2
  168. package/src/widgets/__tests__/radio/focus-ring.test.tsx +0 -1
  169. package/src/widgets/__tests__/radio.test.ts +1 -1
  170. package/src/widgets/expression.tsx +4 -4
  171. package/src/widgets/graded-group-set.tsx +0 -4
  172. package/src/widgets/graded-group.tsx +0 -4
  173. package/src/widgets/grapher/util.tsx +1 -5
  174. package/src/widgets/grapher.tsx +0 -5
  175. package/src/widgets/group.tsx +0 -1
  176. package/src/widgets/interaction/element-container.tsx +7 -8
  177. package/src/widgets/interaction.tsx +0 -1
  178. package/src/widgets/interactive-graph.tsx +3 -62
  179. package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +2 -4
  180. package/src/widgets/label-image/__stories__/marker.stories.tsx +9 -19
  181. package/src/widgets/label-image/marker.tsx +4 -4
  182. package/src/widgets/label-image.tsx +1 -1
  183. package/src/widgets/measurer.tsx +0 -1
  184. package/src/widgets/number-line.tsx +0 -2
  185. package/src/widgets/numeric-input.tsx +0 -3
  186. package/src/widgets/orderer.tsx +0 -3
  187. package/src/widgets/passage/passage-markdown.tsx +3 -3
  188. package/src/widgets/passage-ref-target.tsx +0 -1
  189. package/src/widgets/passage.tsx +1 -1
  190. package/src/widgets/plotter.tsx +0 -1
  191. package/src/widgets/radio/__stories__/base-radio.stories.tsx +13 -21
  192. package/src/widgets/radio/__stories__/choice-icon.stories.tsx +9 -11
  193. package/src/widgets/radio/__stories__/choice-none-above.stories.tsx +1 -1
  194. package/src/widgets/radio/__stories__/choice.stories.tsx +4 -4
  195. package/src/widgets/radio/__stories__/focus-ring.stories.tsx +1 -1
  196. package/src/widgets/radio/__stories__/option-status.stories.tsx +2 -4
  197. package/src/widgets/radio/base-radio.tsx +2 -2
  198. package/src/widgets/radio/choice-icon/choice-icon.tsx +5 -5
  199. package/src/widgets/radio/choice-icon/cross-out-line.tsx +1 -3
  200. package/src/widgets/radio/choice-none-above.tsx +2 -2
  201. package/src/widgets/radio/choice.tsx +1 -3
  202. package/src/widgets/radio/focus-ring.tsx +1 -1
  203. package/src/widgets/radio/option-status.tsx +2 -4
  204. package/src/widgets/radio/widget.tsx +0 -1
  205. package/src/widgets/reaction-diagram.tsx +2 -2
  206. package/src/widgets/transformer.tsx +1 -16
  207. package/src/widgets/video-transcript-link.tsx +1 -1
  208. package/src/widgets.ts +1 -1
  209. package/src/zoom.ts +0 -3
  210. package/tsconfig.tsbuildinfo +1 -1
@@ -21,8 +21,8 @@ export default {
21
21
  title: "Perseus/Components/Fixed to Responsive",
22
22
  } as Story;
23
23
 
24
- export const SmallImageWithSmallContainer: React.FC<StoryArgs> = (
25
- args,
24
+ export const SmallImageWithSmallContainer = (
25
+ args: StoryArgs,
26
26
  ): React.ReactElement => {
27
27
  return (
28
28
  <FixedToResponsive width={width} height={sizeSmall}>
@@ -36,8 +36,8 @@ export const SmallImageWithSmallContainer: React.FC<StoryArgs> = (
36
36
  );
37
37
  };
38
38
 
39
- export const SmallImageWithMediumContainer: React.FC<StoryArgs> = (
40
- args,
39
+ export const SmallImageWithMediumContainer = (
40
+ args: StoryArgs,
41
41
  ): React.ReactElement => {
42
42
  return (
43
43
  <FixedToResponsive width={width} height={sizeMedium}>
@@ -51,8 +51,8 @@ export const SmallImageWithMediumContainer: React.FC<StoryArgs> = (
51
51
  );
52
52
  };
53
53
 
54
- export const LargeImageWithLargeContainer: React.FC<StoryArgs> = (
55
- args,
54
+ export const LargeImageWithLargeContainer = (
55
+ args: StoryArgs,
56
56
  ): React.ReactElement => {
57
57
  return (
58
58
  <FixedToResponsive width={width} height={sizeLarge}>
@@ -66,8 +66,8 @@ export const LargeImageWithLargeContainer: React.FC<StoryArgs> = (
66
66
  );
67
67
  };
68
68
 
69
- export const LargeImageWithSmallerContainer: React.FC<StoryArgs> = (
70
- args,
69
+ export const LargeImageWithSmallerContainer = (
70
+ args: StoryArgs,
71
71
  ): React.ReactElement => {
72
72
  return (
73
73
  <FixedToResponsive width={width} height={sizeSmall}>
@@ -81,9 +81,9 @@ export const LargeImageWithSmallerContainer: React.FC<StoryArgs> = (
81
81
  );
82
82
  };
83
83
 
84
- export const TwoOverlayedImagesInsteadOneResponsiveContainer: React.FC<
85
- StoryArgs
86
- > = (args): React.ReactElement => {
84
+ export const TwoOverlayedImagesInsteadOneResponsiveContainer = (
85
+ args: StoryArgs,
86
+ ): React.ReactElement => {
87
87
  return (
88
88
  <FixedToResponsive width={width} height={sizeSmall}>
89
89
  <img
@@ -104,8 +104,8 @@ export const TwoOverlayedImagesInsteadOneResponsiveContainer: React.FC<
104
104
  );
105
105
  };
106
106
 
107
- export const HeightConstrainingAnImage: React.FC<StoryArgs> = (
108
- args,
107
+ export const HeightConstrainingAnImage = (
108
+ args: StoryArgs,
109
109
  ): React.ReactElement => {
110
110
  return (
111
111
  <FixedToResponsive
@@ -123,9 +123,7 @@ export const HeightConstrainingAnImage: React.FC<StoryArgs> = (
123
123
  );
124
124
  };
125
125
 
126
- export const AllowingFullBleed: React.FC<StoryArgs> = (
127
- args,
128
- ): React.ReactElement => {
126
+ export const AllowingFullBleed = (args: StoryArgs): React.ReactElement => {
129
127
  return (
130
128
  <FixedToResponsive
131
129
  width={width}
@@ -15,15 +15,13 @@ export default {
15
15
  title: "Perseus/Components/Graph",
16
16
  } as Story;
17
17
 
18
- export const SquareBoxSizeAndOtherwiseEmpty: React.FC<StoryArgs> = (
19
- args,
18
+ export const SquareBoxSizeAndOtherwiseEmpty = (
19
+ args: StoryArgs,
20
20
  ): React.ReactElement => {
21
21
  return <Graph box={[size, size]} />;
22
22
  };
23
23
 
24
- export const LabeledSquaredBox: React.FC<StoryArgs> = (
25
- args,
26
- ): React.ReactElement => {
24
+ export const LabeledSquaredBox = (args: StoryArgs): React.ReactElement => {
27
25
  return (
28
26
  <Graph box={[size, size]} labels={["First label", "Second label"]} />
29
27
  );
@@ -16,8 +16,8 @@ export default {
16
16
  title: "Perseus/Components/Graphie",
17
17
  } as Story;
18
18
 
19
- export const SquareBoxSizeAndOtherwiseEmpty: React.FC<StoryArgs> = (
20
- args,
19
+ export const SquareBoxSizeAndOtherwiseEmpty = (
20
+ args: StoryArgs,
21
21
  ): React.ReactElement => {
22
22
  return (
23
23
  <Graphie
@@ -28,8 +28,6 @@ export const SquareBoxSizeAndOtherwiseEmpty: React.FC<StoryArgs> = (
28
28
  );
29
29
  };
30
30
 
31
- export const PieChartGraphieLabels: React.FC<StoryArgs> = (
32
- args,
33
- ): React.ReactElement => {
31
+ export const PieChartGraphieLabels = (args: StoryArgs): React.ReactElement => {
34
32
  return <ItemRendererWithDebugUI item={itemWithPieChart} />;
35
33
  };
@@ -12,9 +12,7 @@ export default {
12
12
  title: "Perseus/Components/HUD",
13
13
  } as Story;
14
14
 
15
- export const TestMessageDisabled: React.FC<StoryArgs> = (
16
- args,
17
- ): React.ReactElement => {
15
+ export const TestMessageDisabled = (args: StoryArgs): React.ReactElement => {
18
16
  return (
19
17
  <Hud
20
18
  fixedPosition={false}
@@ -25,9 +23,7 @@ export const TestMessageDisabled: React.FC<StoryArgs> = (
25
23
  );
26
24
  };
27
25
 
28
- export const TestMessageEnabled: React.FC<StoryArgs> = (
29
- args,
30
- ): React.ReactElement => {
26
+ export const TestMessageEnabled = (args: StoryArgs): React.ReactElement => {
31
27
  return (
32
28
  <Hud
33
29
  fixedPosition={false}
@@ -54,7 +54,7 @@ export default {
54
54
  },
55
55
  } as Story;
56
56
 
57
- export const Icon: React.FC<StoryArgs> = (args): React.ReactElement => (
57
+ export const Icon = (args: StoryArgs): React.ReactElement => (
58
58
  <IconComponent
59
59
  style={{display: "block"}}
60
60
  icon={IconPaths.iconCheck}
@@ -15,7 +15,7 @@ export default {
15
15
  title: "Perseus/Components/Image Loader",
16
16
  } as Story;
17
17
 
18
- export const SvgImage: React.FC<StoryArgs> = (args): React.ReactElement => {
18
+ export const SvgImage = (args: StoryArgs): React.ReactElement => {
19
19
  return (
20
20
  <ImageLoader
21
21
  src={svgUrl}
@@ -29,7 +29,7 @@ export const SvgImage: React.FC<StoryArgs> = (args): React.ReactElement => {
29
29
  );
30
30
  };
31
31
 
32
- export const PngImage: React.FC<StoryArgs> = (args): React.ReactElement => {
32
+ export const PngImage = (args: StoryArgs): React.ReactElement => {
33
33
  return (
34
34
  <ImageLoader
35
35
  src={imgUrl}
@@ -43,8 +43,8 @@ export const PngImage: React.FC<StoryArgs> = (args): React.ReactElement => {
43
43
  );
44
44
  };
45
45
 
46
- export const InvalidImageWithChildrenForFailedLoading: React.FC<StoryArgs> = (
47
- args,
46
+ export const InvalidImageWithChildrenForFailedLoading = (
47
+ args: StoryArgs,
48
48
  ): React.ReactElement => {
49
49
  return (
50
50
  <ImageLoader
@@ -14,9 +14,7 @@ export default {
14
14
 
15
15
  const svgUrl = "http://www.khanacademy.org/images/ohnoes-concerned.svg";
16
16
 
17
- export const TextOnMouseover: React.FC<StoryArgs> = (
18
- args,
19
- ): React.ReactElement => {
17
+ export const TextOnMouseover = (args: StoryArgs): React.ReactElement => {
20
18
  return (
21
19
  <InfoTip>
22
20
  <span>Sample text</span>
@@ -24,9 +22,7 @@ export const TextOnMouseover: React.FC<StoryArgs> = (
24
22
  );
25
23
  };
26
24
 
27
- export const ImageOnMouseover: React.FC<StoryArgs> = (
28
- args,
29
- ): React.ReactElement => {
25
+ export const ImageOnMouseover = (args: StoryArgs): React.ReactElement => {
30
26
  return (
31
27
  <InfoTip>
32
28
  <img alt="" src={svgUrl} />
@@ -18,14 +18,12 @@ export default {
18
18
  title: "Perseus/Components/Inline Icon",
19
19
  } as Story;
20
20
 
21
- export const BasicIconPathAndSizing: React.FC<StoryArgs> = (
22
- args,
23
- ): React.ReactElement => {
21
+ export const BasicIconPathAndSizing = (args: StoryArgs): React.ReactElement => {
24
22
  return <InlineIcon {...defaultPath} />;
25
23
  };
26
24
 
27
- export const BasicIconWithAdditionalStyling: React.FC<StoryArgs> = (
28
- args,
25
+ export const BasicIconWithAdditionalStyling = (
26
+ args: StoryArgs,
29
27
  ): React.ReactElement => {
30
28
  return (
31
29
  <InlineIcon
@@ -37,8 +35,6 @@ export const BasicIconWithAdditionalStyling: React.FC<StoryArgs> = (
37
35
  );
38
36
  };
39
37
 
40
- export const BasicIconWithAriaTitle: React.FC<StoryArgs> = (
41
- args,
42
- ): React.ReactElement => {
38
+ export const BasicIconWithAriaTitle = (args: StoryArgs): React.ReactElement => {
43
39
  return <InlineIcon {...defaultPath} title="Sample ARIA title" />;
44
40
  };
@@ -20,20 +20,18 @@ const defaultObject = {
20
20
  } as const;
21
21
  const testExamples = ["Sample 1", "Sample 2", "Sample 3"];
22
22
 
23
- export const DefaultAndMostlyEmptyProps: React.FC<StoryArgs> = (
24
- args,
23
+ export const DefaultAndMostlyEmptyProps = (
24
+ args: StoryArgs,
25
25
  ): React.ReactElement => {
26
26
  return <InputWithExamples {...defaultObject} />;
27
27
  };
28
28
 
29
- export const ListOfExamples: React.FC<StoryArgs> = (
30
- args,
31
- ): React.ReactElement => {
29
+ export const ListOfExamples = (args: StoryArgs): React.ReactElement => {
32
30
  return <InputWithExamples {...defaultObject} examples={testExamples} />;
33
31
  };
34
32
 
35
- export const AriaLabelTextWithListOfExamples: React.FC<StoryArgs> = (
36
- args,
33
+ export const AriaLabelTextWithListOfExamples = (
34
+ args: StoryArgs,
37
35
  ): React.ReactElement => {
38
36
  return (
39
37
  <InputWithExamples
@@ -44,9 +42,7 @@ export const AriaLabelTextWithListOfExamples: React.FC<StoryArgs> = (
44
42
  );
45
43
  };
46
44
 
47
- export const DisabledInput: React.FC<StoryArgs> = (
48
- args,
49
- ): React.ReactElement => {
45
+ export const DisabledInput = (args: StoryArgs): React.ReactElement => {
50
46
  return (
51
47
  <InputWithExamples
52
48
  {...defaultObject}
@@ -19,33 +19,33 @@ const defaultObject = {
19
19
  ruleName: "Test rule",
20
20
  } as const;
21
21
 
22
- export const DefaultLintContainerAndMessage: React.FC<StoryArgs> = (
23
- args,
22
+ export const DefaultLintContainerAndMessage = (
23
+ args: StoryArgs,
24
24
  ): React.ReactElement => {
25
25
  return <Lint {...defaultObject} />;
26
26
  };
27
- export const Severity1DefaultLintAndMessage: React.FC<StoryArgs> = (
28
- args,
27
+ export const Severity1DefaultLintAndMessage = (
28
+ args: StoryArgs,
29
29
  ): React.ReactElement => {
30
30
  return <Lint {...defaultObject} severity={1} />;
31
31
  };
32
- export const Severity2DefaultLintAndMessage: React.FC<StoryArgs> = (
33
- args,
32
+ export const Severity2DefaultLintAndMessage = (
33
+ args: StoryArgs,
34
34
  ): React.ReactElement => {
35
35
  return <Lint {...defaultObject} severity={2} />;
36
36
  };
37
- export const Severity3DefaultLintAndMessage: React.FC<StoryArgs> = (
38
- args,
37
+ export const Severity3DefaultLintAndMessage = (
38
+ args: StoryArgs,
39
39
  ): React.ReactElement => {
40
40
  return <Lint {...defaultObject} severity={3} />;
41
41
  };
42
- export const Severity4DefaultLintAndMessage: React.FC<StoryArgs> = (
43
- args,
42
+ export const Severity4DefaultLintAndMessage = (
43
+ args: StoryArgs,
44
44
  ): React.ReactElement => {
45
45
  return <Lint {...defaultObject} severity={4} />;
46
46
  };
47
- export const InlineLintContainerAndMessage: React.FC<StoryArgs> = (
48
- args,
47
+ export const InlineLintContainerAndMessage = (
48
+ args: StoryArgs,
49
49
  ): React.ReactElement => {
50
50
  return <Lint {...defaultObject} inline={true} />;
51
51
  };
@@ -17,18 +17,14 @@ const defaultObject = {
17
17
  onChange: () => {},
18
18
  } as const;
19
19
 
20
- export const DefaultWithBasicButtonSet: React.FC<StoryArgs> = (
21
- args,
20
+ export const DefaultWithBasicButtonSet = (
21
+ args: StoryArgs,
22
22
  ): React.ReactElement => {
23
23
  return <MathInput {...defaultObject} />;
24
24
  };
25
- export const AlwaysVisibleButtonSet: React.FC<StoryArgs> = (
26
- args,
27
- ): React.ReactElement => {
25
+ export const AlwaysVisibleButtonSet = (args: StoryArgs): React.ReactElement => {
28
26
  return <MathInput {...defaultObject} buttonsVisible="always" />;
29
27
  };
30
- export const DefaultWithAriaLabel: React.FC<StoryArgs> = (
31
- args,
32
- ): React.ReactElement => {
28
+ export const DefaultWithAriaLabel = (args: StoryArgs): React.ReactElement => {
33
29
  return <MathInput {...defaultObject} labelText="Sample label" />;
34
30
  };
@@ -12,14 +12,12 @@ export default {
12
12
  title: "Perseus/Components/Math Ouput",
13
13
  } as Story;
14
14
 
15
- export const EmptyPropsObject: React.FC<StoryArgs> = (
16
- args,
17
- ): React.ReactElement => {
15
+ export const EmptyPropsObject = (args: StoryArgs): React.ReactElement => {
18
16
  return <MathOutput />;
19
17
  };
20
- export const StringValue: React.FC<StoryArgs> = (args): React.ReactElement => {
18
+ export const StringValue = (args: StoryArgs): React.ReactElement => {
21
19
  return <MathOutput value="Test string value" />;
22
20
  };
23
- export const NumericValue: React.FC<StoryArgs> = (args): React.ReactElement => {
21
+ export const NumericValue = (args: StoryArgs): React.ReactElement => {
24
22
  return <MathOutput value={1234567890} />;
25
23
  };
@@ -39,9 +39,7 @@ const HarnassedButtonGroup = (
39
39
  );
40
40
  };
41
41
 
42
- export const ButtonsWithNoTitles: React.FC<StoryArgs> = (
43
- args,
44
- ): React.ReactElement => {
42
+ export const ButtonsWithNoTitles = (args: StoryArgs): React.ReactElement => {
45
43
  return (
46
44
  <HarnassedButtonGroup
47
45
  {...args}
@@ -54,9 +52,7 @@ export const ButtonsWithNoTitles: React.FC<StoryArgs> = (
54
52
  );
55
53
  };
56
54
 
57
- export const ButtonsWithTitles: React.FC<StoryArgs> = (
58
- args,
59
- ): React.ReactElement => {
55
+ export const ButtonsWithTitles = (args: StoryArgs): React.ReactElement => {
60
56
  return (
61
57
  <HarnassedButtonGroup
62
58
  {...args}
@@ -16,28 +16,26 @@ export default {
16
16
  title: "Perseus/Components/Number Input",
17
17
  } as Story;
18
18
 
19
- export const EmptyPropsObject: React.FC<StoryArgs> = (
20
- args,
21
- ): React.ReactElement => {
19
+ export const EmptyPropsObject = (args: StoryArgs): React.ReactElement => {
22
20
  return <NumberInput {...defaultObject} />;
23
21
  };
24
22
 
25
- export const SampleValue: React.FC<StoryArgs> = (args): React.ReactElement => {
23
+ export const SampleValue = (args: StoryArgs): React.ReactElement => {
26
24
  return <NumberInput {...defaultObject} value={1234567890} />;
27
25
  };
28
26
 
29
- export const Placeholder: React.FC<StoryArgs> = (args): React.ReactElement => {
27
+ export const Placeholder = (args: StoryArgs): React.ReactElement => {
30
28
  return <NumberInput {...defaultObject} placeholder="Sample placeholder" />;
31
29
  };
32
30
 
33
- export const SizeMini: React.FC<StoryArgs> = (args): React.ReactElement => {
31
+ export const SizeMini = (args: StoryArgs): React.ReactElement => {
34
32
  return <NumberInput {...defaultObject} placeholder="Sample placeholder" />;
35
33
  };
36
34
 
37
- export const SizeSmall: React.FC<StoryArgs> = (args): React.ReactElement => {
35
+ export const SizeSmall = (args: StoryArgs): React.ReactElement => {
38
36
  return <NumberInput {...defaultObject} size="small" />;
39
37
  };
40
38
 
41
- export const SizeNormal: React.FC<StoryArgs> = (args): React.ReactElement => {
39
+ export const SizeNormal = (args: StoryArgs): React.ReactElement => {
42
40
  return <NumberInput {...defaultObject} size="normal" />;
43
41
  };
@@ -12,8 +12,8 @@ export default {
12
12
  title: "Perseus/Components/Prop Check Box",
13
13
  } as Story;
14
14
 
15
- export const TestLabelWithCheckedObject: React.FC<StoryArgs> = (
16
- args,
15
+ export const TestLabelWithCheckedObject = (
16
+ args: StoryArgs,
17
17
  ): React.ReactElement => {
18
18
  return (
19
19
  <PropCheckBox
@@ -25,8 +25,8 @@ export const TestLabelWithCheckedObject: React.FC<StoryArgs> = (
25
25
  );
26
26
  };
27
27
 
28
- export const TestLabelWithUncheckedObject: React.FC<StoryArgs> = (
29
- args,
28
+ export const TestLabelWithUncheckedObject = (
29
+ args: StoryArgs,
30
30
  ): React.ReactElement => {
31
31
  return (
32
32
  <PropCheckBox
@@ -38,8 +38,8 @@ export const TestLabelWithUncheckedObject: React.FC<StoryArgs> = (
38
38
  );
39
39
  };
40
40
 
41
- export const TestLabelWithCheckedObjectLabelOnTheRight: React.FC<StoryArgs> = (
42
- args,
41
+ export const TestLabelWithCheckedObjectLabelOnTheRight = (
42
+ args: StoryArgs,
43
43
  ): React.ReactElement => {
44
44
  return (
45
45
  <PropCheckBox
@@ -51,9 +51,9 @@ export const TestLabelWithCheckedObjectLabelOnTheRight: React.FC<StoryArgs> = (
51
51
  );
52
52
  };
53
53
 
54
- export const TestLabelWithUncheckedObjectLabelOnTheRight: React.FC<
55
- StoryArgs
56
- > = (args): React.ReactElement => {
54
+ export const TestLabelWithUncheckedObjectLabelOnTheRight = (
55
+ args: StoryArgs,
56
+ ): React.ReactElement => {
57
57
  return (
58
58
  <PropCheckBox
59
59
  test={false}
@@ -12,19 +12,17 @@ export default {
12
12
  title: "Perseus/Components/Range Input",
13
13
  } as Story;
14
14
 
15
- export const EmptyValueArray: React.FC<StoryArgs> = (
16
- args,
17
- ): React.ReactElement => {
15
+ export const EmptyValueArray = (args: StoryArgs): React.ReactElement => {
18
16
  return <RangeInput onChange={() => {}} value={[]} />;
19
17
  };
20
18
 
21
- export const SimpleWithSmallValueRanges: React.FC<StoryArgs> = (
22
- args,
19
+ export const SimpleWithSmallValueRanges = (
20
+ args: StoryArgs,
23
21
  ): React.ReactElement => {
24
22
  return <RangeInput onChange={() => {}} value={[-10, 10]} />;
25
23
  };
26
24
 
27
- export const Placeholders: React.FC<StoryArgs> = (args): React.ReactElement => {
25
+ export const Placeholders = (args: StoryArgs): React.ReactElement => {
28
26
  return (
29
27
  <RangeInput onChange={() => {}} placeholder={["?", "!"]} value={[]} />
30
28
  );
@@ -18,12 +18,10 @@ export default {
18
18
  title: "Perseus/Components/Simple Keypad Input",
19
19
  } as Story;
20
20
 
21
- export const EmptyPropsObject: React.FC<StoryArgs> = (
22
- args,
23
- ): React.ReactElement => {
21
+ export const EmptyPropsObject = (args: StoryArgs): React.ReactElement => {
24
22
  return <SimpleKeypadInput {...defaultObject} />;
25
23
  };
26
24
 
27
- export const CustomValue: React.FC<StoryArgs> = (args): React.ReactElement => {
25
+ export const CustomValue = (args: StoryArgs): React.ReactElement => {
28
26
  return <SimpleKeypadInput {...defaultObject} value="Test value" />;
29
27
  };
@@ -14,8 +14,8 @@ export default {
14
14
  title: "Perseus/Components/Sortable",
15
15
  } as Story;
16
16
 
17
- export const SortableHorizontalExample: React.FC<StoryArgs> = (
18
- args,
17
+ export const SortableHorizontalExample = (
18
+ args: StoryArgs,
19
19
  ): React.ReactElement => {
20
20
  return (
21
21
  <Sortable
@@ -26,8 +26,8 @@ export const SortableHorizontalExample: React.FC<StoryArgs> = (
26
26
  );
27
27
  };
28
28
 
29
- export const SortableVerticalExample: React.FC<StoryArgs> = (
30
- args,
29
+ export const SortableVerticalExample = (
30
+ args: StoryArgs,
31
31
  ): React.ReactElement => {
32
32
  return (
33
33
  <Sortable
@@ -38,33 +38,33 @@ export const SortableVerticalExample: React.FC<StoryArgs> = (
38
38
  );
39
39
  };
40
40
 
41
- export const BasicSortableOptionsTest: React.FC<StoryArgs> = (
42
- args,
41
+ export const BasicSortableOptionsTest = (
42
+ args: StoryArgs,
43
43
  ): React.ReactElement => {
44
44
  return <Sortable options={defaultOptions} />;
45
45
  };
46
46
 
47
- export const BasicSortableOptionsTestWithNoPadding: React.FC<StoryArgs> = (
48
- args,
47
+ export const BasicSortableOptionsTestWithNoPadding = (
48
+ args: StoryArgs,
49
49
  ): React.ReactElement => {
50
50
  return <Sortable options={defaultOptions} padding={false} />;
51
51
  };
52
52
 
53
- export const BasicSortableOptionsTestWithLargeMargin: React.FC<StoryArgs> = (
54
- args,
53
+ export const BasicSortableOptionsTestWithLargeMargin = (
54
+ args: StoryArgs,
55
55
  ): React.ReactElement => {
56
56
  return <Sortable options={defaultOptions} margin={64} />;
57
57
  };
58
58
 
59
- export const BasicSortableOptionsTestDisabled: React.FC<StoryArgs> = (
60
- args,
59
+ export const BasicSortableOptionsTestDisabled = (
60
+ args: StoryArgs,
61
61
  ): React.ReactElement => {
62
62
  return <Sortable options={defaultOptions} disabled={true} />;
63
63
  };
64
64
 
65
- export const BasicSortableOptionsTestWithWidthAndHeightConstraints: React.FC<
66
- StoryArgs
67
- > = (args): React.ReactElement => {
65
+ export const BasicSortableOptionsTestWithWidthAndHeightConstraints = (
66
+ args: StoryArgs,
67
+ ): React.ReactElement => {
68
68
  return (
69
69
  <Sortable
70
70
  options={defaultOptions}
@@ -14,19 +14,15 @@ export default {
14
14
 
15
15
  const defaultValues = ["Test value 1", "Test value 2", "Test value 3"];
16
16
 
17
- export const ShowingTitle: React.FC<StoryArgs> = (args): React.ReactElement => {
17
+ export const ShowingTitle = (args: StoryArgs): React.ReactElement => {
18
18
  return <StubTagEditor onChange={() => {}} showTitle={true} />;
19
19
  };
20
20
 
21
- export const NotShowingTitle: React.FC<StoryArgs> = (
22
- args,
23
- ): React.ReactElement => {
21
+ export const NotShowingTitle = (args: StoryArgs): React.ReactElement => {
24
22
  return <StubTagEditor onChange={() => {}} showTitle={false} />;
25
23
  };
26
24
 
27
- export const ShowingTitleWithValue: React.FC<StoryArgs> = (
28
- args,
29
- ): React.ReactElement => {
25
+ export const ShowingTitleWithValue = (args: StoryArgs): React.ReactElement => {
30
26
  return (
31
27
  <StubTagEditor
32
28
  onChange={() => {}}
@@ -36,8 +32,8 @@ export const ShowingTitleWithValue: React.FC<StoryArgs> = (
36
32
  );
37
33
  };
38
34
 
39
- export const NotShowingTitleWithValue: React.FC<StoryArgs> = (
40
- args,
35
+ export const NotShowingTitleWithValue = (
36
+ args: StoryArgs,
41
37
  ): React.ReactElement => {
42
38
  return (
43
39
  <StubTagEditor