@atlaskit/button 16.1.2
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 +1485 -0
- package/LICENSE +13 -0
- package/README.md +13 -0
- package/__perf__/button.tsx +19 -0
- package/__perf__/custom.tsx +19 -0
- package/__perf__/customised.tsx +11 -0
- package/__perf__/default.tsx +5 -0
- package/__perf__/loading.tsx +5 -0
- package/__perf__/utils/example-runner.tsx +48 -0
- package/__perf__/utils/interaction-tasks.tsx +98 -0
- package/button-group/package.json +7 -0
- package/codemods/15.0.0-lite-mode.ts +49 -0
- package/codemods/15.1.1-data-testid.ts +173 -0
- package/codemods/__tests__/15.0.0-lite-mode/optimistic.ts +646 -0
- package/codemods/__tests__/15.0.0-lite-mode/safe.ts +223 -0
- package/codemods/__tests__/15.0.0-lite-mode/shared.ts +257 -0
- package/codemods/__tests__/15.1.1-data-testid/rename-data-testid.ts +186 -0
- package/codemods/__tests__/_framework.ts +47 -0
- package/codemods/helpers/15.0.0-runner.ts +169 -0
- package/codemods/helpers/helpers-generic.ts +662 -0
- package/codemods/optimistic-15.0.0-lite-mode.ts +279 -0
- package/codemods/readme.md +1 -0
- package/custom-theme-button/package.json +7 -0
- package/dist/cjs/button-group.js +50 -0
- package/dist/cjs/button.js +104 -0
- package/dist/cjs/custom-theme-button/custom-theme-button-types.js +5 -0
- package/dist/cjs/custom-theme-button/custom-theme-button.js +229 -0
- package/dist/cjs/custom-theme-button/index.js +23 -0
- package/dist/cjs/custom-theme-button/theme.js +108 -0
- package/dist/cjs/entry-points/button-group.js +15 -0
- package/dist/cjs/entry-points/custom-theme-button.js +25 -0
- package/dist/cjs/entry-points/loading-button.js +15 -0
- package/dist/cjs/entry-points/standard-button.js +15 -0
- package/dist/cjs/entry-points/types.js +5 -0
- package/dist/cjs/index.js +51 -0
- package/dist/cjs/loading-button.js +34 -0
- package/dist/cjs/shared/block-events.js +44 -0
- package/dist/cjs/shared/button-base.js +158 -0
- package/dist/cjs/shared/colors.js +409 -0
- package/dist/cjs/shared/css.js +265 -0
- package/dist/cjs/shared/get-is-only-single-icon.js +26 -0
- package/dist/cjs/shared/loading-spinner.js +45 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/version.json +5 -0
- package/dist/es2019/button-group.js +36 -0
- package/dist/es2019/button.js +69 -0
- package/dist/es2019/custom-theme-button/custom-theme-button-types.js +1 -0
- package/dist/es2019/custom-theme-button/custom-theme-button.js +164 -0
- package/dist/es2019/custom-theme-button/index.js +2 -0
- package/dist/es2019/custom-theme-button/theme.js +81 -0
- package/dist/es2019/entry-points/button-group.js +1 -0
- package/dist/es2019/entry-points/custom-theme-button.js +1 -0
- package/dist/es2019/entry-points/loading-button.js +1 -0
- package/dist/es2019/entry-points/standard-button.js +1 -0
- package/dist/es2019/entry-points/types.js +1 -0
- package/dist/es2019/index.js +6 -0
- package/dist/es2019/loading-button.js +17 -0
- package/dist/es2019/shared/block-events.js +37 -0
- package/dist/es2019/shared/button-base.js +127 -0
- package/dist/es2019/shared/colors.js +393 -0
- package/dist/es2019/shared/css.js +249 -0
- package/dist/es2019/shared/get-is-only-single-icon.js +19 -0
- package/dist/es2019/shared/loading-spinner.js +33 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/version.json +5 -0
- package/dist/esm/button-group.js +35 -0
- package/dist/esm/button.js +79 -0
- package/dist/esm/custom-theme-button/custom-theme-button-types.js +1 -0
- package/dist/esm/custom-theme-button/custom-theme-button.js +203 -0
- package/dist/esm/custom-theme-button/index.js +2 -0
- package/dist/esm/custom-theme-button/theme.js +90 -0
- package/dist/esm/entry-points/button-group.js +1 -0
- package/dist/esm/entry-points/custom-theme-button.js +1 -0
- package/dist/esm/entry-points/loading-button.js +1 -0
- package/dist/esm/entry-points/standard-button.js +1 -0
- package/dist/esm/entry-points/types.js +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/loading-button.js +19 -0
- package/dist/esm/shared/block-events.js +36 -0
- package/dist/esm/shared/button-base.js +135 -0
- package/dist/esm/shared/colors.js +393 -0
- package/dist/esm/shared/css.js +245 -0
- package/dist/esm/shared/get-is-only-single-icon.js +19 -0
- package/dist/esm/shared/loading-spinner.js +35 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/version.json +5 -0
- package/dist/types/button-group.d.ts +18 -0
- package/dist/types/button.d.ts +8 -0
- package/dist/types/custom-theme-button/custom-theme-button-types.d.ts +21 -0
- package/dist/types/custom-theme-button/custom-theme-button.d.ts +6 -0
- package/dist/types/custom-theme-button/index.d.ts +2 -0
- package/dist/types/custom-theme-button/theme.d.ts +21 -0
- package/dist/types/entry-points/button-group.d.ts +1 -0
- package/dist/types/entry-points/custom-theme-button.d.ts +2 -0
- package/dist/types/entry-points/loading-button.d.ts +2 -0
- package/dist/types/entry-points/standard-button.d.ts +2 -0
- package/dist/types/entry-points/types.d.ts +4 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/loading-button.d.ts +11 -0
- package/dist/types/shared/block-events.d.ts +3 -0
- package/dist/types/shared/button-base.d.ts +10 -0
- package/dist/types/shared/colors.d.ts +31 -0
- package/dist/types/shared/css.d.ts +22 -0
- package/dist/types/shared/get-is-only-single-icon.d.ts +2 -0
- package/dist/types/shared/loading-spinner.d.ts +4 -0
- package/dist/types/types.d.ts +51 -0
- package/extract-react-types/custom-theme-button-props.tsx +7 -0
- package/extract-react-types/loading-button-props.tsx +5 -0
- package/extract-react-types/shared-props.tsx +5 -0
- package/loading-button/package.json +7 -0
- package/package.json +83 -0
- package/standard-button/package.json +7 -0
- package/types/package.json +7 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CSSObject } from '@emotion/core';
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Pick<React.AllHTMLAttributes<HTMLElement>, "default" | "target" | "type" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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">, "default" | "target" | "type" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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"> & {
|
|
5
|
+
'data-testid'?: undefined;
|
|
6
|
+
'data-has-overlay'?: undefined;
|
|
7
|
+
}, "default" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | "pattern" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "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" | "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" | "data-testid" | "data-has-overlay"> & import("../types").BaseOwnProps & {
|
|
8
|
+
buttonCss: CSSObject;
|
|
9
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ThemeModes } from '@atlaskit/theme/types';
|
|
2
|
+
import { Appearance } from '../types';
|
|
3
|
+
export declare type ColorRule = {
|
|
4
|
+
[key in ThemeModes]: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type ColorGroup = {
|
|
7
|
+
default: ColorRule;
|
|
8
|
+
hover?: ColorRule;
|
|
9
|
+
active?: ColorRule;
|
|
10
|
+
disabled?: ColorRule;
|
|
11
|
+
selected?: ColorRule;
|
|
12
|
+
focus?: ColorRule;
|
|
13
|
+
focusSelected?: ColorRule;
|
|
14
|
+
};
|
|
15
|
+
export declare type ColorPreset = {
|
|
16
|
+
[key in Appearance]: ColorGroup;
|
|
17
|
+
};
|
|
18
|
+
export declare type BoxShadowColorGroup = {
|
|
19
|
+
focus: ColorRule;
|
|
20
|
+
focusSelected: ColorRule;
|
|
21
|
+
};
|
|
22
|
+
declare type BoxShadowColorPreset = {
|
|
23
|
+
[key in Appearance]: BoxShadowColorGroup;
|
|
24
|
+
};
|
|
25
|
+
declare type Values = {
|
|
26
|
+
background: ColorPreset;
|
|
27
|
+
boxShadowColor: BoxShadowColorPreset;
|
|
28
|
+
color: ColorPreset;
|
|
29
|
+
};
|
|
30
|
+
declare const values: Values;
|
|
31
|
+
export default values;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/core';
|
|
2
|
+
import { ThemeModes } from '@atlaskit/theme/types';
|
|
3
|
+
import { Appearance, Spacing } from '../types';
|
|
4
|
+
export declare type GetCssArgs = {
|
|
5
|
+
appearance: Appearance;
|
|
6
|
+
spacing: Spacing;
|
|
7
|
+
mode: ThemeModes;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
shouldFitContainer: boolean;
|
|
10
|
+
isOnlySingleIcon: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function getCss({ appearance, spacing, mode, isSelected, shouldFitContainer, isOnlySingleIcon, }: GetCssArgs): CSSObject;
|
|
13
|
+
export declare function getIconStyle({ spacing }: {
|
|
14
|
+
spacing: Spacing;
|
|
15
|
+
}): CSSObject;
|
|
16
|
+
export declare function getContentStyle({ spacing }: {
|
|
17
|
+
spacing: Spacing;
|
|
18
|
+
}): CSSObject;
|
|
19
|
+
export declare function getFadingCss({ hasOverlay, }: {
|
|
20
|
+
hasOverlay: boolean;
|
|
21
|
+
}): CSSObject;
|
|
22
|
+
export declare const overlayCss: CSSObject;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
export declare type Appearance = 'default' | 'danger' | 'link' | 'primary' | 'subtle' | 'subtle-link' | 'warning';
|
|
4
|
+
export declare type Spacing = 'compact' | 'default' | 'none';
|
|
5
|
+
declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
6
|
+
export declare type BaseOwnProps = {
|
|
7
|
+
/** The base styling to apply to the button */
|
|
8
|
+
appearance?: Appearance;
|
|
9
|
+
/** Set the button to autofocus on mount */
|
|
10
|
+
autoFocus?: boolean;
|
|
11
|
+
/** Add a classname to the button */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Used to 'overlay' something over a button. This is commonly used to display a loading spinner */
|
|
14
|
+
overlay?: React.ReactNode;
|
|
15
|
+
/** Provides a url for buttons being used as a link */
|
|
16
|
+
href?: string;
|
|
17
|
+
/** Places an icon within the button, after the button's text */
|
|
18
|
+
iconAfter?: React.ReactChild;
|
|
19
|
+
/** Places an icon within the button, before the button's text */
|
|
20
|
+
iconBefore?: React.ReactChild;
|
|
21
|
+
/** Set if the button is disabled */
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
/** Change the style to indicate the button is selected */
|
|
24
|
+
isSelected?: boolean;
|
|
25
|
+
/** Handler to be called on blur */
|
|
26
|
+
onBlur?: React.FocusEventHandler<HTMLElement>;
|
|
27
|
+
/** Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details */
|
|
28
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
29
|
+
/** Handler to be called on focus */
|
|
30
|
+
onFocus?: React.FocusEventHandler<HTMLElement>;
|
|
31
|
+
/** Set the amount of padding in the button */
|
|
32
|
+
spacing?: Spacing;
|
|
33
|
+
/** Pass target down to a link within the button component, if a href is provided */
|
|
34
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
35
|
+
/** Pass type down to a button */
|
|
36
|
+
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
37
|
+
/** Option to fit button width to its parent width */
|
|
38
|
+
shouldFitContainer?: boolean;
|
|
39
|
+
/** Text content to be rendered in the button */
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
42
|
+
testId?: string;
|
|
43
|
+
component?: React.ComponentType<React.AllHTMLAttributes<HTMLElement>> | React.ElementType;
|
|
44
|
+
/** Additional information to be included in the `context` of analytics events that come from button */
|
|
45
|
+
analyticsContext?: Record<string, any>;
|
|
46
|
+
};
|
|
47
|
+
export declare type BaseProps = Combine<Combine<Omit<React.AllHTMLAttributes<HTMLElement>, 'disabled'>, {
|
|
48
|
+
'data-testid'?: never;
|
|
49
|
+
'data-has-overlay'?: never;
|
|
50
|
+
}>, BaseOwnProps>;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/button/loading-button",
|
|
3
|
+
"main": "../dist/cjs/entry-points/loading-button.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/loading-button.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/loading-button.js",
|
|
6
|
+
"types": "../dist/types/entry-points/loading-button.d.ts"
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/button",
|
|
3
|
+
"version": "16.1.2",
|
|
4
|
+
"description": "A button triggers an event or action. They let users know what will happen next.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"atlaskit:src": "src/index.ts",
|
|
17
|
+
"atlassian": {
|
|
18
|
+
"team": "Design System Team",
|
|
19
|
+
"inPublicMirror": true,
|
|
20
|
+
"releaseModel": "scheduled",
|
|
21
|
+
"website": {
|
|
22
|
+
"name": "Button"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"af:exports": {
|
|
26
|
+
"./button-group": "./src/entry-points/button-group.ts",
|
|
27
|
+
"./custom-theme-button": "./src/entry-points/custom-theme-button.ts",
|
|
28
|
+
"./loading-button": "./src/entry-points/loading-button.ts",
|
|
29
|
+
"./standard-button": "./src/entry-points/standard-button.ts",
|
|
30
|
+
"./types": "./src/entry-points/types.ts",
|
|
31
|
+
".": "./src/index.ts"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@atlaskit/analytics-next": "^8.2.0",
|
|
35
|
+
"@atlaskit/ds-lib": "^1.3.0",
|
|
36
|
+
"@atlaskit/spinner": "^15.1.0",
|
|
37
|
+
"@atlaskit/theme": "^12.0.0",
|
|
38
|
+
"@atlaskit/tokens": "^0.2.0",
|
|
39
|
+
"@babel/runtime": "^7.0.0",
|
|
40
|
+
"@emotion/core": "^10.0.9"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^16.8.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@atlaskit/build-utils": "*",
|
|
47
|
+
"@atlaskit/checkbox": "^12.3.0",
|
|
48
|
+
"@atlaskit/docs": "*",
|
|
49
|
+
"@atlaskit/icon": "^21.9.0",
|
|
50
|
+
"@atlaskit/logo": "^13.5.0",
|
|
51
|
+
"@atlaskit/section-message": "^6.1.0",
|
|
52
|
+
"@atlaskit/select": "^15.0.0",
|
|
53
|
+
"@atlaskit/ssr": "*",
|
|
54
|
+
"@atlaskit/visual-regression": "*",
|
|
55
|
+
"@atlaskit/webdriver-runner": "*",
|
|
56
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
57
|
+
"@testing-library/react": "^8.0.1",
|
|
58
|
+
"@types/react-router-dom": "^4.3.1",
|
|
59
|
+
"ast-types": "^0.13.3",
|
|
60
|
+
"jest-emotion": "^10.0.32",
|
|
61
|
+
"jest-in-case": "^1.0.2",
|
|
62
|
+
"jscodeshift": "^0.13.0",
|
|
63
|
+
"react-dom": "^16.8.0",
|
|
64
|
+
"react-router-dom": "^4.2.2",
|
|
65
|
+
"react-test-renderer": "^16.8.0",
|
|
66
|
+
"storybook-addon-performance": "^0.16.0",
|
|
67
|
+
"typescript": "3.9.6",
|
|
68
|
+
"wait-for-expect": "^1.2.0"
|
|
69
|
+
},
|
|
70
|
+
"techstack": {
|
|
71
|
+
"@atlassian/frontend": {
|
|
72
|
+
"import-structure": "atlassian-conventions"
|
|
73
|
+
},
|
|
74
|
+
"@repo/internal": {
|
|
75
|
+
"ui-components": "lite-mode",
|
|
76
|
+
"analytics": "analytics-next",
|
|
77
|
+
"theming": "tokens",
|
|
78
|
+
"deprecation": "no-deprecated-imports"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://atlassian.design/components/button/",
|
|
82
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
83
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/button/standard-button",
|
|
3
|
+
"main": "../dist/cjs/entry-points/standard-button.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/standard-button.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/standard-button.js",
|
|
6
|
+
"types": "../dist/types/entry-points/standard-button.d.ts"
|
|
7
|
+
}
|