@primer/components 0.0.0-20211124581 → 0.0.0-202111255030

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 (76) hide show
  1. package/CHANGELOG.md +1 -7
  2. package/dist/browser.esm.js +148 -166
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +156 -174
  5. package/dist/browser.umd.js.map +1 -1
  6. package/lib/ActionList2/Divider.d.ts +2 -3
  7. package/lib/ActionList2/Divider.js +5 -10
  8. package/lib/ActionList2/Item.js +5 -21
  9. package/lib/ActionList2/List.js +1 -11
  10. package/lib/ActionList2/Selection.js +0 -11
  11. package/lib/ActionList2/index.d.ts +2 -1
  12. package/lib/Autocomplete/Autocomplete.d.ts +2 -10
  13. package/lib/Autocomplete/AutocompleteInput.d.ts +2 -10
  14. package/lib/Checkbox.d.ts +1 -1
  15. package/lib/NewButton/button-base.d.ts +6 -0
  16. package/lib/NewButton/button-base.js +69 -0
  17. package/lib/NewButton/button-link.d.ts +26 -0
  18. package/lib/NewButton/button-link.js +31 -0
  19. package/lib/NewButton/button.d.ts +2 -11
  20. package/lib/NewButton/button.js +6 -283
  21. package/lib/NewButton/icon-button.d.ts +4 -0
  22. package/lib/NewButton/icon-button.js +57 -0
  23. package/lib/NewButton/index.d.ts +6 -11
  24. package/lib/NewButton/index.js +18 -0
  25. package/lib/NewButton/styles.d.ts +202 -0
  26. package/lib/NewButton/styles.js +248 -0
  27. package/lib/NewButton/types.d.ts +28 -8
  28. package/lib/NewButton/types.js +19 -1
  29. package/lib/SelectMenu/SelectMenu.d.ts +2 -10
  30. package/lib/TextInput.d.ts +1 -8
  31. package/lib/TextInput.js +5 -16
  32. package/lib/TextInputWithTokens.d.ts +2 -10
  33. package/lib/_TextInputWrapper.d.ts +0 -3
  34. package/lib/_TextInputWrapper.js +7 -18
  35. package/lib/drafts.d.ts +0 -1
  36. package/lib/drafts.js +0 -13
  37. package/lib-esm/ActionList2/Divider.d.ts +2 -3
  38. package/lib-esm/ActionList2/Divider.js +5 -8
  39. package/lib-esm/ActionList2/Item.js +5 -19
  40. package/lib-esm/ActionList2/List.js +1 -9
  41. package/lib-esm/ActionList2/Selection.js +0 -9
  42. package/lib-esm/ActionList2/index.d.ts +2 -1
  43. package/lib-esm/Autocomplete/Autocomplete.d.ts +2 -10
  44. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +2 -10
  45. package/lib-esm/Checkbox.d.ts +1 -1
  46. package/lib-esm/NewButton/button-base.d.ts +6 -0
  47. package/lib-esm/NewButton/button-base.js +47 -0
  48. package/lib-esm/NewButton/button-link.d.ts +26 -0
  49. package/lib-esm/NewButton/button-link.js +15 -0
  50. package/lib-esm/NewButton/button.d.ts +2 -11
  51. package/lib-esm/NewButton/button.js +4 -275
  52. package/lib-esm/NewButton/icon-button.d.ts +4 -0
  53. package/lib-esm/NewButton/icon-button.js +35 -0
  54. package/lib-esm/NewButton/index.d.ts +6 -11
  55. package/lib-esm/NewButton/index.js +4 -1
  56. package/lib-esm/NewButton/styles.d.ts +202 -0
  57. package/lib-esm/NewButton/styles.js +229 -0
  58. package/lib-esm/NewButton/types.d.ts +28 -8
  59. package/lib-esm/NewButton/types.js +6 -1
  60. package/lib-esm/SelectMenu/SelectMenu.d.ts +2 -10
  61. package/lib-esm/TextInput.d.ts +1 -8
  62. package/lib-esm/TextInput.js +5 -16
  63. package/lib-esm/TextInputWithTokens.d.ts +2 -10
  64. package/lib-esm/_TextInputWrapper.d.ts +0 -3
  65. package/lib-esm/_TextInputWrapper.js +7 -18
  66. package/lib-esm/drafts.d.ts +0 -1
  67. package/lib-esm/drafts.js +1 -2
  68. package/package.json +1 -1
  69. package/lib/ActionList2/MenuContext.d.ts +0 -10
  70. package/lib/ActionList2/MenuContext.js +0 -15
  71. package/lib/ActionMenu2.d.ts +0 -310
  72. package/lib/ActionMenu2.js +0 -91
  73. package/lib-esm/ActionList2/MenuContext.d.ts +0 -10
  74. package/lib-esm/ActionList2/MenuContext.js +0 -3
  75. package/lib-esm/ActionMenu2.d.ts +0 -310
  76. package/lib-esm/ActionMenu2.js +0 -67
@@ -7,13 +7,7 @@ exports.Button = void 0;
7
7
 
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
 
10
- var _Box = _interopRequireDefault(require("../Box"));
11
-
12
- var _styledComponents = _interopRequireDefault(require("styled-components"));
13
-
14
- var _sx = _interopRequireWildcard(require("../sx"));
15
-
16
- var _ThemeProvider = require("../ThemeProvider");
10
+ var _buttonBase = _interopRequireDefault(require("./button-base"));
17
11
 
18
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
13
 
@@ -23,286 +17,15 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
17
 
24
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
19
 
26
- const TEXT_ROW_HEIGHT = '20px'; // custom value off the scale
27
-
28
- const getVariantStyles = (variant = 'default', theme) => {
29
- const style = {
30
- default: {
31
- color: 'btn.text',
32
- backgroundColor: 'btn.bg',
33
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.shadow}, ${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.insetShadow}`,
34
- '&:hover:not([disabled])': {
35
- backgroundColor: 'btn.hoverBg'
36
- },
37
- // focus must come before :active so that the active box shadow overrides
38
- '&:focus:not([disabled])': {
39
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.focusShadow}`
40
- },
41
- '&:active:not([disabled])': {
42
- backgroundColor: 'btn.selectedBg',
43
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.shadowActive}`
44
- },
45
- '&:disabled': {
46
- color: 'primer.fg.disabled',
47
- backgroundColor: 'btn.disabledBg'
48
- }
49
- },
50
- primary: {
51
- color: 'btn.primary.text',
52
- backgroundColor: 'btn.primary.bg',
53
- borderColor: 'border.subtle',
54
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.primary.shadow}`,
55
- '&:hover:not([disabled])': {
56
- color: 'btn.primary.hoverText',
57
- backgroundColor: 'btn.primary.hoverBg'
58
- },
59
- // focus must come before :active so that the active box shadow overrides
60
- '&:focus:not([disabled])': {
61
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.primary.focusShadow}`
62
- },
63
- '&:active:not([disabled])': {
64
- backgroundColor: 'btn.primary.selectedBg',
65
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.primary.selectedShadow}`
66
- },
67
- '&:disabled': {
68
- color: 'btn.primary.disabledText',
69
- backgroundColor: 'btn.primary.disabledBg'
70
- },
71
- '[data-component="ButtonCounter"]': {
72
- backgroundColor: 'btn.primary.counterBg',
73
- color: 'btn.primary.text'
74
- }
75
- },
76
- danger: {
77
- color: 'btn.danger.text',
78
- backgroundColor: 'btn.bg',
79
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.shadow}`,
80
- '&:hover:not([disabled])': {
81
- color: 'btn.danger.hoverText',
82
- backgroundColor: 'btn.danger.hoverBg',
83
- borderColor: 'btn.danger.hoverBorder',
84
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.danger.hoverShadow}`,
85
- '[data-component="ButtonCounter"]': {
86
- backgroundColor: 'btn.danger.hoverCounterBg',
87
- color: 'btn.danger.hoverText'
88
- }
89
- },
90
- // focus must come before :active so that the active box shadow overrides
91
- '&:focus:not([disabled])': {
92
- borderColor: 'btn.danger.focusBorder',
93
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.danger.focusShadow}`
94
- },
95
- '&:active:not([disabled])': {
96
- color: 'btn.danger.selectedText',
97
- backgroundColor: 'btn.danger.selectedBg',
98
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.danger.selectedShadow}`,
99
- borderColor: 'btn.danger.selectedBorder'
100
- },
101
- '&:disabled': {
102
- color: 'btn.danger.disabledText',
103
- backgroundColor: 'btn.danger.disabledBg',
104
- borderColor: 'btn.danger.disabledBorder',
105
- '[data-component="ButtonCounter"]': {
106
- backgroundColor: 'btn.danger.disabledCounterBg'
107
- }
108
- },
109
- '[data-component="ButtonCounter"]': {
110
- color: 'btn.danger.text',
111
- backgroundColor: 'btn.danger.counterBg'
112
- }
113
- },
114
- invisible: {
115
- color: 'accent.fg',
116
- backgroundColor: 'transparent',
117
- border: '0',
118
- boxShadow: 'none',
119
- '&:hover:not([disabled])': {
120
- backgroundColor: 'btn.hoverBg'
121
- },
122
- // focus must come before :active so that the active box shadow overrides
123
- '&:focus:not([disabled])': {
124
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.focusShadow}`
125
- },
126
- '&:active:not([disabled])': {
127
- backgroundColor: 'btn.selectedBg'
128
- },
129
- '&:disabled': {
130
- color: 'primer.fg.disabled'
131
- }
132
- },
133
- outline: {
134
- color: 'btn.outline.text',
135
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.shadow}`,
136
- '&:hover': {
137
- color: 'btn.outline.hoverText',
138
- backgroundColor: 'btn.outline.hoverBg',
139
- borderColor: 'outline.hoverBorder',
140
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.outline.hoverShadow}`,
141
- '[data-component="ButtonCounter"]': {
142
- backgroundColor: 'btn.outline.hoverCounterBg',
143
- color: 'btn.outline.hoverText'
144
- }
145
- },
146
- // focus must come before :active so that the active box shadow overrides
147
- '&:focus': {
148
- borderColor: 'btn.outline.focusBorder',
149
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.outline.focusShadow}`
150
- },
151
- '&:active:not([disabled])': {
152
- color: 'btn.outline.selectedText',
153
- backgroundColor: 'btn.outline.selectedBg',
154
- boxShadow: `${theme === null || theme === void 0 ? void 0 : theme.shadows.btn.outline.selectedShadow}`,
155
- borderColor: 'btn.outline.selectedBorder'
156
- },
157
- '&:disabled': {
158
- color: 'btn.outline.disabledText',
159
- backgroundColor: 'btn.outline.disabledBg',
160
- borderColor: 'btn.border',
161
- '[data-component="ButtonCounter"]': {
162
- backgroundColor: 'btn.outline.disabledCounterBg'
163
- }
164
- },
165
- '[data-component="ButtonCounter"]': {
166
- backgroundColor: 'btn.outline.counterBg',
167
- color: 'btn.outline.text'
168
- }
169
- }
170
- };
171
- return style[variant];
172
- };
173
-
174
- const getSizeStyles = (size = 'medium', variant = 'default', iconOnly) => {
175
- let paddingY, paddingX, fontSize;
176
-
177
- switch (size) {
178
- case 'small':
179
- paddingY = 3;
180
- paddingX = 12;
181
- fontSize = 0;
182
- break;
183
-
184
- case 'large':
185
- paddingY = 9;
186
- paddingX = 20;
187
- fontSize = 2;
188
- break;
189
-
190
- case 'medium':
191
- default:
192
- paddingY = 5;
193
- paddingX = 16;
194
- fontSize = 1;
195
- }
196
-
197
- if (iconOnly) {
198
- paddingX = paddingY + 2;
199
- }
200
-
201
- if (variant === 'invisible') {
202
- paddingY = paddingY + 1;
203
- }
204
-
205
- return {
206
- paddingY: `${paddingY}px`,
207
- paddingX: `${paddingX}px`,
208
- fontSize,
209
- '[data-component="ButtonCounter"]': {
210
- fontSize
211
- }
212
- };
213
- };
214
-
215
- const ButtonBase = _styledComponents.default.button.withConfig({
216
- displayName: "button__ButtonBase",
217
- componentId: "sc-15k5iqk-0"
218
- })(_sx.default);
219
-
220
20
  const Button = /*#__PURE__*/(0, _react.forwardRef)(({
221
21
  children,
222
- sx: sxProp = {},
223
22
  ...props
224
23
  }, forwardedRef) => {
225
- const {
226
- icon: Icon,
227
- leadingIcon: LeadingIcon,
228
- trailingIcon: TrailingIcon,
229
- variant = 'default',
230
- size = 'medium'
231
- } = props;
232
- const iconOnly = !!Icon;
233
- const {
234
- theme
235
- } = (0, _ThemeProvider.useTheme)();
236
- const styles = {
237
- borderRadius: '2',
238
- border: '1px solid',
239
- borderColor: theme === null || theme === void 0 ? void 0 : theme.colors.btn.border,
240
- display: 'grid',
241
- gridTemplateAreas: '"leadingIcon text trailingIcon"',
242
- fontWeight: 'bold',
243
- lineHeight: TEXT_ROW_HEIGHT,
244
- whiteSpace: 'nowrap',
245
- verticalAlign: 'middle',
246
- cursor: 'pointer',
247
- appearance: 'none',
248
- userSelect: 'none',
249
- textDecoration: 'none',
250
- textAlign: 'center',
251
- '& > :not(:last-child)': {
252
- mr: '2'
253
- },
254
- '&:focus': {
255
- outline: 'none'
256
- },
257
- '&:disabled': {
258
- cursor: 'default'
259
- },
260
- '&:disabled svg': {
261
- opacity: '0.6'
262
- },
263
- '[data-component="leadingIcon"]': {
264
- gridArea: 'leadingIcon'
265
- },
266
- '[data-component="text"]': {
267
- gridArea: 'text'
268
- },
269
- '[data-component="trailingIcon"]': {
270
- gridArea: 'trailingIcon'
271
- }
272
- };
273
- const iconWrapStyles = {
274
- display: 'inline-block'
275
- };
276
-
277
- const sxStyles = _sx.merge.all([styles, getSizeStyles(size, variant, iconOnly), getVariantStyles(variant, theme), sxProp]);
278
-
279
- return /*#__PURE__*/_react.default.createElement(ButtonBase, _extends({
280
- sx: sxStyles,
24
+ return /*#__PURE__*/_react.default.createElement(_buttonBase.default, _extends({
281
25
  ref: forwardedRef
282
- }, props), LeadingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
283
- as: "span",
284
- "data-component": "leadingIcon",
285
- sx: iconWrapStyles,
286
- "aria-hidden": !iconOnly
287
- }, /*#__PURE__*/_react.default.createElement(LeadingIcon, null)), /*#__PURE__*/_react.default.createElement("span", {
288
- "data-component": "text",
289
- hidden: Icon ? true : false
290
- }, children), Icon && /*#__PURE__*/_react.default.createElement(_Box.default, {
291
- "data-component": "icon-only",
292
- as: "span",
293
- sx: {
294
- display: 'inline-block'
295
- },
296
- "aria-hidden": !iconOnly
297
- }, /*#__PURE__*/_react.default.createElement(Icon, null)), TrailingIcon && /*#__PURE__*/_react.default.createElement(_Box.default, {
298
- as: "span",
299
- "data-component": "trailingIcon",
300
- sx: { ...iconWrapStyles,
301
- ml: 2
302
- },
303
- "aria-hidden": !iconOnly
304
- }, /*#__PURE__*/_react.default.createElement(TrailingIcon, null)));
26
+ }, props, {
27
+ as: "button"
28
+ }), children);
305
29
  });
306
30
  exports.Button = Button;
307
- Button.displayName = 'Button';
308
- Object.assign(Button, {});
31
+ Button.displayName = 'Button';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { IconButtonProps } from './types';
3
+ declare const IconButton: React.ForwardRefExoticComponent<Pick<IconButtonProps, string | number | symbol> & React.RefAttributes<HTMLButtonElement>>;
4
+ export default IconButton;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _sx = require("../sx");
11
+
12
+ var _ThemeProvider = require("../ThemeProvider");
13
+
14
+ var _Box = _interopRequireDefault(require("../Box"));
15
+
16
+ var _types = require("./types");
17
+
18
+ var _styles = require("./styles");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
+
28
+ const IconButton = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
29
+ const {
30
+ variant = 'default',
31
+ size = 'medium',
32
+ sx: sxProp = {},
33
+ icon: Icon,
34
+ iconLabel
35
+ } = props;
36
+ const {
37
+ theme
38
+ } = (0, _ThemeProvider.useTheme)();
39
+ const styles = { ...(0, _styles.getBaseStyles)(theme)
40
+ };
41
+
42
+ const sxStyles = _sx.merge.all([styles, (0, _styles.getSizeStyles)(size, variant, true), (0, _styles.getVariantStyles)(variant, theme), sxProp]);
43
+
44
+ return /*#__PURE__*/_react.default.createElement(_types.StyledButton, _extends({
45
+ sx: sxStyles,
46
+ ref: forwardedRef
47
+ }, props), /*#__PURE__*/_react.default.createElement("span", {
48
+ hidden: true
49
+ }, iconLabel), /*#__PURE__*/_react.default.createElement(_Box.default, {
50
+ as: "span",
51
+ sx: {
52
+ display: 'inline-block'
53
+ }
54
+ }, /*#__PURE__*/_react.default.createElement(Icon, null)));
55
+ });
56
+ var _default = IconButton;
57
+ exports.default = _default;
@@ -1,14 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { ButtonProps } from './types';
3
- export type { ButtonProps as NewButtonProps };
4
- export declare const NewButton: import("react").ForwardRefExoticComponent<{
5
- variant?: import("./types").VariantType | undefined;
6
- size?: import("./types").Size | undefined;
7
- icon?: import("react").FunctionComponent<import("@primer/octicons-react/dist/icons").IconProps> | undefined;
8
- leadingIcon?: import("react").FunctionComponent<import("@primer/octicons-react/dist/icons").IconProps> | undefined;
9
- trailingIcon?: import("react").FunctionComponent<import("@primer/octicons-react/dist/icons").IconProps> | undefined;
10
- disabled?: boolean | undefined;
11
- children: import("react").ReactNode;
12
- } & import("../sx").SxProp & import("react").HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>> & {
2
+ import IconButton from './icon-button';
3
+ import ButtonLink from './button-link';
4
+ import { ButtonProps, IconButtonProps } from './types';
5
+ export type { ButtonProps as NewButtonProps, IconButtonProps };
6
+ export declare const NewButton: import("react").ForwardRefExoticComponent<Pick<ButtonProps, string | number | symbol> & import("react").RefAttributes<HTMLButtonElement>> & {
13
7
  Counter: ({ children, sx: sxProp, ...props }: import("./button-counter").CounterProps) => JSX.Element;
14
8
  };
9
+ export { IconButton, ButtonLink };
@@ -3,12 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "IconButton", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _iconButton.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ButtonLink", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _buttonLink.default;
16
+ }
17
+ });
6
18
  exports.NewButton = void 0;
7
19
 
8
20
  var _button = require("./button");
9
21
 
10
22
  var _buttonCounter = require("./button-counter");
11
23
 
24
+ var _iconButton = _interopRequireDefault(require("./icon-button"));
25
+
26
+ var _buttonLink = _interopRequireDefault(require("./button-link"));
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+
12
30
  const NewButton = Object.assign(_button.Button, {
13
31
  Counter: _buttonCounter.Counter
14
32
  });
@@ -0,0 +1,202 @@
1
+ import { VariantType } from './types';
2
+ import { Theme } from '../ThemeProvider';
3
+ export declare const TEXT_ROW_HEIGHT = "20px";
4
+ export declare const getVariantStyles: (variant?: VariantType, theme?: Theme | undefined) => {
5
+ color: string;
6
+ backgroundColor: string;
7
+ boxShadow: string;
8
+ '&:hover:not([disabled])': {
9
+ backgroundColor: string;
10
+ };
11
+ '&:focus:not([disabled])': {
12
+ boxShadow: string;
13
+ };
14
+ '&:active:not([disabled])': {
15
+ backgroundColor: string;
16
+ boxShadow: string;
17
+ };
18
+ '&:disabled': {
19
+ color: string;
20
+ backgroundColor: string;
21
+ };
22
+ } | {
23
+ color: string;
24
+ backgroundColor: string;
25
+ borderColor: string;
26
+ boxShadow: string;
27
+ '&:hover:not([disabled])': {
28
+ color: string;
29
+ backgroundColor: string;
30
+ };
31
+ '&:focus:not([disabled])': {
32
+ boxShadow: string;
33
+ };
34
+ '&:active:not([disabled])': {
35
+ backgroundColor: string;
36
+ boxShadow: string;
37
+ };
38
+ '&:disabled': {
39
+ color: string;
40
+ backgroundColor: string;
41
+ };
42
+ '[data-component="ButtonCounter"]': {
43
+ backgroundColor: string;
44
+ color: string;
45
+ };
46
+ } | {
47
+ color: string;
48
+ backgroundColor: string;
49
+ boxShadow: string;
50
+ '&:hover:not([disabled])': {
51
+ color: string;
52
+ backgroundColor: string;
53
+ borderColor: string;
54
+ boxShadow: string;
55
+ '[data-component="ButtonCounter"]': {
56
+ backgroundColor: string;
57
+ color: string;
58
+ };
59
+ };
60
+ '&:focus:not([disabled])': {
61
+ borderColor: string;
62
+ boxShadow: string;
63
+ };
64
+ '&:active:not([disabled])': {
65
+ color: string;
66
+ backgroundColor: string;
67
+ boxShadow: string;
68
+ borderColor: string;
69
+ };
70
+ '&:disabled': {
71
+ color: string;
72
+ backgroundColor: string;
73
+ borderColor: string;
74
+ '[data-component="ButtonCounter"]': {
75
+ backgroundColor: string;
76
+ };
77
+ };
78
+ '[data-component="ButtonCounter"]': {
79
+ color: string;
80
+ backgroundColor: string;
81
+ };
82
+ } | {
83
+ color: string;
84
+ backgroundColor: string;
85
+ border: string;
86
+ boxShadow: string;
87
+ '&:hover:not([disabled])': {
88
+ backgroundColor: string;
89
+ };
90
+ '&:focus:not([disabled])': {
91
+ boxShadow: string;
92
+ };
93
+ '&:active:not([disabled])': {
94
+ backgroundColor: string;
95
+ };
96
+ '&:disabled': {
97
+ color: string;
98
+ };
99
+ } | {
100
+ color: string;
101
+ boxShadow: string;
102
+ '&:hover': {
103
+ color: string;
104
+ backgroundColor: string;
105
+ borderColor: string;
106
+ boxShadow: string;
107
+ '[data-component="ButtonCounter"]': {
108
+ backgroundColor: string;
109
+ color: string;
110
+ };
111
+ };
112
+ '&:focus': {
113
+ borderColor: string;
114
+ boxShadow: string;
115
+ };
116
+ '&:active:not([disabled])': {
117
+ color: string;
118
+ backgroundColor: string;
119
+ boxShadow: string;
120
+ borderColor: string;
121
+ };
122
+ '&:disabled': {
123
+ color: string;
124
+ backgroundColor: string;
125
+ borderColor: string;
126
+ '[data-component="ButtonCounter"]': {
127
+ backgroundColor: string;
128
+ };
129
+ };
130
+ '[data-component="ButtonCounter"]': {
131
+ backgroundColor: string;
132
+ color: string;
133
+ };
134
+ };
135
+ export declare const getSizeStyles: (size: string | undefined, variant: VariantType | undefined, iconOnly: boolean) => {
136
+ paddingY: string;
137
+ paddingX: string;
138
+ fontSize: number;
139
+ '[data-component="ButtonCounter"]': {
140
+ fontSize: number;
141
+ };
142
+ };
143
+ export declare const getBaseStyles: (theme?: Theme | undefined) => {
144
+ borderRadius: string;
145
+ border: string;
146
+ borderColor: any;
147
+ fontWeight: string;
148
+ lineHeight: string;
149
+ whiteSpace: string;
150
+ verticalAlign: string;
151
+ cursor: string;
152
+ appearance: string;
153
+ userSelect: string;
154
+ textDecoration: string;
155
+ textAlign: string;
156
+ '&:focus': {
157
+ outline: string;
158
+ };
159
+ '&:disabled': {
160
+ cursor: string;
161
+ };
162
+ '&:disabled svg': {
163
+ opacity: string;
164
+ };
165
+ };
166
+ export declare const getButtonStyles: (theme?: Theme | undefined) => {
167
+ display: string;
168
+ gridTemplateAreas: string;
169
+ '& > :not(:last-child)': {
170
+ mr: string;
171
+ };
172
+ '[data-component="leadingIcon"]': {
173
+ gridArea: string;
174
+ };
175
+ '[data-component="text"]': {
176
+ gridArea: string;
177
+ };
178
+ '[data-component="trailingIcon"]': {
179
+ gridArea: string;
180
+ };
181
+ borderRadius: string;
182
+ border: string;
183
+ borderColor: any;
184
+ fontWeight: string;
185
+ lineHeight: string;
186
+ whiteSpace: string;
187
+ verticalAlign: string;
188
+ cursor: string;
189
+ appearance: string;
190
+ userSelect: string;
191
+ textDecoration: string;
192
+ textAlign: string;
193
+ '&:focus': {
194
+ outline: string;
195
+ };
196
+ '&:disabled': {
197
+ cursor: string;
198
+ };
199
+ '&:disabled svg': {
200
+ opacity: string;
201
+ };
202
+ };