@primer/components 0.0.0-202192925146 → 0.0.0-20219296335

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/browser.esm.js +147 -143
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +147 -143
  5. package/dist/browser.umd.js.map +1 -1
  6. package/lib/Autocomplete/Autocomplete.d.ts +28 -28
  7. package/lib/Autocomplete/AutocompleteInput.d.ts +28 -28
  8. package/lib/Button/Button.d.ts +26 -26
  9. package/lib/Button/ButtonBase.d.ts +1 -1
  10. package/lib/Button/ButtonClose.d.ts +27 -27
  11. package/lib/Button/ButtonDanger.d.ts +26 -26
  12. package/lib/Button/ButtonInvisible.d.ts +26 -26
  13. package/lib/Button/ButtonOutline.d.ts +26 -26
  14. package/lib/Button/ButtonPrimary.d.ts +26 -26
  15. package/lib/Button/ButtonStyles.js +1 -1
  16. package/lib/CircleBadge.d.ts +2 -2
  17. package/lib/CircleOcticon.d.ts +30 -30
  18. package/lib/Dialog.d.ts +33 -33
  19. package/lib/Dropdown.d.ts +114 -112
  20. package/lib/DropdownMenu/DropdownButton.d.ts +28 -28
  21. package/lib/FilterList.d.ts +25 -25
  22. package/lib/Flash.d.ts +1 -1
  23. package/lib/Label.d.ts +1 -1
  24. package/lib/NewButton/button.d.ts +60 -58
  25. package/lib/NewButton/button.js +61 -27
  26. package/lib/NewButton/buttonStyles.d.ts +2 -0
  27. package/lib/NewButton/buttonStyles.js +14 -0
  28. package/lib/NewButton/counter.js +2 -1
  29. package/lib/Position.d.ts +4 -4
  30. package/lib/SelectMenu/SelectMenu.d.ts +159 -159
  31. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  32. package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
  33. package/lib/TextInputWithTokens.d.ts +32 -28
  34. package/lib/TextInputWithTokens.js +102 -29
  35. package/lib/Timeline.d.ts +31 -31
  36. package/lib/Token/AvatarToken.d.ts +1 -1
  37. package/lib/Token/IssueLabelToken.d.ts +1 -1
  38. package/lib/Token/Token.d.ts +1 -1
  39. package/lib/Token/Token.js +13 -2
  40. package/lib/Token/TokenBase.js +0 -4
  41. package/lib/Token/_RemoveTokenButton.js +15 -2
  42. package/lib/_TextInputWrapper.js +1 -1
  43. package/lib/sx.d.ts +8 -2
  44. package/lib/theme.d.ts +78 -0
  45. package/lib/theme.js +3 -1
  46. package/lib/utils/testing.d.ts +1 -1
  47. package/lib/utils/types/KeyPaths.d.ts +3 -0
  48. package/lib/utils/types/KeyPaths.js +1 -0
  49. package/lib-esm/Autocomplete/Autocomplete.d.ts +28 -28
  50. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +28 -28
  51. package/lib-esm/Button/Button.d.ts +26 -26
  52. package/lib-esm/Button/ButtonBase.d.ts +1 -1
  53. package/lib-esm/Button/ButtonClose.d.ts +27 -27
  54. package/lib-esm/Button/ButtonDanger.d.ts +26 -26
  55. package/lib-esm/Button/ButtonInvisible.d.ts +26 -26
  56. package/lib-esm/Button/ButtonOutline.d.ts +26 -26
  57. package/lib-esm/Button/ButtonPrimary.d.ts +26 -26
  58. package/lib-esm/Button/ButtonStyles.js +1 -1
  59. package/lib-esm/CircleBadge.d.ts +2 -2
  60. package/lib-esm/CircleOcticon.d.ts +30 -30
  61. package/lib-esm/Dialog.d.ts +33 -33
  62. package/lib-esm/Dropdown.d.ts +114 -112
  63. package/lib-esm/DropdownMenu/DropdownButton.d.ts +28 -28
  64. package/lib-esm/FilterList.d.ts +25 -25
  65. package/lib-esm/Flash.d.ts +1 -1
  66. package/lib-esm/Label.d.ts +1 -1
  67. package/lib-esm/NewButton/button.d.ts +60 -58
  68. package/lib-esm/NewButton/button.js +61 -27
  69. package/lib-esm/NewButton/buttonStyles.d.ts +2 -0
  70. package/lib-esm/NewButton/buttonStyles.js +3 -0
  71. package/lib-esm/NewButton/counter.js +2 -1
  72. package/lib-esm/Position.d.ts +4 -4
  73. package/lib-esm/SelectMenu/SelectMenu.d.ts +159 -159
  74. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  75. package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
  76. package/lib-esm/TextInputWithTokens.d.ts +32 -28
  77. package/lib-esm/TextInputWithTokens.js +101 -30
  78. package/lib-esm/Timeline.d.ts +31 -31
  79. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  80. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  81. package/lib-esm/Token/Token.d.ts +1 -1
  82. package/lib-esm/Token/Token.js +13 -2
  83. package/lib-esm/Token/TokenBase.js +0 -4
  84. package/lib-esm/Token/_RemoveTokenButton.js +11 -2
  85. package/lib-esm/_TextInputWrapper.js +1 -1
  86. package/lib-esm/sx.d.ts +8 -2
  87. package/lib-esm/theme.d.ts +78 -0
  88. package/lib-esm/theme.js +2 -1
  89. package/lib-esm/utils/testing.d.ts +1 -1
  90. package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
  91. package/lib-esm/utils/types/KeyPaths.js +1 -0
  92. package/package.json +2 -1
@@ -15,9 +15,13 @@ declare const Button: React.ForwardRefExoticComponent<Pick<{
15
15
  color?: string | undefined;
16
16
  fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
17
17
  translate?: "yes" | "no" | undefined;
18
+ hidden?: boolean | undefined;
19
+ size?: "small" | "medium" | "large" | undefined;
20
+ style?: React.CSSProperties | undefined;
21
+ icon?: React.FunctionComponent<IconProps> | undefined;
22
+ caret?: boolean | undefined;
18
23
  form?: string | undefined;
19
24
  slot?: string | undefined;
20
- style?: React.CSSProperties | undefined;
21
25
  title?: string | undefined;
22
26
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
23
27
  type?: "button" | "reset" | "submit" | undefined;
@@ -29,15 +33,14 @@ declare const Button: React.ForwardRefExoticComponent<Pick<{
29
33
  suppressHydrationWarning?: boolean | undefined;
30
34
  accessKey?: string | undefined;
31
35
  className?: string | undefined;
32
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
36
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
33
37
  contextMenu?: string | undefined;
34
38
  dir?: string | undefined;
35
- draggable?: (boolean | "true" | "false") | undefined;
36
- hidden?: boolean | undefined;
39
+ draggable?: (boolean | "false" | "true") | undefined;
37
40
  id?: string | undefined;
38
41
  lang?: string | undefined;
39
42
  placeholder?: string | undefined;
40
- spellCheck?: (boolean | "true" | "false") | undefined;
43
+ spellCheck?: (boolean | "false" | "true") | undefined;
41
44
  tabIndex?: number | undefined;
42
45
  radioGroup?: string | undefined;
43
46
  role?: React.AriaRole | undefined;
@@ -60,50 +63,50 @@ declare const Button: React.ForwardRefExoticComponent<Pick<{
60
63
  results?: number | undefined;
61
64
  security?: string | undefined;
62
65
  unselectable?: "on" | "off" | undefined;
63
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
66
+ inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
64
67
  is?: string | undefined;
65
68
  'aria-activedescendant'?: string | undefined;
66
- 'aria-atomic'?: boolean | "true" | "false" | undefined;
67
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
68
- 'aria-busy'?: boolean | "true" | "false" | undefined;
69
- 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
69
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
70
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list" | undefined;
71
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
72
+ 'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
70
73
  'aria-colcount'?: number | undefined;
71
74
  'aria-colindex'?: number | undefined;
72
75
  'aria-colspan'?: number | undefined;
73
76
  'aria-controls'?: string | undefined;
74
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
77
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "step" | "location" | "date" | undefined;
75
78
  'aria-describedby'?: string | undefined;
76
79
  'aria-details'?: string | undefined;
77
- 'aria-disabled'?: boolean | "true" | "false" | undefined;
80
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
78
81
  'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
79
82
  'aria-errormessage'?: string | undefined;
80
- 'aria-expanded'?: boolean | "true" | "false" | undefined;
83
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
81
84
  'aria-flowto'?: string | undefined;
82
- 'aria-grabbed'?: boolean | "true" | "false" | undefined;
83
- 'aria-haspopup'?: boolean | "grid" | "dialog" | "listbox" | "menu" | "tree" | "true" | "false" | undefined;
84
- 'aria-hidden'?: boolean | "true" | "false" | undefined;
85
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
85
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
86
+ 'aria-haspopup'?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree" | undefined;
87
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
88
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
86
89
  'aria-keyshortcuts'?: string | undefined;
87
90
  'aria-label'?: string | undefined;
88
91
  'aria-labelledby'?: string | undefined;
89
92
  'aria-level'?: number | undefined;
90
93
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
91
- 'aria-modal'?: boolean | "true" | "false" | undefined;
92
- 'aria-multiline'?: boolean | "true" | "false" | undefined;
93
- 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
94
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
95
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
96
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
94
97
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
95
98
  'aria-owns'?: string | undefined;
96
99
  'aria-placeholder'?: string | undefined;
97
100
  'aria-posinset'?: number | undefined;
98
- 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
99
- 'aria-readonly'?: boolean | "true" | "false" | undefined;
101
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
102
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
100
103
  'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
101
- 'aria-required'?: boolean | "true" | "false" | undefined;
104
+ 'aria-required'?: boolean | "false" | "true" | undefined;
102
105
  'aria-roledescription'?: string | undefined;
103
106
  'aria-rowcount'?: number | undefined;
104
107
  'aria-rowindex'?: number | undefined;
105
108
  'aria-rowspan'?: number | undefined;
106
- 'aria-selected'?: boolean | "true" | "false" | undefined;
109
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
107
110
  'aria-setsize'?: number | undefined;
108
111
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
109
112
  'aria-valuemax'?: number | undefined;
@@ -274,10 +277,7 @@ declare const Button: React.ForwardRefExoticComponent<Pick<{
274
277
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
275
278
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
276
279
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
277
- size?: "small" | "large" | "medium" | undefined;
278
- icon?: React.FunctionComponent<IconProps> | undefined;
279
- caret?: boolean | undefined;
280
- sx?: import("@styled-system/css").SystemStyleObject | undefined;
280
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
281
281
  value?: string | number | readonly string[] | undefined;
282
282
  autoFocus?: boolean | undefined;
283
283
  disabled?: boolean | undefined;
@@ -288,16 +288,21 @@ declare const Button: React.ForwardRefExoticComponent<Pick<{
288
288
  formTarget?: string | undefined;
289
289
  variant?: VariantType | undefined;
290
290
  as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
291
+ iconOnly: boolean;
291
292
  } & {
292
293
  theme?: any;
293
- }, "color" | "fontSize" | "translate" | "form" | "slot" | "style" | "title" | "theme" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "size" | "icon" | "caret" | "sx" | "value" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "variant" | "as"> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
294
+ }, "color" | "fontSize" | "translate" | "hidden" | "size" | "style" | "icon" | "caret" | "form" | "slot" | "title" | "theme" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "sx" | "value" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "variant" | "as" | "iconOnly"> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
294
295
  declare const NewButton: React.ForwardRefExoticComponent<Pick<{
295
296
  color?: string | undefined;
296
297
  fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
297
298
  translate?: "yes" | "no" | undefined;
299
+ hidden?: boolean | undefined;
300
+ size?: "small" | "medium" | "large" | undefined;
301
+ style?: React.CSSProperties | undefined;
302
+ icon?: React.FunctionComponent<IconProps> | undefined;
303
+ caret?: boolean | undefined;
298
304
  form?: string | undefined;
299
305
  slot?: string | undefined;
300
- style?: React.CSSProperties | undefined;
301
306
  title?: string | undefined;
302
307
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
303
308
  type?: "button" | "reset" | "submit" | undefined;
@@ -309,15 +314,14 @@ declare const NewButton: React.ForwardRefExoticComponent<Pick<{
309
314
  suppressHydrationWarning?: boolean | undefined;
310
315
  accessKey?: string | undefined;
311
316
  className?: string | undefined;
312
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
317
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
313
318
  contextMenu?: string | undefined;
314
319
  dir?: string | undefined;
315
- draggable?: (boolean | "true" | "false") | undefined;
316
- hidden?: boolean | undefined;
320
+ draggable?: (boolean | "false" | "true") | undefined;
317
321
  id?: string | undefined;
318
322
  lang?: string | undefined;
319
323
  placeholder?: string | undefined;
320
- spellCheck?: (boolean | "true" | "false") | undefined;
324
+ spellCheck?: (boolean | "false" | "true") | undefined;
321
325
  tabIndex?: number | undefined;
322
326
  radioGroup?: string | undefined;
323
327
  role?: React.AriaRole | undefined;
@@ -340,50 +344,50 @@ declare const NewButton: React.ForwardRefExoticComponent<Pick<{
340
344
  results?: number | undefined;
341
345
  security?: string | undefined;
342
346
  unselectable?: "on" | "off" | undefined;
343
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
347
+ inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
344
348
  is?: string | undefined;
345
349
  'aria-activedescendant'?: string | undefined;
346
- 'aria-atomic'?: boolean | "true" | "false" | undefined;
347
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
348
- 'aria-busy'?: boolean | "true" | "false" | undefined;
349
- 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
350
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
351
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list" | undefined;
352
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
353
+ 'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
350
354
  'aria-colcount'?: number | undefined;
351
355
  'aria-colindex'?: number | undefined;
352
356
  'aria-colspan'?: number | undefined;
353
357
  'aria-controls'?: string | undefined;
354
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
358
+ 'aria-current'?: boolean | "page" | "false" | "true" | "time" | "step" | "location" | "date" | undefined;
355
359
  'aria-describedby'?: string | undefined;
356
360
  'aria-details'?: string | undefined;
357
- 'aria-disabled'?: boolean | "true" | "false" | undefined;
361
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
358
362
  'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
359
363
  'aria-errormessage'?: string | undefined;
360
- 'aria-expanded'?: boolean | "true" | "false" | undefined;
364
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
361
365
  'aria-flowto'?: string | undefined;
362
- 'aria-grabbed'?: boolean | "true" | "false" | undefined;
363
- 'aria-haspopup'?: boolean | "grid" | "dialog" | "listbox" | "menu" | "tree" | "true" | "false" | undefined;
364
- 'aria-hidden'?: boolean | "true" | "false" | undefined;
365
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
366
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
367
+ 'aria-haspopup'?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree" | undefined;
368
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
369
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
366
370
  'aria-keyshortcuts'?: string | undefined;
367
371
  'aria-label'?: string | undefined;
368
372
  'aria-labelledby'?: string | undefined;
369
373
  'aria-level'?: number | undefined;
370
374
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
371
- 'aria-modal'?: boolean | "true" | "false" | undefined;
372
- 'aria-multiline'?: boolean | "true" | "false" | undefined;
373
- 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
375
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
376
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
377
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
374
378
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
375
379
  'aria-owns'?: string | undefined;
376
380
  'aria-placeholder'?: string | undefined;
377
381
  'aria-posinset'?: number | undefined;
378
- 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
379
- 'aria-readonly'?: boolean | "true" | "false" | undefined;
382
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
383
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
380
384
  'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
381
- 'aria-required'?: boolean | "true" | "false" | undefined;
385
+ 'aria-required'?: boolean | "false" | "true" | undefined;
382
386
  'aria-roledescription'?: string | undefined;
383
387
  'aria-rowcount'?: number | undefined;
384
388
  'aria-rowindex'?: number | undefined;
385
389
  'aria-rowspan'?: number | undefined;
386
- 'aria-selected'?: boolean | "true" | "false" | undefined;
390
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
387
391
  'aria-setsize'?: number | undefined;
388
392
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
389
393
  'aria-valuemax'?: number | undefined;
@@ -554,10 +558,7 @@ declare const NewButton: React.ForwardRefExoticComponent<Pick<{
554
558
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
555
559
  onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
556
560
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
557
- size?: "small" | "large" | "medium" | undefined;
558
- icon?: React.FunctionComponent<IconProps> | undefined;
559
- caret?: boolean | undefined;
560
- sx?: import("@styled-system/css").SystemStyleObject | undefined;
561
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
561
562
  value?: string | number | readonly string[] | undefined;
562
563
  autoFocus?: boolean | undefined;
563
564
  disabled?: boolean | undefined;
@@ -568,9 +569,10 @@ declare const NewButton: React.ForwardRefExoticComponent<Pick<{
568
569
  formTarget?: string | undefined;
569
570
  variant?: VariantType | undefined;
570
571
  as?: string | React.ComponentClass<any, any> | React.FunctionComponent<any> | undefined;
572
+ iconOnly: boolean;
571
573
  } & {
572
574
  theme?: any;
573
- }, "color" | "fontSize" | "translate" | "form" | "slot" | "style" | "title" | "theme" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "size" | "icon" | "caret" | "sx" | "value" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "variant" | "as"> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
575
+ }, "color" | "fontSize" | "translate" | "hidden" | "size" | "style" | "icon" | "caret" | "form" | "slot" | "title" | "theme" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "sx" | "value" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "variant" | "as" | "iconOnly"> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
574
576
  Counter: ({ count }: {
575
577
  count: number;
576
578
  }) => JSX.Element;
@@ -19,7 +19,7 @@ var _sx = _interopRequireDefault(require("../sx"));
19
19
 
20
20
  var _constants = require("../constants");
21
21
 
22
- var _ButtonStyles = _interopRequireDefault(require("../Button/ButtonStyles"));
22
+ var _buttonStyles = _interopRequireDefault(require("./buttonStyles"));
23
23
 
24
24
  var _counter = _interopRequireDefault(require("./counter"));
25
25
 
@@ -35,15 +35,13 @@ const sizes = (0, _styledSystem.variant)({
35
35
  prop: 'size',
36
36
  variants: {
37
37
  small: {
38
- p: '4px 12px',
39
38
  fontSize: 0
40
39
  },
41
40
  medium: {
42
41
  fontSize: 1
43
42
  },
44
43
  large: {
45
- fontSize: 2,
46
- p: '10px 20px'
44
+ fontSize: 2
47
45
  }
48
46
  }
49
47
  });
@@ -51,7 +49,6 @@ const sizes = (0, _styledSystem.variant)({
51
49
  const getVariantStyles = (theme, variant = 'default') => {
52
50
  const style = {
53
51
  default: `
54
- padding: 5px 16px;
55
52
  color: ${(0, _constants.get)('colors.btn.text')({
56
53
  theme
57
54
  })};
@@ -68,18 +65,18 @@ const getVariantStyles = (theme, variant = 'default') => {
68
65
  }), (0, _constants.get)('shadows.btn.insetShadow')({
69
66
  theme
70
67
  }))};
71
- &:hover {
68
+ &:hover:not([disabled]) {
72
69
  background-color: ${(0, _constants.get)('colors.btn.hoverBg')({
73
70
  theme
74
71
  })};
75
72
  }
76
73
  // focus must come before :active so that the active box shadow overrides
77
- &:focus {
74
+ &:focus:not([disabled]) {
78
75
  box-shadow: ${(0, _constants.get)('shadows.btn.focusShadow')({
79
76
  theme
80
77
  })};
81
78
  }
82
- &:active {
79
+ &:active:not([disabled]) {
83
80
  background-color: ${(0, _constants.get)('colors.btn.selectedBg')({
84
81
  theme
85
82
  })};
@@ -90,11 +87,13 @@ const getVariantStyles = (theme, variant = 'default') => {
90
87
  &:disabled {
91
88
  color: ${(0, _constants.get)('colors.primer.fg.disabled')({
92
89
  theme
90
+ })};
91
+ background-color: ${(0, _constants.get)('colors.btn.disabledBg')({
92
+ theme
93
93
  })};
94
94
  }
95
95
  `,
96
96
  primary: `
97
- padding: 5px 16px;
98
97
  color: ${(0, _constants.get)('colors.btn.primary.text')({
99
98
  theme
100
99
  })};
@@ -110,7 +109,7 @@ const getVariantStyles = (theme, variant = 'default') => {
110
109
  theme
111
110
  })};
112
111
 
113
- &:hover {
112
+ &:hover:not([disabled]) {
114
113
  color: ${(0, _constants.get)('colors.btn.primary.hoverText')({
115
114
  theme
116
115
  })};
@@ -119,13 +118,13 @@ const getVariantStyles = (theme, variant = 'default') => {
119
118
  })};
120
119
  }
121
120
  // focus must come before :active so that the active box shadow overrides
122
- &:focus {
121
+ &:focus:not([disabled]) {
123
122
  box-shadow: ${(0, _constants.get)('shadows.btn.primary.focusShadow')({
124
123
  theme
125
124
  })};
126
125
  }
127
126
 
128
- &:active {
127
+ &:active:not([disabled]) {
129
128
  background-color: ${(0, _constants.get)('colors.btn.primary.selectedBg')({
130
129
  theme
131
130
  })};
@@ -143,7 +142,6 @@ const getVariantStyles = (theme, variant = 'default') => {
143
142
  })};
144
143
  }`,
145
144
  danger: `
146
- padding: 5px 16px;
147
145
  color: ${(0, _constants.get)('colors.btn.danger.text')({
148
146
  theme
149
147
  })};
@@ -157,7 +155,7 @@ const getVariantStyles = (theme, variant = 'default') => {
157
155
  theme
158
156
  })};
159
157
 
160
- &:hover {
158
+ &:hover:not([disabled]) {
161
159
  color: ${(0, _constants.get)('colors.btn.danger.hoverText')({
162
160
  theme
163
161
  })};
@@ -172,7 +170,7 @@ const getVariantStyles = (theme, variant = 'default') => {
172
170
  })};
173
171
  }
174
172
  // focus must come before :active so that the active box shadow overrides
175
- &:focus {
173
+ &:focus:not([disabled]) {
176
174
  border-color: ${(0, _constants.get)('colors.btn.danger.focusBorder')({
177
175
  theme
178
176
  })};
@@ -181,7 +179,7 @@ const getVariantStyles = (theme, variant = 'default') => {
181
179
  })};
182
180
  }
183
181
 
184
- &:active {
182
+ &:active:not([disabled]) {
185
183
  color: ${(0, _constants.get)('colors.btn.danger.selectedText')({
186
184
  theme
187
185
  })};
@@ -209,7 +207,6 @@ const getVariantStyles = (theme, variant = 'default') => {
209
207
  }
210
208
  `,
211
209
  invisible: `
212
- padding: 6px 16px;
213
210
  color: ${(0, _constants.get)('colors.accent.fg')({
214
211
  theme
215
212
  })};
@@ -225,31 +222,63 @@ const getVariantStyles = (theme, variant = 'default') => {
225
222
  theme
226
223
  })};
227
224
  }
228
- &:focus {
225
+ &:focus:not([disabled]) {
229
226
  box-shadow: ${(0, _constants.get)('shadows.btn.focusShadow')({
230
227
  theme
231
228
  })};
232
229
  }
233
- &:hover {
230
+ &:hover:not([disabled]) {
234
231
  background-color: ${(0, _constants.get)('colors.btn.hoverBg')({
235
232
  theme
236
233
  })};
237
234
  }
238
- &:active {
235
+ &:active:not([disabled]) {
239
236
  background-color: ${(0, _constants.get)('colors.btn.selectedBg')({
240
237
  theme
241
238
  })};
242
239
  }
243
- `,
244
- block: ``
240
+ `
245
241
  };
246
242
  return style[variant];
247
243
  };
248
244
 
245
+ const getSizes = (size = 'medium', variant = 'default', iconOnly) => {
246
+ let paddingTop, paddingLeft;
247
+
248
+ switch (size) {
249
+ case 'small':
250
+ paddingTop = 3;
251
+ paddingLeft = 12;
252
+ break;
253
+
254
+ case 'large':
255
+ paddingTop = 9;
256
+ paddingLeft = 20;
257
+ break;
258
+
259
+ case 'medium':
260
+ default:
261
+ paddingTop = 5;
262
+ paddingLeft = 16;
263
+ }
264
+
265
+ if (iconOnly) {
266
+ paddingLeft = paddingTop + 2;
267
+ }
268
+
269
+ if (variant === 'invisible') {
270
+ paddingTop = paddingTop + 1;
271
+ }
272
+
273
+ return `
274
+ padding:${paddingTop}px ${paddingLeft}px;
275
+ `;
276
+ };
277
+
249
278
  const ButtonBase = _styledComponents.default.button.withConfig({
250
279
  displayName: "button__ButtonBase",
251
280
  componentId: "sc-15k5iqk-0"
252
- })(["", " ", " ", " ", " ", " ", ""], _ButtonStyles.default, props => getVariantStyles(props.theme, props.variant), sizes, props => props.icon && !props.children ? `padding: 4px 6px;` : '', _sx.default, _styledSystem.fontSize);
281
+ })(["", " ", " ", " ", " ", " ", ""], _buttonStyles.default, props => getVariantStyles(props.theme, props.variant), props => getSizes(props.size, props.variant, props.iconOnly), sizes, _sx.default, _styledSystem.fontSize);
253
282
 
254
283
  const Button = /*#__PURE__*/(0, _react.forwardRef)(({
255
284
  children,
@@ -257,7 +286,8 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
257
286
  }, forwardedRef) => {
258
287
  const {
259
288
  icon: Icon,
260
- caret
289
+ caret,
290
+ size
261
291
  } = props;
262
292
  let iconOnly = false;
263
293
 
@@ -268,7 +298,7 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
268
298
  const iconWrapStyles = {
269
299
  display: 'inline-block',
270
300
  ...(!iconOnly ? {
271
- pr: 3
301
+ mr: 2
272
302
  } : {})
273
303
  };
274
304
  return /*#__PURE__*/_react.default.createElement(ButtonBase, _extends({
@@ -278,13 +308,17 @@ const Button = /*#__PURE__*/(0, _react.forwardRef)(({
278
308
  }), Icon && /*#__PURE__*/_react.default.createElement(_Box.default, {
279
309
  sx: iconWrapStyles,
280
310
  "aria-hidden": !iconOnly
281
- }, /*#__PURE__*/_react.default.createElement(Icon, null)), children, caret && /*#__PURE__*/_react.default.createElement(_Box.default, {
311
+ }, /*#__PURE__*/_react.default.createElement(Icon, {
312
+ size: size
313
+ })), children, caret && /*#__PURE__*/_react.default.createElement(_Box.default, {
282
314
  sx: {
283
315
  display: 'inline-block',
284
316
  pl: 3
285
317
  },
286
318
  "aria-hidden": true
287
- }, /*#__PURE__*/_react.default.createElement(_octiconsReact.TriangleDownIcon, null)));
319
+ }, /*#__PURE__*/_react.default.createElement(_octiconsReact.TriangleDownIcon, {
320
+ size: size
321
+ })));
288
322
  });
289
323
  Button.displayName = 'Button';
290
324
  Button.defaultProps = {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _styledComponents = require("styled-components");
9
+
10
+ var _constants = require("../constants");
11
+
12
+ var _default = (0, _styledComponents.css)(["position:relative;display:inline-block;font-family:inherit;font-weight:", ";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:", ";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"], (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('radii.2'));
13
+
14
+ exports.default = _default;
@@ -16,7 +16,8 @@ const styles = {
16
16
  padding: '0px 6px',
17
17
  backgroundColor: 'neutral.muted',
18
18
  borderRadius: '50%',
19
- marginLeft: '8px'
19
+ marginLeft: '8px',
20
+ marginRight: '-4px'
20
21
  };
21
22
 
22
23
  const Counter = ({