@phila/phila-ui-nav-link 0.0.11 → 0.0.13
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 +32 -11
- package/dist/NavLink.js +2 -2
- package/dist/NavLink.vue.d.ts +1 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
## Usage
|
|
2
|
+
### Import single component
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
```js
|
|
5
|
+
import NavLink from "@phila/phila-ui-nav-link";
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
//register it locally...
|
|
8
|
+
components: {
|
|
9
|
+
NavLink,
|
|
10
|
+
}
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
//... or register it globally
|
|
13
|
+
Vue.component('NavLink', NavLink);
|
|
14
|
+
```
|
|
8
15
|
|
|
9
|
-
##
|
|
16
|
+
## router-link
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
The NavLink props when using it as a **router-link**.
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
```js
|
|
21
|
+
{
|
|
22
|
+
href: 'vue-router route name', //the route name is used, and not the path
|
|
23
|
+
text: 'My Link',
|
|
24
|
+
attrs: Object //any other html anchor attributes
|
|
25
|
+
}
|
|
26
|
+
```
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
## Regular link
|
|
29
|
+
The NavLink props when using it as a **regular/native** link.
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
{
|
|
33
|
+
type: 'native',
|
|
34
|
+
href: String, //url
|
|
35
|
+
active: Boolean,
|
|
36
|
+
click: Function,
|
|
37
|
+
attrs: Object //any other html anchor attributes
|
|
38
|
+
}
|
|
39
|
+
```
|
package/dist/NavLink.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, resolveComponent as s,
|
|
1
|
+
import { defineComponent as a, resolveComponent as s, createElementBlock as i, createBlock as l, openBlock as t, mergeProps as o, toHandlers as c, toDisplayString as r, withCtx as p, createTextVNode as k } from "vue";
|
|
2
2
|
const u = ["href"], v = /* @__PURE__ */ a({
|
|
3
3
|
__name: "NavLink",
|
|
4
4
|
props: {
|
|
@@ -16,7 +16,7 @@ const u = ["href"], v = /* @__PURE__ */ a({
|
|
|
16
16
|
return e.type === "native" ? (t(), i("a", o({ key: 0 }, e.attrs, {
|
|
17
17
|
href: e.href,
|
|
18
18
|
class: { "is-active": e.active }
|
|
19
|
-
},
|
|
19
|
+
}, c(e.click ? { click: e.click } : {}, !0)), r(e.text), 17, u)) : (t(), l(n, o({
|
|
20
20
|
key: 1,
|
|
21
21
|
to: e.href,
|
|
22
22
|
class: { "is-active": e.active }
|
package/dist/NavLink.vue.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { NavLinkProps } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
+
declare const _default: import("vue").DefineComponent<NavLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
3
|
export default _default;
|
|
4
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
5
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
6
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
7
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
8
|
-
} : {
|
|
9
|
-
type: import('vue').PropType<T[K]>;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-nav-link",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.10.3",
|
|
24
24
|
"@vitejs/plugin-vue": "^4.5.0",
|
|
25
|
-
"typescript": "^5.
|
|
25
|
+
"typescript": "^5.8.2",
|
|
26
26
|
"vite": "^5.0.0",
|
|
27
27
|
"vite-plugin-dts": "^3.6.4",
|
|
28
|
-
"vue-tsc": "^
|
|
28
|
+
"vue-tsc": "^2.2.8"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"registry": "https://registry.npmjs.com/",
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "f00518592815b1bf558d88f77fc4b6b3a30296e5"
|
|
35
35
|
}
|