@mixd-id/web-scaffold 0.1.230406001
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/LICENSE +21 -0
- package/README.md +3 -0
- package/package.json +71 -0
- package/public/images/mixd-logo2.png +0 -0
- package/src/App.vue +17 -0
- package/src/components/Ahref.vue +34 -0
- package/src/components/Alert.vue +160 -0
- package/src/components/Button.vue +253 -0
- package/src/components/ButtonGroup.vue +101 -0
- package/src/components/Carousel.vue +293 -0
- package/src/components/ChatTyping.vue +69 -0
- package/src/components/Checkbox.vue +152 -0
- package/src/components/ContextMenu.vue +261 -0
- package/src/components/CopyToClipboard.vue +59 -0
- package/src/components/Countdown.vue +213 -0
- package/src/components/Datepicker.vue +312 -0
- package/src/components/Dropdown.vue +198 -0
- package/src/components/DynamicTemplate.vue +44 -0
- package/src/components/ErrorText.vue +36 -0
- package/src/components/Feed.vue +118 -0
- package/src/components/Gmaps.vue +227 -0
- package/src/components/Grid.vue +29 -0
- package/src/components/GridColumn.vue +31 -0
- package/src/components/HTMLEditor.vue +396 -0
- package/src/components/Image.vue +207 -0
- package/src/components/Image360.vue +140 -0
- package/src/components/ImageFullScreen.vue +101 -0
- package/src/components/ImagePreview.vue +71 -0
- package/src/components/ImportModal.vue +247 -0
- package/src/components/ListItem.vue +147 -0
- package/src/components/ListPage1.vue +1331 -0
- package/src/components/ListPage1Filter.vue +170 -0
- package/src/components/Modal.vue +253 -0
- package/src/components/OTPField.vue +126 -0
- package/src/components/Radio.vue +134 -0
- package/src/components/SearchButton.vue +57 -0
- package/src/components/Slider.vue +285 -0
- package/src/components/SplitPane.vue +129 -0
- package/src/components/Switch.vue +89 -0
- package/src/components/TabView.vue +106 -0
- package/src/components/TableView.vue +201 -0
- package/src/components/TableViewHead.vue +159 -0
- package/src/components/Tabs.vue +74 -0
- package/src/components/TextEditor.vue +85 -0
- package/src/components/Textarea.vue +184 -0
- package/src/components/Textbox.vue +200 -0
- package/src/components/Timepicker.vue +108 -0
- package/src/components/Toast.vue +93 -0
- package/src/components/VirtualScroll.vue +215 -0
- package/src/components/VirtualTable.vue +497 -0
- package/src/entry-client.js +27 -0
- package/src/entry-server.js +73 -0
- package/src/index.css +3 -0
- package/src/index.js +255 -0
- package/src/main.js +38 -0
- package/src/router.js +57 -0
- package/src/themes/default/index.js +200 -0
- package/src/utils/helpers.js +185 -0
- package/src/utils/helpers.mjs +197 -0
- package/src/utils/importer.js +156 -0
- package/src/utils/listpage1.js +1371 -0
- package/src/utils/selection.js +64 -0
package/src/index.js
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import {defineAsyncComponent, ref} from "vue"
|
|
2
|
+
import {observeInit} from './utils/helpers.mjs'
|
|
3
|
+
import throttle from "lodash/throttle"
|
|
4
|
+
|
|
5
|
+
const calculateIsMobile = () => {
|
|
6
|
+
if(typeof window === 'undefined') return false
|
|
7
|
+
return window.innerWidth < window.innerHeight && window.innerWidth <= 800
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let _UNIQID = 0
|
|
11
|
+
const uniqid = () => {
|
|
12
|
+
return _UNIQID++
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const download = (url, as) => {
|
|
16
|
+
const downloader = document.createElement('a')
|
|
17
|
+
downloader.setAttribute('href', url)
|
|
18
|
+
downloader.target = '_blank'
|
|
19
|
+
if(as) downloader.download = as
|
|
20
|
+
document.body.appendChild(downloader)
|
|
21
|
+
|
|
22
|
+
downloader.click()
|
|
23
|
+
|
|
24
|
+
window.setTimeout(() => {
|
|
25
|
+
document.body.removeChild(downloader)
|
|
26
|
+
}, 100)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let preloads = []
|
|
30
|
+
|
|
31
|
+
const preload = (params) => {
|
|
32
|
+
|
|
33
|
+
if(!params) return
|
|
34
|
+
|
|
35
|
+
if(typeof params === 'string'){
|
|
36
|
+
params.split(',').forEach((param) => {
|
|
37
|
+
let media, href
|
|
38
|
+
if(param.startsWith('sm:')){
|
|
39
|
+
media = 'sm'
|
|
40
|
+
href = param.substring(param.indexOf(':') + 1)
|
|
41
|
+
}
|
|
42
|
+
else if(param.startsWith('md:')){
|
|
43
|
+
media = 'md'
|
|
44
|
+
href = param.substring(param.indexOf(':') + 1)
|
|
45
|
+
}
|
|
46
|
+
else if(param.startsWith('lg:')){
|
|
47
|
+
media = 'lg'
|
|
48
|
+
href = param.substring(param.indexOf(':') + 1)
|
|
49
|
+
}
|
|
50
|
+
else if(param.startsWith('xl:')){
|
|
51
|
+
media = 'xl'
|
|
52
|
+
href = param.substring(param.indexOf(':') + 1)
|
|
53
|
+
}
|
|
54
|
+
else if(param.startsWith('2xl:')){
|
|
55
|
+
media = '2xl'
|
|
56
|
+
href = param.substring(param.indexOf(':') + 1)
|
|
57
|
+
}
|
|
58
|
+
else{
|
|
59
|
+
media = ''
|
|
60
|
+
href = param
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
switch(media){
|
|
64
|
+
case 'sm':
|
|
65
|
+
media = "(min-width: 640px)"
|
|
66
|
+
break
|
|
67
|
+
case 'md':
|
|
68
|
+
media = "(min-width: 768px)"
|
|
69
|
+
break
|
|
70
|
+
case 'lg':
|
|
71
|
+
media = "(min-width: 1024px)"
|
|
72
|
+
break
|
|
73
|
+
case 'xl':
|
|
74
|
+
media = "(min-width: 1280px)"
|
|
75
|
+
break
|
|
76
|
+
case '2xl':
|
|
77
|
+
media = "(min-width: 1536px)"
|
|
78
|
+
break
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const ext = href.split('.').slice(-1).pop()
|
|
82
|
+
let as
|
|
83
|
+
switch(ext){
|
|
84
|
+
case 'png':
|
|
85
|
+
case 'jpg':
|
|
86
|
+
case 'jpeg':
|
|
87
|
+
case 'webp':
|
|
88
|
+
case 'gif':
|
|
89
|
+
as = 'image'
|
|
90
|
+
break
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if(href && as){
|
|
94
|
+
const preloadObj = {
|
|
95
|
+
href,
|
|
96
|
+
media,
|
|
97
|
+
as
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
preloads.push(preloadObj)
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
else{
|
|
105
|
+
if(Array.isArray(params)){
|
|
106
|
+
preloads.push(...params)
|
|
107
|
+
}
|
|
108
|
+
else{
|
|
109
|
+
preloads.push(params)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const popPreloads = () => {
|
|
115
|
+
|
|
116
|
+
let link = ''
|
|
117
|
+
|
|
118
|
+
preloads.forEach((obj) => {
|
|
119
|
+
let str = `<link rel="preload" href="${obj.href}" as="${obj.as}"`
|
|
120
|
+
if(obj.media)
|
|
121
|
+
str += ` media="${obj.media}"`
|
|
122
|
+
str += ' />'
|
|
123
|
+
|
|
124
|
+
link += str
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
preloads = []
|
|
128
|
+
|
|
129
|
+
return link
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const util = {
|
|
133
|
+
|
|
134
|
+
push: (arr, item, opt = { key:"id" }) => {
|
|
135
|
+
const index = arr.findIndex((_) => _[opt.key] === item[opt.key])
|
|
136
|
+
if(index >= 0){
|
|
137
|
+
Object.assign(arr[index], item)
|
|
138
|
+
}
|
|
139
|
+
else{
|
|
140
|
+
arr.push(item)
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
unshift: (arr, item, opt = { key:"id" }) => {
|
|
145
|
+
const index = arr.findIndex((_) => _[opt.key] === item[opt.key])
|
|
146
|
+
if(index >= 0){
|
|
147
|
+
Object.assign(arr[index], item)
|
|
148
|
+
}
|
|
149
|
+
else{
|
|
150
|
+
arr.unshift(item)
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
onEvent: (arr, updates, opt = {}) => {
|
|
155
|
+
|
|
156
|
+
const [ model, event, items ] = updates
|
|
157
|
+
|
|
158
|
+
if(opt.model && opt.model !== model)
|
|
159
|
+
return
|
|
160
|
+
|
|
161
|
+
items.forEach((item) => {
|
|
162
|
+
|
|
163
|
+
const index = arr.findIndex((_) => _.id === item.id)
|
|
164
|
+
|
|
165
|
+
switch(event){
|
|
166
|
+
|
|
167
|
+
case 'create':
|
|
168
|
+
case 'update':
|
|
169
|
+
if(index >= 0){
|
|
170
|
+
Object.assign(arr[index], item)
|
|
171
|
+
}
|
|
172
|
+
else{
|
|
173
|
+
arr.push(item)
|
|
174
|
+
}
|
|
175
|
+
break
|
|
176
|
+
|
|
177
|
+
case 'destroy':
|
|
178
|
+
if(index >= 0){
|
|
179
|
+
arr.splice(index, 1)
|
|
180
|
+
}
|
|
181
|
+
break
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export default{
|
|
189
|
+
|
|
190
|
+
install: (app, options) => {
|
|
191
|
+
|
|
192
|
+
let isMobile = ref(calculateIsMobile())
|
|
193
|
+
|
|
194
|
+
if(typeof window !== 'undefined' && 'IntersectionObserver' in window) {
|
|
195
|
+
app.config.globalProperties.$observe = observeInit()
|
|
196
|
+
|
|
197
|
+
window.addEventListener('resize', throttle(() => {
|
|
198
|
+
isMobile.value = calculateIsMobile()
|
|
199
|
+
}, 300, { trailing:true }))
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
app.config.globalProperties.uniqid = uniqid
|
|
203
|
+
app.config.globalProperties.isMobile = isMobile
|
|
204
|
+
app.config.globalProperties.$download = download
|
|
205
|
+
app.config.globalProperties.$preload = preload
|
|
206
|
+
app.config.globalProperties.$popPreloads = popPreloads
|
|
207
|
+
app.config.globalProperties.$util = util
|
|
208
|
+
|
|
209
|
+
app.component('Alert', defineAsyncComponent(() => import("./components/Alert.vue")))
|
|
210
|
+
app.component('Button', defineAsyncComponent(() => import("./components/Button.vue")))
|
|
211
|
+
app.component('SearchButton', defineAsyncComponent(() => import("./components/SearchButton.vue")))
|
|
212
|
+
app.component('ButtonGroup', defineAsyncComponent(() => import("./components/ButtonGroup.vue")))
|
|
213
|
+
app.component('ChatTyping', defineAsyncComponent(() => import("./components/ChatTyping.vue")))
|
|
214
|
+
app.component('Checkbox', defineAsyncComponent(() => import("./components/Checkbox.vue")))
|
|
215
|
+
app.component('CopyToClipboard', defineAsyncComponent(() => import("./components/CopyToClipboard.vue")))
|
|
216
|
+
app.component('Countdown', defineAsyncComponent(() => import("./components/Countdown.vue")))
|
|
217
|
+
app.component('Datepicker', defineAsyncComponent(() => import("./components/Datepicker.vue")))
|
|
218
|
+
app.component('Dropdown', defineAsyncComponent(() => import("./components/Dropdown.vue")))
|
|
219
|
+
app.component('DynamicTemplate', defineAsyncComponent(() => import("./components/DynamicTemplate.vue")))
|
|
220
|
+
app.component('ErrorText', defineAsyncComponent(() => import("./components/ErrorText.vue")))
|
|
221
|
+
app.component('Feed', defineAsyncComponent(() => import("./components/Feed.vue")))
|
|
222
|
+
app.component('Gmaps', defineAsyncComponent(() => import("./components/Gmaps.vue")))
|
|
223
|
+
app.component('HTMLEditor', defineAsyncComponent(() => import("./components/HTMLEditor.vue")))
|
|
224
|
+
app.component('Ahref', defineAsyncComponent(() => import("./components/Ahref.vue")))
|
|
225
|
+
app.component('Switch', defineAsyncComponent(() => import("./components/Switch.vue")))
|
|
226
|
+
app.component('Image', defineAsyncComponent(() => import("./components/Image.vue")))
|
|
227
|
+
app.component('Image360', defineAsyncComponent(() => import("./components/Image360.vue")))
|
|
228
|
+
app.component('ImagePreview', defineAsyncComponent(() => import("./components/ImagePreview.vue")))
|
|
229
|
+
app.component('ImageFullScreen', defineAsyncComponent(() => import("./components/ImageFullScreen.vue")))
|
|
230
|
+
app.component('ImportModal', defineAsyncComponent(() => import("./components/ImportModal.vue")))
|
|
231
|
+
app.component('ListPage1', defineAsyncComponent(() => import("./components/ListPage1.vue")))
|
|
232
|
+
app.component('ListPage1Filter', defineAsyncComponent(() => import("./components/ListPage1Filter.vue")))
|
|
233
|
+
app.component('ListItem', defineAsyncComponent(() => import("./components/ListItem.vue")))
|
|
234
|
+
app.component('Carousel', defineAsyncComponent(() => import("./components/Carousel.vue")))
|
|
235
|
+
app.component('ContextMenu', defineAsyncComponent(() => import("./components/ContextMenu.vue")))
|
|
236
|
+
app.component('Modal', defineAsyncComponent(() => import("./components/Modal.vue")))
|
|
237
|
+
app.component('OTPField', defineAsyncComponent(() => import("./components/OTPField.vue")))
|
|
238
|
+
app.component('Radio', defineAsyncComponent(() => import("./components/Radio.vue")))
|
|
239
|
+
app.component('TableView', defineAsyncComponent(() => import("./components/TableView.vue")))
|
|
240
|
+
app.component('TableViewHead', defineAsyncComponent(() => import("./components/TableViewHead.vue")))
|
|
241
|
+
app.component('Tabs', defineAsyncComponent(() => import("./components/Tabs.vue")))
|
|
242
|
+
app.component('Textbox', defineAsyncComponent(() => import("./components/Textbox.vue")))
|
|
243
|
+
app.component('Textarea', defineAsyncComponent(() => import("./components/Textarea.vue")))
|
|
244
|
+
app.component('Timepicker', defineAsyncComponent(() => import("./components/Timepicker.vue")))
|
|
245
|
+
app.component('Toast', defineAsyncComponent(() => import("./components/Toast.vue")))
|
|
246
|
+
app.component('VirtualScroll', defineAsyncComponent(() => import("./components/VirtualScroll.vue")))
|
|
247
|
+
app.component('VirtualTable', defineAsyncComponent(() => import("./components/VirtualTable.vue")))
|
|
248
|
+
app.component('Slider', defineAsyncComponent(() => import("./components/Slider.vue")))
|
|
249
|
+
app.component('TabView', defineAsyncComponent(() => import("./components/TabView.vue")))
|
|
250
|
+
app.component('TextEditor', defineAsyncComponent(() => import("./components/TextEditor.vue")))
|
|
251
|
+
app.component('SplitPane', defineAsyncComponent(() => import("./components/SplitPane.vue")))
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
}
|
|
255
|
+
}
|
package/src/main.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import App from './App.vue'
|
|
2
|
+
import {createSSRApp, defineAsyncComponent} from 'vue'
|
|
3
|
+
import { createPinia } from 'pinia'
|
|
4
|
+
import { createRouter } from './router'
|
|
5
|
+
import WebScaffold from './index'
|
|
6
|
+
import './index.css'
|
|
7
|
+
|
|
8
|
+
const AppScaffold = {
|
|
9
|
+
install: (app, options) => {
|
|
10
|
+
app.component('PropertyTable', defineAsyncComponent(() => import("./pages/playground/components/PropertyTable.vue")))
|
|
11
|
+
app.component('Preview', defineAsyncComponent(() => import("./pages/playground/components/Preview.vue")))
|
|
12
|
+
app.component('SourceCode', defineAsyncComponent(() => import("./pages/playground/components/SourceCode.vue")))
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function createApp(){
|
|
17
|
+
|
|
18
|
+
const app = createSSRApp(App)
|
|
19
|
+
const router = createRouter()
|
|
20
|
+
const pinia = createPinia()
|
|
21
|
+
|
|
22
|
+
app.use(router)
|
|
23
|
+
app.use(pinia)
|
|
24
|
+
app.use(WebScaffold)
|
|
25
|
+
app.use(AppScaffold)
|
|
26
|
+
|
|
27
|
+
return { app, router, pinia }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
createApp(App)
|
|
33
|
+
.use(componentPlugins)
|
|
34
|
+
.use(router)
|
|
35
|
+
.mount('#app')
|
|
36
|
+
|
|
37
|
+
if(typeof document !== 'undefined')
|
|
38
|
+
document.body.firstElementChild.removeAttribute('data-v-app')*/
|
package/src/router.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMemoryHistory,
|
|
3
|
+
createRouter as _createRouter,
|
|
4
|
+
createWebHistory
|
|
5
|
+
} from 'vue-router'
|
|
6
|
+
|
|
7
|
+
const routes = [
|
|
8
|
+
{ name:"", path:"/", component:() => import('./pages/Home.vue') },
|
|
9
|
+
{ name:"", path:"/test", component:() => import('./pages/Test.vue') },
|
|
10
|
+
{
|
|
11
|
+
name:"inbox",
|
|
12
|
+
path:"/inbox",
|
|
13
|
+
component:() => import('./pages/Inbox.vue'),
|
|
14
|
+
children: [
|
|
15
|
+
{ name:"message", path:":uid", component:() => import('./pages/Message.vue') },
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'playground',
|
|
20
|
+
path: '/playground',
|
|
21
|
+
component: () => import('./pages/Playground.vue'),
|
|
22
|
+
children: [
|
|
23
|
+
{ path:"initial", component: () => import('./pages/playground/Button.vue') },
|
|
24
|
+
{ path:"ahref", component: () => import('./pages/playground/Ahref.vue') },
|
|
25
|
+
{ path:"button", component: () => import('./pages/playground/Button.vue') },
|
|
26
|
+
{ path:"dropdown", component: () => import('./pages/playground/Dropdown.vue') },
|
|
27
|
+
{ path:"slider", component: () => import('./pages/playground/Slider.vue') },
|
|
28
|
+
{ path:"switch", component: () => import('./pages/playground/Switch.vue') },
|
|
29
|
+
{ path:"image", component: () => import('./pages/playground/Image.vue') },
|
|
30
|
+
{ path:"carousel", component: () => import('./pages/playground/Carousel.vue') },
|
|
31
|
+
{ path:"datepicker", component: () => import('./pages/playground/Datepicker.vue') },
|
|
32
|
+
{ path:"textbox", component: () => import('./pages/playground/Textbox.vue') },
|
|
33
|
+
{ path:"textarea", component: () => import('./pages/playground/Textarea.vue') },
|
|
34
|
+
|
|
35
|
+
{ path:"modal", component: () => import('./pages/playground/Modal.vue') },
|
|
36
|
+
{ path:"context-menu", component: () => import('./pages/playground/ContextMenu.vue') },
|
|
37
|
+
{ path:"list-item", component: () => import('./pages/playground/ListItem.vue') },
|
|
38
|
+
{ path:"toast", component: () => import('./pages/playground/Toast.vue') },
|
|
39
|
+
{ path:"alert", component: () => import('./pages/playground/Alert.vue') },
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
export function createRouter() {
|
|
45
|
+
return _createRouter({
|
|
46
|
+
history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
|
|
47
|
+
routes,
|
|
48
|
+
scrollBehavior(to, from, savedPosition) {
|
|
49
|
+
if(savedPosition){
|
|
50
|
+
return savedPosition
|
|
51
|
+
}
|
|
52
|
+
else{
|
|
53
|
+
return { top: 0 }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
const Plugin = require('tailwindcss/plugin')
|
|
2
|
+
|
|
3
|
+
const plugin = Plugin(function({ addBase, config, theme }) {
|
|
4
|
+
|
|
5
|
+
addBase({
|
|
6
|
+
|
|
7
|
+
'*': {
|
|
8
|
+
'color': theme('colors.text.DEFAULT'),
|
|
9
|
+
'fontFamily': 'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,apple color emoji,segoe ui emoji,Segoe UI Symbol,noto color emoji',
|
|
10
|
+
'fontSize': '13px'
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
'html, .html': {
|
|
14
|
+
|
|
15
|
+
"--h-cp-sm": '2rem',
|
|
16
|
+
"--h-cp": '2.7rem',
|
|
17
|
+
"--h-cp-lg": '3.6rem',
|
|
18
|
+
|
|
19
|
+
'--base-50': '255, 255, 255',
|
|
20
|
+
'--base-200': '222, 224, 227',
|
|
21
|
+
'--base-300': '232, 234, 237',
|
|
22
|
+
'--base-400': '246, 248, 251',
|
|
23
|
+
'--base-500': '255, 255, 255',
|
|
24
|
+
'--base': '236, 236, 236',
|
|
25
|
+
|
|
26
|
+
"--text-50": '240, 240, 240',
|
|
27
|
+
"--text-100": '223, 223, 223',
|
|
28
|
+
"--text-200": '218, 218, 218',
|
|
29
|
+
"--text-300": '191, 191, 191',
|
|
30
|
+
"--text-400": '136, 136, 136',
|
|
31
|
+
"--text": '31, 41, 55',
|
|
32
|
+
|
|
33
|
+
"--primary": '81, 131, 240',
|
|
34
|
+
"--primary-50": '244, 248, 255',
|
|
35
|
+
"--primary-100": '230, 239, 255',
|
|
36
|
+
"--primary-200": '216, 230, 255',
|
|
37
|
+
"--primary-300": '116, 156, 243',
|
|
38
|
+
"--primary-400": '98, 143, 242',
|
|
39
|
+
"--primary-500": '81, 131, 240',
|
|
40
|
+
"--primary-600": '73, 118, 216',
|
|
41
|
+
"--primary-700": '65, 105, 192',
|
|
42
|
+
"--primary-800": '57, 92, 168',
|
|
43
|
+
"--primary-900": '49, 79, 144',
|
|
44
|
+
|
|
45
|
+
"--secondary": '191, 219, 254',
|
|
46
|
+
"--secondary-50": '248, 221, 159',
|
|
47
|
+
"--secondary-100": '246, 214, 139',
|
|
48
|
+
"--secondary-200": '245, 207, 120',
|
|
49
|
+
"--secondary-300": '243, 200, 101',
|
|
50
|
+
"--secondary-400": '174, 209, 252',
|
|
51
|
+
"--secondary-500": '191, 219, 254',
|
|
52
|
+
"--secondary-600": '219, 234, 254',
|
|
53
|
+
"--secondary-700": '192, 149, 50',
|
|
54
|
+
"--secondary-800": '168, 130, 43',
|
|
55
|
+
"--secondary-900": '144, 112, 37'
|
|
56
|
+
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
'html[data-theme="dark"], .html[data-theme="dark"]': {
|
|
60
|
+
|
|
61
|
+
"--base-50": '22, 26, 33',
|
|
62
|
+
"--base-300": '0, 0, 0',
|
|
63
|
+
"--base-400": '16, 20, 27',
|
|
64
|
+
"--base-500": '22, 26, 33',
|
|
65
|
+
"--base": '22, 26, 33',
|
|
66
|
+
|
|
67
|
+
"--text-50": '34, 40, 47',
|
|
68
|
+
"--text-100": '48, 54, 61',
|
|
69
|
+
"--text-200": '53, 59, 66',
|
|
70
|
+
"--text-300": '77, 77, 77',
|
|
71
|
+
"--text-400": '191, 193, 197',
|
|
72
|
+
"--text": '234, 234, 236',
|
|
73
|
+
|
|
74
|
+
"--primary-50": '24, 34, 51',
|
|
75
|
+
"--primary-100": '28, 38, 59',
|
|
76
|
+
"--primary-200": '27, 44, 74',
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
'body': {
|
|
80
|
+
'-webkit-font-smoothing': 'antialiased',
|
|
81
|
+
'-moz-osx-font-smoothing': 'grayscale',
|
|
82
|
+
'text-rendering': 'optimizeLegibility',
|
|
83
|
+
'fontSize': '14px',
|
|
84
|
+
'touchAction': "pan-x pan-y",
|
|
85
|
+
'backgroundColor': 'rgba(var(--base-400), 100)'
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'@media screen and (orientation: portrait)': {
|
|
89
|
+
'body': {
|
|
90
|
+
'fontSize': '16px',
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
'::-webkit-scrollbar': {
|
|
95
|
+
'height': '5px',
|
|
96
|
+
'width': '5px',
|
|
97
|
+
'background': 'transparent'
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
'::-webkit-scrollbar-thumb': {
|
|
101
|
+
'backgroundColor': 'rgba(var(--text-50), 100)'
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
'h1': {
|
|
105
|
+
fontSize: config('theme.fontSize.4xl')[0],
|
|
106
|
+
...config('theme.fontSize.4xl')[1],
|
|
107
|
+
fontWeight: theme('fontWeight.bold'),
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
'h2': {
|
|
111
|
+
fontSize: config('theme.fontSize.3xl')[0],
|
|
112
|
+
...config('theme.fontSize.3xl')[1],
|
|
113
|
+
fontWeight: theme('fontWeight.bold'),
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
'h3': {
|
|
117
|
+
fontSize: config('theme.fontSize.2xl')[0],
|
|
118
|
+
...config('theme.fontSize.2xl')[1],
|
|
119
|
+
fontWeight: theme('fontWeight.bold'),
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
'h4': {
|
|
123
|
+
fontSize: config('theme.fontSize.xl')[0],
|
|
124
|
+
...config('theme.fontSize.xl')[1],
|
|
125
|
+
fontWeight: theme('fontWeight.bold'),
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
'h5': {
|
|
129
|
+
fontSize: config('theme.fontSize.lg')[0],
|
|
130
|
+
...config('theme.fontSize.lg')[1],
|
|
131
|
+
fontWeight: theme('fontWeight.bold'),
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
'.flex-1': { minHeight: "0px", minWidth: "0px" }
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
}, {
|
|
140
|
+
theme: {
|
|
141
|
+
extend:{
|
|
142
|
+
colors: {
|
|
143
|
+
primary: {
|
|
144
|
+
50: "rgba(var(--primary-50), <alpha-value>)",
|
|
145
|
+
100: "rgba(var(--primary-100), <alpha-value>)",
|
|
146
|
+
200: "rgba(var(--primary-200), <alpha-value>)",
|
|
147
|
+
300: "rgba(var(--primary-300), <alpha-value>)",
|
|
148
|
+
400: "rgba(var(--primary-400), <alpha-value>)",
|
|
149
|
+
500: "rgba(var(--primary-500), <alpha-value>)",
|
|
150
|
+
600: "rgba(var(--primary-600), <alpha-value>)",
|
|
151
|
+
700: "rgba(var(--primary-700), <alpha-value>)",
|
|
152
|
+
800: "rgba(var(--primary-800), <alpha-value>)",
|
|
153
|
+
900: "rgba(var(--primary-900), <alpha-value>)",
|
|
154
|
+
DEFAULT: "rgba(var(--primary), <alpha-value>)"
|
|
155
|
+
},
|
|
156
|
+
secondary: {
|
|
157
|
+
50: "rgba(var(--secondary-50), <alpha-value>)",
|
|
158
|
+
100: "rgba(var(--secondary-100), <alpha-value>)",
|
|
159
|
+
200: "rgba(var(--secondary-200), <alpha-value>)",
|
|
160
|
+
300: "rgba(var(--secondary-300), <alpha-value>)",
|
|
161
|
+
400: "rgba(var(--secondary-400), <alpha-value>)",
|
|
162
|
+
500: "rgba(var(--secondary-500), <alpha-value>)",
|
|
163
|
+
600: "rgba(var(--secondary-600), <alpha-value>)",
|
|
164
|
+
700: "rgba(var(--secondary-700), <alpha-value>)",
|
|
165
|
+
800: "rgba(var(--secondary-800), <alpha-value>)",
|
|
166
|
+
900: "rgba(var(--secondary-900), <alpha-value>)",
|
|
167
|
+
DEFAULT: "rgba(var(--secondary), <alpha-value>)"
|
|
168
|
+
},
|
|
169
|
+
base: {
|
|
170
|
+
50: "rgba(var(--base-50), <alpha-value>)",
|
|
171
|
+
100: "rgba(var(--base-100), <alpha-value>)",
|
|
172
|
+
200: "rgba(var(--base-200), <alpha-value>)",
|
|
173
|
+
300: "rgba(var(--base-300), <alpha-value>)",
|
|
174
|
+
400: "rgba(var(--base-400), <alpha-value>)",
|
|
175
|
+
500: "rgba(var(--base-500), <alpha-value>)",
|
|
176
|
+
600: "rgba(var(--base-600), <alpha-value>)",
|
|
177
|
+
700: "rgba(var(--base-700), <alpha-value>)",
|
|
178
|
+
800: "rgba(var(--base-800), <alpha-value>)",
|
|
179
|
+
900: "rgba(var(--base-900), <alpha-value>)",
|
|
180
|
+
DEFAULT: "rgba(var(--base), <alpha-value>)"
|
|
181
|
+
},
|
|
182
|
+
text: {
|
|
183
|
+
50: "rgba(var(--text-50), <alpha-value>)",
|
|
184
|
+
100: "rgba(var(--text-100), <alpha-value>)",
|
|
185
|
+
200: "rgba(var(--text-200), <alpha-value>)",
|
|
186
|
+
300: "rgba(var(--text-300), <alpha-value>)",
|
|
187
|
+
400: "rgba(var(--text-400), <alpha-value>)",
|
|
188
|
+
500: "rgba(var(--text-500), <alpha-value>)",
|
|
189
|
+
600: "rgba(var(--text-600), <alpha-value>)",
|
|
190
|
+
700: "rgba(var(--text-700), <alpha-value>)",
|
|
191
|
+
800: "rgba(var(--text-800), <alpha-value>)",
|
|
192
|
+
900: "rgba(var(--text-900), <alpha-value>)",
|
|
193
|
+
DEFAULT: "rgba(var(--text), 1)"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
module.exports = plugin
|