@madgex/design-system 3.8.0 → 3.9.2
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/README.md +16 -2
- package/coverage/cobertura-coverage.xml +4 -4
- package/coverage/components/accordion/accordion.js.html +1 -1
- package/coverage/components/accordion/index.html +1 -1
- package/coverage/components/button/button.js.html +1 -1
- package/coverage/components/button/index.html +1 -1
- package/coverage/components/inputs/combobox/combobox.js.html +1 -1
- package/coverage/components/inputs/combobox/index.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/ComboboxInput.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
- package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
- package/coverage/components/inputs/file-upload/index.html +1 -1
- package/coverage/components/inputs/textarea/character-count.js.html +1 -1
- package/coverage/components/inputs/textarea/index.html +1 -1
- package/coverage/components/modal/index.html +1 -1
- package/coverage/components/modal/modal.js.html +1 -1
- package/coverage/components/notification/index.html +1 -1
- package/coverage/components/notification/notification.js.html +1 -1
- package/coverage/components/popover/index.html +1 -1
- package/coverage/components/popover/popover.js.html +1 -1
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +1 -1
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/combobox.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/notification.js.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index-vue.js.html +14 -2
- package/coverage/js/index.html +1 -1
- package/coverage/js/index.js.html +1 -1
- package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/js/polyfills/objectAssign.js.html +1 -1
- package/coverage/js/polyfills/remove.js.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- package/dist/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/_tokens/scss/_tokens.scss +1 -1
- package/fractal.js +6 -0
- package/gulpfile.js +2 -1
- package/package.json +9 -4
- package/src/components/_import-MdsLibrary.njk +7 -0
- package/src/components/_preview.njk +19 -0
- package/src/components/icons/README.md +26 -6
- package/src/components/icons/icons.njk +78 -1
- package/src/components/icons/vue-components/MdsIcon.vue +29 -0
- package/src/components/pagination/README.md +16 -1
- package/src/components/pagination/_template.njk +1 -1
- package/src/components/pagination/pagination.config.js +5 -0
- package/src/components/pagination/pagination.njk +43 -1
- package/src/components/pagination/vue-components/MdsPagination.vue +83 -0
- package/src/js/index-vue.js +4 -0
- package/tasks/vite.js +11 -0
- package/vite-build/node_modules/@vitejs/plugin-vue/LICENSE +21 -0
- package/vite-build/node_modules/@vitejs/plugin-vue/README.md +134 -0
- package/vite-build/node_modules/@vitejs/plugin-vue/dist/index.d.ts +67 -0
- package/vite-build/node_modules/@vitejs/plugin-vue/dist/index.js +4756 -0
- package/vite-build/node_modules/@vitejs/plugin-vue/package.json +47 -0
- package/vite-build/node_modules/@vue/server-renderer/LICENSE +21 -0
- package/vite-build/node_modules/@vue/server-renderer/README.md +178 -0
- package/vite-build/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js +1040 -0
- package/vite-build/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +792 -0
- package/vite-build/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +98 -0
- package/vite-build/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +987 -0
- package/vite-build/node_modules/@vue/server-renderer/index.js +7 -0
- package/vite-build/node_modules/@vue/server-renderer/package.json +40 -0
- package/vite-build/node_modules/vue/LICENSE +21 -0
- package/vite-build/node_modules/vue/README.md +54 -0
- package/vite-build/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/vite-build/node_modules/vue/compiler-sfc/index.js +1 -0
- package/vite-build/node_modules/vue/compiler-sfc/index.mjs +1 -0
- package/vite-build/node_modules/vue/compiler-sfc/package.json +5 -0
- package/vite-build/node_modules/vue/dist/vue.cjs.js +77 -0
- package/vite-build/node_modules/vue/dist/vue.cjs.prod.js +65 -0
- package/vite-build/node_modules/vue/dist/vue.d.ts +9 -0
- package/vite-build/node_modules/vue/dist/vue.esm-browser.js +15853 -0
- package/vite-build/node_modules/vue/dist/vue.esm-browser.prod.js +1 -0
- package/vite-build/node_modules/vue/dist/vue.esm-bundler.js +67 -0
- package/vite-build/node_modules/vue/dist/vue.global.js +15839 -0
- package/vite-build/node_modules/vue/dist/vue.global.prod.js +1 -0
- package/vite-build/node_modules/vue/dist/vue.runtime.esm-browser.js +10795 -0
- package/vite-build/node_modules/vue/dist/vue.runtime.esm-browser.prod.js +1 -0
- package/vite-build/node_modules/vue/dist/vue.runtime.esm-bundler.js +22 -0
- package/vite-build/node_modules/vue/dist/vue.runtime.global.js +10929 -0
- package/vite-build/node_modules/vue/dist/vue.runtime.global.prod.js +1 -0
- package/vite-build/node_modules/vue/index.js +7 -0
- package/vite-build/node_modules/vue/index.mjs +1 -0
- package/vite-build/node_modules/vue/macros-global.d.ts +19 -0
- package/vite-build/node_modules/vue/macros.d.ts +106 -0
- package/vite-build/node_modules/vue/package.json +75 -0
- package/vite-build/node_modules/vue/ref-macros.d.ts +2 -0
- package/vite-build/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/vite-build/node_modules/vue/server-renderer/index.js +1 -0
- package/vite-build/node_modules/vue/server-renderer/index.mjs +1 -0
- package/vite-build/node_modules/vue/server-renderer/package.json +5 -0
- package/vite-build/package.json +20 -0
- package/vite-build/utils.js +30 -0
- package/vite-build/vite.config.js +47 -0
- package/vite-build/vue-dev.js +6 -0
- package/vite-build/vue-lib.js +4 -0
- package/vue/index.cjs.js +1 -0
- package/vue/index.js +176 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# @vitejs/plugin-vue [](https://npmjs.com/package/@vitejs/plugin-vue)
|
|
2
|
+
|
|
3
|
+
> Note: as of `vue` 3.2.13+ and `@vitejs/plugin-vue` 1.9.0+, `@vue/compiler-sfc` is no longer required as a peer dependency.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
// vite.config.js
|
|
7
|
+
import vue from '@vitejs/plugin-vue'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
plugins: [vue()]
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
export interface Options {
|
|
18
|
+
include?: string | RegExp | (string | RegExp)[]
|
|
19
|
+
exclude?: string | RegExp | (string | RegExp)[]
|
|
20
|
+
|
|
21
|
+
ssr?: boolean
|
|
22
|
+
isProduction?: boolean
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Transform Vue SFCs into custom elements (requires vue@^3.2.0)
|
|
26
|
+
* - `true` -> all `*.vue` imports are converted into custom elements
|
|
27
|
+
* - `string | RegExp` -> matched files are converted into custom elements
|
|
28
|
+
*
|
|
29
|
+
* @default /\.ce\.vue$/
|
|
30
|
+
*/
|
|
31
|
+
customElement?: boolean | string | RegExp | (string | RegExp)[]
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Enable Vue reactivity transform (experimental, requires vue@^3.2.25).
|
|
35
|
+
* https://github.com/vuejs/core/tree/master/packages/reactivity-transform
|
|
36
|
+
*
|
|
37
|
+
* - `true`: transform will be enabled for all vue,js(x),ts(x) files except
|
|
38
|
+
* those inside node_modules
|
|
39
|
+
* - `string | RegExp`: apply to vue + only matched files (will include
|
|
40
|
+
* node_modules, so specify directories in necessary)
|
|
41
|
+
* - `false`: disable in all cases
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
reactivityTransform?: boolean | string | RegExp | (string | RegExp)[]
|
|
46
|
+
|
|
47
|
+
// options to pass on to vue/compiler-sfc
|
|
48
|
+
script?: Partial<SFCScriptCompileOptions>
|
|
49
|
+
template?: Partial<SFCTemplateCompileOptions>
|
|
50
|
+
style?: Partial<SFCStyleCompileOptions>
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Example for passing options to `vue/compiler-sfc`:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import vue from '@vitejs/plugin-vue'
|
|
58
|
+
|
|
59
|
+
export default {
|
|
60
|
+
plugins: [
|
|
61
|
+
vue({
|
|
62
|
+
template: {
|
|
63
|
+
compilerOptions: {
|
|
64
|
+
// ...
|
|
65
|
+
},
|
|
66
|
+
transformAssetUrls: {
|
|
67
|
+
// default tags
|
|
68
|
+
tags: {
|
|
69
|
+
video: ['src', 'poster'],
|
|
70
|
+
source: ['src'],
|
|
71
|
+
img: ['src'],
|
|
72
|
+
image: ['xlink:href', 'href'],
|
|
73
|
+
use: ['xlink:href', 'href']
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Example for transforming custom blocks
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import vue from '@vitejs/plugin-vue'
|
|
86
|
+
|
|
87
|
+
const vueI18nPlugin = {
|
|
88
|
+
name: 'vue-i18n',
|
|
89
|
+
transform(code, id) {
|
|
90
|
+
if (!/vue&type=i18n/.test(id)) {
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
if (/\.ya?ml$/.test(id)) {
|
|
94
|
+
code = JSON.stringify(require('js-yaml').load(code.trim()))
|
|
95
|
+
}
|
|
96
|
+
return `export default Comp => {
|
|
97
|
+
Comp.i18n = ${code}
|
|
98
|
+
}`
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default {
|
|
103
|
+
plugins: [vue(), vueI18nPlugin]
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Using Vue SFCs as Custom Elements
|
|
108
|
+
|
|
109
|
+
> Requires `vue@^3.2.0` & `@vitejs/plugin-vue@^1.4.0`
|
|
110
|
+
|
|
111
|
+
Vue 3.2 introduces the `defineCustomElement` method, which works with SFCs. By default, `<style>` tags inside SFCs are extracted and merged into CSS files during build. However when shipping a library of custom elements, it may be desirable to inline the styles as JavaScript strings and inject them into the custom elements' shadow root instead.
|
|
112
|
+
|
|
113
|
+
Starting in 1.4.0, files ending with `*.ce.vue` will be compiled in "custom elements" mode: its `<style>` tags are compiled into inlined CSS strings and attached to the component as its `styles` property:
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
import { defineCustomElement } from 'vue'
|
|
117
|
+
import Example from './Example.ce.vue'
|
|
118
|
+
|
|
119
|
+
console.log(Example.styles) // ['/* css content */']
|
|
120
|
+
|
|
121
|
+
// register
|
|
122
|
+
customElements.define('my-example', defineCustomElement(Example))
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Note in custom elements mode there is no need to use `<style scoped>` since the CSS is already scoped inside the shadow DOM.
|
|
126
|
+
|
|
127
|
+
The `customElement` plugin option can be used to configure the behavior:
|
|
128
|
+
|
|
129
|
+
- `{ customElement: true }` will import all `*.vue` files in custom element mode.
|
|
130
|
+
- Use a string or regex pattern to change how files should be loaded as Custom Elements (this check is applied after `include` and `exclude` matches).
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as _compiler from 'vue/compiler-sfc';
|
|
2
|
+
import type { Plugin as Plugin_2 } from 'vite';
|
|
3
|
+
import type { SFCScriptCompileOptions } from 'vue/compiler-sfc';
|
|
4
|
+
import type { SFCStyleCompileOptions } from 'vue/compiler-sfc';
|
|
5
|
+
import type { SFCTemplateCompileOptions } from 'vue/compiler-sfc';
|
|
6
|
+
import type { ViteDevServer } from 'vite';
|
|
7
|
+
|
|
8
|
+
export declare interface Options {
|
|
9
|
+
include?: string | RegExp | (string | RegExp)[];
|
|
10
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
|
11
|
+
isProduction?: boolean;
|
|
12
|
+
script?: Partial<SFCScriptCompileOptions>;
|
|
13
|
+
template?: Partial<SFCTemplateCompileOptions>;
|
|
14
|
+
style?: Partial<SFCStyleCompileOptions>;
|
|
15
|
+
/**
|
|
16
|
+
* Transform Vue SFCs into custom elements.
|
|
17
|
+
* - `true`: all `*.vue` imports are converted into custom elements
|
|
18
|
+
* - `string | RegExp`: matched files are converted into custom elements
|
|
19
|
+
*
|
|
20
|
+
* @default /\.ce\.vue$/
|
|
21
|
+
*/
|
|
22
|
+
customElement?: boolean | string | RegExp | (string | RegExp)[];
|
|
23
|
+
/**
|
|
24
|
+
* Enable Vue reactivity transform (experimental).
|
|
25
|
+
* https://github.com/vuejs/core/tree/master/packages/reactivity-transform
|
|
26
|
+
* - `true`: transform will be enabled for all vue,js(x),ts(x) files except
|
|
27
|
+
* those inside node_modules
|
|
28
|
+
* - `string | RegExp`: apply to vue + only matched files (will include
|
|
29
|
+
* node_modules, so specify directories in necessary)
|
|
30
|
+
* - `false`: disable in all cases
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
reactivityTransform?: boolean | string | RegExp | (string | RegExp)[];
|
|
35
|
+
/**
|
|
36
|
+
* Use custom compiler-sfc instance. Can be used to force a specific version.
|
|
37
|
+
*/
|
|
38
|
+
compiler?: typeof _compiler;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare function parseVueRequest(id: string): {
|
|
42
|
+
filename: string;
|
|
43
|
+
query: VueQuery;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export declare interface ResolvedOptions extends Options {
|
|
47
|
+
compiler: typeof _compiler;
|
|
48
|
+
root: string;
|
|
49
|
+
sourceMap: boolean;
|
|
50
|
+
cssDevSourcemap: boolean;
|
|
51
|
+
devServer?: ViteDevServer;
|
|
52
|
+
devToolsEnabled?: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare function vuePlugin(rawOptions?: Options): Plugin_2;
|
|
56
|
+
export default vuePlugin;
|
|
57
|
+
|
|
58
|
+
export declare interface VueQuery {
|
|
59
|
+
vue?: boolean;
|
|
60
|
+
src?: string;
|
|
61
|
+
type?: 'script' | 'template' | 'style' | 'custom';
|
|
62
|
+
index?: number;
|
|
63
|
+
lang?: string;
|
|
64
|
+
raw?: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { }
|