@apify/ui-library 0.71.1-featcolortokens-178953.56 → 0.71.1-featcolortokens-178953.63

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.
Files changed (134) hide show
  1. package/dist/src/design_system/colors/generated/{dark.d.ts → css_variables.dark.d.ts} +1 -1
  2. package/dist/src/design_system/colors/generated/css_variables.dark.d.ts.map +1 -0
  3. package/dist/src/design_system/colors/generated/{dark.js → css_variables.dark.js} +1 -1
  4. package/dist/src/design_system/colors/generated/css_variables.dark.js.map +1 -0
  5. package/dist/src/design_system/colors/generated/{light.d.ts → css_variables.light.d.ts} +1 -1
  6. package/dist/src/design_system/colors/generated/css_variables.light.d.ts.map +1 -0
  7. package/{src/design_system/colors/generated/light.ts → dist/src/design_system/colors/generated/css_variables.light.js} +1 -1
  8. package/dist/src/design_system/colors/generated/css_variables.light.js.map +1 -0
  9. package/dist/src/design_system/colors/generated/{palette.dark.d.ts → css_variables_palette.dark.d.ts} +1 -1
  10. package/dist/src/design_system/colors/generated/css_variables_palette.dark.d.ts.map +1 -0
  11. package/dist/src/design_system/colors/generated/{palette.dark.js → css_variables_palette.dark.js} +1 -1
  12. package/dist/src/design_system/colors/generated/css_variables_palette.dark.js.map +1 -0
  13. package/dist/src/design_system/colors/generated/{palette.light.d.ts → css_variables_palette.light.d.ts} +1 -1
  14. package/dist/src/design_system/colors/generated/css_variables_palette.light.d.ts.map +1 -0
  15. package/{src/design_system/colors/generated/palette.light.ts → dist/src/design_system/colors/generated/css_variables_palette.light.js} +1 -1
  16. package/dist/src/design_system/colors/generated/css_variables_palette.light.js.map +1 -0
  17. package/dist/src/design_system/colors/index.d.ts +4 -4
  18. package/dist/src/design_system/colors/index.d.ts.map +1 -1
  19. package/dist/src/design_system/colors/index.js +4 -4
  20. package/dist/src/design_system/colors/index.js.map +1 -1
  21. package/dist/tsconfig.build.tsbuildinfo +1 -0
  22. package/package.json +7 -5
  23. package/.stylelintrc +0 -12
  24. package/CHANGELOG.md +0 -3334
  25. package/CODEOWNERS +0 -7
  26. package/dist/src/design_system/colors/generated/dark.d.ts.map +0 -1
  27. package/dist/src/design_system/colors/generated/dark.js.map +0 -1
  28. package/dist/src/design_system/colors/generated/light.d.ts.map +0 -1
  29. package/dist/src/design_system/colors/generated/light.js +0 -147
  30. package/dist/src/design_system/colors/generated/light.js.map +0 -1
  31. package/dist/src/design_system/colors/generated/palette.dark.d.ts.map +0 -1
  32. package/dist/src/design_system/colors/generated/palette.dark.js.map +0 -1
  33. package/dist/src/design_system/colors/generated/palette.light.d.ts.map +0 -1
  34. package/dist/src/design_system/colors/generated/palette.light.js +0 -74
  35. package/dist/src/design_system/colors/generated/palette.light.js.map +0 -1
  36. package/dist/src/design_system/colors_theme.d.ts +0 -213
  37. package/dist/src/design_system/colors_theme.d.ts.map +0 -1
  38. package/dist/src/design_system/colors_theme.js +0 -213
  39. package/dist/src/design_system/colors_theme.js.map +0 -1
  40. package/dist/src/design_system/properties_theme.d.ts +0 -175
  41. package/dist/src/design_system/properties_theme.d.ts.map +0 -1
  42. package/dist/src/design_system/properties_theme.js +0 -315
  43. package/dist/src/design_system/properties_theme.js.map +0 -1
  44. package/eslint.config.mjs +0 -44
  45. package/src/codemods/generate_typograpy_tokens_files.mjs +0 -137
  46. package/src/components/action_link.tsx +0 -60
  47. package/src/components/actor_template_card.tsx +0 -116
  48. package/src/components/badge.tsx +0 -148
  49. package/src/components/banner.tsx +0 -94
  50. package/src/components/blog_article.tsx +0 -85
  51. package/src/components/box.tsx +0 -127
  52. package/src/components/button.tsx +0 -305
  53. package/src/components/chip.tsx +0 -128
  54. package/src/components/code/action_button.tsx +0 -96
  55. package/src/components/code/code_block/code_block.styled.tsx +0 -180
  56. package/src/components/code/code_block/code_block.tsx +0 -224
  57. package/src/components/code/code_block/code_block_with_tabs.tsx +0 -257
  58. package/src/components/code/code_block/utils.tsx +0 -67
  59. package/src/components/code/index.ts +0 -5
  60. package/src/components/code/inline_code/inline_code.tsx +0 -62
  61. package/src/components/code/one_line_code/one_line_code.tsx +0 -228
  62. package/src/components/code/prism_highlighter.tsx +0 -180
  63. package/src/components/color_wheel_gradient.tsx +0 -31
  64. package/src/components/floating/index.ts +0 -3
  65. package/src/components/floating/menu.tsx +0 -189
  66. package/src/components/floating/menu_common.tsx +0 -31
  67. package/src/components/floating/menu_components.tsx +0 -99
  68. package/src/components/image.tsx +0 -24
  69. package/src/components/index.ts +0 -22
  70. package/src/components/link.tsx +0 -114
  71. package/src/components/message.tsx +0 -153
  72. package/src/components/rating.tsx +0 -106
  73. package/src/components/readme_renderer/index.ts +0 -3
  74. package/src/components/readme_renderer/pythonize_value.ts +0 -76
  75. package/src/components/readme_renderer/table_of_contents.tsx +0 -272
  76. package/src/components/readme_renderer/utils.tsx +0 -46
  77. package/src/components/simple_markdown/index.ts +0 -2
  78. package/src/components/simple_markdown/simple_markdown.tsx +0 -214
  79. package/src/components/simple_markdown/simple_markdown_components.tsx +0 -293
  80. package/src/components/tabs/index.ts +0 -2
  81. package/src/components/tabs/tab.tsx +0 -217
  82. package/src/components/tabs/tabs.tsx +0 -169
  83. package/src/components/tag.tsx +0 -196
  84. package/src/components/text/heading_content.tsx +0 -56
  85. package/src/components/text/heading_marketing.tsx +0 -55
  86. package/src/components/text/heading_shared.tsx +0 -55
  87. package/src/components/text/index.ts +0 -19
  88. package/src/components/text/text_base.tsx +0 -52
  89. package/src/components/text/text_content.tsx +0 -104
  90. package/src/components/text/text_marketing.tsx +0 -152
  91. package/src/components/text/text_shared.tsx +0 -95
  92. package/src/components/tile/horizontal_tile.tsx +0 -77
  93. package/src/components/tile/index.ts +0 -2
  94. package/src/components/tile/shared.ts +0 -27
  95. package/src/components/tile/vertical_tile.tsx +0 -59
  96. package/src/components/to_consolidate/card.tsx +0 -141
  97. package/src/components/to_consolidate/index.ts +0 -4
  98. package/src/components/to_consolidate/markdown.tsx +0 -609
  99. package/src/components/to_consolidate/pagination.tsx +0 -136
  100. package/src/components/to_consolidate/tab_number_chip.tsx +0 -31
  101. package/src/design_system/colors/build_color_tokens.js +0 -175
  102. package/src/design_system/colors/figma_color_tokens.dark.json +0 -886
  103. package/src/design_system/colors/figma_color_tokens.light.json +0 -886
  104. package/src/design_system/colors/generated/colors_theme.dark.ts +0 -110
  105. package/src/design_system/colors/generated/colors_theme.light.ts +0 -110
  106. package/src/design_system/colors/generated/dark.ts +0 -147
  107. package/src/design_system/colors/generated/palette.dark.ts +0 -74
  108. package/src/design_system/colors/generated/properties_theme.ts +0 -179
  109. package/src/design_system/colors/index.ts +0 -7
  110. package/src/design_system/colors_theme.ts +0 -213
  111. package/src/design_system/properties_theme.ts +0 -453
  112. package/src/design_system/supernova_typography_tokens.json +0 -657
  113. package/src/design_system/theme.ts +0 -25
  114. package/src/design_system/tokens/index.ts +0 -5
  115. package/src/design_system/tokens/layouts.ts +0 -29
  116. package/src/design_system/tokens/radiuses.ts +0 -22
  117. package/src/design_system/tokens/shadows.ts +0 -22
  118. package/src/design_system/tokens/spaces.ts +0 -15
  119. package/src/design_system/tokens/transitions.ts +0 -19
  120. package/src/design_system/typography_theme.ts +0 -197
  121. package/src/index.ts +0 -8
  122. package/src/type_utils.ts +0 -7
  123. package/src/ui_dependency_provider.tsx +0 -58
  124. package/src/utils/copy_to_clipboard.ts +0 -24
  125. package/src/utils/image_color.ts +0 -42
  126. package/src/utils/index.ts +0 -4
  127. package/src/utils/resize_observer.ts +0 -18
  128. package/src/utils/sanitization.ts +0 -14
  129. package/tsconfig.build.json +0 -17
  130. package/tsconfig.json +0 -10
  131. /package/{src/design_system/colors/generated → style/colors}/dark.scss +0 -0
  132. /package/{src/design_system/colors/generated → style/colors}/light.scss +0 -0
  133. /package/{src/design_system/colors/generated → style/colors}/palette.dark.scss +0 -0
  134. /package/{src/design_system/colors/generated → style/colors}/palette.light.scss +0 -0
@@ -1,95 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import styled from 'styled-components';
3
-
4
- import { theme } from '../../design_system/theme.js';
5
- import type { WithTransientProps } from '../../type_utils.js';
6
- import type { TextBaseProps } from './text_base.js';
7
- import { TextBaseComponent } from './text_base.js';
8
-
9
- export const SHARED_TEXT_TYPES = ['body', 'code'] as const;
10
- export type SharedTextType = typeof SHARED_TEXT_TYPES[number];
11
-
12
- export type SharedTextSize = 'regular' | 'small' | 'big';
13
- export type SharedTextWeight = 'normal' | 'medium' | 'bold';
14
-
15
- export interface TransientSharedTextProps {
16
- type?: SharedTextType,
17
- size?: SharedTextSize,
18
- weight?: SharedTextWeight,
19
- }
20
-
21
- type StyledSharedTextProps = WithTransientProps<TransientSharedTextProps>;
22
- export type SharedTextProps = TransientSharedTextProps & TextBaseProps;
23
-
24
- type TextSharedVariants = {
25
- [Type in SharedTextType]: {
26
- [Size in SharedTextSize]: {
27
- [Weight in SharedTextWeight]: string;
28
- };
29
- };
30
- };
31
-
32
- const TEXT_SHARED_VARIANTS_CSS: TextSharedVariants = {
33
- body: {
34
- regular: {
35
- normal: theme.typography.shared.tablet.bodyM,
36
- medium: theme.typography.shared.tablet.bodyMMedium,
37
- bold: theme.typography.shared.tablet.bodyMStrong,
38
- },
39
- small: {
40
- normal: theme.typography.shared.tablet.bodyS,
41
- medium: theme.typography.shared.tablet.bodySMedium,
42
- bold: theme.typography.shared.tablet.bodySStrong,
43
- },
44
- big: {
45
- normal: theme.typography.shared.tablet.bodyL,
46
- medium: theme.typography.shared.tablet.bodyLMedium,
47
- bold: theme.typography.shared.tablet.bodyLStrong,
48
- },
49
- },
50
- code: {
51
- regular: {
52
- normal: theme.typography.shared.tablet.codeM,
53
- medium: theme.typography.shared.tablet.codeMMedium,
54
- bold: theme.typography.shared.tablet.codeMStrong,
55
- },
56
- small: {
57
- normal: theme.typography.shared.tablet.codeS,
58
- medium: theme.typography.shared.tablet.codeSMedium,
59
- bold: theme.typography.shared.tablet.codeSStrong,
60
- },
61
- big: {
62
- normal: theme.typography.shared.tablet.codeL,
63
- medium: theme.typography.shared.tablet.codeLMedium,
64
- bold: theme.typography.shared.tablet.codeLStrong,
65
- },
66
- },
67
- };
68
-
69
- const StyledTextShared = styled(TextBaseComponent)<StyledSharedTextProps>`
70
- ${(props) => TEXT_SHARED_VARIANTS_CSS[props.$type || 'body'][props.$size || 'regular'][props.$weight || 'normal']}
71
- `;
72
-
73
- export const TextShared = forwardRef<HTMLElement | undefined, SharedTextProps>(({
74
- type,
75
- size,
76
- weight,
77
- as,
78
- ...rest
79
- }, ref) => {
80
- return (
81
- <StyledTextShared
82
- $type={type}
83
- $size={size}
84
- $weight={weight}
85
- forwardedAs={as || 'p'}
86
- ref={ref}
87
- // We have global CSS file that defines margins for p and h to some 'normalized' value
88
- // But at the same time we want to have default margin set to 0 for Text and Headings
89
- // In perfect world, all texts would be rendered using Text/Heading components and we could have 0 margin set globally
90
- // Until then we have to set default 0 margin here
91
- m='none'
92
- {...rest}
93
- />
94
- );
95
- });
@@ -1,77 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
-
4
- import { theme } from '../../design_system/theme.js';
5
- import type {
6
- TileSharedProps,
7
- TileSizesType,
8
- } from './shared.js';
9
- import {
10
- TILE_SIZES,
11
- tileStyle,
12
- } from './shared.js';
13
-
14
- interface HorizontalTileProps extends TileSharedProps {
15
- icon?: React.ReactNode;
16
- action?: React.ReactNode;
17
- }
18
-
19
- interface StyledTileWrapperProps {
20
- $hasIcon?: boolean;
21
- $size?: TileSizesType;
22
- }
23
-
24
- const WrapperClasses = {
25
- TILE_CONTENT: 'Tile-Content',
26
- };
27
-
28
- const StyledTileWrapper = styled.div<StyledTileWrapperProps>`
29
- ${tileStyle}
30
- padding: ${({ $size }) => ($size === TILE_SIZES.SMALL ? theme.space.space16 : theme.space.space24)};
31
- display: flex;
32
- flex-direction: row;
33
- align-items: center;
34
-
35
- cursor: pointer;
36
- transition: box-shadow ${theme.transition.smoothEaseOut},
37
- background-color ${theme.transition.smoothEaseOut},
38
- border-color ${theme.transition.smoothEaseOut};
39
-
40
- &:hover {
41
- box-shadow: ${theme.shadow.shadow1};
42
- background-color: ${theme.color.neutral.hover};
43
- }
44
-
45
- &:active,
46
- &:focus {
47
- border-color: ${theme.color.primary.action};
48
- }
49
-
50
- ${({ $hasIcon }) => $hasIcon && `gap: ${theme.space.space8};`}
51
-
52
- .${WrapperClasses.TILE_CONTENT} {
53
- flex-grow: 1;
54
- }
55
- `;
56
-
57
- export const HorizontalTile: React.FC<HorizontalTileProps> = ({
58
- content,
59
- icon,
60
- action,
61
- size = TILE_SIZES.SMALL,
62
- onClick,
63
- ...otherProps
64
- }) => {
65
- return (
66
- <StyledTileWrapper
67
- $hasIcon={!!icon}
68
- $size={size}
69
- onClick={onClick}
70
- {...otherProps}
71
- >
72
- <div>{icon}</div>
73
- <div className={WrapperClasses.TILE_CONTENT}>{content}</div>
74
- <div>{action}</div>
75
- </StyledTileWrapper>
76
- );
77
- };
@@ -1,2 +0,0 @@
1
- export * from './horizontal_tile.js';
2
- export * from './vertical_tile.js';
@@ -1,27 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- import { theme } from '../../design_system/theme.js';
4
-
5
- export const TILE_SIZES = {
6
- SMALL: 'S',
7
- LARGE: 'L',
8
- };
9
-
10
- export type TileSizesType = typeof TILE_SIZES[keyof typeof TILE_SIZES];
11
-
12
- export const tileStyle = css`
13
- background-color: ${theme.color.neutral.background};
14
- border: 1px solid ${theme.color.neutral.border};
15
- border-radius: ${theme.radius.radius12};
16
- `;
17
-
18
- export type TileSharedProps = {
19
- content: React.ReactNode,
20
- size?: TileSizesType,
21
- isClickable?: boolean,
22
- onClick?: () => void,
23
- id?: string;
24
- className?: string;
25
- style?: React.CSSProperties;
26
- as?: React.ElementType;
27
- };
@@ -1,59 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
-
4
- import { theme } from '../../design_system/theme.js';
5
- import type {
6
- TileSharedProps,
7
- TileSizesType,
8
- } from './shared.js';
9
- import {
10
- TILE_SIZES,
11
- tileStyle,
12
- } from './shared.js';
13
-
14
- interface VerticalTileProps extends TileSharedProps {
15
- content: React.ReactNode;
16
- icon?: React.ReactNode;
17
- action?: React.ReactNode;
18
- }
19
-
20
- interface StyledTileWrapperProps {
21
- $size?: TileSizesType;
22
- }
23
-
24
- const WrapperClasses = {
25
- TILE_CONTENT: 'Tile-Content',
26
- };
27
-
28
- const StyledTileWrapper = styled.div<StyledTileWrapperProps>`
29
- ${tileStyle}
30
- padding: ${({ $size }) => ($size === TILE_SIZES.SMALL ? theme.space.space16 : theme.space.space24)};
31
- width: 100%;
32
- cursor: pointer;
33
- transition: box-shadow ${theme.transition.smoothEaseOut},
34
- background-color ${theme.transition.smoothEaseOut},
35
- border-color ${theme.transition.smoothEaseOut};
36
-
37
- &:hover {
38
- box-shadow: ${theme.shadow.shadow1};
39
- background-color: ${theme.color.neutral.hover};
40
- }
41
-
42
- &:active,
43
- &:focus {
44
- border-color: ${theme.color.primary.action};
45
- }
46
- `;
47
-
48
- export const VerticalTile: React.FC<VerticalTileProps> = ({
49
- content,
50
- size = TILE_SIZES.LARGE,
51
- onClick,
52
- ...otherProps
53
- }) => {
54
- return (
55
- <StyledTileWrapper $size={size} onClick={onClick} {...otherProps}>
56
- <div className={WrapperClasses.TILE_CONTENT}>{content}</div>
57
- </StyledTileWrapper>
58
- );
59
- };
@@ -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
- });
@@ -1,4 +0,0 @@
1
- export * from './card.js';
2
- export * from './pagination.js';
3
- export * from './markdown.js';
4
- export * from './tab_number_chip.js';