@apify/ui-library 1.154.1 → 1.154.2-choreaddtestidmodulesforrema-560495.15
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/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +3 -2
- package/dist/components/card/card.test_ids.d.ts +5 -0
- package/dist/components/card/card.test_ids.d.ts.map +1 -0
- package/dist/components/card/card.test_ids.js +7 -0
- package/dist/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block.js +3 -2
- package/dist/components/code/code_block/code_block.test_ids.d.ts +5 -0
- package/dist/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
- package/dist/components/code/code_block/code_block.test_ids.js +5 -0
- package/dist/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block_with_tabs.js +2 -1
- package/dist/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/components/code/prism_highlighter.js +2 -1
- package/dist/components/code/prism_highlighter.test_ids.d.ts +4 -0
- package/dist/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
- package/dist/components/code/prism_highlighter.test_ids.js +4 -0
- package/dist/components/collapsible_card/collapsible_card.d.ts.map +1 -1
- package/dist/components/collapsible_card/collapsible_card.js +2 -1
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.js +3 -2
- package/dist/components/dropdown/dropdown.styled.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.styled.js +2 -1
- package/dist/components/dropdown/dropdown.test_ids.d.ts +5 -0
- package/dist/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.test_ids.js +7 -0
- package/dist/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/components/store/store_actor_header.js +2 -1
- package/dist/components/store/store_actor_header.test_ids.d.ts +4 -0
- package/dist/components/store/store_actor_header.test_ids.d.ts.map +1 -0
- package/dist/components/store/store_actor_header.test_ids.js +4 -0
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/src/components/card/card.d.ts.map +1 -1
- package/dist/src/components/card/card.js +2 -1
- package/dist/src/components/card/card.js.map +1 -1
- package/dist/src/components/card/card.test_ids.d.ts +5 -0
- package/dist/src/components/card/card.test_ids.d.ts.map +1 -0
- package/dist/src/components/card/card.test_ids.js +5 -0
- package/dist/src/components/card/card.test_ids.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +3 -2
- package/dist/src/components/code/code_block/code_block.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.test_ids.d.ts +5 -0
- package/dist/src/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/code_block/code_block.test_ids.js +5 -0
- package/dist/src/components/code/code_block/code_block.test_ids.js.map +1 -0
- package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js +2 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js +2 -1
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.test_ids.d.ts +4 -0
- package/dist/src/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/prism_highlighter.test_ids.js +4 -0
- package/dist/src/components/code/prism_highlighter.test_ids.js.map +1 -0
- package/dist/src/components/collapsible_card/collapsible_card.d.ts.map +1 -1
- package/dist/src/components/collapsible_card/collapsible_card.js +2 -1
- package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.js +3 -2
- package/dist/src/components/dropdown/dropdown.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.styled.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.styled.js +2 -1
- package/dist/src/components/dropdown/dropdown.styled.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.test_ids.d.ts +5 -0
- package/dist/src/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
- package/dist/src/components/dropdown/dropdown.test_ids.js +5 -0
- package/dist/src/components/dropdown/dropdown.test_ids.js.map +1 -0
- package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/src/components/store/store_actor_header.js +2 -1
- package/dist/src/components/store/store_actor_header.js.map +1 -1
- package/dist/src/components/store/store_actor_header.test_ids.d.ts +4 -0
- package/dist/src/components/store/store_actor_header.test_ids.d.ts.map +1 -0
- package/dist/src/components/store/store_actor_header.test_ids.js +4 -0
- package/dist/src/components/store/store_actor_header.test_ids.js.map +1 -0
- package/dist/src/test_ids.d.ts +5 -0
- package/dist/src/test_ids.d.ts.map +1 -1
- package/dist/src/test_ids.js +5 -0
- package/dist/src/test_ids.js.map +1 -1
- package/dist/test_ids.d.ts +5 -0
- package/dist/test_ids.d.ts.map +1 -1
- package/dist/test_ids.js +6 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/card/card.test_ids.ts +4 -0
- package/src/components/card/card.tsx +3 -2
- package/src/components/code/code_block/code_block.test_ids.ts +5 -0
- package/src/components/code/code_block/code_block.tsx +3 -2
- package/src/components/code/code_block/code_block_with_tabs.tsx +2 -1
- package/src/components/code/prism_highlighter.test_ids.ts +3 -0
- package/src/components/code/prism_highlighter.tsx +2 -1
- package/src/components/collapsible_card/collapsible_card.tsx +2 -1
- package/src/components/dropdown/dropdown.styled.ts +2 -1
- package/src/components/dropdown/dropdown.test_ids.ts +4 -0
- package/src/components/dropdown/dropdown.tsx +3 -2
- package/src/components/store/store_actor_header.test_ids.ts +3 -0
- package/src/components/store/store_actor_header.tsx +2 -1
- package/src/test_ids.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "1.154.
|
|
3
|
+
"version": "1.154.2-choreaddtestidmodulesforrema-560495.15+ad92fc99dff",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"src",
|
|
96
96
|
"style"
|
|
97
97
|
],
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "ad92fc99dfff45230a40a68c08a9b13f86486789"
|
|
99
99
|
}
|
|
@@ -8,6 +8,7 @@ import type { WithTransientProps } from '../../type_utils';
|
|
|
8
8
|
import type { BoxProps } from '../box';
|
|
9
9
|
import { Box } from '../box';
|
|
10
10
|
import { Text } from '../text';
|
|
11
|
+
import { cardTestIds } from './card.test_ids';
|
|
11
12
|
|
|
12
13
|
export const cardClassNames = {
|
|
13
14
|
WRAPPER: 'Card',
|
|
@@ -114,7 +115,7 @@ export const Card = forwardRef<HTMLElement, CardProps>(
|
|
|
114
115
|
$shadowless={shadowless}
|
|
115
116
|
forwardedAs={as || 'section'}
|
|
116
117
|
className={clsx(cardClassNames.WRAPPER, className)}
|
|
117
|
-
data-test=
|
|
118
|
+
data-test={cardTestIds.CARD}
|
|
118
119
|
{...rest}
|
|
119
120
|
ref={ref}
|
|
120
121
|
>
|
|
@@ -143,7 +144,7 @@ export const Card = forwardRef<HTMLElement, CardProps>(
|
|
|
143
144
|
{description}
|
|
144
145
|
</div>
|
|
145
146
|
)}
|
|
146
|
-
<div className={cardClassNames.CONTENT} data-test=
|
|
147
|
+
<div className={cardClassNames.CONTENT} data-test={cardTestIds.CONTENT}>
|
|
147
148
|
{children}
|
|
148
149
|
</div>
|
|
149
150
|
</StyledCardWrapper>
|
|
@@ -10,6 +10,7 @@ import type { SharedTextSize } from '../../text/text_shared';
|
|
|
10
10
|
import { ActionButton, CopyButton } from '../action_button';
|
|
11
11
|
import { PrismSyntaxHighlighter } from '../prism_highlighter';
|
|
12
12
|
import { CodeBlockWrapper } from './code_block.styled';
|
|
13
|
+
import { codeBlockTabTestId, codeBlockTestIds } from './code_block.test_ids';
|
|
13
14
|
import { getBashLinePrefixes, getNumberLinePrefixes } from './utils';
|
|
14
15
|
|
|
15
16
|
type CodeTab = {
|
|
@@ -57,7 +58,7 @@ const HeaderDots = () => {
|
|
|
57
58
|
|
|
58
59
|
const Header = ({ tabs, currentTab, showBashHeader, onTabChange, title }: HeaderProps) => {
|
|
59
60
|
return (
|
|
60
|
-
<div className="CodeBlock-Header" data-test=
|
|
61
|
+
<div className="CodeBlock-Header" data-test={codeBlockTestIds.HEADER}>
|
|
61
62
|
{showBashHeader && <HeaderDots />}
|
|
62
63
|
{title && (
|
|
63
64
|
<Text weight="bold" className="CodeBlock-HeaderTitle">
|
|
@@ -69,7 +70,7 @@ const Header = ({ tabs, currentTab, showBashHeader, onTabChange, title }: Header
|
|
|
69
70
|
const selected = tab.key === currentTab?.key;
|
|
70
71
|
const props = {
|
|
71
72
|
className: clsx('CodeBlock-Tab', { selected }),
|
|
72
|
-
'data-test':
|
|
73
|
+
'data-test': codeBlockTabTestId(tab.key),
|
|
73
74
|
onClick: (e: React.MouseEvent) => onTabChange(tab, e),
|
|
74
75
|
title: tab.label,
|
|
75
76
|
id: tab.id ?? tab.key,
|
|
@@ -11,6 +11,7 @@ import { Box, type MarginSpacingProps, type RegularBoxProps } from '../../box';
|
|
|
11
11
|
import { Link, type RegularLinkProps } from '../../link';
|
|
12
12
|
import { HeadingShared } from '../../text/heading_shared';
|
|
13
13
|
import { CodeBlock, type CodeBlockProps } from './code_block';
|
|
14
|
+
import { codeBlockTabTestId } from './code_block.test_ids';
|
|
14
15
|
|
|
15
16
|
export type CodeBlockTabKey = 'cli' | 'http' | 'javascript' | 'mcp' | 'openapi' | 'python' | 'typescript';
|
|
16
17
|
type CodeBlockTabConfig = {
|
|
@@ -224,7 +225,7 @@ export const CodeBlockWithTabs = ({
|
|
|
224
225
|
|
|
225
226
|
const commonProps = {
|
|
226
227
|
className: clsx(CODE_BLOCK_WITH_TABS_CLASSNAMES.TAB, { selected }),
|
|
227
|
-
'data-test':
|
|
228
|
+
'data-test': codeBlockTabTestId(tab.key),
|
|
228
229
|
..._.omit(tab, ['bashCommandsStart', 'content', 'languageOverride']),
|
|
229
230
|
};
|
|
230
231
|
const children = (
|
|
@@ -11,6 +11,7 @@ import { useSharedUiDependencies } from '../../ui_dependency_provider';
|
|
|
11
11
|
import type { SharedTextSize } from '../text';
|
|
12
12
|
import { Text } from '../text';
|
|
13
13
|
import { oneLightTheme } from './one_light_theme';
|
|
14
|
+
import { prismHighlighterTestIds } from './prism_highlighter.test_ids';
|
|
14
15
|
|
|
15
16
|
(typeof global !== 'undefined' ? global : window).Prism = Prism;
|
|
16
17
|
|
|
@@ -208,7 +209,7 @@ export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlight
|
|
|
208
209
|
className={clsx(className, prismClassName)}
|
|
209
210
|
$hasLinePrefixes={hasLinePrefixes}
|
|
210
211
|
$isSingleLine={isSingleLine}
|
|
211
|
-
data-test=
|
|
212
|
+
data-test={prismHighlighterTestIds.CODE}
|
|
212
213
|
ref={ref}
|
|
213
214
|
>
|
|
214
215
|
<Text size={size} type="code" as="code">
|
|
@@ -8,6 +8,7 @@ import { ChevronDownIcon } from '@apify/ui-icons';
|
|
|
8
8
|
import { theme } from '../../design_system/theme';
|
|
9
9
|
import type { WithTransientProps } from '../../type_utils';
|
|
10
10
|
import { Box } from '../box';
|
|
11
|
+
import { cardTestIds } from '../card/card.test_ids';
|
|
11
12
|
|
|
12
13
|
interface TransientWrapperProps {
|
|
13
14
|
hideOuterBorder?: boolean;
|
|
@@ -168,7 +169,7 @@ export const CollapsibleCard = ({
|
|
|
168
169
|
$noDivider={noDivider}
|
|
169
170
|
className={collapsibleCardClassNames.COLLAPSIBLE_CONTENT_WRAPPER}
|
|
170
171
|
>
|
|
171
|
-
<StyledCardContent className={collapsibleCardClassNames.CONTENT} data-test=
|
|
172
|
+
<StyledCardContent className={collapsibleCardClassNames.CONTENT} data-test={cardTestIds.CONTENT}>
|
|
172
173
|
{children}
|
|
173
174
|
</StyledCardContent>
|
|
174
175
|
</CollapsibleContent>
|
|
@@ -2,6 +2,7 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { theme } from '../../design_system/theme';
|
|
5
|
+
import { dropdownTestIds } from './dropdown.test_ids';
|
|
5
6
|
|
|
6
7
|
export const DROPDOWN_ELEMENT_CLASSES = {
|
|
7
8
|
WRAPPER: 'dropdown-wrapper',
|
|
@@ -23,7 +24,7 @@ type StyledContentProps = {
|
|
|
23
24
|
export const StyledContent = styled(DropdownMenu.Content).attrs<
|
|
24
25
|
DropdownMenu.DropdownMenuContentProps & { 'data-test'?: string }
|
|
25
26
|
>((props) => ({
|
|
26
|
-
'data-test':
|
|
27
|
+
'data-test': dropdownTestIds.WRAPPER,
|
|
27
28
|
className: [DROPDOWN_ELEMENT_CLASSES.WRAPPER, props.className].filter(Boolean).join(' '),
|
|
28
29
|
}))<StyledContentProps>`
|
|
29
30
|
background: ${theme.color.neutral.background};
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
StyledSeparator,
|
|
27
27
|
StyledTagWrapper,
|
|
28
28
|
} from './dropdown.styled';
|
|
29
|
+
import { dropdownTestIds } from './dropdown.test_ids';
|
|
29
30
|
import type { BaseDropdownItemProps } from './dropdown.types';
|
|
30
31
|
import { DropdownRoot } from './dropdown_root';
|
|
31
32
|
|
|
@@ -62,7 +63,7 @@ const DropdownItem = ({
|
|
|
62
63
|
disabled={disabled}
|
|
63
64
|
{...props}
|
|
64
65
|
className={clsx(DROPDOWN_ELEMENT_CLASSES.ITEM, className, selected && 'dropdown-item-selected')}
|
|
65
|
-
data-test={disabled ? 'dropdown-item-disabled' :
|
|
66
|
+
data-test={disabled ? 'dropdown-item-disabled' : dropdownTestIds.ITEM}
|
|
66
67
|
>
|
|
67
68
|
<StyledItemRow>
|
|
68
69
|
{icon && <StyledIconWrapper>{icon}</StyledIconWrapper>}
|
|
@@ -121,7 +122,7 @@ const DropdownCheckboxItem = ({
|
|
|
121
122
|
{...props}
|
|
122
123
|
onCheckedChange={disabled ? undefined : onCheckedChange}
|
|
123
124
|
className={clsx(className)}
|
|
124
|
-
data-test={disabled ? 'dropdown-item-disabled' :
|
|
125
|
+
data-test={disabled ? 'dropdown-item-disabled' : dropdownTestIds.ITEM}
|
|
125
126
|
>
|
|
126
127
|
<StyledItemRow>
|
|
127
128
|
<StyledCheckboxIconWrapper>
|
|
@@ -5,6 +5,7 @@ import { StarEmptyIcon, WarningTriangleIcon } from '@apify/ui-icons';
|
|
|
5
5
|
import { Badge, Box, type BoxProps, Text } from '../../components';
|
|
6
6
|
import { theme } from '../../design_system/theme';
|
|
7
7
|
import { ActorAvatar, actorAvatarClassnames } from '../avatar';
|
|
8
|
+
import { storeActorHeaderTestIds } from './store_actor_header.test_ids';
|
|
8
9
|
|
|
9
10
|
const storeActorHeaderClassNames = {
|
|
10
11
|
title: 'ActorStoreItem-title',
|
|
@@ -93,7 +94,7 @@ export const StoreActorHeader: React.FC<StoreActorHeaderProps & BoxProps> = ({
|
|
|
93
94
|
...rest
|
|
94
95
|
}) => {
|
|
95
96
|
return (
|
|
96
|
-
<StyledStoreActorHeader data-test=
|
|
97
|
+
<StyledStoreActorHeader data-test={storeActorHeaderTestIds.HEADER} $compact={compact} {...rest}>
|
|
97
98
|
<ActorAvatarWrapper>
|
|
98
99
|
<ActorAvatar
|
|
99
100
|
size={compact ? 20 : avatarSize}
|
package/src/test_ids.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
// `./test-ids` subpath barrel. Playwright imports test IDs from here to avoid the
|
|
2
2
|
// React/CSS-heavy root barrel (which breaks non-bundler loaders). Add future modules here.
|
|
3
|
+
export { cardTestIds } from './components/card/card.test_ids.js';
|
|
4
|
+
export { codeBlockTabTestId, codeBlockTestIds } from './components/code/code_block/code_block.test_ids.js';
|
|
5
|
+
export { prismHighlighterTestIds } from './components/code/prism_highlighter.test_ids.js';
|
|
6
|
+
export { dropdownTestIds } from './components/dropdown/dropdown.test_ids.js';
|
|
7
|
+
export { storeActorHeaderTestIds } from './components/store/store_actor_header.test_ids.js';
|
|
3
8
|
export { tableTestIds } from './components/table/table.test_ids.js';
|