@varlet/cli 1.23.7 → 1.23.12-alpha.31
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/CHANGELOG.md +19 -0
- package/generators/{sfc → base}/.gitignore +0 -0
- package/generators/{sfc → base}/.husky/commit-msg +0 -0
- package/generators/{sfc → base}/.husky/pre-commit +0 -0
- package/generators/{tsx → base}/.prettierignore +0 -1
- package/generators/{sfc → base}/.prettierrc +0 -0
- package/generators/{sfc → base}/README.md +0 -0
- package/generators/{sfc → base}/babel.config.js +0 -0
- package/generators/{sfc → base}/commitlint.config.js +0 -0
- package/generators/{sfc → base}/docs/home.zh-CN.md +0 -0
- package/generators/{sfc → base}/package.json +0 -0
- package/generators/{sfc → base}/public/highlight.css +0 -0
- package/generators/{sfc → base}/public/logo.svg +0 -0
- package/generators/{sfc → base}/shims/shims-md.d.ts +0 -0
- package/generators/{sfc → base}/shims/shims-vue.d.ts +0 -0
- package/generators/{sfc → base}/tsconfig.json +0 -0
- package/generators/{sfc → base}/types/basicComponent.d.ts +0 -0
- package/generators/{sfc → base}/types/button.d.ts +0 -0
- package/generators/{sfc → base}/types/index.d.ts +0 -0
- package/generators/{sfc → base}/varlet.config.js +0 -0
- package/lib/commands/dev.js +1 -1
- package/lib/commands/gen.js +7 -3
- package/lib/compiler/compileSiteEntry.js +1 -1
- package/package.json +2 -2
- package/site/components/code-example/CodeExample.vue +107 -0
- package/site/components/code-example/codeExample.less +23 -0
- package/site/components/code-example/index.ts +10 -0
- package/site/components/icon/icon.less +1 -0
- package/site/components/loading/props.ts +2 -2
- package/site/components/snackbar/Snackbar.vue +38 -0
- package/site/components/snackbar/core.vue +117 -0
- package/site/components/snackbar/index.tsx +270 -0
- package/site/components/snackbar/props.ts +94 -0
- package/site/components/snackbar/snackbar.less +135 -0
- package/site/components/utils/elements.ts +9 -0
- package/site/components/utils/shared.ts +3 -0
- package/site/mobile/App.vue +6 -6
- package/site/module.d.ts +4 -0
- package/site/pc/App.vue +9 -11
- package/site/pc/components/AppHeader.vue +8 -9
- package/site/pc/components/AppSidebar.vue +6 -6
- package/site/pc/main.ts +8 -2
- package/site/tsconfig.json +1 -6
- package/site/useProgress.ts +6 -2
- package/site/utils.ts +4 -3
- package/tsconfig.json +0 -2
- package/varlet.default.config.js +13 -0
- package/generators/sfc/.prettierignore +0 -8
- package/generators/tsx/.gitignore +0 -14
- package/generators/tsx/.husky/commit-msg +0 -4
- package/generators/tsx/.husky/pre-commit +0 -4
- package/generators/tsx/.prettierrc +0 -5
- package/generators/tsx/README.md +0 -88
- package/generators/tsx/babel.config.js +0 -10
- package/generators/tsx/commitlint.config.js +0 -3
- package/generators/tsx/docs/home.zh-CN.md +0 -11
- package/generators/tsx/package.json +0 -98
- package/generators/tsx/public/highlight.css +0 -1
- package/generators/tsx/public/logo.svg +0 -1
- package/generators/tsx/shims/shims-md.d.ts +0 -4
- package/generators/tsx/shims/shims-vue.d.ts +0 -6
- package/generators/tsx/tsconfig.json +0 -13
- package/generators/tsx/types/basicComponent.d.ts +0 -7
- package/generators/tsx/types/button.d.ts +0 -12
- package/generators/tsx/types/index.d.ts +0 -6
- package/generators/tsx/varlet.config.js +0 -106
|
@@ -61,15 +61,14 @@
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script lang="ts">
|
|
64
|
-
// @ts-ignore
|
|
65
64
|
import config from '@config'
|
|
66
|
-
import { ref, computed } from 'vue'
|
|
65
|
+
import { ref, computed, defineComponent } from 'vue'
|
|
67
66
|
import { get } from 'lodash-es'
|
|
68
67
|
import { getBrowserThemes, getPCLocationInfo, removeEmpty, setThemes, watchThemes } from '../../utils'
|
|
69
68
|
import { useRouter } from 'vue-router'
|
|
70
69
|
import type { Ref, ComputedRef } from 'vue'
|
|
71
70
|
|
|
72
|
-
export default {
|
|
71
|
+
export default defineComponent({
|
|
73
72
|
name: 'AppHeader',
|
|
74
73
|
props: {
|
|
75
74
|
language: {
|
|
@@ -77,19 +76,19 @@ export default {
|
|
|
77
76
|
},
|
|
78
77
|
},
|
|
79
78
|
setup() {
|
|
80
|
-
// config
|
|
81
79
|
const title: Ref<string> = ref(get(config, 'title'))
|
|
82
80
|
const logo: Ref<string> = ref(get(config, 'logo'))
|
|
81
|
+
const themesKey = get(config, 'themesKey')
|
|
83
82
|
const languages: Ref<Record<string, string>> = ref(get(config, 'pc.header.i18n'))
|
|
84
83
|
const github: Ref<Record<string, string>> = ref(get(config, 'pc.header.github'))
|
|
85
84
|
const darkMode: Ref<Record<string, string>> = ref(get(config, 'pc.header.darkMode'))
|
|
86
|
-
const currentThemes = ref(getBrowserThemes())
|
|
85
|
+
const currentThemes = ref(getBrowserThemes(themesKey))
|
|
87
86
|
|
|
88
87
|
const isOpenMenu: Ref<boolean> = ref(false)
|
|
89
88
|
const router = useRouter()
|
|
90
89
|
const nonEmptyLanguages: ComputedRef<Record<string, string>> = computed(() => removeEmpty(languages.value))
|
|
91
90
|
|
|
92
|
-
const handleLanguageChange = (language) => {
|
|
91
|
+
const handleLanguageChange = (language: string) => {
|
|
93
92
|
const { menuName } = getPCLocationInfo()
|
|
94
93
|
router.replace(`/${language}/${menuName}`)
|
|
95
94
|
isOpenMenu.value = false
|
|
@@ -98,7 +97,7 @@ export default {
|
|
|
98
97
|
const setCurrentThemes = (themes: 'themes' | 'darkThemes') => {
|
|
99
98
|
currentThemes.value = themes
|
|
100
99
|
setThemes(config, currentThemes.value)
|
|
101
|
-
window.localStorage.setItem(
|
|
100
|
+
window.localStorage.setItem(themesKey, currentThemes.value)
|
|
102
101
|
}
|
|
103
102
|
|
|
104
103
|
const getThemesMessage = () => ({ action: 'themesChange', from: 'pc', data: currentThemes.value })
|
|
@@ -106,7 +105,7 @@ export default {
|
|
|
106
105
|
const toggleTheme = () => {
|
|
107
106
|
setCurrentThemes(currentThemes.value === 'darkThemes' ? 'themes' : 'darkThemes')
|
|
108
107
|
window.postMessage(getThemesMessage(), '*')
|
|
109
|
-
;(document.getElementById('mobile') as HTMLIFrameElement).contentWindow
|
|
108
|
+
;(document.getElementById('mobile') as HTMLIFrameElement).contentWindow!.postMessage(getThemesMessage(), '*')
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
watchThemes((themes, from) => {
|
|
@@ -129,7 +128,7 @@ export default {
|
|
|
129
128
|
toggleTheme,
|
|
130
129
|
}
|
|
131
130
|
},
|
|
132
|
-
}
|
|
131
|
+
})
|
|
133
132
|
</script>
|
|
134
133
|
|
|
135
134
|
<style scoped lang="less">
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import config from '@config'
|
|
29
29
|
import { MenuTypes } from '../../utils'
|
|
30
|
-
import { reactive, ref } from 'vue'
|
|
30
|
+
import { reactive, ref, defineComponent } from 'vue'
|
|
31
31
|
import type { PropType } from 'vue'
|
|
32
|
-
import type { Menu } from '../App'
|
|
32
|
+
import type { Menu } from '../App.vue'
|
|
33
33
|
import { get } from 'lodash-es'
|
|
34
34
|
|
|
35
|
-
export default {
|
|
35
|
+
export default defineComponent({
|
|
36
36
|
name: 'AppSidebar',
|
|
37
37
|
props: {
|
|
38
38
|
menu: {
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
const menuTypes = reactive(MenuTypes)
|
|
51
51
|
const themes = ref(get(config, 'themes'))
|
|
52
52
|
|
|
53
|
-
const changeRoute = (item) => {
|
|
53
|
+
const changeRoute = (item: Menu) => {
|
|
54
54
|
if (item.type === MenuTypes.TITLE || props.menuName === item.doc) {
|
|
55
55
|
return
|
|
56
56
|
}
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
changeRoute
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
})
|
|
68
68
|
</script>
|
|
69
69
|
|
|
70
70
|
<style scoped lang="less">
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
top: 60px;
|
|
76
76
|
bottom: 0;
|
|
77
77
|
left: 0;
|
|
78
|
-
z-index:
|
|
78
|
+
z-index: 99;
|
|
79
79
|
overflow-y: scroll;
|
|
80
80
|
box-shadow: 0 8px 12px var(--site-config-color-shadow);
|
|
81
81
|
background: var(--site-config-color-bar);
|
package/site/pc/main.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import App from './App.vue'
|
|
2
2
|
import '@varlet/touch-emulator'
|
|
3
|
-
// @ts-ignore
|
|
4
3
|
import routes from '@pc-routes'
|
|
5
|
-
// @ts-ignore
|
|
6
4
|
import config from '@config'
|
|
7
5
|
|
|
8
6
|
import Icon from '../components/icon'
|
|
9
7
|
import Cell from '../components/cell'
|
|
10
8
|
import Ripple from '../components/ripple'
|
|
9
|
+
import CodeExample from '../components/code-example'
|
|
10
|
+
import Snackbar from '../components/snackbar'
|
|
11
|
+
|
|
11
12
|
import '../components/styles/common.less'
|
|
12
13
|
import '../components/styles/elevation.less'
|
|
13
14
|
|
|
@@ -20,6 +21,8 @@ const defaultLanguage = get(config, 'defaultLanguage')
|
|
|
20
21
|
const redirect = get(config, 'pc.redirect')
|
|
21
22
|
const mobileRedirect = get(config, 'mobile.redirect')
|
|
22
23
|
|
|
24
|
+
Snackbar.allowMultiple(true)
|
|
25
|
+
|
|
23
26
|
redirect &&
|
|
24
27
|
routes.push({
|
|
25
28
|
path: '/:pathMatch(.*)*',
|
|
@@ -85,4 +88,7 @@ createApp(App)
|
|
|
85
88
|
.use(Ripple)
|
|
86
89
|
// @ts-ignore
|
|
87
90
|
.use(Icon)
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
.use(CodeExample)
|
|
93
|
+
.use(Snackbar)
|
|
88
94
|
.mount('#app')
|
package/site/tsconfig.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"outDir": "./lib",
|
|
4
3
|
"target": "es5",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"sourceMap": false,
|
|
7
4
|
"strict": true,
|
|
8
5
|
"downlevelIteration": true,
|
|
9
|
-
"declaration": true,
|
|
10
6
|
"skipLibCheck": true,
|
|
11
7
|
"esModuleInterop": true,
|
|
12
8
|
"jsx": "preserve",
|
|
13
9
|
"lib": ["esnext", "dom"]
|
|
14
|
-
}
|
|
15
|
-
"include": ["*"]
|
|
10
|
+
}
|
|
16
11
|
}
|
package/site/useProgress.ts
CHANGED
|
@@ -7,11 +7,15 @@ import { getBrowserThemes, mountInstance, watchThemes } from './utils'
|
|
|
7
7
|
import { get } from 'lodash-es'
|
|
8
8
|
|
|
9
9
|
function getColor(themes?: 'themes' | 'darkThemes') {
|
|
10
|
-
|
|
10
|
+
const themesKey = get(config, 'themesKey')
|
|
11
|
+
|
|
12
|
+
return get(config, `${themes ?? getBrowserThemes(themesKey)}.color-progress`)
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
function getTrackColor(themes?: 'themes' | 'darkThemes') {
|
|
14
|
-
|
|
16
|
+
const themesKey = get(config, 'themesKey')
|
|
17
|
+
|
|
18
|
+
return get(config, `${themes ?? getBrowserThemes(themesKey)}.color-progress-track`)
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
export function useProgress() {
|
package/site/utils.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { get } from 'lodash-es'
|
|
3
3
|
import { formatStyleVars } from './components/utils/elements'
|
|
4
|
+
import config from '@config'
|
|
4
5
|
|
|
5
6
|
export * from './components/utils/components'
|
|
6
7
|
export * from './components/utils/elements'
|
|
@@ -138,12 +139,12 @@ export function setThemes(config: Record<string, any>, name: 'themes' | 'darkThe
|
|
|
138
139
|
StyleProvider(styleVars)
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
export function getBrowserThemes(): 'darkThemes' | 'themes' {
|
|
142
|
-
let currentThemes = window.localStorage.getItem(
|
|
142
|
+
export function getBrowserThemes(themes = 'VARLET_THEMES'): 'darkThemes' | 'themes' {
|
|
143
|
+
let currentThemes = window.localStorage.getItem(themes) as 'darkThemes' | 'themes'
|
|
143
144
|
|
|
144
145
|
if (!currentThemes) {
|
|
145
146
|
currentThemes = window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'darkThemes' : 'themes'
|
|
146
|
-
window.localStorage.setItem(
|
|
147
|
+
window.localStorage.setItem(themes, currentThemes)
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
return currentThemes
|
package/tsconfig.json
CHANGED
package/varlet.default.config.js
CHANGED
|
@@ -4,6 +4,7 @@ module.exports = {
|
|
|
4
4
|
host: 'localhost',
|
|
5
5
|
port: 8080,
|
|
6
6
|
title: 'VARLET',
|
|
7
|
+
themesKey: 'VARLET_THEMES',
|
|
7
8
|
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
|
|
8
9
|
defaultLanguage: 'zh-CN',
|
|
9
10
|
highlight: {
|
|
@@ -31,6 +32,18 @@ module.exports = {
|
|
|
31
32
|
github: 'https://github.com/haoziqaq/varlet',
|
|
32
33
|
darkMode: true,
|
|
33
34
|
},
|
|
35
|
+
clipboard: {
|
|
36
|
+
'zh-CN': '代码已复制到剪切板',
|
|
37
|
+
'en-US': 'The code has been copied to the clipboard',
|
|
38
|
+
},
|
|
39
|
+
fold: {
|
|
40
|
+
message: {
|
|
41
|
+
'zh-CN': '已显示完整代码',
|
|
42
|
+
'en-US': 'Complete code displayed',
|
|
43
|
+
},
|
|
44
|
+
defaultFold: true,
|
|
45
|
+
foldHeight: 60,
|
|
46
|
+
},
|
|
34
47
|
},
|
|
35
48
|
mobile: {
|
|
36
49
|
redirect: '/home',
|
package/generators/tsx/README.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# varlet-cli-app
|
|
2
|
-
|
|
3
|
-
### Reference
|
|
4
|
-
|
|
5
|
-
[@varlet/cli 中文文档](https://github.com/haoziqaq/varlet/blob/dev/packages/varlet-cli/README.md)
|
|
6
|
-
[@varlet/cli documentation](https://github.com/haoziqaq/varlet/blob/dev/packages/varlet-cli/README.en-US.md)
|
|
7
|
-
|
|
8
|
-
### Quickstart
|
|
9
|
-
|
|
10
|
-
```shell
|
|
11
|
-
yarn
|
|
12
|
-
yarn dev
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Commands
|
|
16
|
-
|
|
17
|
-
#### Start the development server
|
|
18
|
-
|
|
19
|
-
```shell
|
|
20
|
-
yarn dev
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
#### Build documentation site
|
|
24
|
-
|
|
25
|
-
```shell
|
|
26
|
-
yarn build
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
#### Building component libraries
|
|
30
|
-
|
|
31
|
-
```shell
|
|
32
|
-
yarn compile
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
#### Lint code
|
|
36
|
-
|
|
37
|
-
```shell
|
|
38
|
-
yarn lint
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### Run unit test
|
|
42
|
-
|
|
43
|
-
```shell
|
|
44
|
-
yarn test
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### Run unit test in watch mode
|
|
48
|
-
|
|
49
|
-
```shell
|
|
50
|
-
yarn test:watch
|
|
51
|
-
or
|
|
52
|
-
yarn test:watchAll
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
#### Quickly create a component folder
|
|
56
|
-
|
|
57
|
-
```shell
|
|
58
|
-
yarn run create <componentName>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
#### Mount git hook
|
|
62
|
-
|
|
63
|
-
```shell
|
|
64
|
-
yarn husky
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
#### Generate changelog
|
|
68
|
-
|
|
69
|
-
```shell
|
|
70
|
-
yarn genlog
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### Generate all changelog
|
|
74
|
-
|
|
75
|
-
```shell
|
|
76
|
-
yarn genAllLog
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
#### Publish
|
|
80
|
-
|
|
81
|
-
tips:
|
|
82
|
-
- 1.The registry of npm and yarn must be the official source of npm
|
|
83
|
-
- 2.Both npm and yarn must be logged in
|
|
84
|
-
|
|
85
|
-
```shell
|
|
86
|
-
yarn release
|
|
87
|
-
```
|
|
88
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<div class="varlet-introduce">
|
|
2
|
-
<div class="varlet-introduce__row">
|
|
3
|
-
<img class="varlet-introduce__image" src="../public/logo.svg" />
|
|
4
|
-
<div class="varlet-introduce__name">Basic UI</div>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="varlet-introduce__des">一个组件库</div>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
### 介绍
|
|
10
|
-
|
|
11
|
-
这里可以介绍一下组件库, 想写什么就写什么...
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "basic-ui",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"description": "A basic components library",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.js",
|
|
7
|
-
"typings": "types/index.d.ts",
|
|
8
|
-
"vetur": {
|
|
9
|
-
"tags": "highlight/tags.json",
|
|
10
|
-
"attributes": "highlight/attributes.json"
|
|
11
|
-
},
|
|
12
|
-
"web-types": "highlight/web-types.json",
|
|
13
|
-
"keywords": [
|
|
14
|
-
"Vue",
|
|
15
|
-
"UI"
|
|
16
|
-
],
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"scripts": {
|
|
19
|
-
"husky": "husky install",
|
|
20
|
-
"commit": "git-cz",
|
|
21
|
-
"dev": "varlet-cli dev",
|
|
22
|
-
"build": "varlet-cli build",
|
|
23
|
-
"preview": "varlet-cli preview",
|
|
24
|
-
"compile": "varlet-cli compile",
|
|
25
|
-
"create": "varlet-cli create",
|
|
26
|
-
"lint": "varlet-cli lint",
|
|
27
|
-
"genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
28
|
-
"genAllLog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
29
|
-
"release": "yarn compile && release-it",
|
|
30
|
-
"test": "varlet-cli jest",
|
|
31
|
-
"test:watch": "varlet-cli jest -w",
|
|
32
|
-
"test:watchAll": "varlet-cli jest -wa"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"vue": "^3.2.0"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@varlet/cli": "^1.20.0-alpha.0",
|
|
39
|
-
"vue": "3.2.16"
|
|
40
|
-
},
|
|
41
|
-
"release-it": {
|
|
42
|
-
"git": {
|
|
43
|
-
"changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
|
|
44
|
-
"tagName": "v${version}",
|
|
45
|
-
"commitMessage": "chore: release ${version}",
|
|
46
|
-
"requireCleanWorkingDir": false
|
|
47
|
-
},
|
|
48
|
-
"plugins": {
|
|
49
|
-
"@release-it/conventional-changelog": {
|
|
50
|
-
"preset": "angular",
|
|
51
|
-
"infile": "CHANGELOG.md"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"config": {
|
|
56
|
-
"commitizen": {
|
|
57
|
-
"path": "cz-conventional-changelog"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"lint-staged": {
|
|
61
|
-
"*.{ts,tsx,js,vue,less}": "prettier --write",
|
|
62
|
-
"*.{ts,tsx,js,vue}": "eslint --fix",
|
|
63
|
-
"*.{vue,css,less}": "stylelint --fix"
|
|
64
|
-
},
|
|
65
|
-
"eslintConfig": {
|
|
66
|
-
"root": true,
|
|
67
|
-
"ignorePatterns": [
|
|
68
|
-
"lib/**",
|
|
69
|
-
"es/**",
|
|
70
|
-
"umd/**",
|
|
71
|
-
"site/**",
|
|
72
|
-
"public/**",
|
|
73
|
-
"src/*/__tests__/**",
|
|
74
|
-
".varlet/**"
|
|
75
|
-
],
|
|
76
|
-
"extends": [
|
|
77
|
-
"@varlet"
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"stylelint": {
|
|
81
|
-
"extends": [
|
|
82
|
-
"@varlet/stylelint-config"
|
|
83
|
-
],
|
|
84
|
-
"ignoreFiles": [
|
|
85
|
-
"lib/**",
|
|
86
|
-
"es/**",
|
|
87
|
-
"umd/**",
|
|
88
|
-
"site/**",
|
|
89
|
-
"coverage/**",
|
|
90
|
-
"public/**",
|
|
91
|
-
"highlight/**"
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
"browserslist": [
|
|
95
|
-
"Chrome >= 51",
|
|
96
|
-
"iOS >= 10"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hljs{display:block;overflow-x:auto;padding:.5em;background:#011627;color:#d6deeb}.hljs-keyword{color:#c792ea;font-style:italic}.hljs-built_in{color:#addb67;font-style:italic}.hljs-type{color:#82aaff}.hljs-literal{color:#ff5874}.hljs-number{color:#f78c6c}.hljs-regexp{color:#5ca7e4}.hljs-string{color:#ecc48d}.hljs-subst{color:#d3423e}.hljs-symbol{color:#82aaff}.hljs-class{color:#ffcb8b}.hljs-function{color:#82aaff}.hljs-title{color:#dcdcaa;font-style:italic}.hljs-params{color:#7fdbca}.hljs-comment{color:#637777;font-style:italic}.hljs-doctag{color:#7fdbca}.hljs-meta{color:#82aaff}.hljs-meta-keyword{color:#82aaff}.hljs-meta-string{color:#ecc48d}.hljs-section{color:#82b1ff}.hljs-builtin-name,.hljs-name,.hljs-tag{color:#7fdbca}.hljs-attr{color:#7fdbca}.hljs-attribute{color:#80cbc4}.hljs-variable{color:#addb67}.hljs-bullet{color:#d9f5dd}.hljs-code{color:#80cbc4}.hljs-emphasis{color:#c792ea;font-style:italic}.hljs-strong{color:#addb67;font-weight:700}.hljs-formula{color:#c792ea}.hljs-link{color:#ff869a}.hljs-quote{color:#697098;font-style:italic}.hljs-selector-tag{color:#ff6363}.hljs-selector-id{color:#fad430}.hljs-selector-class{color:#addb67;font-style:italic}.hljs-selector-attr,.hljs-selector-pseudo{color:#c792ea;font-style:italic}.hljs-template-tag{color:#c792ea}.hljs-template-variable{color:#addb67}.hljs-addition{color:#addb67ff;font-style:italic}.hljs-deletion{color:#ef535090;font-style:italic}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"strict": true,
|
|
4
|
-
"downlevelIteration": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"allowJs": true,
|
|
9
|
-
"lib": ["esnext", "dom"],
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"jsx": "preserve"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BasicComponent } from './basicComponent'
|
|
2
|
-
|
|
3
|
-
export interface ButtonProps {
|
|
4
|
-
color?: string
|
|
5
|
-
onClick?: (e: Event) => void
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class Button extends BasicComponent {
|
|
9
|
-
$props: ButtonProps
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class _ButtonComponent extends Button {}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
name: 'Basic',
|
|
3
|
-
namespace: 'b',
|
|
4
|
-
title: 'Basic UI',
|
|
5
|
-
logo: './logo.svg',
|
|
6
|
-
useMobile: true,
|
|
7
|
-
themes: {
|
|
8
|
-
'color-body': '#fff',
|
|
9
|
-
'color-bar': '#fff',
|
|
10
|
-
'color-sub-bar': '#f5f5f5',
|
|
11
|
-
'color-text': '#555',
|
|
12
|
-
'color-sub-text': '#888',
|
|
13
|
-
'color-border': 'rgba(0, 0, 0, 0.12)',
|
|
14
|
-
'color-shadow': '#eee',
|
|
15
|
-
'color-introduce-border': '#009688',
|
|
16
|
-
'color-primary': '#009688',
|
|
17
|
-
'color-link': '#009688',
|
|
18
|
-
'color-type': '#009688',
|
|
19
|
-
'color-progress': '#009688',
|
|
20
|
-
'color-progress-track': '#fff',
|
|
21
|
-
'color-side-bar': '#009688',
|
|
22
|
-
'color-side-bar-active-background': '#00968821',
|
|
23
|
-
'color-app-bar': '#009688',
|
|
24
|
-
'color-nav-button-hover-background': 'rgba(0, 0, 0, 0.08)',
|
|
25
|
-
'color-pc-language-active': '#009688',
|
|
26
|
-
'color-pc-language-active-background': '#00968821',
|
|
27
|
-
'color-mobile-language-active': '#009688',
|
|
28
|
-
'color-mobile-language-active-background': '#00968821',
|
|
29
|
-
'color-mobile-cell-hover': '#009688'
|
|
30
|
-
},
|
|
31
|
-
darkThemes: {
|
|
32
|
-
'color-body': '#121212',
|
|
33
|
-
'color-bar': '#1e1e1e',
|
|
34
|
-
'color-sub-bar': '#272727',
|
|
35
|
-
'color-text': '#fff',
|
|
36
|
-
'color-sub-text': '#aaa',
|
|
37
|
-
'color-border': '#333',
|
|
38
|
-
'color-shadow': '#121212',
|
|
39
|
-
'color-introduce-border': '#555',
|
|
40
|
-
'color-primary': '#009688',
|
|
41
|
-
'color-link': '#009688',
|
|
42
|
-
'color-type': '#009688',
|
|
43
|
-
'color-progress': '#009688',
|
|
44
|
-
'color-progress-track': '#202020',
|
|
45
|
-
'color-side-bar': '#009688',
|
|
46
|
-
'color-side-bar-active-background': '#00968821',
|
|
47
|
-
'color-app-bar': '#009688',
|
|
48
|
-
'color-nav-button-hover-background': 'rgba(255, 255, 255, 0.08)',
|
|
49
|
-
'color-pc-language-active': '#009688',
|
|
50
|
-
'color-pc-language-active-background': '#00968821',
|
|
51
|
-
'color-mobile-language-active': '#009688',
|
|
52
|
-
'color-mobile-language-active-background': '#00968821',
|
|
53
|
-
'color-mobile-cell-hover': '#009688',
|
|
54
|
-
},
|
|
55
|
-
highlight: {
|
|
56
|
-
style: './highlight.css',
|
|
57
|
-
},
|
|
58
|
-
pc: {
|
|
59
|
-
redirect: '/home',
|
|
60
|
-
title: {
|
|
61
|
-
'zh-CN': '一个组件库',
|
|
62
|
-
},
|
|
63
|
-
header: {
|
|
64
|
-
i18n: null,
|
|
65
|
-
github: 'https://github.com/haoziqaq/varlet',
|
|
66
|
-
},
|
|
67
|
-
menu: [
|
|
68
|
-
{
|
|
69
|
-
text: {
|
|
70
|
-
'zh-CN': '开发指南',
|
|
71
|
-
},
|
|
72
|
-
type: 1,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
text: {
|
|
76
|
-
'zh-CN': '基本介绍',
|
|
77
|
-
},
|
|
78
|
-
doc: 'home',
|
|
79
|
-
type: 3,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
text: {
|
|
83
|
-
'zh-CN': '基础组件',
|
|
84
|
-
},
|
|
85
|
-
type: 1,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
text: {
|
|
89
|
-
'zh-CN': 'Button 按钮',
|
|
90
|
-
},
|
|
91
|
-
doc: 'button',
|
|
92
|
-
type: 2,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
mobile: {
|
|
97
|
-
redirect: '/home',
|
|
98
|
-
title: {
|
|
99
|
-
'zh-CN': '一个组件库',
|
|
100
|
-
},
|
|
101
|
-
header: {
|
|
102
|
-
i18n: null,
|
|
103
|
-
github: 'https://github.com/haoziqaq/varlet',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
}
|