@synerise/ds-button 0.18.7 → 0.18.9
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/Checkbox/Checkbox.types.d.ts +1 -0
- package/dist/Creator/Creator.d.ts +1 -2
- package/dist/Creator/Creator.js +5 -3
- package/dist/Creator/Creator.styles.d.ts +1 -1
- package/dist/Creator/Creator.styles.js +6 -5
- package/dist/Creator/Creator.types.d.ts +1 -0
- package/dist/Expander/Expander.d.ts +1 -2
- package/dist/Expander/Expander.js +5 -3
- package/dist/Expander/Expander.types.d.ts +1 -0
- package/dist/Star/Star.types.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/package.json +6 -5
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
|
+
## [0.18.9](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@0.18.8...@synerise/ds-button@0.18.9) (2023-12-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **button:** creator block styles fixed ([2ecef7c](https://github.com/synerise/synerise-design/commit/2ecef7ce5bd12b9b6d3c52b913b66852babfa15d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.18.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@0.18.7...@synerise/ds-button@0.18.8) (2023-12-11)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-button
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.18.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-button@0.18.6...@synerise/ds-button@0.18.7) (2023-10-30)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-button
|
package/dist/Creator/Creator.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
2
3
|
import Icon, { AddM } from '@synerise/ds-icon';
|
|
3
4
|
import * as S from './Creator.styles';
|
|
4
5
|
|
|
@@ -7,7 +8,8 @@ var Creator = function Creator(_ref) {
|
|
|
7
8
|
disabled = _ref.disabled,
|
|
8
9
|
label = _ref.label,
|
|
9
10
|
block = _ref.block,
|
|
10
|
-
status = _ref.status
|
|
11
|
+
status = _ref.status,
|
|
12
|
+
className = _ref.className;
|
|
11
13
|
|
|
12
14
|
var _React$useState = React.useState(false),
|
|
13
15
|
pressed = _React$useState[0],
|
|
@@ -21,7 +23,7 @@ var Creator = function Creator(_ref) {
|
|
|
21
23
|
}, []);
|
|
22
24
|
return /*#__PURE__*/React.createElement(S.Creator, {
|
|
23
25
|
block: block,
|
|
24
|
-
className:
|
|
26
|
+
className: classnames([className, 'ds-button-creator']),
|
|
25
27
|
disabled: disabled,
|
|
26
28
|
onClick: onClick,
|
|
27
29
|
onMouseDown: onPress,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const CreatorLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
|
-
export declare const Creator: import("styled-components").StyledComponent<({ pressed, withLabel, ...rest }: any) => JSX.Element, any, {
|
|
2
|
+
export declare const Creator: import("styled-components").StyledComponent<({ status, pressed, withLabel, ...rest }: any) => JSX.Element, any, {
|
|
3
3
|
withLabel: boolean;
|
|
4
4
|
pressed: boolean;
|
|
5
5
|
status: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["pressed", "withLabel"];
|
|
1
|
+
var _excluded = ["status", "pressed", "withLabel"];
|
|
2
2
|
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
4
|
|
|
@@ -27,7 +27,8 @@ var uploadStyles = function uploadStyles(_ref2) {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export var Creator = styled(function (_ref3) {
|
|
30
|
-
var
|
|
30
|
+
var status = _ref3.status,
|
|
31
|
+
pressed = _ref3.pressed,
|
|
31
32
|
withLabel = _ref3.withLabel,
|
|
32
33
|
rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
|
|
33
34
|
|
|
@@ -35,19 +36,19 @@ export var Creator = styled(function (_ref3) {
|
|
|
35
36
|
}).withConfig({
|
|
36
37
|
displayName: "Creatorstyles__Creator",
|
|
37
38
|
componentId: "sc-1w96u6h-1"
|
|
38
|
-
})(["&&&{width:", ";opacity:", ";height:48px;", "
|
|
39
|
+
})(["&&&{width:", ";opacity:", ";height:48px;padding:", ";border-radius:3px;border:1px dashed ", ";background:transparent;transition:all 0.3s ease;justify-content:", ";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) {
|
|
39
40
|
if (!props.withLabel) return '48px';
|
|
40
41
|
if (props.block) return '100%';
|
|
41
42
|
return 'auto';
|
|
42
43
|
}, function (props) {
|
|
43
44
|
return props.disabled ? "0.4" : '1';
|
|
44
45
|
}, function (props) {
|
|
45
|
-
return props.withLabel
|
|
46
|
+
return props.withLabel ? "0 12px 0 0" : '0';
|
|
46
47
|
}, function (_ref4) {
|
|
47
48
|
var theme = _ref4.theme;
|
|
48
49
|
return theme.palette['grey-400'];
|
|
49
50
|
}, function (props) {
|
|
50
|
-
return props.withLabel ? "flex-start" : 'center';
|
|
51
|
+
return props.withLabel && !props.block ? "flex-start" : 'center';
|
|
51
52
|
}, IconContainer, function (props) {
|
|
52
53
|
return props.theme.palette['grey-500'];
|
|
53
54
|
}, function (props) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
2
3
|
import Icon, { AngleDownS } from '@synerise/ds-icon';
|
|
3
4
|
import * as S from './Expander.styles';
|
|
4
5
|
import { ExpanderSize } from './Expander.types';
|
|
@@ -8,11 +9,12 @@ var Expander = function Expander(_ref) {
|
|
|
8
9
|
size = _ref$size === void 0 ? 'S' : _ref$size,
|
|
9
10
|
expanded = _ref.expanded,
|
|
10
11
|
disabled = _ref.disabled,
|
|
11
|
-
onClick = _ref.onClick
|
|
12
|
+
onClick = _ref.onClick,
|
|
13
|
+
className = _ref.className;
|
|
12
14
|
return /*#__PURE__*/React.createElement(S.Expander, {
|
|
13
15
|
onClick: onClick,
|
|
14
16
|
size: ExpanderSize[size],
|
|
15
|
-
className:
|
|
17
|
+
className: classnames([className, 'ds-expander']),
|
|
16
18
|
expanded: expanded,
|
|
17
19
|
disabled: disabled
|
|
18
20
|
}, /*#__PURE__*/React.createElement(Icon, {
|
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import * as ExpanderStyles from './Expander/Expander.styles';
|
|
|
7
7
|
import * as StarStyles from './Star/Star.styles';
|
|
8
8
|
declare class Button extends React.Component<ButtonProps> {
|
|
9
9
|
static readonly Checkbox: (props: import("./Checkbox/Checkbox.types").CheckboxButtonProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
10
|
-
static readonly Creator:
|
|
11
|
-
static readonly Expander:
|
|
10
|
+
static readonly Creator: ({ onClick, disabled, label, block, status, className }: import("./Creator/Creator.types").CreatorProps) => JSX.Element;
|
|
11
|
+
static readonly Expander: ({ size, expanded, disabled, onClick, className }: import("./Expander/Expander.types").ExpanderProps) => JSX.Element;
|
|
12
12
|
static readonly Star: (props: import("./Star/Star.types").StarButtonProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
13
|
render(): JSX.Element;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-button",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.9",
|
|
4
4
|
"description": "Button UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "npm run build:js && npm run build:css && npm run defs",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
|
-
"build:js": "babel --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
21
|
+
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
22
|
"build:watch": "npm run build:js -- --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "npm pack --pack-destination ../../portal/storybook-static/static",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@synerise/ds-icon": "^0.58.
|
|
36
|
+
"@synerise/ds-icon": "^0.58.9",
|
|
37
|
+
"classnames": "2.3.2"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"@synerise/ds-core": "*",
|
|
@@ -42,9 +43,9 @@
|
|
|
42
43
|
"styled-components": "5.0.1"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@synerise/ds-utils": "^0.24.
|
|
46
|
+
"@synerise/ds-utils": "^0.24.23",
|
|
46
47
|
"@testing-library/react": "10.0.1",
|
|
47
48
|
"csstype": "2.6.9"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "76edb4723a30c59f1a54f666f66fcd814de0af70"
|
|
50
51
|
}
|