@synerise/ds-button 1.5.15 → 1.5.17

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,14 @@
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.5.17](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@1.5.16...@synerise/ds-button@1.5.17) (2026-03-20)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-button
9
+
10
+ ## [1.5.16](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@1.5.15...@synerise/ds-button@1.5.16) (2026-03-09)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-button
13
+
6
14
  ## [1.5.15](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@1.5.14...@synerise/ds-button@1.5.15) (2026-02-23)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-button
package/README.md CHANGED
@@ -65,9 +65,11 @@ import { AngleDownS } from '@synerise/ds-icon';
65
65
  | mode | Defines the mode of the button content. It affects content inside the button | `single-icon` / `split` / `two-icons` /`label-icon` / `icon-label` | - |
66
66
  | onClick | Callback executed after clicking the button | (event: React.MouseEvent) => void | - |
67
67
  | type | Defines the type of the button. | `primary` / `secondary`/ `tertiary`/ `tertiary-white` / `ghost-primary` / `ghost` / `ghost-white` / `custom-color` / `custom-color-ghost` | `secondary` |
68
- | iconColor | Defines color of `icon` in button. | `green` / `grey` / `yellow` / `blue` / `pink`/ `mars`/ `orange`/ `fern`/ `cyan`/ `purple` / `violet` | `grey` |
68
+ | iconColor | Defines color of `icon` in button. | `green` / `grey` / `yellow` / `blue` / `pink`/ `mars`/ `orange`/ `fern`/ `cyan`/ `purple` / `violet` | - |
69
69
  | error | Defines if the button has error button styles . | boolean | `false` |
70
+ | readOnly | Disables ripple and freezes hover/focus styles (cursor: default). | boolean | - |
70
71
  | tagProps | Renders a status tag next to button label | TagProps see ds-tag | - |
72
+ | tooltipProps | Wraps the button label in a tooltip. | TooltipProps see ds-tooltip | - |
71
73
 
72
74
  ## ButtonToggle
73
75
 
@@ -104,7 +106,7 @@ Special type of Button, with two states: default and activated (selected). Inher
104
106
  | disabled | Defines if the button is disabled. | boolean | `false` |
105
107
  | expanded | The current state of the button. | boolean | `false` |
106
108
  | onClick | Callback executed after clicking the button | (event: React.MouseEvent) => void | - |
107
- | size | Defines the size of the button. | `S` / `M` | `M` |
109
+ | size | Defines the size of the button. | `S` / `M` | `S` |
108
110
 
109
111
  ## Button.Checkbox
110
112
 
@@ -134,3 +136,4 @@ It inherits all `Button`'s props excluding.
134
136
  | Property | Description | Type | Default |
135
137
  | -------- | -------------------------------------------------------- | --------- | ----------- |
136
138
  | active | (optional) Sets checkbox state for controlled component. | `boolean` | `undefined` |
139
+ | hasError | (optional) Changes appearance for wrong validation. | `boolean` | `undefined` |
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,66 @@
1
+ import figma from '@figma/code-connect';
2
+ import Button from './Button';
3
+ import { ButtonMode } from './Button.types';
4
+ var FIGMA_URL = 'https://www.figma.com/design/fsSZONXpVvtrDsCgtu01Jb/Synerise-Design-System?node-id=139:4694&m=dev';
5
+ var typeMapping = figma["enum"]('Variant', {
6
+ Primary: 'primary',
7
+ Secondary: 'secondary',
8
+ Tertiary: 'tertiary',
9
+ 'Tetriary White': 'tertiary-white',
10
+ 'Ghost Primary': 'ghost-primary',
11
+ 'Ghost Secondary': 'ghost',
12
+ 'Ghost Secondary White': 'ghost-white'
13
+ });
14
+ var modeMapping = figma["enum"]('Content Type', {
15
+ Simple: undefined,
16
+ 'Icon left': ButtonMode.ICON_LABEL,
17
+ 'Icon right': ButtonMode.LABEL_ICON,
18
+ 'Icon solo': ButtonMode.SINGLE_ICON,
19
+ '2 icons': ButtonMode.TWO_ICONS,
20
+ Split: ButtonMode.SPLIT
21
+ });
22
+ var sizeMapping = figma["enum"]('Size', {
23
+ Normal: undefined,
24
+ Large: 'large'
25
+ });
26
+ var baseProps = {
27
+ type: typeMapping,
28
+ mode: modeMapping,
29
+ size: sizeMapping,
30
+ label: figma.string('✏️Text')
31
+ };
32
+ figma.connect(Button, FIGMA_URL, {
33
+ variant: {
34
+ State: 'Default'
35
+ },
36
+ props: baseProps,
37
+ example: function example(_ref) {
38
+ var type = _ref.type,
39
+ mode = _ref.mode,
40
+ size = _ref.size,
41
+ label = _ref.label;
42
+ return /*#__PURE__*/React.createElement(Button, {
43
+ type: type,
44
+ mode: mode,
45
+ size: size
46
+ }, label);
47
+ }
48
+ });
49
+ figma.connect(Button, FIGMA_URL, {
50
+ variant: {
51
+ State: 'Disabled'
52
+ },
53
+ props: baseProps,
54
+ example: function example(_ref2) {
55
+ var type = _ref2.type,
56
+ mode = _ref2.mode,
57
+ size = _ref2.size,
58
+ label = _ref2.label;
59
+ return /*#__PURE__*/React.createElement(Button, {
60
+ type: type,
61
+ mode: mode,
62
+ size: size,
63
+ disabled: true
64
+ }, label);
65
+ }
66
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-button",
3
- "version": "1.5.15",
3
+ "version": "1.5.17",
4
4
  "description": "Button UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -23,8 +23,8 @@
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
26
- "test": "vitest",
27
- "test:watch": "pnpm run test -- --watch",
26
+ "test": "vitest run",
27
+ "test:watch": "vitest",
28
28
  "types": "tsc --noEmit",
29
29
  "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
30
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
@@ -35,10 +35,10 @@
35
35
  ],
36
36
  "types": "dist/index.d.ts",
37
37
  "dependencies": {
38
- "@synerise/ds-icon": "^1.14.1",
39
- "@synerise/ds-tag": "^1.4.15",
40
- "@synerise/ds-tooltip": "^1.4.7",
41
- "@synerise/ds-utils": "^1.6.0",
38
+ "@synerise/ds-icon": "^1.15.0",
39
+ "@synerise/ds-tag": "^1.4.17",
40
+ "@synerise/ds-tooltip": "^1.4.9",
41
+ "@synerise/ds-utils": "^1.7.0",
42
42
  "classnames": "^2.5.1",
43
43
  "csstype": "^2.6.9"
44
44
  },
@@ -49,5 +49,5 @@
49
49
  "styled-components": "^5.3.3",
50
50
  "vitest": "4"
51
51
  },
52
- "gitHead": "2997f77d657c1aed2fc39901d3e0b8f88b05cc53"
52
+ "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
53
53
  }