@apify/ui-library 1.155.1 → 1.156.0
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/dist/components/button/button.d.ts +6 -33
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +46 -231
- package/dist/components/button/button.style.d.ts +37 -0
- package/dist/components/button/button.style.d.ts.map +1 -0
- package/dist/components/button/button.style.js +250 -0
- package/dist/components/icon_button/icon_button.js +2 -1
- package/dist/components/select/select.js +2 -2
- package/dist/components/select/select.test_ids.d.ts +1 -0
- package/dist/components/select/select.test_ids.d.ts.map +1 -1
- package/dist/components/select/select.test_ids.js +2 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +3 -0
- package/dist/components/spinner/spinner.test_ids.d.ts +4 -0
- package/dist/components/spinner/spinner.test_ids.d.ts.map +1 -0
- package/dist/components/spinner/spinner.test_ids.js +4 -0
- package/dist/components/tabs/tab.d.ts.map +1 -1
- package/dist/components/tabs/tab.js +1 -1
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/index.js +2 -1
- package/dist/src/components/button/button.d.ts +6 -33
- package/dist/src/components/button/button.d.ts.map +1 -1
- package/dist/src/components/button/button.js +24 -221
- package/dist/src/components/button/button.js.map +1 -1
- package/dist/src/components/button/button.style.d.ts +37 -0
- package/dist/src/components/button/button.style.d.ts.map +1 -0
- package/dist/src/components/button/button.style.js +256 -0
- package/dist/src/components/button/button.style.js.map +1 -0
- package/dist/src/components/select/select.js +2 -2
- package/dist/src/components/select/select.js.map +1 -1
- package/dist/src/components/select/select.test_ids.d.ts +1 -0
- package/dist/src/components/select/select.test_ids.d.ts.map +1 -1
- package/dist/src/components/select/select.test_ids.js +2 -0
- package/dist/src/components/select/select.test_ids.js.map +1 -1
- package/dist/src/components/spinner/spinner.d.ts.map +1 -1
- package/dist/src/components/spinner/spinner.js +2 -1
- package/dist/src/components/spinner/spinner.js.map +1 -1
- package/dist/src/components/spinner/spinner.test_ids.d.ts +4 -0
- package/dist/src/components/spinner/spinner.test_ids.d.ts.map +1 -0
- package/dist/src/components/spinner/spinner.test_ids.js +4 -0
- package/dist/src/components/spinner/spinner.test_ids.js.map +1 -0
- package/dist/src/components/tabs/tab.d.ts.map +1 -1
- package/dist/src/components/tabs/tab.js +1 -1
- package/dist/src/components/tabs/tab.js.map +1 -1
- package/dist/src/test_ids.d.ts +2 -1
- package/dist/src/test_ids.d.ts.map +1 -1
- package/dist/src/test_ids.js +2 -1
- package/dist/src/test_ids.js.map +1 -1
- package/dist/test_ids.d.ts +2 -1
- package/dist/test_ids.d.ts.map +1 -1
- package/dist/test_ids.js +3 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/button/button.stories.tsx +55 -0
- package/src/components/button/button.style.ts +311 -0
- package/src/components/button/button.tsx +75 -293
- package/src/components/select/select.test_ids.ts +3 -0
- package/src/components/select/select.tsx +2 -2
- package/src/components/spinner/spinner.test_ids.ts +3 -0
- package/src/components/spinner/spinner.tsx +8 -1
- package/src/components/tabs/tab.tsx +6 -1
- package/src/test_ids.ts +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { theme } from "../../design_system/theme.js";
|
|
2
2
|
import { TextShared } from "../text/text_shared.js";
|
|
3
3
|
import { IconButton } from "../icon_button/icon_button.js";
|
|
4
|
-
import { selectClearTestId } from "./select.test_ids.js";
|
|
4
|
+
import { selectClearTestId, selectMultiValueLabelTestId } from "./select.test_ids.js";
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import { forwardRef, useCallback, useMemo } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -199,7 +199,7 @@ var SelectMultiValueLabel = ({ innerProps, ...rest }) => /* @__PURE__ */ jsx(com
|
|
|
199
199
|
...rest,
|
|
200
200
|
innerProps: {
|
|
201
201
|
...innerProps,
|
|
202
|
-
"data-test":
|
|
202
|
+
"data-test": selectMultiValueLabelTestId(rest.selectProps?.id ?? rest.selectProps?.name)
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
var IndicatorSeparator = () => null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.test_ids.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.test_ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,MAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"select.test_ids.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.test_ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,MAA8B,CAAC;AAGhG,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,GAAG,SAAS,KAAG,MAA0C,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region src/components/select/select.test_ids.ts
|
|
2
2
|
var selectClearTestId = (idOrName) => `${idOrName}--clear`;
|
|
3
|
+
var selectMultiValueLabelTestId = (idOrName) => `${idOrName}--multi-value-label`;
|
|
3
4
|
//#endregion
|
|
4
|
-
export { selectClearTestId };
|
|
5
|
+
export { selectClearTestId, selectMultiValueLabelTestId };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;CAE7B,CAAC;AAuBF,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AA8BF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAAI,oCAAoC,YAAY,4CAsBvE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,qLA5BmC,YAAY,4FAgCvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;WAA4B,MAAM;yDArCA,YAAY,4FAgDvE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { theme } from "../../design_system/theme.js";
|
|
2
|
+
import { spinnerTestIds } from "./spinner.test_ids.js";
|
|
2
3
|
import styled, { keyframes } from "styled-components";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/spinner/spinner.tsx
|
|
@@ -57,6 +58,8 @@ var Spinner = ({ loadingReason, small, ...props }) => {
|
|
|
57
58
|
...props,
|
|
58
59
|
title: loadingReason,
|
|
59
60
|
$small: small,
|
|
61
|
+
"data-testid": spinnerTestIds.SPINNER,
|
|
62
|
+
"aria-busy": "true",
|
|
60
63
|
children: /* @__PURE__ */ jsx("svg", {
|
|
61
64
|
className: spinnerClassNames.SPINNER,
|
|
62
65
|
viewBox: "0 0 50 50",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.test_ids.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.test_ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;CAE1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MA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O,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMhD,KAAK,cAAc,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,SAAS,CAAC,GACzD,kBAAkB,GAClB,IAAI,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,kBAAkB,CAAC,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAA;KAAE,KAAK,IAAI,CAAC;CACpF,CAAC;AA4GF,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAoCF,eAAO,MAAM,GAAG,GAAI,kGAajB,QAAQ,4CAmCV,CAAC"}
|
|
@@ -171,7 +171,7 @@ var Tab = ({ variant = "default", id, to, Icon, title, chip, rollout, className,
|
|
|
171
171
|
/* @__PURE__ */ jsx(TextShared, {
|
|
172
172
|
size: tabVariantTextSize[variant],
|
|
173
173
|
className: TAB_CLASSNAMES.TITLE,
|
|
174
|
-
weight: "bold",
|
|
174
|
+
weight: active ? "bold" : "medium",
|
|
175
175
|
as: "div",
|
|
176
176
|
children: title
|
|
177
177
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
37571b60420478e87fb6d796de56c4a7bbfa7062
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,8 @@ import { ActorAvatar, ActorAvatarInner, actorAvatarClassnames } from "./componen
|
|
|
27
27
|
import { UserAvatar, userAvatarBaseClassNames } from "./components/avatar/user_avatar.js";
|
|
28
28
|
import { CardContainer, cardContainerClassNames } from "./components/card_container/card_container.js";
|
|
29
29
|
import { Link, StyledAsLink, hasUrlHttpProtocol, isUrlEmail, isUrlExternal, omitDomainAndProtocol } from "./components/link/link.js";
|
|
30
|
-
import { BUTTON_COLOR_VARIANTS_CSS, BUTTON_SIZE_VARIANTS_CSS,
|
|
30
|
+
import { BUTTON_COLOR_VARIANTS_CSS, BUTTON_SIZE_VARIANTS_CSS, getButtonColorStyles, getButtonSizeStyles } from "./components/button/button.style.js";
|
|
31
|
+
import { Button } from "./components/button/button.js";
|
|
31
32
|
import { DangerMessage, InfoMessage, Message, SuccessMessage, WarningMessage, messageClassNames } from "./components/message/message.js";
|
|
32
33
|
import { useFloatingMenu } from "./components/floating/menu_common.js";
|
|
33
34
|
import { BADGE_SIZES, BADGE_VARIANTS, Badge } from "./components/badge/badge.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AriaAttributes } from 'react';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import { type IconSize } from '@apify/ui-icons';
|
|
4
3
|
import { type WithRequired } from '../../type_utils';
|
|
5
4
|
import { type MarginSpacingProps, type RegularBoxProps } from '../box';
|
|
6
5
|
import { type LinkProps } from '../link';
|
|
6
|
+
export { BUTTON_COLOR_VARIANTS_CSS, BUTTON_SIZE_VARIANTS_CSS, getButtonColorStyles, getButtonSizeStyles, } from './button.style';
|
|
7
7
|
export type ButtonSize = 'extraLarge' | 'large' | 'medium' | 'small' | 'extraSmall';
|
|
8
|
-
type ButtonColor = 'default' | 'success' | 'danger' | 'primaryBlack';
|
|
9
|
-
type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
8
|
+
export type ButtonColor = 'default' | 'success' | 'danger' | 'primaryBlack';
|
|
9
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
10
10
|
type ButtonType = 'button' | 'submit';
|
|
11
11
|
export interface TransientButtonProps {
|
|
12
12
|
size?: ButtonSize;
|
|
@@ -22,37 +22,10 @@ export interface RegularButtonProps {
|
|
|
22
22
|
type?: ButtonType;
|
|
23
23
|
}
|
|
24
24
|
type ButtonAriaProps = Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'>;
|
|
25
|
-
export type CommonButtonProps = RegularButtonProps & ButtonAriaProps & TransientButtonProps & MarginSpacingProps
|
|
25
|
+
export type CommonButtonProps = RegularButtonProps & ButtonAriaProps & TransientButtonProps & MarginSpacingProps & {
|
|
26
|
+
animated?: boolean;
|
|
27
|
+
};
|
|
26
28
|
export type ButtonProps = CommonButtonProps & WithRequired<RegularBoxProps, 'onClick'>;
|
|
27
29
|
export type AnchorButtonProps = CommonButtonProps & RegularBoxProps & LinkProps;
|
|
28
|
-
type ButtonColorCombinations = {
|
|
29
|
-
[Type in ButtonVariant]: {
|
|
30
|
-
[Size in ButtonColor]: {
|
|
31
|
-
textColor: string;
|
|
32
|
-
borderColor: string;
|
|
33
|
-
backgroundColor: string;
|
|
34
|
-
actionTextColor?: string;
|
|
35
|
-
actionBorderColor?: string;
|
|
36
|
-
hoverColor?: string;
|
|
37
|
-
hoverGradient?: string;
|
|
38
|
-
activeColor?: string;
|
|
39
|
-
activeTextColor?: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type ButtonSizeCombinations = {
|
|
44
|
-
[Size in ButtonSize]: {
|
|
45
|
-
typography: string;
|
|
46
|
-
size: number;
|
|
47
|
-
horizontalPadding: number;
|
|
48
|
-
borderRadius: string;
|
|
49
|
-
iconSize: IconSize;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
export declare const BUTTON_COLOR_VARIANTS_CSS: ButtonColorCombinations;
|
|
53
|
-
export declare const BUTTON_SIZE_VARIANTS_CSS: ButtonSizeCombinations;
|
|
54
|
-
export declare const getButtonColorStyles: (variant?: ButtonVariant, color?: ButtonColor) => import("styled-components").RuleSet<object>;
|
|
55
|
-
export declare const getButtonSizeStyles: (size?: ButtonSize) => import("styled-components").RuleSet<object>;
|
|
56
30
|
export declare const Button: React.ForwardRefExoticComponent<(ButtonProps | AnchorButtonProps) & React.RefAttributes<HTMLElement>>;
|
|
57
|
-
export {};
|
|
58
31
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EACH,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AACpF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AAC5E,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AACjE,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtC,MAAM,WAAW,oBAAoB;IACjC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAC;AAG9E,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAC9C,eAAe,GACf,oBAAoB,GACpB,kBAAkB,GAAG;IAEjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,YAAY,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAEvF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG,eAAe,GAAG,SAAS,CAAC;AAOhF,eAAO,MAAM,MAAM,uGA6FjB,CAAC"}
|
|
@@ -1,225 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
3
|
import { ExternalLinkIcon } from '@apify/ui-icons';
|
|
5
|
-
import { theme } from '../../design_system/theme';
|
|
6
4
|
import {} from '../../type_utils';
|
|
7
5
|
import { useSharedUiDependencies } from '../../ui_dependency_provider';
|
|
8
|
-
import {
|
|
6
|
+
import {} from '../box';
|
|
9
7
|
import { isUrlExternal, Link } from '../link';
|
|
8
|
+
import { AnimatedBorder, BUTTON_SIZE_VARIANTS_CSS, StyledButton } from './button.style';
|
|
9
|
+
export { BUTTON_COLOR_VARIANTS_CSS, BUTTON_SIZE_VARIANTS_CSS, getButtonColorStyles, getButtonSizeStyles, } from './button.style';
|
|
10
10
|
// typeguard to distinguish between the two options for props
|
|
11
11
|
function isAnchorButton(props) {
|
|
12
12
|
return props.to !== undefined;
|
|
13
13
|
}
|
|
14
|
-
export const BUTTON_COLOR_VARIANTS_CSS = {
|
|
15
|
-
primary: {
|
|
16
|
-
default: {
|
|
17
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
18
|
-
backgroundColor: theme.color.primary.action,
|
|
19
|
-
borderColor: theme.color.primary.action,
|
|
20
|
-
hoverColor: theme.color.primary.actionHover,
|
|
21
|
-
activeColor: theme.color.primary.actionActive,
|
|
22
|
-
},
|
|
23
|
-
success: {
|
|
24
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
25
|
-
backgroundColor: theme.color.success.action,
|
|
26
|
-
borderColor: theme.color.success.action,
|
|
27
|
-
hoverColor: theme.color.success.actionHover,
|
|
28
|
-
activeColor: theme.color.success.actionActive,
|
|
29
|
-
},
|
|
30
|
-
danger: {
|
|
31
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
32
|
-
backgroundColor: theme.color.danger.action,
|
|
33
|
-
borderColor: theme.color.danger.action,
|
|
34
|
-
hoverColor: theme.color.danger.actionHover,
|
|
35
|
-
activeColor: theme.color.danger.actionActive,
|
|
36
|
-
},
|
|
37
|
-
primaryBlack: {
|
|
38
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
39
|
-
backgroundColor: theme.color.primaryBlack.action,
|
|
40
|
-
borderColor: theme.color.primaryBlack.action,
|
|
41
|
-
hoverGradient: `linear-gradient(to bottom, color-mix(in srgb, ${theme.color.neutral.textOnPrimary} 16%, transparent), transparent)`,
|
|
42
|
-
activeColor: theme.color.primaryBlack.actionActive,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
secondary: {
|
|
46
|
-
default: {
|
|
47
|
-
textColor: theme.color.neutral.text,
|
|
48
|
-
backgroundColor: theme.color.neutral.backgroundMuted,
|
|
49
|
-
borderColor: theme.color.neutral.border,
|
|
50
|
-
hoverColor: theme.color.neutral.actionSecondaryHover,
|
|
51
|
-
activeColor: theme.color.neutral.actionSecondaryActive,
|
|
52
|
-
actionBorderColor: theme.color.neutral.border,
|
|
53
|
-
},
|
|
54
|
-
success: {
|
|
55
|
-
textColor: theme.color.success.text,
|
|
56
|
-
backgroundColor: theme.color.neutral.backgroundMuted,
|
|
57
|
-
borderColor: theme.color.neutral.border,
|
|
58
|
-
hoverColor: theme.color.success.actionHover,
|
|
59
|
-
activeColor: theme.color.success.actionActive,
|
|
60
|
-
actionTextColor: theme.color.neutral.background,
|
|
61
|
-
},
|
|
62
|
-
danger: {
|
|
63
|
-
textColor: theme.color.danger.text,
|
|
64
|
-
backgroundColor: theme.color.neutral.backgroundMuted,
|
|
65
|
-
borderColor: theme.color.neutral.border,
|
|
66
|
-
hoverColor: theme.color.danger.backgroundHover,
|
|
67
|
-
actionBorderColor: theme.color.danger.borderSubtle,
|
|
68
|
-
activeColor: theme.color.danger.actionActive,
|
|
69
|
-
activeTextColor: theme.color.neutral.textOnPrimary,
|
|
70
|
-
},
|
|
71
|
-
primaryBlack: {
|
|
72
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
73
|
-
backgroundColor: theme.color.primaryBlack.action,
|
|
74
|
-
borderColor: theme.color.primaryBlack.action,
|
|
75
|
-
hoverGradient: `linear-gradient(to bottom, color-mix(in srgb, ${theme.color.neutral.textOnPrimary} 16%, transparent), transparent)`,
|
|
76
|
-
activeColor: theme.color.primaryBlack.actionActive,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
tertiary: {
|
|
80
|
-
default: {
|
|
81
|
-
textColor: theme.color.neutral.text,
|
|
82
|
-
backgroundColor: 'transparent',
|
|
83
|
-
borderColor: 'transparent',
|
|
84
|
-
// TODO: Not sure about these
|
|
85
|
-
hoverColor: theme.color.neutral.hover,
|
|
86
|
-
activeColor: theme.color.neutral.actionSecondaryActive,
|
|
87
|
-
},
|
|
88
|
-
success: {
|
|
89
|
-
textColor: theme.color.success.text,
|
|
90
|
-
backgroundColor: 'transparent',
|
|
91
|
-
borderColor: 'transparent',
|
|
92
|
-
hoverColor: theme.color.success.backgroundSubtleHover,
|
|
93
|
-
activeColor: theme.color.success.backgroundSubtleActive,
|
|
94
|
-
},
|
|
95
|
-
danger: {
|
|
96
|
-
textColor: theme.color.danger.text,
|
|
97
|
-
backgroundColor: 'transparent',
|
|
98
|
-
borderColor: 'transparent',
|
|
99
|
-
hoverColor: theme.color.danger.backgroundSubtleHover,
|
|
100
|
-
activeColor: theme.color.danger.backgroundSubtleActive,
|
|
101
|
-
},
|
|
102
|
-
primaryBlack: {
|
|
103
|
-
textColor: theme.color.neutral.textOnPrimary,
|
|
104
|
-
backgroundColor: theme.color.primaryBlack.action,
|
|
105
|
-
borderColor: theme.color.primaryBlack.action,
|
|
106
|
-
hoverGradient: `linear-gradient(to bottom, color-mix(in srgb, ${theme.color.neutral.textOnPrimary} 16%, transparent), transparent)`,
|
|
107
|
-
activeColor: theme.color.primaryBlack.actionActive,
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
export const BUTTON_SIZE_VARIANTS_CSS = {
|
|
112
|
-
extraLarge: {
|
|
113
|
-
typography: theme.typography.shared.mobile.bodyMMedium,
|
|
114
|
-
size: 40,
|
|
115
|
-
horizontalPadding: 12,
|
|
116
|
-
borderRadius: theme.radius.radius8,
|
|
117
|
-
iconSize: '20',
|
|
118
|
-
},
|
|
119
|
-
large: {
|
|
120
|
-
typography: theme.typography.shared.mobile.bodyMMedium,
|
|
121
|
-
size: 36,
|
|
122
|
-
horizontalPadding: 12,
|
|
123
|
-
borderRadius: theme.radius.radius6,
|
|
124
|
-
iconSize: '20',
|
|
125
|
-
},
|
|
126
|
-
medium: {
|
|
127
|
-
typography: theme.typography.shared.mobile.bodyMMedium,
|
|
128
|
-
size: 32,
|
|
129
|
-
horizontalPadding: 12,
|
|
130
|
-
borderRadius: theme.radius.radius6,
|
|
131
|
-
iconSize: '20',
|
|
132
|
-
},
|
|
133
|
-
small: {
|
|
134
|
-
typography: theme.typography.shared.mobile.bodySMedium,
|
|
135
|
-
size: 28,
|
|
136
|
-
horizontalPadding: 8,
|
|
137
|
-
borderRadius: theme.radius.radius6,
|
|
138
|
-
iconSize: '16',
|
|
139
|
-
},
|
|
140
|
-
extraSmall: {
|
|
141
|
-
typography: theme.typography.shared.mobile.bodySMedium,
|
|
142
|
-
size: 24,
|
|
143
|
-
horizontalPadding: 6,
|
|
144
|
-
borderRadius: theme.radius.radius6,
|
|
145
|
-
iconSize: '16',
|
|
146
|
-
},
|
|
147
|
-
};
|
|
148
|
-
export const getButtonColorStyles = (variant = 'primary', color = 'default') => {
|
|
149
|
-
const { backgroundColor, borderColor, textColor, actionBorderColor, actionTextColor, hoverColor, hoverGradient, activeColor, activeTextColor, } = BUTTON_COLOR_VARIANTS_CSS[variant][color];
|
|
150
|
-
return css `
|
|
151
|
-
color: ${textColor};
|
|
152
|
-
background-color: ${backgroundColor};
|
|
153
|
-
border-color: ${borderColor};
|
|
154
|
-
|
|
155
|
-
&:hover {
|
|
156
|
-
color: ${actionTextColor || textColor};
|
|
157
|
-
${hoverGradient
|
|
158
|
-
? css `
|
|
159
|
-
background-image: ${hoverGradient};
|
|
160
|
-
background-color: ${backgroundColor};
|
|
161
|
-
`
|
|
162
|
-
: css `
|
|
163
|
-
background-color: ${hoverColor};
|
|
164
|
-
`}
|
|
165
|
-
border-color: ${actionBorderColor || (hoverGradient ? borderColor : hoverColor)};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&:active {
|
|
169
|
-
color: ${activeTextColor || actionTextColor || textColor};
|
|
170
|
-
background-color: ${activeColor};
|
|
171
|
-
${hoverGradient && 'background-image: none;'}
|
|
172
|
-
border-color: ${actionBorderColor || activeColor};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:disabled {
|
|
176
|
-
color: ${theme.color.neutral.textDisabled};
|
|
177
|
-
background-color: ${variant === 'tertiary' ? 'transparent' : theme.color.neutral.disabled};
|
|
178
|
-
border-color: ${variant === 'tertiary' ? 'transparent' : theme.color.neutral.disabled};
|
|
179
|
-
|
|
180
|
-
cursor: default;
|
|
181
|
-
}
|
|
182
|
-
`;
|
|
183
|
-
};
|
|
184
|
-
export const getButtonSizeStyles = (size = 'medium') => {
|
|
185
|
-
const { typography, size: height, horizontalPadding, borderRadius } = BUTTON_SIZE_VARIANTS_CSS[size];
|
|
186
|
-
return css `
|
|
187
|
-
${typography};
|
|
188
|
-
height: ${height}px;
|
|
189
|
-
/* We just want to ensure padding on the sides. Height is set the the hard way for simplicity */
|
|
190
|
-
padding: 0 ${horizontalPadding}px;
|
|
191
|
-
border-radius: ${borderRadius};
|
|
192
|
-
`;
|
|
193
|
-
};
|
|
194
|
-
const StyledButton = styled(Box) `
|
|
195
|
-
/* Basic positioning */
|
|
196
|
-
display: inline-flex;
|
|
197
|
-
align-items: center;
|
|
198
|
-
/* NOT sure about this. It needs to be set when we want 100% width button */
|
|
199
|
-
/* Maybe we can add block property */
|
|
200
|
-
justify-content: center;
|
|
201
|
-
gap: ${theme.space.space4};
|
|
202
|
-
|
|
203
|
-
/* Basic styles */
|
|
204
|
-
white-space: nowrap;
|
|
205
|
-
cursor: pointer;
|
|
206
|
-
transition:
|
|
207
|
-
border-color ${theme.transition.fastEaseOut},
|
|
208
|
-
background-color ${theme.transition.fastEaseOut};
|
|
209
|
-
|
|
210
|
-
/* Border is always defined, but it can be set to transparent */
|
|
211
|
-
border-style: solid;
|
|
212
|
-
border-width: 1px;
|
|
213
|
-
border-color: transparent;
|
|
214
|
-
|
|
215
|
-
/* Colors */
|
|
216
|
-
${(props) => getButtonColorStyles(props.$variant, props.$color)}
|
|
217
|
-
|
|
218
|
-
/* Paddings & font size */
|
|
219
|
-
${(props) => getButtonSizeStyles(props.$size)}
|
|
220
|
-
`;
|
|
221
14
|
export const Button = forwardRef((props, ref) => {
|
|
222
|
-
const { as, children, size = 'medium', color = 'default', variant = 'primary', type = 'button', LeftIcon, RightIcon, onClick, trackingId, trackingData, ...rest } = props;
|
|
15
|
+
const { as, children, size = 'medium', color = 'default', variant = 'primary', animated = false, type = 'button', LeftIcon, RightIcon, onClick, trackingId, trackingData, className, m, mt, mb, ml, mr, mx, my, ...rest } = props;
|
|
223
16
|
const { trackClick, windowLocationHost } = useSharedUiDependencies();
|
|
224
17
|
const trackedOnClick = (e) => {
|
|
225
18
|
if (trackClick && trackingId)
|
|
@@ -227,16 +20,26 @@ export const Button = forwardRef((props, ref) => {
|
|
|
227
20
|
if (onClick)
|
|
228
21
|
onClick(e);
|
|
229
22
|
};
|
|
230
|
-
const { iconSize } = BUTTON_SIZE_VARIANTS_CSS[size];
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
23
|
+
const { iconSize, borderRadius } = BUTTON_SIZE_VARIANTS_CSS[size];
|
|
24
|
+
// When animated, these are applied to the outer wrapper instead of the button (see below).
|
|
25
|
+
const layoutProps = { className, m, mt, mb, ml, mr, mx, my };
|
|
26
|
+
const renderButton = (buttonLayoutProps = {}) => {
|
|
27
|
+
if (isAnchorButton(props)) {
|
|
28
|
+
const isExternal = isUrlExternal(props.to, windowLocationHost);
|
|
29
|
+
const EffectiveRightIcon = isExternal && !props.hideExternalIcon ? ExternalLinkIcon : RightIcon;
|
|
30
|
+
return (_jsxs(StyledButton, { "$size": size, "$color": color, "$variant": variant,
|
|
31
|
+
// If anchor is undefined, we just render it as a regular button
|
|
32
|
+
forwardedAs: props.disabled ? 'button' : Link, ref: ref, onClick: trackedOnClick, to: props.to, ...rest, ...buttonLayoutProps,
|
|
33
|
+
// If we want to show external icon, we use button's slot for icon
|
|
34
|
+
hideExternalIcon: true, children: [LeftIcon && _jsx(LeftIcon, { size: iconSize }), children, EffectiveRightIcon && _jsx(EffectiveRightIcon, { size: iconSize })] }));
|
|
35
|
+
}
|
|
36
|
+
return (_jsxs(StyledButton, { "$size": size, "$color": color, "$variant": variant, forwardedAs: as || 'button', ref: ref, onClick: trackedOnClick, type: type, ...rest, ...buttonLayoutProps, children: [LeftIcon && _jsx(LeftIcon, { size: iconSize }), children, RightIcon && _jsx(RightIcon, { size: iconSize })] }));
|
|
37
|
+
};
|
|
38
|
+
// The animated shine sweep is only available for the primary variant.
|
|
39
|
+
// A disabled button should look inert, so it never shimmers.
|
|
40
|
+
if (animated && variant === 'primary' && !props.disabled) {
|
|
41
|
+
return (_jsx(AnimatedBorder, { forwardedAs: "span", "$radius": borderRadius, ...layoutProps, children: renderButton() }));
|
|
239
42
|
}
|
|
240
|
-
return (
|
|
43
|
+
return renderButton(layoutProps);
|
|
241
44
|
});
|
|
242
45
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAiD,MAAM,QAAQ,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,IA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,OAAO,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvD,OAAO,CACH,KAAC,cAAc,IAAC,WAAW,EAAC,MAAM,aAAU,YAAY,KAAM,WAAW,YACpE,YAAY,EAAE,GACF,CACpB,CAAC;IACN,CAAC;IAED,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type IconSize } from '@apify/ui-icons';
|
|
2
|
+
import { type WithTransientProps } from '../../type_utils';
|
|
3
|
+
import type { ButtonColor, ButtonSize, ButtonVariant, TransientButtonProps } from './button';
|
|
4
|
+
type ButtonColorCombinations = {
|
|
5
|
+
[Type in ButtonVariant]: {
|
|
6
|
+
[Size in ButtonColor]: {
|
|
7
|
+
textColor: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
actionTextColor?: string;
|
|
11
|
+
actionBorderColor?: string;
|
|
12
|
+
hoverColor?: string;
|
|
13
|
+
hoverGradient?: string;
|
|
14
|
+
activeColor?: string;
|
|
15
|
+
activeTextColor?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type ButtonSizeCombinations = {
|
|
20
|
+
[Size in ButtonSize]: {
|
|
21
|
+
typography: string;
|
|
22
|
+
size: number;
|
|
23
|
+
horizontalPadding: number;
|
|
24
|
+
borderRadius: string;
|
|
25
|
+
iconSize: IconSize;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const BUTTON_COLOR_VARIANTS_CSS: ButtonColorCombinations;
|
|
29
|
+
export declare const BUTTON_SIZE_VARIANTS_CSS: ButtonSizeCombinations;
|
|
30
|
+
export declare const getButtonColorStyles: (variant?: ButtonVariant, color?: ButtonColor) => import("styled-components").RuleSet<object>;
|
|
31
|
+
export declare const getButtonSizeStyles: (size?: ButtonSize) => import("styled-components").RuleSet<object>;
|
|
32
|
+
export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(import("..").BoxProps & import("react").RefAttributes<HTMLElement>) & import("styled-components/dist/types").BaseObject, WithTransientProps<Required<TransientButtonProps>>>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<HTMLElement>>, keyof import("react").Component<any, {}, any>>;
|
|
33
|
+
export declare const AnimatedBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(import("..").BoxProps & import("react").RefAttributes<HTMLElement>) & import("styled-components/dist/types").BaseObject, {
|
|
34
|
+
$radius: string;
|
|
35
|
+
}>> & string & Omit<import("react").ForwardRefExoticComponent<import("..").BoxProps & import("react").RefAttributes<HTMLElement>>, keyof import("react").Component<any, {}, any>>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=button.style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button.style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE7F,KAAK,uBAAuB,GAAG;KAC1B,IAAI,IAAI,aAAa,GAAG;SACpB,IAAI,IAAI,WAAW,GAAG;YACnB,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,eAAe,EAAE,MAAM,CAAC;YAGxB,eAAe,CAAC,EAAE,MAAM,CAAC;YAEzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAG3B,UAAU,CAAC,EAAE,MAAM,CAAC;YAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;YAGvB,WAAW,CAAC,EAAE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