@mixd-id/web-scaffold 0.1.230406077 → 0.1.230406078

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406077",
4
+ "version": "0.1.230406078",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div :class="computedClass">
3
- <h1>{{ title }}</h1>
3
+ <Button class="p-1" @click="log('OK')">Box Button</Button>
4
4
  </div>
5
5
  </template>
6
6
 
@@ -43,7 +43,7 @@ export default{
43
43
  <style module>
44
44
 
45
45
  .comp{
46
- @apply border-[1px] border-text-200 flex items-center justify-center;
46
+ @apply flex items-center justify-center;
47
47
  background-color: v-bind(bgColor[0]);
48
48
  background-image: v-bind(bgImages[0]);
49
49
  background-position: v-bind(bgPositions[0]);
@@ -22,6 +22,8 @@ export default{
22
22
 
23
23
  props: {
24
24
 
25
+ class: String,
26
+
25
27
  variant: {
26
28
  type: [ String, Number ],
27
29
  default: "primary" // primary|secondary|outline, default:primary
@@ -46,9 +48,11 @@ export default{
46
48
 
47
49
  return [
48
50
  this.$style.button,
49
- 'button-' + this.variant,
51
+ this.$style['button-' + this.variant],
52
+ this.class ?? '',
50
53
  parseInt(this.computedState) === 2 ? this.$style.loading : '',
51
54
  ]
55
+ .filter(_ => _)
52
56
  .join(' ')
53
57
  },
54
58
 
@@ -65,7 +69,7 @@ export default{
65
69
  },
66
70
 
67
71
  widths(){
68
- if(!Array.isArray(this.width)) return []
72
+ if(!Array.isArray(this.width)) return [ '', '' ]
69
73
 
70
74
  return [
71
75
  this.width[0] ?? '',
@@ -107,10 +111,22 @@ export default{
107
111
 
108
112
  </script>
109
113
 
110
- <style>
114
+ <style module>
111
115
 
112
116
  .button{
113
- width: v-bind(widths[0])
117
+ @apply p-2 h-[var(--h-cp)];
118
+ @apply relative flex items-center justify-center;
119
+ @apply whitespace-nowrap text-ellipsis overflow-hidden;
120
+ @apply rounded-lg;
121
+ }
122
+ .button>*:first-child{
123
+ @apply flex items-center justify-center
124
+ }
125
+ .button:disabled{
126
+ @apply opacity-60;
127
+ }
128
+ .button:active{
129
+ @apply top-[1px] left-[1px] relative;
114
130
  }
115
131
 
116
132
  .button-primary{
@@ -236,26 +252,6 @@ export default{
236
252
  fill-opacity: 75%;
237
253
  }
238
254
 
239
- </style>
240
-
241
- <style module>
242
-
243
- .button{
244
- @apply h-[var(--h-cp)];
245
- @apply relative flex items-center justify-center;
246
- @apply whitespace-nowrap text-ellipsis overflow-hidden;
247
- @apply rounded-lg;
248
- }
249
- .button>*:first-child{
250
- @apply flex items-center justify-center
251
- }
252
- .button:disabled{
253
- @apply opacity-60;
254
- }
255
- .button:active{
256
- @apply top-[1px] left-[1px] relative;
257
- }
258
-
259
255
  .size-sm{
260
256
  @apply h-[var(--h-cp-sm)];
261
257
  }
@@ -285,12 +281,4 @@ export default{
285
281
  @apply animate-spin h-5 w-5;
286
282
  }
287
283
 
288
- @media screen and (min-width: 768px){
289
-
290
- .button{
291
- width: v-bind(widths[1])
292
- }
293
-
294
- }
295
-
296
284
  </style>
@@ -58,11 +58,7 @@
58
58
  <label class="text-text-400">Autoplay</label>
59
59
  <Dropdown v-model="item.props.autoPlay" class="mt-1" @change="$emit('change')">
60
60
  <option value="0">None</option>
61
- <option value="1000">1 seconds</option>
62
- <option value="4000">4 seconds</option>
63
- <option value="6000">6 seconds</option>
64
- <option value="8000">8 seconds</option>
65
- <option value="10000">10 seconds</option>
61
+ <option v-for="i in 10" :value="i * 1000">{{ i }} seconds</option>
66
62
  </Dropdown>
67
63
  </div>
68
64
 
@@ -98,6 +98,12 @@
98
98
  </div>
99
99
  </div>
100
100
 
101
+ <div v-if="store.layoutMode && layout && useStyle" class="flex flex-row gap-2">
102
+ <label class="flex-1 text-text-400">{{ $t('Style')}}</label>
103
+ <button type="button" class="text-primary"
104
+ @click="store.selectedComponent = [ 'style' ]">Edit Style</button>
105
+ </div>
106
+
101
107
  <div v-if="store.layoutMode && layout">
102
108
  <div class="flex flex-row gap-2">
103
109
  <label class="flex-1 text-text-400">{{ $t('Header')}}</label>
@@ -398,7 +404,9 @@ export default{
398
404
  excludeComponents: {
399
405
  type: Array,
400
406
  default: []
401
- }
407
+ },
408
+
409
+ useStyle: Boolean
402
410
 
403
411
  },
404
412