@lumx/vue 4.1.1-alpha.3 → 4.1.1-alpha.4
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/input-helper/InputHelper.vue.d.ts +16 -1
- package/components/input-label/InputLabel.vue.d.ts +16 -1
- package/components/text/Text.vue.d.ts +4 -0
- package/components/text/index.d.ts +4 -0
- package/composables/useOverflowTooltipLabel.d.ts +7 -0
- package/composables/useSlot.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +799 -587
- package/index.js.map +1 -1
- package/package.json +8 -7
- package/stories/decorators/withResizableBox.d.ts +12 -0
- package/stories/decorators/withWrapper.d.ts +10 -0
- package/utils/VueToJSX.d.ts +28 -0
- package/utils/wrapChildrenIconWithSpaces.d.ts +3 -0
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "vite build",
|
|
13
13
|
"type-check": "yarn tsc -p tsconfig.json",
|
|
14
14
|
"start:storybook": "storybook dev -p 9000",
|
|
15
|
-
"build
|
|
15
|
+
"build:storybook": "storybook build",
|
|
16
16
|
"test": "vitest run"
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
@@ -20,18 +20,19 @@
|
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"types": "index.d.ts",
|
|
22
22
|
"sideEffects": false,
|
|
23
|
-
"version": "4.1.1-alpha.
|
|
23
|
+
"version": "4.1.1-alpha.4",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@lumx/core": "^4.1.1-alpha.
|
|
26
|
-
"@lumx/icons": "^4.1.1-alpha.
|
|
25
|
+
"@lumx/core": "^4.1.1-alpha.4",
|
|
26
|
+
"@lumx/icons": "^4.1.1-alpha.4",
|
|
27
|
+
"@vueuse/core": "^14.1.0"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
30
|
"lodash": "4.17.21",
|
|
30
|
-
"vue": "^3.5.
|
|
31
|
+
"vue": "^3.5.27"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@babel/plugin-transform-react-jsx": "^7.27.1",
|
|
34
|
-
"@chromatic-com/storybook": "^
|
|
35
|
+
"@chromatic-com/storybook": "^5.0.0",
|
|
35
36
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
36
37
|
"@storybook/addon-a11y": "^10.2.0",
|
|
37
38
|
"@storybook/vue3-vite": "^10.2.0",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"vite-plugin-static-copy": "^3.1.4",
|
|
52
53
|
"vite-tsconfig-paths": "^5.1.4",
|
|
53
54
|
"vitest": "^4.0.18",
|
|
54
|
-
"vue": "^3.5.
|
|
55
|
+
"vue": "^3.5.27"
|
|
55
56
|
},
|
|
56
57
|
"stableVersion": "4.1.0"
|
|
57
58
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Storybook decorator wrapping story in a resizable box */
|
|
2
|
+
export declare const withResizableBox: ({ width, height, ...style }?: {
|
|
3
|
+
width?: number | string;
|
|
4
|
+
height?: number | string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}) => (story: any, context: any) => {
|
|
7
|
+
setup(): {
|
|
8
|
+
as: string | object;
|
|
9
|
+
overriddenProps: any;
|
|
10
|
+
};
|
|
11
|
+
template: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SB decorator adding a wrapping div around the story
|
|
3
|
+
*/
|
|
4
|
+
export declare const withWrapper: (props?: Record<string, any>, as?: string | object) => (story: any, context: any) => {
|
|
5
|
+
setup(): {
|
|
6
|
+
as: string | object;
|
|
7
|
+
overriddenProps: any;
|
|
8
|
+
};
|
|
9
|
+
template: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GenericProps, JSXElement } from '../../../lumx-core/src/js/types';
|
|
2
|
+
import { VNode, EmitsOptions, FunctionalComponent } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Props type that includes optional children for JSX compatibility.
|
|
5
|
+
*/
|
|
6
|
+
type GenericPropsWithChildren = GenericProps & {
|
|
7
|
+
children?: JSXElement;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Props interface for components wrapped with VueToJSX.
|
|
11
|
+
* It omits JSX-specific props like `children` and `className` and adds Vue's `class`.
|
|
12
|
+
*/
|
|
13
|
+
export type VueToJSXProps<Props extends GenericPropsWithChildren> = Omit<Props, 'children' | 'className'> & {
|
|
14
|
+
class?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Higher-order component that wraps a LumX Core component (which uses JSX patterns)
|
|
18
|
+
* to be used as a Vue functional component.
|
|
19
|
+
*
|
|
20
|
+
* It specifically handles:
|
|
21
|
+
* - Mapping Vue's `class` prop to LumX Core's `className` prop.
|
|
22
|
+
* - Mapping Vue's default slot to LumX Core's `children` prop.
|
|
23
|
+
*
|
|
24
|
+
* @param Component The LumX Core component to wrap.
|
|
25
|
+
* @returns A Vue functional component.
|
|
26
|
+
*/
|
|
27
|
+
export declare const VueToJSX: <Props extends GenericPropsWithChildren, Emits extends EmitsOptions | Record<string, any[]> = Record<string, never>>(Component: (props: Props) => VNode) => FunctionalComponent<VueToJSXProps<Props>, Emits>;
|
|
28
|
+
export {};
|