@kaizen/components 1.67.21 → 1.68.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/cjs/EmptyState/EmptyState.cjs +15 -17
- package/dist/cjs/EmptyState/EmptyState.module.css.cjs +20 -0
- package/dist/cjs/__actions__/Button/v3/Button.cjs +43 -8
- package/dist/cjs/__actions__/Button/v3/Button.module.css.cjs +21 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.cjs +37 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css.cjs +9 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.cjs +35 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css.cjs +8 -0
- package/dist/cjs/__overlays__/Tooltip/v3/Tooltip.cjs +2 -2
- package/dist/esm/EmptyState/EmptyState.mjs +15 -17
- package/dist/esm/EmptyState/EmptyState.module.css.mjs +18 -0
- package/dist/esm/__actions__/Button/v3/Button.mjs +44 -9
- package/dist/esm/__actions__/Button/v3/Button.module.css.mjs +19 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.mjs +28 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css.mjs +7 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.mjs +26 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css.mjs +6 -0
- package/dist/esm/__overlays__/Tooltip/v3/Tooltip.mjs +1 -1
- package/dist/styles.css +360 -246
- package/dist/types/EmptyState/EmptyState.d.ts +2 -1
- package/dist/types/__actions__/Button/v3/Button.d.ts +17 -4
- package/dist/types/__actions__/Button/v3/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.d.ts +11 -0
- package/dist/types/__actions__/Button/v3/subcomponents/ButtonContent/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.d.ts +5 -0
- package/dist/types/__actions__/Button/v3/subcomponents/PendingContent/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/index.d.ts +2 -0
- package/dist/types/__actions__/Button/v3/types.d.ts +21 -0
- package/package.json +1 -1
- package/src/EmptyState/EmptyState.module.css +114 -0
- package/src/EmptyState/EmptyState.tsx +18 -20
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +55 -39
- package/src/__actions__/Button/v3/Button.module.css +235 -0
- package/src/__actions__/Button/v3/Button.tsx +92 -29
- package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +150 -0
- package/src/__actions__/Button/v3/_docs/Button--usage-guidelines.mdx +30 -0
- package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +112 -50
- package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +80 -120
- package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +183 -81
- package/src/__actions__/Button/v3/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css +19 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.tsx +40 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css +16 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.tsx +28 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/index.ts +2 -0
- package/src/__actions__/Button/v3/types.ts +25 -0
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +54 -18
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +30 -10
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -4
- package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +7 -7
- package/src/__overlays__/Tooltip/v3/Tooltip.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +2 -0
- package/dist/cjs/EmptyState/EmptyState.module.scss.cjs +0 -23
- package/dist/cjs/__actions__/Button/v3/Button.module.scss.cjs +0 -9
- package/dist/esm/EmptyState/EmptyState.module.scss.mjs +0 -21
- package/dist/esm/__actions__/Button/v3/Button.module.scss.mjs +0 -7
- package/src/EmptyState/EmptyState.module.scss +0 -186
- package/src/EmptyState/EmptyState.spec.tsx +0 -48
- package/src/EmptyState/_mixins.scss +0 -44
- package/src/__actions__/Button/v3/Button.module.scss +0 -104
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +0 -173
- package/src/__actions__/Button/v3/_docs/Button.mdx +0 -41
- package/src/__actions__/Button/v3/_docs/Button.stories.tsx +0 -98
|
@@ -17,6 +17,7 @@ export type EmptyStateProps = {
|
|
|
17
17
|
* @default informative
|
|
18
18
|
*/
|
|
19
19
|
variant?: "success" | "warning" | "informative" | "expert-advice";
|
|
20
|
+
/** @deprecated - This prop no longer has any effect */
|
|
20
21
|
layoutContext?: "sidebarAndContent" | "contentOnly";
|
|
21
22
|
bodyText: string | React.ReactNode;
|
|
22
23
|
straightCorners?: boolean;
|
|
@@ -27,6 +28,6 @@ export type EmptyStateProps = {
|
|
|
27
28
|
* {@link https://cultureamp.design/?path=/docs/components-empty-state--docs Storybook}
|
|
28
29
|
*/
|
|
29
30
|
export declare const EmptyState: {
|
|
30
|
-
({ children, id, illustrationType, variant, layoutContext, headingProps, bodyText, straightCorners, isAnimated, loop, classNameOverride, ...props }: EmptyStateProps): JSX.Element;
|
|
31
|
+
({ children, id, illustrationType, variant, layoutContext: _, headingProps, bodyText, straightCorners, isAnimated, loop, classNameOverride, ...props }: EmptyStateProps): JSX.Element;
|
|
31
32
|
displayName: string;
|
|
32
33
|
};
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ButtonProps as RACButtonProps } from "react-aria-components";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import { ButtonSizes, ButtonVariants, PendingButtonProps } from "./types";
|
|
4
|
+
type ButtonBaseProps = Omit<RACButtonProps, "children"> & {
|
|
5
|
+
/** Used as the label for the button. */
|
|
6
|
+
children: RACButtonProps["children"];
|
|
7
|
+
/** Visually hides the Button's child content used as the label and the `pendingLabel`. Use for icon-only `Button`. @default "false" */
|
|
8
|
+
hasHiddenLabel?: boolean;
|
|
4
9
|
/** The visual style of the button.
|
|
5
10
|
* @default "default" */
|
|
6
11
|
variant?: ButtonVariants;
|
|
7
12
|
/** The visual size of the button. `medium` was formerly `regular`
|
|
8
13
|
* @default "medium" */
|
|
9
|
-
size?:
|
|
14
|
+
size?: ButtonSizes;
|
|
15
|
+
/** Renders an icon at the `iconPosition` provided. To the size scales with the button, we recommend using the `Icon` component from `"@kaizen/components/future"` */
|
|
16
|
+
icon?: JSX.Element;
|
|
17
|
+
/** Controls the position of the Icon passed in as props. @default "start" */
|
|
18
|
+
iconPosition?: "start" | "end";
|
|
19
|
+
/** Controls if the button inherits width from its parent. @default "false" */
|
|
20
|
+
isFullWidth?: boolean;
|
|
10
21
|
};
|
|
11
|
-
export
|
|
22
|
+
export type ButtonProps = ButtonBaseProps & PendingButtonProps;
|
|
23
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { ButtonProps } from "../../Button";
|
|
3
|
+
type ButtonContentProps = {
|
|
4
|
+
size?: ButtonProps["size"];
|
|
5
|
+
icon?: ButtonProps["icon"];
|
|
6
|
+
iconPosition?: ButtonProps["iconPosition"];
|
|
7
|
+
hasHiddenLabel?: ButtonProps["hasHiddenLabel"];
|
|
8
|
+
} & HTMLAttributes<HTMLSpanElement>;
|
|
9
|
+
/** Renders the inner content of the button, handling icon and label visibility */
|
|
10
|
+
export declare const ButtonContent: ({ children, hasHiddenLabel, size, icon, iconPosition, className, ...restProps }: ButtonContentProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ButtonContent";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonSizes, PendingProps } from "../../types";
|
|
2
|
+
/** Renders the pending content of the button, handling pending label visibility and spinner positioning */
|
|
3
|
+
export declare const PendingContent: ({ pendingLabel, hasHiddenPendingLabel, size, }: PendingProps & {
|
|
4
|
+
size?: ButtonSizes;
|
|
5
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PendingContent";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ButtonVariants = "primary" | "secondary" | "tertiary";
|
|
2
|
+
export type ButtonSizes = "small" | "medium" | "large";
|
|
3
|
+
export type PendingPropsUndefined = {
|
|
4
|
+
isPending?: undefined;
|
|
5
|
+
/** Rendered as the child while `isPending` is `true`. This determines the accessible label for the Button while pending. */
|
|
6
|
+
pendingLabel?: never;
|
|
7
|
+
/** Visually hides the `pendingLabel` and renders the loading spinner. This will maintain the width of the Button's `children` to avoid layout shifts.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
hasHiddenPendingLabel?: never;
|
|
11
|
+
};
|
|
12
|
+
export type PendingProps = {
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
/** Rendered as the child while `pendingLabel` is `true`. This determines the accessible label for the Button while pending. */
|
|
15
|
+
pendingLabel: string;
|
|
16
|
+
/** Visually Hides the `pendingLabel` and renders the loading spinner. This will maintain the width of the Button's `children` to avoid layout shifts.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
hasHiddenPendingLabel?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type PendingButtonProps = PendingProps | PendingPropsUndefined;
|
package/package.json
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
--empty-state-border-width: var(--border-width-1);
|
|
3
|
+
--empty-state-illustration-max-height: 366px;
|
|
4
|
+
--empty-state-illustration-max-width: 420px;
|
|
5
|
+
--empty-state-text-container-max-width: 426px;
|
|
6
|
+
|
|
7
|
+
container-type: inline-size;
|
|
8
|
+
width: 100%;
|
|
9
|
+
border: var(--empty-state-border-width) solid var(--empty-state-border-color);
|
|
10
|
+
border-radius: var(--border-solid-border-radius);
|
|
11
|
+
background-color: var(--empty-state-background-color);
|
|
12
|
+
color: var(--color-purple-800);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.straightCorners {
|
|
16
|
+
border-radius: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** @deprecated */
|
|
20
|
+
.positive {
|
|
21
|
+
--empty-state-border-color: var(--color-green-500);
|
|
22
|
+
--empty-state-background-color: var(--color-green-100);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.negative,
|
|
26
|
+
.action {
|
|
27
|
+
--empty-state-border-color: var(--color-red-500);
|
|
28
|
+
--empty-state-background-color: var(--color-red-100);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.neutral {
|
|
32
|
+
--empty-state-border-color: var(--color-purple-400);
|
|
33
|
+
--empty-state-background-color: var(--color-purple-100);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** end @deprecated */
|
|
37
|
+
.success {
|
|
38
|
+
--empty-state-border-color: var(--color-green-500);
|
|
39
|
+
--empty-state-background-color: var(--color-green-100);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.warning {
|
|
43
|
+
--empty-state-border-color: var(--color-red-500);
|
|
44
|
+
--empty-state-background-color: var(--color-red-100);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.informative {
|
|
48
|
+
--empty-state-border-color: var(--color-blue-400);
|
|
49
|
+
--empty-state-background-color: var(--color-blue-100);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.expert-advice {
|
|
53
|
+
--empty-state-border-color: var(--color-purple-400);
|
|
54
|
+
--empty-state-background-color: var(--color-purple-100);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.content {
|
|
58
|
+
justify-content: center;
|
|
59
|
+
display: grid;
|
|
60
|
+
grid-template-columns: minmax(auto, var(--empty-state-illustration-max-width)) minmax(
|
|
61
|
+
auto,
|
|
62
|
+
var(--empty-state-text-container-max-width)
|
|
63
|
+
);
|
|
64
|
+
grid-template-rows: minmax(auto, var(--empty-state-illustration-max-height)) auto;
|
|
65
|
+
padding: var(--spacing-24);
|
|
66
|
+
grid-column-gap: var(--spacing-32);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.illustrationContainer {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.illustration,
|
|
75
|
+
.illustrationContainer video {
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
max-height: var(--empty-state-illustration-max-height);
|
|
78
|
+
height: 100%;
|
|
79
|
+
width: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.textContainer {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
gap: var(--spacing-24);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@container (width <=1024px) {
|
|
90
|
+
.content {
|
|
91
|
+
padding: var(--spacing-16);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@container (width <=560px) {
|
|
96
|
+
.content {
|
|
97
|
+
grid-template-columns: 1fr;
|
|
98
|
+
grid-template-rows: auto;
|
|
99
|
+
grid-column-gap: unset;
|
|
100
|
+
grid-row-gap: var(--spacing-24);
|
|
101
|
+
padding: var(--spacing-24);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.illustrationContainer {
|
|
105
|
+
--empty-state-illustration-max-height: 210px;
|
|
106
|
+
|
|
107
|
+
justify-content: center;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.heading {
|
|
111
|
+
font-size: 1.25rem;
|
|
112
|
+
line-height: 1.5rem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "~components/Illustration"
|
|
11
11
|
import { Text } from "~components/Text"
|
|
12
12
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
13
|
-
import styles from "./EmptyState.module.
|
|
13
|
+
import styles from "./EmptyState.module.css"
|
|
14
14
|
|
|
15
15
|
const ILLUSTRATIONS: Record<
|
|
16
16
|
string,
|
|
@@ -50,6 +50,7 @@ export type EmptyStateProps = {
|
|
|
50
50
|
* @default informative
|
|
51
51
|
*/
|
|
52
52
|
variant?: "success" | "warning" | "informative" | "expert-advice"
|
|
53
|
+
/** @deprecated - This prop no longer has any effect */
|
|
53
54
|
layoutContext?: "sidebarAndContent" | "contentOnly"
|
|
54
55
|
bodyText: string | React.ReactNode
|
|
55
56
|
straightCorners?: boolean
|
|
@@ -66,7 +67,7 @@ export const EmptyState = ({
|
|
|
66
67
|
id,
|
|
67
68
|
illustrationType,
|
|
68
69
|
variant = "informative",
|
|
69
|
-
layoutContext
|
|
70
|
+
layoutContext: _,
|
|
70
71
|
headingProps,
|
|
71
72
|
bodyText,
|
|
72
73
|
straightCorners,
|
|
@@ -82,33 +83,30 @@ export const EmptyState = ({
|
|
|
82
83
|
className={classnames(
|
|
83
84
|
styles.container,
|
|
84
85
|
illustrationType ? styles[illustrationType] : styles[variant],
|
|
85
|
-
styles[layoutContext],
|
|
86
86
|
straightCorners && styles.straightCorners,
|
|
87
87
|
classNameOverride
|
|
88
88
|
)}
|
|
89
89
|
id={id}
|
|
90
90
|
{...props}
|
|
91
91
|
>
|
|
92
|
-
<div className={styles.
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<div className={styles.
|
|
92
|
+
<div className={styles.content}>
|
|
93
|
+
<div className={styles.illustrationContainer}>
|
|
94
|
+
{isAnimated ? (
|
|
95
|
+
<IllustrationComponent
|
|
96
|
+
isAnimated
|
|
97
|
+
loop={loop}
|
|
98
|
+
classNameOverride={styles.illustration}
|
|
99
|
+
/>
|
|
100
|
+
) : (
|
|
101
|
+
<IllustrationComponent classNameOverride={styles.illustration} />
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
<div className={styles.textContainer}>
|
|
105
105
|
{headingProps && (
|
|
106
106
|
<Heading classNameOverride={styles.heading} {...headingProps} />
|
|
107
107
|
)}
|
|
108
|
-
<Text variant="body"
|
|
109
|
-
|
|
110
|
-
</Text>
|
|
111
|
-
{children}
|
|
108
|
+
<Text variant="body">{bodyText}</Text>
|
|
109
|
+
{children && <span>{children}</span>}
|
|
112
110
|
</div>
|
|
113
111
|
</div>
|
|
114
112
|
</div>
|
|
@@ -6,7 +6,7 @@ import { Icon } from "~components/__future__/Icon"
|
|
|
6
6
|
import {
|
|
7
7
|
StickerSheet,
|
|
8
8
|
StickerSheetStory,
|
|
9
|
-
} from "~storybook/components/StickerSheet"
|
|
9
|
+
} from "~storybook/components/_future/StickerSheet"
|
|
10
10
|
import { EmptyState, EmptyStateProps } from "../index"
|
|
11
11
|
|
|
12
12
|
export default {
|
|
@@ -23,7 +23,9 @@ const EmptyStateWrapper = ({
|
|
|
23
23
|
isAnimated,
|
|
24
24
|
...args
|
|
25
25
|
}: EmptyStateProps): JSX.Element => (
|
|
26
|
-
<
|
|
26
|
+
<div>
|
|
27
|
+
<EmptyState isAnimated={IS_CHROMATIC ? false : isAnimated} {...args} />
|
|
28
|
+
</div>
|
|
27
29
|
)
|
|
28
30
|
|
|
29
31
|
const StickerSheetTemplate: StickerSheetStory = {
|
|
@@ -54,50 +56,64 @@ const StickerSheetTemplate: StickerSheetStory = {
|
|
|
54
56
|
|
|
55
57
|
return (
|
|
56
58
|
<>
|
|
57
|
-
<StickerSheet isReversed={isReversed}
|
|
58
|
-
|
|
59
|
-
{
|
|
60
|
-
<
|
|
61
|
-
<EmptyStateWrapper {...defaultProps} variant={variant} />
|
|
62
|
-
</StickerSheet.Row>
|
|
63
|
-
))}
|
|
64
|
-
</StickerSheet.Body>
|
|
65
|
-
<StickerSheet.Body>
|
|
66
|
-
<StickerSheet.Row rowTitle="straightCorners">
|
|
67
|
-
<EmptyStateWrapper {...defaultProps} straightCorners />
|
|
59
|
+
<StickerSheet isReversed={isReversed} title="EmptyState">
|
|
60
|
+
{variants.map(variant => (
|
|
61
|
+
<StickerSheet.Row key={variant} header={variant}>
|
|
62
|
+
<EmptyStateWrapper {...defaultProps} variant={variant} />
|
|
68
63
|
</StickerSheet.Row>
|
|
69
|
-
|
|
64
|
+
))}
|
|
65
|
+
<StickerSheet.Row header="straightCorners">
|
|
66
|
+
<EmptyStateWrapper {...defaultProps} straightCorners />
|
|
67
|
+
</StickerSheet.Row>
|
|
68
|
+
</StickerSheet>
|
|
69
|
+
|
|
70
|
+
<StickerSheet isReversed={isReversed} title="Responsive breakpoints">
|
|
71
|
+
<StickerSheet.Row header="Above 1024px">
|
|
72
|
+
<StickerSheet.Cell style={{ width: 1025 }}>
|
|
73
|
+
<EmptyStateWrapper {...defaultProps} />
|
|
74
|
+
</StickerSheet.Cell>
|
|
75
|
+
</StickerSheet.Row>
|
|
76
|
+
<StickerSheet.Row header="Above 560px and below or equal to 1024px (max)">
|
|
77
|
+
<StickerSheet.Cell style={{ width: 1024 }}>
|
|
78
|
+
<EmptyStateWrapper {...defaultProps} />
|
|
79
|
+
</StickerSheet.Cell>
|
|
80
|
+
</StickerSheet.Row>
|
|
81
|
+
<StickerSheet.Row header="Above 560px and below or equal to 1024px (min)">
|
|
82
|
+
<StickerSheet.Cell style={{ width: 561 }}>
|
|
83
|
+
<EmptyStateWrapper {...defaultProps} />
|
|
84
|
+
</StickerSheet.Cell>
|
|
85
|
+
</StickerSheet.Row>
|
|
86
|
+
<StickerSheet.Row header="Below or equal to 560px">
|
|
87
|
+
<StickerSheet.Cell style={{ width: 560 }}>
|
|
88
|
+
<EmptyStateWrapper {...defaultProps} />
|
|
89
|
+
</StickerSheet.Cell>
|
|
90
|
+
</StickerSheet.Row>
|
|
70
91
|
</StickerSheet>
|
|
71
92
|
|
|
72
93
|
<StickerSheet
|
|
73
94
|
isReversed={isReversed}
|
|
74
|
-
|
|
95
|
+
title="Illustration type (deprecated)"
|
|
75
96
|
>
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
97
|
+
{illustrationTypes.map(illustrationType => (
|
|
98
|
+
<StickerSheet.Row key={illustrationType} header={illustrationType}>
|
|
99
|
+
<EmptyStateWrapper
|
|
100
|
+
{...defaultProps}
|
|
101
|
+
illustrationType={illustrationType}
|
|
81
102
|
>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/>
|
|
97
|
-
</EmptyStateWrapper>
|
|
98
|
-
</StickerSheet.Row>
|
|
99
|
-
))}
|
|
100
|
-
</StickerSheet.Body>
|
|
103
|
+
<Button
|
|
104
|
+
label="Label"
|
|
105
|
+
icon={
|
|
106
|
+
<Icon
|
|
107
|
+
name="chevron_right"
|
|
108
|
+
isPresentational
|
|
109
|
+
shouldMirrorInRTL
|
|
110
|
+
/>
|
|
111
|
+
}
|
|
112
|
+
iconPosition="end"
|
|
113
|
+
/>
|
|
114
|
+
</EmptyStateWrapper>
|
|
115
|
+
</StickerSheet.Row>
|
|
116
|
+
))}
|
|
101
117
|
</StickerSheet>
|
|
102
118
|
</>
|
|
103
119
|
)
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
/* RESET */
|
|
3
|
+
appearance: none;
|
|
4
|
+
background: transparent;
|
|
5
|
+
font: inherit;
|
|
6
|
+
margin: 0;
|
|
7
|
+
outline: none;
|
|
8
|
+
-webkit-font-smoothing: antialiased;
|
|
9
|
+
-moz-osx-font-smoothing: grayscale;
|
|
10
|
+
|
|
11
|
+
--button-min-x-y: var(--spacing-40);
|
|
12
|
+
--button-border-width: var(--border-solid-border-width);
|
|
13
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
14
|
+
--button-padding-x: calc(var(--spacing-16) - var(--button-border-width));
|
|
15
|
+
|
|
16
|
+
background-color: var(--button-bg-color, var(--color-blue-500));
|
|
17
|
+
border: var(--button-border-width) solid;
|
|
18
|
+
border-radius: var(--border-solid-border-radius);
|
|
19
|
+
border-color: var(--button-border-color, var(--color-blue-500));
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
color: var(--button-text-color, var(--color-white));
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
text-align: start;
|
|
26
|
+
font-family: var(
|
|
27
|
+
--button-font-family,
|
|
28
|
+
var(--typography-paragraph-body-font-family)
|
|
29
|
+
);
|
|
30
|
+
font-weight: var(--button-font-weight, 500);
|
|
31
|
+
font-size: var(--button-font-size, 1rem);
|
|
32
|
+
line-height: var(--button-line-height, 1.5rem);
|
|
33
|
+
min-height: var(--button-min-x-y);
|
|
34
|
+
min-width: var(--button-min-x-y);
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: var(--button-padding-y) var(--button-padding-x);
|
|
37
|
+
|
|
38
|
+
&[data-hovered] {
|
|
39
|
+
--button-bg-color: var(--color-blue-600);
|
|
40
|
+
--button-border-color: var(--color-blue-600);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[data-pressed] {
|
|
44
|
+
--button-bg-color: var(--color-blue-700);
|
|
45
|
+
--button-border-color: var(--color-blue-700);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[data-pending] {
|
|
49
|
+
--button-bg-color: var(--color-blue-700);
|
|
50
|
+
--button-border-color: var(--color-blue-700);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[data-focus-visible]::after {
|
|
54
|
+
content: "";
|
|
55
|
+
position: absolute;
|
|
56
|
+
background: transparent;
|
|
57
|
+
border-color: var(--color-blue-500);
|
|
58
|
+
border-radius: var(--border-focus-ring-border-radius);
|
|
59
|
+
border-width: var(--border-focus-ring-border-width);
|
|
60
|
+
border-style: var(--border-focus-ring-border-style);
|
|
61
|
+
inset: calc(-1 * (var(--border-focus-ring-border-width) * 2) - 1px);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.fullWidth {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.small {
|
|
70
|
+
--button-font-size: 0.75rem;
|
|
71
|
+
--button-line-height: 1rem;
|
|
72
|
+
--button-min-x-y: var(--spacing-32);
|
|
73
|
+
--icon-size: 16;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.medium {
|
|
77
|
+
--button-padding-x: calc(var(--spacing-20) - var(--button-border-width));
|
|
78
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
79
|
+
--button-min-x-y: var(--spacing-40);
|
|
80
|
+
--icon-size: 24;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.large {
|
|
84
|
+
--button-padding-x: calc(var(--spacing-24) - var(--button-border-width));
|
|
85
|
+
--button-padding-y: calc(var(--spacing-12) - var(--button-border-width));
|
|
86
|
+
--button-min-x-y: var(--spacing-48);
|
|
87
|
+
--icon-size: 24;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.smallIconButton,
|
|
91
|
+
.mediumIconButton {
|
|
92
|
+
--button-padding-x: calc(var(--spacing-8) - var(--button-border-width));
|
|
93
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.largeIconButton {
|
|
97
|
+
--button-padding-x: calc(var(--spacing-12) - var(--button-border-width));
|
|
98
|
+
--button-padding-y: calc(var(--spacing-12) - var(--button-border-width));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.secondary {
|
|
102
|
+
--button-bg-color: var(--color-white);
|
|
103
|
+
--button-border-color: var(--color-gray-500);
|
|
104
|
+
--button-text-color: var(--color-purple-800);
|
|
105
|
+
|
|
106
|
+
&[data-hovered] {
|
|
107
|
+
--button-bg-color: var(--color-gray-200);
|
|
108
|
+
--button-border-color: var(--color-gray-600);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&[data-pressed] {
|
|
112
|
+
--button-bg-color: var(--color-gray-300);
|
|
113
|
+
--button-border-color: var(--color-black);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[data-pending] {
|
|
117
|
+
--button-bg-color: var(--color-gray-300);
|
|
118
|
+
--button-border-color: var(--color-black);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tertiary {
|
|
123
|
+
--button-bg-color: transparent;
|
|
124
|
+
--button-border-color: transparent;
|
|
125
|
+
--button-text-color: var(--color-purple-800);
|
|
126
|
+
|
|
127
|
+
&[data-hovered] {
|
|
128
|
+
--button-bg-color: var(--color-gray-200);
|
|
129
|
+
--button-border-color: var(--color-gray-200);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&[data-pressed] {
|
|
133
|
+
--button-bg-color: var(--color-gray-300);
|
|
134
|
+
--button-border-color: var(--color-gray-300);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&[data-pending] {
|
|
138
|
+
--button-bg-color: var(--color-gray-300);
|
|
139
|
+
--button-border-color: var(--color-gray-300);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.primaryReversed,
|
|
144
|
+
.secondaryReversed,
|
|
145
|
+
.tertiaryReversed {
|
|
146
|
+
&[data-focus-visible]::after {
|
|
147
|
+
border-color: var(--color-blue-300);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.primaryReversed {
|
|
152
|
+
--button-bg-color: var(--color-white);
|
|
153
|
+
--button-border-color: var(--color-white);
|
|
154
|
+
--button-text-color: var(--color-purple-800);
|
|
155
|
+
|
|
156
|
+
&[data-hovered] {
|
|
157
|
+
--button-bg-color: var(--color-white);
|
|
158
|
+
--button-border-color: var(--color-white);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&[data-pressed] {
|
|
162
|
+
--button-bg-color: var(--color-white);
|
|
163
|
+
--button-border-color: var(--color-white);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&[data-pending] {
|
|
167
|
+
--button-bg-color: var(--color-white);
|
|
168
|
+
--button-border-color: var(--color-white);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.secondaryReversed {
|
|
173
|
+
--button-bg-color: transparent;
|
|
174
|
+
--button-border-color: var(--color-white);
|
|
175
|
+
--button-text-color: var(--color-white);
|
|
176
|
+
|
|
177
|
+
&[data-hovered] {
|
|
178
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.2);
|
|
179
|
+
--button-border-color: var(--color-white);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&[data-pressed] {
|
|
183
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
184
|
+
--button-border-color: var(--color-white);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&[data-pending] {
|
|
188
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
189
|
+
--button-border-color: var(--color-white);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.tertiaryReversed {
|
|
194
|
+
--button-bg-color: transparent;
|
|
195
|
+
--button-border-color: transparent;
|
|
196
|
+
--button-text-color: var(--color-white);
|
|
197
|
+
|
|
198
|
+
&[data-hovered] {
|
|
199
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.2);
|
|
200
|
+
--button-border-color: transparent;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&[data-pressed] {
|
|
204
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
205
|
+
--button-border-color: transparent;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&[data-pending] {
|
|
209
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
210
|
+
--button-border-color: transparent;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.isDisabled {
|
|
215
|
+
--button-bg-color: var(--color-gray-400);
|
|
216
|
+
--button-border-color: var(--color-gray-400);
|
|
217
|
+
--button-text-color: var(--color-white);
|
|
218
|
+
|
|
219
|
+
&[data-hovered] {
|
|
220
|
+
--button-bg-color: var(--color-gray-400);
|
|
221
|
+
--button-border-color: var(--color-gray-400);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.hideContentWidth {
|
|
226
|
+
position: absolute;
|
|
227
|
+
left: 50%;
|
|
228
|
+
top: 50%;
|
|
229
|
+
transform: translate(-50%, -50%);
|
|
230
|
+
visibility: hidden;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.retainContentWidth {
|
|
234
|
+
visibility: hidden;
|
|
235
|
+
}
|