@synerise/ds-button-group 1.0.4 → 1.0.6
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/CHANGELOG.md +19 -0
- package/dist/ButtonDivider/ButtonDivider.d.ts +3 -0
- package/dist/ButtonDivider/ButtonDivider.js +8 -0
- package/dist/ButtonDivider/ButtonDivider.styles.d.ts +2 -0
- package/dist/ButtonDivider/ButtonDivider.styles.js +8 -0
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.js +3 -0
- package/dist/ButtonGroup.styles.d.ts +1 -0
- package/dist/ButtonGroup.styles.js +5 -1
- package/dist/ButtonGroup.types.d.ts +1 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@1.0.5...@synerise/ds-button-group@1.0.6) (2025-04-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **button-group:** add option for divider buttons group ([fd93162](https://github.com/Synerise/synerise-design/commit/fd93162fba2a04249064b1bc4ac8941b889ada5c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@1.0.4...@synerise/ds-button-group@1.0.5) (2025-04-16)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-button-group
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.0.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@1.0.3...@synerise/ds-button-group@1.0.4) (2025-04-02)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-button-group
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import Divider from '@synerise/ds-divider';
|
|
3
|
+
export var ButtonDivider = styled(Divider).withConfig({
|
|
4
|
+
displayName: "ButtonDividerstyles__ButtonDivider",
|
|
5
|
+
componentId: "sc-1ntx1ba-0"
|
|
6
|
+
})(["border-color:", ";height:auto;margin:0px;top:0;"], function (props) {
|
|
7
|
+
return props.theme.palette['grey-300'];
|
|
8
|
+
});
|
package/dist/ButtonGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonGroupProps } from './ButtonGroup.types';
|
|
3
|
-
declare const ButtonGroup: ({ className, children, title, description, size, fullWidth, buttonsPosition, disabled, splitMode, error, }: ButtonGroupProps) => React.JSX.Element;
|
|
3
|
+
declare const ButtonGroup: ({ className, children, title, description, size, fullWidth, buttonsPosition, disabled, splitMode, compact, error, }: ButtonGroupProps) => React.JSX.Element;
|
|
4
4
|
export default ButtonGroup;
|
package/dist/ButtonGroup.js
CHANGED
|
@@ -12,6 +12,8 @@ var ButtonGroup = function ButtonGroup(_ref) {
|
|
|
12
12
|
buttonsPosition = _ref$buttonsPosition === void 0 ? 'center' : _ref$buttonsPosition,
|
|
13
13
|
disabled = _ref.disabled,
|
|
14
14
|
splitMode = _ref.splitMode,
|
|
15
|
+
_ref$compact = _ref.compact,
|
|
16
|
+
compact = _ref$compact === void 0 ? true : _ref$compact,
|
|
15
17
|
error = _ref.error;
|
|
16
18
|
return /*#__PURE__*/React.createElement(S.Container, {
|
|
17
19
|
className: "ds-button-group " + (className || ''),
|
|
@@ -19,6 +21,7 @@ var ButtonGroup = function ButtonGroup(_ref) {
|
|
|
19
21
|
buttonsPosition: buttonsPosition,
|
|
20
22
|
disabled: disabled,
|
|
21
23
|
splitMode: splitMode,
|
|
24
|
+
compact: compact,
|
|
22
25
|
error: error
|
|
23
26
|
}, title && /*#__PURE__*/React.createElement(S.Title, null, title), /*#__PURE__*/React.createElement(Button.Group, {
|
|
24
27
|
size: size
|
|
@@ -7,6 +7,7 @@ export declare const Container: import("styled-components").StyledComponent<"div
|
|
|
7
7
|
buttonsPosition: string | 'left' | 'center' | 'right';
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
splitMode?: boolean | undefined;
|
|
10
|
+
compact?: boolean | undefined;
|
|
10
11
|
error?: boolean | undefined;
|
|
11
12
|
}, never>;
|
|
12
13
|
export declare const Title: import("styled-components").StyledComponent<"h4", any, {}, never>;
|
|
@@ -11,7 +11,9 @@ export var focusAnimation = function focusAnimation(_ref) {
|
|
|
11
11
|
export var Container = styled.div.withConfig({
|
|
12
12
|
displayName: "ButtonGroupstyles__Container",
|
|
13
13
|
componentId: "sc-1jzk068-0"
|
|
14
|
-
})(["width:100%;.ant-btn-group{width:100%;display:flex;flex-direction:row;align-items:
|
|
14
|
+
})(["width:100%;.ant-btn-group{width:100%;display:flex;gap:", ";flex-direction:row;align-items:stretch;justify-content:", ";", ";", ";& > .ant-btn{width:auto;flex:", ";border-radius:", ";&.ant-btn-primary{&:focus{z-index:99999;}}}}"], function (props) {
|
|
15
|
+
return props.compact ? '0px' : '8px';
|
|
16
|
+
}, function (props) {
|
|
15
17
|
return mapButtonsPosition[props.buttonsPosition];
|
|
16
18
|
}, function (props) {
|
|
17
19
|
return !!props.splitMode && !props.error && css(["*:not(:first-child).ds-button.single-icon,.ds-button.single-icon.ant-btn-custom-color,.ds-button.single-icon.ant-btn-tertiary-white{border-left:1px solid rgba(255,255,255,0.15);&:disabled.ds-button.single-icon{&.ant-btn-tertiary-white{border-left:1px solid rgba(255,255,255,0.2) !important;}&.ant-btn-tertiary{border-left:1px solid rgba(106,117,128,0.1) !important;}&.ant-btn-custom-color{border-left:1px solid rgba(255,255,255,0.8) !important;}&.ant-btn-primary{border-left:1px solid rgba(255,255,255,0.5) !important;}}}*:not(:first-child).ds-button.single-icon.ant-btn-ghost-primary,.ds-button.single-icon.ant-btn-ghost,.ds-button.single-icon.ant-btn-ghost-white,.ds-button.single-icon.ant-btn-secondary{border-left:0px;padding-left:1px;}*:not(:first-child).ds-button.single-icon.ant-btn-tertiary{border-left:1px solid rgba(106,117,128,0.2);}.ds-button.label.ant-btn-tertiary[disabled]{color:", " !important;}&:hover:not(:disabled){*:not(:first-child).ds-button.single-icon{&.ant-btn-tertiary,&.ant-btn-tertiary-white,&.ant-btn-primary,&.ant-btn-custom-color{border-left:transparent !important;}}}.ds-button:focus{&.ant-btn-primary,&.ant-btn-tertiary,&.ant-btn-tertiary-white,&.ant-btn-custom-color{border-color:transparent !important;&:active{border-color:transparent !important;}}}"], props.theme.palette['grey-500']);
|
|
@@ -19,6 +21,8 @@ export var Container = styled.div.withConfig({
|
|
|
19
21
|
return !!props.splitMode && !!props.error && css(["*:not(:first-child).ds-button.single-icon,.ds-button.single-icon.ant-btn-custom-color,.ds-button.single-icon.ant-btn-tertiary-white,.ds-button.single-icon.ant-btn-ghost,.ds-button.single-icon.ant-btn-ghost-white{border-left:1px solid ", ";}.ds-button:focus{&.ant-btn-primary,&.ant-btn-tertiary,&.ant-btn-tertiary-white,&.ant-btn-custom-color,&.ant-btn-ghost-primary,&.ant-btn-ghost-white,&.ant-btn-ghost{border-left:0px;&:active{border-left:0px;}}}*:not(:first-child).ds-button.single-icon.ant-btn-ghost-primary,.ds-button.single-icon.ant-btn-ghost,.ds-button.single-icon.ant-btn-ghost-white,.ds-button.single-icon.ant-btn-secondary,.ds-button.single-icon.ant-btn-tertiary,.ds-button.single-icon.ant-btn-tertiary-white,.ds-button.single-icon.ant-btn-primary,.ds-button.single-icon.ant-btn-custom-color{border-left:0px;padding-left:1px;}.ds-button:hover:not(:focus){&.ant-btn-tertiary,&.ant-btn-ghost,&.ant-btn-tertiary-white,&.ant-btn-ghost-white{box-shadow:inset 0 0 0 1px ", ";}}"], props.theme.palette['red-600'], props.theme.palette['red-600']);
|
|
20
22
|
}, function (props) {
|
|
21
23
|
return props.fullWidth ? '1' : 'none';
|
|
24
|
+
}, function (props) {
|
|
25
|
+
return props.compact ? '0px' : '3px';
|
|
22
26
|
});
|
|
23
27
|
export var Title = styled.h4.withConfig({
|
|
24
28
|
displayName: "ButtonGroupstyles__Title",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-button-group",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Button-Group UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.1.
|
|
37
|
+
"@synerise/ds-button": "^1.1.5",
|
|
38
|
+
"@synerise/ds-divider": "^0.9.6",
|
|
38
39
|
"@synerise/ds-utils": "^1.0.1"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
@@ -43,5 +44,5 @@
|
|
|
43
44
|
"react": ">=16.9.0 <= 18.3.1",
|
|
44
45
|
"styled-components": "^5.3.3"
|
|
45
46
|
},
|
|
46
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "fc601270d3c84a5a52b62473a01f1b3c1c7014a7"
|
|
47
48
|
}
|