@mixd-id/web-scaffold 0.1.230406311 → 0.1.230406313

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.
Files changed (62) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +9 -1
  3. package/src/components/Carousel.vue +3 -3
  4. package/src/components/ColorPicker2.vue +1 -1
  5. package/src/components/Image.vue +5 -3
  6. package/src/components/List.vue +48 -13
  7. package/src/components/Modal.vue +2 -2
  8. package/src/components/Text.vue +34 -0
  9. package/src/components/Textbox.vue +1 -1
  10. package/src/components/VirtualTable.vue +124 -95
  11. package/src/index.js +22 -38
  12. package/src/main.js +0 -9
  13. package/src/mixin/component.js +2 -1
  14. package/src/utils/preset-selector.js +53 -24
  15. package/src/utils/preset-selector.mjs +21 -1
  16. package/src/utils/wss.js +6 -1
  17. package/src/utils/wss.mjs +2 -2
  18. package/src/widgets/PresetBar.vue +6 -0
  19. package/src/widgets/WebPageBuilder3.vue +3 -218
  20. package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +54 -0
  21. package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +75 -0
  22. package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +72 -0
  23. package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +72 -0
  24. package/src/widgets/WebPageBuilder4/BlurSetting.vue +72 -0
  25. package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +64 -0
  26. package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +75 -0
  27. package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +69 -0
  28. package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +72 -0
  29. package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +73 -0
  30. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +65 -0
  31. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +178 -0
  32. package/src/widgets/WebPageBuilder4/DisplaySetting.vue +76 -0
  33. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +71 -0
  34. package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +70 -0
  35. package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +74 -0
  36. package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +71 -0
  37. package/src/widgets/WebPageBuilder4/FlexSetting.vue +96 -0
  38. package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +69 -0
  39. package/src/widgets/WebPageBuilder4/GapSetting.vue +75 -0
  40. package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +68 -0
  41. package/src/widgets/WebPageBuilder4/GridSetting.vue +166 -0
  42. package/src/widgets/WebPageBuilder4/HeightSetting.vue +95 -0
  43. package/src/widgets/WebPageBuilder4/ImageSetting.vue +102 -0
  44. package/src/widgets/WebPageBuilder4/MarginSetting.vue +64 -0
  45. package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +82 -0
  46. package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +90 -0
  47. package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +81 -0
  48. package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +101 -0
  49. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +155 -0
  50. package/src/widgets/WebPageBuilder4/OpacitySetting.vue +77 -0
  51. package/src/widgets/WebPageBuilder4/OverflowSetting.vue +81 -0
  52. package/src/widgets/WebPageBuilder4/PaddingSetting.vue +53 -0
  53. package/src/widgets/WebPageBuilder4/PositionSetting.vue +191 -0
  54. package/src/widgets/WebPageBuilder4/PropertySetting.vue +176 -0
  55. package/src/widgets/WebPageBuilder4/TextSetting.vue +72 -0
  56. package/src/widgets/WebPageBuilder4/TreeView.vue +43 -0
  57. package/src/widgets/WebPageBuilder4/TreeViewItem.vue +298 -0
  58. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +141 -0
  59. package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +172 -0
  60. package/src/widgets/WebPageBuilder4/WidthSetting.vue +105 -0
  61. package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +72 -0
  62. package/src/widgets/WebPageBuilder4.vue +798 -0
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Max Width</label>
5
+ <Dropdown v-model="maxWidth[index]">
6
+ <option value="">Unset</option>
7
+ <option v-for="value in values" :value="`${viewType}${value[0]}`">
8
+ {{ value[1] }}
9
+ </option>
10
+ </Dropdown>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+
17
+ export default{
18
+
19
+ inject: [ 'viewTypes' ],
20
+
21
+ props: {
22
+
23
+ index: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+
28
+ value: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+
33
+ viewType: {
34
+ type: String,
35
+ required: true
36
+ },
37
+
38
+ },
39
+
40
+ computed: {
41
+
42
+ maxWidth(){
43
+ if(!Array.isArray(this.value.props.maxWidth))
44
+ this.value.props.maxWidth = this.viewTypes.map(_ => '')
45
+ return this.value.props.maxWidth
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'max-w-none', 'None' ],
54
+ [ 'max-w-0', '0' ],
55
+ [ 'max-w-xs', 'Extra Small' ],
56
+ [ 'max-w-sm', 'Small' ],
57
+ [ 'max-w-md', 'Normal' ],
58
+ [ 'max-w-lg', 'Large' ],
59
+ [ 'max-w-xl', 'Extra Large' ],
60
+ [ 'max-w-2xl', 'Extra Large 2' ],
61
+ [ 'max-w-3xl', 'Extra Large 3' ],
62
+ [ 'max-w-4xl', 'Extra Large 4' ],
63
+ [ 'max-w-screen-sm', 'Screen Small' ],
64
+ [ 'max-w-screen-md', 'Screen Normal' ],
65
+ [ 'max-w-screen-lg', 'Screen Large' ],
66
+ [ 'max-w-screen-xl', 'Screen Extra Large' ],
67
+ [ 'max-w-screen-2xl', 'Screen Extra Large 2' ],
68
+ [ 'max-w-[10vw]', '10vw' ],
69
+ [ 'max-w-[20vw]', '20vw' ],
70
+ [ 'max-w-[30vw]', '30vw' ],
71
+ [ 'max-w-[40vw]', '40vw' ],
72
+ [ 'max-w-[50vw]', '50vw' ],
73
+ [ 'max-w-[60vw]', '60vw' ],
74
+ [ 'max-w-[70vw]', '70vw' ],
75
+ [ 'max-w-[80vw]', '80vw' ],
76
+ [ 'max-w-[90vw]', '90vw' ],
77
+ ]
78
+ }
79
+ }
80
+
81
+ }
82
+
83
+ </script>
84
+
85
+ <style module>
86
+
87
+ .comp{
88
+ }
89
+
90
+ </style>
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Min Height</label>
5
+ <Dropdown v-model="minHeight[index]">
6
+ <option value="">Unset</option>
7
+ <option v-for="value in values" :value="`${viewType}${value[0]}`">
8
+ {{ value[1] }}
9
+ </option>
10
+ </Dropdown>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+
17
+ export default{
18
+
19
+ inject: [ 'viewTypes' ],
20
+
21
+ props: {
22
+
23
+ index: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+
28
+ value: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+
33
+ viewType: {
34
+ type: String,
35
+ required: true
36
+ },
37
+
38
+ },
39
+
40
+ computed: {
41
+
42
+ minHeight(){
43
+ if(!Array.isArray(this.value.props.minHeight))
44
+ this.value.props.minHeight = this.viewTypes.map(_ => '')
45
+ return this.value.props.minHeight
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'min-h-0', '0' ],
54
+ [ 'min-h-full', 'Full' ],
55
+ [ 'min-h-screen', 'Screen' ],
56
+ [ 'min-h-min', 'Min' ],
57
+ [ 'min-h-max', 'Max' ],
58
+ [ 'min-h-fit', 'Fit' ],
59
+ [ 'min-h-[90vh]', '90vh' ],
60
+ [ 'min-h-[80vh]', '80vh' ],
61
+ [ 'min-h-[70vh]', '70vh' ],
62
+ [ 'min-h-[60vh]', '60vh' ],
63
+ [ 'min-h-[50vh]', '50vh' ],
64
+ [ 'min-h-[40vh]', '40vh' ],
65
+ [ 'min-h-[30vh]', '30vh' ],
66
+ [ 'min-h-[20vh]', '20vh' ],
67
+ [ 'min-h-[10vh]', '10vh' ],
68
+ ]
69
+ }
70
+ }
71
+
72
+ }
73
+
74
+ </script>
75
+
76
+ <style module>
77
+
78
+ .comp{
79
+ }
80
+
81
+ </style>
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Min Width</label>
5
+ <Dropdown v-model="minWidth[index]">
6
+ <option value="">Unset</option>
7
+ <option v-for="value in values" :value="`${viewType}${value[0]}`">
8
+ {{ value[1] }}
9
+ </option>
10
+ </Dropdown>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+
17
+ export default{
18
+
19
+ inject: [ 'viewTypes' ],
20
+
21
+ props: {
22
+
23
+ index: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+
28
+ value: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+
33
+ viewType: {
34
+ type: String,
35
+ required: true
36
+ },
37
+
38
+ },
39
+
40
+ computed: {
41
+
42
+ minWidth(){
43
+ if(!Array.isArray(this.value.props.minWidth))
44
+ this.value.props.minWidth = this.viewTypes.map(_ => '')
45
+ return this.value.props.minWidth
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'min-w-none', 'None' ],
54
+ [ 'min-w-0', '0' ],
55
+ [ 'min-w-1', '1' ],
56
+ [ 'min-w-2', '2' ],
57
+ [ 'min-w-3', '3' ],
58
+ [ 'min-w-4', '4' ],
59
+ [ 'min-w-5', '5' ],
60
+ [ 'min-w-6', '6' ],
61
+ [ 'min-w-7', '7' ],
62
+ [ 'min-w-8', '8' ],
63
+ [ 'min-w-9', '9' ],
64
+ [ 'min-w-10', '10' ],
65
+ [ 'min-w-11', '11' ],
66
+ [ 'min-w-12', '12' ],
67
+ [ 'min-w-14', '14' ],
68
+ [ 'min-w-16', '16' ],
69
+ [ 'min-w-20', '20' ],
70
+ [ 'min-w-24', '24' ],
71
+ [ 'min-w-28', '28' ],
72
+ [ 'min-w-32', '32' ],
73
+ [ 'min-w-36', '36' ],
74
+ [ 'min-w-40', '40' ],
75
+ [ 'min-w-44', '44' ],
76
+ [ 'min-w-48', '48' ],
77
+ [ 'min-w-52', '52' ],
78
+ [ 'min-w-56', '56' ],
79
+ [ 'min-w-60', '60' ],
80
+ [ 'min-w-64', '64' ],
81
+ [ 'min-w-72', '72' ],
82
+ [ 'min-w-80', '80' ],
83
+ [ 'min-w-96', '96' ],
84
+ [ 'min-w-full', 'Full' ],
85
+ [ 'min-w-screen', 'Screen' ],
86
+ [ 'min-w-min', 'Min' ],
87
+ [ 'min-w-max', 'Max' ],
88
+ ]
89
+ }
90
+ }
91
+
92
+ }
93
+
94
+ </script>
95
+
96
+ <style module>
97
+
98
+ .comp{
99
+ }
100
+
101
+ </style>
@@ -0,0 +1,155 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+
4
+ <div class="flex flex-row gap-1">
5
+ <button type="button" @click="setType(0)">
6
+ <svg width="12" height="12" :class="type === 0 ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm16 400c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V80c0-8.8 7.2-16 16-16h352c8.8 0 16 7.2 16 16v352z"/></svg>
7
+ </button>
8
+ <button type="button" @click="setType(1)">
9
+ <svg width="12" height="12" :class="type === 1 ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M120 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h72a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H48a16 16 0 0 1-16-16V80a16 16 0 0 1 16-16h72a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8zm280 0h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a16 16 0 0 1 16 16v352a16 16 0 0 1-16 16h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"/></svg>
10
+ </button>
11
+ <button type="button" @click="setType(2)">
12
+ <svg width="12" height="12" :class="type === 2 ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80zm240-16v176H32V80c0-8.837 7.163-16 16-16h192zM32 432V272h208v176H48c-8.837 0-16-7.163-16-16zm240 16V272h208v160c0 8.837-7.163 16-16 16H272zm208-208H272V64h192c8.837 0 16 7.163 16 16v160z"/></svg>
13
+ </button>
14
+ </div>
15
+
16
+ <div class="flex flex-row gap-1" :class="`grid-cols-${type}`">
17
+ <select @change="applyValue"
18
+ v-model="value[0]"
19
+ :class="itemClass">
20
+ <option value="">-</option>
21
+ <option v-for="value in values"
22
+ :value="`${prefix}${keys[type][0]}${Array.isArray(value) ? value[0] : value}`">
23
+ {{ Array.isArray(value) ? value[1] : value }}
24
+ </option>
25
+ </select>
26
+
27
+ <select v-if="type > 0"
28
+ @change="applyValue"
29
+ v-model="value[1]"
30
+ :class="itemClass">
31
+ <option value="">-</option>
32
+ <option v-for="value in values"
33
+ :value="`${prefix}${keys[type][1]}${Array.isArray(value) ? value[0] : value}`">
34
+ {{ Array.isArray(value) ? value[1] : value }}
35
+ </option>
36
+ </select>
37
+
38
+ <select v-if="type > 1"
39
+ @change="applyValue"
40
+ v-model="value[2]"
41
+ :class="itemClass">
42
+ <option value="">-</option>
43
+ <option v-for="value in values"
44
+ :value="`${prefix}${keys[type][2]}${Array.isArray(value) ? value[0] : value}`">
45
+ {{ Array.isArray(value) ? value[1] : value }}
46
+ </option>
47
+ </select>
48
+
49
+ <select v-if="type > 1"
50
+ @change="applyValue"
51
+ v-model="value[3]"
52
+ :class="itemClass">
53
+ <option value="">-</option>
54
+ <option v-for="value in values"
55
+ :value="`${prefix}${keys[type][3]}${Array.isArray(value) ? value[0] : value}`">
56
+ {{ Array.isArray(value) ? value[1] : value }}
57
+ </option>
58
+ </select>
59
+ </div>
60
+
61
+ </div>
62
+ </template>
63
+
64
+ <script>
65
+
66
+ export default{
67
+
68
+ emits: [ 'change', 'update:modelValue' ],
69
+
70
+ props: {
71
+
72
+ itemClass: {
73
+ type: String,
74
+ default: 'max-w-[100px]'
75
+ },
76
+
77
+ modelValue: String,
78
+
79
+ keys: {
80
+ type: Array,
81
+ default: [
82
+ [ 'p-' ],
83
+ [ 'px-', 'py-' ],
84
+ [ 'pl-', 'pt-', 'pr-', 'pb-' ]
85
+ ]
86
+ },
87
+
88
+ prefix: String,
89
+
90
+ values: {
91
+ type: Array,
92
+ default: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
93
+ }
94
+
95
+ },
96
+
97
+ methods: {
98
+
99
+ applyValue(){
100
+ const length = this.value.filter(_ => _).length
101
+ if((this.type === 2 && length >= 4) || (length >= this.type + 1)){
102
+ this.$emit('update:modelValue', this.value.join(' '))
103
+ }
104
+ },
105
+
106
+ setType(type){
107
+ this.type = type
108
+ this.value = []
109
+ },
110
+
111
+ setValue(){
112
+ this.value = this.modelValue.split(' ')
113
+ this.type = this.value.length > 2 ? 2 : this.value.length > 1 ? 1 : 0
114
+ }
115
+
116
+ },
117
+
118
+ data(){
119
+ return {
120
+ type: 1,
121
+ value: []
122
+ }
123
+ },
124
+
125
+ mounted() {
126
+ this.setValue()
127
+ },
128
+
129
+ watch: {
130
+
131
+ modelValue(to){
132
+ this.setValue()
133
+ }
134
+ }
135
+
136
+ }
137
+
138
+ </script>
139
+
140
+ <style module>
141
+
142
+ .comp{
143
+ @apply flex flex-col gap-1 max-w-[160px];
144
+ }
145
+
146
+ .comp button{
147
+ @apply border-[1px] border-text-200 bg-text-100 rounded-lg p-1 px-3;
148
+ }
149
+
150
+ .comp select{
151
+ @apply appearance-none outline-none p-1 px-2 bg-transparent cursor-pointer w-full;
152
+ @apply border-[1px] border-text-200 rounded-lg;
153
+ }
154
+
155
+ </style>
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Opacity</label>
5
+ <Dropdown v-model="opacity[index]">
6
+ <option value="">Unset</option>
7
+ <option v-for="value in values" :value="`${viewType}${value[0]}`">
8
+ {{ value[1] }}
9
+ </option>
10
+ </Dropdown>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+
17
+ export default{
18
+
19
+ inject: [ 'viewTypes' ],
20
+
21
+ props: {
22
+
23
+ index: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+
28
+ value: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+
33
+ viewType: {
34
+ type: String,
35
+ required: true
36
+ },
37
+
38
+ },
39
+
40
+ computed: {
41
+
42
+ opacity(){
43
+ if(!Array.isArray(this.value.props.opacity))
44
+ this.value.props.opacity = this.viewTypes.map(_ => '')
45
+ return this.value.props.opacity
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'opacity-0', '0' ],
54
+ [ 'opacity-10', '10%' ],
55
+ [ 'opacity-20', '20%' ],
56
+ [ 'opacity-30', '30%' ],
57
+ [ 'opacity-40', '40%' ],
58
+ [ 'opacity-50', '50%' ],
59
+ [ 'opacity-60', '60%' ],
60
+ [ 'opacity-70', '70%' ],
61
+ [ 'opacity-80', '80%' ],
62
+ [ 'opacity-90', '90%' ],
63
+ [ 'opacity-100', '100%' ],
64
+ ]
65
+ }
66
+ }
67
+
68
+ }
69
+
70
+ </script>
71
+
72
+ <style module>
73
+
74
+ .comp{
75
+ }
76
+
77
+ </style>
@@ -0,0 +1,81 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Overflow</label>
5
+ <Dropdown v-model="overflow[index]">
6
+ <option value="">Unset</option>
7
+ <option v-for="value in values" :value="`${viewType}${value[0]}`">
8
+ {{ value[1] }}
9
+ </option>
10
+ </Dropdown>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+
17
+ export default{
18
+
19
+ inject: [ 'viewTypes' ],
20
+
21
+ props: {
22
+
23
+ index: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+
28
+ value: {
29
+ type: Object,
30
+ required: true
31
+ },
32
+
33
+ viewType: {
34
+ type: String,
35
+ required: true
36
+ },
37
+
38
+ },
39
+
40
+ computed: {
41
+
42
+ overflow(){
43
+ if(!Array.isArray(this.value.props.overflow))
44
+ this.value.props.overflow = this.viewTypes.map(_ => '')
45
+ return this.value.props.overflow
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'overflow-auto', 'Auto' ],
54
+ [ 'overflow-hidden', 'Hidden' ],
55
+ [ 'overflow-clip', 'Clip' ],
56
+ [ 'overflow-visible', 'Visible' ],
57
+ [ 'overflow-scroll', 'Scroll' ],
58
+ [ 'overflow-x-auto', 'Auto' ],
59
+ [ 'overflow-x-hidden', 'X Hidden' ],
60
+ [ 'overflow-y-auto', 'Y Auto' ],
61
+ [ 'overflow-y-hidden', 'Y Hidden' ],
62
+ [ 'overflow-x-clip', 'X Clip' ],
63
+ [ 'overflow-y-clip', 'Y Clip' ],
64
+ [ 'overflow-x-visible', 'X Visible' ],
65
+ [ 'overflow-y-visible', 'Y Visible' ],
66
+ [ 'overflow-x-scroll', 'X Scroll' ],
67
+ [ 'overflow-y-scroll', 'Y Scroll' ],
68
+ ]
69
+ }
70
+ }
71
+
72
+ }
73
+
74
+ </script>
75
+
76
+ <style module>
77
+
78
+ .comp{
79
+ }
80
+
81
+ </style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row">
4
+ <label class="flex-1">Padding</label>
5
+ <MultiValueSetting class="items-end"
6
+ item-class="max-w-[40px]"
7
+ v-model="padding[index]"
8
+ :prefix="viewType" />
9
+ </div>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+
15
+ import MultiValueSetting from "./MultiValueSetting.vue";
16
+
17
+ export default {
18
+ components: {MultiValueSetting},
19
+
20
+ inject: ['viewTypes'],
21
+
22
+ props: {
23
+
24
+ value: {
25
+ type: Object,
26
+ required: true
27
+ },
28
+
29
+ index: Number,
30
+ viewType: String,
31
+
32
+ },
33
+
34
+ computed: {
35
+
36
+ padding() {
37
+ if (!Array.isArray(this.value.props.padding))
38
+ this.value.props.padding = this.viewTypes.map(_ => '')
39
+ return this.value.props.padding
40
+ }
41
+
42
+ }
43
+
44
+ }
45
+
46
+ </script>
47
+
48
+ <style module>
49
+
50
+ .comp {
51
+ }
52
+
53
+ </style>