@synerise/ds-button 1.4.7 → 1.4.8

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,17 @@
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.4.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@1.4.7...@synerise/ds-button@1.4.8) (2025-08-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **button:** add new prop centerLabel ([fb9dcd1](https://github.com/synerise/synerise-design/commit/fb9dcd1bfc6b853e46f8bd1989efaee48f6bc1b3))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.4.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@1.4.6...@synerise/ds-button@1.4.7) (2025-08-14)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-button
package/README.md CHANGED
@@ -88,13 +88,14 @@ Special type of Button, with two states: default and activated (selected). Inher
88
88
 
89
89
  ## Button.Creator
90
90
 
91
- | Property | Description | Type | Default |
92
- | -------- | ------------------------------------------------------ | --------------------------------- | --------- |
93
- | block | Defines if the button should take all available space. | boolean | `false` |
94
- | disabled | Defines if the button is disabled. | boolean | `false` |
95
- | label | Label of the button. | string / React.ReactNode | - |
96
- | onClick | Callback executed after clicking the button | (event: React.MouseEvent) => void | - |
97
- | status | Defines the color of the button. | `upload` / `error`/ `default` | `default` |
91
+ | Property | Description | Type | Default |
92
+ | ------------- | ------------------------------------------------------ | --------------------------------- | --------- |
93
+ | block | Defines if the button should take all available space. | boolean | `false` |
94
+ | disabled | Defines if the button is disabled. | boolean | `false` |
95
+ | label | Label of the button. | string / React.ReactNode | - |
96
+ | onClick | Callback executed after clicking the button | (event: React.MouseEvent) => void | - |
97
+ | status | Defines the color of the button. | `upload` / `error`/ `default` | `default` |
98
+ | labelAlign | Defines label in center or left | `center` / `left` | `center` |
98
99
 
99
100
  ## Button.Expander
100
101
 
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type CreatorProps } from './Creator.types';
3
- declare const Creator: ({ onClick, disabled, label, block, status, className, ...htmlAttributes }: CreatorProps) => React.JSX.Element;
3
+ declare const Creator: ({ onClick, disabled, label, block, status, className, labelAlign, ...htmlAttributes }: CreatorProps) => React.JSX.Element;
4
4
  export default Creator;
@@ -1,4 +1,4 @@
1
- var _excluded = ["onClick", "disabled", "label", "block", "status", "className"];
1
+ var _excluded = ["onClick", "disabled", "label", "block", "status", "className", "labelAlign"];
2
2
  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); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import classnames from 'classnames';
@@ -12,6 +12,8 @@ var Creator = function Creator(_ref) {
12
12
  block = _ref.block,
13
13
  status = _ref.status,
14
14
  className = _ref.className,
15
+ _ref$labelAlign = _ref.labelAlign,
16
+ labelAlign = _ref$labelAlign === void 0 ? 'center' : _ref$labelAlign,
15
17
  htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
16
18
  var _useState = useState(false),
17
19
  pressed = _useState[0],
@@ -24,6 +26,7 @@ var Creator = function Creator(_ref) {
24
26
  }, []);
25
27
  return /*#__PURE__*/React.createElement(S.Creator, _extends({
26
28
  block: block,
29
+ labelAlign: labelAlign,
27
30
  className: classnames([className, 'ds-button-creator']),
28
31
  disabled: disabled,
29
32
  onClick: onClick,
@@ -30,7 +30,7 @@ export var Creator = styled(function (_ref3) {
30
30
  }).withConfig({
31
31
  displayName: "Creatorstyles__Creator",
32
32
  componentId: "sc-1w96u6h-1"
33
- })(["&&&{width:", ";opacity:", ";height:48px;padding:", ";border-radius:3px;border:1px dashed ", ";background:transparent;transition:all 0.3s ease;justify-content:", ";align-items:center;&.ant-btn > span{display:flex;align-items:center;}", "{margin:auto 12px;svg{transition:all 0.3s ease;color:", ";fill:", ";}}", "{background-color:", ";}", "{display:none;}&:hover:not(:disabled){", "{svg{color:", " !important;fill:", " !important;}}", "{color:", ";}}&:hover:not(:disabled):not(:focus){border:1px dashed ", ";background-color:", ";}", " &:focus:active{border:1px dashed ", " !important;box-shadow:none;background-color:", ";}&:focus{border:1px dashed ", ";box-shadow:none;}&:disabled{border-color:", ";background-color:", ";}", " ", "}"], function (props) {
33
+ })(["&&&{width:", ";opacity:", ";height:48px;padding:", ";border-radius:3px;border:1px dashed ", ";background:transparent;transition:all 0.3s ease;justify-content:", ";align-items:center;&.ant-btn{& .ds-button-label{justify-content:", ";}}&.ant-btn > span{display:flex;align-items:center;}", "{margin:auto 12px;svg{transition:all 0.3s ease;color:", ";fill:", ";}}", "{background-color:", ";}", "{display:none;}&:hover:not(:disabled){", "{svg{color:", " !important;fill:", " !important;}}", "{color:", ";}}&:hover:not(:disabled):not(:focus){border:1px dashed ", ";background-color:", ";}", " &:focus:active{border:1px dashed ", " !important;box-shadow:none;background-color:", ";}&:focus{border:1px dashed ", ";box-shadow:none;}&:disabled{border-color:", ";background-color:", ";}", " ", "}"], function (props) {
34
34
  if (!props.withLabel) {
35
35
  return '48px';
36
36
  }
@@ -47,6 +47,8 @@ export var Creator = styled(function (_ref3) {
47
47
  return theme.palette['grey-300'];
48
48
  }, function (props) {
49
49
  return props.withLabel && !props.block ? "flex-start" : 'center';
50
+ }, function (props) {
51
+ return props.labelAlign === 'center' ? 'center' : 'flex-start';
50
52
  }, IconContainer, function (props) {
51
53
  return props.theme.palette['grey-500'];
52
54
  }, function (props) {
@@ -10,6 +10,7 @@ export type CreatorProps = WithHTMLAttributes<HTMLButtonElement, {
10
10
  disabled?: boolean;
11
11
  label?: ReactNode;
12
12
  block?: boolean;
13
+ labelAlign?: 'left' | 'center';
13
14
  status?: CreatorStatus;
14
15
  className?: string;
15
16
  }>;
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import * as ExpanderStyles from './Expander/Expander.styles';
7
7
  import * as StarStyles from './Star/Star.styles';
8
8
  declare class Button extends React.Component<Props> {
9
9
  static readonly Checkbox: (props: import("./Checkbox/Checkbox.types").CheckboxButtonProps) => React.ReactElement;
10
- static readonly Creator: ({ onClick, disabled, label, block, status, className, ...htmlAttributes }: import("./Creator/Creator.types").CreatorProps) => React.JSX.Element;
10
+ static readonly Creator: ({ onClick, disabled, label, block, status, className, labelAlign, ...htmlAttributes }: import("./Creator/Creator.types").CreatorProps) => React.JSX.Element;
11
11
  static readonly Expander: ({ size, expanded, disabled, onClick, className, }: import("./Expander/Expander.types").ExpanderProps) => React.JSX.Element;
12
12
  static readonly Star: (props: import("./Star/Star.types").StarButtonProps) => React.ReactElement;
13
13
  render(): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-button",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "Button UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -47,5 +47,5 @@
47
47
  "react": ">=16.9.0 <= 18.3.1",
48
48
  "styled-components": "^5.3.3"
49
49
  },
50
- "gitHead": "408d73cc145b6c8c61f3e70dce05badf3ad1ffde"
50
+ "gitHead": "2393f96e57ee588efc9b56457389865b272b79fa"
51
51
  }