@zendeskgarden/react-buttons 9.0.0-next.11 → 9.0.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/styled/StyledAnchor.js +2 -2
- package/dist/esm/styled/StyledButton.js +3 -3
- package/dist/esm/styled/StyledExternalIcon.js +1 -1
- package/dist/esm/styled/StyledIcon.js +1 -1
- package/dist/esm/styled/StyledIconButton.js +10 -7
- package/dist/esm/styled/StyledSplitButton.js +1 -1
- package/dist/index.cjs.js +15 -12
- package/dist/typings/styled/StyledAnchor.d.ts +1 -8
- package/dist/typings/styled/StyledButton.d.ts +1 -0
- package/dist/typings/styled/StyledIconButton.d.ts +2 -4
- package/dist/typings/styled/index.d.ts +2 -2
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ import { StyledButton } from './StyledButton.js';
|
|
|
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.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.12',
|
|
15
15
|
as: 'a',
|
|
16
16
|
dir: props.theme.rtl ? 'rtl' : undefined,
|
|
17
17
|
isLink: true,
|
|
@@ -19,7 +19,7 @@ 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(
|
|
22
|
+
})(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(props['data-garden-id'], props));
|
|
23
23
|
StyledAnchor.defaultProps = {
|
|
24
24
|
theme: DEFAULT_THEME
|
|
25
25
|
};
|
|
@@ -302,8 +302,8 @@ const sizeStyles = props => {
|
|
|
302
302
|
return retVal;
|
|
303
303
|
};
|
|
304
304
|
const StyledButton = styled.button.attrs(props => ({
|
|
305
|
-
'data-garden-id': COMPONENT_ID,
|
|
306
|
-
'data-garden-version': '9.0.0-next.
|
|
305
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
306
|
+
'data-garden-version': '9.0.0-next.12',
|
|
307
307
|
type: props.type || 'button'
|
|
308
308
|
})).withConfig({
|
|
309
309
|
displayName: "StyledButton",
|
|
@@ -313,4 +313,4 @@ StyledButton.defaultProps = {
|
|
|
313
313
|
theme: DEFAULT_THEME
|
|
314
314
|
};
|
|
315
315
|
|
|
316
|
-
export { StyledButton, getHeight };
|
|
316
|
+
export { COMPONENT_ID, StyledButton, getHeight };
|
|
@@ -11,7 +11,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
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.0.0-next.
|
|
14
|
+
'data-garden-version': '9.0.0-next.12'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledExternalIcon",
|
|
17
17
|
componentId: "sc-16oz07e-0"
|
|
@@ -19,7 +19,7 @@ const sizeStyles = props => {
|
|
|
19
19
|
};
|
|
20
20
|
const StyledIcon = styled(StyledBaseIcon).attrs({
|
|
21
21
|
'data-garden-id': COMPONENT_ID,
|
|
22
|
-
'data-garden-version': '9.0.0-next.
|
|
22
|
+
'data-garden-version': '9.0.0-next.12'
|
|
23
23
|
}).withConfig({
|
|
24
24
|
displayName: "StyledIcon",
|
|
25
25
|
componentId: "sc-19meqgg-0"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
|
|
9
|
-
import { StyledButton, getHeight } from './StyledButton.js';
|
|
9
|
+
import { StyledButton, COMPONENT_ID as COMPONENT_ID$1, getHeight } from './StyledButton.js';
|
|
10
10
|
import { StyledIcon } from './StyledIcon.js';
|
|
11
11
|
|
|
12
12
|
const COMPONENT_ID = 'buttons.icon_button';
|
|
@@ -16,7 +16,7 @@ const iconColorStyles = _ref => {
|
|
|
16
16
|
} = _ref;
|
|
17
17
|
const options = {
|
|
18
18
|
theme,
|
|
19
|
-
variable: 'foreground.
|
|
19
|
+
variable: 'foreground.subtle'
|
|
20
20
|
};
|
|
21
21
|
const baseColor = getColor(options);
|
|
22
22
|
const hoverColor = getColor({
|
|
@@ -47,15 +47,18 @@ const iconStyles = props => {
|
|
|
47
47
|
const size = props.theme.iconSizes.md;
|
|
48
48
|
return css(["width:", ";height:", ";& > svg{transition:opacity 0.15s ease-in-out;}"], size, size);
|
|
49
49
|
};
|
|
50
|
-
const StyledIconButton = styled(StyledButton).attrs({
|
|
51
|
-
'data-garden-id'
|
|
52
|
-
|
|
50
|
+
const StyledIconButton = styled(StyledButton).attrs(props => {
|
|
51
|
+
const externalId = props['data-garden-id'];
|
|
52
|
+
return {
|
|
53
|
+
'data-garden-id': externalId && externalId !== COMPONENT_ID$1 ? externalId : COMPONENT_ID,
|
|
54
|
+
'data-garden-version': '9.0.0-next.12'
|
|
55
|
+
};
|
|
53
56
|
}).withConfig({
|
|
54
57
|
displayName: "StyledIconButton",
|
|
55
58
|
componentId: "sc-1t0ughp-0"
|
|
56
|
-
})(["", ";& ", "{", "}", ";"], props => iconButtonStyles(props), StyledIcon, props => iconStyles(props), props => retrieveComponentStyles(
|
|
59
|
+
})(["", ";& ", "{", "}", ";"], props => iconButtonStyles(props), StyledIcon, props => iconStyles(props), props => retrieveComponentStyles(props['data-garden-id'], props));
|
|
57
60
|
StyledIconButton.defaultProps = {
|
|
58
61
|
theme: DEFAULT_THEME
|
|
59
62
|
};
|
|
60
63
|
|
|
61
|
-
export { StyledIconButton };
|
|
64
|
+
export { COMPONENT_ID, StyledIconButton };
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
|
|
|
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.0.0-next.
|
|
13
|
+
'data-garden-version': '9.0.0-next.12'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSplitButton",
|
|
16
16
|
componentId: "sc-1u4v04v-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ 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.0.0-next.
|
|
44
|
+
'data-garden-version': '9.0.0-next.12'
|
|
45
45
|
}).withConfig({
|
|
46
46
|
displayName: "StyledSplitButton",
|
|
47
47
|
componentId: "sc-1u4v04v-0"
|
|
@@ -62,7 +62,7 @@ const sizeStyles$1 = props => {
|
|
|
62
62
|
};
|
|
63
63
|
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
64
64
|
'data-garden-id': COMPONENT_ID$4,
|
|
65
|
-
'data-garden-version': '9.0.0-next.
|
|
65
|
+
'data-garden-version': '9.0.0-next.12'
|
|
66
66
|
}).withConfig({
|
|
67
67
|
displayName: "StyledIcon",
|
|
68
68
|
componentId: "sc-19meqgg-0"
|
|
@@ -363,8 +363,8 @@ const sizeStyles = props => {
|
|
|
363
363
|
return retVal;
|
|
364
364
|
};
|
|
365
365
|
const StyledButton = styled__default.default.button.attrs(props => ({
|
|
366
|
-
'data-garden-id': COMPONENT_ID$3,
|
|
367
|
-
'data-garden-version': '9.0.0-next.
|
|
366
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID$3,
|
|
367
|
+
'data-garden-version': '9.0.0-next.12',
|
|
368
368
|
type: props.type || 'button'
|
|
369
369
|
})).withConfig({
|
|
370
370
|
displayName: "StyledButton",
|
|
@@ -377,7 +377,7 @@ StyledButton.defaultProps = {
|
|
|
377
377
|
const COMPONENT_ID$2 = 'buttons.anchor';
|
|
378
378
|
const StyledAnchor = styled__default.default(StyledButton).attrs(props => ({
|
|
379
379
|
'data-garden-id': COMPONENT_ID$2,
|
|
380
|
-
'data-garden-version': '9.0.0-next.
|
|
380
|
+
'data-garden-version': '9.0.0-next.12',
|
|
381
381
|
as: 'a',
|
|
382
382
|
dir: props.theme.rtl ? 'rtl' : undefined,
|
|
383
383
|
isLink: true,
|
|
@@ -385,7 +385,7 @@ const StyledAnchor = styled__default.default(StyledButton).attrs(props => ({
|
|
|
385
385
|
})).withConfig({
|
|
386
386
|
displayName: "StyledAnchor",
|
|
387
387
|
componentId: "sc-xshgmo-0"
|
|
388
|
-
})(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.retrieveComponentStyles(
|
|
388
|
+
})(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => reactTheming.retrieveComponentStyles(props['data-garden-id'], props));
|
|
389
389
|
StyledAnchor.defaultProps = {
|
|
390
390
|
theme: reactTheming.DEFAULT_THEME
|
|
391
391
|
};
|
|
@@ -411,7 +411,7 @@ var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
|
|
|
411
411
|
const COMPONENT_ID$1 = 'buttons.external_icon';
|
|
412
412
|
const StyledExternalIcon = styled__default.default(SvgNewWindowStroke).attrs({
|
|
413
413
|
'data-garden-id': COMPONENT_ID$1,
|
|
414
|
-
'data-garden-version': '9.0.0-next.
|
|
414
|
+
'data-garden-version': '9.0.0-next.12'
|
|
415
415
|
}).withConfig({
|
|
416
416
|
displayName: "StyledExternalIcon",
|
|
417
417
|
componentId: "sc-16oz07e-0"
|
|
@@ -427,7 +427,7 @@ const iconColorStyles = _ref => {
|
|
|
427
427
|
} = _ref;
|
|
428
428
|
const options = {
|
|
429
429
|
theme,
|
|
430
|
-
variable: 'foreground.
|
|
430
|
+
variable: 'foreground.subtle'
|
|
431
431
|
};
|
|
432
432
|
const baseColor = reactTheming.getColor(options);
|
|
433
433
|
const hoverColor = reactTheming.getColor({
|
|
@@ -458,13 +458,16 @@ const iconStyles = props => {
|
|
|
458
458
|
const size = props.theme.iconSizes.md;
|
|
459
459
|
return styled.css(["width:", ";height:", ";& > svg{transition:opacity 0.15s ease-in-out;}"], size, size);
|
|
460
460
|
};
|
|
461
|
-
const StyledIconButton = styled__default.default(StyledButton).attrs({
|
|
462
|
-
'data-garden-id'
|
|
463
|
-
|
|
461
|
+
const StyledIconButton = styled__default.default(StyledButton).attrs(props => {
|
|
462
|
+
const externalId = props['data-garden-id'];
|
|
463
|
+
return {
|
|
464
|
+
'data-garden-id': externalId && externalId !== COMPONENT_ID$3 ? externalId : COMPONENT_ID,
|
|
465
|
+
'data-garden-version': '9.0.0-next.12'
|
|
466
|
+
};
|
|
464
467
|
}).withConfig({
|
|
465
468
|
displayName: "StyledIconButton",
|
|
466
469
|
componentId: "sc-1t0ughp-0"
|
|
467
|
-
})(["", ";& ", "{", "}", ";"], props => iconButtonStyles(props), StyledIcon, props => iconStyles(props), props => reactTheming.retrieveComponentStyles(
|
|
470
|
+
})(["", ";& ", "{", "}", ";"], props => iconButtonStyles(props), StyledIcon, props => iconStyles(props), props => reactTheming.retrieveComponentStyles(props['data-garden-id'], props));
|
|
468
471
|
StyledIconButton.defaultProps = {
|
|
469
472
|
theme: reactTheming.DEFAULT_THEME
|
|
470
473
|
};
|
|
@@ -7,11 +7,4 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Accepts all `<a>` props
|
|
9
9
|
*/
|
|
10
|
-
export declare const StyledAnchor: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("
|
|
11
|
-
'data-garden-id': string;
|
|
12
|
-
'data-garden-version': string;
|
|
13
|
-
as: string;
|
|
14
|
-
dir: "rtl" | undefined;
|
|
15
|
-
isLink: boolean;
|
|
16
|
-
type: undefined;
|
|
17
|
-
}, "type" | "dir" | "as" | "data-garden-id" | "data-garden-version" | "isLink">;
|
|
10
|
+
export declare const StyledAnchor: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("./../types").IButtonProps, never>;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
8
|
import { IButtonProps } from '../types';
|
|
9
|
+
export declare const COMPONENT_ID = "buttons.button";
|
|
9
10
|
export declare const getHeight: (props: IButtonProps & ThemeProps<DefaultTheme>) => string;
|
|
10
11
|
/**
|
|
11
12
|
* 1. FF <input type="submit"> fix
|
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
import { IButtonProps } from '../types';
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
'data-garden-version': string;
|
|
12
|
-
} & IButtonProps, "data-garden-id" | "data-garden-version">;
|
|
9
|
+
export declare const COMPONENT_ID = "buttons.icon_button";
|
|
10
|
+
export declare const StyledIconButton: import("styled-components").StyledComponent<"button", DefaultTheme, IButtonProps, never>;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
export * from './StyledAnchor';
|
|
8
|
-
export
|
|
8
|
+
export { StyledButton } from './StyledButton';
|
|
9
9
|
export * from './StyledSplitButton';
|
|
10
10
|
export * from './StyledExternalIcon';
|
|
11
11
|
export * from './StyledIcon';
|
|
12
|
-
export
|
|
12
|
+
export { StyledIconButton } from './StyledIconButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-buttons",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.12",
|
|
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,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^5.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.12",
|
|
37
37
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
38
38
|
},
|
|
39
39
|
"keywords": [
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"zendeskgarden:src": "src/index.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "7925ff78236795111e2953efbce549839df3a86d"
|
|
50
50
|
}
|