@apify/ui-library 0.71.1-featcolortokens-178953.55 → 0.71.1-featcolortokens-178953.58
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/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +7 -5
- package/.stylelintrc +0 -12
- package/CHANGELOG.md +0 -3334
- package/CODEOWNERS +0 -7
- package/eslint.config.mjs +0 -44
- package/src/codemods/generate_typograpy_tokens_files.mjs +0 -137
- package/src/components/action_link.tsx +0 -60
- package/src/components/actor_template_card.tsx +0 -116
- package/src/components/badge.tsx +0 -148
- package/src/components/banner.tsx +0 -94
- package/src/components/blog_article.tsx +0 -85
- package/src/components/box.tsx +0 -127
- package/src/components/button.tsx +0 -305
- package/src/components/chip.tsx +0 -128
- package/src/components/code/action_button.tsx +0 -96
- package/src/components/code/code_block/code_block.styled.tsx +0 -180
- package/src/components/code/code_block/code_block.tsx +0 -224
- package/src/components/code/code_block/code_block_with_tabs.tsx +0 -257
- package/src/components/code/code_block/utils.tsx +0 -67
- package/src/components/code/index.ts +0 -5
- package/src/components/code/inline_code/inline_code.tsx +0 -62
- package/src/components/code/one_line_code/one_line_code.tsx +0 -228
- package/src/components/code/prism_highlighter.tsx +0 -180
- package/src/components/color_wheel_gradient.tsx +0 -31
- package/src/components/floating/index.ts +0 -3
- package/src/components/floating/menu.tsx +0 -189
- package/src/components/floating/menu_common.tsx +0 -31
- package/src/components/floating/menu_components.tsx +0 -99
- package/src/components/image.tsx +0 -24
- package/src/components/index.ts +0 -22
- package/src/components/link.tsx +0 -114
- package/src/components/message.tsx +0 -153
- package/src/components/rating.tsx +0 -106
- package/src/components/readme_renderer/index.ts +0 -3
- package/src/components/readme_renderer/pythonize_value.ts +0 -76
- package/src/components/readme_renderer/table_of_contents.tsx +0 -272
- package/src/components/readme_renderer/utils.tsx +0 -46
- package/src/components/simple_markdown/index.ts +0 -2
- package/src/components/simple_markdown/simple_markdown.tsx +0 -214
- package/src/components/simple_markdown/simple_markdown_components.tsx +0 -293
- package/src/components/tabs/index.ts +0 -2
- package/src/components/tabs/tab.tsx +0 -217
- package/src/components/tabs/tabs.tsx +0 -169
- package/src/components/tag.tsx +0 -196
- package/src/components/text/heading_content.tsx +0 -56
- package/src/components/text/heading_marketing.tsx +0 -55
- package/src/components/text/heading_shared.tsx +0 -55
- package/src/components/text/index.ts +0 -19
- package/src/components/text/text_base.tsx +0 -52
- package/src/components/text/text_content.tsx +0 -104
- package/src/components/text/text_marketing.tsx +0 -152
- package/src/components/text/text_shared.tsx +0 -95
- package/src/components/tile/horizontal_tile.tsx +0 -77
- package/src/components/tile/index.ts +0 -2
- package/src/components/tile/shared.ts +0 -27
- package/src/components/tile/vertical_tile.tsx +0 -59
- package/src/components/to_consolidate/card.tsx +0 -141
- package/src/components/to_consolidate/index.ts +0 -4
- package/src/components/to_consolidate/markdown.tsx +0 -609
- package/src/components/to_consolidate/pagination.tsx +0 -136
- package/src/components/to_consolidate/tab_number_chip.tsx +0 -31
- package/src/design_system/colors/build_color_tokens.js +0 -169
- package/src/design_system/colors/figma_color_tokens.dark.json +0 -886
- package/src/design_system/colors/figma_color_tokens.light.json +0 -886
- package/src/design_system/colors/generated/colors_theme.dark.ts +0 -110
- package/src/design_system/colors/generated/colors_theme.light.ts +0 -110
- package/src/design_system/colors/generated/dark.ts +0 -147
- package/src/design_system/colors/generated/light.ts +0 -147
- package/src/design_system/colors/generated/palette.dark.ts +0 -74
- package/src/design_system/colors/generated/palette.light.ts +0 -74
- package/src/design_system/colors/generated/properties_theme.ts +0 -179
- package/src/design_system/colors/index.ts +0 -7
- package/src/design_system/colors_theme.ts +0 -213
- package/src/design_system/properties_theme.ts +0 -453
- package/src/design_system/supernova_typography_tokens.json +0 -657
- package/src/design_system/theme.ts +0 -25
- package/src/design_system/tokens/index.ts +0 -5
- package/src/design_system/tokens/layouts.ts +0 -29
- package/src/design_system/tokens/radiuses.ts +0 -22
- package/src/design_system/tokens/shadows.ts +0 -22
- package/src/design_system/tokens/spaces.ts +0 -15
- package/src/design_system/tokens/transitions.ts +0 -19
- package/src/design_system/typography_theme.ts +0 -197
- package/src/index.ts +0 -8
- package/src/type_utils.ts +0 -7
- package/src/ui_dependency_provider.tsx +0 -58
- package/src/utils/copy_to_clipboard.ts +0 -24
- package/src/utils/image_color.ts +0 -42
- package/src/utils/index.ts +0 -4
- package/src/utils/resize_observer.ts +0 -18
- package/src/utils/sanitization.ts +0 -14
- package/style-dictionary.config.json +0 -29
- package/tsconfig.build.json +0 -17
- package/tsconfig.json +0 -10
- /package/{src/design_system/colors/generated → style/colors}/dark.scss +0 -0
- /package/{src/design_system/colors/generated → style/colors}/light.scss +0 -0
- /package/{src/design_system/colors/generated → style/colors}/palette.dark.scss +0 -0
- /package/{src/design_system/colors/generated → style/colors}/palette.light.scss +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import clsx from 'clsx';
|
|
2
|
-
import React, { forwardRef } from 'react';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { theme } from '../../design_system/theme.js';
|
|
6
|
-
import type { WithTransientProps } from '../../type_utils.js';
|
|
7
|
-
import type { BoxProps } from '../box.js';
|
|
8
|
-
import { Box } from '../box.js';
|
|
9
|
-
import { Text } from '../text/index.js';
|
|
10
|
-
|
|
11
|
-
export const cardClassNames = {
|
|
12
|
-
WRAPPER: 'Card',
|
|
13
|
-
HEADER: 'Card-header',
|
|
14
|
-
CAPTION: 'Card-caption',
|
|
15
|
-
ACTIONS: 'Card-actions',
|
|
16
|
-
DESCRIPTION: 'Card-description',
|
|
17
|
-
CONTENT: 'Card-content',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
interface TransientCardProps {
|
|
21
|
-
disabled?: boolean,
|
|
22
|
-
shadowless?: boolean,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface RegularCardProps {
|
|
26
|
-
caption?: React.ReactNode;
|
|
27
|
-
description?: React.ReactNode;
|
|
28
|
-
actions?: React.ReactNode;
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type StyledCardProps = WithTransientProps<TransientCardProps>;
|
|
33
|
-
export type CardProps = TransientCardProps & RegularCardProps & BoxProps;
|
|
34
|
-
|
|
35
|
-
export const StyledCardWrapper = styled(Box)<StyledCardProps>`
|
|
36
|
-
/* 👇 this is consoleStyle.partialStyle.card */
|
|
37
|
-
background-color: ${theme.color.neutral.cardBackground};
|
|
38
|
-
border: 1px solid ${theme.color.neutral.border};
|
|
39
|
-
border-radius: ${theme.radius.radius8};
|
|
40
|
-
box-shadow: var(--shadow-1);
|
|
41
|
-
padding: 2rem;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
|
|
44
|
-
/* Reset padding, it is dealt with within header and content styles */
|
|
45
|
-
padding: 0;
|
|
46
|
-
width: 100%;
|
|
47
|
-
font-size: 1.4rem;
|
|
48
|
-
position: relative;
|
|
49
|
-
|
|
50
|
-
& > .${cardClassNames.HEADER} {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
justify-content: space-between;
|
|
54
|
-
align-items: center; /* so it aligns nicely with various content in corner, eg. button */
|
|
55
|
-
padding: ${theme.space.space16} ${theme.space.space16} ${theme.space.space8};
|
|
56
|
-
border-radius: ${theme.radius.radius8} ${theme.radius.radius8} 0 0;
|
|
57
|
-
|
|
58
|
-
.${cardClassNames.ACTIONS} {
|
|
59
|
-
margin-left: 2rem;
|
|
60
|
-
|
|
61
|
-
button {
|
|
62
|
-
font-size: 1.4rem;
|
|
63
|
-
line-height: 1.4rem;
|
|
64
|
-
font-weight: 500;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
& > .${cardClassNames.DESCRIPTION} {
|
|
70
|
-
padding: 0rem ${theme.space.space16} ${theme.space.space16} ${theme.space.space16};
|
|
71
|
-
color: ${theme.color.neutral.textSubtle};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
& > .${cardClassNames.CONTENT} {
|
|
75
|
-
position: relative;
|
|
76
|
-
display: block;
|
|
77
|
-
padding: ${theme.space.space16};
|
|
78
|
-
border-bottom-right-radius: ${theme.radius.radius8};
|
|
79
|
-
border-bottom-left-radius: ${theme.radius.radius8};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
${({ $shadowless }) => ($shadowless && css`
|
|
83
|
-
box-shadow: none;
|
|
84
|
-
`)}
|
|
85
|
-
|
|
86
|
-
${({ $disabled }) => ($disabled && css`
|
|
87
|
-
.${cardClassNames.CONTENT} {
|
|
88
|
-
&::after {
|
|
89
|
-
content: '';
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: 0; bottom: 0; left: 0; right: 0; /* stretch full */
|
|
92
|
-
background: ${theme.color.neutral.backgroundSubtle} !important;
|
|
93
|
-
opacity: 0.4;
|
|
94
|
-
pointer-events: all;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
`)}
|
|
98
|
-
`;
|
|
99
|
-
|
|
100
|
-
export const Card = forwardRef<HTMLElement, CardProps>(({
|
|
101
|
-
as,
|
|
102
|
-
className,
|
|
103
|
-
caption,
|
|
104
|
-
description,
|
|
105
|
-
actions,
|
|
106
|
-
children,
|
|
107
|
-
disabled,
|
|
108
|
-
shadowless,
|
|
109
|
-
...rest
|
|
110
|
-
}, ref) => {
|
|
111
|
-
return (
|
|
112
|
-
<StyledCardWrapper
|
|
113
|
-
$disabled={disabled}
|
|
114
|
-
$shadowless={shadowless}
|
|
115
|
-
forwardedAs={ as || 'section'}
|
|
116
|
-
className={clsx(cardClassNames.WRAPPER, className)}
|
|
117
|
-
data-test='card'
|
|
118
|
-
{...rest}
|
|
119
|
-
ref={ref}
|
|
120
|
-
>
|
|
121
|
-
{(!!caption || !!actions) && (
|
|
122
|
-
<header className={cardClassNames.HEADER} data-test='card-header'>
|
|
123
|
-
{caption && (
|
|
124
|
-
<Text
|
|
125
|
-
as='div'
|
|
126
|
-
size='big'
|
|
127
|
-
weight='bold'
|
|
128
|
-
className={cardClassNames.CAPTION}
|
|
129
|
-
data-test='card-caption'
|
|
130
|
-
>
|
|
131
|
-
{caption}
|
|
132
|
-
</Text>
|
|
133
|
-
)}
|
|
134
|
-
{actions && (<div className={cardClassNames.ACTIONS} data-test='card-actions'>{actions}</div>)}
|
|
135
|
-
</header>
|
|
136
|
-
)}
|
|
137
|
-
{description && (<div className={cardClassNames.DESCRIPTION} data-test='card-description'>{description}</div>)}
|
|
138
|
-
<div className={cardClassNames.CONTENT} data-test='card-content'>{children}</div>
|
|
139
|
-
</StyledCardWrapper>
|
|
140
|
-
);
|
|
141
|
-
});
|