@zendeskgarden/react-buttons 9.4.0 → 9.5.1

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.
@@ -5,13 +5,13 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled from 'styled-components';
8
- import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
8
+ import { componentStyles } from '@zendeskgarden/react-theming';
9
9
  import { StyledButton } from './StyledButton.js';
10
10
 
11
11
  const COMPONENT_ID = 'buttons.anchor';
12
12
  const StyledAnchor = styled(StyledButton).attrs(props => ({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.4.0',
14
+ 'data-garden-version': '9.5.1',
15
15
  as: 'a',
16
16
  dir: props.theme.rtl ? 'rtl' : undefined,
17
17
  $isLink: true,
@@ -19,6 +19,6 @@ const StyledAnchor = styled(StyledButton).attrs(props => ({
19
19
  })).withConfig({
20
20
  displayName: "StyledAnchor",
21
21
  componentId: "sc-xshgmo-0"
22
- })(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(props['data-garden-id'], props));
22
+ })(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', componentStyles);
23
23
 
24
24
  export { StyledAnchor };
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
8
  import { math, em } from 'polished';
9
- import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, getColor, focusStyles, getFocusBoxShadow } from '@zendeskgarden/react-theming';
9
+ import { SELECTOR_FOCUS_VISIBLE, componentStyles, getColor, focusStyles, getFocusBoxShadow } from '@zendeskgarden/react-theming';
10
10
  import { StyledSplitButton } from './StyledSplitButton.js';
11
11
  import { StyledIcon } from './StyledIcon.js';
12
12
 
@@ -308,11 +308,11 @@ const sizeStyles = props => {
308
308
  };
309
309
  const StyledButton = styled.button.attrs(props => ({
310
310
  'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
311
- 'data-garden-version': '9.4.0',
311
+ 'data-garden-version': '9.5.1',
312
312
  type: props.type || 'button'
313
313
  })).withConfig({
314
314
  displayName: "StyledButton",
315
315
  componentId: "sc-qe3ace-0"
316
- })(["display:", ";align-items:", ";justify-content:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;margin:0;border:", ";border-radius:", ";cursor:pointer;width:", ";overflow:hidden;text-decoration:", ";text-overflow:ellipsis;white-space:", ";font-family:inherit;font-weight:", ";-webkit-font-smoothing:subpixel-antialiased;box-sizing:border-box;user-select:", ";-webkit-touch-callout:none;", ";&::-moz-focus-inner{border:0;padding:0;}", "{text-decoration:none;}&:hover{text-decoration:", ";}&:active,&[aria-pressed='true'],&[aria-pressed='mixed']{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out,color 0.1s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;text-decoration:", ";}", ";&:disabled{cursor:default;text-decoration:", ";}& ", "{", "}", " &&{", "}", ""], props => props.$isLink ? 'inline' : 'inline-flex', props => !props.$isLink && 'center', props => !props.$isLink && 'center', props => `${props.$isLink ? `0px solid` : props.theme.borders.sm} transparent`, props => getBorderRadius(props), props => props.$isStretched ? '100%' : '', props => props.$isUnderlined ? 'underline' : 'none', props => !props.$isLink && 'nowrap', props => props.$isLink ? 'inherit' : props.theme.fontWeights.regular, props => !props.$isLink && 'none', props => sizeStyles(props), SELECTOR_FOCUS_VISIBLE, props => props.$isLink ? 'underline' : 'none', props => props.$isLink ? 'underline' : 'none', props => colorStyles(props), props => props.$isLink && 'none', StyledIcon, props => iconStyles(props), StyledSplitButton, props => groupStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
316
+ })(["display:", ";align-items:", ";justify-content:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;margin:0;border:", ";border-radius:", ";cursor:pointer;width:", ";overflow:hidden;text-decoration:", ";text-overflow:ellipsis;white-space:", ";font-family:inherit;font-weight:", ";-webkit-font-smoothing:subpixel-antialiased;box-sizing:border-box;user-select:", ";-webkit-touch-callout:none;", ";&::-moz-focus-inner{border:0;padding:0;}", "{text-decoration:none;}&:hover{text-decoration:", ";}&:active,&[aria-pressed='true'],&[aria-pressed='mixed']{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out,color 0.1s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;text-decoration:", ";}", ";&:disabled{cursor:default;text-decoration:", ";}& ", "{", "}", " &&{", "}", ""], props => props.$isLink ? 'inline' : 'inline-flex', props => !props.$isLink && 'center', props => !props.$isLink && 'center', props => `${props.$isLink ? `0px solid` : props.theme.borders.sm} transparent`, props => getBorderRadius(props), props => props.$isStretched ? '100%' : '', props => props.$isUnderlined ? 'underline' : 'none', props => !props.$isLink && 'nowrap', props => props.$isLink ? 'inherit' : props.theme.fontWeights.regular, props => !props.$isLink && 'none', props => sizeStyles(props), SELECTOR_FOCUS_VISIBLE, props => props.$isLink ? 'underline' : 'none', props => props.$isLink ? 'underline' : 'none', props => colorStyles(props), props => props.$isLink && 'none', StyledIcon, props => iconStyles(props), StyledSplitButton, props => groupStyles(props), componentStyles);
317
317
 
318
318
  export { COMPONENT_ID, StyledButton, getHeight };
@@ -6,15 +6,15 @@
6
6
  */
7
7
  import styled from 'styled-components';
8
8
  import SvgNewWindowStroke from '../node_modules/@zendeskgarden/svg-icons/src/12/new-window-stroke.svg.js';
9
- import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
9
+ import { componentStyles } from '@zendeskgarden/react-theming';
10
10
 
11
11
  const COMPONENT_ID = 'buttons.external_icon';
12
12
  const StyledExternalIcon = styled(SvgNewWindowStroke).attrs({
13
13
  'data-garden-id': COMPONENT_ID,
14
- 'data-garden-version': '9.4.0'
14
+ 'data-garden-version': '9.5.1'
15
15
  }).withConfig({
16
16
  displayName: "StyledExternalIcon",
17
17
  componentId: "sc-16oz07e-0"
18
- })(["transform:", ";margin-bottom:-0.085em;padding-left:0.25em;box-sizing:content-box;width:0.85em;height:0.85em;", ";"], props => props.theme.rtl && 'scaleX(-1)', props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ })(["transform:", ";margin-bottom:-0.085em;padding-left:0.25em;box-sizing:content-box;width:0.85em;height:0.85em;", ";"], props => props.theme.rtl && 'scaleX(-1)', componentStyles);
19
19
 
20
20
  export { StyledExternalIcon };
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { StyledBaseIcon, retrieveComponentStyles } from '@zendeskgarden/react-theming';
8
+ import { StyledBaseIcon, componentStyles } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const COMPONENT_ID = 'buttons.icon';
11
11
  const sizeStyles = props => {
@@ -19,10 +19,10 @@ const sizeStyles = props => {
19
19
  };
20
20
  const StyledIcon = styled(StyledBaseIcon).attrs({
21
21
  'data-garden-id': COMPONENT_ID,
22
- 'data-garden-version': '9.4.0'
22
+ 'data-garden-version': '9.5.1'
23
23
  }).withConfig({
24
24
  displayName: "StyledIcon",
25
25
  componentId: "sc-19meqgg-0"
26
- })(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => sizeStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
26
+ })(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => sizeStyles(props), componentStyles);
27
27
 
28
28
  export { StyledIcon };
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled, { css } from 'styled-components';
8
- import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
8
+ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
9
9
  import { StyledButton, COMPONENT_ID as COMPONENT_ID$1, getHeight } from './StyledButton.js';
10
10
  import { StyledIcon } from './StyledIcon.js';
11
11
 
@@ -51,11 +51,11 @@ const StyledIconButton = styled(StyledButton).attrs(props => {
51
51
  const externalId = props['data-garden-id'];
52
52
  return {
53
53
  'data-garden-id': externalId && externalId !== COMPONENT_ID$1 ? externalId : COMPONENT_ID,
54
- 'data-garden-version': '9.4.0'
54
+ 'data-garden-version': '9.5.1'
55
55
  };
56
56
  }).withConfig({
57
57
  displayName: "StyledIconButton",
58
58
  componentId: "sc-1t0ughp-0"
59
- })(["", ";& ", "{", "}", ";"], iconButtonStyles, StyledIcon, iconStyles, props => retrieveComponentStyles(props['data-garden-id'], props));
59
+ })(["", ";& ", "{", "}", ";"], iconButtonStyles, StyledIcon, iconStyles, componentStyles);
60
60
 
61
61
  export { COMPONENT_ID, StyledIconButton };
@@ -5,15 +5,15 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import styled from 'styled-components';
8
- import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
8
+ import { componentStyles } from '@zendeskgarden/react-theming';
9
9
 
10
10
  const COMPONENT_ID = 'buttons.button_group_view';
11
11
  const StyledSplitButton = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.4.0'
13
+ 'data-garden-version': '9.5.1'
14
14
  }).withConfig({
15
15
  displayName: "StyledSplitButton",
16
16
  componentId: "sc-1u4v04v-0"
17
- })(["display:inline-flex;position:relative;z-index:0;direction:", ";white-space:nowrap;", ";"], props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(COMPONENT_ID, props));
17
+ })(["display:inline-flex;position:relative;z-index:0;direction:", ";white-space:nowrap;", ";"], props => props.theme.rtl && 'rtl', componentStyles);
18
18
 
19
19
  export { StyledSplitButton };
package/dist/index.cjs.js CHANGED
@@ -41,11 +41,11 @@ const SIZE = ['small', 'medium', 'large'];
41
41
  const COMPONENT_ID$5 = 'buttons.button_group_view';
42
42
  const StyledSplitButton = styled__default.default.div.attrs({
43
43
  'data-garden-id': COMPONENT_ID$5,
44
- 'data-garden-version': '9.4.0'
44
+ 'data-garden-version': '9.5.1'
45
45
  }).withConfig({
46
46
  displayName: "StyledSplitButton",
47
47
  componentId: "sc-1u4v04v-0"
48
- })(["display:inline-flex;position:relative;z-index:0;direction:", ";white-space:nowrap;", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
48
+ })(["display:inline-flex;position:relative;z-index:0;direction:", ";white-space:nowrap;", ";"], props => props.theme.rtl && 'rtl', reactTheming.componentStyles);
49
49
 
50
50
  const COMPONENT_ID$4 = 'buttons.icon';
51
51
  const sizeStyles$1 = props => {
@@ -59,11 +59,11 @@ const sizeStyles$1 = props => {
59
59
  };
60
60
  const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
61
61
  'data-garden-id': COMPONENT_ID$4,
62
- 'data-garden-version': '9.4.0'
62
+ 'data-garden-version': '9.5.1'
63
63
  }).withConfig({
64
64
  displayName: "StyledIcon",
65
65
  componentId: "sc-19meqgg-0"
66
- })(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => sizeStyles$1(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
66
+ })(["transform:", ";transition:transform 0.25s ease-in-out,color 0.25s ease-in-out;", ";", ";"], props => props.$isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => sizeStyles$1(props), reactTheming.componentStyles);
67
67
 
68
68
  const COMPONENT_ID$3 = 'buttons.button';
69
69
  const getBorderRadius = props => {
@@ -363,17 +363,17 @@ const sizeStyles = props => {
363
363
  };
364
364
  const StyledButton = styled__default.default.button.attrs(props => ({
365
365
  'data-garden-id': props['data-garden-id'] || COMPONENT_ID$3,
366
- 'data-garden-version': '9.4.0',
366
+ 'data-garden-version': '9.5.1',
367
367
  type: props.type || 'button'
368
368
  })).withConfig({
369
369
  displayName: "StyledButton",
370
370
  componentId: "sc-qe3ace-0"
371
- })(["display:", ";align-items:", ";justify-content:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;margin:0;border:", ";border-radius:", ";cursor:pointer;width:", ";overflow:hidden;text-decoration:", ";text-overflow:ellipsis;white-space:", ";font-family:inherit;font-weight:", ";-webkit-font-smoothing:subpixel-antialiased;box-sizing:border-box;user-select:", ";-webkit-touch-callout:none;", ";&::-moz-focus-inner{border:0;padding:0;}", "{text-decoration:none;}&:hover{text-decoration:", ";}&:active,&[aria-pressed='true'],&[aria-pressed='mixed']{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out,color 0.1s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;text-decoration:", ";}", ";&:disabled{cursor:default;text-decoration:", ";}& ", "{", "}", " &&{", "}", ""], props => props.$isLink ? 'inline' : 'inline-flex', props => !props.$isLink && 'center', props => !props.$isLink && 'center', props => `${props.$isLink ? `0px solid` : props.theme.borders.sm} transparent`, props => getBorderRadius(props), props => props.$isStretched ? '100%' : '', props => props.$isUnderlined ? 'underline' : 'none', props => !props.$isLink && 'nowrap', props => props.$isLink ? 'inherit' : props.theme.fontWeights.regular, props => !props.$isLink && 'none', props => sizeStyles(props), reactTheming.SELECTOR_FOCUS_VISIBLE, props => props.$isLink ? 'underline' : 'none', props => props.$isLink ? 'underline' : 'none', props => colorStyles(props), props => props.$isLink && 'none', StyledIcon, props => iconStyles$1(props), StyledSplitButton, props => groupStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
371
+ })(["display:", ";align-items:", ";justify-content:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;margin:0;border:", ";border-radius:", ";cursor:pointer;width:", ";overflow:hidden;text-decoration:", ";text-overflow:ellipsis;white-space:", ";font-family:inherit;font-weight:", ";-webkit-font-smoothing:subpixel-antialiased;box-sizing:border-box;user-select:", ";-webkit-touch-callout:none;", ";&::-moz-focus-inner{border:0;padding:0;}", "{text-decoration:none;}&:hover{text-decoration:", ";}&:active,&[aria-pressed='true'],&[aria-pressed='mixed']{transition:border-color 0.1s ease-in-out,background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out,color 0.1s ease-in-out,outline-color 0.1s ease-in-out,z-index 0.25s ease-in-out;text-decoration:", ";}", ";&:disabled{cursor:default;text-decoration:", ";}& ", "{", "}", " &&{", "}", ""], props => props.$isLink ? 'inline' : 'inline-flex', props => !props.$isLink && 'center', props => !props.$isLink && 'center', props => `${props.$isLink ? `0px solid` : props.theme.borders.sm} transparent`, props => getBorderRadius(props), props => props.$isStretched ? '100%' : '', props => props.$isUnderlined ? 'underline' : 'none', props => !props.$isLink && 'nowrap', props => props.$isLink ? 'inherit' : props.theme.fontWeights.regular, props => !props.$isLink && 'none', props => sizeStyles(props), reactTheming.SELECTOR_FOCUS_VISIBLE, props => props.$isLink ? 'underline' : 'none', props => props.$isLink ? 'underline' : 'none', props => colorStyles(props), props => props.$isLink && 'none', StyledIcon, props => iconStyles$1(props), StyledSplitButton, props => groupStyles(props), reactTheming.componentStyles);
372
372
 
373
373
  const COMPONENT_ID$2 = 'buttons.anchor';
374
374
  const StyledAnchor = styled__default.default(StyledButton).attrs(props => ({
375
375
  'data-garden-id': COMPONENT_ID$2,
376
- 'data-garden-version': '9.4.0',
376
+ 'data-garden-version': '9.5.1',
377
377
  as: 'a',
378
378
  dir: props.theme.rtl ? 'rtl' : undefined,
379
379
  $isLink: true,
@@ -381,7 +381,7 @@ const StyledAnchor = styled__default.default(StyledButton).attrs(props => ({
381
381
  })).withConfig({
382
382
  displayName: "StyledAnchor",
383
383
  componentId: "sc-xshgmo-0"
384
- })(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.retrieveComponentStyles(props['data-garden-id'], props));
384
+ })(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', reactTheming.componentStyles);
385
385
 
386
386
  var _path$1;
387
387
  function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
@@ -404,11 +404,11 @@ var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
404
404
  const COMPONENT_ID$1 = 'buttons.external_icon';
405
405
  const StyledExternalIcon = styled__default.default(SvgNewWindowStroke).attrs({
406
406
  'data-garden-id': COMPONENT_ID$1,
407
- 'data-garden-version': '9.4.0'
407
+ 'data-garden-version': '9.5.1'
408
408
  }).withConfig({
409
409
  displayName: "StyledExternalIcon",
410
410
  componentId: "sc-16oz07e-0"
411
- })(["transform:", ";margin-bottom:-0.085em;padding-left:0.25em;box-sizing:content-box;width:0.85em;height:0.85em;", ";"], props => props.theme.rtl && 'scaleX(-1)', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
411
+ })(["transform:", ";margin-bottom:-0.085em;padding-left:0.25em;box-sizing:content-box;width:0.85em;height:0.85em;", ";"], props => props.theme.rtl && 'scaleX(-1)', reactTheming.componentStyles);
412
412
 
413
413
  const COMPONENT_ID = 'buttons.icon_button';
414
414
  const iconColorStyles = _ref => {
@@ -452,12 +452,12 @@ const StyledIconButton = styled__default.default(StyledButton).attrs(props => {
452
452
  const externalId = props['data-garden-id'];
453
453
  return {
454
454
  'data-garden-id': externalId && externalId !== COMPONENT_ID$3 ? externalId : COMPONENT_ID,
455
- 'data-garden-version': '9.4.0'
455
+ 'data-garden-version': '9.5.1'
456
456
  };
457
457
  }).withConfig({
458
458
  displayName: "StyledIconButton",
459
459
  componentId: "sc-1t0ughp-0"
460
- })(["", ";& ", "{", "}", ";"], iconButtonStyles, StyledIcon, iconStyles, props => reactTheming.retrieveComponentStyles(props['data-garden-id'], props));
460
+ })(["", ";& ", "{", "}", ";"], iconButtonStyles, StyledIcon, iconStyles, reactTheming.componentStyles);
461
461
 
462
462
  const SplitButtonContext = React.createContext(undefined);
463
463
  const useSplitButtonContext = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-buttons",
3
- "version": "9.4.0",
3
+ "version": "9.5.1",
4
4
  "description": "Components relating to buttons in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -33,8 +33,8 @@
33
33
  "styled-components": "^5.3.1 || ^6.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@zendeskgarden/react-theming": "^9.4.0",
37
- "@zendeskgarden/svg-icons": "7.3.0"
36
+ "@zendeskgarden/react-theming": "^9.5.1",
37
+ "@zendeskgarden/svg-icons": "7.5.0"
38
38
  },
39
39
  "keywords": [
40
40
  "components",
@@ -46,5 +46,5 @@
46
46
  "access": "public"
47
47
  },
48
48
  "zendeskgarden:src": "src/index.ts",
49
- "gitHead": "02e3f240b6f0c776fdae785254d6fe90cbfc37e4"
49
+ "gitHead": "2571d0225b784bb7c765316ed584d289d35d4605"
50
50
  }