@semcore/button 5.44.0-prerelease.0 → 5.44.0-prerelease.4
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/lib/cjs/component/AbstractButton/AbstractButton.js +182 -0
- package/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -0
- package/lib/cjs/component/AbstractButton/AbstractButton.type.js +2 -0
- package/lib/cjs/component/AbstractButton/AbstractButton.type.js.map +1 -0
- package/lib/cjs/component/{Button → AbstractButton}/SpinButton.js +4 -3
- package/lib/cjs/component/AbstractButton/SpinButton.js.map +1 -0
- package/lib/cjs/component/Button/Button.js +64 -166
- package/lib/cjs/component/Button/Button.js.map +1 -1
- package/lib/cjs/component/Button/Button.type.js.map +1 -1
- package/lib/cjs/component/Button/button.shadow.css +20 -12
- package/lib/cjs/component/ButtonLink/ButtonLink.js +68 -35
- package/lib/cjs/component/ButtonLink/ButtonLink.js.map +1 -1
- package/lib/cjs/component/ButtonLink/ButtonLink.type.js.map +1 -1
- package/lib/cjs/component/ButtonLink/buttonLink.shadow.css +151 -12
- package/lib/cjs/index.js +4 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/component/AbstractButton/AbstractButton.js +175 -0
- package/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -0
- package/lib/es6/component/AbstractButton/AbstractButton.type.js +2 -0
- package/lib/es6/component/AbstractButton/AbstractButton.type.js.map +1 -0
- package/lib/es6/component/{Button → AbstractButton}/SpinButton.js +1 -1
- package/lib/es6/component/AbstractButton/SpinButton.js.map +1 -0
- package/lib/es6/component/Button/Button.js +57 -163
- package/lib/es6/component/Button/Button.js.map +1 -1
- package/lib/es6/component/Button/Button.type.js.map +1 -1
- package/lib/es6/component/Button/button.shadow.css +20 -12
- package/lib/es6/component/ButtonLink/ButtonLink.js +65 -34
- package/lib/es6/component/ButtonLink/ButtonLink.js.map +1 -1
- package/lib/es6/component/ButtonLink/ButtonLink.type.js.map +1 -1
- package/lib/es6/component/ButtonLink/buttonLink.shadow.css +151 -12
- package/lib/es6/index.js +2 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/component/AbstractButton/AbstractButton.mjs +152 -0
- package/lib/esm/component/{Button → AbstractButton}/SpinButton.mjs +3 -2
- package/lib/esm/component/Button/Button.mjs +56 -142
- package/lib/esm/component/Button/button.shadow.css +20 -12
- package/lib/esm/component/ButtonLink/ButtonLink.mjs +61 -33
- package/lib/esm/component/ButtonLink/buttonLink.shadow.css +151 -12
- package/lib/esm/index.mjs +2 -3
- package/lib/types/component/AbstractButton/AbstractButton.d.ts +24 -0
- package/lib/types/component/AbstractButton/AbstractButton.type.d.ts +39 -0
- package/lib/types/component/{Button → AbstractButton}/SpinButton.d.ts +2 -2
- package/lib/types/component/Button/Button.d.ts +1 -28
- package/lib/types/component/Button/Button.type.d.ts +39 -40
- package/lib/types/component/ButtonLink/ButtonLink.d.ts +1 -1
- package/lib/types/component/ButtonLink/ButtonLink.type.d.ts +21 -15
- package/lib/types/index.d.ts +2 -1
- package/package.json +7 -7
- package/src/component/Button/button.shadow.css +80 -80
- package/src/component/ButtonLink/buttonLink.shadow.css +7 -7
- package/lib/cjs/component/Button/SpinButton.js.map +0 -1
- package/lib/es6/component/Button/SpinButton.js.map +0 -1
- package/lib/esm/component/Button/Button.type.mjs +0 -1
- package/lib/esm/component/ButtonLink/ButtonLink.type.mjs +0 -1
|
@@ -1,19 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
SButton {
|
|
2
|
+
display: inline-flex;
|
|
3
3
|
font-family: inherit;
|
|
4
|
-
|
|
4
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
5
|
+
color: var(--intergalactic-text-link, oklch(0.53 0.21 263));
|
|
6
|
+
line-height: normal;
|
|
7
|
+
position: relative;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
border: none;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
box-shadow: none;
|
|
14
|
+
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
outline: 0;
|
|
16
|
+
background: none;
|
|
17
|
+
transition: color 0.15s ease-in-out;
|
|
5
18
|
|
|
6
|
-
|
|
7
|
-
|
|
19
|
+
&:active,
|
|
20
|
+
&:hover,
|
|
21
|
+
&:focus {
|
|
22
|
+
outline: 0;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::-moz-focus-inner {
|
|
27
|
+
border: none;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
8
30
|
|
|
9
31
|
&[active],
|
|
10
|
-
&:
|
|
11
|
-
&:
|
|
12
|
-
color: var(--intergalactic-text-link-hover-active, oklch(0.51 0.
|
|
32
|
+
&:hover,
|
|
33
|
+
&:active {
|
|
34
|
+
color: var(--intergalactic-text-link-hover-active, oklch(0.51 0.202 263));
|
|
35
|
+
|
|
36
|
+
& SText {
|
|
37
|
+
border-color: currentColor;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[enableVisited]:visited,
|
|
42
|
+
&[enableVisited]:visited:hover {
|
|
43
|
+
color: var(--intergalactic-text-link-visited, oklch(0.53 0.26 296));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
SText {
|
|
47
|
+
border-bottom-width: 1px;
|
|
48
|
+
border-bottom-style: solid;
|
|
49
|
+
border-color: transparent;
|
|
50
|
+
transition: border-bottom-color 0.15s ease-in-out;
|
|
13
51
|
}
|
|
14
52
|
}
|
|
15
53
|
|
|
16
|
-
|
|
54
|
+
SButton[keyboardFocused] {
|
|
55
|
+
outline-color: var(--intergalactic-keyboard-focus-outline, oklch(0.424 0.269 264.2 / 0.469));
|
|
56
|
+
outline-style: solid;
|
|
57
|
+
outline-width: 3px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
SButton[disabled] {
|
|
61
|
+
opacity: var(--intergalactic-disabled-opacity, 0.4);
|
|
62
|
+
cursor: default;
|
|
63
|
+
/* Disable link interactions */
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
SButton[use='secondary'] {
|
|
17
68
|
color: var(--intergalactic-text-hint, oklch(0.088 0.026 147.7 / 0.583));
|
|
18
69
|
|
|
19
70
|
&[active],
|
|
@@ -21,9 +72,97 @@ SButtonLink[use='secondary']:not([color]) {
|
|
|
21
72
|
&:hover {
|
|
22
73
|
color: var(--intergalactic-text-hint-hover-active, oklch(0.086 0.026 145.8 / 0.605));
|
|
23
74
|
}
|
|
75
|
+
|
|
76
|
+
SText {
|
|
77
|
+
border-bottom-width: 1px;
|
|
78
|
+
border-bottom-style: dashed;
|
|
79
|
+
border-color: currentColor;
|
|
80
|
+
}
|
|
24
81
|
}
|
|
25
82
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
83
|
+
SInner {
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
height: 100%;
|
|
88
|
+
width: 100%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
SAddon {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
align-items: center;
|
|
95
|
+
vertical-align: middle;
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
SButton SAddon {
|
|
100
|
+
&:not(:only-child):first-child {
|
|
101
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:not(:only-child):last-child {
|
|
105
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
SButton[text-color] {
|
|
110
|
+
color: var(--text-color);
|
|
111
|
+
|
|
112
|
+
&[active],
|
|
113
|
+
&:hover,
|
|
114
|
+
&:active {
|
|
115
|
+
color: var(--text-color);
|
|
116
|
+
filter: brightness(0.8);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
SButton[size='100'] {
|
|
121
|
+
font-size: var(--intergalactic-fs-100, 12px);
|
|
122
|
+
line-height: var(--intergalactic-lh-100, 133%);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
SButton[size='200'] {
|
|
126
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
127
|
+
line-height: var(--intergalactic-lh-200, 142%);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
SButton[size='300'] {
|
|
131
|
+
font-size: var(--intergalactic-fs-300, 16px);
|
|
132
|
+
line-height: var(--intergalactic-lh-300, 150%);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
SButton[size='400'] {
|
|
136
|
+
font-size: var(--intergalactic-fs-400, 20px);
|
|
137
|
+
line-height: var(--intergalactic-lh-400, 120%);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
SButton[size='500'] {
|
|
141
|
+
font-size: var(--intergalactic-fs-500, 24px);
|
|
142
|
+
line-height: var(--intergalactic-lh-500, 117%);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
SButton[size='600'] {
|
|
146
|
+
font-size: var(--intergalactic-fs-600, 32px);
|
|
147
|
+
line-height: var(--intergalactic-lh-600, 125%);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
SButton[size='700'] {
|
|
151
|
+
font-size: var(--intergalactic-fs-700, 36px);
|
|
152
|
+
line-height: var(--intergalactic-lh-700, 110%);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
SButton[size='800'] {
|
|
156
|
+
font-size: var(--intergalactic-fs-800, 48px);
|
|
157
|
+
line-height: var(--intergalactic-lh-800, 117%);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@media (prefers-reduced-motion) {
|
|
161
|
+
SButton {
|
|
162
|
+
transition: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
SText {
|
|
166
|
+
transition: none;
|
|
167
|
+
}
|
|
29
168
|
}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./component/Button/Button.type.mjs";
|
|
1
|
+
import { default as default2 } from "./component/Button/Button.mjs";
|
|
3
2
|
import { ButtonLink } from "./component/ButtonLink/ButtonLink.mjs";
|
|
4
|
-
import "./component/
|
|
3
|
+
import { MAP_USE_DEFAULT_THEME } from "./component/AbstractButton/AbstractButton.mjs";
|
|
5
4
|
export {
|
|
6
5
|
ButtonLink,
|
|
7
6
|
MAP_USE_DEFAULT_THEME,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AbstractButtonProps } from './AbstractButton.type';
|
|
3
|
+
import { Component } from '@semcore/core';
|
|
4
|
+
export declare const MAP_USE_DEFAULT_THEME: Record<string, string>;
|
|
5
|
+
type Props = AbstractButtonProps<any, any, any>;
|
|
6
|
+
export declare abstract class AbstractButton extends Component<Props, {}, {}> {
|
|
7
|
+
static displayName: string;
|
|
8
|
+
containerRef: React.RefObject<HTMLButtonElement>;
|
|
9
|
+
state: {
|
|
10
|
+
ariaLabelledByContent: null;
|
|
11
|
+
};
|
|
12
|
+
protected abstract getTextColor(): string | undefined;
|
|
13
|
+
getTextProps(): {
|
|
14
|
+
size: any;
|
|
15
|
+
};
|
|
16
|
+
getAddonProps(): {
|
|
17
|
+
size: any;
|
|
18
|
+
};
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
renderButton({ buttonProps, children }: any): React.ReactNode;
|
|
21
|
+
renderButtonWithHint({ buttonProps, children, hintProps }: any): React.ReactNode;
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PropGetterFn } from '@semcore/core';
|
|
3
|
+
import { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
4
|
+
import { BoxProps } from '@semcore/flex-box';
|
|
5
|
+
import { NeighborItemProps } from '@semcore/neighbor-location';
|
|
6
|
+
import { TooltipHintProps } from '@semcore/tooltip';
|
|
7
|
+
export type AbstractButtonProps<S, U, T> = BoxProps & NeighborItemProps & KeyboardFocusProps & {
|
|
8
|
+
/** Button activity state */
|
|
9
|
+
active?: boolean;
|
|
10
|
+
/** Disabled button state */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Loading button state */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** Tag for the left Addon */
|
|
15
|
+
addonLeft?: React.ElementType;
|
|
16
|
+
/** Tag for the right Addon */
|
|
17
|
+
addonRight?: React.ElementType;
|
|
18
|
+
/**
|
|
19
|
+
* Placement for hint
|
|
20
|
+
* @default top
|
|
21
|
+
*/
|
|
22
|
+
hintPlacement?: TooltipHintProps['placement'];
|
|
23
|
+
/** Button type. Defined in Button.type or ButtonLink.type */
|
|
24
|
+
size?: S;
|
|
25
|
+
/** Button usage. Defined in Button.type or ButtonLink.type */
|
|
26
|
+
use?: U;
|
|
27
|
+
/** Button theme. Defined in Button.type or ButtonLink.type */
|
|
28
|
+
theme?: T;
|
|
29
|
+
};
|
|
30
|
+
export type AbstractButtonAddonProps<S> = BoxProps & {
|
|
31
|
+
size?: S;
|
|
32
|
+
};
|
|
33
|
+
export type AbstractButtonTextProps<S> = BoxProps & {
|
|
34
|
+
size?: S;
|
|
35
|
+
};
|
|
36
|
+
export type AbstractButtonContext = {
|
|
37
|
+
getTextProps: PropGetterFn;
|
|
38
|
+
getAddonProps: PropGetterFn;
|
|
39
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare const SPIN_SIZE_MAP: Record<string, string>;
|
|
3
|
-
export default function SpinButton({ theme, size, ...others }: any):
|
|
3
|
+
export default function SpinButton({ theme, size, ...others }: any): JSX.Element;
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { ButtonProps, ButtonComponent } from './Button.type';
|
|
4
|
-
export declare const MAP_USE_DEFAULT_THEME: Record<string, string>;
|
|
5
|
-
type State = {
|
|
6
|
-
ariaLabelledByContent: null | string;
|
|
7
|
-
};
|
|
8
|
-
export declare class RootButton extends Component<ButtonProps, [], never, {}, State> {
|
|
9
|
-
static displayName: string;
|
|
10
|
-
static style: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
static defaultProps: {
|
|
14
|
-
use: string;
|
|
15
|
-
size: string;
|
|
16
|
-
};
|
|
17
|
-
containerRef: React.RefObject<HTMLButtonElement>;
|
|
18
|
-
state: State;
|
|
19
|
-
getTextProps(): {
|
|
20
|
-
size: "l" | "m" | undefined;
|
|
21
|
-
'hint:triggerRef': React.RefObject<HTMLButtonElement>;
|
|
22
|
-
};
|
|
23
|
-
getAddonProps(): {
|
|
24
|
-
size: "l" | "m" | undefined;
|
|
25
|
-
};
|
|
26
|
-
componentDidMount(): void;
|
|
27
|
-
render(): React.JSX.Element;
|
|
28
|
-
}
|
|
1
|
+
import { ButtonComponent } from './Button.type';
|
|
29
2
|
declare const Button: ButtonComponent;
|
|
30
3
|
export default Button;
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
export type
|
|
35
|
-
export type ButtonAddonProps = BoxProps;
|
|
36
|
-
export type ButtonContext = {
|
|
37
|
-
getTextProps: PropGetterFn;
|
|
38
|
-
getAddonProps: PropGetterFn;
|
|
39
|
-
};
|
|
1
|
+
import { UnknownProperties, Intergalactic } from '@semcore/core';
|
|
2
|
+
import { AbstractButtonAddonProps, AbstractButtonContext, AbstractButtonTextProps, AbstractButtonProps } from '../AbstractButton/AbstractButton.type';
|
|
3
|
+
/**
|
|
4
|
+
* Button size
|
|
5
|
+
* @default m
|
|
6
|
+
*/
|
|
7
|
+
export type ButtonSize = 'l' | 'm';
|
|
8
|
+
/**
|
|
9
|
+
* Button type
|
|
10
|
+
* @default secondary
|
|
11
|
+
*/
|
|
12
|
+
type Use = 'primary' | 'secondary' | 'tertiary';
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated don't use it. use `danger` for incorrect or danger behavior and `brand` for the orange one.
|
|
15
|
+
*/
|
|
16
|
+
type DeprecatedTheme = 'warning';
|
|
17
|
+
/** Button theme */
|
|
18
|
+
type Theme = 'info' | 'success' | 'brand' | 'danger' | 'muted' | 'invert';
|
|
19
|
+
/** @deprecated */
|
|
20
|
+
export interface IButtonProps extends ButtonProps, UnknownProperties {
|
|
21
|
+
}
|
|
22
|
+
export type ButtonProps = AbstractButtonProps<ButtonSize, Use, Theme | DeprecatedTheme>;
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
export interface IButtonTextProps extends ButtonTextProps, UnknownProperties {
|
|
25
|
+
}
|
|
26
|
+
export type ButtonTextProps = AbstractButtonTextProps<ButtonSize>;
|
|
27
|
+
/** @deprecated */
|
|
28
|
+
export interface IButtonAddonProps extends ButtonAddonProps, UnknownProperties {
|
|
29
|
+
}
|
|
30
|
+
export type ButtonAddonProps = AbstractButtonAddonProps<ButtonSize>;
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
export interface IButtonContext extends ButtonContext, UnknownProperties {
|
|
33
|
+
}
|
|
34
|
+
export type ButtonContext = AbstractButtonContext;
|
|
40
35
|
export type ButtonChildren = {
|
|
41
36
|
Text: Intergalactic.Component<'span', ButtonTextProps>;
|
|
42
37
|
Addon: Intergalactic.Component<'span', ButtonAddonProps>;
|
|
43
38
|
};
|
|
44
|
-
export type ButtonComponent = Intergalactic.Component<'button', ButtonProps, ButtonContext> &
|
|
39
|
+
export type ButtonComponent = Intergalactic.Component<'button', ButtonProps, ButtonContext> & {
|
|
40
|
+
Text: Intergalactic.Component<'span', ButtonTextProps>;
|
|
41
|
+
Addon: Intergalactic.Component<'span', ButtonAddonProps>;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ButtonLinkComponent } from './ButtonLink.type';
|
|
2
2
|
export declare const ButtonLink: ButtonLinkComponent;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
1
|
+
import { Intergalactic } from '@semcore/core';
|
|
2
|
+
import { AbstractButtonAddonProps, AbstractButtonContext, AbstractButtonTextProps, AbstractButtonProps } from '../AbstractButton/AbstractButton.type';
|
|
3
|
+
/**
|
|
4
|
+
* Button link size
|
|
5
|
+
* @default m
|
|
6
|
+
*/
|
|
7
|
+
export type ButtonLinkSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
8
|
+
/**
|
|
9
|
+
* Button link type
|
|
10
|
+
* @default primary
|
|
11
|
+
*/
|
|
12
|
+
type Use = 'primary' | 'secondary';
|
|
13
|
+
export type ButtonLinkProps = AbstractButtonProps<ButtonLinkSize, Use, never>;
|
|
14
|
+
export type ButtonLinkTextProps = AbstractButtonTextProps<ButtonLinkSize>;
|
|
15
|
+
export type ButtonLinkAddonProps = AbstractButtonAddonProps<ButtonLinkSize>;
|
|
16
|
+
export type ButtonLinkContext = AbstractButtonContext;
|
|
15
17
|
export type ButtonLinkChildren = {
|
|
16
18
|
Text: Intergalactic.Component<'span', ButtonLinkTextProps>;
|
|
17
19
|
Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;
|
|
18
20
|
};
|
|
19
|
-
export type ButtonLinkComponent = Intergalactic.Component<'button', ButtonLinkProps,
|
|
21
|
+
export type ButtonLinkComponent = Intergalactic.Component<'button', ButtonLinkProps, ButtonLinkContext> & {
|
|
22
|
+
Text: Intergalactic.Component<'span', ButtonLinkTextProps>;
|
|
23
|
+
Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from './component/Button/Button';
|
|
2
2
|
export * from './component/Button/Button.type';
|
|
3
3
|
export * from './component/ButtonLink/ButtonLink';
|
|
4
4
|
export * from './component/ButtonLink/ButtonLink.type';
|
|
5
|
+
export { MAP_USE_DEFAULT_THEME } from './component/AbstractButton/AbstractButton';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/button",
|
|
3
3
|
"description": "Semrush Button Component",
|
|
4
|
-
"version": "5.44.0-prerelease.
|
|
4
|
+
"version": "5.44.0-prerelease.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "5.42.0-prerelease.
|
|
18
|
-
"@semcore/neighbor-location": "4.41.0-prerelease.
|
|
19
|
-
"@semcore/spin": "5.42.0-prerelease.
|
|
20
|
-
"@semcore/tooltip": "6.50.0-prerelease.
|
|
21
|
-
"@semcore/utils": "4.49.0-prerelease.
|
|
17
|
+
"@semcore/flex-box": "5.42.0-prerelease.4",
|
|
18
|
+
"@semcore/neighbor-location": "4.41.0-prerelease.4",
|
|
19
|
+
"@semcore/spin": "5.42.0-prerelease.4",
|
|
20
|
+
"@semcore/tooltip": "6.50.0-prerelease.4",
|
|
21
|
+
"@semcore/utils": "4.49.0-prerelease.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/core": "^2.40.0-prerelease.
|
|
24
|
+
"@semcore/core": "^2.40.0-prerelease.4",
|
|
25
25
|
"react": "16.8 - 18",
|
|
26
26
|
"react-dom": "16.8 - 18"
|
|
27
27
|
},
|