@synerise/ds-button-group 2.0.11 → 2.1.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.
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
|
+
## [2.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@2.1.0...@synerise/ds-button-group@2.1.1) (2026-11-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-button-group
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@2.0.11...@synerise/ds-button-group@2.1.0) (2026-10-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* integrate Token Studio design tokens across the design system ([aabb447](https://github.com/Synerise/synerise-design/commit/aabb447edfb2d0c85e3de1f07e809ef84083453b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.11](https://github.com/Synerise/synerise-design/compare/@synerise/ds-button-group@2.0.10...@synerise/ds-button-group@2.0.11) (2026-10-28)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-button-group
|
package/CLAUDE.md
CHANGED
|
@@ -28,8 +28,8 @@ src/
|
|
|
28
28
|
| `buttonsPosition` | `'left' \| 'center' \| 'right'` | `'center'` | Horizontal alignment |
|
|
29
29
|
| `fullWidth` | `boolean` | `undefined` | Container `width: 100%`, buttons `flex: 1` |
|
|
30
30
|
| `compact` | `boolean` | `true` | `true` = zero gap, square middle corners, rounded outer corners; `false` = 8px gap, all corners rounded |
|
|
31
|
-
| `splitMode` | `boolean` | `undefined` | Adds 1px
|
|
32
|
-
| `error` | `boolean` | `undefined` | In `splitMode`, switches borders to
|
|
31
|
+
| `splitMode` | `boolean` | `undefined` | Adds a 1px divider before `single-icon` buttons, coloured like Button `mode="split"` |
|
|
32
|
+
| `error` | `boolean` | `undefined` | In `splitMode`, switches borders to `--ds-buttons-error-border` |
|
|
33
33
|
| `disabled` | `boolean` | `undefined` | CSS-only, suppresses hover effects in splitMode |
|
|
34
34
|
| `className` | `string` | `undefined` | Extra class (always includes `ds-button-group`) |
|
|
35
35
|
|
|
@@ -47,7 +47,7 @@ Zero-props vertical divider. Renders a styled `ds-divider` with `type="vertical"
|
|
|
47
47
|
|
|
48
48
|
- **`compact={true}`** — `gap: 0`, inner buttons `border-radius: 0`, first child gets `3px 0 0 3px`, last child gets `0 3px 3px 0`.
|
|
49
49
|
- **`compact={false}`** — `gap: 8px`, each button `border-radius: 3px`.
|
|
50
|
-
- **`splitMode`** —
|
|
50
|
+
- **`splitMode`** — the divider is `border-left: 1px solid var(--ds-button-split-separator)`, a property each ds-button sets from its type (and `color` for `custom-color`). Secondary keeps its own inset-shadow seam.
|
|
51
51
|
- **`fullWidth`** — outer `width: 100%`, inner buttons `flex: 1`.
|
|
52
52
|
|
|
53
53
|
## Key dependencies
|
|
@@ -59,5 +59,5 @@ Zero-props vertical divider. Renders a styled `ds-divider` with `type="vertical"
|
|
|
59
59
|
|
|
60
60
|
- **No antd dependency** — `Button.Group` replaced with a plain `<div className="ant-btn-group">`.
|
|
61
61
|
- **`compact` corner rounding** — handled by CSS `:first-child` / `:last-child` selectors on the group container. Individual `groupVariant` props on buttons are no longer required for basic groups.
|
|
62
|
-
- **`splitMode`
|
|
62
|
+
- **`splitMode` divider colour comes from the button** — a new button type only needs an entry in ds-button's `splitSeparatorTokens`. The hover/focus and `error` rules still use `.ant-btn-*` selectors.
|
|
63
63
|
- **`disabled` is CSS-only** — not forwarded to child buttons. Disable buttons individually.
|
|
@@ -3,7 +3,7 @@ import Divider from "@synerise/ds-divider";
|
|
|
3
3
|
const ButtonDivider = /* @__PURE__ */ styled(Divider).withConfig({
|
|
4
4
|
displayName: "ButtonDividerstyles__ButtonDivider",
|
|
5
5
|
componentId: "sc-1ntx1ba-0"
|
|
6
|
-
})(["&&{border-color:
|
|
6
|
+
})(["&&{border-color:var(--ds-divider-line-color-solid);height:auto;margin:0px;top:0;}"]);
|
|
7
7
|
export {
|
|
8
8
|
ButtonDivider
|
|
9
9
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { Keyframes } from 'styled-components';
|
|
2
|
-
import { ThemeProps } from '@synerise/ds-core';
|
|
3
1
|
import { LiteralStringUnion } from '@synerise/ds-utils';
|
|
4
|
-
export declare const focusAnimation: ({ theme }: ThemeProps) => Keyframes;
|
|
5
2
|
export declare const Container: import('styled-components').StyledComponent<"div", any, {
|
|
6
3
|
options?: boolean;
|
|
7
4
|
fullWidth?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled, { css
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
const BUTTON_UNIT = ":is(.ant-btn, span:has(> .ant-btn))";
|
|
3
3
|
const FOLLOWED_BY_UNIT = ":has(~ .ant-btn, ~ span > .ant-btn)";
|
|
4
4
|
const getButtonsPosition = (position) => {
|
|
@@ -16,13 +16,10 @@ const getButtonsPosition = (position) => {
|
|
|
16
16
|
return "";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
const focusAnimation = ({
|
|
20
|
-
theme
|
|
21
|
-
}) => keyframes(["0%{box-shadow:inset 0 0 0 1px inherit;}50%{box-shadow:inset 0 0 0 1px ", ";}100%{box-shadow:inset 0 0 0 1px inherit;}"], theme.palette["blue-600"]);
|
|
22
19
|
const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
23
20
|
displayName: "ButtonGroupstyles__Container",
|
|
24
21
|
componentId: "sc-1jzk068-0"
|
|
25
|
-
})(["", ";.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;}}}", "}"], (props) => props.fullWidth ? "width: 100%;" : "", (props) => props.compact ? "0px" : "8px", (props) => getButtonsPosition(props.buttonsPosition), (props) => !!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
|
|
22
|
+
})(["", ";.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;}}}", "}"], (props) => props.fullWidth ? "width: 100%;" : "", (props) => props.compact ? "0px" : "8px", (props) => getButtonsPosition(props.buttonsPosition), (props) => !!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 var(--ds-button-split-separator);}.ds-button.single-icon.ant-btn-secondary{border-left:0px;padding-left:1px;}.ds-button.label.ant-btn-tertiary[disabled]{color:var(--ds-buttons-variant-tertiary-text-disabled) !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) => !!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 var(--ds-buttons-error-border);}.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 var(--ds-buttons-error-border);}}"]), (props) => props.fullWidth ? "1" : "none", (props) => props.compact ? "0px" : "3px", (props) => props.compact && css(["& > ", " ~ .ant-btn,& > ", " ~ span > .ant-btn{margin-left:-1px;}& > .ant-btn,& > span > .ant-btn{border-radius:0;}& > .ant-btn:not(", " ~ *),& > span:has(> .ant-btn):not(", " ~ *) > .ant-btn{border-radius:3px 0 0 3px;}& > .ant-btn:not(", "),& > span:has(> .ant-btn):not(", ") > .ant-btn{border-radius:0 3px 3px 0;}& > .ant-btn:not(", " ~ *):not(", "),& > span:has(> .ant-btn):not(", " ~ *):not( ", " ) > .ant-btn{border-radius:3px;}"], BUTTON_UNIT, BUTTON_UNIT, BUTTON_UNIT, BUTTON_UNIT, FOLLOWED_BY_UNIT, FOLLOWED_BY_UNIT, BUTTON_UNIT, FOLLOWED_BY_UNIT, BUTTON_UNIT, FOLLOWED_BY_UNIT));
|
|
26
23
|
const Title = /* @__PURE__ */ styled.h4.withConfig({
|
|
27
24
|
displayName: "ButtonGroupstyles__Title",
|
|
28
25
|
componentId: "sc-1jzk068-1"
|
|
@@ -30,10 +27,9 @@ const Title = /* @__PURE__ */ styled.h4.withConfig({
|
|
|
30
27
|
const Description = /* @__PURE__ */ styled.p.withConfig({
|
|
31
28
|
displayName: "ButtonGroupstyles__Description",
|
|
32
29
|
componentId: "sc-1jzk068-2"
|
|
33
|
-
})(["margin:8px 0 0;color:
|
|
30
|
+
})(["margin:8px 0 0;color:var(--ds-color-text-base-muted);"]);
|
|
34
31
|
export {
|
|
35
32
|
Container,
|
|
36
33
|
Description,
|
|
37
|
-
Title
|
|
38
|
-
focusAnimation
|
|
34
|
+
Title
|
|
39
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-button-group",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Button-Group UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"types": "dist/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@synerise/ds-button": "^2.1
|
|
43
|
-
"@synerise/ds-divider": "^2.
|
|
44
|
-
"@synerise/ds-utils": "^2.
|
|
42
|
+
"@synerise/ds-button": "^2.2.1",
|
|
43
|
+
"@synerise/ds-divider": "^2.1.1",
|
|
44
|
+
"@synerise/ds-utils": "^2.3.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"vitest": "4"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2d2a540b35fddf8855da45f0dec2f4612c6d87b6"
|
|
55
55
|
}
|