Skip to content

fix: Exclude emotion's css prop from exported typedefs#468

Merged
frankieyan merged 1 commit intobetafrom
frankie/fix-extra-button-props
Mar 11, 2021
Merged

fix: Exclude emotion's css prop from exported typedefs#468
frankieyan merged 1 commit intobetafrom
frankie/fix-extra-button-props

Conversation

@frankieyan
Copy link
Member

Short description

When using the Button component from the latest beta releases, a mysterious css prop has been declared as required. This turns out to be a merged interface on both React.DOMAttributes and JSX. IntrinsicAttributes from emotion 10, which is included in Storybook:

https://github.com/emotion-js/emotion/blob/ab535a8c7a0dcbbb6af310634eb3cee4bc2f8e2c/packages/core/types/index.d.ts#L86

image

The solution now seems to be to omit anything storybook-related from the output. As our stories still need to be type-checked during development, they are only excluded in tsconfig.dist.json

Test Plan

  • Pull the latest beta branch and run npm run build. In another project that has Reactist installed, run npm link ../reactist
  • Use the Button component in the project and let type-checking run, either in your editor or with tsc. You should now see the css prop errors
  • Pull this branch in your reactist workspace and build again
  • Your project should no longer complain about the css prop

Output diff showing the css prop no longer present in the Button and Dropdown components:

diff --git a/lib/new-components/box/box.stories.d.ts b/lib-works/components/avatar/avatar.test.d.ts
similarity index 100%
rename from lib/new-components/box/box.stories.d.ts
rename to lib-works/components/avatar/avatar.test.d.ts
diff --git a/lib/components/button/button.d.ts b/lib-works/components/button/button.d.ts
index c50828b..4aa500d 100644
--- a/lib/components/button/button.d.ts
+++ b/lib-works/components/button/button.d.ts
@@ -24,7 +24,7 @@ export declare type ButtonProps = Omit<NativeButtonProps, 'title' | 'ref'> & {
      */
     tooltip?: React.ReactNode;
 };
-declare const Button: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css"> & {
+declare const Button: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
     /**
      * Loading style. When true it disables the button, but it also adds a visual indication of
      * some in-progress operation going on.
diff --git a/lib/new-components/columns/columns.stories.d.ts b/lib-works/components/button/button.test.d.ts
similarity index 100%
rename from lib/new-components/columns/columns.stories.d.ts
rename to lib-works/components/button/button.test.d.ts
diff --git a/lib/new-components/inline/inline.stories.d.ts b/lib-works/components/checkbox/checkbox.test.d.ts
similarity index 100%
rename from lib/new-components/inline/inline.stories.d.ts
rename to lib-works/components/checkbox/checkbox.test.d.ts
diff --git a/lib/new-components/stack/stack.stories.d.ts b/lib-works/components/color-picker/color-picker.test.d.ts
similarity index 100%
rename from lib/new-components/stack/stack.stories.d.ts
rename to lib-works/components/color-picker/color-picker.test.d.ts
diff --git a/lib/components/dropdown/dropdown.d.ts b/lib-works/components/dropdown/dropdown.d.ts
index 7387d72..41d6854 100644
--- a/lib/components/dropdown/dropdown.d.ts
+++ b/lib-works/components/dropdown/dropdown.d.ts
@@ -42,7 +42,7 @@ declare namespace Body {
 }
 declare const Dropdown: {
     Box: typeof Box;
-    Trigger: React.ForwardRefExoticComponent<Pick<TriggerProps, "key" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "tooltip"> & React.RefAttributes<HTMLButtonElement>>;
+    Trigger: React.ForwardRefExoticComponent<Pick<TriggerProps, "key" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tooltip"> & React.RefAttributes<HTMLButtonElement>>;
     Body: typeof Body;
 };
 export { Dropdown };
diff --git a/lib-works/components/dropdown/dropdown.test.d.ts b/lib-works/components/dropdown/dropdown.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/dropdown/dropdown.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/error-message/error-message.test.d.ts b/lib-works/components/error-message/error-message.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/error-message/error-message.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/icon/icon.test.d.ts b/lib-works/components/icon/icon.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/icon/icon.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/input/input.test.d.ts b/lib-works/components/input/input.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/input/input.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/key-capturer/key-capturer.test.d.ts b/lib-works/components/key-capturer/key-capturer.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/key-capturer/key-capturer.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/keyboard-shortcut/keyboard-shortcut.test.d.ts b/lib-works/components/keyboard-shortcut/keyboard-shortcut.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/keyboard-shortcut/keyboard-shortcut.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/loading/Loading.test.d.ts b/lib-works/components/loading/Loading.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/loading/Loading.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/menu/menu.test.d.ts b/lib-works/components/menu/menu.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/menu/menu.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/modal/modal.test.d.ts b/lib-works/components/modal/modal.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/modal/modal.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/notification/notification.test.d.ts b/lib-works/components/notification/notification.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/notification/notification.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/popover/popover.test.d.ts b/lib-works/components/popover/popover.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/popover/popover.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/progress-bar/progress-bar.test.d.ts b/lib-works/components/progress-bar/progress-bar.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/progress-bar/progress-bar.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/range-input/range-input.test.d.ts b/lib-works/components/range-input/range-input.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/range-input/range-input.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/select/select.test.d.ts b/lib-works/components/select/select.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/select/select.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/tabs/tabs.test.d.ts b/lib-works/components/tabs/tabs.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/tabs/tabs.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/time/time.test.d.ts b/lib-works/components/time/time.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/time/time.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/tip/tip.test.d.ts b/lib-works/components/tip/tip.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/tip/tip.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib-works/components/tooltip/tooltip.test.d.ts b/lib-works/components/tooltip/tooltip.test.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/lib-works/components/tooltip/tooltip.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/lib/new-components/storybook-helper.d.ts b/lib/new-components/storybook-helper.d.ts
deleted file mode 100644
index a8eaa50..0000000
--- a/lib/new-components/storybook-helper.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as React from 'react';
-import './default-styles.less';
-import type { SelectTypeKnobValue } from '@storybook/addon-knobs/dist/components/types';
-import type { BoxProps } from './box';
-import type { Space } from './common-types';
-declare type SelectTypeOptionsProp<T extends SelectTypeKnobValue = SelectTypeKnobValue> = Extract<T, PropertyKey>[] | readonly Extract<T, PropertyKey>[];
-declare function selectWithNone<T extends string | number>(label: string, options: SelectTypeOptionsProp<T>, defaultValue?: T | 'none'): Exclude<T, "none"> | undefined;
-declare function selectSize(label: string, defaultValue?: Space | 'none'): "small" | "xsmall" | "medium" | "large" | "xlarge" | undefined;
-declare function selectCount(label: string, defaultValue?: number): number;
-declare function times(count: number): number[];
-declare function reusableBoxProps(): Partial<BoxProps>;
-declare function Wrapper({ title, children, border, }: {
-    title?: React.ReactNode;
-    children: React.ReactNode;
-    border?: boolean;
-}): JSX.Element;
-declare function ResponsiveWidthRef(): JSX.Element;
-declare function Placeholder({ label, width, height, }: {
-    label?: React.ReactNode;
-} & Pick<React.CSSProperties, 'width' | 'height'>): JSX.Element;
-export { selectWithNone, selectSize, selectCount, times, reusableBoxProps, Wrapper, ResponsiveWidthRef, Placeholder, };

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Executed npm run validate and made sure no errors / warnings were shown
  • Described changes in CHANGELOG.md
  • Bumped version in package.json and package-lock.json (npm --no-git-tag-version version <major|minor|patch>) ref
  • Updated all static build artifacts (npm run build-all)

Versioning

Released together with #467 under v9.1.0-beta.2

@frankieyan frankieyan self-assigned this Mar 11, 2021
@frankieyan frankieyan requested review from a team and rfgamaral and removed request for a team March 11, 2021 06:43
Copy link
Contributor

@henningmu henningmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't reproduce the original error when linking beta into Todoist but I also can't see it with this change. Your explanations and the change make a lot of sense so I'll give my approval here 🙌

@frankieyan frankieyan merged commit dcd8a58 into beta Mar 11, 2021
@frankieyan frankieyan deleted the frankie/fix-extra-button-props branch March 11, 2021 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants