@madgex/design-system 1.24.2 → 1.26.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.
Files changed (51) hide show
  1. package/.vscode/launch.json +1 -1
  2. package/__tests__/unit/tasks/css.spec.js +5 -0
  3. package/__tests__/unit/tasks/jsbundle.spec.js +5 -0
  4. package/__tests__/unit/tasks/svgsprite.spec.js +5 -0
  5. package/__tests__/unit/tasks/tokens.spec.js +5 -0
  6. package/coverage/cobertura-coverage.xml +3 -2
  7. package/coverage/components/accordion/accordion.js.html +1 -1
  8. package/coverage/components/accordion/index.html +1 -1
  9. package/coverage/components/tabs/index.html +1 -1
  10. package/coverage/components/tabs/tabs.js.html +1 -1
  11. package/coverage/index.html +7 -7
  12. package/coverage/js/common.js.html +1 -1
  13. package/coverage/js/index-polyfills.js.html +1 -1
  14. package/coverage/js/index.html +1 -1
  15. package/coverage/js/index.js.html +1 -1
  16. package/coverage/js/polyfills/closest.js.html +1 -1
  17. package/coverage/js/polyfills/index.html +1 -1
  18. package/coverage/tokens/_config.js.html +17 -11
  19. package/coverage/tokens/index.html +5 -5
  20. package/dist/_tokens/css/_tokens.css +1 -1
  21. package/dist/_tokens/js/_tokens-module.js +1 -1
  22. package/dist/_tokens/scss/_tokens.scss +1 -1
  23. package/dist/assets/icons.svg +1 -1
  24. package/dist/css/index.css +1 -1
  25. package/dist/js/index.js +2 -2
  26. package/docs/tokens/spacing.njk +2 -2
  27. package/fractal.js +2 -2
  28. package/gulpfile.js +11 -11
  29. package/hook.js +63 -0
  30. package/package.json +32 -34
  31. package/src/components/pagination/README.md +20 -0
  32. package/src/components/pagination/_macro.njk +3 -0
  33. package/src/components/pagination/_template.njk +49 -0
  34. package/src/components/pagination/pagination.config.js +48 -0
  35. package/src/components/pagination/pagination.njk +17 -0
  36. package/src/components/pagination/pagination.scss +35 -0
  37. package/src/scss/components/__index.scss +2 -1
  38. package/src/scss/helpers/__index.scss +1 -1
  39. package/src/scss/index.scss +1 -1
  40. package/src/tokens/_config.js +8 -6
  41. package/src/tokens/overrides/override.json +1 -0
  42. package/src/tokens/size.json +1 -1
  43. package/tasks/css.js +97 -0
  44. package/{gulp-tasks → tasks}/fractal.js +6 -4
  45. package/tasks/js-bundle.js +44 -0
  46. package/tasks/svgsprite.js +69 -0
  47. package/tasks/tokens.js +34 -0
  48. package/gulp-tasks/css.js +0 -22
  49. package/gulp-tasks/js-bundle.js +0 -31
  50. package/gulp-tasks/svgsprite.js +0 -57
  51. package/gulp-tasks/tokens.js +0 -20
@@ -1,31 +0,0 @@
1
- const gulp = require('gulp');
2
- const webpack = require('webpack');
3
- const gulpWebpack = require('webpack-stream');
4
-
5
- function jsbundle() {
6
- return gulp
7
- .src(['src/js/index.js', 'src/js/index-polyfills.js'])
8
- .pipe(
9
- gulpWebpack(
10
- {
11
- output: {
12
- filename: 'index.js',
13
- },
14
- // watch: true,
15
- module: {
16
- rules: [
17
- {
18
- test: /\.js$/,
19
- exclude: /node_modules/,
20
- loader: 'babel-loader',
21
- },
22
- ],
23
- },
24
- },
25
- webpack
26
- )
27
- )
28
- .pipe(gulp.dest('dist/js/'));
29
- }
30
-
31
- exports.jsbundle = jsbundle;
@@ -1,57 +0,0 @@
1
- const gulp = require('gulp');
2
- const svgstore = require('gulp-svgstore');
3
- const svgmin = require('gulp-svgmin');
4
- const tap = require('gulp-tap');
5
- const path = require('path');
6
- const fs = require('fs');
7
-
8
- function svgsprite() {
9
- const icons = [];
10
- const stream = gulp
11
- .src('./src/icons/*.svg')
12
- .pipe(
13
- svgmin((file) => {
14
- const prefix = path.basename(file.relative, path.extname(file.relative));
15
- return {
16
- plugins: [
17
- {
18
- cleanupIDs: {
19
- prefix: `${prefix}-`,
20
- minify: true,
21
- },
22
- },
23
- { removeDoctype: true },
24
- { removeComments: true },
25
- { removeTitle: true },
26
- { removeDesc: true },
27
- { removeUselessDefs: true },
28
- { removeEditorsNSData: true },
29
- { cleanupAttrs: true },
30
- { cleanupNumericValues: true },
31
- { removeViewBox: false },
32
- { removeDimensions: true },
33
- {
34
- removeAttrs: {
35
- attrs: 'fill',
36
- },
37
- },
38
- ],
39
- };
40
- })
41
- )
42
- .pipe(
43
- tap((file) => {
44
- icons.push({ name: file.stem });
45
- })
46
- )
47
- .pipe(svgstore({ inlineSvg: true }))
48
- .pipe(gulp.dest('dist/assets'));
49
-
50
- stream.on('end', () => {
51
- fs.writeFileSync('./dist/assets/icons.json', JSON.stringify(icons));
52
- });
53
-
54
- return stream;
55
- }
56
-
57
- exports.svgsprite = svgsprite;
@@ -1,20 +0,0 @@
1
- const path = require('path');
2
- const StyleDictionary = require('style-dictionary').extend(path.resolve('./src/tokens/_config.js'));
3
-
4
- StyleDictionary.registerTransform({
5
- name: 'color/scssColorFunctions',
6
- type: 'value',
7
- matcher(prop) {
8
- return prop.attributes.category === 'color' && prop.scssColorFunction;
9
- },
10
- transformer(prop) {
11
- return prop.scssColorFunction;
12
- },
13
- });
14
-
15
- function tokens(cb) {
16
- StyleDictionary.buildAllPlatforms();
17
- cb();
18
- }
19
-
20
- exports.tokens = tokens;