@drax/identity-front 0.0.3
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 +61 -0
- package/dist/components/IdentityLogin/IdentityLogin.vue.d.ts +15 -0
- package/dist/drax-identity-front.js +38 -0
- package/dist/drax-identity-front.umd.cjs +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +3 -0
- package/package.json +60 -0
- package/src/assets/base.css +86 -0
- package/src/assets/logo.svg +1 -0
- package/src/assets/main.css +35 -0
- package/src/components/HelloWorld.vue +41 -0
- package/src/components/IdentityLogin/IdentityLogin.vue +18 -0
- package/src/components/TheWelcome.vue +88 -0
- package/src/components/WelcomeItem.vue +87 -0
- package/src/components/__tests__/IdentityLogin.spec.ts +11 -0
- package/src/components/icons/IconCommunity.vue +7 -0
- package/src/components/icons/IconDocumentation.vue +0 -0
- package/src/components/icons/IconEcosystem.vue +0 -0
- package/src/components/icons/IconSupport.vue +0 -0
- package/src/components/icons/IconTooling.vue +0 -0
- package/src/index.ts +6 -0
- package/src/stores/counter.ts +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# identity-front
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
8
|
+
|
|
9
|
+
## Type Support for `.vue` Imports in TS
|
|
10
|
+
|
|
11
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
|
12
|
+
|
|
13
|
+
## Customize configuration
|
|
14
|
+
|
|
15
|
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
16
|
+
|
|
17
|
+
## Project Setup
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Compile and Hot-Reload for Development
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Type-Check, Compile and Minify for Production
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm run build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npm run test:unit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm run test:e2e:dev
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This runs the end-to-end tests against the Vite development server.
|
|
48
|
+
It is much faster than the production build.
|
|
49
|
+
|
|
50
|
+
But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npm run build
|
|
54
|
+
npm run test:e2e
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Lint with [ESLint](https://eslint.org/)
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
npm run lint
|
|
61
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
msg: string;
|
|
3
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
msg: string;
|
|
5
|
+
}>>>, {}, {}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as l, resolveComponent as e, openBlock as d, createBlock as s, withCtx as t, createVNode as n, createTextVNode as _, toDisplayString as p, createElementVNode as i } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ i("h1", null, "IDENTITY LOGIN", -1), x = /* @__PURE__ */ l({
|
|
3
|
+
__name: "IdentityLogin",
|
|
4
|
+
props: {
|
|
5
|
+
msg: {}
|
|
6
|
+
},
|
|
7
|
+
setup(u) {
|
|
8
|
+
return (c, f) => {
|
|
9
|
+
const r = e("v-card-title"), o = e("v-card-text"), a = e("v-card");
|
|
10
|
+
return d(), s(a, { text: "" }, {
|
|
11
|
+
default: t(() => [
|
|
12
|
+
n(r, null, {
|
|
13
|
+
default: t(() => [
|
|
14
|
+
m
|
|
15
|
+
]),
|
|
16
|
+
_: 1
|
|
17
|
+
}),
|
|
18
|
+
n(o, null, {
|
|
19
|
+
default: t(() => [
|
|
20
|
+
_("INCA DRAX")
|
|
21
|
+
]),
|
|
22
|
+
_: 1
|
|
23
|
+
}),
|
|
24
|
+
n(o, null, {
|
|
25
|
+
default: t(() => [
|
|
26
|
+
_(p(c.msg), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
})
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
x as IdentityLogin
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t["@drax/identity-front"]={},t.Vue))})(this,function(t,e){"use strict";const o=e.createElementVNode("h1",null,"IDENTITY LOGIN",-1),d=e.defineComponent({__name:"IdentityLogin",props:{msg:{}},setup(l){return(i,s)=>{const r=e.resolveComponent("v-card-title"),n=e.resolveComponent("v-card-text"),c=e.resolveComponent("v-card");return e.openBlock(),e.createBlock(c,{text:""},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[o]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[e.createTextVNode("INCA DRAX")]),_:1}),e.createVNode(n,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.msg),1)]),_:1})]),_:1})}}});t.IdentityLogin=d,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@drax/identity-front",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.0.3",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/drax-identity-front.umd.js",
|
|
9
|
+
"module": "./dist/drax-identity-front.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "vite",
|
|
17
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
18
|
+
"preview": "vite preview",
|
|
19
|
+
"test:unit": "vitest",
|
|
20
|
+
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
|
|
21
|
+
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
|
|
22
|
+
"build-only": "vite build",
|
|
23
|
+
"type-check": "vue-tsc --build --force",
|
|
24
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
25
|
+
"format": "prettier --write src/"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"pinia": "^2.1.7",
|
|
29
|
+
"vue": "^3.4.21",
|
|
30
|
+
"vuetify": "^3.6.4"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@rushstack/eslint-patch": "^1.8.0",
|
|
34
|
+
"@tsconfig/node20": "^20.1.4",
|
|
35
|
+
"@types/jsdom": "^21.1.6",
|
|
36
|
+
"@types/node": "^20.12.5",
|
|
37
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
38
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
39
|
+
"@vue/eslint-config-typescript": "^13.0.0",
|
|
40
|
+
"@vue/test-utils": "^2.4.5",
|
|
41
|
+
"@vue/tsconfig": "^0.5.1",
|
|
42
|
+
"cypress": "^13.7.2",
|
|
43
|
+
"eslint": "^8.57.0",
|
|
44
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
45
|
+
"eslint-plugin-vue": "^9.23.0",
|
|
46
|
+
"jsdom": "^24.0.0",
|
|
47
|
+
"npm-run-all2": "^6.1.2",
|
|
48
|
+
"pinia": "^2.1.7",
|
|
49
|
+
"prettier": "^3.2.5",
|
|
50
|
+
"start-server-and-test": "^2.0.3",
|
|
51
|
+
"typescript": "~5.4.0",
|
|
52
|
+
"vite": "^5.2.8",
|
|
53
|
+
"vite-plugin-dts": "^3.9.1",
|
|
54
|
+
"vitest": "^1.4.0",
|
|
55
|
+
"vue": "^3.4.21",
|
|
56
|
+
"vue-tsc": "^2.0.11",
|
|
57
|
+
"vuetify": "^3.6.4"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "f47b34b60c6b1392c0ad671461645fa55e5b649b"
|
|
60
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* color palette from <https://github.com/vuejs/theme> */
|
|
2
|
+
:root {
|
|
3
|
+
--vt-c-white: #ffffff;
|
|
4
|
+
--vt-c-white-soft: #f8f8f8;
|
|
5
|
+
--vt-c-white-mute: #f2f2f2;
|
|
6
|
+
|
|
7
|
+
--vt-c-black: #181818;
|
|
8
|
+
--vt-c-black-soft: #222222;
|
|
9
|
+
--vt-c-black-mute: #282828;
|
|
10
|
+
|
|
11
|
+
--vt-c-indigo: #2c3e50;
|
|
12
|
+
|
|
13
|
+
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
|
|
14
|
+
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
|
|
15
|
+
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
|
|
16
|
+
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
|
|
17
|
+
|
|
18
|
+
--vt-c-text-light-1: var(--vt-c-indigo);
|
|
19
|
+
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
|
|
20
|
+
--vt-c-text-dark-1: var(--vt-c-white);
|
|
21
|
+
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* semantic color variables for this project */
|
|
25
|
+
:root {
|
|
26
|
+
--color-background: var(--vt-c-white);
|
|
27
|
+
--color-background-soft: var(--vt-c-white-soft);
|
|
28
|
+
--color-background-mute: var(--vt-c-white-mute);
|
|
29
|
+
|
|
30
|
+
--color-border: var(--vt-c-divider-light-2);
|
|
31
|
+
--color-border-hover: var(--vt-c-divider-light-1);
|
|
32
|
+
|
|
33
|
+
--color-heading: var(--vt-c-text-light-1);
|
|
34
|
+
--color-text: var(--vt-c-text-light-1);
|
|
35
|
+
|
|
36
|
+
--section-gap: 160px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (prefers-color-scheme: dark) {
|
|
40
|
+
:root {
|
|
41
|
+
--color-background: var(--vt-c-black);
|
|
42
|
+
--color-background-soft: var(--vt-c-black-soft);
|
|
43
|
+
--color-background-mute: var(--vt-c-black-mute);
|
|
44
|
+
|
|
45
|
+
--color-border: var(--vt-c-divider-dark-2);
|
|
46
|
+
--color-border-hover: var(--vt-c-divider-dark-1);
|
|
47
|
+
|
|
48
|
+
--color-heading: var(--vt-c-text-dark-1);
|
|
49
|
+
--color-text: var(--vt-c-text-dark-2);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
*,
|
|
54
|
+
*::before,
|
|
55
|
+
*::after {
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
margin: 0;
|
|
58
|
+
font-weight: normal;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
body {
|
|
62
|
+
min-height: 100vh;
|
|
63
|
+
color: var(--color-text);
|
|
64
|
+
background: var(--color-background);
|
|
65
|
+
transition:
|
|
66
|
+
color 0.5s,
|
|
67
|
+
background-color 0.5s;
|
|
68
|
+
line-height: 1.6;
|
|
69
|
+
font-family:
|
|
70
|
+
Inter,
|
|
71
|
+
-apple-system,
|
|
72
|
+
BlinkMacSystemFont,
|
|
73
|
+
'Segoe UI',
|
|
74
|
+
Roboto,
|
|
75
|
+
Oxygen,
|
|
76
|
+
Ubuntu,
|
|
77
|
+
Cantarell,
|
|
78
|
+
'Fira Sans',
|
|
79
|
+
'Droid Sans',
|
|
80
|
+
'Helvetica Neue',
|
|
81
|
+
sans-serif;
|
|
82
|
+
font-size: 15px;
|
|
83
|
+
text-rendering: optimizeLegibility;
|
|
84
|
+
-webkit-font-smoothing: antialiased;
|
|
85
|
+
-moz-osx-font-smoothing: grayscale;
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@import './base.css';
|
|
2
|
+
|
|
3
|
+
#app {
|
|
4
|
+
max-width: 1280px;
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
padding: 2rem;
|
|
7
|
+
font-weight: normal;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
a,
|
|
11
|
+
.green {
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
color: hsla(160, 100%, 37%, 1);
|
|
14
|
+
transition: 0.4s;
|
|
15
|
+
padding: 3px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (hover: hover) {
|
|
19
|
+
a:hover {
|
|
20
|
+
background-color: hsla(160, 100%, 37%, 0.2);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (min-width: 1024px) {
|
|
25
|
+
body {
|
|
26
|
+
display: flex;
|
|
27
|
+
place-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#app {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: 1fr 1fr;
|
|
33
|
+
padding: 0 2rem;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
msg: string
|
|
4
|
+
}>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="greetings">
|
|
9
|
+
<h1 class="green">{{ msg }}</h1>
|
|
10
|
+
<h3>
|
|
11
|
+
You’ve successfully created a project with
|
|
12
|
+
<a href="https://vitejs.dev/" target="_blank" rel="noopener">Vite</a> +
|
|
13
|
+
<a href="https://vuejs.org/" target="_blank" rel="noopener">Vue 3</a>.
|
|
14
|
+
</h3>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<style scoped>
|
|
19
|
+
h1 {
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
font-size: 2.6rem;
|
|
22
|
+
position: relative;
|
|
23
|
+
top: -10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
h3 {
|
|
27
|
+
font-size: 1.2rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.greetings h1,
|
|
31
|
+
.greetings h3 {
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (min-width: 1024px) {
|
|
36
|
+
.greetings h1,
|
|
37
|
+
.greetings h3 {
|
|
38
|
+
text-align: left;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
msg: string
|
|
4
|
+
}>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
|
|
9
|
+
<v-card text="">
|
|
10
|
+
<v-card-title><h1>IDENTITY LOGIN</h1></v-card-title>
|
|
11
|
+
<v-card-text>INCA DRAX</v-card-text>
|
|
12
|
+
<v-card-text>{{ msg }}</v-card-text>
|
|
13
|
+
</v-card>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<style scoped lang="sass">
|
|
17
|
+
|
|
18
|
+
</style>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import WelcomeItem from './WelcomeItem.vue'
|
|
3
|
+
import DocumentationIcon from './icons/IconDocumentation.vue'
|
|
4
|
+
import ToolingIcon from './icons/IconTooling.vue'
|
|
5
|
+
import EcosystemIcon from './icons/IconEcosystem.vue'
|
|
6
|
+
import CommunityIcon from './icons/IconCommunity.vue'
|
|
7
|
+
import SupportIcon from './icons/IconSupport.vue'
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<WelcomeItem>
|
|
12
|
+
<template #icon>
|
|
13
|
+
<DocumentationIcon />
|
|
14
|
+
</template>
|
|
15
|
+
<template #heading>Documentation</template>
|
|
16
|
+
|
|
17
|
+
Vue’s
|
|
18
|
+
<a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a>
|
|
19
|
+
provides you with all information you need to get started.
|
|
20
|
+
</WelcomeItem>
|
|
21
|
+
|
|
22
|
+
<WelcomeItem>
|
|
23
|
+
<template #icon>
|
|
24
|
+
<ToolingIcon />
|
|
25
|
+
</template>
|
|
26
|
+
<template #heading>Tooling</template>
|
|
27
|
+
|
|
28
|
+
This project is served and bundled with
|
|
29
|
+
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The
|
|
30
|
+
recommended IDE setup is
|
|
31
|
+
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> +
|
|
32
|
+
<a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If
|
|
33
|
+
you need to test your components and web pages, check out
|
|
34
|
+
<a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and
|
|
35
|
+
<a href="https://on.cypress.io/component" target="_blank" rel="noopener"
|
|
36
|
+
>Cypress Component Testing</a
|
|
37
|
+
>.
|
|
38
|
+
|
|
39
|
+
<br />
|
|
40
|
+
|
|
41
|
+
More instructions are available in <code>README.md</code>.
|
|
42
|
+
</WelcomeItem>
|
|
43
|
+
|
|
44
|
+
<WelcomeItem>
|
|
45
|
+
<template #icon>
|
|
46
|
+
<EcosystemIcon />
|
|
47
|
+
</template>
|
|
48
|
+
<template #heading>Ecosystem</template>
|
|
49
|
+
|
|
50
|
+
Get official tools and libraries for your project:
|
|
51
|
+
<a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>,
|
|
52
|
+
<a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>,
|
|
53
|
+
<a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and
|
|
54
|
+
<a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If
|
|
55
|
+
you need more resources, we suggest paying
|
|
56
|
+
<a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a>
|
|
57
|
+
a visit.
|
|
58
|
+
</WelcomeItem>
|
|
59
|
+
|
|
60
|
+
<WelcomeItem>
|
|
61
|
+
<template #icon>
|
|
62
|
+
<CommunityIcon />
|
|
63
|
+
</template>
|
|
64
|
+
<template #heading>Community</template>
|
|
65
|
+
|
|
66
|
+
Got stuck? Ask your question on
|
|
67
|
+
<a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official
|
|
68
|
+
Discord server, or
|
|
69
|
+
<a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener"
|
|
70
|
+
>StackOverflow</a
|
|
71
|
+
>. You should also subscribe to
|
|
72
|
+
<a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow
|
|
73
|
+
the official
|
|
74
|
+
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a>
|
|
75
|
+
twitter account for latest news in the Vue world.
|
|
76
|
+
</WelcomeItem>
|
|
77
|
+
|
|
78
|
+
<WelcomeItem>
|
|
79
|
+
<template #icon>
|
|
80
|
+
<SupportIcon />
|
|
81
|
+
</template>
|
|
82
|
+
<template #heading>Support Vue</template>
|
|
83
|
+
|
|
84
|
+
As an independent project, Vue relies on community backing for its sustainability. You can help
|
|
85
|
+
us by
|
|
86
|
+
<a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>.
|
|
87
|
+
</WelcomeItem>
|
|
88
|
+
</template>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="item">
|
|
3
|
+
<i>
|
|
4
|
+
<slot name="icon"></slot>
|
|
5
|
+
</i>
|
|
6
|
+
<div class="details">
|
|
7
|
+
<h3>
|
|
8
|
+
<slot name="heading"></slot>
|
|
9
|
+
</h3>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
.item {
|
|
17
|
+
margin-top: 2rem;
|
|
18
|
+
display: flex;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.details {
|
|
23
|
+
flex: 1;
|
|
24
|
+
margin-left: 1rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
i {
|
|
28
|
+
display: flex;
|
|
29
|
+
place-items: center;
|
|
30
|
+
place-content: center;
|
|
31
|
+
width: 32px;
|
|
32
|
+
height: 32px;
|
|
33
|
+
|
|
34
|
+
color: var(--color-text);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
h3 {
|
|
38
|
+
font-size: 1.2rem;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
margin-bottom: 0.4rem;
|
|
41
|
+
color: var(--color-heading);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (min-width: 1024px) {
|
|
45
|
+
.item {
|
|
46
|
+
margin-top: 0;
|
|
47
|
+
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
i {
|
|
51
|
+
top: calc(50% - 25px);
|
|
52
|
+
left: -26px;
|
|
53
|
+
position: absolute;
|
|
54
|
+
border: 1px solid var(--color-border);
|
|
55
|
+
background: var(--color-background);
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
width: 50px;
|
|
58
|
+
height: 50px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.item:before {
|
|
62
|
+
content: ' ';
|
|
63
|
+
border-left: 1px solid var(--color-border);
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: 0;
|
|
66
|
+
bottom: calc(50% + 25px);
|
|
67
|
+
height: calc(50% - 25px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.item:after {
|
|
71
|
+
content: ' ';
|
|
72
|
+
border-left: 1px solid var(--color-border);
|
|
73
|
+
position: absolute;
|
|
74
|
+
left: 0;
|
|
75
|
+
top: calc(50% + 25px);
|
|
76
|
+
height: calc(50% - 25px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.item:first-of-type:before {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.item:last-of-type:after {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import { mount } from '@vue/test-utils'
|
|
4
|
+
import IdentityLogin from '../IdentityLogin/IdentityLogin.vue'
|
|
5
|
+
|
|
6
|
+
describe('IdentityLogin', () => {
|
|
7
|
+
it('renders properly', () => {
|
|
8
|
+
const wrapper = mount(IdentityLogin, { props: { msg: 'Hello Vitest' } })
|
|
9
|
+
expect(wrapper.text()).toContain('Hello Vitest')
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ref, computed } from 'vue'
|
|
2
|
+
import { defineStore } from 'pinia'
|
|
3
|
+
|
|
4
|
+
export const useCounterStore = defineStore('counter', () => {
|
|
5
|
+
const count = ref(0)
|
|
6
|
+
const doubleCount = computed(() => count.value * 2)
|
|
7
|
+
function increment() {
|
|
8
|
+
count.value++
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return { count, doubleCount, increment }
|
|
12
|
+
})
|