@mixd-id/web-scaffold 0.2.250801014 → 0.2.260801002
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/README.md +25 -1
- package/docs/components/AIDashboard.md +117 -32
- package/docs/components/Alert.md +3 -1
- package/docs/components/Card.md +5 -0
- package/docs/components/PivotList.md +207 -0
- package/docs/components/Textbox.md +20 -1
- package/docs/components/Tooltip.md +148 -0
- package/package.json +17 -61
- package/src/components/AIChat.vue +14 -5
- package/src/components/AIChatItem.vue +34 -3
- package/src/components/AIDashboard.vue +144 -98
- package/src/components/Alert.vue +58 -35
- package/src/components/Card.vue +55 -6
- package/src/components/Carousel.vue +1 -1
- package/src/{widgets → components}/CartSetting.vue +1 -0
- package/src/components/Chart.vue +2 -2
- package/src/components/Checkbox.vue +22 -24
- package/src/components/CodeEditor.vue +2 -0
- package/src/{widgets → components}/CollapsiblePanelSetting.vue +1 -0
- package/src/components/ColorPicker.vue +2 -2
- package/src/{widgets → components}/ComponentSetting2.vue +1 -1
- package/src/components/Confirm.vue +2 -0
- package/src/{widgets → components}/ContactForm.vue +1 -1
- package/src/components/CopyToClipboard.vue +0 -1
- package/src/components/Datepicker.vue +2 -0
- package/src/components/Datetimepicker.vue +1 -1
- package/src/components/Dropdown.vue +1 -1
- package/src/{widgets → components}/FeatureList.vue +1 -1
- package/src/components/Gmaps.vue +1 -1
- package/src/{widgets → components}/IconList.vue +1 -1
- package/src/components/Image.vue +1 -1
- package/src/components/ImagePreview.vue +32 -51
- package/src/components/List.vue +45 -8
- package/src/components/MarkdownEdit.vue +1 -1
- package/src/components/MarkdownPreview.vue +4 -1
- package/src/{widgets → components}/MenuItem1Setting.vue +1 -0
- package/src/components/Metric.vue +30 -7
- package/src/components/MultiDropdown.vue +3 -1
- package/src/{widgets → components}/MultiValueSetting.vue +2 -2
- package/src/{widgets → components}/MultiValueSetting2.vue +2 -2
- package/src/components/OTPField.vue +3 -1
- package/src/components/PivotList.vue +1239 -0
- package/src/{widgets → components}/PresetBar.vue +1 -1
- package/src/components/PresetSelectorFilterItem.vue +1 -1
- package/src/components/Radio.vue +1 -1
- package/src/{widgets → components}/Share.vue +1 -1
- package/src/components/SvgEditor.vue +1 -1
- package/src/components/Switch.vue +1 -1
- package/src/components/TextWithTag.vue +2 -2
- package/src/components/Textbox.vue +63 -5
- package/src/components/Toast.vue +2 -1
- package/src/components/Tooltip.vue +626 -0
- package/src/components/VirtualGrid.vue +2 -2
- package/src/components/VirtualTable.vue +4 -3
- package/src/{widgets → components}/WebDatasourceSelector.vue +2 -0
- package/src/{widgets → components}/WebLayoutSelector.vue +1 -1
- package/src/directives/tooltip.js +131 -0
- package/src/index.js +11 -235
- package/src/themes/default/index.js +16 -0
- package/src/utils/ai-dashboard.js +163 -38
- package/src/utils/helpers.mjs +52 -5
- package/src/utils/list.mjs +4 -1
- package/src/utils/pivot-formula.mjs +358 -0
- package/src/utils/pivot-list.mjs +557 -0
- package/src/utils/tooltip.mjs +243 -0
- package/src/utils/wss.js +26 -6
- package/src/utils/wss.mjs +29 -2
- /package/src/{widgets → components}/AhrefSetting.vue +0 -0
- /package/src/{widgets → components}/ArticleSetting.vue +0 -0
- /package/src/{widgets → components}/BackgroundColorSetting.vue +0 -0
- /package/src/{widgets → components}/BlockSetting.vue +0 -0
- /package/src/{widgets → components}/BorderColorSetting.vue +0 -0
- /package/src/{widgets → components}/ButtonSetting.vue +0 -0
- /package/src/{widgets → components}/CarouselSetting.vue +0 -0
- /package/src/{widgets → components}/ColumnSelector.vue +0 -0
- /package/src/{widgets → components}/ComponentSetting.vue +0 -0
- /package/src/{widgets → components}/ContactFormSetting.vue +0 -0
- /package/src/{widgets → components}/CountdownSetting.vue +0 -0
- /package/src/{widgets → components}/DataListSetting.vue +0 -0
- /package/src/{widgets → components}/EmbeddedVideo.vue +0 -0
- /package/src/{widgets → components}/EmbeddedVideoSetting.vue +0 -0
- /package/src/{widgets → components}/FAQ.vue +0 -0
- /package/src/{widgets → components}/FAQSetting.vue +0 -0
- /package/src/{widgets → components}/FeatureListSetting.vue +0 -0
- /package/src/{widgets → components}/FlexSetting.vue +0 -0
- /package/src/{widgets → components}/GridSetting.vue +0 -0
- /package/src/{widgets → components}/Header2.vue +0 -0
- /package/src/{widgets → components}/Header2Setting.vue +0 -0
- /package/src/{widgets → components}/IconListSetting.vue +0 -0
- /package/src/{widgets → components}/ImageSetting.vue +0 -0
- /package/src/{widgets → components}/LLMChat.vue +0 -0
- /package/src/{widgets → components}/LinkSetting.vue +0 -0
- /package/src/{widgets → components}/LinkSettingModal.vue +0 -0
- /package/src/{widgets → components}/ModalSetting.vue +0 -0
- /package/src/{widgets → components}/OGSettingModal.vue +0 -0
- /package/src/{widgets → components}/ParagraphSetting.vue +0 -0
- /package/src/{widgets → components}/PositionSetting.vue +0 -0
- /package/src/{widgets → components}/PresetBarPivot.vue +0 -0
- /package/src/{widgets → components}/PresetBarPivotColumnEdit.vue +0 -0
- /package/src/{widgets → components}/PresetBarPivotValueEdit.vue +0 -0
- /package/src/{widgets → components}/PresetSelector.vue +0 -0
- /package/src/{widgets → components}/Review.vue +0 -0
- /package/src/{widgets → components}/ReviewSetting.vue +0 -0
- /package/src/{widgets → components}/SearchModalSetting.vue +0 -0
- /package/src/{widgets → components}/ShareSetting.vue +0 -0
- /package/src/{widgets → components}/SvgSetting.vue +0 -0
- /package/src/{widgets → components}/TableSetting.vue +0 -0
- /package/src/{widgets → components}/TestimonialSetting.vue +0 -0
- /package/src/{widgets → components}/TextBlockSetting.vue +0 -0
- /package/src/{widgets → components}/ThumbnailSetting.vue +0 -0
- /package/src/{widgets → components}/WebComponentSelector.vue +0 -0
- /package/src/{widgets → components}/WebPageBuilder.vue +0 -0
- /package/src/{widgets → components}/YoutubeVideoSetting.vue +0 -0
package/src/components/Alert.vue
CHANGED
|
@@ -3,41 +3,44 @@
|
|
|
3
3
|
<Transition name="alert-outer">
|
|
4
4
|
<div v-if="isOpen" :class="$style.alert" ref="alert">
|
|
5
5
|
<Transition name="alert" @after-appear="onAfterAppear" appear>
|
|
6
|
-
<div :class="$style.cont1">
|
|
7
|
-
|
|
8
|
-
<div :class="$style.
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<p class="text-center break-words whitespace-pre-line" v-if="message">{{ message }}</p>
|
|
20
|
-
<p class="text-center break-words max-w-[420px] whitespace-pre-line" v-if="stack">{{ stack }}</p>
|
|
21
|
-
</div>
|
|
6
|
+
<div :class="$style.cont1" role="alertdialog" aria-modal="true">
|
|
7
|
+
|
|
8
|
+
<div :class="$style.body">
|
|
9
|
+
|
|
10
|
+
<div :class="$style.cont2">
|
|
11
|
+
<slot v-if="$slots['icon']" name="icon"></slot>
|
|
12
|
+
<svg v-else-if="alert.icon !== false" width="100" height="100" class="fill-red-500 shrink-0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 13.75C12.4142 13.75 12.75 13.4142 12.75 13V8.00001C12.75 7.5858 12.4142 7.25001 12 7.25001C11.5858 7.25001 11.25 7.5858 11.25 8.00001V13C11.25 13.4142 11.5858 13.75 12 13.75Z"/>
|
|
14
|
+
<path d="M13 16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15C12.5523 15 13 15.4477 13 16Z"/>
|
|
15
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 20.5C16.6944 20.5 20.5 16.6944 20.5 12C20.5 7.30558 16.6944 3.5 12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 16.6944 7.30558 20.5 12 20.5ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"/>
|
|
16
|
+
</svg>
|
|
17
|
+
<h5 :class="$style.title">{{ title }}</h5>
|
|
18
|
+
</div>
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
20
|
+
<div :class="$style.details">
|
|
21
|
+
<p class="text-center break-words whitespace-pre-line" v-if="message">{{ message }}</p>
|
|
22
|
+
<p class="text-center break-words whitespace-pre-line" v-if="stack">{{ stack }}</p>
|
|
26
23
|
</div>
|
|
27
|
-
<div v-else class="flex flex-col gap-4">
|
|
28
|
-
<div v-for="(v, k) in details">
|
|
29
|
-
<small class="font-bold">{{ k }}</small>
|
|
30
|
-
<div class="block break-all text-sm">{{ v }}</div>
|
|
31
|
-
</div>
|
|
32
24
|
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
<div :class="$style.details" v-if="details">
|
|
26
|
+
<div v-if="!showDetails" class="text-center">
|
|
27
|
+
<button type="button" class="text-primary" @click="showDetails = true">Open Details</button>
|
|
28
|
+
</div>
|
|
29
|
+
<div v-else class="flex flex-col gap-4">
|
|
30
|
+
<div v-for="(v, k) in details">
|
|
31
|
+
<small class="font-bold">{{ k }}</small>
|
|
32
|
+
<div class="block break-all text-sm">{{ v }}</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="self-stretch text-center">
|
|
36
|
+
<button type="button" class="text-primary text-sm" @click="copy">Copy Details</button>
|
|
37
|
+
</div>
|
|
35
38
|
</div>
|
|
36
39
|
</div>
|
|
40
|
+
|
|
37
41
|
</div>
|
|
38
42
|
|
|
39
|
-
<div>
|
|
40
|
-
<br />
|
|
43
|
+
<div :class="$style.footer">
|
|
41
44
|
<Button ref="btnOK" @click="onConfirm">
|
|
42
45
|
<strong class="px-4">
|
|
43
46
|
{{ buttonText }}
|
|
@@ -57,6 +60,8 @@ import {copyToClipboard, unPascalCase} from "../utils/helpers.mjs";
|
|
|
57
60
|
|
|
58
61
|
export default{
|
|
59
62
|
|
|
63
|
+
emits: [ 'appear' ],
|
|
64
|
+
|
|
60
65
|
methods: {
|
|
61
66
|
|
|
62
67
|
/**
|
|
@@ -70,10 +75,16 @@ export default{
|
|
|
70
75
|
this.alert = obj
|
|
71
76
|
this.isOpen = true
|
|
72
77
|
this.showDetails = false
|
|
78
|
+
if(typeof window !== 'undefined') window.addEventListener('keydown', this.onKeydown)
|
|
73
79
|
},
|
|
74
80
|
|
|
75
81
|
close(){
|
|
76
82
|
this.isOpen = false
|
|
83
|
+
if(typeof window !== 'undefined') window.removeEventListener('keydown', this.onKeydown)
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
onKeydown(e){
|
|
87
|
+
if(e.key === 'Escape') this.onConfirm()
|
|
77
88
|
},
|
|
78
89
|
|
|
79
90
|
copy(){
|
|
@@ -180,6 +191,10 @@ export default{
|
|
|
180
191
|
|
|
181
192
|
},
|
|
182
193
|
|
|
194
|
+
unmounted(){
|
|
195
|
+
if(typeof window !== 'undefined') window.removeEventListener('keydown', this.onKeydown)
|
|
196
|
+
},
|
|
197
|
+
|
|
183
198
|
data(){
|
|
184
199
|
return {
|
|
185
200
|
alert: {},
|
|
@@ -204,28 +219,36 @@ export default{
|
|
|
204
219
|
}
|
|
205
220
|
|
|
206
221
|
.alert>*{
|
|
207
|
-
@apply max-h-[
|
|
222
|
+
@apply max-h-[80vh] bg-base-400 dark:bg-base-300 rounded-xl;
|
|
208
223
|
@apply border-[1px] border-border-50;
|
|
209
224
|
@apply min-w-[280px] max-w-[80vw] md:max-w-[480px];
|
|
210
225
|
}
|
|
211
226
|
|
|
212
227
|
.cont1{
|
|
213
|
-
@apply flex flex-col
|
|
228
|
+
@apply flex flex-col p-6 gap-1 overflow-hidden;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.body{
|
|
232
|
+
@apply flex-1 min-h-0 min-w-0 overflow-y-auto flex flex-col items-center gap-1;
|
|
233
|
+
}
|
|
234
|
+
.body::-webkit-scrollbar {
|
|
235
|
+
display: none;
|
|
214
236
|
}
|
|
215
237
|
|
|
216
238
|
.cont2{
|
|
217
|
-
@apply flex flex-col items-center;
|
|
239
|
+
@apply flex flex-col items-center min-w-0 self-stretch;
|
|
218
240
|
}
|
|
219
241
|
|
|
220
242
|
.title{
|
|
221
|
-
@apply text-center;
|
|
243
|
+
@apply text-center break-words min-w-0 max-w-full;
|
|
222
244
|
}
|
|
223
245
|
|
|
224
246
|
.details{
|
|
225
|
-
@apply flex
|
|
247
|
+
@apply flex flex-col gap-4 min-h-[1.6rem] min-w-0 self-stretch;
|
|
226
248
|
}
|
|
227
|
-
|
|
228
|
-
|
|
249
|
+
|
|
250
|
+
.footer{
|
|
251
|
+
@apply shrink-0 pt-4 flex justify-center;
|
|
229
252
|
}
|
|
230
253
|
|
|
231
254
|
</style>
|
package/src/components/Card.vue
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
</slot>
|
|
21
21
|
|
|
22
|
-
<slot name="default" :context="context"></slot>
|
|
22
|
+
<slot name="default" :context="context" :caller="caller"></slot>
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
</Transition>
|
|
26
26
|
</Teleport>
|
|
27
27
|
<div v-else :class="computedClass">
|
|
28
|
-
<slot name="default" :context="context"></slot>
|
|
28
|
+
<slot name="default" :context="context" :caller="caller"></slot>
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
31
|
|
|
@@ -39,6 +39,8 @@ const onDismiss = (e) => {
|
|
|
39
39
|
|
|
40
40
|
document.querySelector('.bW9k').addEventListener('click', onDismiss)
|
|
41
41
|
|
|
42
|
+
const openCards = []
|
|
43
|
+
|
|
42
44
|
export default{
|
|
43
45
|
|
|
44
46
|
emits: [ 'show' ],
|
|
@@ -49,7 +51,8 @@ export default{
|
|
|
49
51
|
return [
|
|
50
52
|
this.float ? this.$style.modal : this.$style.static,
|
|
51
53
|
this.class,
|
|
52
|
-
this.computedState ? this.$style['state-open'] : ''
|
|
54
|
+
this.computedState ? this.$style['state-open'] : '',
|
|
55
|
+
this.blurred ? this.$style['state-blurred'] : ''
|
|
53
56
|
]
|
|
54
57
|
.join(' ')
|
|
55
58
|
.trim()
|
|
@@ -74,7 +77,9 @@ export default{
|
|
|
74
77
|
data(){
|
|
75
78
|
return {
|
|
76
79
|
_state: false,
|
|
77
|
-
context: {}
|
|
80
|
+
context: {},
|
|
81
|
+
caller: null,
|
|
82
|
+
blurred: false
|
|
78
83
|
}
|
|
79
84
|
},
|
|
80
85
|
|
|
@@ -125,6 +130,30 @@ export default{
|
|
|
125
130
|
}
|
|
126
131
|
},
|
|
127
132
|
|
|
133
|
+
// Registers this card as the topmost one, remembering whichever card was on
|
|
134
|
+
// top before it as the caller and blurring it.
|
|
135
|
+
attach(){
|
|
136
|
+
if(openCards.indexOf(this) > -1) return
|
|
137
|
+
|
|
138
|
+
this.caller = openCards[openCards.length - 1] ?? null
|
|
139
|
+
openCards.push(this)
|
|
140
|
+
|
|
141
|
+
if(this.caller) this.caller.blurred = true
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
detach(){
|
|
145
|
+
const index = openCards.indexOf(this)
|
|
146
|
+
if(index > -1) openCards.splice(index, 1)
|
|
147
|
+
|
|
148
|
+
if(this.caller){
|
|
149
|
+
// A caller can be shared, keep it blurred while any other card sits on it
|
|
150
|
+
this.caller.blurred = openCards.some(card => card.caller === this.caller)
|
|
151
|
+
this.caller = null
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
this.blurred = false
|
|
155
|
+
},
|
|
156
|
+
|
|
128
157
|
onAfterLeave(){
|
|
129
158
|
this.$nextTick(() => {
|
|
130
159
|
let overlay = document.querySelector('.bW9k')
|
|
@@ -142,6 +171,10 @@ export default{
|
|
|
142
171
|
this.mounted = true
|
|
143
172
|
},
|
|
144
173
|
|
|
174
|
+
unmounted(){
|
|
175
|
+
this.detach()
|
|
176
|
+
},
|
|
177
|
+
|
|
145
178
|
props:{
|
|
146
179
|
|
|
147
180
|
class: String,
|
|
@@ -177,6 +210,10 @@ export default{
|
|
|
177
210
|
handler(state){
|
|
178
211
|
if(!this.float) return
|
|
179
212
|
|
|
213
|
+
state ? this.attach() : this.detach()
|
|
214
|
+
|
|
215
|
+
if(state) this.$emit('show', { context: this.context, caller: this.caller })
|
|
216
|
+
|
|
180
217
|
let overlay = document.querySelector('.bW9k')
|
|
181
218
|
if(overlay){
|
|
182
219
|
if(state){
|
|
@@ -224,10 +261,13 @@ export default{
|
|
|
224
261
|
@apply fixed;
|
|
225
262
|
@apply bg-base-400 dark:bg-base-300;
|
|
226
263
|
@apply border-[1px] border-border-50 flex max-h-[90vh] max-w-full;
|
|
227
|
-
@apply rounded-xl overflow-hidden
|
|
264
|
+
@apply rounded-xl overflow-hidden;
|
|
228
265
|
@apply flex flex-col;
|
|
229
266
|
z-index: 101;
|
|
230
|
-
|
|
267
|
+
/* transform/opacity only — animating `all` drags `filter` into the
|
|
268
|
+
transition, which re-rasterizes the whole card on every frame */
|
|
269
|
+
transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1),
|
|
270
|
+
opacity 200ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
231
271
|
transform: scale(0);
|
|
232
272
|
opacity: 0;
|
|
233
273
|
}
|
|
@@ -236,6 +276,15 @@ export default{
|
|
|
236
276
|
opacity: 1;
|
|
237
277
|
}
|
|
238
278
|
|
|
279
|
+
/* The card that opened whichever card is currently on top. The blur is applied
|
|
280
|
+
in one step so the browser rasterizes it once and caches it; only the opacity
|
|
281
|
+
fades, which stays on the compositor. */
|
|
282
|
+
.modal.state-blurred,
|
|
283
|
+
.static.state-blurred{
|
|
284
|
+
@apply blur-[3px] pointer-events-none select-none;
|
|
285
|
+
opacity: .8;
|
|
286
|
+
}
|
|
287
|
+
|
|
239
288
|
.overlay{
|
|
240
289
|
@apply absolute z-20 left-0 bottom-0 top-0 right-0 bg-white/50 backdrop-blur-sm;
|
|
241
290
|
}
|
package/src/components/Chart.vue
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
import { Bar, Line, Doughnut, Pie } from 'vue-chartjs'
|
|
59
59
|
import Chart from 'chart.js/auto'
|
|
60
|
-
import PresetSelector from "
|
|
60
|
+
import PresetSelector from "./PresetSelector.vue";
|
|
61
61
|
import throttle from "lodash/throttle";
|
|
62
62
|
import dayjs from "dayjs";
|
|
63
63
|
|
|
@@ -72,7 +72,7 @@ export default{
|
|
|
72
72
|
props: {
|
|
73
73
|
config: {
|
|
74
74
|
type: Object,
|
|
75
|
-
default: {}
|
|
75
|
+
default: () => ({})
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
presetKey: undefined,
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
</Transition>
|
|
11
11
|
</span>
|
|
12
|
-
<
|
|
12
|
+
<template v-if="$slots.default">
|
|
13
13
|
<slot name="default"></slot>
|
|
14
|
-
</
|
|
14
|
+
</template>
|
|
15
15
|
</label>
|
|
16
16
|
</div>
|
|
17
17
|
</template>
|
|
@@ -22,15 +22,17 @@ import {parseBoolean} from "../utils/helpers.mjs";
|
|
|
22
22
|
|
|
23
23
|
export default {
|
|
24
24
|
|
|
25
|
+
emits: [ 'update:modelValue' ],
|
|
26
|
+
|
|
25
27
|
props:{
|
|
26
|
-
default: undefined,
|
|
27
|
-
modelValue: undefined,
|
|
28
|
-
value: undefined,
|
|
29
|
-
trueValue: undefined,
|
|
30
|
-
falseValue: undefined,
|
|
31
|
-
disabled: undefined,
|
|
28
|
+
default: { type: [ Boolean, String, Number ], default: undefined },
|
|
29
|
+
modelValue: { type: [ Boolean, String, Number, Array ], default: undefined },
|
|
30
|
+
value: { type: [ Boolean, String, Number ], default: undefined },
|
|
31
|
+
trueValue: { type: [ Boolean, String, Number ], default: undefined },
|
|
32
|
+
falseValue: { type: [ Boolean, String, Number ], default: undefined },
|
|
33
|
+
disabled: { type: [ Boolean, String ], default: undefined },
|
|
32
34
|
showIcon: {
|
|
33
|
-
type:
|
|
35
|
+
type: [ Boolean, String, Number ],
|
|
34
36
|
default: true
|
|
35
37
|
},
|
|
36
38
|
itemClass: String
|
|
@@ -87,35 +89,31 @@ export default {
|
|
|
87
89
|
|
|
88
90
|
onChange(e){
|
|
89
91
|
|
|
92
|
+
const checked = e.target.checked
|
|
90
93
|
let value
|
|
91
94
|
|
|
92
95
|
if(this.value !== undefined){
|
|
93
96
|
if(Array.isArray(this.modelValue)){
|
|
94
|
-
|
|
95
|
-
this.modelValue
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
else{
|
|
99
|
-
this.modelValue.splice(this.modelValue.indexOf(this.value), 1)
|
|
100
|
-
}
|
|
97
|
+
value = checked ?
|
|
98
|
+
[ ...new Set([ ...this.modelValue, this.value ]) ] :
|
|
99
|
+
this.modelValue.filter(v => v !== this.value)
|
|
101
100
|
}
|
|
102
|
-
else if(
|
|
101
|
+
else if(checked){
|
|
103
102
|
value = this.value
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
105
|
else if(this.trueValue !== undefined && this.falseValue !== undefined) {
|
|
107
106
|
if(Array.isArray(this.modelValue)){
|
|
108
|
-
if(
|
|
109
|
-
this.modelValue
|
|
110
|
-
this.modelValue.filter((value, index, self) => self.indexOf(value) === index)
|
|
107
|
+
if(checked){
|
|
108
|
+
value = [ ...new Set([ ...this.modelValue, this.trueValue ]) ]
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
else{
|
|
114
|
-
value =
|
|
112
|
+
value = checked ? this.trueValue : this.falseValue
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
115
|
else{
|
|
118
|
-
value =
|
|
116
|
+
value = checked
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
if(value !== undefined){
|
|
@@ -140,7 +138,7 @@ export default {
|
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
.comp label{
|
|
143
|
-
@apply flex flex-row items-
|
|
141
|
+
@apply flex flex-row items-center gap-2;
|
|
144
142
|
}
|
|
145
143
|
|
|
146
144
|
.comp label *{
|
|
@@ -160,7 +158,7 @@ export default {
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
.indicator{
|
|
163
|
-
@apply min-w-[21px] w-[21px] h-[21px] rounded-lg border-[1px] border-text-300 bg-base-
|
|
161
|
+
@apply min-w-[21px] w-[21px] h-[21px] rounded-lg border-[1px] border-text-300 bg-base-200;
|
|
164
162
|
@apply flex items-center justify-center overflow-hidden;
|
|
165
163
|
transition: border 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
166
164
|
}
|
|
@@ -232,7 +232,7 @@ export default {
|
|
|
232
232
|
// Predefined color swatches for class mode
|
|
233
233
|
colors: {
|
|
234
234
|
type: Array,
|
|
235
|
-
default: [
|
|
235
|
+
default: () => [
|
|
236
236
|
'primary-50', 'primary-100', 'primary-200', 'primary-300', 'primary-400', 'primary-500',
|
|
237
237
|
'primary-600', 'primary-700', 'primary-800', 'primary-900',
|
|
238
238
|
'gray-50', 'gray-100', 'gray-200', 'gray-300', 'gray-400', 'gray-500', 'gray-600', 'gray-700',
|
|
@@ -610,7 +610,7 @@ export default {
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
.input {
|
|
613
|
-
@apply flex-1 bg-base-
|
|
613
|
+
@apply flex-1 bg-base-200 rounded-md px-2 py-1 text-xs text-center border-[1px] border-border-100 outline-none;
|
|
614
614
|
min-width: 0;
|
|
615
615
|
}
|
|
616
616
|
|
|
@@ -348,7 +348,7 @@ export default{
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
.timeSelect{
|
|
351
|
-
@apply appearance-none bg-base-
|
|
351
|
+
@apply appearance-none bg-base-200 rounded-lg p-2 text-center outline-none;
|
|
352
352
|
@apply border-[1px] border-border-200 hover:border-border-300;
|
|
353
353
|
}
|
|
354
354
|
|
|
@@ -244,7 +244,7 @@ export default {
|
|
|
244
244
|
|
|
245
245
|
.dropdown{
|
|
246
246
|
@apply flex items-center rounded-lg overflow-hidden cursor-pointer relative;
|
|
247
|
-
@apply border-[1px] border-border-200 bg-base-
|
|
247
|
+
@apply border-[1px] border-border-200 bg-base-200;
|
|
248
248
|
}
|
|
249
249
|
.dropdown:not(.readonly){
|
|
250
250
|
@apply hover:border-border-300;
|
package/src/components/Gmaps.vue
CHANGED