storybook 9.0.15 → 9.0.17

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.
@@ -1204,7 +1204,10 @@ declare global {
1204
1204
  var defaultProjectAnnotations: ProjectAnnotations<any>;
1205
1205
  }
1206
1206
  type WrappedStoryRef = {
1207
- __pw_type: 'jsx' | 'importRef';
1207
+ __pw_type: 'jsx';
1208
+ props: Record<string, any>;
1209
+ } | {
1210
+ __pw_type: 'importRef';
1208
1211
  };
1209
1212
  type UnwrappedJSXStoryRef = {
1210
1213
  __pw_type: 'jsx';
@@ -5872,8 +5872,13 @@ var Kn = class Kn extends Ut {
5872
5872
  document.removeEventListener("keydown", this.onKeydown);
5873
5873
  }
5874
5874
  onKeydown(t) {
5875
- t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(), this.
5876
- onSubmit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.props.handleCancel()));
5875
+ if (t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat)
5876
+ return;
5877
+ let { inputRefKey: r, inputRefValue: o } = this.state, { addButtonElement: n, handleCancel: i } = this.props;
5878
+ [r, o, n].some(
5879
+ (l) => l === t.target
5880
+ ) && ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(), this.onSubmit()), (t.code === "Escape" || t.key === "Escape") &&
5881
+ (t.preventDefault(), i()));
5877
5882
  }
5878
5883
  onSubmit() {
5879
5884
  let { handleAdd: t, onlyValue: r, onSubmitValueParser: o, keyPath: n, deep: i } = this.props, { inputRefKey: s, inputRefValue: l } = this.
@@ -6148,8 +6153,9 @@ var Xn = class Xn extends Ut {
6148
6153
  document.removeEventListener("keydown", this.onKeydown);
6149
6154
  }
6150
6155
  onKeydown(t) {
6151
- t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(), this.
6152
- handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
6156
+ let { inputRef: r } = this.state;
6157
+ t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || r !== t.target || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(),
6158
+ this.handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
6153
6159
  }
6154
6160
  handleEdit() {
6155
6161
  let { handleUpdateValue: t, originalValue: r, logger: o, onSubmitValueParser: n, keyPath: i } = this.props, { inputRef: s, name: l, deep: c } = this.
@@ -6771,8 +6777,9 @@ var ea = class ea extends Ut {
6771
6777
  document.removeEventListener("keydown", this.onKeydown);
6772
6778
  }
6773
6779
  onKeydown(t) {
6774
- t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(), this.
6775
- handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
6780
+ let { inputRef: r } = this.state;
6781
+ t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || t.repeat || r !== t.target || ((t.code === "Enter" || t.key === "Enter") && (t.preventDefault(),
6782
+ this.handleEdit()), (t.code === "Escape" || t.key === "Escape") && (t.preventDefault(), this.handleCancelEdit()));
6776
6783
  }
6777
6784
  handleEdit() {
6778
6785
  let { handleUpdateValue: t, originalValue: r, logger: o, onSubmitValueParser: n, keyPath: i } = this.props, { inputRef: s, name: l, deep: c } = this.