@lumx/vue 4.3.2-alpha.1 → 4.3.2-alpha.3
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/components/link/Link.d.ts +21 -0
- package/components/link/index.d.ts +2 -0
- package/components/table/Table.d.ts +7 -0
- package/components/table/TableBody.d.ts +7 -0
- package/components/table/TableCell.d.ts +16 -0
- package/components/table/TableHeader.d.ts +7 -0
- package/components/table/TableRow.d.ts +13 -0
- package/components/table/index.d.ts +10 -0
- package/components/thumbnail/Stories/ThumbnailClickable.vue.d.ts +20 -0
- package/components/thumbnail/Thumbnail.d.ts +35 -0
- package/components/thumbnail/Thumbnail.stories.d.ts +161 -0
- package/components/thumbnail/index.d.ts +4 -0
- package/components/thumbnail/useFocusPointStyle.d.ts +20 -0
- package/components/thumbnail/useImageLoad.d.ts +10 -0
- package/composables/useTheme.d.ts +4 -3
- package/index.d.ts +3 -0
- package/index.js +1737 -1144
- package/index.js.map +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LinkProps as UIProps, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS } from '@lumx/core/js/components/Link';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export type LinkProps = VueToJSXProps<UIProps, 'label'>;
|
|
4
|
+
export declare const emitSchema: {
|
|
5
|
+
click: (event: Event) => boolean;
|
|
6
|
+
};
|
|
7
|
+
export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
|
|
8
|
+
/**
|
|
9
|
+
* Link component.
|
|
10
|
+
*
|
|
11
|
+
* @param props Component props.
|
|
12
|
+
* @return Vue element.
|
|
13
|
+
*/
|
|
14
|
+
declare const Link: import('vue').DefineSetupFnComponent<LinkProps, {
|
|
15
|
+
click: (event: Event) => boolean;
|
|
16
|
+
}, {}, Omit<UIProps, "className" | "label" | "children" | "ref" | "onChange" | "onClick"> & {
|
|
17
|
+
class?: string;
|
|
18
|
+
} & {
|
|
19
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
20
|
+
}, import('vue').PublicProps>;
|
|
21
|
+
export default Link;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableProps as UIProps } from '@lumx/core/js/components/Table';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export type TableProps = VueToJSXProps<UIProps>;
|
|
4
|
+
declare const Table: import('vue').DefineSetupFnComponent<TableProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
|
|
5
|
+
class?: string;
|
|
6
|
+
} & {}, import('vue').PublicProps>;
|
|
7
|
+
export default Table;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableBodyProps as UIProps } from '@lumx/core/js/components/Table/TableBody';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export type TableBodyProps = VueToJSXProps<UIProps>;
|
|
4
|
+
declare const TableBody: import('vue').DefineSetupFnComponent<TableBodyProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
|
|
5
|
+
class?: string;
|
|
6
|
+
} & {}, import('vue').PublicProps>;
|
|
7
|
+
export default TableBody;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TableCellProps as UIProps, ThOrder, TableCellVariant } from '@lumx/core/js/components/Table/TableCell';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export { ThOrder, TableCellVariant };
|
|
4
|
+
export type { ThOrder as ThOrderType, TableCellVariant as TableCellVariantType, } from '@lumx/core/js/components/Table/TableCell';
|
|
5
|
+
export type TableCellProps = VueToJSXProps<UIProps, 'onHeaderClick'>;
|
|
6
|
+
export declare const emitSchema: {
|
|
7
|
+
headerClick: () => boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const TableCell: import('vue').DefineSetupFnComponent<TableCellProps, {
|
|
10
|
+
headerClick: () => boolean;
|
|
11
|
+
}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "onHeaderClick"> & {
|
|
12
|
+
class?: string;
|
|
13
|
+
} & {
|
|
14
|
+
onHeaderClick?: (() => any) | undefined;
|
|
15
|
+
}, import('vue').PublicProps>;
|
|
16
|
+
export default TableCell;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableHeaderProps as UIProps } from '@lumx/core/js/components/Table/TableHeader';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export type TableHeaderProps = VueToJSXProps<UIProps>;
|
|
4
|
+
declare const TableHeader: import('vue').DefineSetupFnComponent<TableHeaderProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
|
|
5
|
+
class?: string;
|
|
6
|
+
} & {}, import('vue').PublicProps>;
|
|
7
|
+
export default TableHeader;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TableRowProps as UIProps } from '@lumx/core/js/components/Table/TableRow';
|
|
2
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
3
|
+
export type TableRowProps = VueToJSXProps<UIProps, 'tabIndex' | 'aria-disabled'> & {
|
|
4
|
+
/** Whether the component is disabled or not. */
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const TableRow: import('vue').DefineSetupFnComponent<TableRowProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "aria-disabled" | "tabIndex"> & {
|
|
8
|
+
class?: string;
|
|
9
|
+
} & {
|
|
10
|
+
/** Whether the component is disabled or not. */
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
} & {}, import('vue').PublicProps>;
|
|
13
|
+
export default TableRow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Table } from './Table';
|
|
2
|
+
export * from './Table';
|
|
3
|
+
export { default as TableBody } from './TableBody';
|
|
4
|
+
export * from './TableBody';
|
|
5
|
+
export { default as TableCell } from './TableCell';
|
|
6
|
+
export * from './TableCell';
|
|
7
|
+
export { default as TableHeader } from './TableHeader';
|
|
8
|
+
export * from './TableHeader';
|
|
9
|
+
export { default as TableRow } from './TableRow';
|
|
10
|
+
export * from './TableRow';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
onClick?: (event: Event) => any;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
badge?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ThumbnailProps as UIProps, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS } from '@lumx/core/js/components/Thumbnail';
|
|
2
|
+
import { FocusPoint } from '@lumx/core/js/components/Thumbnail/types';
|
|
3
|
+
import { VueToJSXProps } from '../../utils/VueToJSX';
|
|
4
|
+
export type ThumbnailProps = VueToJSXProps<Omit<UIProps, 'loadingState' | 'isAnyDisabled' | 'focusPointStyle' | 'disabledStateProps' | 'badge' | 'imgRef' | 'onKeyPress' | 'fallback'>> & {
|
|
5
|
+
/** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */
|
|
6
|
+
focusPoint?: FocusPoint;
|
|
7
|
+
/** ARIA disabled state */
|
|
8
|
+
'aria-disabled'?: boolean | 'true' | 'false';
|
|
9
|
+
};
|
|
10
|
+
export declare const emitSchema: {
|
|
11
|
+
click: (event: Event) => boolean;
|
|
12
|
+
keyPress: (event: Event) => boolean;
|
|
13
|
+
};
|
|
14
|
+
export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
|
|
15
|
+
/**
|
|
16
|
+
* Thumbnail component.
|
|
17
|
+
*
|
|
18
|
+
* @param props Component props.
|
|
19
|
+
* @return Vue element.
|
|
20
|
+
*/
|
|
21
|
+
declare const Thumbnail: import('vue').DefineSetupFnComponent<ThumbnailProps, {
|
|
22
|
+
click: (event: Event) => boolean;
|
|
23
|
+
keyPress: (event: Event) => boolean;
|
|
24
|
+
}, {}, Omit<Omit<UIProps, "badge" | "isAnyDisabled" | "disabledStateProps" | "fallback" | "loadingState" | "imgRef" | "onKeyPress" | "focusPointStyle">, "className" | "children" | "ref" | "onChange" | "onClick"> & {
|
|
25
|
+
class?: string;
|
|
26
|
+
} & {
|
|
27
|
+
/** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */
|
|
28
|
+
focusPoint?: FocusPoint;
|
|
29
|
+
/** ARIA disabled state */
|
|
30
|
+
'aria-disabled'?: boolean | "true" | "false";
|
|
31
|
+
} & {
|
|
32
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
33
|
+
onKeyPress?: ((event: Event) => any) | undefined;
|
|
34
|
+
}, import('vue').PublicProps>;
|
|
35
|
+
export default Thumbnail;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { AspectRatio } from '../..';
|
|
2
|
+
import { ThumbnailObjectFit } from '@lumx/core/js/components/Thumbnail/types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
component: any;
|
|
5
|
+
render: any;
|
|
6
|
+
argTypes: {
|
|
7
|
+
image: {
|
|
8
|
+
control: {
|
|
9
|
+
type: "select" | "inline-radio";
|
|
10
|
+
};
|
|
11
|
+
options: string[];
|
|
12
|
+
mapping: Record<string, string> | undefined;
|
|
13
|
+
};
|
|
14
|
+
align: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "select" | "inline-radio";
|
|
17
|
+
};
|
|
18
|
+
options: ("center" | "right" | "left")[];
|
|
19
|
+
mapping: Record<string, "center" | "right" | "left"> | undefined;
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "select" | "inline-radio";
|
|
24
|
+
};
|
|
25
|
+
options: ("squared" | "rounded")[];
|
|
26
|
+
mapping: Record<string, "squared" | "rounded"> | undefined;
|
|
27
|
+
};
|
|
28
|
+
aspectRatio: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select" | "inline-radio";
|
|
31
|
+
};
|
|
32
|
+
options: ("vertical" | "horizontal" | "original" | "panoramic" | "wide" | "square" | "free")[];
|
|
33
|
+
mapping: Record<string, "vertical" | "horizontal" | "original" | "panoramic" | "wide" | "square" | "free"> | undefined;
|
|
34
|
+
};
|
|
35
|
+
fallback: {
|
|
36
|
+
control: boolean;
|
|
37
|
+
};
|
|
38
|
+
'focusPoint.x': {
|
|
39
|
+
control: {
|
|
40
|
+
type: string;
|
|
41
|
+
max: number;
|
|
42
|
+
min: number;
|
|
43
|
+
step: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
'focusPoint.y': {
|
|
47
|
+
control: {
|
|
48
|
+
type: string;
|
|
49
|
+
max: number;
|
|
50
|
+
min: number;
|
|
51
|
+
step: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
decorators: ((story: any, context: any) => any)[];
|
|
56
|
+
args: {
|
|
57
|
+
align?: import('../..').HorizontalAlignment | undefined;
|
|
58
|
+
alt?: string | undefined;
|
|
59
|
+
aspectRatio?: AspectRatio | undefined;
|
|
60
|
+
badge?: import('react').ReactNode;
|
|
61
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
62
|
+
fallback?: import('react').ReactNode;
|
|
63
|
+
fillHeight?: boolean | undefined;
|
|
64
|
+
image?: string | undefined;
|
|
65
|
+
loadingState?: string | undefined;
|
|
66
|
+
imgProps?: import('react').ImgHTMLAttributes<HTMLImageElement> | undefined;
|
|
67
|
+
imgRef?: import('../..').CommonRef;
|
|
68
|
+
ref?: import('../..').CommonRef;
|
|
69
|
+
isLoading?: boolean | undefined;
|
|
70
|
+
objectFit?: ThumbnailObjectFit | undefined;
|
|
71
|
+
size?: import('../..').ThumbnailSize | undefined;
|
|
72
|
+
loading?: "eager" | "lazy" | undefined;
|
|
73
|
+
loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement> | undefined;
|
|
74
|
+
onClick?: ((event: any) => void) | undefined;
|
|
75
|
+
onKeyPress?: ((event: any) => void) | undefined;
|
|
76
|
+
variant?: import('../..').ThumbnailVariant | undefined;
|
|
77
|
+
linkProps?: import('../..').GenericProps | undefined;
|
|
78
|
+
focusPointStyle?: import('../..').GenericProps | undefined;
|
|
79
|
+
disabledStateProps?: import('../..').GenericProps | undefined;
|
|
80
|
+
isAnyDisabled?: boolean | undefined;
|
|
81
|
+
linkAs?: "a" | any;
|
|
82
|
+
'aria-label'?: string | undefined;
|
|
83
|
+
theme?: import('../..').Theme | undefined;
|
|
84
|
+
className?: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
title: string;
|
|
87
|
+
};
|
|
88
|
+
export default _default;
|
|
89
|
+
export declare const Simple: {
|
|
90
|
+
[x: string]: any;
|
|
91
|
+
};
|
|
92
|
+
export declare const IsLoading: {
|
|
93
|
+
args: {
|
|
94
|
+
image: string;
|
|
95
|
+
isLoading: boolean;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export declare const WithoutSource: {
|
|
99
|
+
args: {
|
|
100
|
+
image: string;
|
|
101
|
+
size: "xxl";
|
|
102
|
+
aspectRatio: "square";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export declare const FocusPointVertical: {
|
|
106
|
+
args: {
|
|
107
|
+
aspectRatio: "vertical";
|
|
108
|
+
size: "xxl";
|
|
109
|
+
image: string;
|
|
110
|
+
'focusPoint.x': number;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export declare const FocusPointHorizontal: {
|
|
114
|
+
args: {
|
|
115
|
+
aspectRatio: "horizontal";
|
|
116
|
+
size: "xxl";
|
|
117
|
+
image: string;
|
|
118
|
+
'focusPoint.y': number;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export declare const AsButton: {
|
|
122
|
+
render: (args: any) => {
|
|
123
|
+
components: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
};
|
|
126
|
+
setup(): {
|
|
127
|
+
args: any;
|
|
128
|
+
};
|
|
129
|
+
template: string;
|
|
130
|
+
};
|
|
131
|
+
args: {
|
|
132
|
+
image: string;
|
|
133
|
+
};
|
|
134
|
+
argTypes: {
|
|
135
|
+
onClick: {
|
|
136
|
+
action: boolean;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export declare const AsLink: {
|
|
141
|
+
args: {
|
|
142
|
+
image: string;
|
|
143
|
+
linkProps: {
|
|
144
|
+
href: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
export declare const FillHeightAndRatio: {
|
|
149
|
+
[x: string]: any;
|
|
150
|
+
};
|
|
151
|
+
export declare const WithSvgImages: {
|
|
152
|
+
args: {
|
|
153
|
+
image: string;
|
|
154
|
+
size: "xxl";
|
|
155
|
+
fillHeight: boolean;
|
|
156
|
+
'focusPoint.x': number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export declare const ObjectFit: {
|
|
160
|
+
[x: string]: any;
|
|
161
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as Thumbnail } from './Thumbnail';
|
|
2
|
+
export type { ThumbnailProps } from './Thumbnail';
|
|
3
|
+
export { ThumbnailVariant, ThumbnailObjectFit } from '@lumx/core/js/components/Thumbnail/types';
|
|
4
|
+
export type { ThumbnailSize, FocusPoint, LoadingState } from '@lumx/core/js/components/Thumbnail/types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref, ComputedRef, CSSProperties } from 'vue';
|
|
2
|
+
import { AspectRatio } from '@lumx/core/js/constants';
|
|
3
|
+
import { FocusPoint } from '@lumx/core/js/components/Thumbnail/types';
|
|
4
|
+
interface FocusPointStyleParams {
|
|
5
|
+
image: Ref<string>;
|
|
6
|
+
aspectRatio: Ref<AspectRatio | undefined>;
|
|
7
|
+
focusPoint: Ref<FocusPoint | undefined>;
|
|
8
|
+
width: Ref<number | undefined>;
|
|
9
|
+
height: Ref<number | undefined>;
|
|
10
|
+
element: Ref<HTMLImageElement | undefined>;
|
|
11
|
+
isLoaded: Ref<boolean>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Vue composable to compute CSS properties for focus point positioning.
|
|
15
|
+
*
|
|
16
|
+
* @param params - Focus point style parameters
|
|
17
|
+
* @returns Computed CSS properties for the image
|
|
18
|
+
*/
|
|
19
|
+
export declare function useFocusPointStyle(params: FocusPointStyleParams): ComputedRef<CSSProperties>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { LoadingState } from '@lumx/core/js/components/Thumbnail/types';
|
|
3
|
+
/**
|
|
4
|
+
* Vue composable to track image loading state.
|
|
5
|
+
*
|
|
6
|
+
* @param imageURL - The URL of the image to track
|
|
7
|
+
* @param imgRef - Reference to the HTML image element
|
|
8
|
+
* @returns The current loading state ('hasError', 'isLoading', or 'isLoaded')
|
|
9
|
+
*/
|
|
10
|
+
export declare function useImageLoad(imageURL: Ref<string>, imgRef: Ref<HTMLImageElement | undefined>): Ref<LoadingState>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
1
2
|
import { Theme } from '@lumx/core/js/constants';
|
|
2
3
|
export interface UseTheme {
|
|
3
4
|
defaultTheme?: Theme;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @returns theme
|
|
7
|
+
* Retrieves the globally applied theme.
|
|
8
|
+
* @returns computed theme value (auto-updates when the provided theme changes)
|
|
8
9
|
*/
|
|
9
|
-
export declare function useTheme(options?: UseTheme): Theme | undefined
|
|
10
|
+
export declare function useTheme(options?: UseTheme): ComputedRef<Theme | undefined>;
|
package/index.d.ts
CHANGED
|
@@ -10,8 +10,11 @@ export * from './components/heading';
|
|
|
10
10
|
export * from './components/icon';
|
|
11
11
|
export * from './components/input-helper';
|
|
12
12
|
export * from './components/input-label';
|
|
13
|
+
export * from './components/link';
|
|
13
14
|
export * from './components/message';
|
|
14
15
|
export * from './components/radio-button';
|
|
15
16
|
export * from './components/skeleton';
|
|
16
17
|
export * from './components/switch';
|
|
18
|
+
export * from './components/table';
|
|
17
19
|
export * from './components/text';
|
|
20
|
+
export * from './components/thumbnail';
|