@lumx/vue 4.3.2-alpha.0 → 4.3.2-alpha.10

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.
Files changed (51) hide show
  1. package/CONTRIBUTING.md +0 -12
  2. package/components/badge/Badge.d.ts +13 -0
  3. package/components/badge/BadgeWrapper.d.ts +8 -0
  4. package/components/badge/index.d.ts +4 -0
  5. package/components/button/Button.d.ts +1 -1
  6. package/components/button/ButtonGroup.d.ts +1 -1
  7. package/components/button/IconButton.d.ts +1 -1
  8. package/components/checkbox/Checkbox.d.ts +1 -1
  9. package/components/divider/Divider.d.ts +14 -0
  10. package/components/divider/index.d.ts +2 -0
  11. package/components/flag/Flag.d.ts +1 -1
  12. package/components/flex-box/FlexBox.d.ts +1 -1
  13. package/components/grid-column/GridColumn.d.ts +9 -0
  14. package/components/grid-column/GridColumn.stories.d.ts +42 -0
  15. package/components/grid-column/index.d.ts +3 -0
  16. package/components/heading/Heading.d.ts +1 -1
  17. package/components/icon/Icon.d.ts +1 -1
  18. package/components/input-helper/InputHelper.d.ts +1 -1
  19. package/components/input-label/InputLabel.d.ts +1 -1
  20. package/components/link/Link.d.ts +21 -0
  21. package/components/link/index.d.ts +2 -0
  22. package/components/message/Message.d.ts +1 -1
  23. package/components/radio-button/RadioButton.d.ts +21 -0
  24. package/components/radio-button/RadioGroup.d.ts +14 -0
  25. package/components/radio-button/index.d.ts +4 -0
  26. package/components/skeleton/SkeletonCircle.d.ts +14 -0
  27. package/components/skeleton/SkeletonRectangle.d.ts +14 -0
  28. package/components/skeleton/SkeletonTypography.d.ts +14 -0
  29. package/components/skeleton/index.d.ts +10 -0
  30. package/components/switch/Switch.d.ts +21 -0
  31. package/components/switch/index.d.ts +3 -0
  32. package/components/table/Table.d.ts +7 -0
  33. package/components/table/TableBody.d.ts +7 -0
  34. package/components/table/TableCell.d.ts +16 -0
  35. package/components/table/TableHeader.d.ts +7 -0
  36. package/components/table/TableRow.d.ts +13 -0
  37. package/components/table/index.d.ts +10 -0
  38. package/components/text/Text.d.ts +1 -1
  39. package/components/thumbnail/Stories/ThumbnailClickable.vue.d.ts +20 -0
  40. package/components/thumbnail/Thumbnail.d.ts +35 -0
  41. package/components/thumbnail/Thumbnail.stories.d.ts +161 -0
  42. package/components/thumbnail/index.d.ts +4 -0
  43. package/components/thumbnail/useFocusPointStyle.d.ts +20 -0
  44. package/components/thumbnail/useImageLoad.d.ts +10 -0
  45. package/composables/useTheme.d.ts +4 -3
  46. package/index.d.ts +9 -0
  47. package/index.js +2145 -956
  48. package/index.js.map +1 -1
  49. package/package.json +12 -7
  50. package/stories/utils/useAttrsWithoutHandlers.d.ts +1 -1
  51. package/utils/VueToJSX.d.ts +3 -1
@@ -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
- * Retrives the globally applied theme.
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
@@ -1,12 +1,21 @@
1
1
  export * from '@lumx/core/js/constants';
2
2
  export * from '@lumx/core/js/types';
3
+ export * from './components/badge';
3
4
  export * from './components/button';
4
5
  export * from './components/checkbox';
6
+ export * from './components/divider';
5
7
  export * from './components/flag';
6
8
  export * from './components/flex-box';
9
+ export * from './components/grid-column';
7
10
  export * from './components/heading';
8
11
  export * from './components/icon';
9
12
  export * from './components/input-helper';
10
13
  export * from './components/input-label';
14
+ export * from './components/link';
11
15
  export * from './components/message';
16
+ export * from './components/radio-button';
17
+ export * from './components/skeleton';
18
+ export * from './components/switch';
19
+ export * from './components/table';
12
20
  export * from './components/text';
21
+ export * from './components/thumbnail';