@lumx/vue 3.20.1-alpha.5 → 3.20.1-alpha.6

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.
@@ -0,0 +1,28 @@
1
+ import type { StorybookConfig } from '@storybook/vue3-vite';
2
+ import tsconfigPaths from 'vite-tsconfig-paths';
3
+ import vueJsx from '@vitejs/plugin-vue-jsx'
4
+
5
+ import { mergeConfig } from 'vite';
6
+ import vue from '@vitejs/plugin-vue';
7
+
8
+ const config: StorybookConfig = {
9
+ stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
10
+ addons: [],
11
+ framework: '@storybook/vue3-vite',
12
+ docs: {autodocs: false},
13
+ async viteFinal(config) {
14
+ return mergeConfig(config, {
15
+ optimizeDeps: { include: ['@lumx/icons'] },
16
+ plugins: [vue(), vueJsx({
17
+ // 1. Tell the Vue JSX compiler what function to use (h)
18
+ // 2. Tell it to import 'h' from the 'vue' module
19
+ // The default setup in modern Vue JSX handles this, but explicitly
20
+ // ensuring the right runtime is used is key.
21
+ babelPlugins: [
22
+ ['@babel/plugin-transform-react-jsx', { runtime: 'automatic', importSource: 'vue' }]
23
+ ]
24
+ }), tsconfigPaths()]
25
+ });
26
+ },
27
+ };
28
+ export default config;
@@ -0,0 +1,14 @@
1
+ import type { Preview } from '@storybook/vue3-vite'
2
+
3
+ const preview: Preview = {
4
+ parameters: {
5
+ controls: {
6
+ matchers: {
7
+ color: /(background|color)$/i,
8
+ date: /Date$/i,
9
+ },
10
+ },
11
+ },
12
+ };
13
+
14
+ export default preview;
package/package.json CHANGED
@@ -1,121 +1,32 @@
1
1
  {
2
- "author": {
3
- "name": "LumApps"
2
+ "license": "MIT",
3
+ "name": "@lumx/vue",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/lumapps/design-system.git"
4
7
  },
5
- "bugs": {
6
- "url": "https://github.com/lumapps/design-system/issues"
8
+ "scripts": {
9
+ "start:storybook": "storybook dev -p 9000",
10
+ "storybook": "storybook dev -p 6006",
11
+ "build-storybook": "storybook build",
12
+ "build": "vite build"
7
13
  },
8
- "dependencies": {
9
- "@lumx/core": "^3.20.1-alpha.5",
10
- "@lumx/icons": "^3.20.1-alpha.5",
11
- "vue-demi": "^0.14.10"
14
+ "module": "index.js",
15
+ "main": "index.js",
16
+ "installConfig": {
17
+ "hoistingLimits": "workspaces"
12
18
  },
19
+ "sideEffects": false,
20
+ "version": "3.20.1-alpha.6",
13
21
  "devDependencies": {
14
- "@babel/core": "^7.26.10",
15
- "@babel/plugin-proposal-class-properties": "^7.18.6",
16
- "@babel/plugin-proposal-export-default-from": "^7.25.9",
17
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
18
- "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
19
- "@babel/plugin-proposal-optional-chaining": "^7.21.0",
20
- "@babel/plugin-proposal-private-methods": "^7.18.6",
21
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
22
- "@babel/plugin-syntax-jsx": "^7.27.1",
23
22
  "@babel/plugin-transform-react-jsx": "^7.27.1",
24
- "@babel/preset-env": "^7.26.9",
25
- "@babel/preset-typescript": "^7.26.0",
26
- "@rollup/plugin-babel": "^6.0.4",
27
- "@rollup/plugin-commonjs": "^19.0.2",
28
- "@rollup/plugin-node-resolve": "16.0.0",
29
- "@rollup/plugin-typescript": "^12.3.0",
30
- "@rollup/pluginutils": "5.2.0",
31
- "@storybook/addon-a11y": "^9.1.4",
32
- "@storybook/addon-docs": "^9.1.4",
33
- "@storybook/vue3-vite": "9.1.16",
34
- "@testing-library/dom": "^9.3.4",
35
- "@testing-library/jest-dom": "^5.16.4",
36
- "@testing-library/user-event": "^14.4.3",
37
- "@testing-library/vue": "^8.1.0",
38
- "@types/body-scroll-lock": "^2.6.1",
39
- "@types/classnames": "^2.2.9",
40
- "@types/dom-view-transitions": "^1.0.5",
41
- "@types/jest": "^29.2.1",
42
- "@types/lodash": "^4.14.149",
23
+ "@storybook/vue3-vite": "^9.1.4",
43
24
  "@vitejs/plugin-vue": "^6.0.2",
44
- "@vitejs/plugin-vue-jsx": "^5.1.2",
45
- "@vitejs/plugin-vue2-jsx": "^1.1.1",
46
- "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
47
- "@vue/babel-plugin-jsx": "^2.0.1",
48
- "@vue/babel-preset-jsx": "^1.4.0",
49
- "@vue/composition-api": "1.7.2",
50
- "autoprefixer": "^9.7.4",
51
- "babel-jest": "29.1.2",
52
- "babel-loader": "^8.0.6",
53
- "eslint-plugin-storybook": "9.1.16",
54
- "eslint-plugin-vue": "^10.5.0",
55
- "focus-visible": "^5.0.2",
56
- "glob": "^7.1.6",
57
- "install-peers-cli": "^2.2.0",
58
- "is-ci": "^2.0.0",
59
- "jest": "29.1.2",
60
- "jest-environment-jsdom": "29.1.2",
61
- "node-notifier": "^10.0.1",
62
- "rollup": "3.29.5",
63
- "rollup-plugin-analyzer": "^4.0.0",
64
- "rollup-plugin-cleaner": "^1.0.0",
65
- "rollup-plugin-copy": "^3.5.0",
66
- "rollup-plugin-dts": "^6.1.1",
67
- "rollup-plugin-peer-deps-external": "^2.2.4",
68
- "rollup-plugin-ts-paths-resolve": "^1.7.1",
69
- "rollup-plugin-vue": "^6.0.0",
25
+ "@vitejs/plugin-vue-jsx": "^5.1.1",
70
26
  "storybook": "^9.1.4",
71
27
  "typescript": "^5.4.3",
72
28
  "vite": "^6.3.5",
73
- "vite-plugin-dts": "^4.5.4",
74
29
  "vite-tsconfig-paths": "^5.1.4",
75
- "vitest": "^4.0.10",
76
- "vue": "^3.4.27",
77
- "vue2": "npm:vue@2.6",
78
- "yargs": "^15.4.1"
79
- },
80
- "peerDependencies": {
81
- "@vue/composition-api": "^1.1.2",
82
- "lodash": "4.17.21",
83
- "vue": "^2.6.0 || ^3.3.0"
84
- },
85
- "peerDependenciesMeta": {
86
- "@vue/composition-api": {
87
- "optional": true
88
- }
89
- },
90
- "description": "The official LumApps Design System (LumX) for Vue applications",
91
- "homepage": "https://github.com/lumapps/design-system",
92
- "keywords": [
93
- "Design System",
94
- "LumApps",
95
- "LumX",
96
- "Vue"
97
- ],
98
- "license": "MIT",
99
- "module": "index.js",
100
- "main": "index.js",
101
- "types": "index.d.ts",
102
- "name": "@lumx/vue",
103
- "publishConfig": {
104
- "directory": "dist",
105
- "access": "public"
106
- },
107
- "repository": {
108
- "type": "git",
109
- "url": "git+https://github.com/lumapps/design-system.git"
110
- },
111
- "scripts": {
112
- "start:storybook": "storybook dev -p 6007",
113
- "build:storybook": "storybook build",
114
- "test": "vue-demi-switch 3 && vitest",
115
- "build": "vite build",
116
- "storybook:vue3": "vue-demi-switch 3 && yarn start:storybook",
117
- "storybook:vue2": "vue-demi-switch 2 vue2 && yarn start:storybook"
118
- },
119
- "sideEffects": false,
120
- "version": "3.20.1-alpha.5"
30
+ "vue": "^3.5.25"
31
+ }
121
32
  }
@@ -0,0 +1,27 @@
1
+ import { mdiAbTesting } from 'lumx-icons/dist';
2
+ import Icon from './Icon.vue';
3
+
4
+ export default {
5
+ title: 'LumX/Icon',
6
+ component: Icon,
7
+ argTypes: {
8
+ theme: { control: 'text' },
9
+ // Add other props here as needed
10
+ },
11
+ };
12
+
13
+ const Template = (args) => ({
14
+ components: { Icon },
15
+ setup() {
16
+ return { args };
17
+ },
18
+ template: '<Icon v-bind="args" />',
19
+ });
20
+
21
+ export const Default = Template.bind({});
22
+ Default.args = {
23
+ // Provide default props here, e.g.:
24
+ theme: 'light',
25
+ icon: mdiAbTesting,
26
+ // name: 'star', // Example if Icon expects a name prop
27
+ };
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import { inject, useAttrs } from 'vue';
3
+ import { Icon as UI } from '@lumx/core/js/components/Icon';
4
+ // import type { IconProps, IconSizes } from '@lumx/core/js/components/Icon';
5
+
6
+ // Define props (replace 'any' with actual IconProps type if available)
7
+ const props = defineProps();
8
+ const attrs = useAttrs();
9
+ // Inject theme if provided by parent
10
+ const defaultTheme = inject('theme', undefined);
11
+ console.log(props);
12
+ </script>
13
+
14
+ <template>
15
+ <UI v-bind="{ ...attrs, ...props, theme: props.theme || defaultTheme }" />
16
+ </template>
@@ -1,6 +1,2 @@
1
- import { IconProps } from '@lumx/core/js/components/Icon';
2
-
3
- import Icon from './Icon';
4
-
1
+ import Icon from './Icon.vue';
5
2
  export { Icon };
6
- export type { IconProps };
@@ -0,0 +1,27 @@
1
+ import { mdiAbTesting } from 'lumx-icons/dist';
2
+ import InputHelper from './InputHelper.vue';
3
+
4
+ export default {
5
+ title: 'LumX/InputHelper',
6
+ component: InputHelper,
7
+ argTypes: {
8
+ theme: { control: 'text' },
9
+ // Add other props here as needed
10
+ },
11
+ };
12
+
13
+ const Template = (args) => ({
14
+ components: { InputHelper },
15
+ setup() {
16
+ return { args };
17
+ },
18
+ template: '<InputHelper>Text</InputHelper>',
19
+ });
20
+
21
+ export const Default = Template.bind({});
22
+ Default.args = {
23
+ // Provide default props here, e.g.:
24
+ theme: 'light',
25
+ icon: mdiAbTesting,
26
+ // name: 'star', // Example if Icon expects a name prop
27
+ };
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import { inject, useAttrs } from 'vue';
3
+ import { InputHelper as UI } from '@lumx/core/js/components/InputHelper';
4
+
5
+ // Define props (replace 'any' with actual IconProps type if available)
6
+ const props = defineProps();
7
+ const attrs = useAttrs();
8
+ // Inject theme if provided by parent
9
+ const defaultTheme = inject('theme', undefined);
10
+ </script>
11
+
12
+ <template>
13
+ <UI v-bind="{ ...attrs, ...props, theme: props.theme || defaultTheme }">
14
+ <slot />
15
+ </UI>
16
+ </template>
@@ -0,0 +1,2 @@
1
+ import InputHelper from './InputHelper.vue';
2
+ export { InputHelper };
package/src/index.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { IconProps } from '@lumx/core/js/components/Icon';
1
+ /**
2
+ * Components listed here will be exposed to NPM in '@lumx/react'.
3
+ */
2
4
 
3
- import Icon from './Icon';
5
+ export * from '@lumx/core/js/constants';
6
+ export * from '@lumx/core/js/types';
4
7
 
5
- export { Icon };
6
- export type { IconProps };
8
+ export * from './components/icon';
9
+ export * from './components/input-helper';
package/vite.config.ts ADDED
@@ -0,0 +1,35 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+ import vueJsx from '@vitejs/plugin-vue-jsx';
4
+ import tsconfigPaths from 'vite-tsconfig-paths';
5
+
6
+ export default defineConfig((config) =>
7
+ mergeConfig(config, {
8
+ plugins: [
9
+ vue(),
10
+ vueJsx({
11
+ babelPlugins: [
12
+ ['@babel/plugin-transform-react-jsx', { runtime: 'automatic', importSource: 'vue' }],
13
+ ],
14
+ }),
15
+ tsconfigPaths(),
16
+ ],
17
+ optimizeDeps: { include: ['@lumx/icons'] },
18
+ build: {
19
+ lib: {
20
+ entry: './src/index.ts',
21
+ name: 'LumxVue',
22
+ fileName: 'index',
23
+ formats: ['es', 'cjs'],
24
+ },
25
+ rollupOptions: {
26
+ external: ['vue', '@lumx/icons', '@lumx/core'],
27
+ output: {
28
+ globals: {
29
+ vue: 'Vue',
30
+ },
31
+ },
32
+ },
33
+ },
34
+ })
35
+ );