goodteditor-ui 1.0.21 → 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.
- package/.eslintrc.js +7 -7
- package/.prettierrc +14 -14
- package/README.md +35 -35
- package/babel.config.js +5 -5
- package/index.js +53 -53
- package/jsconfig.json +13 -13
- package/package.json +66 -70
- package/src/App.vue +36 -36
- package/src/components/ui/Avatar.md +68 -68
- package/src/components/ui/Avatar.vue +180 -177
- package/src/components/ui/Badge.md +20 -20
- package/src/components/ui/Badge.vue +75 -75
- package/src/components/ui/Collapse.md +90 -90
- package/src/components/ui/Collapse.vue +86 -86
- package/src/components/ui/ColorPicker/Alpha.vue +114 -114
- package/src/components/ui/ColorPicker/Colors.vue +117 -117
- package/src/components/ui/ColorPicker/Hue.vue +113 -113
- package/src/components/ui/ColorPicker/Preview.vue +55 -55
- package/src/components/ui/ColorPicker/Saturation.vue +123 -123
- package/src/components/ui/ColorPicker/mixin.js +105 -105
- package/src/components/ui/ColorPicker.md +17 -17
- package/src/components/ui/ColorPicker.vue +314 -314
- package/src/components/ui/Datalist.md +41 -41
- package/src/components/ui/Datalist.vue +157 -157
- package/src/components/ui/DatePicker.md +168 -168
- package/src/components/ui/DatePicker.vue +527 -527
- package/src/components/ui/FileSelector.md +105 -105
- package/src/components/ui/FileSelector.vue +82 -82
- package/src/components/ui/Grid.md +130 -130
- package/src/components/ui/Grid.vue +92 -92
- package/src/components/ui/Image.md +59 -59
- package/src/components/ui/Image.vue +57 -57
- package/src/components/ui/InputAutocomplete.md +115 -115
- package/src/components/ui/InputAutocomplete.vue +341 -341
- package/src/components/ui/InputColorPicker.md +51 -51
- package/src/components/ui/InputColorPicker.vue +151 -151
- package/src/components/ui/InputDatePicker.md +121 -121
- package/src/components/ui/InputDatePicker.vue +326 -326
- package/src/components/ui/InputTags.md +51 -51
- package/src/components/ui/InputTags.vue +184 -184
- package/src/components/ui/InputTimePicker.md +25 -25
- package/src/components/ui/InputTimePicker.vue +253 -253
- package/src/components/ui/InputUnits.md +20 -20
- package/src/components/ui/InputUnits.vue +257 -257
- package/src/components/ui/Lazy.md +37 -37
- package/src/components/ui/Lazy.vue +92 -92
- package/src/components/ui/Pagination.md +74 -74
- package/src/components/ui/Pagination.vue +138 -138
- package/src/components/ui/Paginator.md +34 -34
- package/src/components/ui/Paginator.vue +83 -83
- package/src/components/ui/Popover.md +34 -34
- package/src/components/ui/Popover.vue +274 -274
- package/src/components/ui/Popup.md +59 -59
- package/src/components/ui/Popup.vue +150 -150
- package/src/components/ui/ResponsiveContainer.md +58 -58
- package/src/components/ui/ResponsiveContainer.vue +99 -99
- package/src/components/ui/Select.md +187 -187
- package/src/components/ui/Select.vue +421 -421
- package/src/components/ui/TimePicker.md +50 -50
- package/src/components/ui/TimePicker.vue +252 -252
- package/src/components/ui/Tooltip.md +54 -114
- package/src/components/ui/Tooltip.vue +113 -113
- package/src/components/ui/WysiwygEditor/WysiwygEditor.d.ts +119 -119
- package/src/components/ui/WysiwygEditor/constants.js +264 -264
- package/src/components/ui/WysiwygEditor/extensions/blockquote.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/bold.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/bullet-list.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/code-block.js +13 -13
- package/src/components/ui/WysiwygEditor/extensions/code.js +13 -13
- package/src/components/ui/WysiwygEditor/extensions/font-size.js +34 -34
- package/src/components/ui/WysiwygEditor/extensions/formatting.js +14 -14
- package/src/components/ui/WysiwygEditor/extensions/heading.js +13 -13
- package/src/components/ui/WysiwygEditor/extensions/horizontal-rule.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/image.js +19 -19
- package/src/components/ui/WysiwygEditor/extensions/index.d.ts +32 -32
- package/src/components/ui/WysiwygEditor/extensions/index.js +32 -32
- package/src/components/ui/WysiwygEditor/extensions/italic.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/link.js +16 -16
- package/src/components/ui/WysiwygEditor/extensions/list-item.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/ordered-list.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/paragraph.js +23 -23
- package/src/components/ui/WysiwygEditor/extensions/strike.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/table-cell.js +13 -13
- package/src/components/ui/WysiwygEditor/extensions/table-header.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/table-row.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/table.js +29 -29
- package/src/components/ui/WysiwygEditor/extensions/text-align.js +6 -6
- package/src/components/ui/WysiwygEditor/extensions/text-style.js +15 -15
- package/src/components/ui/WysiwygEditor/extensions/underline.js +15 -15
- package/src/components/ui/WysiwygEditor/index.d.ts +4 -4
- package/src/components/ui/WysiwygEditor/index.js +4 -4
- package/src/components/ui/WysiwygEditor/renders/Button.vue +28 -28
- package/src/components/ui/WysiwygEditor/renders/ColorPicker.vue +41 -41
- package/src/components/ui/WysiwygEditor/renders/InputAuto.vue +34 -34
- package/src/components/ui/WysiwygEditor/renders/InputBrowse.vue +35 -35
- package/src/components/ui/WysiwygEditor/renders/InputUnits.vue +38 -38
- package/src/components/ui/WysiwygEditor/renders/Link.vue +87 -87
- package/src/components/ui/WysiwygEditor/renders/Select.vue +47 -47
- package/src/components/ui/WysiwygEditor/renders/ToolbarPopover.vue +49 -49
- package/src/components/ui/WysiwygEditor/renders/index.d.ts +8 -8
- package/src/components/ui/WysiwygEditor/renders/index.js +8 -8
- package/src/components/ui/WysiwygEditor/renders/mixins/RenderMixin.js +39 -39
- package/src/components/ui/WysiwygEditor/renders/mixins/index.js +1 -1
- package/src/components/ui/WysiwygEditor/tools-and-commands.js +704 -704
- package/src/components/ui/WysiwygEditor/utils.js +72 -72
- package/src/components/ui/WysiwygEditor.md +18 -18
- package/src/components/ui/WysiwygEditor.vue +271 -271
- package/src/components/ui/utils/FormComponent.js +107 -107
- package/src/components/ui/utils/Helpers.js +84 -84
- package/src/components/ui/utils/WithPopover.js +81 -99
- package/src/main.js +8 -8
- package/styleguide.config.js +37 -37
- package/vue.config.js +8 -8
- package/dist/js.png +0 -0
|
@@ -1,187 +1,187 @@
|
|
|
1
|
-
Simple example
|
|
2
|
-
|
|
3
|
-
```vue
|
|
4
|
-
<template>
|
|
5
|
-
<div
|
|
6
|
-
class="pad-l5"
|
|
7
|
-
:class="{ 'scroll-y': overflow }"
|
|
8
|
-
:style="{ 'max-height': overflow ? '200px' : 'none' }"
|
|
9
|
-
>
|
|
10
|
-
<p>
|
|
11
|
-
<label>
|
|
12
|
-
<input class="checkbox checkbox-small" type="checkbox" v-model="overflow" />
|
|
13
|
-
<span class="pad-left-2 v-mid">container overflow: auto</span>
|
|
14
|
-
</label>
|
|
15
|
-
</p>
|
|
16
|
-
<p>
|
|
17
|
-
<label>
|
|
18
|
-
<input
|
|
19
|
-
class="checkbox checkbox-small"
|
|
20
|
-
type="checkbox"
|
|
21
|
-
v-model="props.appendToBody"
|
|
22
|
-
/>
|
|
23
|
-
<span class="pad-left-2 v-mid">appendToBody</span>
|
|
24
|
-
</label>
|
|
25
|
-
</p>
|
|
26
|
-
<p>
|
|
27
|
-
<label>
|
|
28
|
-
<input class="checkbox checkbox-small" type="checkbox" v-model="props.multiple" />
|
|
29
|
-
<span class="pad-left-2 v-mid">multiple</span>
|
|
30
|
-
</label>
|
|
31
|
-
</p>
|
|
32
|
-
<ui-select class="w-6-12 p" v-model="model" v-bind="props"></ui-select>
|
|
33
|
-
<p>model: {{ model }}</p>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
<script>
|
|
37
|
-
import UiSelect from './Select.vue';
|
|
38
|
-
|
|
39
|
-
let options = [
|
|
40
|
-
'angular',
|
|
41
|
-
'aurelia',
|
|
42
|
-
'backbone',
|
|
43
|
-
'ember',
|
|
44
|
-
'meteor',
|
|
45
|
-
'react',
|
|
46
|
-
'riot',
|
|
47
|
-
'stencil',
|
|
48
|
-
'svelte',
|
|
49
|
-
'vue',
|
|
50
|
-
].map((label, i) => ({ value: i, label }));
|
|
51
|
-
|
|
52
|
-
export default {
|
|
53
|
-
components: { UiSelect },
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
model: null,
|
|
57
|
-
props: {
|
|
58
|
-
options: [{ value: null, label: 'nullish value' }, ...options],
|
|
59
|
-
placeholder: 'Select something',
|
|
60
|
-
appendToBody: false,
|
|
61
|
-
multiple: false,
|
|
62
|
-
},
|
|
63
|
-
overflow: false,
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
</script>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Advanced example. Using value object, multi selection, slots
|
|
71
|
-
|
|
72
|
-
```vue
|
|
73
|
-
<template>
|
|
74
|
-
<div class="pad-l5 ">
|
|
75
|
-
<ui-select class="p w-6-12" v-model="model" v-bind="props">
|
|
76
|
-
<template #icon-close>
|
|
77
|
-
<i class="mdi mdi-plus"></i>
|
|
78
|
-
</template>
|
|
79
|
-
<template #icon-open>
|
|
80
|
-
<i class="mdi mdi-minus"></i>
|
|
81
|
-
</template>
|
|
82
|
-
<template #label-multiple="{ option, value, label, deselectOption}">
|
|
83
|
-
<code class="cursor-pointer" @click.stop="deselectOption(option)">{{ label }}</code>
|
|
84
|
-
</template>
|
|
85
|
-
<template
|
|
86
|
-
#option="{ option, value, label, index, isSelected, cursorIndex, toggleOption }"
|
|
87
|
-
>
|
|
88
|
-
<li
|
|
89
|
-
:class="{
|
|
90
|
-
'text-bold': index == cursorIndex,
|
|
91
|
-
'bg-green': isSelected,
|
|
92
|
-
}"
|
|
93
|
-
:key="index"
|
|
94
|
-
@click="toggleOption(option)"
|
|
95
|
-
>
|
|
96
|
-
{{ label }}
|
|
97
|
-
</li>
|
|
98
|
-
</template>
|
|
99
|
-
</ui-select>
|
|
100
|
-
<p>model: {{ model }}</p>
|
|
101
|
-
</div>
|
|
102
|
-
</template>
|
|
103
|
-
<script>
|
|
104
|
-
import UiSelect from './Select.vue';
|
|
105
|
-
|
|
106
|
-
let options = [
|
|
107
|
-
'angular',
|
|
108
|
-
'aurelia',
|
|
109
|
-
'backbone',
|
|
110
|
-
'ember',
|
|
111
|
-
'meteor',
|
|
112
|
-
'react',
|
|
113
|
-
'riot',
|
|
114
|
-
'stencil',
|
|
115
|
-
'svelte',
|
|
116
|
-
'vue',
|
|
117
|
-
].map(value => ({ value, label: value }));
|
|
118
|
-
|
|
119
|
-
export default {
|
|
120
|
-
components: { UiSelect },
|
|
121
|
-
data() {
|
|
122
|
-
return {
|
|
123
|
-
model: [{ value: 'vue', label: 'vue' }],
|
|
124
|
-
props: {
|
|
125
|
-
options,
|
|
126
|
-
multiple: true,
|
|
127
|
-
valueObjects: true,
|
|
128
|
-
placeholder: 'Select something',
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
</script>
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Runtime options
|
|
137
|
-
|
|
138
|
-
```vue
|
|
139
|
-
<template>
|
|
140
|
-
<div class="pad-l5">
|
|
141
|
-
<ui-select class="w-6-12 p" v-model="model" v-bind="props"></ui-select>
|
|
142
|
-
<p>
|
|
143
|
-
<label>
|
|
144
|
-
<input class="checkbox checkbox-small" type="checkbox" v-model="props.multiple" />
|
|
145
|
-
<span class="pad-left-2 v-mid">multiple</span>
|
|
146
|
-
</label>
|
|
147
|
-
</p>
|
|
148
|
-
<p><div class="btn btn-primary" @click="toggleOptions">toggle options</div></p>
|
|
149
|
-
<p>model: {{ model }}</p>
|
|
150
|
-
</div>
|
|
151
|
-
</template>
|
|
152
|
-
<script>
|
|
153
|
-
import UiSelect from './Select.vue';
|
|
154
|
-
|
|
155
|
-
let options = [
|
|
156
|
-
'angular',
|
|
157
|
-
'aurelia',
|
|
158
|
-
'backbone',
|
|
159
|
-
'ember',
|
|
160
|
-
'meteor',
|
|
161
|
-
'react',
|
|
162
|
-
'riot',
|
|
163
|
-
'stencil',
|
|
164
|
-
'svelte',
|
|
165
|
-
'vue',
|
|
166
|
-
];
|
|
167
|
-
|
|
168
|
-
export default {
|
|
169
|
-
components: { UiSelect },
|
|
170
|
-
data() {
|
|
171
|
-
return {
|
|
172
|
-
model: 'vue',
|
|
173
|
-
props: {
|
|
174
|
-
options: [],
|
|
175
|
-
multiple: false,
|
|
176
|
-
},
|
|
177
|
-
overflow: false,
|
|
178
|
-
};
|
|
179
|
-
},
|
|
180
|
-
methods: {
|
|
181
|
-
toggleOptions() {
|
|
182
|
-
this.props.options = this.props.options.length ? [] : options;
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
</script>
|
|
187
|
-
```
|
|
1
|
+
Simple example
|
|
2
|
+
|
|
3
|
+
```vue
|
|
4
|
+
<template>
|
|
5
|
+
<div
|
|
6
|
+
class="pad-l5"
|
|
7
|
+
:class="{ 'scroll-y': overflow }"
|
|
8
|
+
:style="{ 'max-height': overflow ? '200px' : 'none' }"
|
|
9
|
+
>
|
|
10
|
+
<p>
|
|
11
|
+
<label>
|
|
12
|
+
<input class="checkbox checkbox-small" type="checkbox" v-model="overflow" />
|
|
13
|
+
<span class="pad-left-2 v-mid">container overflow: auto</span>
|
|
14
|
+
</label>
|
|
15
|
+
</p>
|
|
16
|
+
<p>
|
|
17
|
+
<label>
|
|
18
|
+
<input
|
|
19
|
+
class="checkbox checkbox-small"
|
|
20
|
+
type="checkbox"
|
|
21
|
+
v-model="props.appendToBody"
|
|
22
|
+
/>
|
|
23
|
+
<span class="pad-left-2 v-mid">appendToBody</span>
|
|
24
|
+
</label>
|
|
25
|
+
</p>
|
|
26
|
+
<p>
|
|
27
|
+
<label>
|
|
28
|
+
<input class="checkbox checkbox-small" type="checkbox" v-model="props.multiple" />
|
|
29
|
+
<span class="pad-left-2 v-mid">multiple</span>
|
|
30
|
+
</label>
|
|
31
|
+
</p>
|
|
32
|
+
<ui-select class="w-6-12 p" v-model="model" v-bind="props"></ui-select>
|
|
33
|
+
<p>model: {{ model }}</p>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<script>
|
|
37
|
+
import UiSelect from './Select.vue';
|
|
38
|
+
|
|
39
|
+
let options = [
|
|
40
|
+
'angular',
|
|
41
|
+
'aurelia',
|
|
42
|
+
'backbone',
|
|
43
|
+
'ember',
|
|
44
|
+
'meteor',
|
|
45
|
+
'react',
|
|
46
|
+
'riot',
|
|
47
|
+
'stencil',
|
|
48
|
+
'svelte',
|
|
49
|
+
'vue',
|
|
50
|
+
].map((label, i) => ({ value: i, label }));
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
components: { UiSelect },
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
model: null,
|
|
57
|
+
props: {
|
|
58
|
+
options: [{ value: null, label: 'nullish value' }, ...options],
|
|
59
|
+
placeholder: 'Select something',
|
|
60
|
+
appendToBody: false,
|
|
61
|
+
multiple: false,
|
|
62
|
+
},
|
|
63
|
+
overflow: false,
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Advanced example. Using value object, multi selection, slots
|
|
71
|
+
|
|
72
|
+
```vue
|
|
73
|
+
<template>
|
|
74
|
+
<div class="pad-l5 ">
|
|
75
|
+
<ui-select class="p w-6-12" v-model="model" v-bind="props">
|
|
76
|
+
<template #icon-close>
|
|
77
|
+
<i class="mdi mdi-plus"></i>
|
|
78
|
+
</template>
|
|
79
|
+
<template #icon-open>
|
|
80
|
+
<i class="mdi mdi-minus"></i>
|
|
81
|
+
</template>
|
|
82
|
+
<template #label-multiple="{ option, value, label, deselectOption}">
|
|
83
|
+
<code class="cursor-pointer" @click.stop="deselectOption(option)">{{ label }}</code>
|
|
84
|
+
</template>
|
|
85
|
+
<template
|
|
86
|
+
#option="{ option, value, label, index, isSelected, cursorIndex, toggleOption }"
|
|
87
|
+
>
|
|
88
|
+
<li
|
|
89
|
+
:class="{
|
|
90
|
+
'text-bold': index == cursorIndex,
|
|
91
|
+
'bg-green': isSelected,
|
|
92
|
+
}"
|
|
93
|
+
:key="index"
|
|
94
|
+
@click="toggleOption(option)"
|
|
95
|
+
>
|
|
96
|
+
{{ label }}
|
|
97
|
+
</li>
|
|
98
|
+
</template>
|
|
99
|
+
</ui-select>
|
|
100
|
+
<p>model: {{ model }}</p>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
103
|
+
<script>
|
|
104
|
+
import UiSelect from './Select.vue';
|
|
105
|
+
|
|
106
|
+
let options = [
|
|
107
|
+
'angular',
|
|
108
|
+
'aurelia',
|
|
109
|
+
'backbone',
|
|
110
|
+
'ember',
|
|
111
|
+
'meteor',
|
|
112
|
+
'react',
|
|
113
|
+
'riot',
|
|
114
|
+
'stencil',
|
|
115
|
+
'svelte',
|
|
116
|
+
'vue',
|
|
117
|
+
].map(value => ({ value, label: value }));
|
|
118
|
+
|
|
119
|
+
export default {
|
|
120
|
+
components: { UiSelect },
|
|
121
|
+
data() {
|
|
122
|
+
return {
|
|
123
|
+
model: [{ value: 'vue', label: 'vue' }],
|
|
124
|
+
props: {
|
|
125
|
+
options,
|
|
126
|
+
multiple: true,
|
|
127
|
+
valueObjects: true,
|
|
128
|
+
placeholder: 'Select something',
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
</script>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Runtime options
|
|
137
|
+
|
|
138
|
+
```vue
|
|
139
|
+
<template>
|
|
140
|
+
<div class="pad-l5">
|
|
141
|
+
<ui-select class="w-6-12 p" v-model="model" v-bind="props"></ui-select>
|
|
142
|
+
<p>
|
|
143
|
+
<label>
|
|
144
|
+
<input class="checkbox checkbox-small" type="checkbox" v-model="props.multiple" />
|
|
145
|
+
<span class="pad-left-2 v-mid">multiple</span>
|
|
146
|
+
</label>
|
|
147
|
+
</p>
|
|
148
|
+
<p><div class="btn btn-primary" @click="toggleOptions">toggle options</div></p>
|
|
149
|
+
<p>model: {{ model }}</p>
|
|
150
|
+
</div>
|
|
151
|
+
</template>
|
|
152
|
+
<script>
|
|
153
|
+
import UiSelect from './Select.vue';
|
|
154
|
+
|
|
155
|
+
let options = [
|
|
156
|
+
'angular',
|
|
157
|
+
'aurelia',
|
|
158
|
+
'backbone',
|
|
159
|
+
'ember',
|
|
160
|
+
'meteor',
|
|
161
|
+
'react',
|
|
162
|
+
'riot',
|
|
163
|
+
'stencil',
|
|
164
|
+
'svelte',
|
|
165
|
+
'vue',
|
|
166
|
+
];
|
|
167
|
+
|
|
168
|
+
export default {
|
|
169
|
+
components: { UiSelect },
|
|
170
|
+
data() {
|
|
171
|
+
return {
|
|
172
|
+
model: 'vue',
|
|
173
|
+
props: {
|
|
174
|
+
options: [],
|
|
175
|
+
multiple: false,
|
|
176
|
+
},
|
|
177
|
+
overflow: false,
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
methods: {
|
|
181
|
+
toggleOptions() {
|
|
182
|
+
this.props.options = this.props.options.length ? [] : options;
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
</script>
|
|
187
|
+
```
|