@mixd-id/web-scaffold 0.1.230406083 → 0.1.230406085

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.230406083",
4
+ "version": "0.1.230406085",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -21,8 +21,7 @@ export default{
21
21
  compClass(){
22
22
  return [
23
23
  this.$style.comp,
24
- this.extClass,
25
- 'text-xl'
24
+ this.extClass
26
25
  ]
27
26
  .join(' ')
28
27
  },
@@ -116,6 +116,11 @@
116
116
  <option :value="`${viewType}max-w-2xl`">Extra Large 2</option>
117
117
  <option :value="`${viewType}max-w-3xl`">Extra Large 3</option>
118
118
  <option :value="`${viewType}max-w-4xl`">Extra Large 4</option>
119
+ <option :value="`${viewType}max-w-screen-sm`">Screen - Small</option>
120
+ <option :value="`${viewType}max-w-screen-md`">Screen - Medium</option>
121
+ <option :value="`${viewType}max-w-screen-lg`">Screen - Large</option>
122
+ <option :value="`${viewType}max-w-screen-xl`">Screen - Extra Large</option>
123
+ <option :value="`${viewType}max-w-screen-2xl`">Screen - Extra Large 2</option>
119
124
  </Dropdown>
120
125
  </div>
121
126
  </div>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :class="compClass">
3
3
  <div v-if="id" :id="id" :class="$style.anchor"></div>
4
- <h3>{{ title ?? 'Untitled' }}</h3>
4
+ <h3>{{ title ?? '' }}</h3>
5
5
  <p v-if="description" class="mt-2 text-lg">{{ description }}</p>
6
6
  <div class="grid gap-6 mt-8" :class="computedClass">
7
7
  <div v-for="item in items" class="flex gap-4" :class="computedItem">
@@ -18,7 +18,6 @@
18
18
  </div>
19
19
 
20
20
  <div class="grid grid-cols-2 gap-4">
21
-
22
21
  <div>
23
22
  <label class="text-text-400">Font</label>
24
23
  <Dropdown v-for="(_, index) in viewTypes"
@@ -32,6 +31,26 @@
32
31
  </Dropdown>
33
32
  </div>
34
33
 
34
+ <div>
35
+ <label class="text-text-400">Size</label>
36
+ <Dropdown v-for="(_, index) in viewTypes"
37
+ v-show="_.value === viewType"
38
+ v-model="fontSize[index]"
39
+ @change="$emit('change')">
40
+ <option :value="`${viewType}text-xs`">Extra Small</option>
41
+ <option :value="`${viewType}text-sm`">Small</option>
42
+ <option :value="`${viewType}text-base`">Normal</option>
43
+ <option :value="`${viewType}text-lg`">Large</option>
44
+ <option :value="`${viewType}text-xl`">Extra Large</option>
45
+ <option :value="`${viewType}text-2xl`">Extra Large 2</option>
46
+ <option :value="`${viewType}text-3xl`">Extra Large 3</option>
47
+ <option :value="`${viewType}text-4xl`">Extra Large 4</option>
48
+ <option :value="`${viewType}text-5xl`">Extra Large 5</option>
49
+ <option :value="`${viewType}text-6xl`">Extra Large 6</option>
50
+ <option value="">Not Set</option>
51
+ </Dropdown>
52
+ </div>
53
+
35
54
  <div>
36
55
  <label class="text-text-400">Weight</label>
37
56
  <Dropdown v-for="(_, index) in viewTypes"
@@ -113,6 +132,13 @@ export default{
113
132
  return this.item.props.fontFamily
114
133
  },
115
134
 
135
+ fontSize(){
136
+ if(!Array.isArray(this.item.props.fontSize))
137
+ this.item.props.fontSize = []
138
+
139
+ return this.item.props.fontSize
140
+ },
141
+
116
142
  fontWeight(){
117
143
  if(!Array.isArray(this.item.props.fontWeight))
118
144
  this.item.props.fontWeight = []
@@ -49,7 +49,7 @@ export default{
49
49
  },
50
50
 
51
51
  currentUrl(){
52
- return `${import.meta.env.VITE_WEB_HOST}${this.$route.fullPath}`
52
+ return `${import.meta.env.VITE_WEB_HOST}${this.$route.path}`
53
53
  },
54
54
 
55
55
  fbShareUrl(){
@@ -26,7 +26,7 @@
26
26
  <label class="text-text-400">Size</label>
27
27
  <Dropdown v-for="(_, index) in viewTypes"
28
28
  v-show="_.value === viewType"
29
- v-model="item.props.fontSize[index]"
29
+ v-model="fontSize[index]"
30
30
  @change="$emit('change')">
31
31
  <option :value="`${viewType}text-xs`">Extra Small</option>
32
32
  <option :value="`${viewType}text-sm`">Small</option>
@@ -110,6 +110,13 @@ export default{
110
110
  return this.item.props.fontFamily
111
111
  },
112
112
 
113
+ fontSize(){
114
+ if(!Array.isArray(this.item.props.fontSize))
115
+ this.item.props.fontSize = []
116
+
117
+ return this.item.props.fontSize
118
+ },
119
+
113
120
  fontWeight(){
114
121
  if(!Array.isArray(this.item.props.fontWeight))
115
122
  this.item.props.fontWeight = []
@@ -412,10 +412,7 @@ export default{
412
412
  obj = JSON.parse(JSON.stringify(obj))
413
413
 
414
414
  Object.assign(obj.props, {
415
- enabled: true,
416
- //padding: [],
417
- margin: [],
418
- display: [ true, true ]
415
+ enabled: true
419
416
  })
420
417
 
421
418
  obj.uid = md5(obj.type + new Date().getTime())
@@ -795,6 +792,7 @@ export default{
795
792
  ...this.moreComponents
796
793
  ]
797
794
  .filter((_) => !this.excludeComponents.includes(_.type))
795
+ .sort((a, b) => a.type > b.type ? 1 : -1)
798
796
  }
799
797
 
800
798
  },