@zendeskgarden/react-buttons 9.0.0-next.2 → 9.0.0-next.20
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/README.md +0 -27
- package/dist/esm/elements/Anchor.js +57 -0
- package/dist/esm/elements/Button.js +50 -0
- package/dist/esm/elements/ChevronButton.js +27 -0
- package/dist/esm/elements/IconButton.js +50 -0
- package/dist/esm/elements/SplitButton.js +29 -0
- package/dist/esm/elements/ToggleButton.js +30 -0
- package/dist/esm/elements/ToggleIconButton.js +32 -0
- package/dist/esm/elements/components/EndIcon.js +28 -0
- package/dist/esm/elements/components/StartIcon.js +28 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/new-window-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
- package/dist/esm/styled/StyledAnchor.js +27 -0
- package/dist/esm/styled/StyledButton.js +321 -0
- package/dist/esm/styled/StyledExternalIcon.js +23 -0
- package/dist/esm/styled/StyledIcon.js +31 -0
- package/dist/esm/styled/StyledIconButton.js +64 -0
- package/dist/esm/styled/StyledSplitButton.js +22 -0
- package/dist/esm/types/index.js +9 -0
- package/dist/esm/utils/useSplitButtonContext.js +14 -0
- package/dist/index.cjs.js +316 -203
- package/dist/typings/elements/Button.d.ts +1 -7
- package/dist/typings/elements/components/EndIcon.d.ts +1 -1
- package/dist/typings/elements/components/StartIcon.d.ts +1 -1
- package/dist/typings/index.d.ts +2 -3
- package/dist/typings/styled/StyledAnchor.d.ts +1 -8
- package/dist/typings/styled/StyledButton.d.ts +6 -7
- package/dist/typings/styled/StyledIcon.d.ts +4 -4
- package/dist/typings/styled/StyledIconButton.d.ts +2 -5
- package/dist/typings/styled/{StyledButtonGroup.d.ts → StyledSplitButton.d.ts} +1 -1
- package/dist/typings/styled/index.d.ts +3 -3
- package/dist/typings/types/index.d.ts +3 -13
- package/package.json +8 -9
- package/dist/index.esm.js +0 -559
- package/dist/typings/elements/ButtonGroup.d.ts +0 -14
- package/dist/typings/utils/useButtonGroupContext.d.ts +0 -14
package/README.md
CHANGED
|
@@ -57,30 +57,3 @@ const MediaButton = ({ children, ...props }) => {
|
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
59
|
```
|
|
60
|
-
|
|
61
|
-
### Button group
|
|
62
|
-
|
|
63
|
-
```jsx
|
|
64
|
-
import React, { useState } from 'react';
|
|
65
|
-
import { ButtonGroup, Button } from '@zendeskgarden/react-buttons';
|
|
66
|
-
|
|
67
|
-
const MyButtonGroup = ({ children, initialItem, ...props }) => {
|
|
68
|
-
const [selectedItem, setSelectedItem] = useState(initialItem);
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<ButtonGroup
|
|
72
|
-
selectedItem={selectedItem}
|
|
73
|
-
onSelect={selectedItem => setSelectedItem(selectedItem)}
|
|
74
|
-
{...props}
|
|
75
|
-
>
|
|
76
|
-
{children}
|
|
77
|
-
</ButtonGroup>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
<MyButtonGroup initialKey="item-1">
|
|
82
|
-
<Button key="item-1">Item 1</Button>
|
|
83
|
-
<Button key="item-2">Item 2</Button>
|
|
84
|
-
<Button key="item-3">Item 3</Button>
|
|
85
|
-
</MyButtonGroup>;
|
|
86
|
-
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { StyledAnchor } from '../styled/StyledAnchor.js';
|
|
10
|
+
import '../styled/StyledButton.js';
|
|
11
|
+
import '../styled/StyledSplitButton.js';
|
|
12
|
+
import { StyledExternalIcon } from '../styled/StyledExternalIcon.js';
|
|
13
|
+
import '../styled/StyledIcon.js';
|
|
14
|
+
import '../styled/StyledIconButton.js';
|
|
15
|
+
import { useText } from '@zendeskgarden/react-theming';
|
|
16
|
+
|
|
17
|
+
const Anchor = forwardRef((_ref, ref) => {
|
|
18
|
+
let {
|
|
19
|
+
children,
|
|
20
|
+
isExternal,
|
|
21
|
+
externalIconLabel,
|
|
22
|
+
isUnderlined = true,
|
|
23
|
+
...otherProps
|
|
24
|
+
} = _ref;
|
|
25
|
+
let anchorProps = otherProps;
|
|
26
|
+
if (isExternal) {
|
|
27
|
+
anchorProps = {
|
|
28
|
+
target: '_blank',
|
|
29
|
+
rel: 'noopener noreferrer',
|
|
30
|
+
...anchorProps
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const checkProps = isExternal ? {
|
|
34
|
+
externalIconLabel
|
|
35
|
+
} : {
|
|
36
|
+
noIconLabel: 'true'
|
|
37
|
+
};
|
|
38
|
+
const iconAriaLabel = useText(Anchor, checkProps, isExternal ? 'externalIconLabel' : 'noIconLabel', '(opens in a new tab)');
|
|
39
|
+
return React__default.createElement(StyledAnchor, Object.assign({
|
|
40
|
+
ref: ref,
|
|
41
|
+
$isUnderlined: isUnderlined
|
|
42
|
+
}, anchorProps), children, isExternal &&
|
|
43
|
+
React__default.createElement(StyledExternalIcon, {
|
|
44
|
+
role: "img",
|
|
45
|
+
"aria-label": iconAriaLabel,
|
|
46
|
+
"aria-hidden": undefined
|
|
47
|
+
}));
|
|
48
|
+
});
|
|
49
|
+
Anchor.displayName = 'Anchor';
|
|
50
|
+
Anchor.propTypes = {
|
|
51
|
+
isExternal: PropTypes.bool,
|
|
52
|
+
isDanger: PropTypes.bool,
|
|
53
|
+
isUnderlined: PropTypes.bool,
|
|
54
|
+
externalIconLabel: PropTypes.string
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { Anchor };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { SIZE } from '../types/index.js';
|
|
10
|
+
import '../styled/StyledAnchor.js';
|
|
11
|
+
import { StyledButton } from '../styled/StyledButton.js';
|
|
12
|
+
import '../styled/StyledSplitButton.js';
|
|
13
|
+
import '../styled/StyledExternalIcon.js';
|
|
14
|
+
import '../styled/StyledIcon.js';
|
|
15
|
+
import '../styled/StyledIconButton.js';
|
|
16
|
+
import { useSplitButtonContext } from '../utils/useSplitButtonContext.js';
|
|
17
|
+
import { StartIcon } from './components/StartIcon.js';
|
|
18
|
+
import { EndIcon } from './components/EndIcon.js';
|
|
19
|
+
|
|
20
|
+
const ButtonComponent = forwardRef((props, ref) => {
|
|
21
|
+
const splitButtonContext = useSplitButtonContext();
|
|
22
|
+
const computedProps = {
|
|
23
|
+
...props,
|
|
24
|
+
focusInset: props.focusInset || splitButtonContext,
|
|
25
|
+
$isUnderlined: props.isLink
|
|
26
|
+
};
|
|
27
|
+
return React__default.createElement(StyledButton, Object.assign({}, computedProps, {
|
|
28
|
+
ref: ref
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
31
|
+
ButtonComponent.displayName = 'Button';
|
|
32
|
+
ButtonComponent.propTypes = {
|
|
33
|
+
isNeutral: PropTypes.bool,
|
|
34
|
+
isPrimary: PropTypes.bool,
|
|
35
|
+
isDanger: PropTypes.bool,
|
|
36
|
+
isPill: PropTypes.bool,
|
|
37
|
+
isBasic: PropTypes.bool,
|
|
38
|
+
focusInset: PropTypes.bool,
|
|
39
|
+
isLink: PropTypes.bool,
|
|
40
|
+
isStretched: PropTypes.bool,
|
|
41
|
+
size: PropTypes.oneOf(SIZE)
|
|
42
|
+
};
|
|
43
|
+
ButtonComponent.defaultProps = {
|
|
44
|
+
size: 'medium'
|
|
45
|
+
};
|
|
46
|
+
const Button = ButtonComponent;
|
|
47
|
+
Button.EndIcon = EndIcon;
|
|
48
|
+
Button.StartIcon = StartIcon;
|
|
49
|
+
|
|
50
|
+
export { Button };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import { IconButton } from './IconButton.js';
|
|
9
|
+
import SvgChevronDownStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js';
|
|
10
|
+
|
|
11
|
+
const ChevronButton = forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
...buttonProps
|
|
14
|
+
} = _ref;
|
|
15
|
+
return React__default.createElement(IconButton, Object.assign({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, buttonProps), React__default.createElement(SvgChevronDownStroke, null));
|
|
18
|
+
});
|
|
19
|
+
ChevronButton.displayName = 'ChevronButton';
|
|
20
|
+
ChevronButton.propTypes = IconButton.propTypes;
|
|
21
|
+
ChevronButton.defaultProps = {
|
|
22
|
+
isBasic: false,
|
|
23
|
+
isPill: false,
|
|
24
|
+
size: 'medium'
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { ChevronButton };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { SIZE } from '../types/index.js';
|
|
10
|
+
import '../styled/StyledAnchor.js';
|
|
11
|
+
import '../styled/StyledButton.js';
|
|
12
|
+
import '../styled/StyledSplitButton.js';
|
|
13
|
+
import '../styled/StyledExternalIcon.js';
|
|
14
|
+
import { StyledIcon } from '../styled/StyledIcon.js';
|
|
15
|
+
import { StyledIconButton } from '../styled/StyledIconButton.js';
|
|
16
|
+
import { useSplitButtonContext } from '../utils/useSplitButtonContext.js';
|
|
17
|
+
|
|
18
|
+
const IconButton = forwardRef((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
isRotated,
|
|
22
|
+
...otherProps
|
|
23
|
+
} = _ref;
|
|
24
|
+
const focusInset = useSplitButtonContext();
|
|
25
|
+
return React__default.createElement(StyledIconButton, Object.assign({
|
|
26
|
+
ref: ref
|
|
27
|
+
}, otherProps, {
|
|
28
|
+
focusInset: otherProps.focusInset || focusInset
|
|
29
|
+
}), React__default.createElement(StyledIcon, {
|
|
30
|
+
$isRotated: isRotated
|
|
31
|
+
}, children));
|
|
32
|
+
});
|
|
33
|
+
IconButton.displayName = 'IconButton';
|
|
34
|
+
IconButton.propTypes = {
|
|
35
|
+
isDanger: PropTypes.bool,
|
|
36
|
+
size: PropTypes.oneOf(SIZE),
|
|
37
|
+
isNeutral: PropTypes.bool,
|
|
38
|
+
isPrimary: PropTypes.bool,
|
|
39
|
+
isBasic: PropTypes.bool,
|
|
40
|
+
isPill: PropTypes.bool,
|
|
41
|
+
focusInset: PropTypes.bool,
|
|
42
|
+
isRotated: PropTypes.bool
|
|
43
|
+
};
|
|
44
|
+
IconButton.defaultProps = {
|
|
45
|
+
isPill: true,
|
|
46
|
+
isBasic: true,
|
|
47
|
+
size: 'medium'
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { IconButton };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import '../styled/StyledAnchor.js';
|
|
9
|
+
import '../styled/StyledButton.js';
|
|
10
|
+
import { StyledSplitButton } from '../styled/StyledSplitButton.js';
|
|
11
|
+
import '../styled/StyledExternalIcon.js';
|
|
12
|
+
import '../styled/StyledIcon.js';
|
|
13
|
+
import '../styled/StyledIconButton.js';
|
|
14
|
+
import { SplitButtonContext } from '../utils/useSplitButtonContext.js';
|
|
15
|
+
|
|
16
|
+
const SplitButton = forwardRef((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
...other
|
|
20
|
+
} = _ref;
|
|
21
|
+
return React__default.createElement(SplitButtonContext.Provider, {
|
|
22
|
+
value: true
|
|
23
|
+
}, React__default.createElement(StyledSplitButton, Object.assign({
|
|
24
|
+
ref: ref
|
|
25
|
+
}, other), children));
|
|
26
|
+
});
|
|
27
|
+
SplitButton.displayName = 'SplitButton';
|
|
28
|
+
|
|
29
|
+
export { SplitButton };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { Button } from './Button.js';
|
|
10
|
+
|
|
11
|
+
const ToggleButton = forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
isPressed,
|
|
14
|
+
...otherProps
|
|
15
|
+
} = _ref;
|
|
16
|
+
return React__default.createElement(Button, Object.assign({
|
|
17
|
+
"aria-pressed": isPressed,
|
|
18
|
+
ref: ref
|
|
19
|
+
}, otherProps));
|
|
20
|
+
});
|
|
21
|
+
ToggleButton.displayName = 'ToggleButton';
|
|
22
|
+
ToggleButton.propTypes = {
|
|
23
|
+
...Button.propTypes,
|
|
24
|
+
isPressed: PropTypes.oneOf([true, false, 'mixed'])
|
|
25
|
+
};
|
|
26
|
+
ToggleButton.defaultProps = {
|
|
27
|
+
size: 'medium'
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { ToggleButton };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { IconButton } from './IconButton.js';
|
|
10
|
+
|
|
11
|
+
const ToggleIconButton = forwardRef((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
isPressed,
|
|
14
|
+
...otherProps
|
|
15
|
+
} = _ref;
|
|
16
|
+
return React__default.createElement(IconButton, Object.assign({
|
|
17
|
+
"aria-pressed": isPressed,
|
|
18
|
+
ref: ref
|
|
19
|
+
}, otherProps));
|
|
20
|
+
});
|
|
21
|
+
ToggleIconButton.displayName = 'ToggleIconButton';
|
|
22
|
+
ToggleIconButton.propTypes = {
|
|
23
|
+
...IconButton.propTypes,
|
|
24
|
+
isPressed: PropTypes.oneOf([true, false, 'mixed'])
|
|
25
|
+
};
|
|
26
|
+
ToggleIconButton.defaultProps = {
|
|
27
|
+
isPill: true,
|
|
28
|
+
isBasic: true,
|
|
29
|
+
size: 'medium'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { ToggleIconButton };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import '../../styled/StyledAnchor.js';
|
|
9
|
+
import '../../styled/StyledButton.js';
|
|
10
|
+
import '../../styled/StyledSplitButton.js';
|
|
11
|
+
import '../../styled/StyledExternalIcon.js';
|
|
12
|
+
import { StyledIcon } from '../../styled/StyledIcon.js';
|
|
13
|
+
import '../../styled/StyledIconButton.js';
|
|
14
|
+
|
|
15
|
+
const EndIconComponent = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
isRotated,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
return React__default.createElement(StyledIcon, Object.assign({
|
|
21
|
+
$position: "end",
|
|
22
|
+
$isRotated: isRotated
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
EndIconComponent.displayName = 'Button.EndIcon';
|
|
26
|
+
const EndIcon = EndIconComponent;
|
|
27
|
+
|
|
28
|
+
export { EndIcon };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import '../../styled/StyledAnchor.js';
|
|
9
|
+
import '../../styled/StyledButton.js';
|
|
10
|
+
import '../../styled/StyledSplitButton.js';
|
|
11
|
+
import '../../styled/StyledExternalIcon.js';
|
|
12
|
+
import { StyledIcon } from '../../styled/StyledIcon.js';
|
|
13
|
+
import '../../styled/StyledIconButton.js';
|
|
14
|
+
|
|
15
|
+
const StartIconComponent = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
isRotated,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
return React__default.createElement(StyledIcon, Object.assign({
|
|
21
|
+
$position: "start",
|
|
22
|
+
$isRotated: isRotated
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
StartIconComponent.displayName = 'Button.StartIcon';
|
|
26
|
+
const StartIcon = StartIconComponent;
|
|
27
|
+
|
|
28
|
+
export { StartIcon };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export { Button } from './elements/Button.js';
|
|
8
|
+
export { Anchor } from './elements/Anchor.js';
|
|
9
|
+
export { ChevronButton } from './elements/ChevronButton.js';
|
|
10
|
+
export { IconButton } from './elements/IconButton.js';
|
|
11
|
+
export { SplitButton } from './elements/SplitButton.js';
|
|
12
|
+
export { ToggleButton } from './elements/ToggleButton.js';
|
|
13
|
+
export { ToggleIconButton } from './elements/ToggleIconButton.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { return _extends = 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.apply(null, arguments); }
|
|
11
|
+
var SvgNewWindowStroke = function SvgNewWindowStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 12,
|
|
15
|
+
height: 12,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 12 12",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
d: "M10.5 8.5V10c0 .3-.2.5-.5.5H2c-.3 0-.5-.2-.5-.5V2c0-.3.2-.5.5-.5h1.5M6 6l4-4m-3.5-.5H10c.3 0 .5.2.5.5v3.5"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SvgNewWindowStroke as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { return _extends = 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.apply(null, arguments); }
|
|
11
|
+
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
22
|
+
})));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { SvgChevronDownStroke as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledButton } from './StyledButton.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'buttons.anchor';
|
|
12
|
+
const StyledAnchor = styled(StyledButton).attrs(props => ({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '9.0.0-next.20',
|
|
15
|
+
as: 'a',
|
|
16
|
+
dir: props.theme.rtl ? 'rtl' : undefined,
|
|
17
|
+
isLink: true,
|
|
18
|
+
type: undefined
|
|
19
|
+
})).withConfig({
|
|
20
|
+
displayName: "StyledAnchor",
|
|
21
|
+
componentId: "sc-xshgmo-0"
|
|
22
|
+
})(["direction:", ";", ";"], props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(props['data-garden-id'], props));
|
|
23
|
+
StyledAnchor.defaultProps = {
|
|
24
|
+
theme: DEFAULT_THEME
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { StyledAnchor };
|