@apify/ui-library 1.115.1 → 1.117.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.115.1",
3
+ "version": "1.117.0",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -64,5 +64,5 @@
64
64
  "src",
65
65
  "style"
66
66
  ],
67
- "gitHead": "4c8d177fb4b7faae350cfdb7384bba4cedaf12b7"
67
+ "gitHead": "13929e171fe47c6451f983e94763b5923af1215d"
68
68
  }
@@ -40,6 +40,7 @@ export type BadgeProps = SharedBadgeProps & {
40
40
  type?: SharedTextType;
41
41
  variant?: BadgeVariant;
42
42
  LeadingIcon?: IconComponent;
43
+ TrailingIcon?: IconComponent;
43
44
  };
44
45
 
45
46
  const badgeSizeStyle = {
@@ -139,6 +140,7 @@ export const Badge = forwardRef(
139
140
  type = 'body',
140
141
  variant = 'neutral',
141
142
  LeadingIcon,
143
+ TrailingIcon,
142
144
  children,
143
145
  ...props
144
146
  }: BadgeProps,
@@ -154,6 +156,7 @@ export const Badge = forwardRef(
154
156
  >
155
157
  {LeadingIcon && <LeadingIcon size={BADGE_ICON_SIZES[size]} />}
156
158
  {children && (<Text size={BADGE_TEXT_SIZES[size]} type={type} weight="medium" as='span'>{children}</Text>)}
159
+ {TrailingIcon && <TrailingIcon size={BADGE_ICON_SIZES[size]} />}
157
160
  </StyledBadge>
158
161
  );
159
162
  },
@@ -53,6 +53,7 @@ const ButtonSection = ({ ...rest }: Partial<ButtonProps>) => {
53
53
  <Button {...props} variant='secondary'>Secondary</Button>
54
54
  <Button {...props} variant='tertiary'>Tertiary</Button>
55
55
  <Button {...props} disabled>Disabled</Button>
56
+ <Button {...props} variant='tertiary' disabled>Tertiary Disabled</Button>
56
57
  </ButtonGrid>
57
58
 
58
59
  <h6>With leading icon</h6>
@@ -61,6 +62,7 @@ const ButtonSection = ({ ...rest }: Partial<ButtonProps>) => {
61
62
  <Button {...props} LeftIcon={CrossIcon} variant='secondary'>Secondary</Button>
62
63
  <Button {...props} LeftIcon={CrossIcon} variant='tertiary'>Tertiary</Button>
63
64
  <Button {...props} LeftIcon={CrossIcon} disabled>Disabled</Button>
65
+ <Button {...props} LeftIcon={CrossIcon} variant='tertiary' disabled>Tertiary Disabled</Button>
64
66
  </ButtonGrid>
65
67
 
66
68
  <h6>With trailing icon</h6>
@@ -69,6 +71,7 @@ const ButtonSection = ({ ...rest }: Partial<ButtonProps>) => {
69
71
  <Button {...props} RightIcon={CrossIcon} variant='secondary'>Secondary</Button>
70
72
  <Button {...props} RightIcon={CrossIcon} variant='tertiary'>Tertiary</Button>
71
73
  <Button {...props} RightIcon={CrossIcon} disabled>Disabled</Button>
74
+ <Button {...props} RightIcon={CrossIcon} variant='tertiary' disabled>Tertiary Disabled</Button>
72
75
  </ButtonGrid>
73
76
 
74
77
  <h6>With both icons</h6>
@@ -105,6 +108,15 @@ const ButtonSection = ({ ...rest }: Partial<ButtonProps>) => {
105
108
  >
106
109
  Disabled
107
110
  </Button>
111
+ <Button
112
+ {...props}
113
+ RightIcon={CrossIcon}
114
+ LeftIcon={CrossIcon}
115
+ variant='tertiary'
116
+ disabled
117
+ >
118
+ Tertiary Disabled
119
+ </Button>
108
120
  </ButtonGrid>
109
121
  </Wrapper>
110
122
  );
@@ -242,7 +242,7 @@ export const getButtonColorStyles = (variant: ButtonVariant = 'primary', color:
242
242
 
243
243
  &:disabled {
244
244
  color: ${theme.color.neutral.textDisabled};
245
- background-color: ${theme.color.neutral.disabled};
245
+ background-color: ${variant === 'tertiary' ? 'transparent' : theme.color.neutral.disabled};
246
246
  border-color: ${variant === 'tertiary' ? 'transparent' : theme.color.neutral.disabled};
247
247
 
248
248
  cursor: default;