@aristobyte-ui/button 2.4.0 → 2.5.1
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/es/src/main/components/Button/Button.scss +881 -0
- package/es/src/main/components/Button/index.d.ts +29 -0
- package/es/src/main/components/Button/index.d.ts.map +1 -0
- package/es/src/main/components/ButtonGroup/ButtonGroup.scss +66 -0
- package/es/src/main/components/ButtonGroup/index.d.ts +15 -0
- package/es/src/main/components/ButtonGroup/index.d.ts.map +1 -0
- package/es/src/main/components/index.d.ts +3 -0
- package/es/src/main/components/index.d.ts.map +1 -0
- package/es/src/main/index.d.ts +2 -0
- package/es/src/main/index.d.ts.map +1 -0
- package/lib/src/main/components/Button/Button.scss +881 -0
- package/lib/src/main/components/Button/index.d.ts +29 -0
- package/lib/src/main/components/Button/index.d.ts.map +1 -0
- package/lib/src/main/components/ButtonGroup/ButtonGroup.scss +66 -0
- package/lib/src/main/components/ButtonGroup/index.d.ts +15 -0
- package/lib/src/main/components/ButtonGroup/index.d.ts.map +1 -0
- package/lib/src/main/components/index.d.ts +3 -0
- package/lib/src/main/components/index.d.ts.map +1 -0
- package/lib/src/main/index.d.ts +2 -0
- package/lib/src/main/index.d.ts.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type IconPropsType } from '@aristobyte-ui/utils';
|
|
3
|
+
import './Button.scss';
|
|
4
|
+
export interface IButton {
|
|
5
|
+
type?: 'button' | 'link';
|
|
6
|
+
text?: string;
|
|
7
|
+
children?: React.ReactElement | React.JSX.Element | React.ReactNode | string;
|
|
8
|
+
href?: string;
|
|
9
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
10
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement, MouseEvent>) => void | Promise<void>;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
transparent?: boolean;
|
|
13
|
+
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
14
|
+
appearance?: 'solid' | 'outline' | 'outline-dashed' | 'no-outline' | 'glowing';
|
|
15
|
+
size?: 'xsm' | 'sm' | 'md' | 'lg' | 'xlg';
|
|
16
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
17
|
+
icon?: {
|
|
18
|
+
component: (props: IconPropsType) => React.JSX.Element;
|
|
19
|
+
color?: string;
|
|
20
|
+
size?: number;
|
|
21
|
+
align?: 'left' | 'right';
|
|
22
|
+
};
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
spinnerType?: 'default' | 'duo' | 'gradient' | 'pulse' | 'pulse-duo';
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export declare const Button: React.FC<IButton>;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/button/src/main/components/Button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,GAAG,iBAA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&-align {
|
|
10
|
+
&--horizontal {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&--vertical {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-variant {
|
|
20
|
+
&--default {
|
|
21
|
+
background-color: $color-default;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--primary {
|
|
25
|
+
background-color: $color-primary;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--secondary {
|
|
29
|
+
background-color: $color-secondary;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--success {
|
|
33
|
+
background-color: $color-success;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--error {
|
|
37
|
+
background-color: $color-error;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--warning {
|
|
41
|
+
background-color: $color-warning;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-radius {
|
|
46
|
+
&--none {
|
|
47
|
+
border-radius: 0rem; // 0px
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--sm {
|
|
51
|
+
border-radius: 0.125rem; // 2px
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--md {
|
|
55
|
+
border-radius: 0.375rem; // 6px
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--lg {
|
|
59
|
+
border-radius: 0.5rem; // 8px
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--full {
|
|
63
|
+
border-radius: 1.5rem; // 24px
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type IButton, Button } from '../Button';
|
|
3
|
+
import './ButtonGroup.scss';
|
|
4
|
+
export interface IButtonGroup {
|
|
5
|
+
children: React.ReactElement<IButton, typeof Button> | React.ReactElement<IButton, typeof Button>[];
|
|
6
|
+
align?: 'vertical' | 'horizontal';
|
|
7
|
+
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
8
|
+
size?: 'xsm' | 'sm' | 'md' | 'lg' | 'xlg';
|
|
9
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare const ButtonGroup: React.FC<IButtonGroup>;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/button/src/main/components/ButtonGroup/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC,EAAE,CAAC;IACpG,KAAK,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAClC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAChF,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA+B9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/button/src/main/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/button/src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|