wave-ui 1.42.1 → 1.44.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.
@@ -533,7 +533,7 @@ _notificationManager = new WeakMap();
533
533
  __publicField(WaveUI, "instance", null);
534
534
  __publicField(WaveUI, "vueInstance", null);
535
535
  WaveUI.version = "__VERSION__";
536
- var render$N = function() {
536
+ var render$O = function() {
537
537
  var _vm = this;
538
538
  var _h = _vm.$createElement;
539
539
  var _c = _vm._self._c || _h;
@@ -564,7 +564,7 @@ var render$N = function() {
564
564
  }, { "item": _vm.getOriginalItem(item), "expanded": item._expanded, "index": i + 1 })], 2) : _vm._e()])], 1);
565
565
  }), 0);
566
566
  };
567
- var staticRenderFns$N = [];
567
+ var staticRenderFns$O = [];
568
568
  var wAccordion_vue_vue_type_style_index_0_lang = "";
569
569
  function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
570
570
  var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
@@ -617,7 +617,7 @@ function normalizeComponent(scriptExports, render2, staticRenderFns2, functional
617
617
  options
618
618
  };
619
619
  }
620
- const __vue2_script$N = {
620
+ const __vue2_script$O = {
621
621
  name: "w-accordion",
622
622
  props: {
623
623
  value: { type: Array },
@@ -689,17 +689,17 @@ const __vue2_script$N = {
689
689
  }
690
690
  }
691
691
  };
692
- const __cssModules$N = {};
693
- var __component__$N = /* @__PURE__ */ normalizeComponent(__vue2_script$N, render$N, staticRenderFns$N, false, __vue2_injectStyles$N, null, null, null);
694
- function __vue2_injectStyles$N(context) {
695
- for (let o in __cssModules$N) {
696
- this[o] = __cssModules$N[o];
692
+ const __cssModules$O = {};
693
+ var __component__$O = /* @__PURE__ */ normalizeComponent(__vue2_script$O, render$O, staticRenderFns$O, false, __vue2_injectStyles$O, null, null, null);
694
+ function __vue2_injectStyles$O(context) {
695
+ for (let o in __cssModules$O) {
696
+ this[o] = __cssModules$O[o];
697
697
  }
698
698
  }
699
699
  var wAccordion = /* @__PURE__ */ function() {
700
- return __component__$N.exports;
700
+ return __component__$O.exports;
701
701
  }();
702
- var render$M = function() {
702
+ var render$N = function() {
703
703
  var _vm = this;
704
704
  var _h = _vm.$createElement;
705
705
  var _c = _vm._self._c || _h;
@@ -709,9 +709,9 @@ var render$M = function() {
709
709
  _vm.$emit("close", false);
710
710
  } } }) : _vm._e()] : _vm._t("default")], 2) : _vm._e();
711
711
  };
712
- var staticRenderFns$M = [];
712
+ var staticRenderFns$N = [];
713
713
  var wAlert_vue_vue_type_style_index_0_lang = "";
714
- const __vue2_script$M = {
714
+ const __vue2_script$N = {
715
715
  name: "w-alert",
716
716
  props: {
717
717
  value: { default: true },
@@ -787,17 +787,17 @@ const __vue2_script$M = {
787
787
  }
788
788
  }
789
789
  };
790
- const __cssModules$M = {};
791
- var __component__$M = /* @__PURE__ */ normalizeComponent(__vue2_script$M, render$M, staticRenderFns$M, false, __vue2_injectStyles$M, null, null, null);
792
- function __vue2_injectStyles$M(context) {
793
- for (let o in __cssModules$M) {
794
- this[o] = __cssModules$M[o];
790
+ const __cssModules$N = {};
791
+ var __component__$N = /* @__PURE__ */ normalizeComponent(__vue2_script$N, render$N, staticRenderFns$N, false, __vue2_injectStyles$N, null, null, null);
792
+ function __vue2_injectStyles$N(context) {
793
+ for (let o in __cssModules$N) {
794
+ this[o] = __cssModules$N[o];
795
795
  }
796
796
  }
797
797
  var wAlert = /* @__PURE__ */ function() {
798
- return __component__$M.exports;
798
+ return __component__$N.exports;
799
799
  }();
800
- var render$L = function() {
800
+ var render$M = function() {
801
801
  var _vm = this;
802
802
  var _h = _vm.$createElement;
803
803
  var _c = _vm._self._c || _h;
@@ -809,9 +809,9 @@ var render$L = function() {
809
809
  }, expression: "notif._value" } }, "w-alert", notif, false), [_vm._v(_vm._s(notif.message))]) : _vm._e()];
810
810
  })], 2);
811
811
  };
812
- var staticRenderFns$L = [];
812
+ var staticRenderFns$M = [];
813
813
  var wNotificationManager_vue_vue_type_style_index_0_lang = "";
814
- const __vue2_script$L = {
814
+ const __vue2_script$M = {
815
815
  name: "w-notification-manager",
816
816
  data: () => ({
817
817
  notifManager: null
@@ -836,15 +836,15 @@ const __vue2_script$L = {
836
836
  delete this.notifManager;
837
837
  }
838
838
  };
839
- const __cssModules$L = {};
840
- var __component__$L = /* @__PURE__ */ normalizeComponent(__vue2_script$L, render$L, staticRenderFns$L, false, __vue2_injectStyles$L, null, null, null);
841
- function __vue2_injectStyles$L(context) {
842
- for (let o in __cssModules$L) {
843
- this[o] = __cssModules$L[o];
839
+ const __cssModules$M = {};
840
+ var __component__$M = /* @__PURE__ */ normalizeComponent(__vue2_script$M, render$M, staticRenderFns$M, false, __vue2_injectStyles$M, null, null, null);
841
+ function __vue2_injectStyles$M(context) {
842
+ for (let o in __cssModules$M) {
843
+ this[o] = __cssModules$M[o];
844
844
  }
845
845
  }
846
846
  var NotificationManager = /* @__PURE__ */ function() {
847
- return __component__$L.exports;
847
+ return __component__$M.exports;
848
848
  }();
849
849
  const { css: cssConfig } = config;
850
850
  const entries = Object.entries(config.breakpoints);
@@ -959,27 +959,55 @@ var DynamicCSS = () => {
959
959
  styles += genBreakpointLayoutClasses();
960
960
  return styles;
961
961
  };
962
- var render$K = function() {
962
+ var render$L = function() {
963
963
  var _vm = this;
964
964
  var _h = _vm.$createElement;
965
965
  var _c = _vm._self._c || _h;
966
- return _c("div", { staticClass: "w-app", class: { "theme--dark": _vm.dark, "d-block": _vm.block } }, [_vm._t("default"), _c("notification-manager")], 2);
966
+ return _c("div", { staticClass: "w-app", class: _vm.classes }, [_vm._t("default"), _c("notification-manager")], 2);
967
967
  };
968
- var staticRenderFns$K = [];
968
+ var staticRenderFns$L = [];
969
969
  var wApp_vue_vue_type_style_index_0_lang = "";
970
970
  const breakpointsNames = Object.keys(config.breakpoints);
971
971
  const breakpointsValues = Object.values(config.breakpoints);
972
- const __vue2_script$K = {
972
+ const __vue2_script$L = {
973
973
  name: "w-app",
974
974
  props: {
975
975
  dark: { type: Boolean },
976
- block: { type: Boolean }
976
+ block: { type: Boolean },
977
+ row: { type: Boolean },
978
+ alignCenter: { type: Boolean },
979
+ alignEnd: { type: Boolean },
980
+ justifyCenter: { type: Boolean },
981
+ justifyEnd: { type: Boolean },
982
+ justifySpaceBetween: { type: Boolean },
983
+ justifySpaceAround: { type: Boolean },
984
+ justifySpaceEvenly: { type: Boolean },
985
+ textCenter: { type: Boolean },
986
+ textRight: { type: Boolean }
977
987
  },
978
988
  components: { NotificationManager },
979
989
  data: () => ({
980
990
  currentBreakpoint: null,
981
991
  notifManager: null
982
992
  }),
993
+ computed: {
994
+ classes() {
995
+ return {
996
+ "d-block": this.block,
997
+ "row": this.row,
998
+ "align-center": this.alignCenter,
999
+ "align-end": this.alignEnd,
1000
+ "justify-center": this.justifyCenter,
1001
+ "justify-end": this.justifyEnd,
1002
+ "justify-space-between": this.justifySpaceBetween,
1003
+ "justify-space-around": this.justifySpaceAround,
1004
+ "justify-space-evenly": this.justifySpaceEvenly,
1005
+ "text-center": this.textCenter,
1006
+ "text-right": this.textRight,
1007
+ "theme--dark": this.dark
1008
+ };
1009
+ }
1010
+ },
983
1011
  methods: {
984
1012
  getBreakpoint() {
985
1013
  const width = window.innerWidth;
@@ -1019,17 +1047,17 @@ const __vue2_script$K = {
1019
1047
  window.removeEventListener("resize", this.getBreakpoint);
1020
1048
  }
1021
1049
  };
1022
- const __cssModules$K = {};
1023
- var __component__$K = /* @__PURE__ */ normalizeComponent(__vue2_script$K, render$K, staticRenderFns$K, false, __vue2_injectStyles$K, null, null, null);
1024
- function __vue2_injectStyles$K(context) {
1025
- for (let o in __cssModules$K) {
1026
- this[o] = __cssModules$K[o];
1050
+ const __cssModules$L = {};
1051
+ var __component__$L = /* @__PURE__ */ normalizeComponent(__vue2_script$L, render$L, staticRenderFns$L, false, __vue2_injectStyles$L, null, null, null);
1052
+ function __vue2_injectStyles$L(context) {
1053
+ for (let o in __cssModules$L) {
1054
+ this[o] = __cssModules$L[o];
1027
1055
  }
1028
1056
  }
1029
1057
  var wApp = /* @__PURE__ */ function() {
1030
- return __component__$K.exports;
1058
+ return __component__$L.exports;
1031
1059
  }();
1032
- var render$J = function() {
1060
+ var render$K = function() {
1033
1061
  var _vm = this;
1034
1062
  var _h = _vm.$createElement;
1035
1063
  var _c = _vm._self._c || _h;
@@ -1037,9 +1065,9 @@ var render$J = function() {
1037
1065
  return [_vm._v(_vm._s(_vm.value === true ? "" : _vm.value || ""))];
1038
1066
  }) : _vm._e()], 2) : _vm._e()])], 2);
1039
1067
  };
1040
- var staticRenderFns$J = [];
1068
+ var staticRenderFns$K = [];
1041
1069
  var wBadge_vue_vue_type_style_index_0_lang = "";
1042
- const __vue2_script$J = {
1070
+ const __vue2_script$K = {
1043
1071
  name: "w-badge",
1044
1072
  props: {
1045
1073
  value: { default: true },
@@ -1101,17 +1129,17 @@ const __vue2_script$J = {
1101
1129
  }
1102
1130
  }
1103
1131
  };
1104
- const __cssModules$J = {};
1105
- var __component__$J = /* @__PURE__ */ normalizeComponent(__vue2_script$J, render$J, staticRenderFns$J, false, __vue2_injectStyles$J, null, null, null);
1106
- function __vue2_injectStyles$J(context) {
1107
- for (let o in __cssModules$J) {
1108
- this[o] = __cssModules$J[o];
1132
+ const __cssModules$K = {};
1133
+ var __component__$K = /* @__PURE__ */ normalizeComponent(__vue2_script$K, render$K, staticRenderFns$K, false, __vue2_injectStyles$K, null, null, null);
1134
+ function __vue2_injectStyles$K(context) {
1135
+ for (let o in __cssModules$K) {
1136
+ this[o] = __cssModules$K[o];
1109
1137
  }
1110
1138
  }
1111
1139
  var wBadge = /* @__PURE__ */ function() {
1112
- return __component__$J.exports;
1140
+ return __component__$K.exports;
1113
1141
  }();
1114
- var render$I = function() {
1142
+ var render$J = function() {
1115
1143
  var _vm = this;
1116
1144
  var _h = _vm.$createElement;
1117
1145
  var _c = _vm._self._c || _h;
@@ -1119,9 +1147,9 @@ var render$I = function() {
1119
1147
  return [i && _vm.$scopedSlots.separator ? _c("span", { key: i + "a", staticClass: "w-breadcrumbs__separator", class: _vm.separatorColor }, [_vm._t("separator", null, { "index": i })], 2) : i ? _c("w-icon", { key: i + "b", staticClass: "w-breadcrumbs__separator", class: _vm.separatorColor }, [_vm._v(_vm._s(_vm.icon))]) : _vm._e(), item[_vm.itemRouteKey] && (i < _vm.items.length - 1 || _vm.linkLastItem) ? [_vm.$scopedSlots.item ? _c(_vm.hasRouter ? "router-link" : "a", { key: i + "c", tag: "component", staticClass: "w-breadcrumbs__item", class: _vm.color || null, attrs: { "to": _vm.hasRouter && item[_vm.itemRouteKey], "href": item[_vm.itemRouteKey] } }, [_vm._t("item", null, { "item": item, "index": i + 1, "isLast": i === _vm.items.length - 1 })], 2) : _c(_vm.hasRouter ? "router-link" : "a", { key: i + "d", tag: "component", staticClass: "w-breadcrumbs__item", class: _vm.color || null, attrs: { "to": _vm.hasRouter && item[_vm.itemRouteKey], "href": item[_vm.itemRouteKey] }, domProps: { "innerHTML": _vm._s(item[_vm.itemLabelKey]) } })] : _vm.$scopedSlots.item ? _vm._t("item", null, { "item": item, "index": i + 1, "isLast": i === _vm.items.length - 1 }) : _c("span", { key: i + "f", domProps: { "innerHTML": _vm._s(item[_vm.itemLabelKey]) } })];
1120
1148
  })], 2);
1121
1149
  };
1122
- var staticRenderFns$I = [];
1150
+ var staticRenderFns$J = [];
1123
1151
  var wBreadcrumbs_vue_vue_type_style_index_0_lang = "";
1124
- const __vue2_script$I = {
1152
+ const __vue2_script$J = {
1125
1153
  name: "w-breadcrumbs",
1126
1154
  props: {
1127
1155
  items: { type: Array, required: true },
@@ -1152,17 +1180,17 @@ const __vue2_script$I = {
1152
1180
  }
1153
1181
  }
1154
1182
  };
1155
- const __cssModules$I = {};
1156
- var __component__$I = /* @__PURE__ */ normalizeComponent(__vue2_script$I, render$I, staticRenderFns$I, false, __vue2_injectStyles$I, null, null, null);
1157
- function __vue2_injectStyles$I(context) {
1158
- for (let o in __cssModules$I) {
1159
- this[o] = __cssModules$I[o];
1183
+ const __cssModules$J = {};
1184
+ var __component__$J = /* @__PURE__ */ normalizeComponent(__vue2_script$J, render$J, staticRenderFns$J, false, __vue2_injectStyles$J, null, null, null);
1185
+ function __vue2_injectStyles$J(context) {
1186
+ for (let o in __cssModules$J) {
1187
+ this[o] = __cssModules$J[o];
1160
1188
  }
1161
1189
  }
1162
1190
  var wBreadcrumbs = /* @__PURE__ */ function() {
1163
- return __component__$I.exports;
1191
+ return __component__$J.exports;
1164
1192
  }();
1165
- var render$H = function() {
1193
+ var render$I = function() {
1166
1194
  var _vm = this;
1167
1195
  var _h = _vm.$createElement;
1168
1196
  var _c = _vm._self._c || _h;
@@ -1170,9 +1198,9 @@ var render$H = function() {
1170
1198
  return [_c("svg", { attrs: { "viewBox": "0 0 40 40" } }, [_c("circle", { attrs: { "cx": "20", "cy": "20", "r": "18", "fill": "transparent", "stroke": "currentColor", "stroke-width": "4", "stroke-linecap": "round" } })])];
1171
1199
  })], 2) : _vm._e()])], 2);
1172
1200
  };
1173
- var staticRenderFns$H = [];
1201
+ var staticRenderFns$I = [];
1174
1202
  var wButton_vue_vue_type_style_index_0_lang = "";
1175
- const __vue2_script$H = {
1203
+ const __vue2_script$I = {
1176
1204
  name: "w-button",
1177
1205
  props: {
1178
1206
  color: { type: String },
@@ -1264,6 +1292,81 @@ const __vue2_script$H = {
1264
1292
  }
1265
1293
  }
1266
1294
  };
1295
+ const __cssModules$I = {};
1296
+ var __component__$I = /* @__PURE__ */ normalizeComponent(__vue2_script$I, render$I, staticRenderFns$I, false, __vue2_injectStyles$I, null, null, null);
1297
+ function __vue2_injectStyles$I(context) {
1298
+ for (let o in __cssModules$I) {
1299
+ this[o] = __cssModules$I[o];
1300
+ }
1301
+ }
1302
+ var wButton = /* @__PURE__ */ function() {
1303
+ return __component__$I.exports;
1304
+ }();
1305
+ const objectifyClasses = (classes = {}) => {
1306
+ if (typeof classes === "string")
1307
+ classes = { [classes]: true };
1308
+ else if (typeof classes === "array")
1309
+ classes = { [classes.join(" ")]: true };
1310
+ return classes;
1311
+ };
1312
+ var render$H = function() {
1313
+ var _vm = this;
1314
+ var _h = _vm.$createElement;
1315
+ var _c = _vm._self._c || _h;
1316
+ return _c("div", { staticClass: "w-card", class: _vm.classes, style: _vm.styles }, [_vm.$slots.title ? _c("div", { staticClass: "w-card__title", class: Object.assign({}, { "w-card__title--has-toolbar": _vm.titleHasToolbar }, _vm.titleClasses) }, [_vm._t("title")], 2) : _vm.title ? _c("div", { staticClass: "w-card__title", class: _vm.titleClasses, domProps: { "innerHTML": _vm._s(_vm.title) } }) : _vm._e(), _vm.image ? _c("w-image", _vm._b({ staticClass: "w-card__image", attrs: { "src": _vm.image } }, "w-image", _vm.imgProps, false), [_vm._t("image-content")], 2) : _vm._e(), _c("div", { staticClass: "w-card__content", class: _vm.contentClasses }, [_vm._t("default")], 2), _vm.$slots.actions ? _c("div", { staticClass: "w-card__actions", class: { "w-card__actions--has-toolbar": _vm.actionsHasToolbar } }, [_vm._t("actions")], 2) : _vm._e()], 1);
1317
+ };
1318
+ var staticRenderFns$H = [];
1319
+ var wCard_vue_vue_type_style_index_0_lang = "";
1320
+ const __vue2_script$H = {
1321
+ name: "w-card",
1322
+ props: {
1323
+ color: { type: String },
1324
+ bgColor: { type: String },
1325
+ shadow: { type: Boolean },
1326
+ noBorder: { type: Boolean },
1327
+ tile: { type: Boolean },
1328
+ title: { type: String },
1329
+ image: { type: String },
1330
+ imageProps: { type: Object },
1331
+ titleClass: { type: [String, Object, Array] },
1332
+ contentClass: { type: [String, Object, Array] }
1333
+ },
1334
+ emits: [],
1335
+ computed: {
1336
+ titleClasses() {
1337
+ return objectifyClasses(this.titleClass);
1338
+ },
1339
+ contentClasses() {
1340
+ return objectifyClasses(this.contentClass);
1341
+ },
1342
+ titleHasToolbar() {
1343
+ const { title } = this.$slots;
1344
+ return title && title.map((vnode) => vnode.tag).join("").includes("w-toolbar");
1345
+ },
1346
+ actionsHasToolbar() {
1347
+ const { actions } = this.$slots;
1348
+ return actions && actions.map((vnode) => vnode.tag).join("").includes("w-toolbar");
1349
+ },
1350
+ imgProps() {
1351
+ return __spreadValues({
1352
+ tag: "div",
1353
+ ratio: 1 / 2
1354
+ }, this.imageProps);
1355
+ },
1356
+ classes() {
1357
+ return {
1358
+ [this.color]: this.color,
1359
+ [`${this.bgColor}--bg`]: this.bgColor,
1360
+ "w-card--no-border": this.noBorder,
1361
+ "w-card--tile": this.tile,
1362
+ "w-card--shadow": this.shadow
1363
+ };
1364
+ },
1365
+ styles() {
1366
+ return false;
1367
+ }
1368
+ }
1369
+ };
1267
1370
  const __cssModules$H = {};
1268
1371
  var __component__$H = /* @__PURE__ */ normalizeComponent(__vue2_script$H, render$H, staticRenderFns$H, false, __vue2_injectStyles$H, null, null, null);
1269
1372
  function __vue2_injectStyles$H(context) {
@@ -1271,7 +1374,7 @@ function __vue2_injectStyles$H(context) {
1271
1374
  this[o] = __cssModules$H[o];
1272
1375
  }
1273
1376
  }
1274
- var wButton = /* @__PURE__ */ function() {
1377
+ var wCard = /* @__PURE__ */ function() {
1275
1378
  return __component__$H.exports;
1276
1379
  }();
1277
1380
  var FormElementMixin = {
@@ -1494,55 +1597,84 @@ var wCheckboxes = /* @__PURE__ */ function() {
1494
1597
  return __component__$F.exports;
1495
1598
  }();
1496
1599
  var render$E = function() {
1497
- var _obj;
1498
1600
  var _vm = this;
1499
1601
  var _h = _vm.$createElement;
1500
1602
  var _c = _vm._self._c || _h;
1501
- return _c("div", { staticClass: "w-card", class: _vm.classes, style: _vm.styles }, [_vm.$slots.title ? _c("div", { staticClass: "w-card__title", class: (_obj = { "w-card__title--has-toolbar": _vm.titleHasToolbar }, _obj[_vm.titleClass] = _vm.titleClass || false, _obj) }, [_vm._t("title")], 2) : _vm.title ? _c("div", { staticClass: "w-card__title", class: _vm.titleClass || false, domProps: { "innerHTML": _vm._s(_vm.title) } }) : _vm._e(), _vm.image ? _c("w-image", _vm._b({ staticClass: "w-card__image", attrs: { "src": _vm.image } }, "w-image", _vm.imgProps, false), [_vm._t("image-content")], 2) : _vm._e(), _c("div", { staticClass: "w-card__content", class: _vm.contentClass || false }, [_vm._t("default")], 2), _vm.$slots.actions ? _c("div", { staticClass: "w-card__actions", class: { "w-card__actions--has-toolbar": _vm.actionsHasToolbar } }, [_vm._t("actions")], 2) : _vm._e()], 1);
1603
+ return _c("div", { staticClass: "w-confirm" }, [_c("w-menu", _vm._b({ scopedSlots: _vm._u([{ key: "activator", fn: function(ref) {
1604
+ var on = ref.on;
1605
+ return [_c("w-button", _vm._g(_vm._b({ staticClass: "w-confirm__button" }, "w-button", _vm.buttonProps, false), on), [_vm._t("default")], 2)];
1606
+ } }], null, true), model: { value: _vm.showPopup, callback: function($$v) {
1607
+ _vm.showPopup = $$v;
1608
+ }, expression: "showPopup" } }, "w-menu", _vm.wMenuProps, false), [_c("w-flex", { attrs: { "column": !_vm.inline, "align-center": "" } }, [_c("div", [_vm._t("question", function() {
1609
+ return [_vm._v("Are you sure?")];
1610
+ })], 2), _c("div", { staticClass: "w-flex justify-end", class: _vm.inline ? "ml2" : "mt2" }, [!_vm.noCancel ? _c("w-button", _vm._b({ staticClass: "mr2", attrs: { "bg-color": (_vm.cancelButton || {}).bgColor || "error" }, on: { "click": _vm.onCancel } }, "w-button", _vm.cancelButton, false), [_vm._t("cancel", function() {
1611
+ return [_vm._v("Cancel")];
1612
+ })], 2) : _vm._e(), _c("w-button", _vm._b({ attrs: { "bg-color": (_vm.confirmButton || {}).bgColor || "success" }, on: { "click": _vm.onConfirm } }, "w-button", _vm.confirmButton, false), [_vm._t("confirm", function() {
1613
+ return [_vm._v("Confirm")];
1614
+ })], 2)], 1)])], 1)], 1);
1502
1615
  };
1503
1616
  var staticRenderFns$E = [];
1504
- var wCard_vue_vue_type_style_index_0_lang = "";
1505
1617
  const __vue2_script$E = {
1506
- name: "w-card",
1618
+ name: "w-confirm",
1507
1619
  props: {
1508
- color: { type: String },
1509
1620
  bgColor: { type: String },
1510
- shadow: { type: Boolean },
1511
- noBorder: { type: Boolean },
1512
- tile: { type: Boolean },
1513
- title: { type: String },
1514
- image: { type: String },
1515
- imageProps: { type: Object },
1516
- titleClass: { type: String },
1517
- contentClass: { type: String }
1621
+ color: { type: String },
1622
+ icon: { type: String },
1623
+ mainButton: { type: Object },
1624
+ noCancel: { type: Boolean },
1625
+ cancelButton: { type: [Boolean, Object] },
1626
+ confirmButton: { type: Object },
1627
+ inline: { type: Boolean },
1628
+ menu: { type: Object },
1629
+ noArrow: { type: Boolean },
1630
+ top: { type: Boolean },
1631
+ bottom: { type: Boolean },
1632
+ left: { type: Boolean },
1633
+ right: { type: Boolean },
1634
+ alignTop: { type: Boolean },
1635
+ alignBottom: { type: Boolean },
1636
+ alignLeft: { type: Boolean },
1637
+ alignRight: { type: Boolean },
1638
+ persistent: { type: Boolean },
1639
+ transition: { type: String }
1518
1640
  },
1519
- emits: [],
1641
+ emits: ["cancel", "confirm"],
1642
+ data: () => ({
1643
+ showPopup: false,
1644
+ props: []
1645
+ }),
1520
1646
  computed: {
1521
- titleHasToolbar() {
1522
- const { title } = this.$slots;
1523
- return title && title.map((vnode) => vnode.tag).join("").includes("w-toolbar");
1524
- },
1525
- actionsHasToolbar() {
1526
- const { actions } = this.$slots;
1527
- return actions && actions.map((vnode) => vnode.tag).join("").includes("w-toolbar");
1528
- },
1529
- imgProps() {
1647
+ wMenuProps() {
1530
1648
  return __spreadValues({
1531
- tag: "div",
1532
- ratio: 1 / 2
1533
- }, this.imageProps);
1534
- },
1535
- classes() {
1536
- return {
1537
- [this.color]: this.color,
1538
- [`${this.bgColor}--bg`]: this.bgColor,
1539
- "w-card--no-border": this.noBorder,
1540
- "w-card--tile": this.tile,
1541
- "w-card--shadow": this.shadow
1542
- };
1649
+ top: this.top,
1650
+ bottom: this.bottom,
1651
+ left: this.left,
1652
+ right: this.right,
1653
+ arrow: !this.noArrow,
1654
+ alignTop: this.alignTop,
1655
+ alignBottom: this.alignBottom,
1656
+ alignLeft: this.alignLeft,
1657
+ alignRight: this.alignRight,
1658
+ persistent: this.persistent,
1659
+ transition: this.transition
1660
+ }, this.menu);
1661
+ },
1662
+ buttonProps() {
1663
+ return __spreadValues({
1664
+ bgColor: this.bgColor,
1665
+ color: this.color,
1666
+ icon: this.icon
1667
+ }, this.mainButton);
1668
+ }
1669
+ },
1670
+ methods: {
1671
+ onCancel() {
1672
+ this.$emit("cancel");
1673
+ this.showPopup = false;
1543
1674
  },
1544
- styles() {
1545
- return false;
1675
+ onConfirm() {
1676
+ this.$emit("confirm");
1677
+ this.showPopup = false;
1546
1678
  }
1547
1679
  }
1548
1680
  };
@@ -1553,7 +1685,7 @@ function __vue2_injectStyles$E(context) {
1553
1685
  this[o] = __cssModules$E[o];
1554
1686
  }
1555
1687
  }
1556
- var wCard = /* @__PURE__ */ function() {
1688
+ var wConfirm = /* @__PURE__ */ function() {
1557
1689
  return __component__$E.exports;
1558
1690
  }();
1559
1691
  var render$D = function() {
@@ -2876,13 +3008,13 @@ var render$s = function() {
2876
3008
  var _vm = this;
2877
3009
  var _h = _vm.$createElement;
2878
3010
  var _c = _vm._self._c || _h;
2879
- return _c("div", { ref: "wrapper", staticClass: "w-menu-wrap" }, [_vm._t("activator", null, { "on": _vm.activatorEventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName } }, [_vm.custom ? _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.showMenu, expression: "showMenu" }], ref: "menu", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, on: { "click": function($event) {
3011
+ return _c("div", { staticClass: "w-menu-wrap" }, [_vm._t("activator", null, { "on": _vm.activatorEventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_vm.custom && _vm.menuVisible ? _c("div", { ref: "menu", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, on: { "click": function($event) {
2880
3012
  _vm.hideOnMenuClick && _vm.closeMenu(true);
2881
3013
  }, "mouseenter": function($event) {
2882
3014
  _vm.showOnHover && (_vm.hoveringMenu = true);
2883
3015
  }, "mouseleave": function($event) {
2884
3016
  _vm.showOnHover && (_vm.hoveringMenu = false, _vm.closeMenu());
2885
- } } }, [_vm._t("default")], 2) : _c("w-card", { directives: [{ name: "show", rawName: "v-show", value: _vm.showMenu, expression: "showMenu" }], ref: "menu", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, attrs: { "tile": _vm.tile, "title-class": _vm.titleClass, "content-class": _vm.contentClass, "shadow": _vm.shadow, "no-border": _vm.noBorder }, nativeOn: { "click": function($event) {
3017
+ } } }, [_vm._t("default")], 2) : _vm.menuVisible ? _c("w-card", { ref: "menu", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, attrs: { "tile": _vm.tile, "title-class": _vm.titleClasses, "content-class": _vm.contentClasses, "shadow": _vm.shadow, "no-border": _vm.noBorder }, nativeOn: { "click": function($event) {
2886
3018
  _vm.hideOnMenuClick && _vm.closeMenu(true);
2887
3019
  }, "mouseenter": function($event) {
2888
3020
  _vm.showOnHover && (_vm.hoveringMenu = true);
@@ -2892,8 +3024,8 @@ var render$s = function() {
2892
3024
  return [_vm._t("title")];
2893
3025
  }, proxy: true } : null, _vm.$slots.actions ? { key: "actions", fn: function() {
2894
3026
  return [_vm._t("actions")];
2895
- }, proxy: true } : null], null, true) }, [_vm._t("default")], 2)], 1), _vm.overlay ? _c("w-overlay", _vm._b({ ref: "overlay", class: _vm.overlayClass || null, attrs: { "value": _vm.showMenu, "persistent": _vm.persistent, "z-index": (_vm.zIndex || 200) - 1 }, on: { "input": function($event) {
2896
- _vm.showMenu = false;
3027
+ }, proxy: true } : null], null, true) }, [_vm._t("default")], 2) : _vm._e()], 1), _vm.overlay ? _c("w-overlay", _vm._b({ ref: "overlay", class: _vm.overlayClasses, attrs: { "value": _vm.menuVisible, "persistent": _vm.persistent, "z-index": (_vm.zIndex || 200) - 1 }, on: { "input": function($event) {
3028
+ _vm.menuVisible = false;
2897
3029
  } } }, "w-overlay", _vm.overlayProps, false)) : _vm._e()], 2);
2898
3030
  };
2899
3031
  var staticRenderFns$s = [];
@@ -2912,9 +3044,10 @@ const __vue2_script$s = {
2912
3044
  round: { type: Boolean },
2913
3045
  noBorder: { type: Boolean },
2914
3046
  transition: { type: String },
2915
- menuClass: { type: String },
2916
- titleClass: { type: String },
2917
- contentClass: { type: String },
3047
+ menuClass: { type: [String, Object, Array] },
3048
+ titleClass: { type: [String, Object, Array] },
3049
+ contentClass: { type: [String, Object, Array] },
3050
+ arrow: { type: Boolean },
2918
3051
  detachTo: { type: [String, Boolean, Object] },
2919
3052
  fixed: { type: Boolean },
2920
3053
  top: { type: Boolean },
@@ -2928,14 +3061,14 @@ const __vue2_script$s = {
2928
3061
  zIndex: { type: [Number, String, Boolean] },
2929
3062
  minWidth: { type: [Number, String] },
2930
3063
  overlay: { type: Boolean },
2931
- overlayClass: { type: String },
3064
+ overlayClass: { type: [String, Object, Array] },
2932
3065
  overlayProps: { type: Object },
2933
3066
  persistent: { type: Boolean },
2934
3067
  noPosition: { type: Boolean }
2935
3068
  },
2936
3069
  emits: ["input", "update:modelValue", "open", "close"],
2937
3070
  data: () => ({
2938
- showMenu: false,
3071
+ menuVisible: false,
2939
3072
  hoveringActivator: false,
2940
3073
  hoveringMenu: false,
2941
3074
  menuCoordinates: {
@@ -2984,26 +3117,40 @@ const __vue2_script$s = {
2984
3117
  alignment() {
2985
3118
  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" || "";
2986
3119
  },
3120
+ menuClasses() {
3121
+ return objectifyClasses(this.menuClass);
3122
+ },
3123
+ titleClasses() {
3124
+ return objectifyClasses(this.titleClass);
3125
+ },
3126
+ contentClasses() {
3127
+ return objectifyClasses(this.contentClass);
3128
+ },
3129
+ overlayClasses() {
3130
+ return objectifyClasses(this.overlayClass);
3131
+ },
2987
3132
  classes() {
2988
- return {
3133
+ return __spreadProps(__spreadValues({
2989
3134
  [this.color]: this.color,
2990
- [`${this.bgColor}--bg`]: this.bgColor,
2991
- [this.menuClass]: this.menuClass,
2992
- [`w-menu--${this.position}`]: true,
2993
- [`w-menu--align-${this.alignment}`]: this.alignment,
3135
+ [`${this.bgColor}--bg`]: this.bgColor
3136
+ }, this.menuClasses), {
3137
+ [`w-menu--${this.position}`]: !this.noPosition,
3138
+ [`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
2994
3139
  "w-menu--tile": this.tile,
2995
3140
  "w-menu--card": !this.custom,
2996
3141
  "w-menu--round": this.round,
3142
+ "w-menu--arrow": this.arrow,
2997
3143
  "w-menu--shadow": this.shadow,
2998
3144
  "w-menu--fixed": this.fixed
2999
- };
3145
+ });
3000
3146
  },
3001
3147
  styles() {
3002
3148
  return {
3003
3149
  zIndex: this.zIndex || this.zIndex === 0 || this.overlay && !this.zIndex && 200 || null,
3004
3150
  top: this.menuCoordinates.top && `${~~this.menuCoordinates.top}px` || null,
3005
3151
  left: this.menuCoordinates.left && `${~~this.menuCoordinates.left}px` || null,
3006
- minWidth: this.minWidth && this.menuMinWidth || null
3152
+ minWidth: this.minWidth && this.menuMinWidth || null,
3153
+ "--w-menu-bg-color": this.arrow && this.$waveui.colors[this.bgColor || "white"]
3007
3154
  };
3008
3155
  },
3009
3156
  activatorEventHandlers() {
@@ -3033,7 +3180,7 @@ const __vue2_script$s = {
3033
3180
  },
3034
3181
  methods: {
3035
3182
  toggleMenu(e) {
3036
- let shouldShowMenu = this.showMenu;
3183
+ let shouldShowMenu = this.menuVisible;
3037
3184
  if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
3038
3185
  shouldShowMenu = !shouldShowMenu;
3039
3186
  } else if (e.type === "click" && !this.showOnHover)
@@ -3046,35 +3193,40 @@ const __vue2_script$s = {
3046
3193
  shouldShowMenu = false;
3047
3194
  }
3048
3195
  this.timeoutId = clearTimeout(this.timeoutId);
3049
- if (shouldShowMenu)
3196
+ if (shouldShowMenu) {
3197
+ this.$emit("update:modelValue", this.menuVisible = true);
3198
+ this.$emit("input", true);
3199
+ this.$emit("open");
3050
3200
  this.openMenu(e);
3051
- else
3201
+ } else
3052
3202
  this.closeMenu();
3053
3203
  },
3054
- openMenu(e) {
3204
+ async openMenu(e) {
3205
+ this.menuVisible = true;
3206
+ await this.insertMenu();
3055
3207
  if (this.minWidth === "activator")
3056
3208
  this.activatorWidth = this.activatorEl.offsetWidth;
3057
3209
  if (!this.noPosition)
3058
3210
  this.computeMenuPosition(e);
3059
3211
  this.timeoutId = setTimeout(() => {
3060
- this.$emit("update:modelValue", this.showMenu = true);
3212
+ this.$emit("update:modelValue", true);
3061
3213
  this.$emit("input", true);
3062
3214
  this.$emit("open");
3063
- }, 10);
3215
+ }, 0);
3064
3216
  if (!this.persistent)
3065
3217
  document.addEventListener("mousedown", this.onOutsideMousedown);
3066
3218
  if (!this.noPosition)
3067
3219
  window.addEventListener("resize", this.onResize);
3068
3220
  },
3069
3221
  async closeMenu(force = false) {
3070
- if (!this.showMenu)
3222
+ if (!this.menuVisible)
3071
3223
  return;
3072
3224
  if (this.showOnHover && !force) {
3073
3225
  await new Promise((resolve) => setTimeout(resolve, 10));
3074
3226
  if (this.showOnHover && (this.hoveringMenu || this.hoveringActivator))
3075
3227
  return;
3076
3228
  }
3077
- this.$emit("update:modelValue", this.showMenu = false);
3229
+ this.$emit("update:modelValue", this.menuVisible = false);
3078
3230
  this.$emit("input", false);
3079
3231
  this.$emit("close");
3080
3232
  document.removeEventListener("mousedown", this.onOutsideMousedown);
@@ -3082,7 +3234,7 @@ const __vue2_script$s = {
3082
3234
  },
3083
3235
  onOutsideMousedown(e) {
3084
3236
  if (!this.menuEl.contains(e.target) && !this.activatorEl.contains(e.target)) {
3085
- this.$emit("update:modelValue", this.showMenu = false);
3237
+ this.$emit("update:modelValue", this.menuVisible = false);
3086
3238
  this.$emit("input", false);
3087
3239
  this.$emit("close");
3088
3240
  document.removeEventListener("mousedown", this.onOutsideMousedown);
@@ -3148,40 +3300,47 @@ const __vue2_script$s = {
3148
3300
  }
3149
3301
  }
3150
3302
  this.menuEl.style.visibility = null;
3151
- if (!this.showMenu)
3303
+ if (!this.menuVisible)
3152
3304
  this.menuEl.style.display = "none";
3153
3305
  this.menuCoordinates = { top, left };
3154
3306
  },
3155
3307
  insertMenu() {
3156
- const wrapper = this.$refs.wrapper;
3157
- this.menuEl = this.$refs.menu.$el || this.$refs.menu;
3158
- wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
3159
- if (this.overlay)
3160
- wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
3161
- this.detachToTarget.appendChild(this.menuEl);
3308
+ return new Promise((resolve) => {
3309
+ this.$nextTick(() => {
3310
+ var _a;
3311
+ this.menuEl = ((_a = this.$refs.menu) == null ? void 0 : _a.$el) || this.$refs.menu;
3312
+ this.detachToTarget.appendChild(this.menuEl);
3313
+ resolve();
3314
+ });
3315
+ });
3162
3316
  },
3163
3317
  removeMenu() {
3164
3318
  if (this.menuEl && this.menuEl.parentNode)
3165
- this.menuEl.parentNode.removeChild(this.menuEl);
3319
+ this.menuEl.remove();
3166
3320
  }
3167
3321
  },
3168
3322
  mounted() {
3169
- this.activatorEl = this.$refs.wrapper.firstElementChild;
3170
- this.overlayEl = this.overlay ? this.$refs.overlay.$el : null;
3171
- this.insertMenu();
3323
+ var _a;
3324
+ const wrapper = this.$el;
3325
+ this.activatorEl = wrapper.firstElementChild;
3326
+ wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
3327
+ if (this.overlay) {
3328
+ this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
3329
+ wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
3330
+ }
3172
3331
  if (this.value)
3173
3332
  this.toggleMenu({ type: "click", target: this.activatorEl });
3174
3333
  },
3175
3334
  beforeDestroy() {
3176
3335
  this.removeMenu();
3177
3336
  if (this.overlay && this.overlayEl.parentNode)
3178
- this.overlayEl.parentNode.removeChild(this.overlayEl);
3337
+ this.overlayEl.remove();
3179
3338
  if (this.activatorEl && this.activatorEl.parentNode)
3180
- this.activatorEl.parentNode.removeChild(this.activatorEl);
3339
+ this.activatorEl.remove();
3181
3340
  },
3182
3341
  watch: {
3183
3342
  value(bool) {
3184
- if (!!bool !== this.showMenu)
3343
+ if (!!bool !== this.menuVisible)
3185
3344
  this.toggleMenu({ type: "click", target: this.activatorEl });
3186
3345
  },
3187
3346
  detachTo() {
@@ -5321,7 +5480,7 @@ var render$8 = function() {
5321
5480
  var _vm = this;
5322
5481
  var _h = _vm.$createElement;
5323
5482
  var _c = _vm._self._c || _h;
5324
- return _c("div", { ref: "wrapper", staticClass: "w-tooltip-wrap", class: { "w-tooltip-wrap--attached": !_vm.detachTo } }, [_vm._t("activator", null, { "on": _vm.eventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTooltip, expression: "showTooltip" }], ref: "tooltip", staticClass: "w-tooltip", class: _vm.classes, style: _vm.styles }, [_vm.bgColor ? _c("div", { class: _vm.color }, [_vm._t("default")], 2) : _vm._t("default")], 2)])], 2);
5483
+ return _c("div", { ref: "wrapper", staticClass: "w-tooltip-wrap", class: { "w-tooltip-wrap--attached": !_vm.detachTo } }, [_vm._t("activator", null, { "on": _vm.eventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.showTooltip, expression: "showTooltip" }], ref: "tooltip", staticClass: "w-tooltip", class: _vm.classes, style: _vm.styles }, [_vm.bgColor ? _c("div", { class: _vm.color }, [_vm._t("default")], 2) : _vm._t("default")], 2)])], 2);
5325
5484
  };
5326
5485
  var staticRenderFns$8 = [];
5327
5486
  var wTooltip_vue_vue_type_style_index_0_lang = "";
@@ -5337,8 +5496,8 @@ const __vue2_script$8 = {
5337
5496
  shadow: { type: Boolean },
5338
5497
  tile: { type: Boolean },
5339
5498
  round: { type: Boolean },
5340
- transition: { type: String, default: "" },
5341
- tooltipClass: { type: String },
5499
+ transition: { type: String },
5500
+ tooltipClass: { type: [String, Object, Array] },
5342
5501
  detachTo: {},
5343
5502
  fixed: { type: Boolean },
5344
5503
  top: { type: Boolean },
@@ -5361,6 +5520,9 @@ const __vue2_script$8 = {
5361
5520
  timeoutId: null
5362
5521
  }),
5363
5522
  computed: {
5523
+ tooltipClasses() {
5524
+ return objectifyClasses(this.tooltipClass);
5525
+ },
5364
5526
  transitionName() {
5365
5527
  const direction = this.position.replace(/top|bottom/, (m) => ({ top: "up", bottom: "down" })[m]);
5366
5528
  return this.transition || `w-tooltip-slide-fade-${direction}`;
@@ -5417,10 +5579,10 @@ const __vue2_script$8 = {
5417
5579
  return coords;
5418
5580
  },
5419
5581
  classes() {
5420
- return {
5582
+ return __spreadProps(__spreadValues({
5421
5583
  [this.color]: !this.bgColor,
5422
- [`${this.bgColor} ${this.bgColor}--bg`]: this.bgColor,
5423
- [this.tooltipClass]: this.tooltipClass,
5584
+ [`${this.bgColor} ${this.bgColor}--bg`]: this.bgColor
5585
+ }, this.tooltipClasses), {
5424
5586
  [`w-tooltip--${this.position}`]: true,
5425
5587
  "w-tooltip--tile": this.tile,
5426
5588
  "w-tooltip--round": this.round,
@@ -5429,7 +5591,7 @@ const __vue2_script$8 = {
5429
5591
  "w-tooltip--active": this.showTooltip,
5430
5592
  "w-tooltip--no-border": this.noBorder || this.bgColor,
5431
5593
  "w-tooltip--custom-transition": this.transition
5432
- };
5594
+ });
5433
5595
  },
5434
5596
  styles() {
5435
5597
  return {
@@ -5529,7 +5691,7 @@ const __vue2_script$8 = {
5529
5691
  },
5530
5692
  removeTooltip() {
5531
5693
  if (this.tooltipEl && this.tooltipEl.parentNode)
5532
- this.tooltipEl.parentNode.removeChild(this.tooltipEl);
5694
+ this.tooltipEl.remove();
5533
5695
  }
5534
5696
  },
5535
5697
  mounted() {
@@ -5542,7 +5704,7 @@ const __vue2_script$8 = {
5542
5704
  beforeDestroy() {
5543
5705
  this.removeTooltip();
5544
5706
  if (this.activatorEl && this.activatorEl.parentNode)
5545
- this.activatorEl.parentNode.removeChild(this.activatorEl);
5707
+ this.activatorEl.remove();
5546
5708
  },
5547
5709
  watch: {
5548
5710
  value(bool) {
@@ -5952,9 +6114,10 @@ var components = /* @__PURE__ */ Object.freeze({
5952
6114
  WBadge: wBadge,
5953
6115
  WBreadcrumbs: wBreadcrumbs,
5954
6116
  WButton: wButton,
6117
+ WCard: wCard,
5955
6118
  WCheckbox: wCheckbox,
5956
6119
  WCheckboxes: wCheckboxes,
5957
- WCard: wCard,
6120
+ WConfirm: wConfirm,
5958
6121
  WDatePicker: wDatePicker,
5959
6122
  WDialog: wDialog,
5960
6123
  WDivider: wDivider,