@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.
Files changed (99) hide show
  1. package/dist/components/card/card.d.ts.map +1 -1
  2. package/dist/components/card/card.js +3 -2
  3. package/dist/components/card/card.test_ids.d.ts +5 -0
  4. package/dist/components/card/card.test_ids.d.ts.map +1 -0
  5. package/dist/components/card/card.test_ids.js +7 -0
  6. package/dist/components/code/code_block/code_block.d.ts.map +1 -1
  7. package/dist/components/code/code_block/code_block.js +3 -2
  8. package/dist/components/code/code_block/code_block.test_ids.d.ts +5 -0
  9. package/dist/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
  10. package/dist/components/code/code_block/code_block.test_ids.js +5 -0
  11. package/dist/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
  12. package/dist/components/code/code_block/code_block_with_tabs.js +2 -1
  13. package/dist/components/code/prism_highlighter.d.ts.map +1 -1
  14. package/dist/components/code/prism_highlighter.js +2 -1
  15. package/dist/components/code/prism_highlighter.test_ids.d.ts +4 -0
  16. package/dist/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
  17. package/dist/components/code/prism_highlighter.test_ids.js +4 -0
  18. package/dist/components/collapsible_card/collapsible_card.d.ts.map +1 -1
  19. package/dist/components/collapsible_card/collapsible_card.js +2 -1
  20. package/dist/components/dropdown/dropdown.d.ts.map +1 -1
  21. package/dist/components/dropdown/dropdown.js +3 -2
  22. package/dist/components/dropdown/dropdown.styled.d.ts.map +1 -1
  23. package/dist/components/dropdown/dropdown.styled.js +2 -1
  24. package/dist/components/dropdown/dropdown.test_ids.d.ts +5 -0
  25. package/dist/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
  26. package/dist/components/dropdown/dropdown.test_ids.js +7 -0
  27. package/dist/components/store/store_actor_header.d.ts.map +1 -1
  28. package/dist/components/store/store_actor_header.js +2 -1
  29. package/dist/components/store/store_actor_header.test_ids.d.ts +4 -0
  30. package/dist/components/store/store_actor_header.test_ids.d.ts.map +1 -0
  31. package/dist/components/store/store_actor_header.test_ids.js +4 -0
  32. package/dist/files_hash_at_build.txt +1 -1
  33. package/dist/src/components/card/card.d.ts.map +1 -1
  34. package/dist/src/components/card/card.js +2 -1
  35. package/dist/src/components/card/card.js.map +1 -1
  36. package/dist/src/components/card/card.test_ids.d.ts +5 -0
  37. package/dist/src/components/card/card.test_ids.d.ts.map +1 -0
  38. package/dist/src/components/card/card.test_ids.js +5 -0
  39. package/dist/src/components/card/card.test_ids.js.map +1 -0
  40. package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
  41. package/dist/src/components/code/code_block/code_block.js +3 -2
  42. package/dist/src/components/code/code_block/code_block.js.map +1 -1
  43. package/dist/src/components/code/code_block/code_block.test_ids.d.ts +5 -0
  44. package/dist/src/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
  45. package/dist/src/components/code/code_block/code_block.test_ids.js +5 -0
  46. package/dist/src/components/code/code_block/code_block.test_ids.js.map +1 -0
  47. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
  48. package/dist/src/components/code/code_block/code_block_with_tabs.js +2 -1
  49. package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
  50. package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
  51. package/dist/src/components/code/prism_highlighter.js +2 -1
  52. package/dist/src/components/code/prism_highlighter.js.map +1 -1
  53. package/dist/src/components/code/prism_highlighter.test_ids.d.ts +4 -0
  54. package/dist/src/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
  55. package/dist/src/components/code/prism_highlighter.test_ids.js +4 -0
  56. package/dist/src/components/code/prism_highlighter.test_ids.js.map +1 -0
  57. package/dist/src/components/collapsible_card/collapsible_card.d.ts.map +1 -1
  58. package/dist/src/components/collapsible_card/collapsible_card.js +2 -1
  59. package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
  60. package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
  61. package/dist/src/components/dropdown/dropdown.js +3 -2
  62. package/dist/src/components/dropdown/dropdown.js.map +1 -1
  63. package/dist/src/components/dropdown/dropdown.styled.d.ts.map +1 -1
  64. package/dist/src/components/dropdown/dropdown.styled.js +2 -1
  65. package/dist/src/components/dropdown/dropdown.styled.js.map +1 -1
  66. package/dist/src/components/dropdown/dropdown.test_ids.d.ts +5 -0
  67. package/dist/src/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
  68. package/dist/src/components/dropdown/dropdown.test_ids.js +5 -0
  69. package/dist/src/components/dropdown/dropdown.test_ids.js.map +1 -0
  70. package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
  71. package/dist/src/components/store/store_actor_header.js +2 -1
  72. package/dist/src/components/store/store_actor_header.js.map +1 -1
  73. package/dist/src/components/store/store_actor_header.test_ids.d.ts +4 -0
  74. package/dist/src/components/store/store_actor_header.test_ids.d.ts.map +1 -0
  75. package/dist/src/components/store/store_actor_header.test_ids.js +4 -0
  76. package/dist/src/components/store/store_actor_header.test_ids.js.map +1 -0
  77. package/dist/src/test_ids.d.ts +5 -0
  78. package/dist/src/test_ids.d.ts.map +1 -1
  79. package/dist/src/test_ids.js +5 -0
  80. package/dist/src/test_ids.js.map +1 -1
  81. package/dist/test_ids.d.ts +5 -0
  82. package/dist/test_ids.d.ts.map +1 -1
  83. package/dist/test_ids.js +6 -1
  84. package/dist/tsconfig.build.tsbuildinfo +1 -1
  85. package/package.json +2 -2
  86. package/src/components/card/card.test_ids.ts +4 -0
  87. package/src/components/card/card.tsx +3 -2
  88. package/src/components/code/code_block/code_block.test_ids.ts +5 -0
  89. package/src/components/code/code_block/code_block.tsx +3 -2
  90. package/src/components/code/code_block/code_block_with_tabs.tsx +2 -1
  91. package/src/components/code/prism_highlighter.test_ids.ts +3 -0
  92. package/src/components/code/prism_highlighter.tsx +2 -1
  93. package/src/components/collapsible_card/collapsible_card.tsx +2 -1
  94. package/src/components/dropdown/dropdown.styled.ts +2 -1
  95. package/src/components/dropdown/dropdown.test_ids.ts +4 -0
  96. package/src/components/dropdown/dropdown.tsx +3 -2
  97. package/src/components/store/store_actor_header.test_ids.ts +3 -0
  98. package/src/components/store/store_actor_header.tsx +2 -1
  99. 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.1",
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": "25ca56b2a2db069c5f60e84f2681e06c211fd50a"
98
+ "gitHead": "ad92fc99dfff45230a40a68c08a9b13f86486789"
99
99
  }
@@ -0,0 +1,4 @@
1
+ export const cardTestIds = {
2
+ CARD: 'card',
3
+ CONTENT: 'card-content',
4
+ };
@@ -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="card"
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="card-content">
147
+ <div className={cardClassNames.CONTENT} data-test={cardTestIds.CONTENT}>
147
148
  {children}
148
149
  </div>
149
150
  </StyledCardWrapper>
@@ -0,0 +1,5 @@
1
+ export const codeBlockTestIds = {
2
+ HEADER: 'code-block-header',
3
+ };
4
+
5
+ export const codeBlockTabTestId = (key: string): string => `code-block-tab-${key}`;
@@ -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="code-block-header">
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': `code-block-tab-${tab.key}`,
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': `code-block-tab-${tab.key}`,
228
+ 'data-test': codeBlockTabTestId(tab.key),
228
229
  ..._.omit(tab, ['bashCommandsStart', 'content', 'languageOverride']),
229
230
  };
230
231
  const children = (
@@ -0,0 +1,3 @@
1
+ export const prismHighlighterTestIds = {
2
+ CODE: 'code-block-code',
3
+ };
@@ -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="code-block-code"
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="card-content">
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': 'dropdown-wrapper',
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};
@@ -0,0 +1,4 @@
1
+ export const dropdownTestIds = {
2
+ WRAPPER: 'dropdown-wrapper',
3
+ ITEM: 'dropdown-item',
4
+ };
@@ -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' : 'dropdown-item'}
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' : 'dropdown-item'}
125
+ data-test={disabled ? 'dropdown-item-disabled' : dropdownTestIds.ITEM}
125
126
  >
126
127
  <StyledItemRow>
127
128
  <StyledCheckboxIconWrapper>
@@ -0,0 +1,3 @@
1
+ export const storeActorHeaderTestIds = {
2
+ HEADER: 'actor-store-item-header',
3
+ };
@@ -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="actor-store-item-header" $compact={compact} {...rest}>
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';