goodteditor-ui 1.0.20 → 1.0.23

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 (114) hide show
  1. package/.eslintrc.js +7 -7
  2. package/.prettierrc +14 -14
  3. package/README.md +35 -35
  4. package/babel.config.js +5 -5
  5. package/index.js +53 -53
  6. package/jsconfig.json +13 -13
  7. package/package.json +66 -70
  8. package/src/App.vue +36 -36
  9. package/src/components/ui/Avatar.md +68 -68
  10. package/src/components/ui/Avatar.vue +180 -177
  11. package/src/components/ui/Badge.md +20 -20
  12. package/src/components/ui/Badge.vue +75 -75
  13. package/src/components/ui/Collapse.md +90 -90
  14. package/src/components/ui/Collapse.vue +86 -86
  15. package/src/components/ui/ColorPicker/Alpha.vue +114 -114
  16. package/src/components/ui/ColorPicker/Colors.vue +117 -117
  17. package/src/components/ui/ColorPicker/Hue.vue +113 -113
  18. package/src/components/ui/ColorPicker/Preview.vue +55 -55
  19. package/src/components/ui/ColorPicker/Saturation.vue +123 -123
  20. package/src/components/ui/ColorPicker/mixin.js +105 -105
  21. package/src/components/ui/ColorPicker.md +17 -17
  22. package/src/components/ui/ColorPicker.vue +314 -314
  23. package/src/components/ui/Datalist.md +41 -41
  24. package/src/components/ui/Datalist.vue +157 -157
  25. package/src/components/ui/DatePicker.md +168 -168
  26. package/src/components/ui/DatePicker.vue +527 -527
  27. package/src/components/ui/FileSelector.md +105 -105
  28. package/src/components/ui/FileSelector.vue +82 -82
  29. package/src/components/ui/Grid.md +130 -130
  30. package/src/components/ui/Grid.vue +92 -92
  31. package/src/components/ui/Image.md +59 -59
  32. package/src/components/ui/Image.vue +57 -57
  33. package/src/components/ui/InputAutocomplete.md +115 -115
  34. package/src/components/ui/InputAutocomplete.vue +341 -341
  35. package/src/components/ui/InputColorPicker.md +51 -51
  36. package/src/components/ui/InputColorPicker.vue +151 -151
  37. package/src/components/ui/InputDatePicker.md +121 -121
  38. package/src/components/ui/InputDatePicker.vue +326 -326
  39. package/src/components/ui/InputTags.md +51 -51
  40. package/src/components/ui/InputTags.vue +184 -184
  41. package/src/components/ui/InputTimePicker.md +25 -25
  42. package/src/components/ui/InputTimePicker.vue +253 -253
  43. package/src/components/ui/InputUnits.md +20 -20
  44. package/src/components/ui/InputUnits.vue +257 -257
  45. package/src/components/ui/Lazy.md +37 -37
  46. package/src/components/ui/Lazy.vue +92 -92
  47. package/src/components/ui/Pagination.md +74 -74
  48. package/src/components/ui/Pagination.vue +138 -138
  49. package/src/components/ui/Paginator.md +34 -34
  50. package/src/components/ui/Paginator.vue +83 -83
  51. package/src/components/ui/Popover.md +34 -34
  52. package/src/components/ui/Popover.vue +274 -274
  53. package/src/components/ui/Popup.md +59 -59
  54. package/src/components/ui/Popup.vue +150 -150
  55. package/src/components/ui/ResponsiveContainer.md +58 -58
  56. package/src/components/ui/ResponsiveContainer.vue +99 -99
  57. package/src/components/ui/Select.md +187 -187
  58. package/src/components/ui/Select.vue +421 -421
  59. package/src/components/ui/TimePicker.md +50 -50
  60. package/src/components/ui/TimePicker.vue +252 -252
  61. package/src/components/ui/Tooltip.md +54 -114
  62. package/src/components/ui/Tooltip.vue +113 -113
  63. package/src/components/ui/WysiwygEditor/WysiwygEditor.d.ts +119 -119
  64. package/src/components/ui/WysiwygEditor/constants.js +264 -255
  65. package/src/components/ui/WysiwygEditor/extensions/blockquote.js +15 -15
  66. package/src/components/ui/WysiwygEditor/extensions/bold.js +15 -15
  67. package/src/components/ui/WysiwygEditor/extensions/bullet-list.js +15 -15
  68. package/src/components/ui/WysiwygEditor/extensions/code-block.js +13 -13
  69. package/src/components/ui/WysiwygEditor/extensions/code.js +13 -13
  70. package/src/components/ui/WysiwygEditor/extensions/font-size.js +34 -34
  71. package/src/components/ui/WysiwygEditor/extensions/formatting.js +14 -14
  72. package/src/components/ui/WysiwygEditor/extensions/heading.js +13 -13
  73. package/src/components/ui/WysiwygEditor/extensions/horizontal-rule.js +15 -15
  74. package/src/components/ui/WysiwygEditor/extensions/image.js +19 -15
  75. package/src/components/ui/WysiwygEditor/extensions/index.d.ts +32 -32
  76. package/src/components/ui/WysiwygEditor/extensions/index.js +32 -32
  77. package/src/components/ui/WysiwygEditor/extensions/italic.js +15 -15
  78. package/src/components/ui/WysiwygEditor/extensions/link.js +16 -16
  79. package/src/components/ui/WysiwygEditor/extensions/list-item.js +15 -15
  80. package/src/components/ui/WysiwygEditor/extensions/ordered-list.js +15 -15
  81. package/src/components/ui/WysiwygEditor/extensions/paragraph.js +23 -23
  82. package/src/components/ui/WysiwygEditor/extensions/strike.js +15 -15
  83. package/src/components/ui/WysiwygEditor/extensions/table-cell.js +13 -13
  84. package/src/components/ui/WysiwygEditor/extensions/table-header.js +15 -15
  85. package/src/components/ui/WysiwygEditor/extensions/table-row.js +15 -15
  86. package/src/components/ui/WysiwygEditor/extensions/table.js +29 -29
  87. package/src/components/ui/WysiwygEditor/extensions/text-align.js +6 -5
  88. package/src/components/ui/WysiwygEditor/extensions/text-style.js +15 -15
  89. package/src/components/ui/WysiwygEditor/extensions/underline.js +15 -15
  90. package/src/components/ui/WysiwygEditor/index.d.ts +4 -4
  91. package/src/components/ui/WysiwygEditor/index.js +4 -4
  92. package/src/components/ui/WysiwygEditor/renders/Button.vue +28 -26
  93. package/src/components/ui/WysiwygEditor/renders/ColorPicker.vue +41 -42
  94. package/src/components/ui/WysiwygEditor/renders/InputAuto.vue +34 -33
  95. package/src/components/ui/WysiwygEditor/renders/InputBrowse.vue +35 -35
  96. package/src/components/ui/WysiwygEditor/renders/InputUnits.vue +38 -37
  97. package/src/components/ui/WysiwygEditor/renders/Link.vue +87 -0
  98. package/src/components/ui/WysiwygEditor/renders/Select.vue +47 -45
  99. package/src/components/ui/WysiwygEditor/renders/ToolbarPopover.vue +49 -50
  100. package/src/components/ui/WysiwygEditor/renders/index.d.ts +8 -7
  101. package/src/components/ui/WysiwygEditor/renders/index.js +8 -7
  102. package/src/components/ui/WysiwygEditor/renders/mixins/RenderMixin.js +39 -39
  103. package/src/components/ui/WysiwygEditor/renders/mixins/index.js +1 -1
  104. package/src/components/ui/WysiwygEditor/tools-and-commands.js +704 -709
  105. package/src/components/ui/WysiwygEditor/utils.js +72 -72
  106. package/src/components/ui/WysiwygEditor.md +18 -18
  107. package/src/components/ui/WysiwygEditor.vue +271 -260
  108. package/src/components/ui/utils/FormComponent.js +107 -107
  109. package/src/components/ui/utils/Helpers.js +84 -84
  110. package/src/components/ui/utils/WithPopover.js +81 -99
  111. package/src/main.js +8 -8
  112. package/styleguide.config.js +37 -37
  113. package/vue.config.js +8 -8
  114. package/dist/js.png +0 -0
@@ -1,107 +1,107 @@
1
- const r = () =>
2
- Math.random()
3
- .toString(36)
4
- .substr(2);
5
-
6
- export default {
7
- props: {
8
- /**
9
- * @model
10
- */
11
- value: {
12
- default: '',
13
- },
14
- /**
15
- * Defines the size of the component
16
- * @values '', small, large
17
- */
18
- size: {
19
- type: String,
20
- default: '',
21
- validator: function(value) {
22
- return ['', 'small', 'large'].indexOf(value) >= 0;
23
- },
24
- },
25
- /**
26
- * Placeholder
27
- */
28
- placeholder: {
29
- type: String,
30
- default: '',
31
- },
32
- /**
33
- * Readonly
34
- */
35
- readonly: {
36
- type: Boolean,
37
- default: false,
38
- },
39
- /**
40
- * Disabled
41
- */
42
- disabled: {
43
- type: Boolean,
44
- default: false,
45
- },
46
- },
47
- data() {
48
- return {
49
- inputId: this.uid(),
50
- cssClass: {},
51
- rootHasFocus: false,
52
- };
53
- },
54
- watch: {
55
- size: {
56
- handler(val, valOld) {
57
- if (valOld) {
58
- this.$delete(this.cssClass, `form-elem-${valOld}`);
59
- }
60
- if (val) {
61
- this.$set(this.cssClass, `form-elem-${val}`, true);
62
- }
63
- },
64
- immediate: true,
65
- },
66
- readonly: {
67
- handler(val) {
68
- this.$set(this.cssClass, 'events-none', val);
69
- },
70
- immediate: true,
71
- },
72
- disabled: {
73
- handler(val) {
74
- this.$set(this.cssClass, 'disabled', val);
75
- },
76
- immediate: true,
77
- },
78
- rootHasFocus(val) {
79
- this.$set(this.cssClass, 'focus', val);
80
- },
81
- },
82
- created() {
83
- window.addEventListener('blur', this.onWinBlur);
84
- document.addEventListener('mousedown', this.onDocMouseDown);
85
- },
86
- destroyed() {
87
- window.removeEventListener('blur', this.onWinBlur);
88
- document.removeEventListener('mousedown', this.onDocMouseDown);
89
- },
90
- methods: {
91
- uid() {
92
- return `${r()}-${r()}`;
93
- },
94
- getInputRef() {
95
- return document ? document.getElementById(this.inputId) : null;
96
- },
97
- onWinBlur(e) {
98
- this.rootHasFocus = false;
99
- },
100
- onDocMouseDown(e) {
101
- if (this.$el.contains(e.target)) {
102
- return;
103
- }
104
- this.rootHasFocus = false;
105
- },
106
- },
107
- };
1
+ const r = () =>
2
+ Math.random()
3
+ .toString(36)
4
+ .substr(2);
5
+
6
+ export default {
7
+ props: {
8
+ /**
9
+ * @model
10
+ */
11
+ value: {
12
+ default: '',
13
+ },
14
+ /**
15
+ * Defines the size of the component
16
+ * @values '', small, large
17
+ */
18
+ size: {
19
+ type: String,
20
+ default: '',
21
+ validator: function(value) {
22
+ return ['', 'small', 'large'].indexOf(value) >= 0;
23
+ },
24
+ },
25
+ /**
26
+ * Placeholder
27
+ */
28
+ placeholder: {
29
+ type: String,
30
+ default: '',
31
+ },
32
+ /**
33
+ * Readonly
34
+ */
35
+ readonly: {
36
+ type: Boolean,
37
+ default: false,
38
+ },
39
+ /**
40
+ * Disabled
41
+ */
42
+ disabled: {
43
+ type: Boolean,
44
+ default: false,
45
+ },
46
+ },
47
+ data() {
48
+ return {
49
+ inputId: this.uid(),
50
+ cssClass: {},
51
+ rootHasFocus: false,
52
+ };
53
+ },
54
+ watch: {
55
+ size: {
56
+ handler(val, valOld) {
57
+ if (valOld) {
58
+ this.$delete(this.cssClass, `form-elem-${valOld}`);
59
+ }
60
+ if (val) {
61
+ this.$set(this.cssClass, `form-elem-${val}`, true);
62
+ }
63
+ },
64
+ immediate: true,
65
+ },
66
+ readonly: {
67
+ handler(val) {
68
+ this.$set(this.cssClass, 'events-none', val);
69
+ },
70
+ immediate: true,
71
+ },
72
+ disabled: {
73
+ handler(val) {
74
+ this.$set(this.cssClass, 'disabled', val);
75
+ },
76
+ immediate: true,
77
+ },
78
+ rootHasFocus(val) {
79
+ this.$set(this.cssClass, 'focus', val);
80
+ },
81
+ },
82
+ created() {
83
+ window.addEventListener('blur', this.onWinBlur);
84
+ document.addEventListener('mousedown', this.onDocMouseDown);
85
+ },
86
+ destroyed() {
87
+ window.removeEventListener('blur', this.onWinBlur);
88
+ document.removeEventListener('mousedown', this.onDocMouseDown);
89
+ },
90
+ methods: {
91
+ uid() {
92
+ return `${r()}-${r()}`;
93
+ },
94
+ getInputRef() {
95
+ return document ? document.getElementById(this.inputId) : null;
96
+ },
97
+ onWinBlur(e) {
98
+ this.rootHasFocus = false;
99
+ },
100
+ onDocMouseDown(e) {
101
+ if (this.$el.contains(e.target)) {
102
+ return;
103
+ }
104
+ this.rootHasFocus = false;
105
+ },
106
+ },
107
+ };
@@ -1,84 +1,84 @@
1
- const scrollIntoView = c => {
2
- if (!c || !c.parentNode) {
3
- return;
4
- }
5
- let p = c.parentNode;
6
- let ph = p.offsetHeight;
7
- let py = p.scrollTop;
8
- let ch = c.offsetHeight;
9
- let cy = c.offsetTop;
10
- if (cy < py) {
11
- p.scrollTop = cy;
12
- } else if (cy > py + ph - ch) {
13
- p.scrollTop = cy - ph + ch;
14
- }
15
- };
16
-
17
- let ID = 1;
18
- const nextId = prefix => `${prefix}-${ID++}`;
19
- const isDateValid = d => d instanceof Date && !isNaN(d.getTime());
20
-
21
- const Key = {
22
- UP: 'ArrowUp',
23
- DOWN: 'ArrowDown',
24
- ENTER: 'Enter',
25
- ESC: 'Escape',
26
- };
27
-
28
- const Position = {
29
- LEFT: 'left',
30
- RIGHT: 'right',
31
- TOP: 'top',
32
- BOTTOM: 'bottom',
33
- START: 'start',
34
- END: 'end',
35
- };
36
-
37
- const debounce = (func, delay) => {
38
- let timeout;
39
- return function executedFunction(...args) {
40
- const later = () => {
41
- clearTimeout(timeout);
42
- func(...args);
43
- };
44
- clearTimeout(timeout);
45
- timeout = setTimeout(later, delay);
46
- };
47
- };
48
-
49
- /**
50
- * @param {Element} target
51
- * @param {IntersectionObserverCallback} callback
52
- * @param {IntersectionObserverInit} options
53
- * @return {{ observer:IntersectionObserver, stop:Function }}
54
- */
55
- const useIntersectionObserver = (target, callback, options) => {
56
- const observer = new IntersectionObserver(callback, options);
57
- observer.observe(target);
58
- return { observer, stop: () => observer.disconnect() };
59
- };
60
-
61
- /**
62
- * @param {number} x - x-axis coordinate
63
- * @param {number} y - y-axis coordinate
64
- * @return {function: DOMRect}
65
- */
66
- const generateGetBoundingClientRect = (x = 0, y = 0) => () => ({
67
- width: 0,
68
- height: 0,
69
- top: y,
70
- right: x,
71
- bottom: y,
72
- left: x,
73
- });
74
-
75
- export {
76
- scrollIntoView,
77
- isDateValid,
78
- nextId,
79
- Key,
80
- Position,
81
- debounce,
82
- useIntersectionObserver,
83
- generateGetBoundingClientRect,
84
- };
1
+ const scrollIntoView = c => {
2
+ if (!c || !c.parentNode) {
3
+ return;
4
+ }
5
+ let p = c.parentNode;
6
+ let ph = p.offsetHeight;
7
+ let py = p.scrollTop;
8
+ let ch = c.offsetHeight;
9
+ let cy = c.offsetTop;
10
+ if (cy < py) {
11
+ p.scrollTop = cy;
12
+ } else if (cy > py + ph - ch) {
13
+ p.scrollTop = cy - ph + ch;
14
+ }
15
+ };
16
+
17
+ let ID = 1;
18
+ const nextId = prefix => `${prefix}-${ID++}`;
19
+ const isDateValid = d => d instanceof Date && !isNaN(d.getTime());
20
+
21
+ const Key = {
22
+ UP: 'ArrowUp',
23
+ DOWN: 'ArrowDown',
24
+ ENTER: 'Enter',
25
+ ESC: 'Escape',
26
+ };
27
+
28
+ const Position = {
29
+ LEFT: 'left',
30
+ RIGHT: 'right',
31
+ TOP: 'top',
32
+ BOTTOM: 'bottom',
33
+ START: 'start',
34
+ END: 'end',
35
+ };
36
+
37
+ const debounce = (func, delay) => {
38
+ let timeout;
39
+ return function executedFunction(...args) {
40
+ const later = () => {
41
+ clearTimeout(timeout);
42
+ func(...args);
43
+ };
44
+ clearTimeout(timeout);
45
+ timeout = setTimeout(later, delay);
46
+ };
47
+ };
48
+
49
+ /**
50
+ * @param {Element} target
51
+ * @param {IntersectionObserverCallback} callback
52
+ * @param {IntersectionObserverInit} options
53
+ * @return {{ observer:IntersectionObserver, stop:Function }}
54
+ */
55
+ const useIntersectionObserver = (target, callback, options) => {
56
+ const observer = new IntersectionObserver(callback, options);
57
+ observer.observe(target);
58
+ return { observer, stop: () => observer.disconnect() };
59
+ };
60
+
61
+ /**
62
+ * @param {number} x - x-axis coordinate
63
+ * @param {number} y - y-axis coordinate
64
+ * @return {function: DOMRect}
65
+ */
66
+ const generateGetBoundingClientRect = (x = 0, y = 0) => () => ({
67
+ width: 0,
68
+ height: 0,
69
+ top: y,
70
+ right: x,
71
+ bottom: y,
72
+ left: x,
73
+ });
74
+
75
+ export {
76
+ scrollIntoView,
77
+ isDateValid,
78
+ nextId,
79
+ Key,
80
+ Position,
81
+ debounce,
82
+ useIntersectionObserver,
83
+ generateGetBoundingClientRect,
84
+ };
@@ -1,99 +1,81 @@
1
- import { nextId, Position } from './Helpers';
2
-
3
- export default {
4
- props: {
5
- /**
6
- * z-index
7
- */
8
- zIndex: {
9
- type: Number,
10
- default: 1010,
11
- },
12
- /**
13
- * Dropdown append to body
14
- */
15
- appendToBody: {
16
- type: Boolean,
17
- default: true,
18
- },
19
- /**
20
- * Position, values of the popover:
21
- * bl, br, tl, tr - bottom-left, bottom-right, top-left, top-right
22
- * @values bl, br, tl, tr, top, top-start, top-end, left, left-start, left-end, right, right-start, right-end, bottom, bottom-start, bottom-end
23
- */
24
- position: {
25
- type: String,
26
- default: `${Position.BOTTOM}-${Position.START}`,
27
- },
28
- /**
29
- * Position offset [ x, y ] where:
30
- * x - skidding (offset along target)
31
- * y - distance (offset away from target)
32
- */
33
- positionOffset: {
34
- type: Array,
35
- default() {
36
- return [1, 1];
37
- },
38
- },
39
- /**
40
- * Auto width
41
- */
42
- autoWidth: {
43
- type: Boolean,
44
- default: false,
45
- },
46
- /**
47
- * Should follow the cursor
48
- */
49
- shouldFollowCursor: {
50
- type: Boolean,
51
- default: false
52
- },
53
- /**
54
- * Cursor coordinates [ x, y ]
55
- */
56
- cursorCoordinates: {
57
- type: Array,
58
- default: () => [0, 0]
59
- }
60
- },
61
- data() {
62
- return {
63
- popoverShow: false,
64
- popoverTargetId: nextId('popover-target'),
65
- };
66
- },
67
- computed: {
68
- popoverTarget() {
69
- return `[data-popover=${this.popoverTargetId}]`;
70
- },
71
- popoverOptions() {
72
- let {
73
- zIndex,
74
- appendToBody,
75
- position,
76
- positionOffset,
77
- autoWidth,
78
- popoverTarget: target,
79
- shouldFollowCursor,
80
- cursorCoordinates
81
- } = this;
82
- return {
83
- zIndex,
84
- appendToBody,
85
- position,
86
- positionOffset,
87
- autoWidth,
88
- target,
89
- shouldFollowCursor,
90
- cursorCoordinates
91
- };
92
- },
93
- },
94
- methods: {
95
- togglePopover() {
96
- this.popoverShow = !this.popoverShow;
97
- },
98
- },
99
- };
1
+ import { nextId, Position } from './Helpers';
2
+
3
+ export default {
4
+ props: {
5
+ /**
6
+ * z-index
7
+ */
8
+ zIndex: {
9
+ type: Number,
10
+ default: 1010,
11
+ },
12
+ /**
13
+ * Dropdown append to body
14
+ */
15
+ appendToBody: {
16
+ type: Boolean,
17
+ default: true,
18
+ },
19
+ /**
20
+ * Position, values of the popover:
21
+ * bl, br, tl, tr - bottom-left, bottom-right, top-left, top-right
22
+ * @values bl, br, tl, tr, top, top-start, top-end, left, left-start, left-end, right, right-start, right-end, bottom, bottom-start, bottom-end
23
+ */
24
+ position: {
25
+ type: String,
26
+ default: `${Position.BOTTOM}-${Position.START}`,
27
+ },
28
+ /**
29
+ * Position offset [ x, y ] where:
30
+ * x - skidding (offset along target)
31
+ * y - distance (offset away from target)
32
+ */
33
+ positionOffset: {
34
+ type: Array,
35
+ default() {
36
+ return [1, 1];
37
+ },
38
+ },
39
+ /**
40
+ * Auto width
41
+ */
42
+ autoWidth: {
43
+ type: Boolean,
44
+ default: false,
45
+ }
46
+ },
47
+ data() {
48
+ return {
49
+ popoverShow: false,
50
+ popoverTargetId: nextId('popover-target'),
51
+ };
52
+ },
53
+ computed: {
54
+ popoverTarget() {
55
+ return `[data-popover=${this.popoverTargetId}]`;
56
+ },
57
+ popoverOptions() {
58
+ let {
59
+ zIndex,
60
+ appendToBody,
61
+ position,
62
+ positionOffset,
63
+ autoWidth,
64
+ popoverTarget: target
65
+ } = this;
66
+ return {
67
+ zIndex,
68
+ appendToBody,
69
+ position,
70
+ positionOffset,
71
+ autoWidth,
72
+ target
73
+ };
74
+ },
75
+ },
76
+ methods: {
77
+ togglePopover() {
78
+ this.popoverShow = !this.popoverShow;
79
+ },
80
+ },
81
+ };
package/src/main.js CHANGED
@@ -1,8 +1,8 @@
1
- import Vue from 'vue';
2
- import App from './App.vue';
3
-
4
- Vue.config.productionTip = false;
5
-
6
- new Vue({
7
- render: h => h(App)
8
- }).$mount('#app');
1
+ import Vue from 'vue';
2
+ import App from './App.vue';
3
+
4
+ Vue.config.productionTip = false;
5
+
6
+ new Vue({
7
+ render: h => h(App)
8
+ }).$mount('#app');
@@ -1,37 +1,37 @@
1
- const path = require('path');
2
- const { version } = require('./package.json');
3
-
4
- module.exports = {
5
- components: 'src/components/ui/[A-Z]*.vue',
6
- require: ['goodt-framework-css'],
7
- title: 'UI',
8
- version,
9
- styleguideDir: 'docs',
10
- getComponentPathLine(componentPath) {
11
- const name = path.basename(componentPath, '.vue');
12
- return `import { ${name} } from 'goodteditor-ui';`;
13
- },
14
- template: {
15
- head: {
16
- links: [
17
- {
18
- rel: 'stylesheet',
19
- href:
20
- 'https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css',
21
- crossorigin: 'anonymous',
22
- },
23
- {
24
- rel: 'stylesheet',
25
- href:
26
- 'https://materialdesignicons.com/cdn/light/0.2.63/css/materialdesignicons-light.min.css',
27
- crossorigin: 'anonymous',
28
- },
29
- ],
30
- },
31
- body: {
32
- raw: `<script src="https://unpkg.com/dayjs@1.9.6/dayjs.min.js"></script>
33
- <script src="https://unpkg.com/dayjs@1.9.6/locale/ru.js"></script>
34
- <script src="https://unpkg.com/dayjs@1.9.6/plugin/customParseFormat.js"></script>`,
35
- },
36
- },
37
- };
1
+ const path = require('path');
2
+ const { version } = require('./package.json');
3
+
4
+ module.exports = {
5
+ components: 'src/components/ui/[A-Z]*.vue',
6
+ require: ['goodt-framework-css'],
7
+ title: 'UI',
8
+ version,
9
+ styleguideDir: 'docs',
10
+ getComponentPathLine(componentPath) {
11
+ const name = path.basename(componentPath, '.vue');
12
+ return `import { ${name} } from 'goodteditor-ui';`;
13
+ },
14
+ template: {
15
+ head: {
16
+ links: [
17
+ {
18
+ rel: 'stylesheet',
19
+ href:
20
+ 'https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css',
21
+ crossorigin: 'anonymous',
22
+ },
23
+ {
24
+ rel: 'stylesheet',
25
+ href:
26
+ 'https://materialdesignicons.com/cdn/light/0.2.63/css/materialdesignicons-light.min.css',
27
+ crossorigin: 'anonymous',
28
+ },
29
+ ],
30
+ },
31
+ body: {
32
+ raw: `<script src="https://unpkg.com/dayjs@1.9.6/dayjs.min.js"></script>
33
+ <script src="https://unpkg.com/dayjs@1.9.6/locale/ru.js"></script>
34
+ <script src="https://unpkg.com/dayjs@1.9.6/plugin/customParseFormat.js"></script>`,
35
+ },
36
+ },
37
+ };
package/vue.config.js CHANGED
@@ -1,8 +1,8 @@
1
- /* eslint-disable */
2
- module.exports = {
3
- devServer: {
4
- port: 3000
5
- },
6
- filenameHashing: true,
7
- lintOnSave: true
8
- };
1
+ /* eslint-disable */
2
+ module.exports = {
3
+ devServer: {
4
+ port: 3000
5
+ },
6
+ filenameHashing: true,
7
+ lintOnSave: true
8
+ };
package/dist/js.png DELETED
Binary file