@khanacademy/perseus-editor 14.9.0 → 14.9.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.
@@ -1,12 +1,10 @@
1
1
  import * as React from "react";
2
- type OptionRenderer = (children: React.ReactElement<any> | null | undefined, value: string, selected: boolean, disabled?: boolean) => React.ReactElement<any>;
3
2
  type Props = {
4
3
  value: string;
5
4
  children?: React.ReactNode;
6
5
  selected?: boolean;
7
6
  disabled?: boolean;
8
7
  onClick?: () => void;
9
- optionRenderer?: OptionRenderer;
10
8
  onDropdownClose?: () => void;
11
9
  hideFocusState?: boolean;
12
10
  testId?: string;
@@ -21,7 +19,6 @@ declare class OptionGroup extends React.Component<{
21
19
  onSelected: (value: string) => void;
22
20
  children?: Array<React.ReactElement<React.ComponentProps<typeof Option>>>;
23
21
  selectedValues: Array<string>;
24
- optionRenderer?: OptionRenderer;
25
22
  noMargin?: boolean;
26
23
  onDropdownClose?: () => void;
27
24
  hideFocusState?: boolean;
package/dist/es/index.js CHANGED
@@ -46,7 +46,7 @@ import arrowCounterClockwise from '@phosphor-icons/core/bold/arrow-counter-clock
46
46
 
47
47
  // This file is processed by a Rollup plugin (replace) to inject the production
48
48
  const libName = "@khanacademy/perseus-editor";
49
- const libVersion = "14.9.0";
49
+ const libVersion = "14.9.1";
50
50
  addLibraryVersionToPerseusDebug(libName, libVersion);
51
51
 
52
52
  function _extends() {
@@ -34718,7 +34718,6 @@ class Option extends React.Component {
34718
34718
  value,
34719
34719
  onClick,
34720
34720
  children,
34721
- optionRenderer,
34722
34721
  disabled,
34723
34722
  hideFocusState,
34724
34723
  testId,
@@ -34745,14 +34744,7 @@ class Option extends React.Component {
34745
34744
  "aria-disabled": disabled,
34746
34745
  "aria-label": ariaLabel,
34747
34746
  "data-testid": testId
34748
- }, optionRenderer && optionRenderer(
34749
- /*#__PURE__*/
34750
- /**
34751
- * This expects a `React.Element<>` but `children` is a
34752
- * `React.Node`. We can convert a `React.Node` to a
34753
- * `React.Element<>` by wrapping it in a fragment.
34754
- */
34755
- React.createElement(React.Fragment, null, children), value || "", selected || false, disabled), !optionRenderer && /*#__PURE__*/React.createElement("span", {
34747
+ }, /*#__PURE__*/React.createElement("span", {
34756
34748
  className: css(styles$4.option, selected && styles$4.optionSelected, disabled && styles$4.optionDisabled)
34757
34749
  }, children, selected && /*#__PURE__*/React.createElement("span", {
34758
34750
  className: css(styles$4.check)
@@ -34782,7 +34774,6 @@ class OptionGroup extends React.Component {
34782
34774
  children,
34783
34775
  onSelected,
34784
34776
  selectedValues,
34785
- optionRenderer,
34786
34777
  noMargin,
34787
34778
  onDropdownClose,
34788
34779
  hideFocusState
@@ -34804,7 +34795,6 @@ class OptionGroup extends React.Component {
34804
34795
  selected: selected,
34805
34796
  // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
34806
34797
  onClick: () => onSelected(child.props.value),
34807
- optionRenderer: optionRenderer,
34808
34798
  ref: reference,
34809
34799
  onDropdownClose: onDropdownClose,
34810
34800
  hideFocusState: hideFocusState