@zipify/wysiwyg 1.3.1 → 1.3.2
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/dist/wysiwyg.css +9 -9
- package/dist/wysiwyg.mjs +64 -3
- package/lib/components/base/dropdown/DropdownActivator.vue +6 -0
- package/lib/components/toolbar/controls/AlignmentControl.vue +1 -0
- package/lib/components/toolbar/controls/FontColorControl.vue +1 -0
- package/lib/components/toolbar/controls/ItalicControl.vue +1 -0
- package/lib/components/toolbar/controls/LineHeightControl.vue +1 -0
- package/lib/components/toolbar/controls/UnderlineControl.vue +1 -0
- package/lib/directives/__tests__/tooltip.test.js +22 -4
- package/lib/directives/tooltip.js +4 -1
- package/package.json +1 -1
package/dist/wysiwyg.css
CHANGED
|
@@ -460,21 +460,21 @@
|
|
|
460
460
|
font-size: var(--zw-font-size-xs);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
.zw-dropdown__activator[data-v-
|
|
463
|
+
.zw-dropdown__activator[data-v-0f1c87fd] {
|
|
464
464
|
width: 100%;
|
|
465
465
|
}
|
|
466
|
-
.zw-dropdown__activator-arrow[data-v-
|
|
466
|
+
.zw-dropdown__activator-arrow[data-v-0f1c87fd] {
|
|
467
467
|
margin-left: auto;
|
|
468
468
|
}
|
|
469
|
-
.zw-dropdown__activator--active .zw-dropdown__activator-arrow[data-v-
|
|
469
|
+
.zw-dropdown__activator--active .zw-dropdown__activator-arrow[data-v-0f1c87fd] {
|
|
470
470
|
transform: rotateX(180deg);
|
|
471
471
|
}
|
|
472
|
-
.zw-dropdown__activator--gray[data-v-
|
|
472
|
+
.zw-dropdown__activator--gray[data-v-0f1c87fd] {
|
|
473
473
|
background-color: rgb(var(--zw-color-n20));
|
|
474
474
|
font-size: var(--zw-font-size-xxs);
|
|
475
475
|
color: rgb(var(--zw-color-white));
|
|
476
476
|
}
|
|
477
|
-
.zw-dropdown__customized-indicator[data-v-
|
|
477
|
+
.zw-dropdown__customized-indicator[data-v-0f1c87fd] {
|
|
478
478
|
position: relative;
|
|
479
479
|
top: calc(0px - var(--zw-offset-xs));
|
|
480
480
|
}
|
|
@@ -571,17 +571,17 @@
|
|
|
571
571
|
flex-direction: column;
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
.zw-line-height-control__modal[data-v-
|
|
574
|
+
.zw-line-height-control__modal[data-v-c316d7dc] {
|
|
575
575
|
padding: var(--zw-offset-sm);
|
|
576
576
|
}
|
|
577
|
-
.zw-line-height-control__row[data-v-
|
|
577
|
+
.zw-line-height-control__row[data-v-c316d7dc] {
|
|
578
578
|
display: flex;
|
|
579
579
|
align-items: center;
|
|
580
580
|
}
|
|
581
|
-
.zw-line-height-control__range[data-v-
|
|
581
|
+
.zw-line-height-control__range[data-v-c316d7dc] {
|
|
582
582
|
width: 156px;
|
|
583
583
|
}
|
|
584
|
-
.zw-line-height-control__field[data-v-
|
|
584
|
+
.zw-line-height-control__field[data-v-c316d7dc] {
|
|
585
585
|
width: 64px;
|
|
586
586
|
margin-left: var(--zw-offset-sm);
|
|
587
587
|
}
|
package/dist/wysiwyg.mjs
CHANGED
|
@@ -19840,13 +19840,17 @@ const outClick = {
|
|
|
19840
19840
|
toggleListener(false, dataStorage.get(el).callback);
|
|
19841
19841
|
}
|
|
19842
19842
|
};
|
|
19843
|
-
function tooltip(el, { value }) {
|
|
19843
|
+
function tooltip(el, { value, modifiers: modifiers2 }) {
|
|
19844
19844
|
const options = typeof value === "string" ? { text: value } : value;
|
|
19845
19845
|
const { text: text2, hotkey } = options;
|
|
19846
19846
|
if (text2)
|
|
19847
19847
|
el.dataset.tooltip = text2;
|
|
19848
19848
|
if (text2 && hotkey)
|
|
19849
19849
|
el.dataset.tooltipHotkey = hotkey;
|
|
19850
|
+
if (modifiers2.xs)
|
|
19851
|
+
el.dataset.tooltipSize = "xs";
|
|
19852
|
+
if (modifiers2.lg)
|
|
19853
|
+
el.dataset.tooltipSize = "lg";
|
|
19850
19854
|
}
|
|
19851
19855
|
var render$y = function __render__11() {
|
|
19852
19856
|
var _vm = this;
|
|
@@ -20145,6 +20149,15 @@ var render$v = function __render__14() {
|
|
|
20145
20149
|
}, [_c("span", {
|
|
20146
20150
|
staticClass: "zw-dropdown__activator-title zw-text--truncate"
|
|
20147
20151
|
}, [_vm._v(" " + _vm._s(_vm.activeOptionTitle) + " ")]), _vm.isCustomized ? _c("Icon", {
|
|
20152
|
+
directives: [{
|
|
20153
|
+
name: "tooltip",
|
|
20154
|
+
rawName: "v-tooltip.xs",
|
|
20155
|
+
value: "Default parameter setting is changed",
|
|
20156
|
+
expression: "'Default parameter setting is changed'",
|
|
20157
|
+
modifiers: {
|
|
20158
|
+
"xs": true
|
|
20159
|
+
}
|
|
20160
|
+
}],
|
|
20148
20161
|
staticClass: "zw-dropdown__customized-indicator",
|
|
20149
20162
|
attrs: {
|
|
20150
20163
|
"name": "indicator",
|
|
@@ -20172,6 +20185,9 @@ const __vue2_script$v = {
|
|
|
20172
20185
|
Icon,
|
|
20173
20186
|
Button
|
|
20174
20187
|
},
|
|
20188
|
+
directives: {
|
|
20189
|
+
tooltip
|
|
20190
|
+
},
|
|
20175
20191
|
model: {
|
|
20176
20192
|
event: "change"
|
|
20177
20193
|
},
|
|
@@ -20211,7 +20227,7 @@ var __component__$v = /* @__PURE__ */ normalizeComponent(
|
|
|
20211
20227
|
staticRenderFns$v,
|
|
20212
20228
|
false,
|
|
20213
20229
|
__vue2_injectStyles$v,
|
|
20214
|
-
"
|
|
20230
|
+
"0f1c87fd",
|
|
20215
20231
|
null,
|
|
20216
20232
|
null
|
|
20217
20233
|
);
|
|
@@ -21162,6 +21178,15 @@ var render$k = function __render__25() {
|
|
|
21162
21178
|
"auto-color": ""
|
|
21163
21179
|
}
|
|
21164
21180
|
}), _vm.isCustomized ? _c("Icon", {
|
|
21181
|
+
directives: [{
|
|
21182
|
+
name: "tooltip",
|
|
21183
|
+
rawName: "v-tooltip.xs",
|
|
21184
|
+
value: "Default parameter setting is changed",
|
|
21185
|
+
expression: "'Default parameter setting is changed'",
|
|
21186
|
+
modifiers: {
|
|
21187
|
+
"xs": true
|
|
21188
|
+
}
|
|
21189
|
+
}],
|
|
21165
21190
|
staticClass: "zw-button__customized-indicator",
|
|
21166
21191
|
attrs: {
|
|
21167
21192
|
"name": "indicator",
|
|
@@ -21327,6 +21352,15 @@ var render$i = function __render__27() {
|
|
|
21327
21352
|
"auto-color": ""
|
|
21328
21353
|
}
|
|
21329
21354
|
}), _vm.isCustomized ? _c("Icon", {
|
|
21355
|
+
directives: [{
|
|
21356
|
+
name: "tooltip",
|
|
21357
|
+
rawName: "v-tooltip.xs",
|
|
21358
|
+
value: "Default parameter setting is changed",
|
|
21359
|
+
expression: "'Default parameter setting is changed'",
|
|
21360
|
+
modifiers: {
|
|
21361
|
+
"xs": true
|
|
21362
|
+
}
|
|
21363
|
+
}],
|
|
21330
21364
|
staticClass: "zw-button__customized-indicator",
|
|
21331
21365
|
attrs: {
|
|
21332
21366
|
"name": "indicator",
|
|
@@ -21408,6 +21442,15 @@ var render$h = function __render__28() {
|
|
|
21408
21442
|
"auto-color": ""
|
|
21409
21443
|
}
|
|
21410
21444
|
}), _vm.isCustomized ? _c("Icon", {
|
|
21445
|
+
directives: [{
|
|
21446
|
+
name: "tooltip",
|
|
21447
|
+
rawName: "v-tooltip.xs",
|
|
21448
|
+
value: "Default parameter setting is changed",
|
|
21449
|
+
expression: "'Default parameter setting is changed'",
|
|
21450
|
+
modifiers: {
|
|
21451
|
+
"xs": true
|
|
21452
|
+
}
|
|
21453
|
+
}],
|
|
21411
21454
|
staticClass: "zw-button__customized-indicator",
|
|
21412
21455
|
attrs: {
|
|
21413
21456
|
"name": "indicator",
|
|
@@ -21704,6 +21747,15 @@ var render$d = function __render__32() {
|
|
|
21704
21747
|
"click": activate
|
|
21705
21748
|
}
|
|
21706
21749
|
}, [_vm.isCustomized && isActive2 ? _c("Icon", {
|
|
21750
|
+
directives: [{
|
|
21751
|
+
name: "tooltip",
|
|
21752
|
+
rawName: "v-tooltip.xs",
|
|
21753
|
+
value: "Default parameter setting is changed",
|
|
21754
|
+
expression: "'Default parameter setting is changed'",
|
|
21755
|
+
modifiers: {
|
|
21756
|
+
"xs": true
|
|
21757
|
+
}
|
|
21758
|
+
}],
|
|
21707
21759
|
staticClass: "zw-button__customized-indicator",
|
|
21708
21760
|
attrs: {
|
|
21709
21761
|
"name": "indicator",
|
|
@@ -21902,6 +21954,15 @@ var render$b = function __render__34() {
|
|
|
21902
21954
|
"auto-color": ""
|
|
21903
21955
|
}
|
|
21904
21956
|
}), _vm.isCustomized ? _c("Icon", {
|
|
21957
|
+
directives: [{
|
|
21958
|
+
name: "tooltip",
|
|
21959
|
+
rawName: "v-tooltip.xs",
|
|
21960
|
+
value: "Default parameter setting is changed",
|
|
21961
|
+
expression: "'Default parameter setting is changed'",
|
|
21962
|
+
modifiers: {
|
|
21963
|
+
"xs": true
|
|
21964
|
+
}
|
|
21965
|
+
}],
|
|
21905
21966
|
staticClass: "zw-button__customized-indicator",
|
|
21906
21967
|
attrs: {
|
|
21907
21968
|
"name": "indicator",
|
|
@@ -21987,7 +22048,7 @@ var __component__$b = /* @__PURE__ */ normalizeComponent(
|
|
|
21987
22048
|
staticRenderFns$b,
|
|
21988
22049
|
false,
|
|
21989
22050
|
__vue2_injectStyles$b,
|
|
21990
|
-
"
|
|
22051
|
+
"c316d7dc",
|
|
21991
22052
|
null,
|
|
21992
22053
|
null
|
|
21993
22054
|
);
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
name="indicator"
|
|
19
19
|
size="9px"
|
|
20
20
|
data-test-selector="customizedIndicator"
|
|
21
|
+
v-tooltip.xs="'Default parameter setting is changed'"
|
|
21
22
|
/>
|
|
22
23
|
|
|
23
24
|
<Icon
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
import { computed, inject, toRef } from 'vue';
|
|
36
37
|
import Button from '../Button';
|
|
37
38
|
import Icon from '../Icon';
|
|
39
|
+
import { tooltip } from '../../../directives';
|
|
38
40
|
import { InjectionTokens } from './injectionTokens';
|
|
39
41
|
import { useDropdownEntityTitle } from './composables';
|
|
40
42
|
|
|
@@ -46,6 +48,10 @@ export default {
|
|
|
46
48
|
Button
|
|
47
49
|
},
|
|
48
50
|
|
|
51
|
+
directives: {
|
|
52
|
+
tooltip
|
|
53
|
+
},
|
|
54
|
+
|
|
49
55
|
model: {
|
|
50
56
|
event: 'change'
|
|
51
57
|
},
|
|
@@ -4,7 +4,7 @@ describe('rendering', () => {
|
|
|
4
4
|
test('should render text only tooltip', () => {
|
|
5
5
|
const el = document.createElement('div');
|
|
6
6
|
|
|
7
|
-
tooltip(el, { value: 'Test' });
|
|
7
|
+
tooltip(el, { value: 'Test', modifiers: {} });
|
|
8
8
|
|
|
9
9
|
expect(el.dataset.tooltip).toBe('Test');
|
|
10
10
|
});
|
|
@@ -13,7 +13,8 @@ describe('rendering', () => {
|
|
|
13
13
|
const el = document.createElement('div');
|
|
14
14
|
|
|
15
15
|
tooltip(el, {
|
|
16
|
-
value: { text: 'Test' }
|
|
16
|
+
value: { text: 'Test' },
|
|
17
|
+
modifiers: {}
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
expect(el.dataset.tooltip).toBe('Test');
|
|
@@ -23,7 +24,8 @@ describe('rendering', () => {
|
|
|
23
24
|
const el = document.createElement('div');
|
|
24
25
|
|
|
25
26
|
tooltip(el, {
|
|
26
|
-
value: { text: 'Test', hotkey: 'Mod B' }
|
|
27
|
+
value: { text: 'Test', hotkey: 'Mod B' },
|
|
28
|
+
modifiers: {}
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
expect(el.dataset.tooltipHotkey).toBe('Mod B');
|
|
@@ -32,8 +34,24 @@ describe('rendering', () => {
|
|
|
32
34
|
test('should not render tooltip if no value passed', () => {
|
|
33
35
|
const el = document.createElement('div');
|
|
34
36
|
|
|
35
|
-
tooltip(el, { value: '' });
|
|
37
|
+
tooltip(el, { value: '', modifiers: {} });
|
|
36
38
|
|
|
37
39
|
expect(el.dataset).not.toHaveProperty('tooltip');
|
|
38
40
|
});
|
|
41
|
+
|
|
42
|
+
test('should render xs size', () => {
|
|
43
|
+
const el = document.createElement('div');
|
|
44
|
+
|
|
45
|
+
tooltip(el, { value: '', modifiers: { xs: true } });
|
|
46
|
+
|
|
47
|
+
expect(el.dataset).toHaveProperty('tooltipSize', 'xs');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('should render lg size', () => {
|
|
51
|
+
const el = document.createElement('div');
|
|
52
|
+
|
|
53
|
+
tooltip(el, { value: '', modifiers: { lg: true } });
|
|
54
|
+
|
|
55
|
+
expect(el.dataset).toHaveProperty('tooltipSize', 'lg');
|
|
56
|
+
});
|
|
39
57
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
export function tooltip(el, { value }) {
|
|
1
|
+
export function tooltip(el, { value, modifiers }) {
|
|
2
2
|
const options = typeof value === 'string' ? { text: value } : value;
|
|
3
3
|
const { text, hotkey } = options;
|
|
4
4
|
|
|
5
5
|
if (text) el.dataset.tooltip = text;
|
|
6
6
|
if (text && hotkey) el.dataset.tooltipHotkey = hotkey;
|
|
7
|
+
|
|
8
|
+
if (modifiers.xs) el.dataset.tooltipSize = 'xs';
|
|
9
|
+
if (modifiers.lg) el.dataset.tooltipSize = 'lg';
|
|
7
10
|
}
|