@khanacademy/perseus 4.0.2 → 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 (153) hide show
  1. package/CHANGELOG.md +15 -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 +2 -2
  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 +7 -10
  25. package/dist/es/index.js.map +1 -1
  26. package/dist/index.js +7 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/perseus-types.d.ts +0 -1
  29. package/dist/perseus-types.js.flow +0 -1
  30. package/dist/widgets/__stories__/test-keypad-context-wrapper.d.ts +2 -2
  31. package/dist/widgets/__stories__/test-keypad-context-wrapper.js.flow +2 -4
  32. package/dist/widgets/expression.d.ts +2 -2
  33. package/dist/widgets/expression.js.flow +2 -2
  34. package/dist/widgets/interaction/element-container.d.ts +5 -4
  35. package/dist/widgets/interaction/element-container.js.flow +6 -11
  36. package/dist/widgets/label-image/marker.d.ts +4 -4
  37. package/dist/widgets/label-image/marker.js.flow +4 -6
  38. package/dist/widgets/numeric-input.d.ts +0 -2
  39. package/dist/widgets/numeric-input.js.flow +0 -4
  40. package/dist/widgets/radio/base-radio.d.ts +7 -1
  41. package/dist/widgets/radio/base-radio.js.flow +7 -1
  42. package/dist/widgets/radio/choice-icon/choice-icon.d.ts +1 -1
  43. package/dist/widgets/radio/choice-icon/choice-icon.js.flow +1 -1
  44. package/dist/widgets/radio/choice-icon/cross-out-line.d.ts +2 -2
  45. package/dist/widgets/radio/choice-icon/cross-out-line.js.flow +2 -2
  46. package/dist/widgets/radio/focus-ring.d.ts +8 -1
  47. package/dist/widgets/radio/focus-ring.js.flow +8 -1
  48. package/dist/widgets/radio/option-status.d.ts +2 -2
  49. package/dist/widgets/radio/option-status.js.flow +2 -2
  50. package/dist/widgets/video-transcript-link.d.ts +1 -1
  51. package/dist/widgets/video-transcript-link.js.flow +1 -1
  52. package/package.json +4 -4
  53. package/src/__stories__/item-renderer.stories.tsx +2 -6
  54. package/src/__stories__/server-item-renderer.stories.tsx +2 -6
  55. package/src/components/__stories__/button-group.stories.tsx +2 -6
  56. package/src/components/__stories__/fixed-to-responsive.stories.tsx +14 -16
  57. package/src/components/__stories__/graph.stories.tsx +3 -5
  58. package/src/components/__stories__/graphie.stories.tsx +3 -5
  59. package/src/components/__stories__/hud.stories.tsx +2 -6
  60. package/src/components/__stories__/icon.stories.tsx +1 -1
  61. package/src/components/__stories__/image-loader.stories.tsx +4 -4
  62. package/src/components/__stories__/info-tip.stories.tsx +2 -6
  63. package/src/components/__stories__/inline-icon.stories.tsx +4 -8
  64. package/src/components/__stories__/input-with-examples.stories.tsx +6 -10
  65. package/src/components/__stories__/lint.stories.tsx +12 -12
  66. package/src/components/__stories__/math-input.stories.tsx +4 -8
  67. package/src/components/__stories__/math-output.stories.tsx +3 -5
  68. package/src/components/__stories__/multi-button-group.stories.tsx +2 -6
  69. package/src/components/__stories__/number-input.stories.tsx +6 -8
  70. package/src/components/__stories__/prop-check-box.stories.tsx +9 -9
  71. package/src/components/__stories__/range-input.stories.tsx +4 -6
  72. package/src/components/__stories__/simple-keypad-input.stories.tsx +2 -4
  73. package/src/components/__stories__/sortable.stories.tsx +15 -15
  74. package/src/components/__stories__/stub-tag-editor.stories.tsx +5 -9
  75. package/src/components/__stories__/svg-image.stories.tsx +10 -18
  76. package/src/components/__stories__/tex.stories.tsx +1 -3
  77. package/src/components/__stories__/text-buttons.stories.tsx +10 -22
  78. package/src/components/__stories__/text-input.stories.tsx +4 -10
  79. package/src/components/__stories__/text-list-editor.stories.tsx +1 -3
  80. package/src/components/__stories__/zoomable-tex.stories.tsx +6 -4
  81. package/src/components/__stories__/zoomable.stories.tsx +1 -3
  82. package/src/components/highlighting/highlightable-content.tsx +4 -7
  83. package/src/components/highlighting/ui/highlight-renderer.tsx +6 -9
  84. package/src/components/highlighting/ui/highlight-set-renderer.tsx +5 -8
  85. package/src/components/highlighting/ui/highlight-tooltip.tsx +2 -2
  86. package/src/components/highlighting/ui/highlighting-ui.tsx +2 -2
  87. package/src/components/highlighting/ui/selection-tracker.tsx +5 -8
  88. package/src/components/highlighting/word-indexer.tsx +2 -2
  89. package/src/components/inline-icon.tsx +2 -2
  90. package/src/components/simple-keypad-input.tsx +2 -2
  91. package/src/components/tex-buttons.tsx +2 -2
  92. package/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx +1 -3
  93. package/src/error-boundary.tsx +4 -7
  94. package/src/multi-items/__stories__/multi-renderer.stories.tsx +1 -1
  95. package/src/multi-items/__tests__/multi-renderer.test.tsx +2 -3
  96. package/src/perseus-types.ts +0 -3
  97. package/src/util/graphie.ts +3 -3
  98. package/src/widgets/__stories__/categorizer.stories.tsx +1 -1
  99. package/src/widgets/__stories__/cs-program.stories.tsx +1 -1
  100. package/src/widgets/__stories__/definition.stories.tsx +3 -7
  101. package/src/widgets/__stories__/dropdown.stories.tsx +1 -1
  102. package/src/widgets/__stories__/explanation.stories.tsx +2 -2
  103. package/src/widgets/__stories__/expression.stories.tsx +5 -11
  104. package/src/widgets/__stories__/graded-group-set.stories.tsx +1 -1
  105. package/src/widgets/__stories__/graded-group.stories.tsx +1 -1
  106. package/src/widgets/__stories__/grapher.stories.tsx +7 -21
  107. package/src/widgets/__stories__/group.stories.tsx +1 -1
  108. package/src/widgets/__stories__/iframe.stories.tsx +1 -1
  109. package/src/widgets/__stories__/image.stories.tsx +1 -1
  110. package/src/widgets/__stories__/input-number.stories.tsx +3 -12
  111. package/src/widgets/__stories__/interaction.stories.tsx +1 -1
  112. package/src/widgets/__stories__/interactive-graph.stories.tsx +9 -9
  113. package/src/widgets/__stories__/matcher.stories.tsx +1 -1
  114. package/src/widgets/__stories__/matrix.stories.tsx +1 -1
  115. package/src/widgets/__stories__/number-line.stories.tsx +1 -1
  116. package/src/widgets/__stories__/numeric-input.stories.tsx +3 -5
  117. package/src/widgets/__stories__/orderer.stories.tsx +1 -1
  118. package/src/widgets/__stories__/passage-ref.stories.tsx +2 -2
  119. package/src/widgets/__stories__/passage.stories.tsx +3 -9
  120. package/src/widgets/__stories__/radio.stories.tsx +3 -5
  121. package/src/widgets/__stories__/sorter.stories.tsx +1 -1
  122. package/src/widgets/__stories__/test-keypad-context-wrapper.tsx +2 -4
  123. package/src/widgets/__stories__/transformer.stories.tsx +1 -1
  124. package/src/widgets/__stories__/unit.stories.tsx +1 -3
  125. package/src/widgets/__stories__/video-transcript-link.stories.tsx +2 -6
  126. package/src/widgets/__stories__/video.stories.tsx +1 -1
  127. package/src/widgets/__testdata__/group.testdata.ts +0 -2
  128. package/src/widgets/__tests__/group.test.tsx +0 -2
  129. package/src/widgets/__tests__/radio/focus-ring.test.tsx +0 -1
  130. package/src/widgets/expression.tsx +3 -3
  131. package/src/widgets/interaction/element-container.tsx +7 -8
  132. package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +2 -4
  133. package/src/widgets/label-image/__stories__/marker.stories.tsx +9 -19
  134. package/src/widgets/label-image/marker.tsx +4 -4
  135. package/src/widgets/numeric-input.tsx +0 -3
  136. package/src/widgets/passage/passage-markdown.tsx +2 -2
  137. package/src/widgets/radio/__stories__/base-radio.stories.tsx +11 -19
  138. package/src/widgets/radio/__stories__/choice-icon.stories.tsx +9 -11
  139. package/src/widgets/radio/__stories__/choice-none-above.stories.tsx +1 -1
  140. package/src/widgets/radio/__stories__/choice.stories.tsx +4 -4
  141. package/src/widgets/radio/__stories__/focus-ring.stories.tsx +1 -1
  142. package/src/widgets/radio/__stories__/option-status.stories.tsx +2 -4
  143. package/src/widgets/radio/base-radio.tsx +1 -1
  144. package/src/widgets/radio/choice-icon/choice-icon.tsx +5 -5
  145. package/src/widgets/radio/choice-icon/cross-out-line.tsx +1 -3
  146. package/src/widgets/radio/choice-none-above.tsx +2 -2
  147. package/src/widgets/radio/choice.tsx +1 -3
  148. package/src/widgets/radio/focus-ring.tsx +1 -1
  149. package/src/widgets/radio/option-status.tsx +2 -4
  150. package/src/widgets/radio/widget.tsx +0 -1
  151. package/src/widgets/reaction-diagram.tsx +2 -2
  152. package/src/widgets/video-transcript-link.tsx +1 -1
  153. package/tsconfig.tsbuildinfo +1 -1
@@ -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
@@ -17,15 +17,11 @@ const imgUrl = "https://www.khanacademy.org/images/hand-tree.new.png";
17
17
  const graphieUrl =
18
18
  "web+graphie://ka-perseus-graphie.s3.amazonaws.com/1e06f6d4071f30cee2cc3ccb7435b3a66a62fe3f";
19
19
 
20
- export const MostlyEmptyPropsObject: React.FC<StoryArgs> = (
21
- args,
22
- ): React.ReactElement => {
20
+ export const MostlyEmptyPropsObject = (args: StoryArgs): React.ReactElement => {
23
21
  return <SvgImage alt="ALT" />;
24
22
  };
25
23
 
26
- export const SvgImageThatDoesntLoad: React.FC<StoryArgs> = (
27
- args,
28
- ): React.ReactElement => {
24
+ export const SvgImageThatDoesntLoad = (args: StoryArgs): React.ReactElement => {
29
25
  return (
30
26
  <SvgImage
31
27
  alt="ALT"
@@ -36,26 +32,22 @@ export const SvgImageThatDoesntLoad: React.FC<StoryArgs> = (
36
32
  );
37
33
  };
38
34
 
39
- export const SvgImageBasic: React.FC<StoryArgs> = (
40
- args,
41
- ): React.ReactElement => {
35
+ export const SvgImageBasic = (args: StoryArgs): React.ReactElement => {
42
36
  return <SvgImage src={svgUrl} alt="ALT" />;
43
37
  };
44
38
 
45
- export const SvgImageWithFixedHeight: React.FC<StoryArgs> = (
46
- args,
39
+ export const SvgImageWithFixedHeight = (
40
+ args: StoryArgs,
47
41
  ): React.ReactElement => {
48
42
  return <SvgImage height={50} src={svgUrl} alt="ALT" />;
49
43
  };
50
44
 
51
- export const SvgImageWithFixedWidth: React.FC<StoryArgs> = (
52
- args,
53
- ): React.ReactElement => {
45
+ export const SvgImageWithFixedWidth = (args: StoryArgs): React.ReactElement => {
54
46
  return <SvgImage src={svgUrl} width={50} alt="ALT" />;
55
47
  };
56
48
 
57
- export const SvgImageWithExtraGraphieProps: React.FC<StoryArgs> = (
58
- args,
49
+ export const SvgImageWithExtraGraphieProps = (
50
+ args: StoryArgs,
59
51
  ): React.ReactElement => {
60
52
  return (
61
53
  <SvgImage
@@ -73,10 +65,10 @@ export const SvgImageWithExtraGraphieProps: React.FC<StoryArgs> = (
73
65
  );
74
66
  };
75
67
 
76
- export const PngImage: React.FC<StoryArgs> = (args): React.ReactElement => {
68
+ export const PngImage = (args: StoryArgs): React.ReactElement => {
77
69
  return <SvgImage src={imgUrl} alt="ALT" />;
78
70
  };
79
71
 
80
- export const GraphieImage: React.FC<StoryArgs> = (args): React.ReactElement => {
72
+ export const GraphieImage = (args: StoryArgs): React.ReactElement => {
81
73
  return <SvgImage src={graphieUrl} alt="ALT" />;
82
74
  };
@@ -18,8 +18,6 @@ export default {
18
18
  },
19
19
  } as Story;
20
20
 
21
- export const BasicOperation: React.FC<StoryArgs> = (
22
- args,
23
- ): React.ReactElement => {
21
+ export const BasicOperation = (args: StoryArgs): React.ReactElement => {
24
22
  return <TeX setAssetStatus={() => {}} children={args.equation} />;
25
23
  };
@@ -12,51 +12,39 @@ export default {
12
12
  title: "Perseus/Components/Tex Buttons",
13
13
  } as Story;
14
14
 
15
- export const ButtonSetBasic: React.FC<StoryArgs> = (
16
- args,
17
- ): React.ReactElement => {
15
+ export const ButtonSetBasic = (args: StoryArgs): React.ReactElement => {
18
16
  return <TexButtons sets={["basic"]} onInsert={() => {}} />;
19
17
  };
20
18
 
21
- export const ButtonSetBasicDiv: React.FC<StoryArgs> = (
22
- args,
23
- ): React.ReactElement => {
19
+ export const ButtonSetBasicDiv = (args: StoryArgs): React.ReactElement => {
24
20
  return <TexButtons sets={["basic+div"]} onInsert={() => {}} />;
25
21
  };
26
22
 
27
- export const ButtonSetTrig: React.FC<StoryArgs> = (
28
- args,
29
- ): React.ReactElement => {
23
+ export const ButtonSetTrig = (args: StoryArgs): React.ReactElement => {
30
24
  return <TexButtons sets={["trig"]} onInsert={() => {}} />;
31
25
  };
32
26
 
33
- export const ButtonSetPrealgebra: React.FC<StoryArgs> = (
34
- args,
35
- ): React.ReactElement => {
27
+ export const ButtonSetPrealgebra = (args: StoryArgs): React.ReactElement => {
36
28
  return <TexButtons sets={["prealgebra"]} onInsert={() => {}} />;
37
29
  };
38
30
 
39
- export const ButtonSetLogarithms: React.FC<StoryArgs> = (
40
- args,
41
- ): React.ReactElement => {
31
+ export const ButtonSetLogarithms = (args: StoryArgs): React.ReactElement => {
42
32
  return <TexButtons sets={["logarithms"]} onInsert={() => {}} />;
43
33
  };
44
34
 
45
- export const ButtonSetBasicRelations: React.FC<StoryArgs> = (
46
- args,
35
+ export const ButtonSetBasicRelations = (
36
+ args: StoryArgs,
47
37
  ): React.ReactElement => {
48
38
  return <TexButtons sets={["basic relations"]} onInsert={() => {}} />;
49
39
  };
50
40
 
51
- export const ButtonSetAdvancedRelations: React.FC<StoryArgs> = (
52
- args,
41
+ export const ButtonSetAdvancedRelations = (
42
+ args: StoryArgs,
53
43
  ): React.ReactElement => {
54
44
  return <TexButtons sets={["advanced relations"]} onInsert={() => {}} />;
55
45
  };
56
46
 
57
- export const ButtonSetMultiple: React.FC<StoryArgs> = (
58
- args,
59
- ): React.ReactElement => {
47
+ export const ButtonSetMultiple = (args: StoryArgs): React.ReactElement => {
60
48
  return (
61
49
  <TexButtons
62
50
  sets={["basic", "trig", "advanced relations"]}
@@ -16,24 +16,18 @@ const defaultObject = {
16
16
  onChange: () => {},
17
17
  } as const;
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 <TextInput {...defaultObject} />;
23
21
  };
24
22
 
25
- export const TestValueProvided: React.FC<StoryArgs> = (
26
- args,
27
- ): React.ReactElement => {
23
+ export const TestValueProvided = (args: StoryArgs): React.ReactElement => {
28
24
  return <TextInput {...defaultObject} value="Test value" />;
29
25
  };
30
26
 
31
- export const AriaLabelTextProvided: React.FC<StoryArgs> = (
32
- args,
33
- ): React.ReactElement => {
27
+ export const AriaLabelTextProvided = (args: StoryArgs): React.ReactElement => {
34
28
  return <TextInput {...defaultObject} labelText="Test label" />;
35
29
  };
36
30
 
37
- export const Disabled: React.FC<StoryArgs> = (args): React.ReactElement => {
31
+ export const Disabled = (args: StoryArgs): React.ReactElement => {
38
32
  return <TextInput {...defaultObject} disabled={true} />;
39
33
  };
@@ -22,9 +22,7 @@ const defaultObject = {
22
22
 
23
23
  const ClassName = "framework-perseus orderer";
24
24
 
25
- export const SimpleListOfOptions: React.FC<StoryArgs> = (
26
- args,
27
- ): React.ReactElement => {
25
+ export const SimpleListOfOptions = (args: StoryArgs): React.ReactElement => {
28
26
  return (
29
27
  // @ts-expect-error [FEI-5003] - TS2322 - Type '{ children: Element; class: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
30
28
  <div class={ClassName}>
@@ -12,16 +12,18 @@ export default {
12
12
  title: "Perseus/Components/Zoomable Tex",
13
13
  } as Story;
14
14
 
15
- const ForceZoomWrapper: React.FC<{
15
+ type Props = {
16
16
  children: React.ReactNode;
17
- }> = ({children}): React.ReactElement => (
17
+ };
18
+
19
+ const ForceZoomWrapper = ({children}: Props): React.ReactElement => (
18
20
  <>
19
21
  <h1>Click on equation to zoom/unzoom</h1>
20
22
  <div style={{width: "50px"}}>{children}</div>
21
23
  </>
22
24
  );
23
25
 
24
- export const KaTeX: React.FC<StoryArgs> = (args): React.ReactElement => {
26
+ export const KaTeX = (args: StoryArgs): React.ReactElement => {
25
27
  return (
26
28
  <ForceZoomWrapper>
27
29
  <ZoomableTex children="\sum_{i=1}^\infty\frac{1}{n^2} =\frac{\pi^2}{6}" />
@@ -29,7 +31,7 @@ export const KaTeX: React.FC<StoryArgs> = (args): React.ReactElement => {
29
31
  );
30
32
  };
31
33
 
32
- export const ComplexKaTeX: React.FC<StoryArgs> = (args): React.ReactElement => {
34
+ export const ComplexKaTeX = (args: StoryArgs): React.ReactElement => {
33
35
  return (
34
36
  <ForceZoomWrapper>
35
37
  {" "}
@@ -27,9 +27,7 @@ const computeChildBounds = (
27
27
  };
28
28
  };
29
29
 
30
- export const ZoomableExample: React.FC<StoryArgs> = (
31
- args,
32
- ): React.ReactElement => {
30
+ export const ZoomableExample = (args: StoryArgs): React.ReactElement => {
33
31
  return (
34
32
  <Zoomable computeChildBounds={computeChildBounds}>
35
33
  <span>