@dargmuesli/nuxt-vio 1.8.2 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/VioButton.vue +65 -0
- package/package.json +14 -14
@@ -0,0 +1,65 @@
|
|
1
|
+
<template>
|
2
|
+
<VioLink
|
3
|
+
v-if="to"
|
4
|
+
:aria-label="ariaLabel"
|
5
|
+
:class="classesComputed"
|
6
|
+
:disabled="disabled"
|
7
|
+
:is-colored="false"
|
8
|
+
:is-to-relative="isToRelative"
|
9
|
+
:to="to"
|
10
|
+
@click="emit('click')"
|
11
|
+
>
|
12
|
+
<slot name="prefix" />
|
13
|
+
<slot />
|
14
|
+
<slot name="suffix" />
|
15
|
+
</VioLink>
|
16
|
+
<button
|
17
|
+
v-else
|
18
|
+
:aria-label="ariaLabel"
|
19
|
+
:class="classesComputed"
|
20
|
+
:disabled="disabled"
|
21
|
+
:type="type"
|
22
|
+
@click="emit('click')"
|
23
|
+
>
|
24
|
+
<slot name="prefix" />
|
25
|
+
<slot />
|
26
|
+
<slot name="suffix" />
|
27
|
+
</button>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script setup lang="ts">
|
31
|
+
export interface Props {
|
32
|
+
ariaLabel: string
|
33
|
+
classes?: string
|
34
|
+
disabled?: boolean
|
35
|
+
isBlock?: boolean
|
36
|
+
isLinkColored?: boolean
|
37
|
+
isToRelative?: boolean
|
38
|
+
to?: string
|
39
|
+
type?: 'button' | 'submit' | 'reset'
|
40
|
+
}
|
41
|
+
const props = withDefaults(defineProps<Props>(), {
|
42
|
+
classes: undefined,
|
43
|
+
disabled: false,
|
44
|
+
isBlock: false,
|
45
|
+
isLinkColored: false,
|
46
|
+
isToRelative: false,
|
47
|
+
to: undefined,
|
48
|
+
type: 'button',
|
49
|
+
})
|
50
|
+
|
51
|
+
const emit = defineEmits<{
|
52
|
+
(e: 'click'): void
|
53
|
+
}>()
|
54
|
+
|
55
|
+
// computations
|
56
|
+
const classesComputed = computed(() => {
|
57
|
+
return [
|
58
|
+
props.classes,
|
59
|
+
...(props.isBlock
|
60
|
+
? ['block']
|
61
|
+
: ['inline-flex items-center justify-center gap-2']),
|
62
|
+
...(props.isLinkColored ? ['text-link-dark dark:text-link-bright'] : []),
|
63
|
+
].join(' ')
|
64
|
+
})
|
65
|
+
</script>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.9.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"engines": {
|
9
9
|
"node": "18"
|
10
10
|
},
|
11
|
-
"packageManager": "pnpm@8.
|
11
|
+
"packageManager": "pnpm@8.3.1",
|
12
12
|
"files": [
|
13
13
|
"assets",
|
14
14
|
"components",
|
@@ -34,37 +34,37 @@
|
|
34
34
|
"lint:js": "eslint --cache --ext .js,.ts,.vue --ignore-path .gitignore .",
|
35
35
|
"lint:staged": "pnpm lint-staged",
|
36
36
|
"lint:style": "stylelint **/*.{vue,css} --ignore-path .gitignore",
|
37
|
-
"lint:ts": "
|
37
|
+
"lint:ts": "nuxt typecheck"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@dargmuesli/nuxt-cookie-control": "5.
|
40
|
+
"@dargmuesli/nuxt-cookie-control": "5.7.0",
|
41
41
|
"@http-util/status-i18n": "0.6.2",
|
42
|
-
"@nuxtjs/html-validator": "1.2.
|
42
|
+
"@nuxtjs/html-validator": "1.2.5",
|
43
43
|
"@nuxtjs/i18n": "8.0.0-beta.10",
|
44
44
|
"@nuxtjs/tailwindcss": "6.6.6",
|
45
45
|
"@tailwindcss/typography": "0.5.9",
|
46
|
-
"nuxt-seo-kit": "1.3.
|
46
|
+
"nuxt-seo-kit": "1.3.7",
|
47
47
|
"vue-gtag": "2.0.1"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
|
-
"@commitlint/cli": "17.6.
|
51
|
-
"@commitlint/config-conventional": "17.6.
|
50
|
+
"@commitlint/cli": "17.6.1",
|
51
|
+
"@commitlint/config-conventional": "17.6.1",
|
52
52
|
"@intlify/eslint-plugin-vue-i18n": "2.0.0",
|
53
53
|
"@nuxtjs/eslint-config-typescript": "12.0.0",
|
54
|
-
"eslint": "8.
|
54
|
+
"eslint": "8.39.0",
|
55
55
|
"eslint-config-prettier": "8.8.0",
|
56
56
|
"eslint-plugin-nuxt": "4.0.0",
|
57
57
|
"eslint-plugin-prettier": "4.2.1",
|
58
58
|
"eslint-plugin-yml": "1.5.0",
|
59
59
|
"husky": "8.0.3",
|
60
60
|
"lint-staged": "13.2.1",
|
61
|
-
"nuxt": "3.4.
|
62
|
-
"prettier": "2.8.
|
63
|
-
"stylelint": "15.
|
61
|
+
"nuxt": "3.4.2",
|
62
|
+
"prettier": "2.8.8",
|
63
|
+
"stylelint": "15.6.0",
|
64
64
|
"stylelint-config-recommended-vue": "1.4.0",
|
65
|
-
"stylelint-config-standard": "
|
65
|
+
"stylelint-config-standard": "33.0.0",
|
66
66
|
"stylelint-no-unsupported-browser-features": "6.1.0",
|
67
67
|
"typescript": "5.0.4",
|
68
|
-
"vue-tsc": "1.
|
68
|
+
"vue-tsc": "1.4.4"
|
69
69
|
}
|
70
70
|
}
|