@lumx/core 4.3.2-alpha.24 → 4.3.2-alpha.26
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/js/components/Button/IconButtonStories.d.ts +4 -4
- package/js/components/Button/Stories.d.ts +4 -4
- package/js/components/Thumbnail/Stories.d.ts +18 -8
- package/js/types/AriaAttributes.d.ts +29 -2
- package/js/types/index.d.ts +1 -0
- package/js/types/jsx/PropsToOverride.d.ts +2 -0
- package/package.json +2 -2
- package/stories/types.d.ts +1 -5
|
@@ -169,10 +169,10 @@ export declare function setup({ component, render, decorators: { withCombination
|
|
|
169
169
|
isActive?: boolean | undefined;
|
|
170
170
|
isFocused?: boolean | undefined;
|
|
171
171
|
isHovered?: boolean | undefined;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
173
|
+
'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
174
|
+
'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
|
|
175
|
+
'aria-label'?: string | undefined;
|
|
176
176
|
className?: string | undefined;
|
|
177
177
|
theme?: import("@lumx/core/js/constants").Theme | undefined;
|
|
178
178
|
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
@@ -243,10 +243,10 @@ export declare function setup({ component, render, decorators: { withCombination
|
|
|
243
243
|
isActive?: boolean | undefined;
|
|
244
244
|
isFocused?: boolean | undefined;
|
|
245
245
|
isHovered?: boolean | undefined;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
|
247
|
+
'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
248
|
+
'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
|
|
249
|
+
'aria-label'?: string | undefined;
|
|
250
250
|
className?: string | undefined;
|
|
251
251
|
theme?: Theme | undefined;
|
|
252
252
|
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
@@ -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
|
|
9
|
-
|
|
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?:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
173
|
+
args: {
|
|
174
|
+
size: "xl";
|
|
175
|
+
};
|
|
176
|
+
decorators: ((story: any, context: any) => any)[];
|
|
167
177
|
};
|
|
168
178
|
};
|
|
@@ -1,2 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ARIA attributes type for components.
|
|
3
|
+
* All attributes are optional.
|
|
4
|
+
*
|
|
5
|
+
* This is a custom interface containing only the ARIA attributes
|
|
6
|
+
* actually used in the @lumx/core components, avoiding dependency on React types.
|
|
7
|
+
*/
|
|
8
|
+
export interface AriaAttributes {
|
|
9
|
+
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
|
10
|
+
'aria-expanded'?: boolean | 'true' | 'false';
|
|
11
|
+
/** Indicates the availability and type of interactive popup element that can be triggered by the element. */
|
|
12
|
+
'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
13
|
+
/** Indicates the current "pressed" state of toggle buttons. */
|
|
14
|
+
'aria-pressed'?: boolean | 'false' | 'mixed' | 'true';
|
|
15
|
+
/** Defines a string value that labels the current element. */
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
18
|
+
'aria-labelledby'?: string;
|
|
19
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
20
|
+
'aria-describedby'?: string;
|
|
21
|
+
/** Indicates whether the element is exposed to an accessibility API. */
|
|
22
|
+
'aria-hidden'?: boolean | 'true' | 'false';
|
|
23
|
+
/** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
|
|
24
|
+
'aria-disabled'?: boolean | 'true' | 'false';
|
|
25
|
+
/** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
|
|
26
|
+
'aria-checked'?: boolean | 'false' | 'mixed' | 'true';
|
|
27
|
+
/** Indicates whether items in a table or grid are sorted in ascending or descending order. */
|
|
28
|
+
'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other';
|
|
29
|
+
}
|
package/js/types/index.d.ts
CHANGED
|
@@ -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';
|
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.
|
|
9
|
+
"@lumx/icons": "^4.3.2-alpha.26",
|
|
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.
|
|
69
|
+
"version": "4.3.2-alpha.26",
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
72
72
|
"@testing-library/dom": "^10.4.1",
|
package/stories/types.d.ts
CHANGED
|
@@ -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>;
|