@khanacademy/perseus-editor 2.15.3 → 2.15.4

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 (38) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/editor-page.d.ts +4 -10
  3. package/dist/editor.d.ts +2 -2
  4. package/dist/es/index.js +25 -14
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/index.js +25 -14
  7. package/dist/index.js.map +1 -1
  8. package/dist/widgets/interactive-graph-editor.d.ts +92 -92
  9. package/package.json +2 -2
  10. package/src/__stories__/editor-page.stories.tsx +65 -0
  11. package/src/__stories__/editor.stories.tsx +2 -4
  12. package/src/editor-page.tsx +5 -11
  13. package/src/editor.tsx +2 -2
  14. package/src/widgets/__stories__/categorizer-editor.stories.tsx +24 -0
  15. package/src/widgets/__stories__/definition-editor.stories.tsx +18 -0
  16. package/src/widgets/__stories__/dropdown-editor.stories.tsx +18 -0
  17. package/src/widgets/__stories__/explanation-editor.stories.tsx +18 -0
  18. package/src/widgets/__stories__/input-number-editor.stories.tsx +18 -0
  19. package/src/widgets/__stories__/matcher-editor.stories.tsx +18 -0
  20. package/src/widgets/__stories__/number-line-editor.stories.tsx +18 -0
  21. package/src/widgets/__stories__/numeric-input-editor.stories.tsx +18 -0
  22. package/src/widgets/__stories__/radio-editor.stories.tsx +3 -3
  23. package/src/widgets/__stories__/sorter-editor.stories.tsx +18 -0
  24. package/src/widgets/__tests__/categorizer-editor.test.tsx +51 -0
  25. package/src/widgets/__tests__/definition-editor.test.tsx +41 -0
  26. package/src/widgets/__tests__/dropdown-editor.test.tsx +57 -0
  27. package/src/widgets/__tests__/explanation-editor.test.tsx +59 -0
  28. package/src/widgets/__tests__/input-number-editor.test.tsx +128 -0
  29. package/src/widgets/__tests__/matcher-editor.test.tsx +47 -0
  30. package/src/widgets/__tests__/number-line-editor.test.tsx +144 -0
  31. package/src/widgets/__tests__/numeric-input-editor.test.tsx +177 -0
  32. package/src/widgets/__tests__/radio-editor.test.tsx +118 -0
  33. package/src/widgets/__tests__/sorter-editor.test.tsx +55 -0
  34. package/src/widgets/dropdown-editor.tsx +1 -0
  35. package/src/widgets/input-number-editor.tsx +2 -0
  36. package/src/widgets/number-line-editor.tsx +16 -5
  37. package/src/widgets/numeric-input-editor.tsx +2 -0
  38. package/tsconfig-build.tsbuildinfo +1 -1
@@ -214,12 +214,23 @@ class NumberLineEditor extends React.Component<Props> {
214
214
  value={this.props.correctRel}
215
215
  // @ts-expect-error - TS2322 - Type '(arg1: ChangeEvent<HTMLInputElement>) => void' is not assignable to type 'ChangeEventHandler<HTMLSelectElement>'.
216
216
  onChange={this.onChangeRelation}
217
+ aria-label="Select relationship"
217
218
  >
218
- <option value="eq"> = </option>
219
- <option value="lt"> &lt; </option>
220
- <option value="gt"> &gt; </option>
221
- <option value="le"> &le; </option>
222
- <option value="ge"> &ge; </option>
219
+ <option value="eq" aria-label="Equal">
220
+ =
221
+ </option>
222
+ <option value="lt" aria-label="Less than">
223
+ &lt;
224
+ </option>
225
+ <option value="gt" aria-label="Greater than">
226
+ &gt;
227
+ </option>
228
+ <option value="le" aria-label="Less than or equal">
229
+ &le;
230
+ </option>
231
+ <option value="ge" aria-label="Greater than or equal">
232
+ &ge;
233
+ </option>
223
234
  </select>{" "}
224
235
  <NumberInput
225
236
  value={this.props.correctX}
@@ -381,6 +381,7 @@ const NumericInputEditor: any = createReactClass({
381
381
  <a
382
382
  href="javascript:void(0)"
383
383
  className="answer-trash"
384
+ aria-label="Delete answer"
384
385
  onClick={() => this.onTrashAnswer(i)}
385
386
  onKeyDown={(e) =>
386
387
  this.onSpace(e, this.onTrashAnswer, i)
@@ -391,6 +392,7 @@ const NumericInputEditor: any = createReactClass({
391
392
  <a
392
393
  href="javascript:void(0)"
393
394
  className="options-toggle"
395
+ aria-label="Toggle options"
394
396
  onClick={() => this.onToggleOptions(i)}
395
397
  onKeyDown={(e) =>
396
398
  this.onSpace(e, this.onToggleOptions, i)