@apify/ui-library 1.133.0 → 1.134.0

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 (45) hide show
  1. package/dist/src/components/box.d.ts.map +1 -1
  2. package/dist/src/components/card_container.js.map +1 -1
  3. package/dist/src/components/chip.d.ts.map +1 -1
  4. package/dist/src/components/chip.js.map +1 -1
  5. package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
  6. package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
  7. package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
  8. package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
  9. package/dist/src/components/code/prism_highlighter.js.map +1 -1
  10. package/dist/src/components/floating/tooltip.d.ts.map +1 -1
  11. package/dist/src/components/floating/tooltip.js +8 -0
  12. package/dist/src/components/floating/tooltip.js.map +1 -1
  13. package/dist/src/components/icon_button.d.ts.map +1 -1
  14. package/dist/src/components/rating.d.ts.map +1 -1
  15. package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
  16. package/dist/src/components/spinner.d.ts.map +1 -1
  17. package/dist/src/components/spinner.js.map +1 -1
  18. package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
  19. package/dist/src/components/store/store_actor_header.js.map +1 -1
  20. package/dist/src/components/tag.d.ts.map +1 -1
  21. package/dist/src/components/to_consolidate/pagination.d.ts.map +1 -1
  22. package/dist/src/design_system/theme.d.ts.map +1 -1
  23. package/dist/src/type_utils.d.ts.map +1 -1
  24. package/dist/src/ui_dependency_provider.d.ts.map +1 -1
  25. package/dist/tsconfig.build.tsbuildinfo +1 -1
  26. package/package.json +2 -2
  27. package/src/components/box.tsx +1 -1
  28. package/src/components/card_container.tsx +1 -1
  29. package/src/components/chip.tsx +3 -3
  30. package/src/components/code/code_block/code_block.tsx +3 -3
  31. package/src/components/code/inline_code/inline_code.tsx +1 -1
  32. package/src/components/code/one_line_code/one_line_code.tsx +2 -2
  33. package/src/components/code/prism_highlighter.tsx +1 -1
  34. package/src/components/floating/tooltip.tsx +8 -0
  35. package/src/components/image.tsx +1 -1
  36. package/src/components/rating.tsx +3 -3
  37. package/src/components/simple_markdown/simple_markdown.tsx +1 -1
  38. package/src/components/spinner.tsx +1 -1
  39. package/src/components/store/store_actor_header.tsx +2 -2
  40. package/src/components/tabs/tabs.tsx +1 -1
  41. package/src/components/tag.tsx +1 -1
  42. package/src/components/to_consolidate/pagination.tsx +1 -1
  43. package/src/design_system/theme.ts +1 -1
  44. package/src/type_utils.ts +1 -1
  45. package/src/ui_dependency_provider.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.133.0",
3
+ "version": "1.134.0",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -70,5 +70,5 @@
70
70
  "src",
71
71
  "style"
72
72
  ],
73
- "gitHead": "4df09cdffad169b379e062cc4dbc1641d8a6f0c7"
73
+ "gitHead": "f8321843cceed834c46deb61af56d269efc3c7ae"
74
74
  }
@@ -34,7 +34,7 @@ type SharedBoxProps = {
34
34
  style?: React.CSSProperties
35
35
  onClick?: (e: React.MouseEvent) => void,
36
36
  id?: string,
37
- }
37
+ };
38
38
 
39
39
  // This should be renamed - these props are global for any element not just Boxes
40
40
  export type RegularBoxProps = SharedBoxProps & { as?: React.ElementType };
@@ -16,7 +16,7 @@ const HEADER_PLACEMENT = {
16
16
  BOTTOM: 'BOTTOM',
17
17
  } as const;
18
18
 
19
- const Wrapper = styled(Box)<{$headerPlacement: ValueOf<typeof HEADER_PLACEMENT>}>`
19
+ const Wrapper = styled(Box)<{ $headerPlacement: ValueOf<typeof HEADER_PLACEMENT> }>`
20
20
  background-color: ${theme.color.neutral.backgroundSubtle};
21
21
  border-radius: ${theme.radius.radius12};
22
22
 
@@ -80,7 +80,7 @@ const chipTypeStyle = {
80
80
  `,
81
81
  } satisfies Record<CHIP_TYPES, unknown>;
82
82
 
83
- const StyledChip = styled.span<{size: CHIP_SIZES, type: CHIP_TYPES, clickable: boolean}>`
83
+ const StyledChip = styled.span<{ size: CHIP_SIZES, type: CHIP_TYPES, clickable: boolean }>`
84
84
  ${({ size }) => chipSizeStyle[size]};
85
85
  ${({ type }) => chipTypeStyle[type]};
86
86
  /* Static styles */
@@ -100,7 +100,7 @@ export type ChipProps = RegularBoxProps & {
100
100
  size?: CHIP_SIZES
101
101
  icon?: React.ReactNode
102
102
  clickable?: boolean
103
- }
103
+ };
104
104
 
105
105
  /**
106
106
  * Component for displaying status and for labelling other components.
@@ -121,7 +121,7 @@ export const Chip = forwardRef(({
121
121
 
122
122
  Chip.displayName = 'Chip';
123
123
 
124
- type SpecificChipProps = Omit<ChipProps, 'type'>
124
+ type SpecificChipProps = Omit<ChipProps, 'type'>;
125
125
 
126
126
  export const PrimaryChip: FC<SpecificChipProps> = (props) => <Chip type={CHIP_TYPES.PRIMARY} {...props} />;
127
127
  export const NeutralChip: FC<SpecificChipProps> = (props) => <Chip type={CHIP_TYPES.DEFAULT} {...props} />;
@@ -21,7 +21,7 @@ type CodeTab = {
21
21
  language?: string;
22
22
  bashCommandsStart?: number[];
23
23
  to?: string;
24
- }
24
+ };
25
25
 
26
26
  type HeaderProps = {
27
27
  tabs: CodeTab[] | null;
@@ -29,7 +29,7 @@ type HeaderProps = {
29
29
  onTabChange: (tab: CodeTab, e: React.MouseEvent) => void;
30
30
  title?: string;
31
31
  showBashHeader?: boolean;
32
- }
32
+ };
33
33
 
34
34
  const LANGUAGES_WITHOUT_LINE_NUMBERS = ['json', 'jsonp', 'jsonp', 'rss', 'yaml', 'xml', 'html', 'bash', 'text', 'dockerfile', 'http'];
35
35
 
@@ -111,7 +111,7 @@ export type CodeBlockProps = RegularBoxProps & {
111
111
  bashCommandsStart?: number[];
112
112
  hideBashPromptPrefixes?: boolean;
113
113
  hideLineNumbers?: boolean | undefined;
114
- }
114
+ };
115
115
 
116
116
  export const CodeBlock = ({
117
117
  content,
@@ -42,7 +42,7 @@ export type InlineCodeProps = RegularBoxProps & {
42
42
  children: React.ReactNode,
43
43
  size?: SharedTextSize,
44
44
  withCopyButton?: boolean,
45
- }
45
+ };
46
46
 
47
47
  // This might be just a Chip component
48
48
  export const InlineCode: React.FC<InlineCodeProps> = ({
@@ -51,7 +51,7 @@ type OneLineCodeWrapperProps = SyntaxHighlighterBaseStylesWrapperProps & {
51
51
  $fitContent?: boolean;
52
52
  $showBashPrefixes?: boolean;
53
53
  $disabled?: boolean;
54
- }
54
+ };
55
55
 
56
56
  const OneLineCodeWrapper = styled(SyntaxHighlighterBaseStylesWrapper)<OneLineCodeWrapperProps>`
57
57
  display: flex;
@@ -160,7 +160,7 @@ export type OneLineCodeProps = Omit<BoxProps, 'children'> & {
160
160
  disabled?: boolean;
161
161
  hideCopyButton?: boolean;
162
162
  trackingBundle?: OneLineCodeTrackingBundle;
163
- }
163
+ };
164
164
 
165
165
  export function OneLineCode({
166
166
  children,
@@ -128,7 +128,7 @@ const PreWrapper = styled.pre<PreWrapperProps>`
128
128
  padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? '0.2' : '1')}rem;
129
129
  }
130
130
 
131
- ${({ $isSingleLine }) => !$isSingleLine && css<{$hasLinePrefixes: boolean}>`
131
+ ${({ $isSingleLine }) => !$isSingleLine && css<{ $hasLinePrefixes: boolean }>`
132
132
  &:hover {
133
133
  background-color: ${HIGHLIGHT_BACKGROUND_COLOR} !important;
134
134
  border-left: 6px solid ${theme.color.neutral.border} !important;
@@ -52,6 +52,14 @@ const StyledFloatingComponentBase = styled(FloatingComponentBase)<{ $isDarkTheme
52
52
  background-color: ${theme.colorPalette.dark.neutral900};
53
53
  padding: ${theme.space.space8};
54
54
 
55
+ a {
56
+ color: ${theme.colorPalette.dark.blue100};
57
+
58
+ &:hover {
59
+ color: ${theme.colorPalette.dark.blue75};
60
+ }
61
+ }
62
+
55
63
  ${({ $isDarkTheme }) => $isDarkTheme && css`
56
64
  box-shadow: ${theme.shadow.shadow2};
57
65
  border: 1px solid ${theme.color.neutral.smallTooltipBorder};
@@ -10,7 +10,7 @@ type ImageProps = {
10
10
  width?: number,
11
11
  height?: number,
12
12
  loading?: 'eager' | 'lazy' | undefined;
13
- } & ImageProxyOptions
13
+ } & ImageProxyOptions;
14
14
 
15
15
  export const Image = forwardRef<HTMLImageElement, ImageProps & Omit<BoxProps, 'as'>>((props, ref) => {
16
16
  const { InternalImage } = useSharedUiDependencies();
@@ -13,7 +13,7 @@ import { Text } from './text/index.js';
13
13
 
14
14
  type RatingStatsProps = {
15
15
  ratingStats: Record<ReviewRating, number>
16
- }
16
+ };
17
17
 
18
18
  const StyledRating = styled(Box)`
19
19
  display: flex;
@@ -57,7 +57,7 @@ const StyledRatingBar = styled(Box)<{ $widthPercent: number }>`
57
57
 
58
58
  type SingleStarRatingProps = BoxProps & {
59
59
  color?: string;
60
- }
60
+ };
61
61
 
62
62
  export const SingleStarRating: FC<SingleStarRatingProps> = ({
63
63
  color = theme.color.neutral.icon,
@@ -74,7 +74,7 @@ export const SingleStarRating: FC<SingleStarRatingProps> = ({
74
74
  type RatingProps = BoxProps & {
75
75
  rating: number | undefined;
76
76
  color?: string;
77
- }
77
+ };
78
78
 
79
79
  export const Rating: FC<RatingProps> = ({
80
80
  rating = 0,
@@ -190,7 +190,7 @@ export type SimpleMarkdownProps = Omit<ReactMarkdownOptions, 'urlTransform' | 'c
190
190
  size?: MarkdownSize,
191
191
  children: string,
192
192
  className?: string,
193
- }
193
+ };
194
194
 
195
195
  export const useDefaultUrlTransform = () => {
196
196
  const { windowLocationHost } = useSharedUiDependencies();
@@ -102,7 +102,7 @@ export const BlockSpinner = styled(Spinner)`
102
102
  /**
103
103
  * Use the inline variant within buttons, texts etc. The color of the spinner is set to current color of text.
104
104
  */
105
- export const InlineSpinner = styled(Spinner)<{size?: string}>`
105
+ export const InlineSpinner = styled(Spinner)<{ size?: string }>`
106
106
  display: inline-block;
107
107
  position: relative;
108
108
  height: ${({ size }) => size || theme.space.space12};
@@ -12,7 +12,7 @@ const storeActorHeaderClassNames = {
12
12
  badge: 'ActorStoreItem-badge',
13
13
  };
14
14
 
15
- const StyledStoreActorHeader = styled(Box)<{ $compact: boolean}>`
15
+ const StyledStoreActorHeader = styled(Box)<{ $compact: boolean }>`
16
16
  display: flex;
17
17
  gap: ${({ $compact }) => ($compact ? theme.space.space4 : theme.space.space12)};
18
18
  align-items: ${({ $compact }) => ($compact ? 'flex-start' : 'center')};
@@ -79,7 +79,7 @@ export type StoreActorHeaderProps = {
79
79
  hasRisingStarBadge?: boolean,
80
80
  avatarSize?: number,
81
81
  compact?: boolean;
82
- }
82
+ };
83
83
 
84
84
  export const StoreActorHeader: React.FC<StoreActorHeaderProps & BoxProps> = ({
85
85
  name,
@@ -128,7 +128,7 @@ const TabsWrapper = styled(Box)<TabsWrapperProps>`
128
128
  type TabOverflowState = {
129
129
  right: boolean;
130
130
  left: boolean;
131
- }
131
+ };
132
132
 
133
133
  const isTabsOverflowing = (node: HTMLDivElement): TabOverflowState => {
134
134
  if (node.scrollWidth > node.clientWidth) {
@@ -35,7 +35,7 @@ type TagNodePropsMap = {
35
35
  element: HTMLButtonElement;
36
36
  props: RegularButtonProps;
37
37
  };
38
- }
38
+ };
39
39
 
40
40
  type SharedTagProps = Omit<RegularBoxProps, 'as'> & MarginSpacingProps;
41
41
  export type TagProps<T extends TagNodeType> = SharedTagProps & ({
@@ -39,7 +39,7 @@ export type PaginationButtonsProps = {
39
39
  page: number;
40
40
  totalPages: number;
41
41
  onPageChange: (page: number) => void;
42
- }
42
+ };
43
43
 
44
44
  // TODO: Consolidate and move to /library
45
45
  export const PaginationButtons: FC<PaginationButtonsProps> = ({
@@ -22,4 +22,4 @@ export const theme = {
22
22
  typography: typographyTokens,
23
23
  };
24
24
 
25
- export type UiThemeOption = 'LIGHT' | 'DARK'
25
+ export type UiThemeOption = 'LIGHT' | 'DARK';
package/src/type_utils.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  // It's called transient props (https://styled-components.com/docs/api#transient-props)
4
4
  export type WithTransientProps<T> = { [P in keyof T & string as `$${P}`]: T[P] };
5
5
 
6
- export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>
6
+ export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
7
7
  export type WithOptional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
@@ -18,7 +18,7 @@ export type ImageProxyOptions = {
18
18
  width?: number,
19
19
  height?: number,
20
20
  }
21
- }
21
+ };
22
22
 
23
23
  export interface UiDependencies {
24
24
  InternalLink: React.ForwardRefExoticComponent<AgnosticInternalLinkProps & React.RefAttributes<HTMLAnchorElement>>,