wave-ui 1.43.0 → 1.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "1.43.0",
3
+ "version": "1.44.2",
4
4
  "description": "An emerging UI framework for Vue.js & Vue 3 with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "main": "./dist/wave-ui.umd.js",
@@ -1,5 +1,5 @@
1
1
  <template lang="pug">
2
- .w-app(:class="{ 'theme--dark': dark, 'd-block': block }")
2
+ .w-app(:class="classes")
3
3
  slot
4
4
  notification-manager
5
5
  </template>
@@ -16,7 +16,17 @@ export default {
16
16
  name: 'w-app',
17
17
  props: {
18
18
  dark: { type: Boolean },
19
- block: { type: Boolean }
19
+ block: { type: Boolean },
20
+ row: { type: Boolean },
21
+ alignCenter: { type: Boolean },
22
+ alignEnd: { type: Boolean },
23
+ justifyCenter: { type: Boolean },
24
+ justifyEnd: { type: Boolean },
25
+ justifySpaceBetween: { type: Boolean },
26
+ justifySpaceAround: { type: Boolean },
27
+ justifySpaceEvenly: { type: Boolean },
28
+ textCenter: { type: Boolean },
29
+ textRight: { type: Boolean }
20
30
  },
21
31
 
22
32
  components: { NotificationManager },
@@ -26,6 +36,25 @@ export default {
26
36
  notifManager: null
27
37
  }),
28
38
 
39
+ computed: {
40
+ classes () {
41
+ return {
42
+ 'd-block': this.block,
43
+ 'row': this.row,
44
+ 'align-center': this.alignCenter,
45
+ 'align-end': this.alignEnd,
46
+ 'justify-center': this.justifyCenter,
47
+ 'justify-end': this.justifyEnd,
48
+ 'justify-space-between': this.justifySpaceBetween,
49
+ 'justify-space-around': this.justifySpaceAround,
50
+ 'justify-space-evenly': this.justifySpaceEvenly,
51
+ 'text-center': this.textCenter,
52
+ 'text-right': this.textRight,
53
+ 'theme--dark': this.dark
54
+ }
55
+ }
56
+ },
57
+
29
58
  methods: {
30
59
  getBreakpoint () {
31
60
  const width = window.innerWidth
@@ -85,6 +114,17 @@ export default {
85
114
  flex-direction: column;
86
115
  min-height: 100vh;
87
116
 
117
+ &.row {flex-direction: row;}
88
118
  &.d-block {display: block;}
119
+ &.align-center {align-items: center;}
120
+ &.align-end {align-items: flex-end;}
121
+ &.justify-center {justify-content: center;}
122
+ &.justify-end {justify-content: flex-end;}
123
+ &.justify-space-between {justify-content: space-between;}
124
+ &.justify-space-around {justify-content: space-around;}
125
+ &.justify-space-evenly {justify-content: space-evenly;}
126
+ &.text-center {text-align: center;}
127
+ &.text-right {text-align: right;}
128
+
89
129
  }
90
130
  </style>
@@ -1,6 +1,6 @@
1
1
  <template lang="pug">
2
2
  .w-confirm
3
- w-menu(v-model="showPopup" v-bind="wMenuProps" :menu-class="menuClasses")
3
+ w-menu(v-model="showPopup" v-bind="wMenuProps")
4
4
  template(#activator="{ on }")
5
5
  w-button.w-confirm__button(v-on="on" v-bind="buttonProps")
6
6
  slot
@@ -8,9 +8,16 @@
8
8
  div
9
9
  slot(name="question") Are you sure?
10
10
  .w-flex.justify-end(:class="inline ? 'ml2' : 'mt2'")
11
- w-button.mr2(v-if="!noCancel" :bg-color="cancelButton.bgColor || 'error'" v-bind="cancelButton" @click="onCancel")
11
+ w-button.mr2(
12
+ v-if="!noCancel"
13
+ v-bind="cancelButton"
14
+ :bg-color="(cancelButton || {}).bgColor || 'error'"
15
+ @click="onCancel")
12
16
  slot(name="cancel") Cancel
13
- w-button(:bg-color="confirmButton.bgColor || 'success'" v-bind="confirmButton" @click="onConfirm")
17
+ w-button(
18
+ v-bind="confirmButton"
19
+ :bg-color="(confirmButton || {}).bgColor || 'success'"
20
+ @click="onConfirm")
14
21
  slot(name="confirm") Confirm
15
22
  </template>
16
23
 
@@ -22,20 +29,18 @@ export default {
22
29
  bgColor: { type: String },
23
30
  color: { type: String },
24
31
  icon: { type: String },
25
- menu: { type: Boolean },
32
+ mainButton: { type: Object }, // Allow passing down an object of props to the w-button component.
26
33
 
27
34
  // Cancel & confirm buttons props.
28
- cancelButtonColor: { type: String },
29
- confirmButtonColor: { type: String },
30
35
  noCancel: { type: Boolean }, // Removes the cancel button.
31
36
  cancelButton: { type: [Boolean, Object] }, // Allow passing down an object of props to the w-button component.
32
- confirmButton: { type: [Boolean, Object] }, // Allow passing down an object of props to the w-button component.
37
+ confirmButton: { type: Object }, // Allow passing down an object of props to the w-button component.
33
38
 
34
39
  // global menu props.
35
40
  inline: { type: Boolean }, // The layout inside the menu.
36
41
 
37
42
  // W-menu props.
38
- menuProps: { type: Object }, // Allow passing down an object of props to the w-menu component.
43
+ menu: { type: Object }, // Allow passing down an object of props to the w-menu component.
39
44
  // All the menu props shorthands, as long as they don't conflict with the button props.
40
45
  noArrow: { type: Boolean }, // Adds a directional triangle to the edge of the menu, like a tooltip.
41
46
  top: { type: Boolean },
@@ -71,14 +76,15 @@ export default {
71
76
  alignRight: this.alignRight,
72
77
  persistent: this.persistent,
73
78
  transition: this.transition,
74
- ...this.menuProps
79
+ ...this.menu
75
80
  }
76
81
  },
77
82
  buttonProps () {
78
83
  return {
79
84
  bgColor: this.bgColor,
80
85
  color: this.color,
81
- icon: this.icon
86
+ icon: this.icon,
87
+ ...this.mainButton
82
88
  }
83
89
  }
84
90
  },
@@ -62,7 +62,7 @@ export default {
62
62
  z-index: 1000;
63
63
  pointer-events: none;
64
64
  width: 280px;
65
- overflow: auto;
65
+ overflow-x: hidden;
66
66
 
67
67
  &--left {right: auto;left: 0;}
68
68