@phila/phila-ui-breadcrumbs 0.2.3-beta.5 → 0.2.3-beta.7
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/dist/Breadcrumbs.vue.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +34 -42
- package/package.json +3 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.vue.d.ts","sourceRoot":"","sources":["../src/Breadcrumbs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.vue.d.ts","sourceRoot":"","sources":["../src/Breadcrumbs.vue"],"names":[],"mappings":"AAwBA;AAgGA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;;;;;;AAmIrE,wBAQG"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
nav[data-v-
|
|
1
|
+
nav[data-v-878b771f]{padding:var(--spacing-s)}ul[data-v-878b771f]{list-style:none;display:flex;flex-wrap:wrap;padding:0;margin:0}li[data-v-878b771f]{align-items:center;white-space:nowrap;display:flex}li[data-v-878b771f]:not(:last-child):after{content:"/";margin:0 var(--spacing-xs) 0 var(--spacing-s)}.breadcrumb-mobile[data-v-878b771f]{display:none}@media(max-width:768px){ul[data-v-878b771f]{display:none}.breadcrumb-mobile[data-v-878b771f]{display:block}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),u=require("@phila/phila-ui-core"),i=require("@phila/phila-ui-core/icons"),s=require("@phila/phila-ui-link"),d={key:0,class:"has-text-body-small"},c=e.defineComponent({__name:"BreadcrumbLink",props:{item:{},isMobile:{type:Boolean,default:!1},isCurrentPage:{type:Boolean,default:!1}},setup(n){return(t,r)=>n.isCurrentPage?(e.openBlock(),e.createElementBlock("span",d,e.toDisplayString(n.item.label),1)):(e.openBlock(),e.createBlock(e.unref(s.PhilaLink),{key:1,href:n.item.href,size:"small",icon:n.isMobile?e.unref(i.IconChevronLeft):void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.item.label),1)]),_:1},8,["href","icon"]))}}),f={"aria-label":"breadcrumb"},h={class:"breadcrumb-mobile"},b=["aria-current"],p=e.defineComponent({__name:"Breadcrumbs",props:{items:{default:()=>[]},className:{default:""},homeHref:{default:"/"}},setup(n){const t=n,r=e.computed(()=>u.cn(t.className+" content")),o=()=>t.items.length>1?t.items[t.items.length-2]:{label:"Home",href:t.homeHref};return(a,g)=>(e.openBlock(),e.createElementBlock("nav",f,[e.createElementVNode("div",h,[e.createVNode(c,{item:o(),"is-mobile":""},null,8,["item"])]),e.createElementVNode("ul",{class:e.normalizeClass(r.value)},[e.createElementVNode("li",null,[e.createVNode(e.unref(s.PhilaLink),{href:t.homeHref||"/",icon:e.unref(i.IconHouse),"icon-only":"",inline:"",size:"small","aria-label":"Home"},null,8,["href","icon"])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(m,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:"breadcrumb-item","aria-current":l===t.items.length-1?"page":void 0},[e.createVNode(c,{item:m,"is-current-page":l===t.items.length-1},null,8,["item","is-current-page"])],8,b))),128))],2)]))}}),_=(n,t)=>{const r=n.__vccOpts||n;for(const[o,a]of t)r[o]=a;return r},k=_(p,[["__scopeId","data-v-878b771f"]]);exports.Breadcrumbs=k;
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { defineComponent as d, createElementBlock as n, createBlock as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { defineComponent as d, createElementBlock as n, createBlock as _, openBlock as a, toDisplayString as u, unref as o, withCtx as p, createTextVNode as g, computed as k, createElementVNode as i, createVNode as c, normalizeClass as v, Fragment as y, renderList as B } from "vue";
|
|
2
|
+
import { cn as C } from "@phila/phila-ui-core";
|
|
3
|
+
import { IconChevronLeft as H, IconHouse as x } from "@phila/phila-ui-core/icons";
|
|
3
4
|
import { PhilaLink as h } from "@phila/phila-ui-link";
|
|
4
|
-
import './index.css';
|
|
5
|
-
prefix: "fas",
|
|
6
|
-
iconName: "angle-left",
|
|
7
|
-
icon: [256, 512, [8249], "f104", "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]
|
|
8
|
-
}, z = {
|
|
9
|
-
prefix: "fas",
|
|
10
|
-
iconName: "house",
|
|
11
|
-
icon: [512, 512, [127968, 63498, 63500, "home", "home-alt", "home-lg-alt"], "f015", "M277.8 8.6c-12.3-11.4-31.3-11.4-43.5 0l-224 208c-9.6 9-12.8 22.9-8 35.1S18.8 272 32 272l16 0 0 176c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-176 16 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8-35.1l-224-208zM240 320l32 0c26.5 0 48 21.5 48 48l0 96-128 0 0-96c0-26.5 21.5-48 48-48z"]
|
|
12
|
-
};
|
|
13
|
-
const H = {
|
|
5
|
+
import './index.css';const N = {
|
|
14
6
|
key: 0,
|
|
15
7
|
class: "has-text-body-small"
|
|
16
|
-
},
|
|
8
|
+
}, f = /* @__PURE__ */ d({
|
|
17
9
|
__name: "BreadcrumbLink",
|
|
18
10
|
props: {
|
|
19
11
|
item: {},
|
|
@@ -21,19 +13,19 @@ const H = {
|
|
|
21
13
|
isCurrentPage: { type: Boolean, default: !1 }
|
|
22
14
|
},
|
|
23
15
|
setup(t) {
|
|
24
|
-
return (e,
|
|
16
|
+
return (e, r) => t.isCurrentPage ? (a(), n("span", N, u(t.item.label), 1)) : (a(), _(o(h), {
|
|
25
17
|
key: 1,
|
|
26
18
|
href: t.item.href,
|
|
27
19
|
size: "small",
|
|
28
|
-
|
|
20
|
+
icon: t.isMobile ? o(H) : void 0
|
|
29
21
|
}, {
|
|
30
|
-
default:
|
|
31
|
-
g(
|
|
22
|
+
default: p(() => [
|
|
23
|
+
g(u(t.item.label), 1)
|
|
32
24
|
]),
|
|
33
25
|
_: 1
|
|
34
|
-
}, 8, ["href", "icon
|
|
26
|
+
}, 8, ["href", "icon"]));
|
|
35
27
|
}
|
|
36
|
-
}),
|
|
28
|
+
}), I = { "aria-label": "breadcrumb" }, L = { class: "breadcrumb-mobile" }, P = ["aria-current"], z = /* @__PURE__ */ d({
|
|
37
29
|
__name: "Breadcrumbs",
|
|
38
30
|
props: {
|
|
39
31
|
items: { default: () => [] },
|
|
@@ -41,49 +33,49 @@ const H = {
|
|
|
41
33
|
homeHref: { default: "/" }
|
|
42
34
|
},
|
|
43
35
|
setup(t) {
|
|
44
|
-
const e = t,
|
|
36
|
+
const e = t, r = k(() => C(e.className + " content")), l = () => e.items.length > 1 ? e.items[e.items.length - 2] : {
|
|
45
37
|
label: "Home",
|
|
46
38
|
href: e.homeHref
|
|
47
39
|
};
|
|
48
|
-
return (m, E) => (a(), n("nav",
|
|
49
|
-
|
|
50
|
-
c(
|
|
51
|
-
item:
|
|
40
|
+
return (m, E) => (a(), n("nav", I, [
|
|
41
|
+
i("div", L, [
|
|
42
|
+
c(f, {
|
|
43
|
+
item: l(),
|
|
52
44
|
"is-mobile": ""
|
|
53
45
|
}, null, 8, ["item"])
|
|
54
46
|
]),
|
|
55
|
-
|
|
56
|
-
class: v(
|
|
47
|
+
i("ul", {
|
|
48
|
+
class: v(r.value)
|
|
57
49
|
}, [
|
|
58
|
-
|
|
59
|
-
c(
|
|
50
|
+
i("li", null, [
|
|
51
|
+
c(o(h), {
|
|
60
52
|
href: e.homeHref || "/",
|
|
61
|
-
|
|
53
|
+
icon: o(x),
|
|
62
54
|
"icon-only": "",
|
|
63
55
|
inline: "",
|
|
64
56
|
size: "small",
|
|
65
57
|
"aria-label": "Home"
|
|
66
|
-
}, null, 8, ["href", "icon
|
|
58
|
+
}, null, 8, ["href", "icon"])
|
|
67
59
|
]),
|
|
68
|
-
(a(!0), n(y, null, B(e.items, (b,
|
|
69
|
-
key:
|
|
60
|
+
(a(!0), n(y, null, B(e.items, (b, s) => (a(), n("li", {
|
|
61
|
+
key: s,
|
|
70
62
|
class: "breadcrumb-item",
|
|
71
|
-
"aria-current":
|
|
63
|
+
"aria-current": s === e.items.length - 1 ? "page" : void 0
|
|
72
64
|
}, [
|
|
73
|
-
c(
|
|
65
|
+
c(f, {
|
|
74
66
|
item: b,
|
|
75
|
-
"is-current-page":
|
|
67
|
+
"is-current-page": s === e.items.length - 1
|
|
76
68
|
}, null, 8, ["item", "is-current-page"])
|
|
77
|
-
], 8,
|
|
69
|
+
], 8, P))), 128))
|
|
78
70
|
], 2)
|
|
79
71
|
]));
|
|
80
72
|
}
|
|
81
73
|
}), V = (t, e) => {
|
|
82
|
-
const
|
|
83
|
-
for (const [
|
|
84
|
-
l
|
|
85
|
-
return
|
|
86
|
-
},
|
|
74
|
+
const r = t.__vccOpts || t;
|
|
75
|
+
for (const [l, m] of e)
|
|
76
|
+
r[l] = m;
|
|
77
|
+
return r;
|
|
78
|
+
}, F = /* @__PURE__ */ V(z, [["__scopeId", "data-v-878b771f"]]);
|
|
87
79
|
export {
|
|
88
|
-
|
|
80
|
+
F as Breadcrumbs
|
|
89
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-breadcrumbs",
|
|
3
|
-
"version": "0.2.3-beta.
|
|
3
|
+
"version": "0.2.3-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A breadcrumb component for Phila UI",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,18 +25,13 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@fortawesome/vue-fontawesome": "^3.1.2",
|
|
29
28
|
"vue": "^3.0.0"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@phila/phila-ui-core": "3.0.0-beta.
|
|
33
|
-
"@phila/phila-ui-link": "1.0
|
|
31
|
+
"@phila/phila-ui-core": "3.0.0-beta.7",
|
|
32
|
+
"@phila/phila-ui-link": "1.1.0-beta.7"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
37
|
-
"@fortawesome/pro-regular-svg-icons": "^7.1.0",
|
|
38
|
-
"@fortawesome/pro-solid-svg-icons": "^7.1.0",
|
|
39
|
-
"@fortawesome/vue-fontawesome": "^3.1.2",
|
|
40
35
|
"@types/node": "^24.0.0",
|
|
41
36
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
42
37
|
"eslint": "^9.0.0",
|