@apify/ui-library 1.170.0 → 1.170.2-uilibraryversion2candida-85b55e.17
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/README.md +1 -1
- package/dist/components/code/code_block/code_block.d.ts +1 -3
- package/dist/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block.js +1 -7
- package/dist/components/code/code_block/code_block.styled.d.ts +0 -1
- package/dist/components/code/code_block/code_block.styled.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block.styled.js +0 -10
- package/dist/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/tag/tag.d.ts.map +1 -1
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/index.js +1 -4
- package/dist/src/components/code/code_block/code_block.d.ts +1 -3
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +2 -3
- package/dist/src/components/code/code_block/code_block.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.styled.d.ts +0 -1
- package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.styled.js +0 -10
- package/dist/src/components/code/code_block/code_block.styled.js.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.js +0 -1
- package/dist/src/components/code/inline_code/inline_code.js.map +1 -1
- package/dist/src/components/index.d.ts +0 -3
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +0 -3
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/tag/tag.d.ts +1 -1
- package/dist/src/components/tag/tag.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/code/code_block/code_block.stories.jsx +6 -13
- package/src/components/code/code_block/code_block.styled.tsx +0 -11
- package/src/components/code/code_block/code_block.tsx +0 -8
- package/src/components/code/inline_code/inline_code.tsx +0 -1
- package/src/components/index.ts +0 -3
- package/src/components/tag/tag.tsx +1 -1
- package/dist/components/banner/banner.d.ts +0 -11
- package/dist/components/banner/banner.d.ts.map +0 -1
- package/dist/components/banner/banner.js +0 -76
- package/dist/components/banner/index.d.ts +0 -2
- package/dist/components/banner/index.d.ts.map +0 -1
- package/dist/components/chip/chip.d.ts +0 -55
- package/dist/components/chip/chip.d.ts.map +0 -1
- package/dist/components/chip/chip.js +0 -144
- package/dist/components/chip/index.d.ts +0 -2
- package/dist/components/chip/index.d.ts.map +0 -1
- package/dist/components/color_wheel_gradient/color_wheel_gradient.d.ts +0 -9
- package/dist/components/color_wheel_gradient/color_wheel_gradient.d.ts.map +0 -1
- package/dist/components/color_wheel_gradient/color_wheel_gradient.js +0 -27
- package/dist/components/color_wheel_gradient/index.d.ts +0 -2
- package/dist/components/color_wheel_gradient/index.d.ts.map +0 -1
- package/dist/src/components/banner/banner.d.ts +0 -11
- package/dist/src/components/banner/banner.d.ts.map +0 -1
- package/dist/src/components/banner/banner.js +0 -70
- package/dist/src/components/banner/banner.js.map +0 -1
- package/dist/src/components/banner/index.d.ts +0 -2
- package/dist/src/components/banner/index.d.ts.map +0 -1
- package/dist/src/components/banner/index.js +0 -2
- package/dist/src/components/banner/index.js.map +0 -1
- package/dist/src/components/chip/chip.d.ts +0 -56
- package/dist/src/components/chip/chip.d.ts.map +0 -1
- package/dist/src/components/chip/chip.js +0 -123
- package/dist/src/components/chip/chip.js.map +0 -1
- package/dist/src/components/chip/index.d.ts +0 -2
- package/dist/src/components/chip/index.d.ts.map +0 -1
- package/dist/src/components/chip/index.js +0 -2
- package/dist/src/components/chip/index.js.map +0 -1
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.d.ts +0 -9
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.d.ts.map +0 -1
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.js +0 -25
- package/dist/src/components/color_wheel_gradient/color_wheel_gradient.js.map +0 -1
- package/dist/src/components/color_wheel_gradient/index.d.ts +0 -2
- package/dist/src/components/color_wheel_gradient/index.d.ts.map +0 -1
- package/dist/src/components/color_wheel_gradient/index.js +0 -2
- package/dist/src/components/color_wheel_gradient/index.js.map +0 -1
- package/src/components/banner/banner.stories.tsx +0 -238
- package/src/components/banner/banner.tsx +0 -91
- package/src/components/banner/index.ts +0 -1
- package/src/components/chip/chip.stories.tsx +0 -311
- package/src/components/chip/chip.tsx +0 -167
- package/src/components/chip/index.ts +0 -1
- package/src/components/color_wheel_gradient/color_wheel_gradient.stories.tsx +0 -152
- package/src/components/color_wheel_gradient/color_wheel_gradient.tsx +0 -33
- package/src/components/color_wheel_gradient/index.ts +0 -1
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
import type { ValueOf } from '../../internal_type_utils';
|
|
4
|
-
import type { RegularBoxProps } from '../box';
|
|
5
|
-
export declare const CHIP_SIZES: {
|
|
6
|
-
readonly EXTRA_SMALL: "XS";
|
|
7
|
-
readonly SMALL: "S";
|
|
8
|
-
readonly MEDIUM: "M";
|
|
9
|
-
readonly LARGE: "L";
|
|
10
|
-
};
|
|
11
|
-
type CHIP_SIZES = ValueOf<typeof CHIP_SIZES>;
|
|
12
|
-
export declare const CHIP_TYPES: {
|
|
13
|
-
readonly DEFAULT: "DEFAULT";
|
|
14
|
-
readonly PRIMARY: "PRIMARY";
|
|
15
|
-
readonly SUCCESS: "SUCCESS";
|
|
16
|
-
readonly WARNING: "WARNING";
|
|
17
|
-
readonly DANGER: "DANGER";
|
|
18
|
-
};
|
|
19
|
-
export type CHIP_TYPES = ValueOf<typeof CHIP_TYPES>;
|
|
20
|
-
export declare const classNames: {
|
|
21
|
-
BODY: string;
|
|
22
|
-
};
|
|
23
|
-
export type ChipProps = RegularBoxProps & {
|
|
24
|
-
type?: CHIP_TYPES;
|
|
25
|
-
size?: CHIP_SIZES;
|
|
26
|
-
icon?: React.ReactNode;
|
|
27
|
-
clickable?: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Component for displaying status and for labelling other components.
|
|
31
|
-
* @deprecated Use Tag or Badge
|
|
32
|
-
*/
|
|
33
|
-
export declare const Chip: React.ForwardRefExoticComponent<{
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
className?: string;
|
|
36
|
-
style?: React.CSSProperties;
|
|
37
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
38
|
-
id?: string;
|
|
39
|
-
title?: string;
|
|
40
|
-
role?: React.AriaRole;
|
|
41
|
-
} & {
|
|
42
|
-
as?: React.ElementType;
|
|
43
|
-
} & {
|
|
44
|
-
type?: CHIP_TYPES;
|
|
45
|
-
size?: CHIP_SIZES;
|
|
46
|
-
icon?: React.ReactNode;
|
|
47
|
-
clickable?: boolean;
|
|
48
|
-
} & React.RefAttributes<unknown>>;
|
|
49
|
-
type SpecificChipProps = Omit<ChipProps, 'type'>;
|
|
50
|
-
export declare const PrimaryChip: FC<SpecificChipProps>;
|
|
51
|
-
export declare const NeutralChip: FC<SpecificChipProps>;
|
|
52
|
-
export declare const SuccessChip: FC<SpecificChipProps>;
|
|
53
|
-
export declare const DangerChip: FC<SpecificChipProps>;
|
|
54
|
-
export declare const WarningChip: FC<SpecificChipProps>;
|
|
55
|
-
export {};
|
|
56
|
-
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/chip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AACX,KAAK,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU;;CAEtB,CAAC;AA8FF,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG;IACtC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;WAVN,UAAU;WACV,UAAU;WACV,KAAK,CAAC,SAAS;gBACV,OAAO;iCA6BtB,CAAC;AAIF,KAAK,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAA4D,CAAC;AAC3G,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAA4D,CAAC;AAC3G,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAA4D,CAAC;AAC3G,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAA2D,CAAC;AACzG,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAA4D,CAAC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
5
|
-
import { theme } from '../../design_system/theme';
|
|
6
|
-
export const CHIP_SIZES = {
|
|
7
|
-
EXTRA_SMALL: 'XS',
|
|
8
|
-
SMALL: 'S',
|
|
9
|
-
MEDIUM: 'M',
|
|
10
|
-
LARGE: 'L',
|
|
11
|
-
};
|
|
12
|
-
export const CHIP_TYPES = {
|
|
13
|
-
DEFAULT: 'DEFAULT',
|
|
14
|
-
PRIMARY: 'PRIMARY',
|
|
15
|
-
SUCCESS: 'SUCCESS',
|
|
16
|
-
WARNING: 'WARNING',
|
|
17
|
-
DANGER: 'DANGER',
|
|
18
|
-
};
|
|
19
|
-
export const classNames = {
|
|
20
|
-
BODY: 'Chip-body',
|
|
21
|
-
};
|
|
22
|
-
const chipSizeStyle = {
|
|
23
|
-
[CHIP_SIZES.EXTRA_SMALL]: css `
|
|
24
|
-
font-size: 12px;
|
|
25
|
-
line-height: 16px;
|
|
26
|
-
padding: 0 4px;
|
|
27
|
-
border-radius: 6px;
|
|
28
|
-
`,
|
|
29
|
-
[CHIP_SIZES.SMALL]: css `
|
|
30
|
-
font-size: 12px;
|
|
31
|
-
line-height: 16px;
|
|
32
|
-
padding: 2px 4px;
|
|
33
|
-
border-radius: 6px;
|
|
34
|
-
`,
|
|
35
|
-
[CHIP_SIZES.MEDIUM]: css `
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
line-height: 20px;
|
|
38
|
-
padding: 2px 8px;
|
|
39
|
-
border-radius: 100px;
|
|
40
|
-
`,
|
|
41
|
-
[CHIP_SIZES.LARGE]: css `
|
|
42
|
-
/* TODO: (typography-mismatch) 16px/20px does not match any canonical typography token — needs designer input. Blocks migrating chipSizeStyle to typography token interpolations (XS/S match bodyS, M matches bodyM). */
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
line-height: 20px;
|
|
45
|
-
padding: 2px 8px;
|
|
46
|
-
border-radius: 100px;
|
|
47
|
-
`,
|
|
48
|
-
};
|
|
49
|
-
const chipTypeStyle = {
|
|
50
|
-
[CHIP_TYPES.DEFAULT]: css `
|
|
51
|
-
color: ${theme.color.neutral.text};
|
|
52
|
-
background: ${theme.color.neutral.chipBackground};
|
|
53
|
-
`,
|
|
54
|
-
[CHIP_TYPES.PRIMARY]: css `
|
|
55
|
-
color: ${theme.color.primary.chipText};
|
|
56
|
-
background: ${theme.color.primary.chipBackground};
|
|
57
|
-
`,
|
|
58
|
-
[CHIP_TYPES.SUCCESS]: css `
|
|
59
|
-
color: ${theme.color.success.chipText};
|
|
60
|
-
background: ${theme.color.success.chipBackground};
|
|
61
|
-
`,
|
|
62
|
-
[CHIP_TYPES.WARNING]: css `
|
|
63
|
-
color: ${theme.color.warning.chipText};
|
|
64
|
-
background: ${theme.color.warning.chipBackground};
|
|
65
|
-
`,
|
|
66
|
-
[CHIP_TYPES.DANGER]: css `
|
|
67
|
-
color: ${theme.color.danger.chipText};
|
|
68
|
-
background: ${theme.color.danger.chipBackground};
|
|
69
|
-
`,
|
|
70
|
-
};
|
|
71
|
-
const chipTypeHoverStyle = {
|
|
72
|
-
[CHIP_TYPES.DEFAULT]: css `
|
|
73
|
-
background: ${theme.color.neutral.chipBackgroundHover};
|
|
74
|
-
`,
|
|
75
|
-
[CHIP_TYPES.PRIMARY]: css `
|
|
76
|
-
background: ${theme.color.primary.chipBackgroundHover};
|
|
77
|
-
`,
|
|
78
|
-
[CHIP_TYPES.SUCCESS]: css `
|
|
79
|
-
background: ${theme.color.success.chipBackgroundHover};
|
|
80
|
-
`,
|
|
81
|
-
[CHIP_TYPES.WARNING]: css `
|
|
82
|
-
background: ${theme.color.warning.chipBackgroundHover};
|
|
83
|
-
`,
|
|
84
|
-
[CHIP_TYPES.DANGER]: css `
|
|
85
|
-
background: ${theme.color.danger.chipBackgroundHover};
|
|
86
|
-
`,
|
|
87
|
-
};
|
|
88
|
-
const StyledChip = styled.span `
|
|
89
|
-
${({ size }) => chipSizeStyle[size]};
|
|
90
|
-
${({ type }) => chipTypeStyle[type]};
|
|
91
|
-
${({ type, clickable }) => clickable &&
|
|
92
|
-
css `
|
|
93
|
-
&:hover {
|
|
94
|
-
${chipTypeHoverStyle[type]};
|
|
95
|
-
}
|
|
96
|
-
`};
|
|
97
|
-
/* Static styles */
|
|
98
|
-
width: fit-content;
|
|
99
|
-
display: flex;
|
|
100
|
-
flex-direction: row;
|
|
101
|
-
justify-content: center;
|
|
102
|
-
align-items: center;
|
|
103
|
-
/* TODO: (typography-keyword) 'normal' keyword used instead of numeric value (400) or typography token. */
|
|
104
|
-
font-weight: normal;
|
|
105
|
-
white-space: nowrap;
|
|
106
|
-
cursor: ${({ clickable }) => (clickable ? 'pointer' : 'default')};
|
|
107
|
-
gap: ${theme.space.space4};
|
|
108
|
-
`;
|
|
109
|
-
/**
|
|
110
|
-
* Component for displaying status and for labelling other components.
|
|
111
|
-
* @deprecated Use Tag or Badge
|
|
112
|
-
*/
|
|
113
|
-
export const Chip = forwardRef(({ type = CHIP_TYPES.DEFAULT, size = CHIP_SIZES.MEDIUM, clickable = false, icon, children, className, ...passThroughProps }, ref) => {
|
|
114
|
-
const otherProps = { ...passThroughProps, type, size, clickable, className: clsx(className, classNames.BODY) };
|
|
115
|
-
return (_jsxs(StyledChip, { ref: ref, ...otherProps, children: [children, icon] }));
|
|
116
|
-
});
|
|
117
|
-
Chip.displayName = 'Chip';
|
|
118
|
-
export const PrimaryChip = (props) => _jsx(Chip, { type: CHIP_TYPES.PRIMARY, ...props });
|
|
119
|
-
export const NeutralChip = (props) => _jsx(Chip, { type: CHIP_TYPES.DEFAULT, ...props });
|
|
120
|
-
export const SuccessChip = (props) => _jsx(Chip, { type: CHIP_TYPES.SUCCESS, ...props });
|
|
121
|
-
export const DangerChip = (props) => _jsx(Chip, { type: CHIP_TYPES.DANGER, ...props });
|
|
122
|
-
export const WarningChip = (props) => _jsx(Chip, { type: CHIP_TYPES.WARNING, ...props });
|
|
123
|
-
//# sourceMappingURL=chip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../../src/components/chip/chip.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,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AC,KAAC,IAAI,IAAC,IAAI,EAAE,UAAU,CAAC,OAAO,KAAM,KAAK,GAAI,CAAC;AAC3G,MAAM,CAAC,MAAM,UAAU,GAA0B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,UAAU,CAAC,MAAM,KAAM,KAAK,GAAI,CAAC;AACzG,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,UAAU,CAAC,OAAO,KAAM,KAAK,GAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chip/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface ColorWheelGradientProps {
|
|
2
|
-
translateX?: number;
|
|
3
|
-
translateY?: number;
|
|
4
|
-
rotation?: number;
|
|
5
|
-
radius?: number;
|
|
6
|
-
blurSize?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const ColorWheelGradient: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ColorWheelGradientProps>> & string;
|
|
9
|
-
//# sourceMappingURL=color_wheel_gradient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color_wheel_gradient.d.ts","sourceRoot":"","sources":["../../../../src/components/color_wheel_gradient/color_wheel_gradient.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAuB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,4PAsB9B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
export const ColorWheelGradient = styled.div `
|
|
3
|
-
${({ radius, rotation = 0, blurSize = 40, translateX = 0, translateY = 0 }) => `
|
|
4
|
-
z-index: 1;
|
|
5
|
-
position: absolute;
|
|
6
|
-
width: ${radius ? `${radius}px` : 'auto'};
|
|
7
|
-
height: ${radius ? `${radius}px` : 'auto'};
|
|
8
|
-
transform-origin: center;
|
|
9
|
-
transform: translate(${translateX}px, ${translateY}px) rotate(${rotation}deg);
|
|
10
|
-
|
|
11
|
-
opacity: 0.30;
|
|
12
|
-
background: conic-gradient(
|
|
13
|
-
rgba(93, 133, 225, 0.99) 0deg,
|
|
14
|
-
rgba(106, 20, 222, 0.99) 69deg,
|
|
15
|
-
rgba(228, 68, 103, 0.99) 150deg,
|
|
16
|
-
rgba(250, 129, 54, 0.99) 221deg,
|
|
17
|
-
rgba(240, 178, 27, 0.99) 287deg,
|
|
18
|
-
rgba(18, 150, 111, 0.99) 360deg
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
border-radius: 50%;
|
|
22
|
-
filter: blur(${blurSize}px)
|
|
23
|
-
`}
|
|
24
|
-
`;
|
|
25
|
-
//# sourceMappingURL=color_wheel_gradient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color_wheel_gradient.js","sourceRoot":"","sources":["../../../../src/components/color_wheel_gradient/color_wheel_gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAUvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAyB;MAC/D,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,UAAU,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;;;aAGtE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM;cAC9B,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM;;2BAElB,UAAU,OAAO,UAAU,cAAc,QAAQ;;;;;;;;;;;;;mBAazD,QAAQ;CAC1B;CACA,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/color_wheel_gradient/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/color_wheel_gradient/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import type React from 'react';
|
|
3
|
-
|
|
4
|
-
import { Banner } from './banner';
|
|
5
|
-
|
|
6
|
-
interface BannerProps {
|
|
7
|
-
background?: string;
|
|
8
|
-
useGradientBackground?: boolean;
|
|
9
|
-
width?: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
title: 'UI-Library/Banner',
|
|
16
|
-
component: Banner,
|
|
17
|
-
argTypes: {
|
|
18
|
-
background: {
|
|
19
|
-
control: 'text',
|
|
20
|
-
},
|
|
21
|
-
useGradientBackground: {
|
|
22
|
-
control: 'boolean',
|
|
23
|
-
},
|
|
24
|
-
width: {
|
|
25
|
-
control: 'text',
|
|
26
|
-
},
|
|
27
|
-
className: {
|
|
28
|
-
control: 'text',
|
|
29
|
-
},
|
|
30
|
-
children: {
|
|
31
|
-
control: false,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
parameters: {
|
|
35
|
-
design: {
|
|
36
|
-
type: 'figma',
|
|
37
|
-
url: 'TODO: Add Figma URL',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
} as Meta<BannerProps>;
|
|
41
|
-
|
|
42
|
-
type Story = StoryObj<BannerProps>;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Default banner with gradient background enabled
|
|
46
|
-
*/
|
|
47
|
-
export const Default: Story = {
|
|
48
|
-
args: {
|
|
49
|
-
children: (
|
|
50
|
-
<div>
|
|
51
|
-
<h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Welcome to Apify</h2>
|
|
52
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>Build reliable web scrapers. Fast.</p>
|
|
53
|
-
</div>
|
|
54
|
-
),
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Banner with gradient background enabled (explicitly set to true)
|
|
60
|
-
*/
|
|
61
|
-
export const WithGradientBackground: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
useGradientBackground: true,
|
|
64
|
-
children: (
|
|
65
|
-
<div>
|
|
66
|
-
<h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Gradient Background Banner</h2>
|
|
67
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>
|
|
68
|
-
This banner uses the beautiful gradient background with colorful shapes.
|
|
69
|
-
</p>
|
|
70
|
-
</div>
|
|
71
|
-
),
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Banner without gradient background - shows solid background color
|
|
77
|
-
*/
|
|
78
|
-
export const WithoutGradientBackground: Story = {
|
|
79
|
-
args: {
|
|
80
|
-
useGradientBackground: false,
|
|
81
|
-
children: (
|
|
82
|
-
<div>
|
|
83
|
-
<h2 style={{ margin: 0, marginBottom: '8px' }}>Simple Banner</h2>
|
|
84
|
-
<p style={{ margin: 0, opacity: 0.7 }}>
|
|
85
|
-
This banner uses a simple solid background without gradient effects.
|
|
86
|
-
</p>
|
|
87
|
-
</div>
|
|
88
|
-
),
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Banner with custom background color
|
|
94
|
-
*/
|
|
95
|
-
export const WithCustomBackground: Story = {
|
|
96
|
-
args: {
|
|
97
|
-
background: '#4CAF50',
|
|
98
|
-
useGradientBackground: false,
|
|
99
|
-
children: (
|
|
100
|
-
<div>
|
|
101
|
-
<h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Custom Green Background</h2>
|
|
102
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
|
|
103
|
-
This banner has a custom green background color.
|
|
104
|
-
</p>
|
|
105
|
-
</div>
|
|
106
|
-
),
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Banner with custom background color and gradient overlay
|
|
112
|
-
*/
|
|
113
|
-
export const WithCustomBackgroundAndGradient: Story = {
|
|
114
|
-
args: {
|
|
115
|
-
background: '#2196F3',
|
|
116
|
-
useGradientBackground: true,
|
|
117
|
-
children: (
|
|
118
|
-
<div>
|
|
119
|
-
<h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Blue Background with Gradient</h2>
|
|
120
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
|
|
121
|
-
Custom blue background with gradient overlay effects.
|
|
122
|
-
</p>
|
|
123
|
-
</div>
|
|
124
|
-
),
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Banner with custom width
|
|
130
|
-
*/
|
|
131
|
-
export const WithCustomWidth: Story = {
|
|
132
|
-
args: {
|
|
133
|
-
width: '600px',
|
|
134
|
-
children: (
|
|
135
|
-
<div>
|
|
136
|
-
<h2 style={{ margin: 0, marginBottom: '8px', color: 'white' }}>Custom Width Banner</h2>
|
|
137
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.8)' }}>
|
|
138
|
-
This banner has a fixed width of 600px instead of 100%.
|
|
139
|
-
</p>
|
|
140
|
-
</div>
|
|
141
|
-
),
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Banner with minimal content
|
|
147
|
-
*/
|
|
148
|
-
export const WithMinimalContent: Story = {
|
|
149
|
-
args: {
|
|
150
|
-
children: <p style={{ margin: 0, color: 'white', textAlign: 'center' }}>Simple announcement message</p>,
|
|
151
|
-
},
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Banner with rich content including buttons and links
|
|
156
|
-
*/
|
|
157
|
-
export const WithRichContent: Story = {
|
|
158
|
-
args: {
|
|
159
|
-
children: (
|
|
160
|
-
<div>
|
|
161
|
-
<h1 style={{ margin: 0, marginBottom: '12px', color: 'white', fontSize: '2rem' }}>
|
|
162
|
-
🚀 New Feature Launch
|
|
163
|
-
</h1>
|
|
164
|
-
<p style={{ margin: 0, marginBottom: '16px', color: 'rgba(255, 255, 255, 0.9)' }}>
|
|
165
|
-
We've just released our most powerful web scraping tools yet. Experience faster, more reliable
|
|
166
|
-
data extraction with our enhanced platform.
|
|
167
|
-
</p>
|
|
168
|
-
<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
|
|
169
|
-
<button
|
|
170
|
-
type="button"
|
|
171
|
-
style={{
|
|
172
|
-
padding: '8px 16px',
|
|
173
|
-
backgroundColor: 'white',
|
|
174
|
-
color: '#333',
|
|
175
|
-
border: 'none',
|
|
176
|
-
borderRadius: '4px',
|
|
177
|
-
fontWeight: 'bold',
|
|
178
|
-
cursor: 'pointer',
|
|
179
|
-
}}
|
|
180
|
-
>
|
|
181
|
-
Get Started
|
|
182
|
-
</button>
|
|
183
|
-
<a
|
|
184
|
-
href="#"
|
|
185
|
-
style={{
|
|
186
|
-
color: 'white',
|
|
187
|
-
textDecoration: 'underline',
|
|
188
|
-
}}
|
|
189
|
-
>
|
|
190
|
-
Learn more
|
|
191
|
-
</a>
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
),
|
|
195
|
-
},
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Banner with warning/alert styling
|
|
200
|
-
*/
|
|
201
|
-
export const WarningBanner: Story = {
|
|
202
|
-
args: {
|
|
203
|
-
background: '#FF9800',
|
|
204
|
-
useGradientBackground: false,
|
|
205
|
-
children: (
|
|
206
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
207
|
-
<span style={{ fontSize: '1.5rem' }}>⚠️</span>
|
|
208
|
-
<div>
|
|
209
|
-
<h3 style={{ margin: 0, marginBottom: '4px', color: 'white' }}>Maintenance Notice</h3>
|
|
210
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
|
|
211
|
-
Scheduled maintenance will occur on Sunday, 12:00-14:00 UTC.
|
|
212
|
-
</p>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
),
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Banner with success/positive messaging
|
|
221
|
-
*/
|
|
222
|
-
export const SuccessBanner: Story = {
|
|
223
|
-
args: {
|
|
224
|
-
background: '#4CAF50',
|
|
225
|
-
useGradientBackground: false,
|
|
226
|
-
children: (
|
|
227
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
228
|
-
<span style={{ fontSize: '1.5rem' }}>✅</span>
|
|
229
|
-
<div>
|
|
230
|
-
<h3 style={{ margin: 0, marginBottom: '4px', color: 'white' }}>Migration Complete</h3>
|
|
231
|
-
<p style={{ margin: 0, color: 'rgba(255, 255, 255, 0.9)' }}>
|
|
232
|
-
Your account has been successfully migrated to our new platform.
|
|
233
|
-
</p>
|
|
234
|
-
</div>
|
|
235
|
-
</div>
|
|
236
|
-
),
|
|
237
|
-
},
|
|
238
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { theme } from '../../design_system/theme';
|
|
5
|
-
|
|
6
|
-
const BANNER_GRADIENT_BACKGROUND_SVG = `<svg width="1200" height="148" viewBox="0 0 1200 148" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
|
-
<g clip-path="url(#clip0_2285_34756)">
|
|
8
|
-
<g filter="url(#filter0_f_2285_34756)">
|
|
9
|
-
<path d="M-39.7702 191.085C-55.0622 193.205 -68.8864 201.311 -78.2029 213.621C-87.5194 225.932 -91.5654 241.438 -89.4512 256.731L-55.0077 502.652L89.8852 173L-39.7702 191.085Z" fill="url(#paint0_linear_2285_34756)"/>
|
|
10
|
-
</g>
|
|
11
|
-
<g filter="url(#filter1_f_2285_34756)">
|
|
12
|
-
<path d="M1267.53 398.062L1253.99 209.002C1252.85 193.626 1245.67 179.327 1234.01 169.234C1222.36 159.14 1207.18 154.073 1191.8 155.14C1190.5 155.19 1189.2 155.331 1187.92 155.564L1132 163.289L1254.84 438.685C1264.05 427.236 1268.59 412.721 1267.53 398.062Z" fill="url(#paint1_linear_2285_34756)"/>
|
|
13
|
-
</g>
|
|
14
|
-
<g filter="url(#filter2_f_2285_34756)">
|
|
15
|
-
<path d="M561 29.7691C570.917 30.4746 580.956 29.5571 590.142 27.1057L801.075 -28.7862L700.682 -170L561 29.7691Z" fill="url(#paint2_linear_2285_34756)"/>
|
|
16
|
-
</g>
|
|
17
|
-
</g>
|
|
18
|
-
<defs>
|
|
19
|
-
<filter id="filter0_f_2285_34756" x="-170" y="93" width="339.885" height="489.652" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
20
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
21
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
22
|
-
<feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
|
|
23
|
-
</filter>
|
|
24
|
-
<filter id="filter1_f_2285_34756" x="1052" y="75" width="295.683" height="443.686" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
25
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
26
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
27
|
-
<feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
|
|
28
|
-
</filter>
|
|
29
|
-
<filter id="filter2_f_2285_34756" x="481" y="-250" width="400.074" height="360" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
30
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
31
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
32
|
-
<feGaussianBlur stdDeviation="40" result="effect1_foregroundBlur_2285_34756"/>
|
|
33
|
-
</filter>
|
|
34
|
-
<linearGradient id="paint0_linear_2285_34756" x1="-0.0574112" y1="173" x2="-0.0574112" y2="502.652" gradientUnits="userSpaceOnUse">
|
|
35
|
-
<stop stop-color="#00FF85"/>
|
|
36
|
-
<stop offset="1" stop-color="#00FF47" stop-opacity="0"/>
|
|
37
|
-
</linearGradient>
|
|
38
|
-
<linearGradient id="paint1_linear_2285_34756" x1="1146.02" y1="174.549" x2="1333.1" y2="293.915" gradientUnits="userSpaceOnUse">
|
|
39
|
-
<stop stop-color="#00FFF0"/>
|
|
40
|
-
<stop offset="1" stop-color="#1672EB"/>
|
|
41
|
-
</linearGradient>
|
|
42
|
-
<linearGradient id="paint2_linear_2285_34756" x1="681.037" y1="-170" x2="681.037" y2="30" gradientUnits="userSpaceOnUse">
|
|
43
|
-
<stop stop-color="#F5B315"/>
|
|
44
|
-
<stop offset="1" stop-color="#FF2CC4"/>
|
|
45
|
-
</linearGradient>
|
|
46
|
-
<clipPath id="clip0_2285_34756">
|
|
47
|
-
<rect width="1200" height="1791.08" rx="16" fill="white"/>
|
|
48
|
-
</clipPath>
|
|
49
|
-
</defs>
|
|
50
|
-
</svg>
|
|
51
|
-
`;
|
|
52
|
-
|
|
53
|
-
interface BannerProps {
|
|
54
|
-
background?: string;
|
|
55
|
-
useGradientBackground?: boolean;
|
|
56
|
-
width?: string;
|
|
57
|
-
className?: string;
|
|
58
|
-
children: React.ReactNode;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const getBannerBackground = (background?: string, useGradientBackground?: boolean) => {
|
|
62
|
-
return css`
|
|
63
|
-
background-color: ${background || theme.color.neutral.backgroundSubtle};
|
|
64
|
-
${useGradientBackground &&
|
|
65
|
-
`
|
|
66
|
-
background-image: url("data:image/svg+xml,${encodeURIComponent(BANNER_GRADIENT_BACKGROUND_SVG)}");
|
|
67
|
-
background-position: center;
|
|
68
|
-
background-repeat: no-repeat;
|
|
69
|
-
background-size: cover;
|
|
70
|
-
`}
|
|
71
|
-
`;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const StyledBanner = styled.div<{ $background?: string; $useGradientBackground?: boolean; width?: string }>`
|
|
75
|
-
width: ${(props) => props.width || '100%'};
|
|
76
|
-
padding: ${theme.space.space40} ${theme.space.space80};
|
|
77
|
-
border-radius: ${theme.radius.radius16};
|
|
78
|
-
|
|
79
|
-
${({ $background, $useGradientBackground }) => getBannerBackground($background, $useGradientBackground)};
|
|
80
|
-
`;
|
|
81
|
-
|
|
82
|
-
export const Banner: React.FC<BannerProps> = ({
|
|
83
|
-
useGradientBackground = true,
|
|
84
|
-
background,
|
|
85
|
-
children,
|
|
86
|
-
...otherProps
|
|
87
|
-
}) => (
|
|
88
|
-
<StyledBanner $background={background} $useGradientBackground={useGradientBackground} {...otherProps}>
|
|
89
|
-
{children}
|
|
90
|
-
</StyledBanner>
|
|
91
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './banner';
|