wave-ui 2.26.0 → 2.27.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.
- package/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +401 -194
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +14 -14
- package/src/wave-ui/components/index.js +2 -1
- package/src/wave-ui/components/w-app.vue +42 -2
- package/src/wave-ui/components/w-card.vue +19 -5
- package/src/wave-ui/components/w-confirm.vue +103 -0
- package/src/wave-ui/components/w-icon.vue +1 -3
- package/src/wave-ui/components/w-menu.vue +90 -49
- package/src/wave-ui/components/w-notification-manager.vue +1 -1
- package/src/wave-ui/components/w-table.vue +41 -16
- package/src/wave-ui/components/w-tooltip.vue +11 -8
- package/src/wave-ui/scss/_mixins.scss +100 -0
- package/src/wave-ui/scss/_variables.scss +0 -9
- package/src/wave-ui/scss/index.scss +1 -0
- package/src/wave-ui/utils/index.js +11 -0
package/dist/wave-ui.es.js
CHANGED
|
@@ -4,8 +4,6 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
|
4
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __reflectGet = Reflect.get;
|
|
8
|
-
var __reflectSet = Reflect.set;
|
|
9
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
8
|
var __spreadValues = (a, b) => {
|
|
11
9
|
for (var prop in b || (b = {}))
|
|
@@ -35,7 +33,7 @@ var __publicField = (obj, key, value) => {
|
|
|
35
33
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
36
34
|
return value;
|
|
37
35
|
};
|
|
38
|
-
import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, createSlots, withDirectives, vModelText, vModelDynamic,
|
|
36
|
+
import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, createSlots, withDirectives, vModelText, vModelDynamic, resolveDirective, KeepAlive, vShow } from "vue";
|
|
39
37
|
const config = reactive({
|
|
40
38
|
breakpoints: {
|
|
41
39
|
xs: 600,
|
|
@@ -502,11 +500,11 @@ let WaveUI = _WaveUI;
|
|
|
502
500
|
__publicField(WaveUI, "instance", null);
|
|
503
501
|
__publicField(WaveUI, "vueInstance", null);
|
|
504
502
|
WaveUI.version = "__VERSION__";
|
|
505
|
-
const _hoisted_1$
|
|
506
|
-
const _hoisted_2$
|
|
507
|
-
const _hoisted_3$
|
|
508
|
-
const _hoisted_4$
|
|
509
|
-
function render$
|
|
503
|
+
const _hoisted_1$s = ["aria-expanded"];
|
|
504
|
+
const _hoisted_2$f = ["onClick", "onFocus", "onKeypress", "tabindex"];
|
|
505
|
+
const _hoisted_3$c = ["innerHTML"];
|
|
506
|
+
const _hoisted_4$b = ["innerHTML"];
|
|
507
|
+
function render$O(_ctx, _cache, $props, $setup, $data, $options) {
|
|
510
508
|
const _component_w_button = resolveComponent("w-button");
|
|
511
509
|
const _component_w_transition_expand = resolveComponent("w-transition-expand");
|
|
512
510
|
return openBlock(), createElementBlock("div", {
|
|
@@ -550,7 +548,7 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
550
548
|
createElementVNode("div", {
|
|
551
549
|
class: "grow",
|
|
552
550
|
innerHTML: item[$props.itemTitleKey]
|
|
553
|
-
}, null, 8, _hoisted_3$
|
|
551
|
+
}, null, 8, _hoisted_3$c)
|
|
554
552
|
]),
|
|
555
553
|
$props.expandIcon && $props.expandIconRight ? (openBlock(), createBlock(_component_w_button, {
|
|
556
554
|
key: 3,
|
|
@@ -561,7 +559,7 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
561
559
|
}, ["stop"])),
|
|
562
560
|
onClick: withModifiers(($event) => !item._disabled && $options.toggleItem(item, $event), ["stop"])
|
|
563
561
|
}, null, 8, ["icon", "onClick"])) : createCommentVNode("", true)
|
|
564
|
-
], 42, _hoisted_2$
|
|
562
|
+
], 42, _hoisted_2$f),
|
|
565
563
|
createVNode(_component_w_transition_expand, { y: "" }, {
|
|
566
564
|
default: withCtx(() => [
|
|
567
565
|
item._expanded ? (openBlock(), createElementBlock("div", {
|
|
@@ -581,13 +579,13 @@ function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
581
579
|
}, () => [
|
|
582
580
|
createElementVNode("div", {
|
|
583
581
|
innerHTML: item[$props.itemContentKey]
|
|
584
|
-
}, null, 8, _hoisted_4$
|
|
582
|
+
}, null, 8, _hoisted_4$b)
|
|
585
583
|
])
|
|
586
584
|
], 2)) : createCommentVNode("", true)
|
|
587
585
|
]),
|
|
588
586
|
_: 2
|
|
589
587
|
}, 1024)
|
|
590
|
-
], 10, _hoisted_1$
|
|
588
|
+
], 10, _hoisted_1$s);
|
|
591
589
|
}), 128))
|
|
592
590
|
], 2);
|
|
593
591
|
}
|
|
@@ -598,7 +596,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
598
596
|
}
|
|
599
597
|
return sfc;
|
|
600
598
|
};
|
|
601
|
-
const _sfc_main$
|
|
599
|
+
const _sfc_main$O = {
|
|
602
600
|
name: "w-accordion",
|
|
603
601
|
props: {
|
|
604
602
|
modelValue: { type: Array },
|
|
@@ -670,9 +668,9 @@ const _sfc_main$N = {
|
|
|
670
668
|
}
|
|
671
669
|
}
|
|
672
670
|
};
|
|
673
|
-
var wAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
674
|
-
const _hoisted_1$
|
|
675
|
-
function render$
|
|
671
|
+
var wAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", render$O]]);
|
|
672
|
+
const _hoisted_1$r = { class: "w-alert__content" };
|
|
673
|
+
function render$N(_ctx, _cache, $props, $setup, $data, $options) {
|
|
676
674
|
const _component_w_icon = resolveComponent("w-icon");
|
|
677
675
|
const _component_w_button = resolveComponent("w-button");
|
|
678
676
|
return $data.show ? (openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -689,7 +687,7 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
689
687
|
]),
|
|
690
688
|
_: 1
|
|
691
689
|
})) : createCommentVNode("", true),
|
|
692
|
-
createElementVNode("div", _hoisted_1$
|
|
690
|
+
createElementVNode("div", _hoisted_1$r, [
|
|
693
691
|
renderSlot(_ctx.$slots, "default")
|
|
694
692
|
]),
|
|
695
693
|
$props.dismiss ? (openBlock(), createBlock(_component_w_button, {
|
|
@@ -709,7 +707,7 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
709
707
|
], 16)) : createCommentVNode("", true);
|
|
710
708
|
}
|
|
711
709
|
var wAlert_vue_vue_type_style_index_0_lang = "";
|
|
712
|
-
const _sfc_main$
|
|
710
|
+
const _sfc_main$N = {
|
|
713
711
|
name: "w-alert",
|
|
714
712
|
props: {
|
|
715
713
|
modelValue: { default: true },
|
|
@@ -785,8 +783,8 @@ const _sfc_main$M = {
|
|
|
785
783
|
}
|
|
786
784
|
}
|
|
787
785
|
};
|
|
788
|
-
var wAlert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
789
|
-
function render$
|
|
786
|
+
var wAlert = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", render$N]]);
|
|
787
|
+
function render$M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
790
788
|
const _component_w_alert = resolveComponent("w-alert");
|
|
791
789
|
return openBlock(), createBlock(TransitionGroup, {
|
|
792
790
|
class: normalizeClass(["w-notification-manager", { "w-notification-manager--left": $options.conf.align === "left" }]),
|
|
@@ -817,7 +815,7 @@ function render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
817
815
|
}, 8, ["class", "name"]);
|
|
818
816
|
}
|
|
819
817
|
var wNotificationManager_vue_vue_type_style_index_0_lang = "";
|
|
820
|
-
const _sfc_main$
|
|
818
|
+
const _sfc_main$M = {
|
|
821
819
|
name: "w-notification-manager",
|
|
822
820
|
data: () => ({
|
|
823
821
|
notifManager: null
|
|
@@ -842,7 +840,7 @@ const _sfc_main$L = {
|
|
|
842
840
|
delete this.notifManager;
|
|
843
841
|
}
|
|
844
842
|
};
|
|
845
|
-
var NotificationManager = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
843
|
+
var NotificationManager = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", render$M]]);
|
|
846
844
|
const { css: cssConfig } = config;
|
|
847
845
|
const entries = Object.entries(config.breakpoints);
|
|
848
846
|
const breakpoints = entries.map(([label, max], i) => {
|
|
@@ -956,10 +954,10 @@ var DynamicCSS = () => {
|
|
|
956
954
|
styles += genBreakpointLayoutClasses();
|
|
957
955
|
return styles;
|
|
958
956
|
};
|
|
959
|
-
function render$
|
|
957
|
+
function render$L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
960
958
|
const _component_notification_manager = resolveComponent("notification-manager");
|
|
961
959
|
return openBlock(), createElementBlock("div", {
|
|
962
|
-
class: normalizeClass(["w-app",
|
|
960
|
+
class: normalizeClass(["w-app", $options.classes])
|
|
963
961
|
}, [
|
|
964
962
|
renderSlot(_ctx.$slots, "default"),
|
|
965
963
|
createVNode(_component_notification_manager)
|
|
@@ -968,17 +966,45 @@ function render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
968
966
|
var wApp_vue_vue_type_style_index_0_lang = "";
|
|
969
967
|
const breakpointsNames = Object.keys(config.breakpoints);
|
|
970
968
|
const breakpointsValues = Object.values(config.breakpoints);
|
|
971
|
-
const _sfc_main$
|
|
969
|
+
const _sfc_main$L = {
|
|
972
970
|
name: "w-app",
|
|
973
971
|
props: {
|
|
974
972
|
dark: { type: Boolean },
|
|
975
|
-
block: { type: Boolean }
|
|
973
|
+
block: { type: Boolean },
|
|
974
|
+
row: { type: Boolean },
|
|
975
|
+
alignCenter: { type: Boolean },
|
|
976
|
+
alignEnd: { type: Boolean },
|
|
977
|
+
justifyCenter: { type: Boolean },
|
|
978
|
+
justifyEnd: { type: Boolean },
|
|
979
|
+
justifySpaceBetween: { type: Boolean },
|
|
980
|
+
justifySpaceAround: { type: Boolean },
|
|
981
|
+
justifySpaceEvenly: { type: Boolean },
|
|
982
|
+
textCenter: { type: Boolean },
|
|
983
|
+
textRight: { type: Boolean }
|
|
976
984
|
},
|
|
977
985
|
components: { NotificationManager },
|
|
978
986
|
data: () => ({
|
|
979
987
|
currentBreakpoint: null,
|
|
980
988
|
notifManager: null
|
|
981
989
|
}),
|
|
990
|
+
computed: {
|
|
991
|
+
classes() {
|
|
992
|
+
return {
|
|
993
|
+
"d-block": this.block,
|
|
994
|
+
"row": this.row,
|
|
995
|
+
"align-center": this.alignCenter,
|
|
996
|
+
"align-end": this.alignEnd,
|
|
997
|
+
"justify-center": this.justifyCenter,
|
|
998
|
+
"justify-end": this.justifyEnd,
|
|
999
|
+
"justify-space-between": this.justifySpaceBetween,
|
|
1000
|
+
"justify-space-around": this.justifySpaceAround,
|
|
1001
|
+
"justify-space-evenly": this.justifySpaceEvenly,
|
|
1002
|
+
"text-center": this.textCenter,
|
|
1003
|
+
"text-right": this.textRight,
|
|
1004
|
+
"theme--dark": this.dark
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
982
1008
|
methods: {
|
|
983
1009
|
getBreakpoint() {
|
|
984
1010
|
const width = window.innerWidth;
|
|
@@ -1018,8 +1044,8 @@ const _sfc_main$K = {
|
|
|
1018
1044
|
window.removeEventListener("resize", this.getBreakpoint);
|
|
1019
1045
|
}
|
|
1020
1046
|
};
|
|
1021
|
-
var wApp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1022
|
-
function render$
|
|
1047
|
+
var wApp = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", render$L]]);
|
|
1048
|
+
function render$K(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1023
1049
|
return openBlock(), createElementBlock("div", mergeProps({ class: "w-badge-wrap" }, toHandlers(_ctx.$attrs)), [
|
|
1024
1050
|
renderSlot(_ctx.$slots, "default"),
|
|
1025
1051
|
createVNode(Transition, {
|
|
@@ -1045,7 +1071,7 @@ function render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1045
1071
|
], 16);
|
|
1046
1072
|
}
|
|
1047
1073
|
var wBadge_vue_vue_type_style_index_0_lang = "";
|
|
1048
|
-
const _sfc_main$
|
|
1074
|
+
const _sfc_main$K = {
|
|
1049
1075
|
name: "w-badge",
|
|
1050
1076
|
props: {
|
|
1051
1077
|
modelValue: { default: true },
|
|
@@ -1107,9 +1133,9 @@ const _sfc_main$J = {
|
|
|
1107
1133
|
}
|
|
1108
1134
|
}
|
|
1109
1135
|
};
|
|
1110
|
-
var wBadge = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1111
|
-
const _hoisted_1$
|
|
1112
|
-
function render$
|
|
1136
|
+
var wBadge = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", render$K]]);
|
|
1137
|
+
const _hoisted_1$q = ["innerHTML"];
|
|
1138
|
+
function render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1113
1139
|
const _component_w_icon = resolveComponent("w-icon");
|
|
1114
1140
|
return openBlock(), createElementBlock("div", {
|
|
1115
1141
|
class: normalizeClass(["w-breadcrumbs", $options.classes])
|
|
@@ -1160,13 +1186,13 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1160
1186
|
}) : (openBlock(), createElementBlock("span", {
|
|
1161
1187
|
key: `${i}f`,
|
|
1162
1188
|
innerHTML: item[$props.itemLabelKey]
|
|
1163
|
-
}, null, 8, _hoisted_1$
|
|
1189
|
+
}, null, 8, _hoisted_1$q))
|
|
1164
1190
|
], 64);
|
|
1165
1191
|
}), 256))
|
|
1166
1192
|
], 2);
|
|
1167
1193
|
}
|
|
1168
1194
|
var wBreadcrumbs_vue_vue_type_style_index_0_lang = "";
|
|
1169
|
-
const _sfc_main$
|
|
1195
|
+
const _sfc_main$J = {
|
|
1170
1196
|
name: "w-breadcrumbs",
|
|
1171
1197
|
props: {
|
|
1172
1198
|
items: { type: Array, required: true },
|
|
@@ -1197,12 +1223,12 @@ const _sfc_main$I = {
|
|
|
1197
1223
|
}
|
|
1198
1224
|
}
|
|
1199
1225
|
};
|
|
1200
|
-
var wBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1201
|
-
const _hoisted_1$
|
|
1226
|
+
var wBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", render$J]]);
|
|
1227
|
+
const _hoisted_1$p = {
|
|
1202
1228
|
key: 0,
|
|
1203
1229
|
class: "w-button__loader"
|
|
1204
1230
|
};
|
|
1205
|
-
const _hoisted_2$
|
|
1231
|
+
const _hoisted_2$e = /* @__PURE__ */ createElementVNode("svg", { viewBox: "0 0 40 40" }, [
|
|
1206
1232
|
/* @__PURE__ */ createElementVNode("circle", {
|
|
1207
1233
|
cx: "20",
|
|
1208
1234
|
cy: "20",
|
|
@@ -1213,7 +1239,7 @@ const _hoisted_2$d = /* @__PURE__ */ createElementVNode("svg", { viewBox: "0 0 4
|
|
|
1213
1239
|
"stroke-linecap": "round"
|
|
1214
1240
|
})
|
|
1215
1241
|
], -1);
|
|
1216
|
-
function render$
|
|
1242
|
+
function render$I(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1217
1243
|
const _component_w_icon = resolveComponent("w-icon");
|
|
1218
1244
|
return openBlock(), createBlock(resolveDynamicComponent($props.route ? "a" : "button"), mergeProps({
|
|
1219
1245
|
class: ["w-button", $options.classes],
|
|
@@ -1230,9 +1256,9 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1230
1256
|
})) : renderSlot(_ctx.$slots, "default", { key: 1 }),
|
|
1231
1257
|
createVNode(Transition, { name: "scale-fade" }, {
|
|
1232
1258
|
default: withCtx(() => [
|
|
1233
|
-
$props.loading ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1259
|
+
$props.loading ? (openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
1234
1260
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
1235
|
-
_hoisted_2$
|
|
1261
|
+
_hoisted_2$e
|
|
1236
1262
|
])
|
|
1237
1263
|
])) : createCommentVNode("", true)
|
|
1238
1264
|
]),
|
|
@@ -1243,7 +1269,7 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1243
1269
|
}, 16, ["type", "href", "class", "disabled", "style"]);
|
|
1244
1270
|
}
|
|
1245
1271
|
var wButton_vue_vue_type_style_index_0_lang = "";
|
|
1246
|
-
const _sfc_main$
|
|
1272
|
+
const _sfc_main$I = {
|
|
1247
1273
|
name: "w-button",
|
|
1248
1274
|
props: {
|
|
1249
1275
|
color: { type: String },
|
|
@@ -1335,7 +1361,106 @@ const _sfc_main$H = {
|
|
|
1335
1361
|
}
|
|
1336
1362
|
}
|
|
1337
1363
|
};
|
|
1338
|
-
var wButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1364
|
+
var wButton = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", render$I]]);
|
|
1365
|
+
const objectifyClasses = (classes = {}) => {
|
|
1366
|
+
if (typeof classes === "string")
|
|
1367
|
+
classes = { [classes]: true };
|
|
1368
|
+
else if (typeof classes === "array")
|
|
1369
|
+
classes = { [classes.join(" ")]: true };
|
|
1370
|
+
return classes;
|
|
1371
|
+
};
|
|
1372
|
+
const _hoisted_1$o = ["innerHTML"];
|
|
1373
|
+
function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1374
|
+
const _component_w_image = resolveComponent("w-image");
|
|
1375
|
+
return openBlock(), createElementBlock("div", {
|
|
1376
|
+
class: normalizeClass(["w-card", $options.classes]),
|
|
1377
|
+
style: normalizeStyle($options.styles)
|
|
1378
|
+
}, [
|
|
1379
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
|
1380
|
+
key: 0,
|
|
1381
|
+
class: normalizeClass(["w-card__title", __spreadValues({ "w-card__title--has-toolbar": $options.titleHasToolbar }, $options.titleClasses)])
|
|
1382
|
+
}, [
|
|
1383
|
+
renderSlot(_ctx.$slots, "title")
|
|
1384
|
+
], 2)) : $props.title ? (openBlock(), createElementBlock("div", {
|
|
1385
|
+
key: 1,
|
|
1386
|
+
class: normalizeClass(["w-card__title", $options.titleClasses]),
|
|
1387
|
+
innerHTML: $props.title
|
|
1388
|
+
}, null, 10, _hoisted_1$o)) : createCommentVNode("", true),
|
|
1389
|
+
$props.image ? (openBlock(), createBlock(_component_w_image, mergeProps({
|
|
1390
|
+
key: 2,
|
|
1391
|
+
class: "w-card__image",
|
|
1392
|
+
src: $props.image
|
|
1393
|
+
}, $options.imgProps), {
|
|
1394
|
+
default: withCtx(() => [
|
|
1395
|
+
renderSlot(_ctx.$slots, "image-content")
|
|
1396
|
+
]),
|
|
1397
|
+
_: 3
|
|
1398
|
+
}, 16, ["src"])) : createCommentVNode("", true),
|
|
1399
|
+
createElementVNode("div", {
|
|
1400
|
+
class: normalizeClass(["w-card__content", $options.contentClasses])
|
|
1401
|
+
}, [
|
|
1402
|
+
renderSlot(_ctx.$slots, "default")
|
|
1403
|
+
], 2),
|
|
1404
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", {
|
|
1405
|
+
key: 3,
|
|
1406
|
+
class: normalizeClass(["w-card__actions", { "w-card__actions--has-toolbar": $options.actionsHasToolbar }])
|
|
1407
|
+
}, [
|
|
1408
|
+
renderSlot(_ctx.$slots, "actions")
|
|
1409
|
+
], 2)) : createCommentVNode("", true)
|
|
1410
|
+
], 6);
|
|
1411
|
+
}
|
|
1412
|
+
var wCard_vue_vue_type_style_index_0_lang = "";
|
|
1413
|
+
const _sfc_main$H = {
|
|
1414
|
+
name: "w-card",
|
|
1415
|
+
props: {
|
|
1416
|
+
color: { type: String },
|
|
1417
|
+
bgColor: { type: String },
|
|
1418
|
+
shadow: { type: Boolean },
|
|
1419
|
+
noBorder: { type: Boolean },
|
|
1420
|
+
tile: { type: Boolean },
|
|
1421
|
+
title: { type: String },
|
|
1422
|
+
image: { type: String },
|
|
1423
|
+
imageProps: { type: Object },
|
|
1424
|
+
titleClass: { type: [String, Object, Array] },
|
|
1425
|
+
contentClass: { type: [String, Object, Array] }
|
|
1426
|
+
},
|
|
1427
|
+
emits: [],
|
|
1428
|
+
computed: {
|
|
1429
|
+
titleClasses() {
|
|
1430
|
+
return objectifyClasses(this.titleClass);
|
|
1431
|
+
},
|
|
1432
|
+
contentClasses() {
|
|
1433
|
+
return objectifyClasses(this.contentClass);
|
|
1434
|
+
},
|
|
1435
|
+
titleHasToolbar() {
|
|
1436
|
+
const { title } = this.$slots;
|
|
1437
|
+
return title && title().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1438
|
+
},
|
|
1439
|
+
actionsHasToolbar() {
|
|
1440
|
+
const { actions } = this.$slots;
|
|
1441
|
+
return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1442
|
+
},
|
|
1443
|
+
imgProps() {
|
|
1444
|
+
return __spreadValues({
|
|
1445
|
+
tag: "div",
|
|
1446
|
+
ratio: 1 / 2
|
|
1447
|
+
}, this.imageProps);
|
|
1448
|
+
},
|
|
1449
|
+
classes() {
|
|
1450
|
+
return {
|
|
1451
|
+
[this.color]: this.color,
|
|
1452
|
+
[`${this.bgColor}--bg`]: this.bgColor,
|
|
1453
|
+
"w-card--no-border": this.noBorder,
|
|
1454
|
+
"w-card--tile": this.tile,
|
|
1455
|
+
"w-card--shadow": this.shadow
|
|
1456
|
+
};
|
|
1457
|
+
},
|
|
1458
|
+
styles() {
|
|
1459
|
+
return false;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
};
|
|
1463
|
+
var wCard = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", render$H]]);
|
|
1339
1464
|
var FormElementMixin = {
|
|
1340
1465
|
inject: {
|
|
1341
1466
|
formRegister: { default: null },
|
|
@@ -1370,9 +1495,9 @@ var FormElementMixin = {
|
|
|
1370
1495
|
}
|
|
1371
1496
|
};
|
|
1372
1497
|
const _hoisted_1$n = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"];
|
|
1373
|
-
const _hoisted_2$
|
|
1374
|
-
const _hoisted_3$
|
|
1375
|
-
const _hoisted_4$
|
|
1498
|
+
const _hoisted_2$d = ["for"];
|
|
1499
|
+
const _hoisted_3$b = ["for", "innerHTML"];
|
|
1500
|
+
const _hoisted_4$a = /* @__PURE__ */ createElementVNode("svg", {
|
|
1376
1501
|
width: "11px",
|
|
1377
1502
|
height: "9px",
|
|
1378
1503
|
viewbox: "0 0 12 9"
|
|
@@ -1380,7 +1505,7 @@ const _hoisted_4$9 = /* @__PURE__ */ createElementVNode("svg", {
|
|
|
1380
1505
|
/* @__PURE__ */ createElementVNode("polyline", { points: "1 5 4 8 10 2" })
|
|
1381
1506
|
], -1);
|
|
1382
1507
|
const _hoisted_5$8 = [
|
|
1383
|
-
_hoisted_4$
|
|
1508
|
+
_hoisted_4$a
|
|
1384
1509
|
];
|
|
1385
1510
|
const _hoisted_6$5 = ["for"];
|
|
1386
1511
|
const _hoisted_7$5 = ["for", "innerHTML"];
|
|
@@ -1418,12 +1543,12 @@ function render$G(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1418
1543
|
for: `w-checkbox--${_ctx._.uid}`
|
|
1419
1544
|
}, [
|
|
1420
1545
|
renderSlot(_ctx.$slots, "default")
|
|
1421
|
-
], 8, _hoisted_2$
|
|
1546
|
+
], 8, _hoisted_2$d)) : $props.label ? (openBlock(), createElementBlock("label", {
|
|
1422
1547
|
key: 1,
|
|
1423
1548
|
class: "w-checkbox__label w-form-el-shakable pr2",
|
|
1424
1549
|
for: `w-checkbox--${_ctx._.uid}`,
|
|
1425
1550
|
innerHTML: $props.label
|
|
1426
|
-
}, null, 8, _hoisted_3$
|
|
1551
|
+
}, null, 8, _hoisted_3$b)) : createCommentVNode("", true)
|
|
1427
1552
|
], 64)) : createCommentVNode("", true),
|
|
1428
1553
|
createElementVNode("div", {
|
|
1429
1554
|
class: normalizeClass(["w-checkbox__input", this.color]),
|
|
@@ -1629,92 +1754,140 @@ const _sfc_main$F = {
|
|
|
1629
1754
|
}
|
|
1630
1755
|
};
|
|
1631
1756
|
var wCheckboxes = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", render$F]]);
|
|
1632
|
-
const _hoisted_1$l =
|
|
1757
|
+
const _hoisted_1$l = { class: "w-confirm" };
|
|
1758
|
+
const _hoisted_2$c = /* @__PURE__ */ createTextVNode("Are you sure?");
|
|
1759
|
+
const _hoisted_3$a = /* @__PURE__ */ createTextVNode("Cancel");
|
|
1760
|
+
const _hoisted_4$9 = /* @__PURE__ */ createTextVNode("Confirm");
|
|
1633
1761
|
function render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
key: 2,
|
|
1651
|
-
class: "w-card__image",
|
|
1652
|
-
src: $props.image
|
|
1653
|
-
}, $options.imgProps), {
|
|
1762
|
+
const _component_w_button = resolveComponent("w-button");
|
|
1763
|
+
const _component_w_flex = resolveComponent("w-flex");
|
|
1764
|
+
const _component_w_menu = resolveComponent("w-menu");
|
|
1765
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
1766
|
+
createVNode(_component_w_menu, mergeProps({
|
|
1767
|
+
modelValue: _ctx.showPopup,
|
|
1768
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event)
|
|
1769
|
+
}, $options.wMenuProps), {
|
|
1770
|
+
activator: withCtx(({ on }) => [
|
|
1771
|
+
createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, toHandlers(on), $options.buttonProps), {
|
|
1772
|
+
default: withCtx(() => [
|
|
1773
|
+
renderSlot(_ctx.$slots, "default")
|
|
1774
|
+
]),
|
|
1775
|
+
_: 2
|
|
1776
|
+
}, 1040)
|
|
1777
|
+
]),
|
|
1654
1778
|
default: withCtx(() => [
|
|
1655
|
-
|
|
1779
|
+
createVNode(_component_w_flex, {
|
|
1780
|
+
column: !$props.inline,
|
|
1781
|
+
"align-center": ""
|
|
1782
|
+
}, {
|
|
1783
|
+
default: withCtx(() => [
|
|
1784
|
+
createElementVNode("div", null, [
|
|
1785
|
+
renderSlot(_ctx.$slots, "question", {}, () => [
|
|
1786
|
+
_hoisted_2$c
|
|
1787
|
+
])
|
|
1788
|
+
]),
|
|
1789
|
+
createElementVNode("div", {
|
|
1790
|
+
class: normalizeClass(["w-flex justify-end", $props.inline ? "ml2" : "mt2"])
|
|
1791
|
+
}, [
|
|
1792
|
+
!$props.noCancel ? (openBlock(), createBlock(_component_w_button, mergeProps({
|
|
1793
|
+
key: 0,
|
|
1794
|
+
class: "mr2"
|
|
1795
|
+
}, $props.cancelButton, {
|
|
1796
|
+
"bg-color": ($props.cancelButton || {}).bgColor || "error",
|
|
1797
|
+
onClick: $options.onCancel
|
|
1798
|
+
}), {
|
|
1799
|
+
default: withCtx(() => [
|
|
1800
|
+
renderSlot(_ctx.$slots, "cancel", {}, () => [
|
|
1801
|
+
_hoisted_3$a
|
|
1802
|
+
])
|
|
1803
|
+
]),
|
|
1804
|
+
_: 3
|
|
1805
|
+
}, 16, ["bg-color", "onClick"])) : createCommentVNode("", true),
|
|
1806
|
+
createVNode(_component_w_button, mergeProps($props.confirmButton, {
|
|
1807
|
+
"bg-color": ($props.confirmButton || {}).bgColor || "success",
|
|
1808
|
+
onClick: $options.onConfirm
|
|
1809
|
+
}), {
|
|
1810
|
+
default: withCtx(() => [
|
|
1811
|
+
renderSlot(_ctx.$slots, "confirm", {}, () => [
|
|
1812
|
+
_hoisted_4$9
|
|
1813
|
+
])
|
|
1814
|
+
]),
|
|
1815
|
+
_: 3
|
|
1816
|
+
}, 16, ["bg-color", "onClick"])
|
|
1817
|
+
], 2)
|
|
1818
|
+
]),
|
|
1819
|
+
_: 3
|
|
1820
|
+
}, 8, ["column"])
|
|
1656
1821
|
]),
|
|
1657
1822
|
_: 3
|
|
1658
|
-
}, 16, ["
|
|
1659
|
-
|
|
1660
|
-
class: normalizeClass(["w-card__content", $props.contentClass || false])
|
|
1661
|
-
}, [
|
|
1662
|
-
renderSlot(_ctx.$slots, "default")
|
|
1663
|
-
], 2),
|
|
1664
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", {
|
|
1665
|
-
key: 3,
|
|
1666
|
-
class: normalizeClass(["w-card__actions", { "w-card__actions--has-toolbar": $options.actionsHasToolbar }])
|
|
1667
|
-
}, [
|
|
1668
|
-
renderSlot(_ctx.$slots, "actions")
|
|
1669
|
-
], 2)) : createCommentVNode("", true)
|
|
1670
|
-
], 6);
|
|
1823
|
+
}, 16, ["modelValue"])
|
|
1824
|
+
]);
|
|
1671
1825
|
}
|
|
1672
|
-
var wCard_vue_vue_type_style_index_0_lang = "";
|
|
1673
1826
|
const _sfc_main$E = {
|
|
1674
|
-
name: "w-
|
|
1827
|
+
name: "w-confirm",
|
|
1675
1828
|
props: {
|
|
1676
|
-
color: { type: String },
|
|
1677
1829
|
bgColor: { type: String },
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1830
|
+
color: { type: String },
|
|
1831
|
+
icon: { type: String },
|
|
1832
|
+
mainButton: { type: Object },
|
|
1833
|
+
noCancel: { type: Boolean },
|
|
1834
|
+
cancelButton: { type: [Boolean, Object] },
|
|
1835
|
+
confirmButton: { type: Object },
|
|
1836
|
+
inline: { type: Boolean },
|
|
1837
|
+
menu: { type: Object },
|
|
1838
|
+
noArrow: { type: Boolean },
|
|
1839
|
+
top: { type: Boolean },
|
|
1840
|
+
bottom: { type: Boolean },
|
|
1841
|
+
left: { type: Boolean },
|
|
1842
|
+
right: { type: Boolean },
|
|
1843
|
+
alignTop: { type: Boolean },
|
|
1844
|
+
alignBottom: { type: Boolean },
|
|
1845
|
+
alignLeft: { type: Boolean },
|
|
1846
|
+
alignRight: { type: Boolean },
|
|
1847
|
+
persistent: { type: Boolean },
|
|
1848
|
+
transition: { type: String }
|
|
1686
1849
|
},
|
|
1687
|
-
emits: [],
|
|
1850
|
+
emits: ["cancel", "confirm"],
|
|
1851
|
+
data: () => ({
|
|
1852
|
+
showPopup: false,
|
|
1853
|
+
props: []
|
|
1854
|
+
}),
|
|
1688
1855
|
computed: {
|
|
1689
|
-
|
|
1690
|
-
const { title } = this.$slots;
|
|
1691
|
-
return title && title().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1692
|
-
},
|
|
1693
|
-
actionsHasToolbar() {
|
|
1694
|
-
const { actions } = this.$slots;
|
|
1695
|
-
return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
|
|
1696
|
-
},
|
|
1697
|
-
imgProps() {
|
|
1856
|
+
wMenuProps() {
|
|
1698
1857
|
return __spreadValues({
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
};
|
|
1858
|
+
top: this.top,
|
|
1859
|
+
bottom: this.bottom,
|
|
1860
|
+
left: this.left,
|
|
1861
|
+
right: this.right,
|
|
1862
|
+
arrow: !this.noArrow,
|
|
1863
|
+
alignTop: this.alignTop,
|
|
1864
|
+
alignBottom: this.alignBottom,
|
|
1865
|
+
alignLeft: this.alignLeft,
|
|
1866
|
+
alignRight: this.alignRight,
|
|
1867
|
+
persistent: this.persistent,
|
|
1868
|
+
transition: this.transition
|
|
1869
|
+
}, this.menu);
|
|
1870
|
+
},
|
|
1871
|
+
buttonProps() {
|
|
1872
|
+
return __spreadValues({
|
|
1873
|
+
bgColor: this.bgColor,
|
|
1874
|
+
color: this.color,
|
|
1875
|
+
icon: this.icon
|
|
1876
|
+
}, this.mainButton);
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
methods: {
|
|
1880
|
+
onCancel() {
|
|
1881
|
+
this.$emit("cancel");
|
|
1882
|
+
this.showPopup = false;
|
|
1711
1883
|
},
|
|
1712
|
-
|
|
1713
|
-
|
|
1884
|
+
onConfirm() {
|
|
1885
|
+
this.$emit("confirm");
|
|
1886
|
+
this.showPopup = false;
|
|
1714
1887
|
}
|
|
1715
1888
|
}
|
|
1716
1889
|
};
|
|
1717
|
-
var
|
|
1890
|
+
var wConfirm = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", render$E]]);
|
|
1718
1891
|
function render$D(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1719
1892
|
return openBlock(), createElementBlock("div", {
|
|
1720
1893
|
class: normalizeClass(["w-date-picker", $options.classes]),
|
|
@@ -3330,18 +3503,18 @@ const _sfc_main$t = {
|
|
|
3330
3503
|
}
|
|
3331
3504
|
};
|
|
3332
3505
|
var wList = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", render$t]]);
|
|
3333
|
-
const _hoisted_1$g = {
|
|
3334
|
-
class: "w-menu-wrap",
|
|
3335
|
-
ref: "wrapper"
|
|
3336
|
-
};
|
|
3506
|
+
const _hoisted_1$g = { class: "w-menu-wrap" };
|
|
3337
3507
|
function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3338
3508
|
const _component_w_card = resolveComponent("w-card");
|
|
3339
3509
|
const _component_w_overlay = resolveComponent("w-overlay");
|
|
3340
3510
|
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
3341
3511
|
renderSlot(_ctx.$slots, "activator", { on: $options.activatorEventHandlers }),
|
|
3342
|
-
createVNode(Transition, {
|
|
3512
|
+
createVNode(Transition, {
|
|
3513
|
+
name: $options.transitionName,
|
|
3514
|
+
appear: ""
|
|
3515
|
+
}, {
|
|
3343
3516
|
default: withCtx(() => [
|
|
3344
|
-
$props.custom ?
|
|
3517
|
+
$props.custom && _ctx.menuVisible ? (openBlock(), createElementBlock("div", {
|
|
3345
3518
|
key: 0,
|
|
3346
3519
|
class: normalizeClass(["w-menu", $options.classes]),
|
|
3347
3520
|
ref: "menu",
|
|
@@ -3351,9 +3524,7 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3351
3524
|
style: normalizeStyle($options.styles)
|
|
3352
3525
|
}, [
|
|
3353
3526
|
renderSlot(_ctx.$slots, "default")
|
|
3354
|
-
], 38)),
|
|
3355
|
-
[vShow, _ctx.showMenu]
|
|
3356
|
-
]) : withDirectives((openBlock(), createBlock(_component_w_card, {
|
|
3527
|
+
], 38)) : _ctx.menuVisible ? (openBlock(), createBlock(_component_w_card, {
|
|
3357
3528
|
key: 1,
|
|
3358
3529
|
class: normalizeClass(["w-menu", $options.classes]),
|
|
3359
3530
|
ref: "menu",
|
|
@@ -3361,8 +3532,8 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3361
3532
|
onMouseenter: _cache[4] || (_cache[4] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
|
|
3362
3533
|
onMouseleave: _cache[5] || (_cache[5] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.closeMenu())),
|
|
3363
3534
|
tile: $props.tile,
|
|
3364
|
-
"title-class": $
|
|
3365
|
-
"content-class": $
|
|
3535
|
+
"title-class": $options.titleClasses,
|
|
3536
|
+
"content-class": $options.contentClasses,
|
|
3366
3537
|
shadow: $props.shadow,
|
|
3367
3538
|
"no-border": $props.noBorder,
|
|
3368
3539
|
style: normalizeStyle($options.styles)
|
|
@@ -3384,23 +3555,21 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3384
3555
|
renderSlot(_ctx.$slots, "actions")
|
|
3385
3556
|
])
|
|
3386
3557
|
} : void 0
|
|
3387
|
-
]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])),
|
|
3388
|
-
[vShow, _ctx.showMenu]
|
|
3389
|
-
])
|
|
3558
|
+
]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
|
|
3390
3559
|
]),
|
|
3391
3560
|
_: 3
|
|
3392
3561
|
}, 8, ["name"]),
|
|
3393
3562
|
$props.overlay ? (openBlock(), createBlock(_component_w_overlay, mergeProps({
|
|
3394
3563
|
key: 0,
|
|
3395
3564
|
ref: "overlay",
|
|
3396
|
-
"model-value": _ctx.
|
|
3565
|
+
"model-value": _ctx.menuVisible,
|
|
3397
3566
|
persistent: $props.persistent,
|
|
3398
|
-
class: $
|
|
3567
|
+
class: $options.overlayClasses
|
|
3399
3568
|
}, $props.overlayProps, {
|
|
3400
3569
|
"z-index": ($props.zIndex || 200) - 1,
|
|
3401
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.
|
|
3570
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.menuVisible = false)
|
|
3402
3571
|
}), null, 16, ["model-value", "persistent", "class", "z-index"])) : createCommentVNode("", true)
|
|
3403
|
-
]
|
|
3572
|
+
]);
|
|
3404
3573
|
}
|
|
3405
3574
|
var wMenu_vue_vue_type_style_index_0_lang = "";
|
|
3406
3575
|
const _sfc_main$s = {
|
|
@@ -3417,9 +3586,10 @@ const _sfc_main$s = {
|
|
|
3417
3586
|
round: { type: Boolean },
|
|
3418
3587
|
noBorder: { type: Boolean },
|
|
3419
3588
|
transition: { type: String },
|
|
3420
|
-
menuClass: { type: String },
|
|
3421
|
-
titleClass: { type: String },
|
|
3422
|
-
contentClass: { type: String },
|
|
3589
|
+
menuClass: { type: [String, Object, Array] },
|
|
3590
|
+
titleClass: { type: [String, Object, Array] },
|
|
3591
|
+
contentClass: { type: [String, Object, Array] },
|
|
3592
|
+
arrow: { type: Boolean },
|
|
3423
3593
|
detachTo: { type: [String, Boolean, Object] },
|
|
3424
3594
|
fixed: { type: Boolean },
|
|
3425
3595
|
top: { type: Boolean },
|
|
@@ -3433,14 +3603,14 @@ const _sfc_main$s = {
|
|
|
3433
3603
|
zIndex: { type: [Number, String, Boolean] },
|
|
3434
3604
|
minWidth: { type: [Number, String] },
|
|
3435
3605
|
overlay: { type: Boolean },
|
|
3436
|
-
overlayClass: { type: String },
|
|
3606
|
+
overlayClass: { type: [String, Object, Array] },
|
|
3437
3607
|
overlayProps: { type: Object },
|
|
3438
3608
|
persistent: { type: Boolean },
|
|
3439
3609
|
noPosition: { type: Boolean }
|
|
3440
3610
|
},
|
|
3441
3611
|
emits: ["input", "update:modelValue", "open", "close"],
|
|
3442
3612
|
data: () => ({
|
|
3443
|
-
|
|
3613
|
+
menuVisible: false,
|
|
3444
3614
|
hoveringActivator: false,
|
|
3445
3615
|
hoveringMenu: false,
|
|
3446
3616
|
menuCoordinates: {
|
|
@@ -3489,26 +3659,40 @@ const _sfc_main$s = {
|
|
|
3489
3659
|
alignment() {
|
|
3490
3660
|
return (this.top || this.bottom) && this.alignLeft && "left" || (this.top || this.bottom) && this.alignRight && "right" || (this.left || this.right) && this.alignTop && "top" || (this.left || this.right) && this.alignBottom && "bottom" || "";
|
|
3491
3661
|
},
|
|
3662
|
+
menuClasses() {
|
|
3663
|
+
return objectifyClasses(this.menuClass);
|
|
3664
|
+
},
|
|
3665
|
+
titleClasses() {
|
|
3666
|
+
return objectifyClasses(this.titleClass);
|
|
3667
|
+
},
|
|
3668
|
+
contentClasses() {
|
|
3669
|
+
return objectifyClasses(this.contentClass);
|
|
3670
|
+
},
|
|
3671
|
+
overlayClasses() {
|
|
3672
|
+
return objectifyClasses(this.overlayClass);
|
|
3673
|
+
},
|
|
3492
3674
|
classes() {
|
|
3493
|
-
return {
|
|
3675
|
+
return __spreadProps(__spreadValues({
|
|
3494
3676
|
[this.color]: this.color,
|
|
3495
|
-
[`${this.bgColor}--bg`]: this.bgColor
|
|
3496
|
-
|
|
3497
|
-
[`w-menu--${this.position}`]:
|
|
3498
|
-
[`w-menu--align-${this.alignment}`]: this.alignment,
|
|
3677
|
+
[`${this.bgColor}--bg`]: this.bgColor
|
|
3678
|
+
}, this.menuClasses), {
|
|
3679
|
+
[`w-menu--${this.position}`]: !this.noPosition,
|
|
3680
|
+
[`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
|
|
3499
3681
|
"w-menu--tile": this.tile,
|
|
3500
3682
|
"w-menu--card": !this.custom,
|
|
3501
3683
|
"w-menu--round": this.round,
|
|
3684
|
+
"w-menu--arrow": this.arrow,
|
|
3502
3685
|
"w-menu--shadow": this.shadow,
|
|
3503
3686
|
"w-menu--fixed": this.fixed
|
|
3504
|
-
};
|
|
3687
|
+
});
|
|
3505
3688
|
},
|
|
3506
3689
|
styles() {
|
|
3507
3690
|
return {
|
|
3508
3691
|
zIndex: this.zIndex || this.zIndex === 0 || this.overlay && !this.zIndex && 200 || null,
|
|
3509
3692
|
top: this.menuCoordinates.top && `${~~this.menuCoordinates.top}px` || null,
|
|
3510
3693
|
left: this.menuCoordinates.left && `${~~this.menuCoordinates.left}px` || null,
|
|
3511
|
-
minWidth: this.minWidth && this.menuMinWidth || null
|
|
3694
|
+
minWidth: this.minWidth && this.menuMinWidth || null,
|
|
3695
|
+
"--w-menu-bg-color": this.arrow && this.$waveui.colors[this.bgColor || "white"]
|
|
3512
3696
|
};
|
|
3513
3697
|
},
|
|
3514
3698
|
activatorEventHandlers() {
|
|
@@ -3538,7 +3722,7 @@ const _sfc_main$s = {
|
|
|
3538
3722
|
},
|
|
3539
3723
|
methods: {
|
|
3540
3724
|
toggleMenu(e) {
|
|
3541
|
-
let shouldShowMenu = this.
|
|
3725
|
+
let shouldShowMenu = this.menuVisible;
|
|
3542
3726
|
if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
|
|
3543
3727
|
shouldShowMenu = !shouldShowMenu;
|
|
3544
3728
|
} else if (e.type === "click" && !this.showOnHover)
|
|
@@ -3551,35 +3735,40 @@ const _sfc_main$s = {
|
|
|
3551
3735
|
shouldShowMenu = false;
|
|
3552
3736
|
}
|
|
3553
3737
|
this.timeoutId = clearTimeout(this.timeoutId);
|
|
3554
|
-
if (shouldShowMenu)
|
|
3738
|
+
if (shouldShowMenu) {
|
|
3739
|
+
this.$emit("update:modelValue", this.menuVisible = true);
|
|
3740
|
+
this.$emit("input", true);
|
|
3741
|
+
this.$emit("open");
|
|
3555
3742
|
this.openMenu(e);
|
|
3556
|
-
else
|
|
3743
|
+
} else
|
|
3557
3744
|
this.closeMenu();
|
|
3558
3745
|
},
|
|
3559
|
-
openMenu(e) {
|
|
3746
|
+
async openMenu(e) {
|
|
3747
|
+
this.menuVisible = true;
|
|
3748
|
+
await this.insertMenu();
|
|
3560
3749
|
if (this.minWidth === "activator")
|
|
3561
3750
|
this.activatorWidth = this.activatorEl.offsetWidth;
|
|
3562
3751
|
if (!this.noPosition)
|
|
3563
3752
|
this.computeMenuPosition(e);
|
|
3564
3753
|
this.timeoutId = setTimeout(() => {
|
|
3565
|
-
this.$emit("update:modelValue",
|
|
3754
|
+
this.$emit("update:modelValue", true);
|
|
3566
3755
|
this.$emit("input", true);
|
|
3567
3756
|
this.$emit("open");
|
|
3568
|
-
},
|
|
3757
|
+
}, 0);
|
|
3569
3758
|
if (!this.persistent)
|
|
3570
3759
|
document.addEventListener("mousedown", this.onOutsideMousedown);
|
|
3571
3760
|
if (!this.noPosition)
|
|
3572
3761
|
window.addEventListener("resize", this.onResize);
|
|
3573
3762
|
},
|
|
3574
3763
|
async closeMenu(force = false) {
|
|
3575
|
-
if (!this.
|
|
3764
|
+
if (!this.menuVisible)
|
|
3576
3765
|
return;
|
|
3577
3766
|
if (this.showOnHover && !force) {
|
|
3578
3767
|
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
3579
3768
|
if (this.showOnHover && (this.hoveringMenu || this.hoveringActivator))
|
|
3580
3769
|
return;
|
|
3581
3770
|
}
|
|
3582
|
-
this.$emit("update:modelValue", this.
|
|
3771
|
+
this.$emit("update:modelValue", this.menuVisible = false);
|
|
3583
3772
|
this.$emit("input", false);
|
|
3584
3773
|
this.$emit("close");
|
|
3585
3774
|
document.removeEventListener("mousedown", this.onOutsideMousedown);
|
|
@@ -3587,7 +3776,7 @@ const _sfc_main$s = {
|
|
|
3587
3776
|
},
|
|
3588
3777
|
onOutsideMousedown(e) {
|
|
3589
3778
|
if (!this.menuEl.contains(e.target) && !this.activatorEl.contains(e.target)) {
|
|
3590
|
-
this.$emit("update:modelValue", this.
|
|
3779
|
+
this.$emit("update:modelValue", this.menuVisible = false);
|
|
3591
3780
|
this.$emit("input", false);
|
|
3592
3781
|
this.$emit("close");
|
|
3593
3782
|
document.removeEventListener("mousedown", this.onOutsideMousedown);
|
|
@@ -3653,40 +3842,47 @@ const _sfc_main$s = {
|
|
|
3653
3842
|
}
|
|
3654
3843
|
}
|
|
3655
3844
|
this.menuEl.style.visibility = null;
|
|
3656
|
-
if (!this.
|
|
3845
|
+
if (!this.menuVisible)
|
|
3657
3846
|
this.menuEl.style.display = "none";
|
|
3658
3847
|
this.menuCoordinates = { top, left };
|
|
3659
3848
|
},
|
|
3660
3849
|
insertMenu() {
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3850
|
+
return new Promise((resolve) => {
|
|
3851
|
+
this.$nextTick(() => {
|
|
3852
|
+
var _a;
|
|
3853
|
+
this.menuEl = ((_a = this.$refs.menu) == null ? void 0 : _a.$el) || this.$refs.menu;
|
|
3854
|
+
this.detachToTarget.appendChild(this.menuEl);
|
|
3855
|
+
resolve();
|
|
3856
|
+
});
|
|
3857
|
+
});
|
|
3667
3858
|
},
|
|
3668
3859
|
removeMenu() {
|
|
3669
3860
|
if (this.menuEl && this.menuEl.parentNode)
|
|
3670
|
-
this.menuEl.
|
|
3861
|
+
this.menuEl.remove();
|
|
3671
3862
|
}
|
|
3672
3863
|
},
|
|
3673
3864
|
mounted() {
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
this.
|
|
3865
|
+
var _a;
|
|
3866
|
+
const wrapper = this.$el;
|
|
3867
|
+
this.activatorEl = wrapper.firstElementChild;
|
|
3868
|
+
wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
|
|
3869
|
+
if (this.overlay) {
|
|
3870
|
+
this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
|
|
3871
|
+
wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
|
|
3872
|
+
}
|
|
3677
3873
|
if (this.modelValue)
|
|
3678
3874
|
this.toggleMenu({ type: "click", target: this.activatorEl });
|
|
3679
3875
|
},
|
|
3680
3876
|
beforeUnmount() {
|
|
3681
3877
|
this.removeMenu();
|
|
3682
3878
|
if (this.overlay && this.overlayEl.parentNode)
|
|
3683
|
-
this.overlayEl.
|
|
3879
|
+
this.overlayEl.remove();
|
|
3684
3880
|
if (this.activatorEl && this.activatorEl.parentNode)
|
|
3685
|
-
this.activatorEl.
|
|
3881
|
+
this.activatorEl.remove();
|
|
3686
3882
|
},
|
|
3687
3883
|
watch: {
|
|
3688
3884
|
modelValue(bool) {
|
|
3689
|
-
if (!!bool !== this.
|
|
3885
|
+
if (!!bool !== this.menuVisible)
|
|
3690
3886
|
this.toggleMenu({ type: "click", target: this.activatorEl });
|
|
3691
3887
|
},
|
|
3692
3888
|
detachTo() {
|
|
@@ -5644,7 +5840,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5644
5840
|
return openBlock(), createElementBlock("th", {
|
|
5645
5841
|
class: normalizeClass(["w-table__header", $options.headerClasses(header)]),
|
|
5646
5842
|
key: i,
|
|
5647
|
-
onClick: ($event) => header.sortable !== false && $options.sortTable(header)
|
|
5843
|
+
onClick: ($event) => !_ctx.colResizing.dragging && header.sortable !== false && $options.sortTable(header)
|
|
5648
5844
|
}, [
|
|
5649
5845
|
header.sortable !== false && header.align === "right" ? (openBlock(), createBlock(_component_w_icon, {
|
|
5650
5846
|
key: 0,
|
|
@@ -5792,6 +5988,7 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5792
5988
|
], 2);
|
|
5793
5989
|
}
|
|
5794
5990
|
var wTable_vue_vue_type_style_index_0_lang = "";
|
|
5991
|
+
const minColumnWidth = 15;
|
|
5795
5992
|
const _sfc_main$d = {
|
|
5796
5993
|
name: "w-table",
|
|
5797
5994
|
props: {
|
|
@@ -5996,26 +6193,29 @@ const _sfc_main$d = {
|
|
|
5996
6193
|
const newNextColWidth = nextColWidth - deltaX;
|
|
5997
6194
|
columnEl.style.width = colWidth + deltaX + "px";
|
|
5998
6195
|
nextColumnEl.style.width = nextColWidth - deltaX + "px";
|
|
5999
|
-
const minWidthReached = deltaX < 0 && columnEl.offsetWidth > newColWidth;
|
|
6196
|
+
const minWidthReached = deltaX < 0 && columnEl.offsetWidth > newColWidth || columnEl.offsetWidth <= minColumnWidth;
|
|
6000
6197
|
const maxWidthReached = deltaX > 0 && nextColumnEl.offsetWidth > newNextColWidth;
|
|
6001
6198
|
if (minWidthReached) {
|
|
6002
|
-
|
|
6003
|
-
|
|
6199
|
+
const newWidth = Math.max(columnEl.offsetWidth, minColumnWidth);
|
|
6200
|
+
columnEl.style.width = newWidth + "px";
|
|
6201
|
+
nextColumnEl.style.width = maxWidth - newWidth + "px";
|
|
6004
6202
|
} else if (maxWidthReached) {
|
|
6005
6203
|
columnEl.style.width = maxWidth - nextColumnEl.offsetWidth + "px";
|
|
6006
6204
|
nextColumnEl.style.width = nextColumnEl.offsetWidth + "px";
|
|
6007
6205
|
}
|
|
6008
6206
|
},
|
|
6009
|
-
onResizerMouseUp(
|
|
6207
|
+
onResizerMouseUp() {
|
|
6010
6208
|
document.removeEventListener("mousemove", this.onResizerMouseMove);
|
|
6011
6209
|
document.removeEventListener("mouseup", this.onResizerMouseUp);
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6210
|
+
setTimeout(() => {
|
|
6211
|
+
this.colResizing.dragging = false;
|
|
6212
|
+
this.colResizing.columnIndex = null;
|
|
6213
|
+
this.colResizing.startCursorX = null;
|
|
6214
|
+
this.colResizing.columnEl = null;
|
|
6215
|
+
this.colResizing.nextColumnEl = null;
|
|
6216
|
+
this.colResizing.colWidth = null;
|
|
6217
|
+
this.colResizing.nextColWidth = null;
|
|
6218
|
+
}, 0);
|
|
6019
6219
|
}
|
|
6020
6220
|
},
|
|
6021
6221
|
created() {
|
|
@@ -6492,7 +6692,10 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6492
6692
|
ref: "wrapper"
|
|
6493
6693
|
}, [
|
|
6494
6694
|
renderSlot(_ctx.$slots, "activator", { on: $options.eventHandlers }),
|
|
6495
|
-
createVNode(Transition, {
|
|
6695
|
+
createVNode(Transition, {
|
|
6696
|
+
name: $options.transitionName,
|
|
6697
|
+
appear: ""
|
|
6698
|
+
}, {
|
|
6496
6699
|
default: withCtx(() => [
|
|
6497
6700
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
6498
6701
|
class: normalizeClass(["w-tooltip", $options.classes]),
|
|
@@ -6527,8 +6730,8 @@ const _sfc_main$8 = {
|
|
|
6527
6730
|
shadow: { type: Boolean },
|
|
6528
6731
|
tile: { type: Boolean },
|
|
6529
6732
|
round: { type: Boolean },
|
|
6530
|
-
transition: { type: String
|
|
6531
|
-
tooltipClass: { type: String },
|
|
6733
|
+
transition: { type: String },
|
|
6734
|
+
tooltipClass: { type: [String, Object, Array] },
|
|
6532
6735
|
detachTo: {},
|
|
6533
6736
|
fixed: { type: Boolean },
|
|
6534
6737
|
top: { type: Boolean },
|
|
@@ -6551,6 +6754,9 @@ const _sfc_main$8 = {
|
|
|
6551
6754
|
timeoutId: null
|
|
6552
6755
|
}),
|
|
6553
6756
|
computed: {
|
|
6757
|
+
tooltipClasses() {
|
|
6758
|
+
return objectifyClasses(this.tooltipClass);
|
|
6759
|
+
},
|
|
6554
6760
|
transitionName() {
|
|
6555
6761
|
const direction = this.position.replace(/top|bottom/, (m) => ({ top: "up", bottom: "down" })[m]);
|
|
6556
6762
|
return this.transition || `w-tooltip-slide-fade-${direction}`;
|
|
@@ -6607,10 +6813,10 @@ const _sfc_main$8 = {
|
|
|
6607
6813
|
return coords;
|
|
6608
6814
|
},
|
|
6609
6815
|
classes() {
|
|
6610
|
-
return {
|
|
6816
|
+
return __spreadProps(__spreadValues({
|
|
6611
6817
|
[this.color]: !this.bgColor,
|
|
6612
|
-
[`${this.bgColor} ${this.bgColor}--bg`]: this.bgColor
|
|
6613
|
-
|
|
6818
|
+
[`${this.bgColor} ${this.bgColor}--bg`]: this.bgColor
|
|
6819
|
+
}, this.tooltipClasses), {
|
|
6614
6820
|
[`w-tooltip--${this.position}`]: true,
|
|
6615
6821
|
"w-tooltip--tile": this.tile,
|
|
6616
6822
|
"w-tooltip--round": this.round,
|
|
@@ -6619,7 +6825,7 @@ const _sfc_main$8 = {
|
|
|
6619
6825
|
"w-tooltip--active": this.showTooltip,
|
|
6620
6826
|
"w-tooltip--no-border": this.noBorder || this.bgColor,
|
|
6621
6827
|
"w-tooltip--custom-transition": this.transition
|
|
6622
|
-
};
|
|
6828
|
+
});
|
|
6623
6829
|
},
|
|
6624
6830
|
styles() {
|
|
6625
6831
|
return {
|
|
@@ -6718,7 +6924,7 @@ const _sfc_main$8 = {
|
|
|
6718
6924
|
},
|
|
6719
6925
|
removeTooltip() {
|
|
6720
6926
|
if (this.tooltipEl && this.tooltipEl.parentNode)
|
|
6721
|
-
this.tooltipEl.
|
|
6927
|
+
this.tooltipEl.remove();
|
|
6722
6928
|
}
|
|
6723
6929
|
},
|
|
6724
6930
|
mounted() {
|
|
@@ -6731,7 +6937,7 @@ const _sfc_main$8 = {
|
|
|
6731
6937
|
beforeUnmount() {
|
|
6732
6938
|
this.removeTooltip();
|
|
6733
6939
|
if (this.activatorEl && this.activatorEl.parentNode)
|
|
6734
|
-
this.activatorEl.
|
|
6940
|
+
this.activatorEl.remove();
|
|
6735
6941
|
},
|
|
6736
6942
|
watch: {
|
|
6737
6943
|
modelValue(bool) {
|
|
@@ -7082,9 +7288,10 @@ var components = /* @__PURE__ */ Object.freeze({
|
|
|
7082
7288
|
WBadge: wBadge,
|
|
7083
7289
|
WBreadcrumbs: wBreadcrumbs,
|
|
7084
7290
|
WButton: wButton,
|
|
7291
|
+
WCard: wCard,
|
|
7085
7292
|
WCheckbox: wCheckbox,
|
|
7086
7293
|
WCheckboxes: wCheckboxes,
|
|
7087
|
-
|
|
7294
|
+
WConfirm: wConfirm,
|
|
7088
7295
|
WDatePicker: wDatePicker,
|
|
7089
7296
|
WDialog: wDialog,
|
|
7090
7297
|
WDivider: wDivider,
|