@synerise/ds-button 1.5.17 → 1.5.19
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 +8 -0
- package/dist/Button.d.ts +11 -13
- 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/Button.figma.d.ts +0 -1
- package/dist/Button.figma.js +0 -66
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return
|
|
6
|
-
}({});
|
|
1
|
+
var CreatorStatus = /* @__PURE__ */ ((CreatorStatus2) => {
|
|
2
|
+
CreatorStatus2["Default"] = "default";
|
|
3
|
+
CreatorStatus2["Error"] = "error";
|
|
4
|
+
CreatorStatus2["Upload"] = "upload";
|
|
5
|
+
return CreatorStatus2;
|
|
6
|
+
})(CreatorStatus || {});
|
|
7
|
+
export {
|
|
8
|
+
CreatorStatus
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ExpanderProps } from './Expander.types';
|
|
3
3
|
declare const Expander: ({ size, expanded, disabled, onClick, className, }: ExpanderProps) => React.JSX.Element;
|
|
4
4
|
export default Expander;
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import Icon, { AngleDownS } from
|
|
4
|
-
import
|
|
5
|
-
import { ExpanderSize } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
expanded: expanded,
|
|
18
|
-
disabled: disabled
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20
|
-
component: /*#__PURE__*/React.createElement(AngleDownS, null)
|
|
21
|
-
}));
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import Icon, { AngleDownS } from "@synerise/ds-icon";
|
|
4
|
+
import { Expander as Expander$1 } from "./Expander.styles.js";
|
|
5
|
+
import { ExpanderSize } from "./Expander.types.js";
|
|
6
|
+
const Expander = ({
|
|
7
|
+
size = "S",
|
|
8
|
+
expanded,
|
|
9
|
+
disabled,
|
|
10
|
+
onClick,
|
|
11
|
+
className
|
|
12
|
+
}) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(Expander$1, { onClick, size: ExpanderSize[size], className: classnames([className, "ds-expander"]), expanded, disabled, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleDownS, {}) }) });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
Expander as default
|
|
22
17
|
};
|
|
23
|
-
export default Expander;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Keyframes } from 'styled-components';
|
|
3
|
+
import { ThemeProps } from '@synerise/ds-core';
|
|
4
4
|
export type ExpanderProps = {
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
size: number;
|
|
@@ -8,4 +8,4 @@ export type ExpanderProps = {
|
|
|
8
8
|
expanded: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const focusAnimation: ({ theme }: ThemeProps) => Keyframes;
|
|
11
|
-
export declare const Expander: import(
|
|
11
|
+
export declare const Expander: import('styled-components').StyledComponent<({ children, expanded, size, ...rest }: any) => React.JSX.Element, any, {}, never>;
|
|
@@ -1,40 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
expanded = _ref2.expanded,
|
|
16
|
-
size = _ref2.size,
|
|
17
|
-
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
18
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
19
|
-
mode: "single-icon"
|
|
20
|
-
}, rest), children);
|
|
21
|
-
}).withConfig({
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled, { css, keyframes } from "styled-components";
|
|
3
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
4
|
+
import Button from "../Button.js";
|
|
5
|
+
const focusAnimation = ({
|
|
6
|
+
theme
|
|
7
|
+
}) => 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"]);
|
|
8
|
+
const SIZE_DEFAULT = 24;
|
|
9
|
+
const Expander = /* @__PURE__ */ styled(({
|
|
10
|
+
children,
|
|
11
|
+
expanded,
|
|
12
|
+
size,
|
|
13
|
+
...rest
|
|
14
|
+
}) => /* @__PURE__ */ jsx(Button, { mode: "single-icon", ...rest, children })).withConfig({
|
|
22
15
|
displayName: "Expanderstyles__Expander",
|
|
23
16
|
componentId: "sc-1a3xe1e-0"
|
|
24
|
-
})(["&&&{width:", "px;height:", "px;border-radius:50%;background-color:", ";", "{svg{opacity:", ";fill:", " !important;transition:transform 0.1s linear;transform:rotate( ", " );}}.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", "}"],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
return props.theme.palette['grey-050'];
|
|
30
|
-
}, IconContainer, function (props) {
|
|
31
|
-
return props.disabled ? "0.4" : "1";
|
|
32
|
-
}, function (props) {
|
|
33
|
-
return props.theme.palette['grey-600'];
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return props.expanded ? '180deg' : '0deg';
|
|
36
|
-
}, function (props) {
|
|
37
|
-
return props.disabled ? props.theme.palette['grey-200'] : props.theme.palette['grey-300'];
|
|
38
|
-
}, function (props) {
|
|
39
|
-
return !props.disabled && css(["&:hover{.btn-focus{box-shadow:inset 0 0 0 1px ", ";}background-color:", ";}&:focus:not(:active){.btn-focus{animation:", " 1s ease-in-out 0s 1;}}"], props.theme.palette['grey-400'], props.theme.palette['grey-050'], focusAnimation(props));
|
|
40
|
-
});
|
|
17
|
+
})(["&&&{width:", "px;height:", "px;border-radius:50%;background-color:", ";", "{svg{opacity:", ";fill:", " !important;transition:transform 0.1s linear;transform:rotate( ", " );}}.btn-focus{box-shadow:inset 0 0 0 1px ", ";}", "}"], (props) => props.size || SIZE_DEFAULT, (props) => props.size || SIZE_DEFAULT, (props) => props.theme.palette["grey-050"], IconContainer, (props) => props.disabled ? `0.4` : `1`, (props) => props.theme.palette["grey-600"], (props) => props.expanded ? "180deg" : "0deg", (props) => props.disabled ? props.theme.palette["grey-200"] : props.theme.palette["grey-300"], (props) => !props.disabled && css(["&:hover{.btn-focus{box-shadow:inset 0 0 0 1px ", ";}background-color:", ";}&:focus:not(:active){.btn-focus{animation:", " 1s ease-in-out 0s 1;}}"], props.theme.palette["grey-400"], props.theme.palette["grey-050"], focusAnimation(props)));
|
|
18
|
+
export {
|
|
19
|
+
Expander,
|
|
20
|
+
focusAnimation
|
|
21
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
}({});
|
|
1
|
+
var ExpanderSize = /* @__PURE__ */ ((ExpanderSize2) => {
|
|
2
|
+
ExpanderSize2[ExpanderSize2["S"] = 24] = "S";
|
|
3
|
+
ExpanderSize2[ExpanderSize2["M"] = 32] = "M";
|
|
4
|
+
return ExpanderSize2;
|
|
5
|
+
})(ExpanderSize || {});
|
|
6
|
+
export {
|
|
7
|
+
ExpanderSize
|
|
8
|
+
};
|
package/dist/Star/Star.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StarButtonProps } from './Star.types';
|
|
3
3
|
declare const StarButton: (props: StarButtonProps) => React.ReactElement;
|
|
4
4
|
export default StarButton;
|
package/dist/Star/Star.js
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style: {
|
|
19
|
-
transition: 'none'
|
|
20
|
-
},
|
|
21
|
-
tabIndex: 0,
|
|
22
|
-
type: type
|
|
23
|
-
}, restProps), /*#__PURE__*/React.createElement(S.IconWrapper, {
|
|
24
|
-
active: active,
|
|
25
|
-
error: hasError
|
|
26
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
27
|
-
component: active ? /*#__PURE__*/React.createElement(StarFillM, null) : /*#__PURE__*/React.createElement(StarM, null)
|
|
28
|
-
})));
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import Icon, { StarFillM, StarM } from "@synerise/ds-icon";
|
|
3
|
+
import Button from "../Button.js";
|
|
4
|
+
import { IconWrapper } from "./Star.styles.js";
|
|
5
|
+
const StarButton = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
hasError,
|
|
8
|
+
active,
|
|
9
|
+
type = "ghost",
|
|
10
|
+
...restProps
|
|
11
|
+
} = props;
|
|
12
|
+
return /* @__PURE__ */ jsx(Button, { "aria-pressed": !!active, mode: "single-icon", role: "button", style: {
|
|
13
|
+
transition: "none"
|
|
14
|
+
}, tabIndex: 0, type, ...restProps, children: /* @__PURE__ */ jsx(IconWrapper, { active, error: hasError, children: /* @__PURE__ */ jsx(Icon, { component: active ? /* @__PURE__ */ jsx(StarFillM, {}) : /* @__PURE__ */ jsx(StarM, {}) }) }) });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
StarButton as default
|
|
29
18
|
};
|
|
30
|
-
export default StarButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const IconWrapper: import(
|
|
1
|
+
export declare const IconWrapper: import('styled-components').StyledComponent<"span", any, {
|
|
2
2
|
active?: boolean;
|
|
3
3
|
error?: boolean;
|
|
4
4
|
}, never>;
|
|
5
5
|
declare const _default: {
|
|
6
|
-
IconWrapper: import(
|
|
6
|
+
IconWrapper: import('styled-components').StyledComponent<"span", any, {
|
|
7
7
|
active?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}, never>;
|
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.19",
|
|
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.2",
|
|
39
|
+
"@synerise/ds-tag": "^1.4.19",
|
|
40
|
+
"@synerise/ds-tooltip": "^1.4.11",
|
|
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": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
|
|
53
53
|
}
|
package/dist/Button.figma.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/Button.figma.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
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
|
-
});
|