@afeefa/vue-app 0.0.90 → 0.0.91

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.
@@ -1 +1 @@
1
- 0.0.90
1
+ 0.0.91
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.90",
3
+ "version": "0.0.91",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -1,23 +1,18 @@
1
1
  <template>
2
- <div :class="['a-grid', widthClass, colsClass, gapClass, evenClass, breakMobileClass]">
2
+ <div :class="['a-grid', colsClass, gapClass, evenClass, breakMobileClass]">
3
3
  <slot />
4
4
  </div>
5
5
  </template>
6
6
 
7
7
 
8
8
  <script>
9
- import { Component, Vue } from '@a-vue'
9
+ import { Component, Mixins } from '@a-vue'
10
+ import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
10
11
 
11
12
  @Component({
12
- props: ['fullWidth', 'gap', 'hGap', 'vGap', 'cols', 'even', 'breakMobile']
13
+ props: ['gap', 'hGap', 'vGap', 'cols', {even: false}, 'breakMobile']
13
14
  })
14
- export default class AGrid extends Vue {
15
- get widthClass () {
16
- if (this.fullWidth !== undefined) {
17
- return 'full'
18
- }
19
- }
20
-
15
+ export default class AGrid extends Mixins(ComponentWidthMixin) {
21
16
  get breakMobileClass () {
22
17
  if (this.breakMobile !== undefined) {
23
18
  return 'breakMobile'
@@ -30,7 +25,7 @@ export default class AGrid extends Vue {
30
25
  }
31
26
 
32
27
  get evenClass () {
33
- if (this.even !== undefined) {
28
+ if (this.even) {
34
29
  return 'even'
35
30
  }
36
31
  }
@@ -60,35 +55,12 @@ export default class AGrid extends Vue {
60
55
  .a-grid {
61
56
  display: grid;
62
57
 
63
- &.full {
64
- width: 100%;
65
- }
66
-
67
- &.cols-2 {
68
- grid-template-columns: auto auto;
69
- &.even {
70
- grid-template-columns: 1fr 1fr;
71
- }
72
- }
73
-
74
- &.cols-3 {
75
- grid-template-columns: auto auto auto;
76
- &.even {
77
- grid-template-columns: 1fr 1fr 1fr;
78
- }
79
- }
80
-
81
- &.cols-4 {
82
- grid-template-columns: repeat(4, auto);
83
- &.even {
84
- grid-template-columns: repeat(4, 1fr);
85
- }
86
- }
87
-
88
- &.cols-5 {
89
- grid-template-columns: repeat(5, auto);
90
- &.even {
91
- grid-template-columns: repeat(5, 1fr);
58
+ @for $i from 1 through 8 {
59
+ &.cols-#{$i} {
60
+ grid-template-columns: repeat(#{$i}, auto);
61
+ &.even {
62
+ grid-template-columns: repeat(#{$i}, 1fr);
63
+ }
92
64
  }
93
65
  }
94
66
 
@@ -100,6 +72,5 @@ export default class AGrid extends Vue {
100
72
  }
101
73
  }
102
74
  }
103
-
104
75
  }
105
76
  </style>
@@ -1,21 +1,30 @@
1
1
  <template>
2
- <div :class="['a-row', widthClass, alignClass, gapClass, directionClass, justifyClass]">
2
+ <div
3
+ :class="['a-row', directionClass, gapClass, classes]"
4
+ :style="cwm_widthStyle"
5
+ >
3
6
  <slot />
4
7
  </div>
5
8
  </template>
6
9
 
7
10
 
8
11
  <script>
9
- import { Component, Vue } from '@a-vue'
12
+ import { Component, Mixins } from '@a-vue'
13
+ import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
10
14
 
11
15
  @Component({
12
- props: ['fullWidth', 'gap', 'start', 'stretch', 'center', 'vertical', 'right']
16
+ props: [
17
+ { vertical: false },
18
+ 'gap'
19
+ ]
13
20
  })
14
- export default class ARow extends Vue {
15
- get widthClass () {
16
- if (this.fullWidth !== undefined) {
17
- return 'full'
18
- }
21
+ export default class ARow extends Mixins(ComponentWidthMixin) {
22
+ get classes () {
23
+ const classes = {}
24
+ Object.keys(this.$attrs).forEach(cssClass => {
25
+ classes[cssClass] = true
26
+ })
27
+ return classes
19
28
  }
20
29
 
21
30
  get gapClass () {
@@ -24,33 +33,11 @@ export default class ARow extends Vue {
24
33
  }
25
34
  }
26
35
 
27
- get alignClass () {
28
- if (this.start !== undefined) {
29
- return 'start'
30
- }
31
-
32
- if (this.stretch !== undefined) {
33
- return 'stretch'
34
- }
35
-
36
- if (this.vertical !== undefined) {
37
- return this.center !== undefined ? 'center' : 'start'
38
- }
39
-
40
- return 'center'
41
- }
42
-
43
36
  get directionClass () {
44
- if (this.vertical !== undefined) {
37
+ if (this.vertical) {
45
38
  return 'vertical'
46
39
  }
47
40
  }
48
-
49
- get justifyClass () {
50
- if (this.right !== undefined) {
51
- return 'right'
52
- }
53
- }
54
41
  }
55
42
  </script>
56
43
 
@@ -58,29 +45,11 @@ export default class ARow extends Vue {
58
45
  <style scoped lang="scss">
59
46
  .a-row {
60
47
  display: flex;
61
-
62
- &.full {
63
- width: 100%;
64
- }
48
+ align-items: center;
65
49
 
66
50
  &.vertical {
67
51
  flex-direction: column;
68
- }
69
-
70
- &.center {
71
- align-items: center;
72
- }
73
-
74
- &.start {
75
- align-items: flex-start;
76
- }
77
-
78
- &.stretch {
79
- align-items: stretch;
80
- }
81
-
82
- &.right {
83
- justify-content: flex-end;
52
+ align-items: start;
84
53
  }
85
54
  }
86
55
  </style>
@@ -27,8 +27,9 @@
27
27
  <slot name="after-form-fields" />
28
28
 
29
29
  <a-row
30
- class="mt-8 gap-2"
31
- right
30
+ mt-8
31
+ gap-2
32
+ justify-end
32
33
  >
33
34
  <v-btn
34
35
  small
@@ -84,8 +84,8 @@
84
84
 
85
85
  <v-main id="v-main">
86
86
  <a-row
87
- start
88
87
  class="topbar"
88
+ align-start
89
89
  >
90
90
  <v-app-bar-nav-icon
91
91
  class="sidebarToggleButton mr-2 ml-3"
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="notFound">
3
3
  <a-row
4
- vertical
5
- center
6
4
  class="content"
5
+ vertical
6
+ align-center
7
7
  >
8
8
  <div class="logo">
9
9
  <slot />
@@ -11,7 +11,7 @@
11
11
 
12
12
  <a-row
13
13
  vertical
14
- center
14
+ align-center
15
15
  >
16
16
  <div class="mt-0">
17
17
  {{ title || '404 - Not Found' }}
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <v-app class="splash">
3
3
  <a-row
4
- vertical
5
- center
6
4
  class="content"
5
+ vertical
6
+ align-center
7
7
  >
8
8
  <div class="logo">
9
9
  <slot />
@@ -11,8 +11,8 @@
11
11
 
12
12
  <a-row
13
13
  vertical
14
- center
15
- fullWidth
14
+ align-center
15
+ width="100%"
16
16
  >
17
17
  <v-progress-linear
18
18
  :size="45"
@@ -1,8 +1,6 @@
1
1
  <template>
2
2
  <a-row
3
- fullWidth
4
3
  vertical
5
- start
6
4
  gap="10"
7
5
  >
8
6
  <slot />
@@ -27,6 +27,7 @@
27
27
  </v-btn>
28
28
  </div>
29
29
  </template>
30
+
30
31
  <span v-if="disabled">
31
32
  <template v-if="!valid">
32
33
  Daten berichtigen,<br>um zu speichern
@@ -74,140 +74,16 @@
74
74
  box-shadow: none !important;
75
75
  }
76
76
 
77
- // @for $i from 1 through 10 {
78
- // .gap-{$i} {
79
- // gap: 0.25rem * $i;
80
- // }
81
- // }
82
-
83
- .gap-0 {
84
- gap: 0;
85
- }
86
-
87
- .gap-1 {
88
- gap: 4px;
89
- }
90
-
91
- .gap-2 {
92
- gap: 8px;
93
- }
94
-
95
- .gap-3 {
96
- gap: 12px;
97
- }
98
-
99
- .gap-4 {
100
- gap: 16px;
101
- }
102
-
103
- .gap-5 {
104
- gap: 20px;
105
- }
106
-
107
- .gap-6 {
108
- gap: 24px;
109
- }
110
-
111
- .gap-7 {
112
- gap: 28px;
113
- }
114
-
115
- .gap-8 {
116
- gap: 32px;
117
- }
118
-
119
- .gap-9 {
120
- gap: 36px;
121
- }
122
-
123
- .gap-10 {
124
- gap: 40px;
125
- }
126
-
127
- .h-gap-0 {
128
- column-gap: 0;
129
- }
130
-
131
- .h-gap-1 {
132
- column-gap: 4px;
133
- }
134
-
135
- .h-gap-2 {
136
- column-gap: 8px;
137
- }
138
-
139
- .h-gap-3 {
140
- column-gap: 12px;
141
- }
142
-
143
- .h-gap-4 {
144
- column-gap: 16px;
145
- }
146
-
147
- .h-gap-5 {
148
- column-gap: 20px;
149
- }
150
-
151
- .h-gap-6 {
152
- column-gap: 24px;
153
- }
154
-
155
- .h-gap-7 {
156
- column-gap: 28px;
157
- }
158
-
159
- .h-gap-8 {
160
- column-gap: 32px;
161
- }
162
-
163
- .h-gap-9 {
164
- column-gap: 36px;
165
- }
166
-
167
- .h-gap-10 {
168
- column-gap: 40px;
169
- }
170
-
171
- .v-gap-0 {
172
- row-gap: 0;
173
- }
174
-
175
- .v-gap-1 {
176
- row-gap: 4px;
177
- }
178
-
179
- .v-gap-2 {
180
- row-gap: 8px;
181
- }
182
-
183
- .v-gap-3 {
184
- row-gap: 12px;
185
- }
186
-
187
- .v-gap-4 {
188
- row-gap: 16px;
189
- }
190
-
191
- .v-gap-5 {
192
- row-gap: 20px;
193
- }
194
-
195
- .v-gap-6 {
196
- row-gap: 24px;
197
- }
198
-
199
- .v-gap-7 {
200
- row-gap: 28px;
201
- }
202
-
203
- .v-gap-8 {
204
- row-gap: 32px;
205
- }
77
+ @for $i from 1 through 16 {
78
+ .gap-#{$i} {
79
+ gap: 4px * $i;
80
+ }
206
81
 
207
- .v-gap-9 {
208
- row-gap: 36px;
209
- }
82
+ .h-gap-#{$i} {
83
+ column-gap: 4px * $i;
84
+ }
210
85
 
211
- .v-gap-10 {
212
- row-gap: 40px;
86
+ .v-gap-#{$i} {
87
+ row-gap: 4px * $i;
88
+ }
213
89
  }