@khanacademy/perseus-editor 2.15.2 → 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.
- package/CHANGELOG.md +36 -0
- package/dist/editor-page.d.ts +4 -10
- package/dist/editor.d.ts +2 -2
- package/dist/es/index.js +25 -14
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +25 -14
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +92 -92
- package/package.json +2 -2
- package/src/__stories__/editor-page.stories.tsx +65 -0
- package/src/__stories__/editor.stories.tsx +2 -4
- package/src/editor-page.tsx +5 -11
- package/src/editor.tsx +2 -2
- package/src/widgets/__stories__/categorizer-editor.stories.tsx +24 -0
- package/src/widgets/__stories__/definition-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/dropdown-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/explanation-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/input-number-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/matcher-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/number-line-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/numeric-input-editor.stories.tsx +18 -0
- package/src/widgets/__stories__/radio-editor.stories.tsx +3 -3
- package/src/widgets/__stories__/sorter-editor.stories.tsx +18 -0
- package/src/widgets/__tests__/categorizer-editor.test.tsx +51 -0
- package/src/widgets/__tests__/definition-editor.test.tsx +41 -0
- package/src/widgets/__tests__/dropdown-editor.test.tsx +57 -0
- package/src/widgets/__tests__/explanation-editor.test.tsx +59 -0
- package/src/widgets/__tests__/input-number-editor.test.tsx +128 -0
- package/src/widgets/__tests__/matcher-editor.test.tsx +47 -0
- package/src/widgets/__tests__/number-line-editor.test.tsx +144 -0
- package/src/widgets/__tests__/numeric-input-editor.test.tsx +177 -0
- package/src/widgets/__tests__/radio-editor.test.tsx +118 -0
- package/src/widgets/__tests__/sorter-editor.test.tsx +55 -0
- package/src/widgets/dropdown-editor.tsx +1 -0
- package/src/widgets/input-number-editor.tsx +2 -0
- package/src/widgets/number-line-editor.tsx +16 -5
- package/src/widgets/numeric-input-editor.tsx +2 -0
- 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"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<option value="
|
|
222
|
-
|
|
219
|
+
<option value="eq" aria-label="Equal">
|
|
220
|
+
=
|
|
221
|
+
</option>
|
|
222
|
+
<option value="lt" aria-label="Less than">
|
|
223
|
+
<
|
|
224
|
+
</option>
|
|
225
|
+
<option value="gt" aria-label="Greater than">
|
|
226
|
+
>
|
|
227
|
+
</option>
|
|
228
|
+
<option value="le" aria-label="Less than or equal">
|
|
229
|
+
≤
|
|
230
|
+
</option>
|
|
231
|
+
<option value="ge" aria-label="Greater than or equal">
|
|
232
|
+
≥
|
|
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)
|