@mozaic-ds/vue 0.17.0 → 0.19.1-beta.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 (52) hide show
  1. package/README.md +2 -2
  2. package/dist/demo.html +1 -10
  3. package/dist/mozaic-vue.adeo.css +44 -1
  4. package/dist/mozaic-vue.adeo.umd.js +7590 -24558
  5. package/dist/mozaic-vue.common.js +7606 -24575
  6. package/dist/mozaic-vue.common.js.map +1 -1
  7. package/dist/mozaic-vue.css +1 -1
  8. package/dist/mozaic-vue.umd.js +7590 -24558
  9. package/dist/mozaic-vue.umd.js.map +1 -1
  10. package/dist/mozaic-vue.umd.min.js +1 -1
  11. package/dist/mozaic-vue.umd.min.js.map +1 -1
  12. package/package.json +21 -21
  13. package/src/components/accordion/MAccordion.vue +1 -1
  14. package/src/components/autocomplete/MAutocomplete.vue +3 -3
  15. package/src/components/breadcrumb/MBreadcrumb.vue +1 -1
  16. package/src/components/button/MButton.vue +1 -1
  17. package/src/components/datatable/MDataTable.vue +1 -3
  18. package/src/components/fileuploader/MFileUploader.vue +1 -1
  19. package/src/components/icon/MIcon.vue +42 -19
  20. package/src/components/icon/icons.js +18887 -0
  21. package/src/components/layer/MLayer.vue +7 -1
  22. package/src/components/link/MLink.vue +1 -1
  23. package/src/components/listbox/MListBox.vue +1 -1
  24. package/src/components/notification/MNotification.vue +1 -1
  25. package/src/components/pagination/MPagination.vue +2 -2
  26. package/src/components/quantityselector/MQuantitySelector.vue +2 -2
  27. package/src/components/select/MSelect.vue +10 -0
  28. package/src/components/stepper/MStepper.vue +1 -1
  29. package/src/components/tabs/MTab.vue +1 -3
  30. package/src/components/textinput/MTextInput.vue +2 -2
  31. package/src/components/textinput/MTextInputIcon.vue +1 -1
  32. package/src/tokens/adeo/android/colors.xml +34 -23
  33. package/src/tokens/adeo/css/_variables.scss +34 -23
  34. package/src/tokens/adeo/css/root.scss +34 -23
  35. package/src/tokens/adeo/ios/StyleDictionaryColor.h +11 -0
  36. package/src/tokens/adeo/ios/StyleDictionaryColor.m +28 -17
  37. package/src/tokens/adeo/ios/StyleDictionaryColor.swift +34 -23
  38. package/src/tokens/adeo/js/tokens.js +34 -23
  39. package/src/tokens/adeo/js/tokensObject.js +314 -46
  40. package/src/tokens/adeo/scss/_tokens.scss +53 -27
  41. package/dist/fonts/LeroyMerlinSans-Web-Italic.3f4e3fc6.woff2 +0 -0
  42. package/dist/fonts/LeroyMerlinSans-Web-Italic.d826f8b3.woff +0 -0
  43. package/dist/fonts/LeroyMerlinSans-Web-Light.1847746a.woff +0 -0
  44. package/dist/fonts/LeroyMerlinSans-Web-Light.c3d8a284.woff2 +0 -0
  45. package/dist/fonts/LeroyMerlinSans-Web-LightItalic.343f7e0c.woff +0 -0
  46. package/dist/fonts/LeroyMerlinSans-Web-LightItalic.f4bc7b4c.woff2 +0 -0
  47. package/dist/fonts/LeroyMerlinSans-Web-Regular.1631e1d1.woff +0 -0
  48. package/dist/fonts/LeroyMerlinSans-Web-Regular.f1fa0f56.woff2 +0 -0
  49. package/dist/fonts/LeroyMerlinSans-Web-SemiBold.44f32155.woff +0 -0
  50. package/dist/fonts/LeroyMerlinSans-Web-SemiBold.c1061939.woff2 +0 -0
  51. package/dist/fonts/LeroyMerlinSans-Web-SemiBoldItalic.083f0cc1.woff +0 -0
  52. package/dist/fonts/LeroyMerlinSans-Web-SemiBoldItalic.cce10920.woff2 +0 -0
package/package.json CHANGED
@@ -1,17 +1,27 @@
1
1
  {
2
2
  "name": "@mozaic-ds/vue",
3
- "version": "0.17.0",
3
+ "version": "0.19.1-beta.0",
4
+ "description": "Vue.js implementation of Mozaic Design System",
5
+ "author": "Adeo - Mozaic Design System",
4
6
  "scripts": {
5
7
  "serve": "vue-cli-service serve",
6
8
  "build": "vue-cli-service build ./src/index.js",
9
+ "lint": "vue-cli-service lint",
7
10
  "build:bundle": "vue-cli-service build --target lib --name mozaic-vue ./src/index.js",
8
11
  "build:bundleAdeo": "vue-cli-service build --target lib --formats umd --mode adeo --filename mozaic-vue.adeo ./src/index.js --no-clean",
9
- "lint": "vue-cli-service lint",
12
+ "postinstall": "node postinstall.js",
10
13
  "prepublishOnly": "npm run-script build:bundle && npm run-script build:bundleAdeo",
11
14
  "publish:beta": "npm publish --access public --tag alpha",
12
- "tokens:build": "mozaic-tokens-build",
13
- "postinstall": "node postinstall.js"
15
+ "tokens:build": "mozaic-tokens-build"
14
16
  },
17
+ "main": "./dist/mozaic-vue.umd.min.js",
18
+ "files": [
19
+ "dist/*",
20
+ "src/*",
21
+ "types/*",
22
+ "*.d.ts",
23
+ "postinstall.js"
24
+ ],
15
25
  "dependencies": {
16
26
  "@mozaic-ds/css-dev-tools": "^1.29.1",
17
27
  "@mozaic-ds/icons": "^1.30.0",
@@ -26,8 +36,8 @@
26
36
  "devDependencies": {
27
37
  "@babel/core": "^7.15.8",
28
38
  "@babel/eslint-parser": "^7.15.8",
29
- "@vue/cli-plugin-babel": "^4.5.15",
30
- "@vue/cli-service": "^4.5.15",
39
+ "@vue/cli-plugin-babel": "~5.0.4",
40
+ "@vue/cli-service": "~5.0.4",
31
41
  "@vue/compiler-sfc": "^3.2.20",
32
42
  "@vue/eslint-config-prettier": "^6.0.0",
33
43
  "babel-eslint": "^10.1.0",
@@ -41,7 +51,10 @@
41
51
  "sass-loader": "^10.2.0",
42
52
  "vue-template-compiler": "^2.6.14"
43
53
  },
44
- "description": "Vue.js implementation of Mozaic Design System",
54
+ "bugs": {
55
+ "url": "https://github.com/adeo/mozaic-vue/issues"
56
+ },
57
+ "homepage": "https://github.com/adeo/mozaic-vue#readme",
45
58
  "keywords": [
46
59
  "design system",
47
60
  "mozaic design system",
@@ -51,23 +64,10 @@
51
64
  "scss",
52
65
  "adeo"
53
66
  ],
54
- "author": "Adeo - Mozaic Design System",
55
- "homepage": "https://github.com/adeo/mozaic-vue#readme",
56
67
  "license": "ISC",
57
- "main": "./dist/mozaic-vue.umd.min.js",
58
- "files": [
59
- "dist/*",
60
- "src/*",
61
- "types/*",
62
- "*.d.ts",
63
- "postinstall.js"
64
- ],
65
- "types": "./types/index.d.ts",
66
68
  "repository": {
67
69
  "type": "git",
68
70
  "url": "git+https://github.com/adeo/mozaic-vue.git"
69
71
  },
70
- "bugs": {
71
- "url": "https://github.com/adeo/mozaic-vue/issues"
72
- }
72
+ "types": "./types/index.d.ts"
73
73
  }
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
 
35
35
  <script>
36
- import MIcon from '../icon/MIcon';
36
+ import MIcon from '../icon/MIcon.vue';
37
37
 
38
38
  export default {
39
39
  name: 'MAccordion',
@@ -43,9 +43,9 @@
43
43
  </template>
44
44
 
45
45
  <script>
46
- import MTextInput from '../textinput/MTextInput';
47
- import MTag from '../tags/MTag';
48
- import MListBox from '../listbox/MListBox';
46
+ import MTextInput from '../textinput/MTextInput.vue';
47
+ import MTag from '../tags/MTag.vue';
48
+ import MListBox from '../listbox/MListBox.vue';
49
49
 
50
50
  export default {
51
51
  name: 'MAutocomplete',
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
 
35
35
  <script>
36
- import MLink from '../link/MLink';
36
+ import MLink from '../link/MLink.vue';
37
37
 
38
38
  export default {
39
39
  name: 'MBreadcrumb',
@@ -47,7 +47,7 @@ import {
47
47
  responsiveModifiers,
48
48
  responsiveModifierValidators,
49
49
  } from '../../utils/mozaicClasses';
50
- import MIcon from '../icon/MIcon';
50
+ import MIcon from '../icon/MIcon.vue';
51
51
 
52
52
  export default {
53
53
  name: 'MButton',
@@ -151,7 +151,7 @@ function buildOptions(
151
151
  const columnSorters = sortedColmuns.reduce(
152
152
  (acc, header) => ({
153
153
  ...acc,
154
- [header.dataFieldExpr]: header.sortOrder,
154
+ [header.sortFieldExpr ?? header.dataFieldExpr]: header.sortOrder,
155
155
  }),
156
156
  {}
157
157
  );
@@ -586,8 +586,6 @@ $local-config: (
586
586
 
587
587
  @import 'settings-tools/_all-settings';
588
588
 
589
- @include import-font-families();
590
-
591
589
  .mc-data-table {
592
590
  @include set-font-face();
593
591
 
@@ -40,7 +40,7 @@
40
40
  </template>
41
41
 
42
42
  <script>
43
- import MFileResult from './MFileResult';
43
+ import MFileResult from './MFileResult.vue';
44
44
  export default {
45
45
  name: 'MFileUploader',
46
46
  components: {
@@ -1,30 +1,18 @@
1
- <template>
2
- <svg
3
- :id="`icon-${id}`"
4
- :viewBox="viewbox"
5
- :height="size"
6
- :width="size"
7
- :fill="color"
8
- aria-hidden="true"
9
- >
10
- <component
11
- :is="path.tagName"
12
- v-for="(path, index) in paths"
13
- :key="index"
14
- v-bind="path.attrs"
15
- />
16
- </svg>
17
- </template>
18
-
19
1
  <script>
20
2
  export default {
21
3
  name: 'MIcon',
22
4
 
23
5
  props: {
6
+ /**
7
+ * Icon name
8
+ */
24
9
  name: {
25
10
  type: String,
26
11
  required: true,
27
12
  },
13
+ /**
14
+ * Icon color
15
+ */
28
16
  color: {
29
17
  type: String,
30
18
  default: 'currentColor',
@@ -49,7 +37,8 @@ export default {
49
37
  return () =>
50
38
  import(
51
39
  /* webpackMode: 'eager' */
52
- '@mozaic-ds/icons/js/icons.js'
40
+ // '@mozaic-ds/icons/js/icons.js'
41
+ './icons.js' // <= example file
53
42
  );
54
43
  },
55
44
 
@@ -94,5 +83,39 @@ export default {
94
83
  });
95
84
  },
96
85
  },
86
+
87
+ render: function (createElement) {
88
+ const paths = this.paths;
89
+ const svgAttrs = {
90
+ id: `MIcon-${this.name}-${this.id}`,
91
+ viewBox: this.viewbox,
92
+ height: this.size,
93
+ width: this.size,
94
+ fill: this.color,
95
+ 'aria-hidden': 'true',
96
+ };
97
+
98
+ function generatePaths(paths) {
99
+ return paths.map(function (path) {
100
+ const children = path.children;
101
+
102
+ if (children) {
103
+ return createElement(
104
+ path.tagName,
105
+ { attrs: path.attrs },
106
+ generatePaths(children)
107
+ );
108
+ }
109
+
110
+ return createElement(path.tagName, { attrs: path.attrs });
111
+ });
112
+ }
113
+
114
+ if (paths) {
115
+ return createElement('svg', { attrs: svgAttrs }, generatePaths(paths));
116
+ }
117
+
118
+ return createElement('svg', { attrs: svgAttrs });
119
+ },
97
120
  };
98
121
  </script>