@madgex/design-system 12.0.1 → 13.0.0
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 +50 -2
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/components/mds-dropdown-nav.js +1 -0
- package/dist/js/dropdown-nav-DsMcgeGj.js +1 -0
- package/dist/js/index-fractal.js +1 -1
- package/dist/js/index.js +1 -2
- package/package.json +12 -44
- package/src/components/_preview.njk +1 -1
- package/src/components/dropdown-nav/dropdown-nav-entry.js +7 -0
- package/src/components/dropdown-nav/dropdown-nav.js +3 -15
- package/src/components/modal/modal.js +1 -1
- package/src/components/tabs/tabs.js +1 -1
- package/src/js/index.js +5 -12
- package/src/scss/constants/_vars.scss +8 -10
- package/tasks/vite-js-build.js +18 -0
- package/dist/js/index.js.LICENSE.txt +0 -6
- package/src/js/index-polyfills.js +0 -6
- package/src/js/polyfills/arrayPrototypeFind.js +0 -49
- package/src/js/polyfills/closest.js +0 -17
- package/src/js/polyfills/objectAssign.js +0 -33
- package/src/js/polyfills/remove.js +0 -7
- package/src/js/webpack-public-path.js +0 -3
- package/tasks/css.js +0 -90
- package/tasks/js-bundle.js +0 -50
- package/tasks/js-fractal-bundle.js +0 -49
package/tasks/css.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const del = require('del');
|
|
3
|
-
const webpack = require('webpack');
|
|
4
|
-
const autoprefixer = require('autoprefixer');
|
|
5
|
-
const cssnano = require('cssnano');
|
|
6
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
7
|
-
const combineMediaQuery = require('postcss-combine-media-query');
|
|
8
|
-
|
|
9
|
-
async function cssWebpack(srcFilePath, distFilePath, hashFilePath = false, filename = false) {
|
|
10
|
-
let outputFilename;
|
|
11
|
-
|
|
12
|
-
if (filename) {
|
|
13
|
-
outputFilename = filename;
|
|
14
|
-
} else {
|
|
15
|
-
outputFilename = hashFilePath ? 'index.[contenthash].css' : 'index.css';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
webpack(
|
|
20
|
-
{
|
|
21
|
-
context: __dirname,
|
|
22
|
-
entry: `${srcFilePath}/index.scss`,
|
|
23
|
-
output: {
|
|
24
|
-
path: distFilePath,
|
|
25
|
-
},
|
|
26
|
-
plugins: [
|
|
27
|
-
new MiniCssExtractPlugin({
|
|
28
|
-
filename: outputFilename,
|
|
29
|
-
}),
|
|
30
|
-
],
|
|
31
|
-
module: {
|
|
32
|
-
rules: [
|
|
33
|
-
{
|
|
34
|
-
test: /\.(sa|sc|c)ss$/,
|
|
35
|
-
use: [
|
|
36
|
-
{
|
|
37
|
-
loader: MiniCssExtractPlugin.loader,
|
|
38
|
-
options: {
|
|
39
|
-
publicPath: distFilePath,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
loader: 'css-loader',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
loader: 'postcss-loader',
|
|
47
|
-
options: {
|
|
48
|
-
postcssOptions: {
|
|
49
|
-
plugins: [combineMediaQuery(), autoprefixer(), cssnano()],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
loader: 'sass-loader',
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
(err, stats) => {
|
|
62
|
-
const info = stats.toJson();
|
|
63
|
-
|
|
64
|
-
if (err || stats.hasErrors()) {
|
|
65
|
-
if (err) {
|
|
66
|
-
console.error(err);
|
|
67
|
-
reject(err);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (stats.hasErrors()) {
|
|
71
|
-
console.error(info.errors);
|
|
72
|
-
reject(err);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
resolve('webpack compiled');
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async function css() {
|
|
83
|
-
await cssWebpack(path.resolve(__dirname, '../src/scss'), path.resolve(__dirname, '../dist/css'));
|
|
84
|
-
await del(path.resolve(__dirname, '../dist/css/main.js'), {
|
|
85
|
-
force: true,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
exports.css = css;
|
|
90
|
-
exports.cssWebpack = cssWebpack;
|
package/tasks/js-bundle.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const webpack = require('webpack');
|
|
3
|
-
|
|
4
|
-
async function runWebpack() {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
webpack(
|
|
7
|
-
{
|
|
8
|
-
entry: [path.resolve(__dirname, '../src/js/index.js'), path.resolve(__dirname, '../src/js/index-polyfills.js')],
|
|
9
|
-
output: {
|
|
10
|
-
publicPath: '',
|
|
11
|
-
filename: 'index.js',
|
|
12
|
-
path: path.resolve(__dirname, '../dist/js'),
|
|
13
|
-
},
|
|
14
|
-
module: {
|
|
15
|
-
rules: [
|
|
16
|
-
{
|
|
17
|
-
test: /\.js$/,
|
|
18
|
-
exclude: /node_modules/,
|
|
19
|
-
loader: 'babel-loader',
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: 'production' })],
|
|
24
|
-
},
|
|
25
|
-
(err, stats) => {
|
|
26
|
-
const info = stats.toJson();
|
|
27
|
-
|
|
28
|
-
if (err || stats.hasErrors()) {
|
|
29
|
-
if (err) {
|
|
30
|
-
console.error(err);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (stats.hasErrors()) {
|
|
34
|
-
console.error(info.errors);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
reject(err);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
resolve('Webpack has compiled');
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async function jsbundle() {
|
|
47
|
-
await runWebpack();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
exports.jsbundle = jsbundle;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const webpack = require('webpack');
|
|
3
|
-
|
|
4
|
-
async function runWebpack() {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
webpack(
|
|
7
|
-
{
|
|
8
|
-
entry: [path.resolve(__dirname, '../src/js/index-fractal.js')],
|
|
9
|
-
output: {
|
|
10
|
-
filename: 'index-fractal.js',
|
|
11
|
-
path: path.resolve(__dirname, '../dist/js'),
|
|
12
|
-
},
|
|
13
|
-
module: {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.js$/,
|
|
17
|
-
exclude: /node_modules/,
|
|
18
|
-
loader: 'babel-loader',
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: 'production' })],
|
|
23
|
-
},
|
|
24
|
-
(err, stats) => {
|
|
25
|
-
const info = stats.toJson();
|
|
26
|
-
|
|
27
|
-
if (err || stats.hasErrors()) {
|
|
28
|
-
if (err) {
|
|
29
|
-
console.error(err);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (stats.hasErrors()) {
|
|
33
|
-
console.error(info.errors);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
reject(err);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
resolve('Webpack has compiled');
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async function jsFractalbundle() {
|
|
46
|
-
await runWebpack();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
exports.jsFractalbundle = jsFractalbundle;
|