@lumx/react 3.19.1-alpha.2 → 3.19.1-alpha.4

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
@@ -6,8 +6,8 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/core": "^3.19.1-alpha.2",
10
- "@lumx/icons": "^3.19.1-alpha.2",
9
+ "@lumx/core": "^3.19.1-alpha.4",
10
+ "@lumx/icons": "^3.19.1-alpha.4",
11
11
  "@popperjs/core": "^2.5.4",
12
12
  "body-scroll-lock": "^3.1.5",
13
13
  "classnames": "^2.3.2",
@@ -105,5 +105,5 @@
105
105
  "build:storybook": "storybook build"
106
106
  },
107
107
  "sideEffects": false,
108
- "version": "3.19.1-alpha.2"
108
+ "version": "3.19.1-alpha.4"
109
109
  }
@@ -64,7 +64,7 @@ describe(`<${Thumbnail.displayName}>`, () => {
64
64
  it('should render clickable link', async () => {
65
65
  const onClick = jest.fn((evt) => evt.preventDefault());
66
66
  const { thumbnail } = setup({ linkProps: { href: '#' }, onClick, alt: 'Name' });
67
- const link = screen.getByRole('link', { name: 'Name' });
67
+ const link = screen.getByRole('link');
68
68
  expect(link).toBe(thumbnail);
69
69
  expect(link).toHaveAttribute('href', '#');
70
70
 
@@ -151,8 +151,8 @@ export const Thumbnail = forwardRef<ThumbnailProps>((props, ref) => {
151
151
  imageErrorStyle.display = 'none';
152
152
  }
153
153
 
154
- const isLink = linkProps?.href || linkAs;
155
- const isClickable = !isAnyDisabled && (isLink || forwardedProps.onClick);
154
+ const isLink = Boolean(linkProps?.href || linkAs);
155
+ const isClickable = !isAnyDisabled && Boolean(isLink || !!forwardedProps.onClick);
156
156
 
157
157
  const Wrapper: any = isClickable ? RawClickable : 'div';
158
158
  const wrapperProps = { ...forwardedProps };
@@ -126,7 +126,7 @@ describe(`<RawClickable>`, () => {
126
126
 
127
127
  describe('prop forwarding', () => {
128
128
  it('should forward className', () => {
129
- const { element } = setup({ as:'button', className: 'foo bar' });
129
+ const { element } = setup({ as: 'button', className: 'foo bar' });
130
130
  expect(element).toHaveClass('foo bar');
131
131
  });
132
132
 
@@ -46,7 +46,7 @@ export const RawClickable = forwardRefPolymorphic(
46
46
  return (
47
47
  <Component
48
48
  ref={ref}
49
- aria-disabled={isAnyDisabled}
49
+ aria-disabled={isAnyDisabled || undefined}
50
50
  {...forwardedProps}
51
51
  {...clickableProps}
52
52
  onClick={(event: any) => {