@mixd-id/web-scaffold 0.1.230406140 → 0.1.230406141

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.230406140",
4
+ "version": "0.1.230406141",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -80,6 +80,64 @@ export default{
80
80
  }
81
81
  },
82
82
 
83
+ methods: {
84
+
85
+ open(context = {}){
86
+ this.context = context
87
+ this._state = true
88
+ },
89
+
90
+ close(){
91
+ this._state = false
92
+ },
93
+
94
+ onAfterLeave(){
95
+ let overlay = document.querySelector('.bW9k')
96
+ if(overlay){
97
+
98
+ let hasTrueState = false
99
+
100
+ for(let i = 0 ; i < overlay.children.length ; i++){
101
+ if(overlay.children[i].getAttribute('data-state') === '1'){
102
+ hasTrueState = true
103
+ }
104
+ }
105
+
106
+ if(!hasTrueState){
107
+ overlay.classList.remove('bW9l')
108
+ }
109
+
110
+ this.$emit('hide')
111
+ }
112
+ },
113
+
114
+ onDismiss(e){
115
+ if(this.computedState && this.dismissable && this.$refs.modal && e.target.classList.contains('bW9k')){
116
+ this.$emit('dismiss')
117
+ }
118
+ },
119
+
120
+ onKeyDown(e){
121
+ if(this.dismissable && this.$refs.modal && e.keyCode === 27){
122
+ this.$emit('dismiss')
123
+ }
124
+ },
125
+
126
+ setState(to){
127
+ if(to){
128
+ let overlay = document.querySelector('.bW9k')
129
+ if(overlay){
130
+ overlay.classList.add('bW9l')
131
+ }
132
+
133
+ registerModal(this)
134
+ }
135
+ else{
136
+ unRegisterModal(this)
137
+ }
138
+ }
139
+ },
140
+
83
141
  computed:{
84
142
 
85
143
  modalBodyClass(){
@@ -126,7 +184,15 @@ export default{
126
184
 
127
185
  computedState(to, from){
128
186
  this.setState(to)
129
- }
187
+ },
188
+
189
+ $route(to, from){
190
+ if(from.href !== to.href && !to.hash){
191
+ let overlay = document.querySelector('.bW9k')
192
+ if(overlay && overlay.classList.contains('bW9l'))
193
+ overlay.classList.remove('bW9l')
194
+ }
195
+ },
130
196
 
131
197
  },
132
198
 
@@ -141,63 +207,7 @@ export default{
141
207
  })
142
208
  },
143
209
 
144
- methods: {
145
-
146
- open(context = {}){
147
- this.context = context
148
- this._state = true
149
- },
150
-
151
- close(){
152
- this._state = false
153
- },
154
210
 
155
- onAfterLeave(){
156
- let overlay = document.querySelector('.bW9k')
157
- if(overlay){
158
-
159
- let hasTrueState = false
160
-
161
- for(let i = 0 ; i < overlay.children.length ; i++){
162
- if(overlay.children[i].getAttribute('data-state') === '1'){
163
- hasTrueState = true
164
- }
165
- }
166
-
167
- if(!hasTrueState){
168
- overlay.classList.remove('bW9l')
169
- }
170
-
171
- this.$emit('hide')
172
- }
173
- },
174
-
175
- onDismiss(e){
176
- if(this.computedState && this.dismissable && this.$refs.modal && e.target.classList.contains('bW9k')){
177
- this.$emit('dismiss')
178
- }
179
- },
180
-
181
- onKeyDown(e){
182
- if(this.dismissable && this.$refs.modal && e.keyCode === 27){
183
- this.$emit('dismiss')
184
- }
185
- },
186
-
187
- setState(to){
188
- if(to){
189
- let overlay = document.querySelector('.bW9k')
190
- if(overlay){
191
- overlay.classList.add('bW9l')
192
- }
193
-
194
- registerModal(this)
195
- }
196
- else{
197
- unRegisterModal(this)
198
- }
199
- }
200
- }
201
211
 
202
212
  }
203
213
 
@@ -8,7 +8,7 @@
8
8
  <div :class="computedContainerClass">
9
9
  <div v-for="item in items" class="flex gap-4" :class="computedItemClass">
10
10
  <div>
11
- <Image :src="imageUrl(item.imageUrl)" :class="`object-contain ${item.sizeClass}`" />
11
+ <Image :src="imageUrl(item.imageUrl)" :class="`object-contain ${item.sizeClass} rounded-xl`" />
12
12
  </div>
13
13
  <div class="flex-1 flex flex-col gap-1" v-if="item.title || item.description">
14
14
  <h5 v-if="item.title">{{ item.title }}</h5>
@@ -314,9 +314,9 @@
314
314
  <div v-if="currentItem" class="flex flex-col bg-base-400 dark:bg-base-300"
315
315
  :style="section3Style">
316
316
 
317
- <div class="p-6 bg-base-300">
317
+ <div class="p-6">
318
318
  <strong>
319
- {{ currentItem.type }}
319
+ {{ currentItem.type }}
320
320
  </strong>
321
321
  </div>
322
322