@lumx/vue 4.3.2-alpha.2 → 4.3.2-alpha.20

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 (43) 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 +1 -1
  10. package/components/flag/Flag.d.ts +1 -1
  11. package/components/flex-box/FlexBox.d.ts +1 -1
  12. package/components/heading/Heading.d.ts +1 -1
  13. package/components/icon/Icon.d.ts +1 -1
  14. package/components/input-helper/InputHelper.d.ts +1 -1
  15. package/components/input-label/InputLabel.d.ts +1 -1
  16. package/components/link/Link.d.ts +1 -1
  17. package/components/message/Message.d.ts +1 -1
  18. package/components/radio-button/RadioButton.d.ts +1 -1
  19. package/components/skeleton/SkeletonCircle.d.ts +1 -1
  20. package/components/skeleton/SkeletonRectangle.d.ts +1 -1
  21. package/components/skeleton/SkeletonTypography.d.ts +1 -1
  22. package/components/skeleton/index.d.ts +10 -7
  23. package/components/switch/Switch.d.ts +1 -1
  24. package/components/table/Table.d.ts +7 -0
  25. package/components/table/TableBody.d.ts +7 -0
  26. package/components/table/TableCell.d.ts +16 -0
  27. package/components/table/TableHeader.d.ts +7 -0
  28. package/components/table/TableRow.d.ts +13 -0
  29. package/components/table/index.d.ts +10 -0
  30. package/components/text/Text.d.ts +1 -1
  31. package/components/thumbnail/Stories/ThumbnailClickable.vue.d.ts +20 -0
  32. package/components/thumbnail/Thumbnail.d.ts +35 -0
  33. package/components/thumbnail/Thumbnail.stories.d.ts +161 -0
  34. package/components/thumbnail/index.d.ts +4 -0
  35. package/components/thumbnail/useFocusPointStyle.d.ts +20 -0
  36. package/components/thumbnail/useImageLoad.d.ts +10 -0
  37. package/composables/useTheme.d.ts +4 -3
  38. package/index.d.ts +3 -0
  39. package/index.js +1990 -1409
  40. package/index.js.map +1 -1
  41. package/package.json +11 -6
  42. package/stories/utils/useAttrsWithoutHandlers.d.ts +1 -1
  43. package/utils/VueToJSX.d.ts +3 -1
package/CONTRIBUTING.md CHANGED
@@ -41,18 +41,6 @@ Before opening a Pull Request, please see the Submission Guidelines below.
41
41
  You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/lumapps/design-system/issues).
42
42
  If you would like to implement a new feature then consider what kind of change it is, discuss it with us before hand in your issue, so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
43
43
 
44
- ## <a name="create-a-new-react-component-"></a> Want to create a new React Component?
45
-
46
- The first step to create a new React component is to run:
47
-
48
- ```
49
- yarn scaffold
50
- ```
51
-
52
- This script will generate a TSX file for the component code, a TSX file for the component tests and an MDX file to demo this component.
53
-
54
- To export your component into the `@lumx/react` NPM package, you also have to make sure to update the `src/index.tsx` file.
55
-
56
44
  ## <a name="submission-guidelines"></a> Submission guidelines
57
45
 
58
46
  ### Submitting an issue
@@ -0,0 +1,13 @@
1
+ import { BadgeProps as UIProps } from '@lumx/core/js/components/Badge';
2
+ import { VueToJSXProps } from '../../utils/VueToJSX';
3
+ export type BadgeProps = VueToJSXProps<UIProps>;
4
+ /**
5
+ * Badge component.
6
+ *
7
+ * @param props Component props.
8
+ * @return Vue element.
9
+ */
10
+ declare const Badge: import('vue').DefineSetupFnComponent<BadgeProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
+ class?: string;
12
+ } & {}, import('vue').PublicProps>;
13
+ export default Badge;
@@ -0,0 +1,8 @@
1
+ import { BadgeWrapperProps as UIProps, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS } from '@lumx/core/js/components/Badge/BadgeWrapper';
2
+ import { VueToJSXProps } from '../../utils/VueToJSX';
3
+ export type BadgeWrapperProps = VueToJSXProps<UIProps>;
4
+ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
5
+ declare const BadgeWrapper: import('vue').DefineSetupFnComponent<BadgeWrapperProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
6
+ class?: string;
7
+ } & {}, import('vue').PublicProps>;
8
+ export default BadgeWrapper;
@@ -0,0 +1,4 @@
1
+ import { default as Badge, BadgeProps } from './Badge';
2
+ import { default as BadgeWrapper, BadgeWrapperProps } from './BadgeWrapper';
3
+ export { Badge, BadgeWrapper };
4
+ export type { BadgeProps, BadgeWrapperProps };
@@ -13,7 +13,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
13
13
  */
14
14
  declare const Button: import('vue').DefineSetupFnComponent<ButtonProps, {
15
15
  click: (event: MouseEvent) => boolean;
16
- }, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
16
+ }, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
17
17
  class?: string;
18
18
  } & {
19
19
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -7,7 +7,7 @@ export type ButtonGroupProps = VueToJSXProps<UIProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const ButtonGroup: import('vue').DefineSetupFnComponent<ButtonGroupProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const ButtonGroup: import('vue').DefineSetupFnComponent<ButtonGroupProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default ButtonGroup;
@@ -12,7 +12,7 @@ export declare const emitSchema: {
12
12
  */
13
13
  declare const IconButton: import('vue').DefineSetupFnComponent<IconButtonProps, {
14
14
  click: (event: MouseEvent) => boolean;
15
- }, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
15
+ }, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
16
16
  class?: string;
17
17
  } & {
18
18
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -13,7 +13,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS, INTERMEDIATE_STATE };
13
13
  */
14
14
  declare const Checkbox: import('vue').DefineSetupFnComponent<CheckboxProps, {
15
15
  change: (isChecked: boolean, value?: string, name?: string, event?: Event) => boolean;
16
- }, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange" | "inputRef" | "inputId"> & {
16
+ }, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "inputRef" | "inputId"> & {
17
17
  class?: string;
18
18
  } & {
19
19
  onChange?: ((isChecked: boolean, value?: string | undefined, name?: string | undefined, event?: Event | undefined) => any) | undefined;
@@ -8,7 +8,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
8
8
  * @param props Component props.
9
9
  * @return Vue element.
10
10
  */
11
- declare const Divider: import('vue').DefineSetupFnComponent<DividerProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
11
+ declare const Divider: import('vue').DefineSetupFnComponent<DividerProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
12
12
  class?: string;
13
13
  } & {}, import('vue').PublicProps>;
14
14
  export default Divider;
@@ -7,7 +7,7 @@ export type FlagProps = VueToJSXProps<UIProps, 'Text'>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const Flag: import('vue').DefineSetupFnComponent<FlagProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange" | "Text"> & {
10
+ declare const Flag: import('vue').DefineSetupFnComponent<FlagProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "Text"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default Flag;
@@ -11,7 +11,7 @@ export { CLASSNAME, COMPONENT_NAME };
11
11
  * @param props Component props.
12
12
  * @return Vue element.
13
13
  */
14
- declare const FlexBox: import('vue').DefineSetupFnComponent<FlexBoxProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
14
+ declare const FlexBox: import('vue').DefineSetupFnComponent<FlexBoxProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
15
15
  class?: string;
16
16
  } & {
17
17
  /** Customize the root element. */
@@ -7,7 +7,7 @@ export type HeadingVueProps = VueToJSXProps<HeadingProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const Heading: import('vue').DefineSetupFnComponent<HeadingVueProps, {}, {}, Omit<HeadingProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const Heading: import('vue').DefineSetupFnComponent<HeadingVueProps, {}, {}, Omit<HeadingProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default Heading;
@@ -7,7 +7,7 @@ export type IconProps = VueToJSXProps<UIProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const Icon: import('vue').DefineSetupFnComponent<IconProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const Icon: import('vue').DefineSetupFnComponent<IconProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default Icon;
@@ -7,7 +7,7 @@ export type InputHelperProps = VueToJSXProps<UIProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const InputHelper: import('vue').DefineSetupFnComponent<InputHelperProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const InputHelper: import('vue').DefineSetupFnComponent<InputHelperProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default InputHelper;
@@ -7,7 +7,7 @@ export type InputLabelProps = VueToJSXProps<UIProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const InputLabel: import('vue').DefineSetupFnComponent<InputLabelProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const InputLabel: import('vue').DefineSetupFnComponent<InputLabelProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default InputLabel;
@@ -13,7 +13,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
13
13
  */
14
14
  declare const Link: import('vue').DefineSetupFnComponent<LinkProps, {
15
15
  click: (event: Event) => boolean;
16
- }, {}, Omit<UIProps, "className" | "label" | "children" | "onClick" | "ref" | "onChange"> & {
16
+ }, {}, Omit<UIProps, "className" | "label" | "children" | "ref" | "onChange" | "onClick"> & {
17
17
  class?: string;
18
18
  } & {
19
19
  onClick?: ((event: Event) => any) | undefined;
@@ -14,7 +14,7 @@ export interface MessageEmits {
14
14
  * @param props Component props.
15
15
  * @return Vue element.
16
16
  */
17
- declare const Message: import('vue').DefineSetupFnComponent<MessageProps, "close"[], {}, Omit<Omit<UIProps, "closeButtonProps">, "className" | "children" | "onClick" | "ref" | "onChange"> & {
17
+ declare const Message: import('vue').DefineSetupFnComponent<MessageProps, "close"[], {}, Omit<Omit<UIProps, "closeButtonProps">, "className" | "children" | "ref" | "onChange" | "onClick"> & {
18
18
  class?: string;
19
19
  } & {
20
20
  /** label to be used for the close button */
@@ -13,7 +13,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
13
13
  */
14
14
  declare const RadioButton: import('vue').DefineSetupFnComponent<RadioButtonProps, {
15
15
  change: (value?: string, name?: string, event?: Event) => event is Event;
16
- }, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange" | "inputRef" | "inputId"> & {
16
+ }, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "inputRef" | "inputId"> & {
17
17
  class?: string;
18
18
  } & {
19
19
  onChange?: ((value?: string | undefined, name?: string | undefined, event?: Event | undefined) => any) | undefined;
@@ -8,7 +8,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
8
8
  * @param props Component props.
9
9
  * @return Vue element.
10
10
  */
11
- declare const SkeletonCircle: import('vue').DefineSetupFnComponent<SkeletonCircleProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
11
+ declare const SkeletonCircle: import('vue').DefineSetupFnComponent<SkeletonCircleProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
12
12
  class?: string;
13
13
  } & {}, import('vue').PublicProps>;
14
14
  export default SkeletonCircle;
@@ -8,7 +8,7 @@ export { SkeletonRectangleVariant, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
8
8
  * @param props Component props.
9
9
  * @return Vue element.
10
10
  */
11
- declare const SkeletonRectangle: import('vue').DefineSetupFnComponent<SkeletonRectangleProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
11
+ declare const SkeletonRectangle: import('vue').DefineSetupFnComponent<SkeletonRectangleProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
12
12
  class?: string;
13
13
  } & {}, import('vue').PublicProps>;
14
14
  export default SkeletonRectangle;
@@ -8,7 +8,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
8
8
  * @param props Component props.
9
9
  * @return Vue element.
10
10
  */
11
- declare const SkeletonTypography: import('vue').DefineSetupFnComponent<SkeletonTypographyProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
11
+ declare const SkeletonTypography: import('vue').DefineSetupFnComponent<SkeletonTypographyProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
12
12
  class?: string;
13
13
  } & {}, import('vue').PublicProps>;
14
14
  export default SkeletonTypography;
@@ -1,7 +1,10 @@
1
- export { default as SkeletonCircle } from './SkeletonCircle';
2
- export type { SkeletonCircleProps } from './SkeletonCircle';
3
- export { default as SkeletonRectangle } from './SkeletonRectangle';
4
- export type { SkeletonRectangleProps } from './SkeletonRectangle';
5
- export { SkeletonRectangleVariant } from './SkeletonRectangle';
6
- export { default as SkeletonTypography } from './SkeletonTypography';
7
- export type { SkeletonTypographyProps } from './SkeletonTypography';
1
+ import { default as SkeletonCircle, SkeletonCircleProps } from './SkeletonCircle';
2
+ import { default as SkeletonRectangle, SkeletonRectangleProps, SkeletonRectangleVariant } from './SkeletonRectangle';
3
+ import { default as SkeletonTypography, SkeletonTypographyProps } from './SkeletonTypography';
4
+ export { SkeletonCircle };
5
+ export type { SkeletonCircleProps };
6
+ export { SkeletonRectangle };
7
+ export type { SkeletonRectangleProps };
8
+ export { SkeletonRectangleVariant };
9
+ export { SkeletonTypography };
10
+ export type { SkeletonTypographyProps };
@@ -13,7 +13,7 @@ export { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };
13
13
  */
14
14
  declare const Switch: import('vue').DefineSetupFnComponent<SwitchProps, {
15
15
  change: (isChecked: boolean, value?: string, name?: string, event?: Event) => boolean;
16
- }, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange" | "inputRef" | "inputId"> & {
16
+ }, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick" | "inputRef" | "inputId"> & {
17
17
  class?: string;
18
18
  } & {
19
19
  onChange?: ((isChecked: boolean, value?: string | undefined, name?: string | undefined, event?: Event | undefined) => any) | undefined;
@@ -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';
@@ -7,7 +7,7 @@ export type TextProps = VueToJSXProps<UIProps>;
7
7
  * @param props Component props.
8
8
  * @return Vue element.
9
9
  */
10
- declare const Text: import('vue').DefineSetupFnComponent<TextProps, {}, {}, Omit<UIProps, "className" | "children" | "onClick" | "ref" | "onChange"> & {
10
+ declare const Text: import('vue').DefineSetupFnComponent<TextProps, {}, {}, Omit<UIProps, "className" | "children" | "ref" | "onChange" | "onClick"> & {
11
11
  class?: string;
12
12
  } & {}, import('vue').PublicProps>;
13
13
  export default Text;
@@ -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
- * 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,5 +1,6 @@
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';
5
6
  export * from './components/divider';
@@ -14,4 +15,6 @@ 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';