@lumx/core 4.3.2-alpha.23 → 4.3.2-alpha.25

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.
@@ -1,13 +1,12 @@
1
1
  import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
2
  import { AspectRatio } from '../../constants';
3
- import { ThumbnailVariant } from './types';
3
+ import { ThumbnailObjectFit, ThumbnailVariant } from './types';
4
4
  /**
5
5
  * Setup Thumbnail stories for a specific framework (React or Vue).
6
6
  * This function creates all the stories with the appropriate decorators.
7
7
  */
8
- export declare function setup({ component, render, decorators: { withNestedProps }, overrides, }: SetupStoriesOptions<{
9
- overrides: 'Simple' | 'FillHeightAndRatio' | 'ObjectFit';
10
- decorators: 'withNestedProps';
8
+ export declare function setup({ component, render, decorators: { withNestedProps, withWrapper, withCombinations }, }: SetupStoriesOptions<{
9
+ decorators: 'withNestedProps' | 'withWrapper' | 'withCombinations';
11
10
  }>): {
12
11
  meta: {
13
12
  component: any;
@@ -76,7 +75,7 @@ export declare function setup({ component, render, decorators: { withNestedProps
76
75
  imgRef?: import("../../types").CommonRef;
77
76
  ref?: import("../../types").CommonRef;
78
77
  isLoading?: boolean | undefined;
79
- objectFit?: import("./types").ThumbnailObjectFit | undefined;
78
+ objectFit?: ThumbnailObjectFit | undefined;
80
79
  size?: import("./types").ThumbnailSize | undefined;
81
80
  loading?: "eager" | "lazy" | undefined;
82
81
  loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement> | undefined;
@@ -95,7 +94,10 @@ export declare function setup({ component, render, decorators: { withNestedProps
95
94
  };
96
95
  /** Simple thumbnail taking the size of the original image */
97
96
  Simple: {
98
- [x: string]: any;
97
+ args: {
98
+ image: string;
99
+ };
100
+ decorators: ((story: any, context: any) => any)[];
99
101
  };
100
102
  /** Loading state */
101
103
  IsLoading: {
@@ -151,7 +153,11 @@ export declare function setup({ component, render, decorators: { withNestedProps
151
153
  };
152
154
  /** Combinations of fillHeight and ratios */
153
155
  FillHeightAndRatio: {
154
- [x: string]: any;
156
+ args: {
157
+ image: string;
158
+ fillHeight: boolean;
159
+ };
160
+ decorators: ((story: any, context: any) => any)[];
155
161
  };
156
162
  /** Simple thumbnail with svg image */
157
163
  WithSvgImages: {
@@ -162,7 +168,11 @@ export declare function setup({ component, render, decorators: { withNestedProps
162
168
  'focusPoint.x': number;
163
169
  };
164
170
  };
171
+ /** Thumbnail letter-boxing */
165
172
  ObjectFit: {
166
- [x: string]: any;
173
+ args: {
174
+ size: "xl";
175
+ };
176
+ decorators: ((story: any, context: any) => any)[];
167
177
  };
168
178
  };
@@ -25,4 +25,5 @@ export type { HasChecked } from './HasChecked';
25
25
  export type { HasDisabled } from './HasDisabled';
26
26
  export type { AriaAttributes } from './AriaAttributes';
27
27
  export type { Selector } from './Selector';
28
+ export type { PropsToOverride } from './jsx/PropsToOverride';
28
29
  export type { PartialBy, PartialExcept } from './PartialBy';
@@ -0,0 +1,2 @@
1
+ /** list of generic props defined on JSX that need to be redefined for each framework */
2
+ export type PropsToOverride = 'ref' | 'onClick' | 'onChange' | 'onKeyPress';
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/lumapps/design-system/issues"
7
7
  },
8
8
  "dependencies": {
9
- "@lumx/icons": "^4.3.2-alpha.23",
9
+ "@lumx/icons": "^4.3.2-alpha.25",
10
10
  "classnames": "^2.3.2",
11
11
  "focus-visible": "^5.0.2",
12
12
  "lodash": "4.17.23",
@@ -66,7 +66,7 @@
66
66
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "4.3.2-alpha.23",
69
+ "version": "4.3.2-alpha.25",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -12,11 +12,7 @@ interface StoryDecorators {
12
12
  /** manages nested props */
13
13
  withNestedProps?: () => Decorator;
14
14
  /** Decorator wrapping story in a resizable box */
15
- withResizableBox?: (options?: {
16
- width?: number | string;
17
- height?: number | string;
18
- [key: string]: any;
19
- }) => Decorator;
15
+ withResizableBox?: (options?: Record<string, any>) => Decorator;
20
16
  }
21
17
  /** A partial Storybook story object (args, argTypes, render, decorators, etc.) */
22
18
  type StoryOverride = Record<string, any>;