@synerise/ds-button 1.5.17 → 1.5.18
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 +4 -0
- package/dist/Button.d.ts +11 -13
- package/dist/Button.figma.js +39 -49
- package/dist/Button.js +72 -96
- package/dist/Button.styles.d.ts +14 -14
- package/dist/Button.styles.js +56 -105
- package/dist/Button.types.d.ts +7 -7
- package/dist/Button.types.js +11 -10
- package/dist/ButtonToggle/ButtonToggle.d.ts +2 -2
- package/dist/ButtonToggle/ButtonToggle.js +21 -25
- package/dist/ButtonToggle/ButtonToggle.styles.d.ts +2 -2
- package/dist/ButtonToggle/ButtonToggle.styles.js +14 -14
- package/dist/ButtonToggle/ButtonToggle.types.d.ts +1 -1
- package/dist/ButtonToggle/ButtonToggle.types.js +1 -1
- package/dist/Checkbox/Checkbox.d.ts +2 -2
- package/dist/Checkbox/Checkbox.js +43 -55
- package/dist/Checkbox/Checkbox.styles.d.ts +4 -4
- package/dist/Checkbox/Checkbox.styles.js +37 -33
- package/dist/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/Checkbox/Checkbox.types.js +1 -1
- package/dist/Creator/Creator.d.ts +2 -2
- package/dist/Creator/Creator.js +25 -41
- package/dist/Creator/Creator.styles.d.ts +3 -25
- package/dist/Creator/Creator.styles.js +37 -81
- package/dist/Creator/Creator.types.d.ts +2 -2
- package/dist/Creator/Creator.types.js +9 -6
- package/dist/Expander/Expander.d.ts +2 -2
- package/dist/Expander/Expander.js +16 -22
- package/dist/Expander/Expander.styles.d.ts +4 -4
- package/dist/Expander/Expander.styles.js +19 -38
- package/dist/Expander/Expander.types.js +8 -5
- package/dist/Star/Star.d.ts +2 -2
- package/dist/Star/Star.js +17 -29
- package/dist/Star/Star.styles.d.ts +2 -2
- package/dist/Star/Star.styles.js +25 -24
- package/dist/Star/Star.types.d.ts +1 -1
- package/dist/Star/Star.types.js +1 -1
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +34 -24
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +8 -8
package/dist/Star/Star.styles.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const IconWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
3
3
|
displayName: "Starstyles__IconWrapper",
|
|
4
4
|
componentId: "sc-k1qcv4-0"
|
|
5
|
-
})(["&&&& svg{fill:", ";}.ant-btn-ghost[disabled] & .ds-icon svg{fill:", " !important;}.ant-btn-ghost:hover & .ds-icon svg,.ant-btn-ghost:focus:hover & .ds-icon svg{fill:", ";}.ant-btn-ghost &::before{clip-path:path( 'M 19.606 9.598 l -4.794 -0.686 l -2.141 -4.276 a 0.781 0.781 0 0 0 -1.342 0 L 9.187 8.912 l -4.793 0.686 a 0.75 0.75 0 0 0 -0.414 1.284 l 3.462 3.325 l -0.817 4.691 a 0.751 0.751 0 0 0 0.74 0.88 a 0.742 0.742 0 0 0 0.344 -0.085 L 12 17.472 l 4.29 2.221 a 0.75 0.75 0 0 0 1.084 -0.795 l -0.816 -4.691 l 3.462 -3.325 a 0.75 0.75 0 0 0 -0.414 -1.284 z z' );content:'';position:absolute;bottom:0;left:0;right:0;top:0;margin:0;z-index:-1;}.ant-btn-ghost[disabled] &:before{background:", ";}.ant-btn-ghost &::before,.ant-btn-ghost:hover &:before,.ant-btn-ghost:focus:hover &:before{background:", ";}"],
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
})(["&&&& svg{fill:", ";}.ant-btn-ghost[disabled] & .ds-icon svg{fill:", " !important;}.ant-btn-ghost:hover & .ds-icon svg,.ant-btn-ghost:focus:hover & .ds-icon svg{fill:", ";}.ant-btn-ghost &::before{clip-path:path( 'M 19.606 9.598 l -4.794 -0.686 l -2.141 -4.276 a 0.781 0.781 0 0 0 -1.342 0 L 9.187 8.912 l -4.793 0.686 a 0.75 0.75 0 0 0 -0.414 1.284 l 3.462 3.325 l -0.817 4.691 a 0.751 0.751 0 0 0 0.74 0.88 a 0.742 0.742 0 0 0 0.344 -0.085 L 12 17.472 l 4.29 2.221 a 0.75 0.75 0 0 0 1.084 -0.795 l -0.816 -4.691 l 3.462 -3.325 a 0.75 0.75 0 0 0 -0.414 -1.284 z z' );content:'';position:absolute;bottom:0;left:0;right:0;top:0;margin:0;z-index:-1;}.ant-btn-ghost[disabled] &:before{background:", ";}.ant-btn-ghost &::before,.ant-btn-ghost:hover &:before,.ant-btn-ghost:focus:hover &:before{background:", ";}"], ({
|
|
6
|
+
theme,
|
|
7
|
+
active,
|
|
8
|
+
error
|
|
9
|
+
}) => {
|
|
9
10
|
if (error) {
|
|
10
|
-
return theme.palette[
|
|
11
|
+
return theme.palette["red-600"];
|
|
11
12
|
}
|
|
12
|
-
return active ? theme.palette[
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
13
|
+
return active ? theme.palette["yellow-600"] : theme.palette["grey-300"];
|
|
14
|
+
}, ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.palette["grey-200"], ({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.palette["blue-600"], ({
|
|
19
|
+
theme
|
|
20
|
+
}) => theme.palette["grey-050"], ({
|
|
21
|
+
theme
|
|
22
|
+
}) => theme.palette.white);
|
|
23
|
+
const Star_styles = {
|
|
24
|
+
IconWrapper
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
IconWrapper,
|
|
28
|
+
Star_styles as default
|
|
29
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Props as ButtonProps } from '../Button.types';
|
|
2
2
|
type ButtonPropsOmitted = Omit<ButtonProps, 'type' | 'block' | 'color' | 'groupVariant' | 'icon' | 'iconColor' | 'mode' | 'size' | 'onChange'>;
|
|
3
3
|
export type StarButtonProps = ButtonPropsOmitted & {
|
|
4
4
|
active?: boolean;
|
package/dist/Star/Star.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { default as CheckboxButton } from './Checkbox/Checkbox';
|
|
2
|
+
import { default as Creator } from './Creator/Creator';
|
|
3
|
+
import { default as Expander } from './Expander/Expander';
|
|
4
|
+
import { default as StarButton } from './Star/Star';
|
|
1
5
|
import * as MainButtonStyles from './Button.styles';
|
|
2
|
-
import CheckboxButton from './Checkbox/Checkbox';
|
|
3
6
|
import * as CheckboxStyles from './Checkbox/Checkbox.styles';
|
|
4
|
-
import Creator from './Creator/Creator';
|
|
5
7
|
import * as CreatorStyles from './Creator/Creator.styles';
|
|
6
|
-
import Expander from './Expander/Expander';
|
|
7
8
|
import * as ExpanderStyles from './Expander/Expander.styles';
|
|
8
|
-
import StarButton from './Star/Star';
|
|
9
9
|
import * as StarStyles from './Star/Star.styles';
|
|
10
10
|
export { Expander, Creator, StarButton as Star, CheckboxButton as Checkbox };
|
|
11
11
|
export { default as ButtonToggle } from './ButtonToggle/ButtonToggle';
|
|
@@ -22,36 +22,36 @@ export declare const ButtonStyles: {
|
|
|
22
22
|
Expander: typeof ExpanderStyles;
|
|
23
23
|
Star: typeof StarStyles;
|
|
24
24
|
};
|
|
25
|
-
declare const _default: import(
|
|
25
|
+
declare const _default: import('react').ForwardRefExoticComponent<Omit<Partial<{
|
|
26
26
|
href: string;
|
|
27
27
|
target?: string;
|
|
28
28
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
29
|
-
} & import(
|
|
30
|
-
htmlType?: import(
|
|
29
|
+
} & import('antd/lib/button/button').BaseButtonProps & Omit<import('react').AnchorHTMLAttributes<any>, "type" | "onClick"> & {
|
|
30
|
+
htmlType?: import('antd/lib/button/button').ButtonHTMLType;
|
|
31
31
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
32
|
-
} & Omit<import(
|
|
33
|
-
type?: import(
|
|
34
|
-
mode?: import(
|
|
35
|
-
color?: import(
|
|
36
|
-
groupVariant?: import(
|
|
37
|
-
justifyContent?: import(
|
|
32
|
+
} & Omit<import('react').ButtonHTMLAttributes<any>, "type" | "onClick">>, "ghost" | "type"> & {
|
|
33
|
+
type?: import('@synerise/ds-utils').LiteralStringUnion<import('./Button.types').ButtonType>;
|
|
34
|
+
mode?: import('@synerise/ds-utils').LiteralStringUnion<"single-icon" | "split" | "two-icons" | "label-icon" | "icon-label">;
|
|
35
|
+
color?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
36
|
+
groupVariant?: import('@synerise/ds-utils').LiteralStringUnion<"left-rounded" | "squared" | "right-rounded">;
|
|
37
|
+
justifyContent?: import('csstype').JustifyContentProperty;
|
|
38
38
|
loading?: boolean | {
|
|
39
39
|
delay?: number;
|
|
40
40
|
};
|
|
41
|
-
onClick?: (event: import(
|
|
42
|
-
iconColor?: import(
|
|
41
|
+
onClick?: (event: import('react').MouseEvent<HTMLElement>) => void;
|
|
42
|
+
iconColor?: import('@synerise/ds-utils').LiteralStringUnion<"blue" | "grey" | "red" | "green" | "yellow" | "pink" | "mars" | "orange" | "fern" | "cyan" | "purple" | "violet">;
|
|
43
43
|
error?: boolean;
|
|
44
44
|
readOnly?: boolean;
|
|
45
|
-
tagProps?: import(
|
|
46
|
-
tooltipProps?: import(
|
|
47
|
-
} & import(
|
|
45
|
+
tagProps?: import('@synerise/ds-tag').TagProps;
|
|
46
|
+
tooltipProps?: import('@synerise/ds-tooltip').TooltipProps;
|
|
47
|
+
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
48
48
|
/** @deprecated - use named export `Creator` */
|
|
49
|
-
Creator: import(
|
|
49
|
+
Creator: import('react').ForwardRefExoticComponent<Omit<import('./Creator/Creator.types').CreatorProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
50
50
|
/** @deprecated - use named export `Expander` */
|
|
51
|
-
Expander: ({ size, expanded, disabled, onClick, className, }: import(
|
|
51
|
+
Expander: ({ size, expanded, disabled, onClick, className, }: import('./Expander/Expander.types').ExpanderProps) => import("react").JSX.Element;
|
|
52
52
|
/** @deprecated - use named export `Star` */
|
|
53
|
-
Star: (props: import(
|
|
53
|
+
Star: (props: import('./Star/Star.types').StarButtonProps) => React.ReactElement;
|
|
54
54
|
/** @deprecated - use named export `Checkbox` */
|
|
55
|
-
Checkbox: (props: import(
|
|
55
|
+
Checkbox: (props: import('./Checkbox/Checkbox.types').CheckboxButtonProps) => React.ReactElement;
|
|
56
56
|
};
|
|
57
57
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -1,32 +1,42 @@
|
|
|
1
|
-
import Button from
|
|
2
|
-
import * as
|
|
3
|
-
import CheckboxButton from
|
|
4
|
-
import * as
|
|
5
|
-
import Creator from
|
|
6
|
-
import * as
|
|
7
|
-
import Expander from
|
|
8
|
-
import * as
|
|
9
|
-
import StarButton from
|
|
10
|
-
import * as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Star: StarStyles
|
|
1
|
+
import Button from "./Button.js";
|
|
2
|
+
import * as Button_styles from "./Button.styles.js";
|
|
3
|
+
import CheckboxButton from "./Checkbox/Checkbox.js";
|
|
4
|
+
import * as Checkbox_Checkbox_styles from "./Checkbox/Checkbox.styles.js";
|
|
5
|
+
import Creator from "./Creator/Creator.js";
|
|
6
|
+
import * as Creator_Creator_styles from "./Creator/Creator.styles.js";
|
|
7
|
+
import Expander from "./Expander/Expander.js";
|
|
8
|
+
import * as Expander_Expander_styles from "./Expander/Expander.styles.js";
|
|
9
|
+
import StarButton from "./Star/Star.js";
|
|
10
|
+
import * as Star_Star_styles from "./Star/Star.styles.js";
|
|
11
|
+
import { default as default2 } from "./ButtonToggle/ButtonToggle.js";
|
|
12
|
+
import { CreatorStatus } from "./Creator/Creator.types.js";
|
|
13
|
+
import { ExpanderSize } from "./Expander/Expander.types.js";
|
|
14
|
+
const ButtonStyles = {
|
|
15
|
+
Button: Button_styles,
|
|
16
|
+
Creator: Creator_Creator_styles,
|
|
17
|
+
Checkbox: Checkbox_Checkbox_styles,
|
|
18
|
+
Expander: Expander_Expander_styles,
|
|
19
|
+
Star: Star_Star_styles
|
|
21
20
|
};
|
|
22
|
-
|
|
21
|
+
const staticComponents = {
|
|
23
22
|
/** @deprecated - use named export `Creator` */
|
|
24
|
-
Creator
|
|
23
|
+
Creator,
|
|
25
24
|
/** @deprecated - use named export `Expander` */
|
|
26
|
-
Expander
|
|
25
|
+
Expander,
|
|
27
26
|
/** @deprecated - use named export `Star` */
|
|
28
27
|
Star: StarButton,
|
|
29
28
|
/** @deprecated - use named export `Checkbox` */
|
|
30
29
|
Checkbox: CheckboxButton
|
|
31
30
|
};
|
|
32
|
-
|
|
31
|
+
const index = Object.assign(Button, staticComponents);
|
|
32
|
+
export {
|
|
33
|
+
ButtonStyles,
|
|
34
|
+
default2 as ButtonToggle,
|
|
35
|
+
CheckboxButton as Checkbox,
|
|
36
|
+
Creator,
|
|
37
|
+
CreatorStatus,
|
|
38
|
+
Expander,
|
|
39
|
+
ExpanderSize,
|
|
40
|
+
StarButton as Star,
|
|
41
|
+
index as default
|
|
42
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-button",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.18",
|
|
4
4
|
"description": "Button UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
|
+
"build:watch": "vite build --watch",
|
|
20
21
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
22
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "pnpm run build:js -- --watch",
|
|
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",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-icon": "^1.15.
|
|
39
|
-
"@synerise/ds-tag": "^1.4.
|
|
40
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
41
|
-
"@synerise/ds-utils": "^1.7.
|
|
38
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
39
|
+
"@synerise/ds-tag": "^1.4.18",
|
|
40
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
41
|
+
"@synerise/ds-utils": "^1.7.1",
|
|
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": "
|
|
52
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
53
53
|
}
|