@mixd-id/web-scaffold 0.1.230406254 → 0.1.230406256
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 +1 -1
- package/src/components/Alert.vue +4 -1
- package/src/components/Confirm.vue +4 -1
- package/src/components/ContextMenu.vue +9 -5
- package/src/components/ImportModal.vue +3 -3
- package/src/components/List.vue +5 -5
- package/src/components/ListView.vue +1 -1
- package/src/components/Modal.vue +5 -2
- package/src/components/Radio.vue +1 -1
- package/src/components/Textbox.vue +1 -1
- package/src/themes/default/index.js +32 -3
package/package.json
CHANGED
package/src/components/Alert.vue
CHANGED
|
@@ -190,9 +190,12 @@ export default{
|
|
|
190
190
|
|
|
191
191
|
.alert{
|
|
192
192
|
@apply fixed top-0 left-0 flex w-screen h-screen;
|
|
193
|
-
@apply items-center justify-center bg-
|
|
193
|
+
@apply items-center justify-center bg-white/50 backdrop-blur-md;
|
|
194
194
|
z-index: 60;
|
|
195
195
|
}
|
|
196
|
+
[data-theme="dark"] .alert{
|
|
197
|
+
@apply bg-black/50;
|
|
198
|
+
}
|
|
196
199
|
|
|
197
200
|
.alert>*{
|
|
198
201
|
@apply max-h-[60vh] overflow-y-auto bg-base-500 rounded-xl;
|
|
@@ -112,9 +112,12 @@ export default{
|
|
|
112
112
|
|
|
113
113
|
.confirm{
|
|
114
114
|
@apply fixed top-0 left-0 flex w-screen h-screen px-8;
|
|
115
|
-
@apply items-center justify-center bg-
|
|
115
|
+
@apply items-center justify-center bg-white/50 backdrop-blur-md;
|
|
116
116
|
z-index: 60;
|
|
117
117
|
}
|
|
118
|
+
[data-theme="dark"] .confirm{
|
|
119
|
+
@apply bg-black/50;
|
|
120
|
+
}
|
|
118
121
|
|
|
119
122
|
.confirm>*{
|
|
120
123
|
@apply max-h-[60vh] overflow-y-auto bg-base-500 rounded-xl;
|
|
@@ -65,7 +65,8 @@ export default {
|
|
|
65
65
|
computedStyle: null,
|
|
66
66
|
isOpen: false,
|
|
67
67
|
context: null,
|
|
68
|
-
closing: false
|
|
68
|
+
closing: false,
|
|
69
|
+
currentCaller: null
|
|
69
70
|
}
|
|
70
71
|
},
|
|
71
72
|
|
|
@@ -114,7 +115,8 @@ export default {
|
|
|
114
115
|
|
|
115
116
|
open(caller, context){
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
const originalCaller = caller
|
|
119
|
+
if(this.isOpen && this.currentCaller !== caller){
|
|
118
120
|
return this.close(() => {
|
|
119
121
|
window.setTimeout(() => {
|
|
120
122
|
this.open(caller, context)
|
|
@@ -126,7 +128,7 @@ export default {
|
|
|
126
128
|
this.isOpen = true
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
|
|
131
|
+
caller = caller ?? this.caller
|
|
130
132
|
|
|
131
133
|
if(caller){
|
|
132
134
|
|
|
@@ -248,6 +250,8 @@ export default {
|
|
|
248
250
|
this.onOpen()
|
|
249
251
|
})
|
|
250
252
|
}
|
|
253
|
+
|
|
254
|
+
this.currentCaller = originalCaller
|
|
251
255
|
}
|
|
252
256
|
else{
|
|
253
257
|
console.error('Undefined caller for context menu')
|
|
@@ -301,7 +305,7 @@ export default {
|
|
|
301
305
|
<style module>
|
|
302
306
|
|
|
303
307
|
.contextMenu{
|
|
304
|
-
@apply fixed z-20
|
|
308
|
+
@apply fixed z-20 panel-500 min-w-[150px] overflow-y-auto rounded-xl;
|
|
305
309
|
@apply border-[2px] border-text-50 shadow-2xl whitespace-nowrap;
|
|
306
310
|
transition: all 150ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
307
311
|
opacity: 0;
|
|
@@ -315,7 +319,7 @@ export default {
|
|
|
315
319
|
@media screen(md){
|
|
316
320
|
|
|
317
321
|
.contextMenu{
|
|
318
|
-
@apply fixed z-20
|
|
322
|
+
@apply fixed z-20 panel-500 min-w-[150px] overflow-y-auto rounded-lg;
|
|
319
323
|
@apply border-[1px] border-text-50 shadow-2xl whitespace-nowrap;
|
|
320
324
|
transition: all 150ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
321
325
|
opacity: 0;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Modal :state="isOpen" width="480" height="560">
|
|
3
3
|
<template v-slot:head>
|
|
4
|
-
<div class="relative
|
|
5
|
-
<div v-if="step !== 3">
|
|
4
|
+
<div class="relative flex flex-row">
|
|
5
|
+
<div v-if="step !== 3" class="flex-1 p-6 leading-relaxed">
|
|
6
6
|
<h3>{{ title }}</h3>
|
|
7
7
|
<slot v-if="step === 1 && 'description' in $slots" name="description"></slot>
|
|
8
8
|
<p v-else-if="step === 1" class="mt-1 text-text-400" v-html="description"></p>
|
|
9
9
|
<slot v-else-if="step === 2 && 'description2' in $slots" name="description2"></slot>
|
|
10
10
|
<p v-else-if="step === 2" class="mt-1 text-text-400" v-html="description2"></p>
|
|
11
11
|
</div>
|
|
12
|
-
<div class="
|
|
12
|
+
<div class="p-2 pl-0">
|
|
13
13
|
<button type="button" class="p-2" @click="isOpen = false">
|
|
14
14
|
<svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
15
15
|
<path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
|
package/src/components/List.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
class="flex-1 flex flex-row">
|
|
5
5
|
|
|
6
6
|
<div v-if="computedPresetMode === 'sidebar' && config.sidebarOpen"
|
|
7
|
-
class="relative flex flex-col border-r-[1px] border-text-50
|
|
7
|
+
class="relative flex flex-col border-r-[1px] border-text-50 panel-400"
|
|
8
8
|
:style="sidebarWidth">
|
|
9
9
|
|
|
10
10
|
<PresetBar :config="config"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<div class="flex flex-row gap-2 gap-1" v-if="Boolean(toolbar)">
|
|
51
|
-
<Textbox class="flex-1
|
|
51
|
+
<Textbox class="flex-1 md:w-[240px]" placeholder="Search..." clearable="1"
|
|
52
52
|
v-model="preset.search"
|
|
53
53
|
@clear="delete preset.search; load()"
|
|
54
54
|
@keyup.enter="load">
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
|
|
86
86
|
<VirtualTable v-if="presetView === 'table'"
|
|
87
87
|
:columns="columns"
|
|
88
|
-
class="flex-1 rounded-lg
|
|
88
|
+
class="flex-1 rounded-lg panel-400"
|
|
89
89
|
:items="data.items"
|
|
90
90
|
@scroll-end="loadNext">
|
|
91
91
|
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
:config="config">
|
|
111
111
|
<template #item="{ item }">
|
|
112
112
|
<slot name="gridItem" :item="item">
|
|
113
|
-
<div class="flex flex-row
|
|
113
|
+
<div class="flex flex-row panel-400 rounded-lg overflow-hidden md:rounded-lg overflow-hidden">
|
|
114
114
|
<div>
|
|
115
115
|
<Image :src="item.imageUrl" class="bg-text-50 w-[64px] h-[64px] rounded-lg" />
|
|
116
116
|
</div>
|
|
@@ -344,7 +344,7 @@ export default{
|
|
|
344
344
|
id: items.map(item => item.id)
|
|
345
345
|
})
|
|
346
346
|
.then(({ items:nextItems }) => {
|
|
347
|
-
nextItems.forEach(item => this.$util.
|
|
347
|
+
nextItems.forEach(item => this.$util.unshift(this.data.items, item))
|
|
348
348
|
const destroyedItems = items.filter(_ => !nextItems.find(i => i.id === _.id))
|
|
349
349
|
this.$util.remove(this.data.items, destroyedItems)
|
|
350
350
|
})
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
ref="table1"
|
|
134
134
|
:columns="presetColumns"
|
|
135
135
|
:items="items"
|
|
136
|
-
class="flex-1
|
|
136
|
+
class="flex-1 panel-400"
|
|
137
137
|
@scroll-end="loadNext">
|
|
138
138
|
<template v-for="column in presetColumns" #[colOf(column.key)]="{}">
|
|
139
139
|
<div :class="getHeader(column)" @click="openColumnOptions(column.key, $event.target.closest('.' + $style.header))">
|
package/src/components/Modal.vue
CHANGED
|
@@ -288,13 +288,16 @@ export default{
|
|
|
288
288
|
|
|
289
289
|
.bW9k{
|
|
290
290
|
@apply z-20 hidden w-[100vw] h-[100vh];
|
|
291
|
-
@apply bg-
|
|
291
|
+
@apply bg-white/50 backdrop-blur-md;
|
|
292
292
|
position: fixed;
|
|
293
293
|
top: 0;
|
|
294
294
|
left: 0;
|
|
295
295
|
bottom: 0;
|
|
296
296
|
right: 0;
|
|
297
297
|
}
|
|
298
|
+
[data-theme="dark"] .bW9k{
|
|
299
|
+
@apply bg-black/50;
|
|
300
|
+
}
|
|
298
301
|
.bW9l{
|
|
299
302
|
@apply flex items-center justify-center;
|
|
300
303
|
}
|
|
@@ -305,7 +308,7 @@ export default{
|
|
|
305
308
|
|
|
306
309
|
.modal{
|
|
307
310
|
@apply fixed;
|
|
308
|
-
@apply
|
|
311
|
+
@apply panel-400;
|
|
309
312
|
@apply border-[1px] border-text-50 z-20 flex max-h-[90vh];
|
|
310
313
|
@apply rounded-xl overflow-hidden transition-all;
|
|
311
314
|
}
|
package/src/components/Radio.vue
CHANGED
|
@@ -85,7 +85,7 @@ export default{
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.indicator{
|
|
88
|
-
@apply w-[21px] h-[21px] border-[1px] rounded-full border-text-200
|
|
88
|
+
@apply w-[21px] h-[21px] border-[1px] rounded-full border-text-200 panel-500;
|
|
89
89
|
@apply flex items-center justify-center overflow-hidden;
|
|
90
90
|
transition: border 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
91
91
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const Plugin = require('tailwindcss/plugin')
|
|
2
2
|
|
|
3
|
-
const plugin = Plugin(function({ addBase, config, theme }) {
|
|
3
|
+
const plugin = Plugin(function({ addBase, addUtilities, config, theme }) {
|
|
4
4
|
|
|
5
5
|
addBase({
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
16
16
|
"--h-cp": '2.7rem',
|
|
17
17
|
"--h-cp-lg": '3.6rem',
|
|
18
18
|
|
|
19
|
+
'--base-50': '235, 237, 240',
|
|
19
20
|
'--base-300': '235, 237, 240',
|
|
20
21
|
'--base-400': '245, 247, 250',
|
|
21
22
|
'--base-500': '255, 255, 255',
|
|
@@ -100,7 +101,7 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
100
101
|
'text-rendering': 'optimizeLegibility',
|
|
101
102
|
'fontSize': '15px',
|
|
102
103
|
'touchAction': "pan-x pan-y",
|
|
103
|
-
'backgroundColor': '
|
|
104
|
+
'backgroundColor': 'rgb(var(--base-300))'
|
|
104
105
|
},
|
|
105
106
|
|
|
106
107
|
'@media screen and (orientation: portrait)': {
|
|
@@ -172,6 +173,10 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
172
173
|
transform: 'scale(1)',
|
|
173
174
|
},
|
|
174
175
|
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
addUtilities({
|
|
179
|
+
|
|
175
180
|
'.slidedown-enter-active, .slidedown-leave-active': {
|
|
176
181
|
transition: 'all 300ms cubic-bezier(0.25, 1, 0.5, 1)',
|
|
177
182
|
transform: 'translate3d(0, 0, 0)'
|
|
@@ -220,7 +225,31 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
220
225
|
'.slideout-enter-from, .slideout-leave-to': {
|
|
221
226
|
opacity: 0,
|
|
222
227
|
transform: 'scale(.9)'
|
|
223
|
-
}
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
'.panel-50': {
|
|
231
|
+
'--webkit-backdrop-filter': 'var(--panel-50-backdrop-filter)',
|
|
232
|
+
'backdrop-filter': 'var(--panel-50-backdrop-filter)',
|
|
233
|
+
'background-color': 'rgb(var(--base-50))',
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
'.panel-300': {
|
|
237
|
+
'--webkit-backdrop-filter': 'var(--panel-300-backdrop-filter)',
|
|
238
|
+
'backdrop-filter': 'var(--panel-300-backdrop-filter)',
|
|
239
|
+
'background-color': 'rgb(var(--base-300))',
|
|
240
|
+
},
|
|
241
|
+
|
|
242
|
+
'.panel-400': {
|
|
243
|
+
'--webkit-backdrop-filter': 'var(--panel-400-backdrop-filter)',
|
|
244
|
+
'backdrop-filter': 'var(--panel-400-backdrop-filter)',
|
|
245
|
+
'background-color': 'rgb(var(--base-400))',
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
'.panel-500': {
|
|
249
|
+
'--webkit-backdrop-filter': 'var(--panel-500-backdrop-filter)',
|
|
250
|
+
'backdrop-filter': 'var(--panel-500-backdrop-filter)',
|
|
251
|
+
'background-color': 'rgb(var(--base-500))',
|
|
252
|
+
},
|
|
224
253
|
|
|
225
254
|
})
|
|
226
255
|
|