@mixd-id/web-scaffold 0.1.240411025 → 0.1.240411027

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.240411025",
4
+ "version": "0.1.240411027",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -1,64 +1,66 @@
1
1
  <template>
2
2
  <div :class="$style.comp">
3
3
 
4
- <div>
5
- <div class="flex flex-row gap-2">
6
- <label class="flex-1 text-text-400">Icons</label>
7
- <button type="button" class="text-primary"
8
- @click="addIcon()">Add Icon</button>
9
- </div>
10
- <ListItem :items="item.props.icons" class="mt-4" body-class="divide-y divide-text-50"
11
- @reorder="(from, to) => { item.props.icons.splice(to, 0, item.props.icons.splice(from, 1)[0]); apply() }">
12
- <template v-slot="{ item, index }">
13
- <div class="flex flex-row gap-1 p-2 bg-text-50 rounded-md mb-1">
14
- <div data-reorder>
15
- <svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>
16
- </div>
17
- <div class="flex-1 flex flex-row gap-1" @click="openIcon(item)">
18
- <Image :src="imageSrc(item)"
19
- class="w-[36px] aspect-square rounded-lg" />
20
- <div class="flex-1 flex flex-col px-3 leading-0">
21
- <p class="text-ellipsis overflow-hidden whitespace-nowrap">{{ item.text }}</p>
22
- <small class="text-ellipsis overflow-hidden whitespace-nowrap">{{ item.target }}</small>
23
- </div>
24
- </div>
25
- <div>
26
- <button type="button" @click="removeIcon(index)">
27
- <svg class="fill-text-300 hover:fill-red-500" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>
28
- </button>
29
- </div>
30
- </div>
31
- </template>
32
- </ListItem>
33
- </div>
34
-
35
- <div class="flex flex-row items-center gap-4">
36
- <label class="flex-1 text-text-400">Columns</label>
37
- <Dropdown v-for="(_viewType, idx) in viewTypes" class="w-[80px]"
38
- v-model="item.props.columns[idx]"
39
- v-show="_viewType.value === viewType"
40
- @change="apply">
41
- <option :value="`${viewType}grid-cols-1`">1</option>
42
- <option :value="`${viewType}grid-cols-2`">2</option>
43
- <option :value="`${viewType}grid-cols-3`">3</option>
44
- <option :value="`${viewType}grid-cols-4`">4</option>
45
- <option :value="`${viewType}grid-cols-5`">5</option>
46
- <option :value="`${viewType}grid-cols-6`">6</option>
47
- <option :value="`${viewType}grid-cols-7`">7</option>
48
- <option :value="`${viewType}grid-cols-8`">8</option>
49
- <option :value="`${viewType}grid-cols-9`">9</option>
50
- <option :value="`${viewType}grid-cols-10`">10</option>
51
- <option :value="`${viewType}grid-cols-11`">11</option>
52
- <option :value="`${viewType}grid-cols-12`">12</option>
53
- </Dropdown>
54
- </div>
55
-
56
- <ComponentSetting ref="componentSetting"
57
- :item="item"
58
- :view-type="viewType"
59
- :view-types="viewTypes"
60
- defaultDisplay="grid"
61
- @change="apply" />
4
+ <div class="p-6 py-4 flex flex-col gap-4">
5
+ <div>
6
+ <div class="flex flex-row gap-2">
7
+ <label class="flex-1 text-text-400">Icons</label>
8
+ <button type="button" class="text-primary"
9
+ @click="addIcon()">Add Icon</button>
10
+ </div>
11
+ <ListItem :items="item.props.icons" class="mt-4" body-class="divide-y divide-text-50"
12
+ @reorder="(from, to) => { item.props.icons.splice(to, 0, item.props.icons.splice(from, 1)[0]); apply() }">
13
+ <template v-slot="{ item, index }">
14
+ <div class="flex flex-row gap-1 p-2 bg-text-50 rounded-md mb-1">
15
+ <div data-reorder>
16
+ <svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>
17
+ </div>
18
+ <div class="flex-1 flex flex-row gap-1" @click="openIcon(item)">
19
+ <Image :src="imageSrc(item)"
20
+ class="w-[36px] aspect-square rounded-lg" />
21
+ <div class="flex-1 flex flex-col px-3 leading-0">
22
+ <p class="text-ellipsis overflow-hidden whitespace-nowrap">{{ item.text }}</p>
23
+ <small class="text-ellipsis overflow-hidden whitespace-nowrap">{{ item.target }}</small>
24
+ </div>
25
+ </div>
26
+ <div>
27
+ <button type="button" @click="removeIcon(index)">
28
+ <svg class="fill-text-300 hover:fill-red-500" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>
29
+ </button>
30
+ </div>
31
+ </div>
32
+ </template>
33
+ </ListItem>
34
+ </div>
35
+
36
+ <div class="flex flex-row items-center gap-4">
37
+ <label class="flex-1 text-text-400">Columns</label>
38
+ <Dropdown v-for="(_viewType, idx) in viewTypes" class="w-[80px]"
39
+ v-model="item.props.columns[idx]"
40
+ v-show="_viewType.value === viewType"
41
+ @change="apply">
42
+ <option :value="`${viewType}grid-cols-1`">1</option>
43
+ <option :value="`${viewType}grid-cols-2`">2</option>
44
+ <option :value="`${viewType}grid-cols-3`">3</option>
45
+ <option :value="`${viewType}grid-cols-4`">4</option>
46
+ <option :value="`${viewType}grid-cols-5`">5</option>
47
+ <option :value="`${viewType}grid-cols-6`">6</option>
48
+ <option :value="`${viewType}grid-cols-7`">7</option>
49
+ <option :value="`${viewType}grid-cols-8`">8</option>
50
+ <option :value="`${viewType}grid-cols-9`">9</option>
51
+ <option :value="`${viewType}grid-cols-10`">10</option>
52
+ <option :value="`${viewType}grid-cols-11`">11</option>
53
+ <option :value="`${viewType}grid-cols-12`">12</option>
54
+ </Dropdown>
55
+ </div>
56
+ </div>
57
+
58
+ <ComponentSetting2 :item="item"
59
+ :view-type="viewType"
60
+ :view-types="viewTypes"
61
+ :view-index="viewIndex"
62
+ defaultDisplay="block"
63
+ @change="$emit('change')" />
62
64
 
63
65
  <Modal ref="iconModal" width="400" height="320">
64
66
  <template v-slot:head>
@@ -115,14 +117,16 @@ export default{
115
117
 
116
118
  props: {
117
119
 
118
- item: {
119
- type: Object,
120
- required: true
121
- },
120
+ item: {
121
+ type: Object,
122
+ required: true
123
+ },
124
+
125
+ viewType: String,
122
126
 
123
- viewType: String,
127
+ viewIndex: Number,
124
128
 
125
- viewTypes: Array,
129
+ viewTypes: Array,
126
130
 
127
131
  },
128
132
 
@@ -178,7 +182,7 @@ export default{
178
182
  <style module>
179
183
 
180
184
  .comp{
181
- @apply flex flex-col gap-4;
185
+ @apply flex flex-col divide-y divide-text-50;
182
186
  }
183
187
 
184
188
  </style>