@aotearoan/neon 28.0.2 → 28.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/dist/components/navigation/link/NeonLink.cjs.js +1 -1
- package/dist/components/navigation/link/NeonLink.cjs.js.map +1 -1
- package/dist/components/navigation/link/NeonLink.es.js +20 -20
- package/dist/components/navigation/link/NeonLink.es.js.map +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.cjs.js +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.cjs.js.map +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.es.js +19 -15
- package/dist/components/navigation/tree-menu/NeonTreeMenu.es.js.map +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.vue.cjs.js +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.vue.cjs.js.map +1 -1
- package/dist/components/navigation/tree-menu/NeonTreeMenu.vue.es.js +44 -39
- package/dist/components/navigation/tree-menu/NeonTreeMenu.vue.es.js.map +1 -1
- package/dist/src/components/feedback/alert/NeonAlert.d.ts +2 -2
- package/dist/src/components/feedback/alert/container/NeonAlertContainer.d.ts +2 -2
- package/dist/src/components/feedback/banner/NeonBanner.d.ts +4 -4
- package/dist/src/components/feedback/dialog/NeonDialog.d.ts +4 -4
- package/dist/src/components/feedback/note/NeonNote.d.ts +2 -2
- package/dist/src/components/layout/card-list/NeonCardList.d.ts +9 -15
- package/dist/src/components/layout/modal/NeonModal.d.ts +2 -2
- package/dist/src/components/layout/page/NeonPage.d.ts +6 -6
- package/dist/src/components/navigation/action-menu/NeonActionMenu.d.ts +2 -2
- package/dist/src/components/navigation/breadcrumbs/NeonBreadcrumbs.d.ts +2 -2
- package/dist/src/components/navigation/dropdown-menu/NeonDropdownMenu.d.ts +14 -14
- package/dist/src/components/navigation/link/NeonLink.d.ts +2 -2
- package/dist/src/components/navigation/menu/NeonMenu.d.ts +16 -16
- package/dist/src/components/navigation/mobile-menu/NeonMobileMenu.d.ts +16 -16
- package/dist/src/components/navigation/pagination/NeonPagination.d.ts +2 -2
- package/dist/src/components/navigation/tree-menu/NeonTreeMenu.d.ts +17 -2
- package/dist/src/components/presentation/badge/NeonBadge.d.ts +4 -8
- package/dist/src/components/presentation/dropdown/NeonDropdown.d.ts +4 -4
- package/dist/src/components/presentation/header/NeonHeader.d.ts +2 -2
- package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +4 -4
- package/dist/src/components/presentation/tabs/NeonTabs.d.ts +6 -6
- package/dist/src/components/user-input/button/NeonButton.d.ts +3 -5
- package/dist/src/components/user-input/date-picker/NeonDatePicker.d.ts +15 -9
- package/dist/src/components/user-input/file/NeonFile.d.ts +2 -2
- package/dist/src/components/user-input/filter-list/NeonFilterList.d.ts +2 -2
- package/dist/src/components/user-input/number/NeonNumber.d.ts +2 -2
- package/dist/src/components/user-input/search/NeonSearch.d.ts +30 -12
- package/dist/src/components/user-input/select/NeonSelect.d.ts +48 -24
- package/dist/src/model/navigation/tree-menu/NeonTreeMenuItemModel.d.ts +2 -0
- package/package.json +1 -1
- package/src/sass/components/_tree-menu.scss +39 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("vue"),k=require("../../../model/common/accessibility/NeonOutlineStyle.cjs.js"),p=require("../../presentation/icon/NeonIcon.vue.cjs.js"),r=require("vue-router"),S=e.defineComponent({name:"NeonLink",components:{NeonIcon:p},props:{href:{type:String,default:null},noStyle:{type:Boolean,default:!1},outlineStyle:{type:String,default:k.NeonOutlineStyle.None},externalIndicator:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:s,expose:a}){const u=e.ref(null),f=e.useAttrs(),d=r.useRouter(),c=r.useRoute(),n=e.computed(()=>{var o;return((o=t.href)==null?void 0:o.indexOf("/"))===0?t.href:void 0}),l=e.computed(()=>n.value&&c.fullPath.indexOf(n.value)===0),h=e.computed(()=>l.value&&t.href===c.fullPath),m=e.computed(()=>{const{onClick:o,...v}=f;return v}),i=()=>{s("click")},y=async()=>{i(),n.value?await d.push(t.href):t.href&&window.location.replace(t.href)};return a({neonLink:u}),{neonLink:u,routerUrl:n,sanitizedAttributes:m,activeRoute:l,exactRoute:h,onClick:i,onSpace:y}}});module.exports=S;
|
|
2
2
|
//# sourceMappingURL=NeonLink.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonLink.cjs.js","sources":["../../../../src/components/navigation/link/NeonLink.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonOutlineStyle } from '@/model/common/accessibility/NeonOutlineStyle';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { useRoute, useRouter } from 'vue-router';\n\n/**\n * An HTML anchor component which handles VueRouter links (internal), href links (external) and clickable links (no href).\n */\nexport default defineComponent({\n name: 'NeonLink',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The href of the link, this can be an internal (relative or absolute) or an external link.\n */\n href: { type: String, default: null },\n /**\n * set to true if you would like a completely unstyled link. This is useful for creating a complex component which may use NeonLink.\n */\n noStyle: { type: Boolean, default: false },\n /**\n * Style of the outline to use when the link has focus, use this in combination with the <em>no-style</em> flag to\n * style the outline of non-text links.\n */\n outlineStyle: { type: String as () => NeonOutlineStyle, default: NeonOutlineStyle.None },\n /**\n * Display an external link icon to the right of the link indicating clicking it will take the user to another site.\n */\n externalIndicator: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user triggers the link by clicking on it or hitting Enter or Space when the link has focus.\n * @type {void}\n */\n 'click',\n ],\n setup(props, { emit, expose }) {\n const neonLink = ref<HTMLAnchorElement | null>(null);\n const attrs = useAttrs();\n const router = useRouter();\n const route = useRoute();\n const routerUrl = computed(() => (props.href?.indexOf('/') === 0 ? props.href : undefined));\n\n const activeRoute = computed(() =>
|
|
1
|
+
{"version":3,"file":"NeonLink.cjs.js","sources":["../../../../src/components/navigation/link/NeonLink.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonOutlineStyle } from '@/model/common/accessibility/NeonOutlineStyle';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { useRoute, useRouter } from 'vue-router';\n\n/**\n * An HTML anchor component which handles VueRouter links (internal), href links (external) and clickable links (no href).\n */\nexport default defineComponent({\n name: 'NeonLink',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The href of the link, this can be an internal (relative or absolute) or an external link.\n */\n href: { type: String, default: null },\n /**\n * set to true if you would like a completely unstyled link. This is useful for creating a complex component which may use NeonLink.\n */\n noStyle: { type: Boolean, default: false },\n /**\n * Style of the outline to use when the link has focus, use this in combination with the <em>no-style</em> flag to\n * style the outline of non-text links.\n */\n outlineStyle: { type: String as () => NeonOutlineStyle, default: NeonOutlineStyle.None },\n /**\n * Display an external link icon to the right of the link indicating clicking it will take the user to another site.\n */\n externalIndicator: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user triggers the link by clicking on it or hitting Enter or Space when the link has focus.\n * @type {void}\n */\n 'click',\n ],\n setup(props, { emit, expose }) {\n const neonLink = ref<HTMLAnchorElement | null>(null);\n const attrs = useAttrs();\n const router = useRouter();\n const route = useRoute();\n const routerUrl = computed(() => (props.href?.indexOf('/') === 0 ? props.href : undefined));\n\n const activeRoute = computed(() => routerUrl.value && route.fullPath.indexOf(routerUrl.value) === 0);\n const exactRoute = computed(() => activeRoute.value && props.href === route.fullPath);\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const onClick = () => {\n emit('click');\n };\n\n const onSpace = async () => {\n onClick();\n\n if (routerUrl.value) {\n await router.push(props.href);\n } else if (props.href) {\n window.location.replace(props.href);\n }\n };\n\n expose({ neonLink });\n\n return {\n neonLink,\n routerUrl,\n sanitizedAttributes,\n activeRoute,\n exactRoute,\n onClick,\n onSpace,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonOutlineStyle","props","emit","expose","neonLink","ref","attrs","useAttrs","router","useRouter","route","useRoute","routerUrl","computed","_a","activeRoute","exactRoute","sanitizedAttributes","onClick","sanitized","onSpace"],"mappings":"8LAQAA,EAAeC,kBAAgB,CAC7B,KAAM,WACN,WAAY,CACV,SAAAC,CAAA,EAEF,MAAO,CAIL,KAAM,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI/B,QAAS,CAAE,KAAM,QAAS,QAAS,EAAA,EAKnC,aAAc,CAAE,KAAM,OAAkC,QAASC,EAAAA,iBAAiB,IAAA,EAIlF,kBAAmB,CAAE,KAAM,QAAS,QAAS,EAAA,CAAM,EAErD,MAAO,CAKL,OAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,EAAM,OAAAC,GAAU,CAC7B,MAAMC,EAAWC,EAAAA,IAA8B,IAAI,EAC7CC,EAAQC,EAAAA,SAAA,EACRC,EAASC,EAAAA,UAAA,EACTC,EAAQC,EAAAA,SAAA,EACRC,EAAYC,EAAAA,SAAS,IAAA,OAAO,QAAAC,EAAAb,EAAM,OAAN,YAAAa,EAAY,QAAQ,QAAS,EAAIb,EAAM,KAAO,OAAU,EAEpFc,EAAcF,EAAAA,SAAS,IAAMD,EAAU,OAASF,EAAM,SAAS,QAAQE,EAAU,KAAK,IAAM,CAAC,EAC7FI,EAAaH,EAAAA,SAAS,IAAME,EAAY,OAASd,EAAM,OAASS,EAAM,QAAQ,EAE9EO,EAAsBJ,EAAAA,SAAS,IAAM,CAEzC,KAAM,CAAE,QAAAK,EAAS,GAAGC,GAAcb,EAClC,OAAOa,CACT,CAAC,EAEKD,EAAU,IAAM,CACpBhB,EAAK,OAAO,CACd,EAEMkB,EAAU,SAAY,CAC1BF,EAAA,EAEIN,EAAU,MACZ,MAAMJ,EAAO,KAAKP,EAAM,IAAI,EACnBA,EAAM,MACf,OAAO,SAAS,QAAQA,EAAM,IAAI,CAEtC,EAEA,OAAAE,EAAO,CAAE,SAAAC,EAAU,EAEZ,CACL,SAAAA,EACA,UAAAQ,EACA,oBAAAK,EACA,YAAAF,EACA,WAAAC,EACA,QAAAE,EACA,QAAAE,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NeonOutlineStyle as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as y, ref as k, useAttrs as v, computed as n } from "vue";
|
|
2
|
+
import { NeonOutlineStyle as S } from "../../../model/common/accessibility/NeonOutlineStyle.es.js";
|
|
3
|
+
import x from "../../presentation/icon/NeonIcon.vue.es.js";
|
|
4
4
|
import { useRouter as C, useRoute as N } from "vue-router";
|
|
5
|
-
const z =
|
|
5
|
+
const z = y({
|
|
6
6
|
name: "NeonLink",
|
|
7
7
|
components: {
|
|
8
|
-
NeonIcon:
|
|
8
|
+
NeonIcon: x
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
/**
|
|
@@ -20,7 +20,7 @@ const z = k({
|
|
|
20
20
|
* Style of the outline to use when the link has focus, use this in combination with the <em>no-style</em> flag to
|
|
21
21
|
* style the outline of non-text links.
|
|
22
22
|
*/
|
|
23
|
-
outlineStyle: { type: String, default:
|
|
23
|
+
outlineStyle: { type: String, default: S.None },
|
|
24
24
|
/**
|
|
25
25
|
* Display an external link icon to the right of the link indicating clicking it will take the user to another site.
|
|
26
26
|
*/
|
|
@@ -33,25 +33,25 @@ const z = k({
|
|
|
33
33
|
*/
|
|
34
34
|
"click"
|
|
35
35
|
],
|
|
36
|
-
setup(e, { emit:
|
|
37
|
-
const
|
|
38
|
-
var
|
|
39
|
-
return ((
|
|
40
|
-
}), r =
|
|
41
|
-
const { onClick:
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
44
|
-
|
|
36
|
+
setup(e, { emit: u, expose: c }) {
|
|
37
|
+
const l = k(null), f = v(), s = C(), i = N(), t = n(() => {
|
|
38
|
+
var o;
|
|
39
|
+
return ((o = e.href) == null ? void 0 : o.indexOf("/")) === 0 ? e.href : void 0;
|
|
40
|
+
}), r = n(() => t.value && i.fullPath.indexOf(t.value) === 0), d = n(() => r.value && e.href === i.fullPath), m = n(() => {
|
|
41
|
+
const { onClick: o, ...p } = f;
|
|
42
|
+
return p;
|
|
43
|
+
}), a = () => {
|
|
44
|
+
u("click");
|
|
45
45
|
}, h = async () => {
|
|
46
|
-
|
|
46
|
+
a(), t.value ? await s.push(e.href) : e.href && window.location.replace(e.href);
|
|
47
47
|
};
|
|
48
|
-
return
|
|
49
|
-
neonLink:
|
|
50
|
-
routerUrl:
|
|
48
|
+
return c({ neonLink: l }), {
|
|
49
|
+
neonLink: l,
|
|
50
|
+
routerUrl: t,
|
|
51
51
|
sanitizedAttributes: m,
|
|
52
52
|
activeRoute: r,
|
|
53
53
|
exactRoute: d,
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: a,
|
|
55
55
|
onSpace: h
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonLink.es.js","sources":["../../../../src/components/navigation/link/NeonLink.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonOutlineStyle } from '@/model/common/accessibility/NeonOutlineStyle';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { useRoute, useRouter } from 'vue-router';\n\n/**\n * An HTML anchor component which handles VueRouter links (internal), href links (external) and clickable links (no href).\n */\nexport default defineComponent({\n name: 'NeonLink',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The href of the link, this can be an internal (relative or absolute) or an external link.\n */\n href: { type: String, default: null },\n /**\n * set to true if you would like a completely unstyled link. This is useful for creating a complex component which may use NeonLink.\n */\n noStyle: { type: Boolean, default: false },\n /**\n * Style of the outline to use when the link has focus, use this in combination with the <em>no-style</em> flag to\n * style the outline of non-text links.\n */\n outlineStyle: { type: String as () => NeonOutlineStyle, default: NeonOutlineStyle.None },\n /**\n * Display an external link icon to the right of the link indicating clicking it will take the user to another site.\n */\n externalIndicator: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user triggers the link by clicking on it or hitting Enter or Space when the link has focus.\n * @type {void}\n */\n 'click',\n ],\n setup(props, { emit, expose }) {\n const neonLink = ref<HTMLAnchorElement | null>(null);\n const attrs = useAttrs();\n const router = useRouter();\n const route = useRoute();\n const routerUrl = computed(() => (props.href?.indexOf('/') === 0 ? props.href : undefined));\n\n const activeRoute = computed(() =>
|
|
1
|
+
{"version":3,"file":"NeonLink.es.js","sources":["../../../../src/components/navigation/link/NeonLink.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonOutlineStyle } from '@/model/common/accessibility/NeonOutlineStyle';\nimport NeonIcon from '@/components/presentation/icon/NeonIcon.vue';\nimport { useRoute, useRouter } from 'vue-router';\n\n/**\n * An HTML anchor component which handles VueRouter links (internal), href links (external) and clickable links (no href).\n */\nexport default defineComponent({\n name: 'NeonLink',\n components: {\n NeonIcon,\n },\n props: {\n /**\n * The href of the link, this can be an internal (relative or absolute) or an external link.\n */\n href: { type: String, default: null },\n /**\n * set to true if you would like a completely unstyled link. This is useful for creating a complex component which may use NeonLink.\n */\n noStyle: { type: Boolean, default: false },\n /**\n * Style of the outline to use when the link has focus, use this in combination with the <em>no-style</em> flag to\n * style the outline of non-text links.\n */\n outlineStyle: { type: String as () => NeonOutlineStyle, default: NeonOutlineStyle.None },\n /**\n * Display an external link icon to the right of the link indicating clicking it will take the user to another site.\n */\n externalIndicator: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user triggers the link by clicking on it or hitting Enter or Space when the link has focus.\n * @type {void}\n */\n 'click',\n ],\n setup(props, { emit, expose }) {\n const neonLink = ref<HTMLAnchorElement | null>(null);\n const attrs = useAttrs();\n const router = useRouter();\n const route = useRoute();\n const routerUrl = computed(() => (props.href?.indexOf('/') === 0 ? props.href : undefined));\n\n const activeRoute = computed(() => routerUrl.value && route.fullPath.indexOf(routerUrl.value) === 0);\n const exactRoute = computed(() => activeRoute.value && props.href === route.fullPath);\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onClick, ...sanitized } = attrs;\n return sanitized;\n });\n\n const onClick = () => {\n emit('click');\n };\n\n const onSpace = async () => {\n onClick();\n\n if (routerUrl.value) {\n await router.push(props.href);\n } else if (props.href) {\n window.location.replace(props.href);\n }\n };\n\n expose({ neonLink });\n\n return {\n neonLink,\n routerUrl,\n sanitizedAttributes,\n activeRoute,\n exactRoute,\n onClick,\n onSpace,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonOutlineStyle","props","emit","expose","neonLink","ref","attrs","useAttrs","router","useRouter","route","useRoute","routerUrl","computed","_a","activeRoute","exactRoute","sanitizedAttributes","onClick","sanitized","onSpace"],"mappings":";;;;AAQA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAI/B,SAAS,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnC,cAAc,EAAE,MAAM,QAAkC,SAASC,EAAiB,KAAA;AAAA;AAAA;AAAA;AAAA,IAIlF,mBAAmB,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA,EAAM;AAAA,EAErD,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA,EAAA;AAAA,EAEF,MAAMC,GAAO,EAAE,MAAAC,GAAM,QAAAC,KAAU;AAC7B,UAAMC,IAAWC,EAA8B,IAAI,GAC7CC,IAAQC,EAAA,GACRC,IAASC,EAAA,GACTC,IAAQC,EAAA,GACRC,IAAYC,EAAS,MAAA;;AAAO,eAAAC,IAAAb,EAAM,SAAN,gBAAAa,EAAY,QAAQ,UAAS,IAAIb,EAAM,OAAO;AAAA,KAAU,GAEpFc,IAAcF,EAAS,MAAMD,EAAU,SAASF,EAAM,SAAS,QAAQE,EAAU,KAAK,MAAM,CAAC,GAC7FI,IAAaH,EAAS,MAAME,EAAY,SAASd,EAAM,SAASS,EAAM,QAAQ,GAE9EO,IAAsBJ,EAAS,MAAM;AAEzC,YAAM,EAAE,SAAAK,GAAS,GAAGC,MAAcb;AAClC,aAAOa;AAAA,IACT,CAAC,GAEKD,IAAU,MAAM;AACpB,MAAAhB,EAAK,OAAO;AAAA,IACd,GAEMkB,IAAU,YAAY;AAC1B,MAAAF,EAAA,GAEIN,EAAU,QACZ,MAAMJ,EAAO,KAAKP,EAAM,IAAI,IACnBA,EAAM,QACf,OAAO,SAAS,QAAQA,EAAM,IAAI;AAAA,IAEtC;AAEA,WAAAE,EAAO,EAAE,UAAAC,GAAU,GAEZ;AAAA,MACL,UAAAA;AAAA,MACA,WAAAQ;AAAA,MACA,qBAAAK;AAAA,MACA,aAAAF;AAAA,MACA,YAAAC;AAAA,MACA,SAAAE;AAAA,MACA,SAAAE;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const l=require("vue"),m=require("../../presentation/icon/NeonIcon.vue.cjs.js"),f=require("../link/NeonLink.vue.cjs.js"),x=require("vue-router"),k=require("../../../model/common/color/NeonFunctionalColor.cjs.js"),y=l.defineComponent({name:"NeonTreeMenu",components:{NeonIcon:m,NeonLink:f},props:{id:{type:String,required:!0},modelValue:{type:Array,required:!0},color:{type:String,default:k.NeonFunctionalColor.Brand},expandAll:{type:Boolean,default:!1},exactHighlighting:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(u,{emit:a}){const c=x.useRoute(),d=l.ref(null),p=n=>{const t=n.target;t.parentElement&&t.parentElement.click()},i=n=>{const t=u.modelValue.map(e=>{var o;return{...e,children:(o=e.children)==null?void 0:o.map(r=>({...r})),expanded:e.key===n?!e.expanded:e.expanded}});a("update:modelValue",t)},s=n=>{const t=u.modelValue.map(e=>{var o;return{...e,children:(o=e.children)==null?void 0:o.map(r=>({...r,expanded:r.key===n?!r.expanded:r.expanded}))}});a("update:modelValue",t)};return l.watch(()=>c.path,n=>d.value=n,{immediate:!0}),{url:d,emit:a,click:p,onSectionClick:i,onItemClick:s}}});module.exports=y;
|
|
2
2
|
//# sourceMappingURL=NeonTreeMenu.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonTreeMenu.cjs.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport type { NeonTreeMenuSectionModel } from '@/model/navigation/tree-menu/NeonTreeMenuSectionModel';\nimport NeonIcon from '../../presentation/icon/NeonIcon.vue';\nimport NeonLink from '../link/NeonLink.vue';\nimport { useRoute } from 'vue-router';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * Three level tree menu. This is useful for displaying a hierarchical navigation in NeonSideNav.The top level of the\n * menu is expandable on click but will not navigate to a page. The second level is links to pages and the third level\n * is the fragments on that page.\n */\nexport default defineComponent({\n name: 'NeonTreeMenu',\n components: {\n NeonIcon,\n NeonLink,\n },\n props: {\n /**\n * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A\n * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated\n * unless they're namespaced.\n */\n id: { type: String, required: true },\n /**\n * The tree model defining the menu.\n */\n modelValue: { type: Array as () => Array<NeonTreeMenuSectionModel>, required: true },\n /**\n * The menu highlight color (excludes low-contrast and neutral).\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Brand },\n /**\n * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu).\n */\n expandAll: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user toggles expansion of a section or item\n * @type {Array<NeonTreeMenuSectionModel>} the updated model with the section or item expanded/collapsed.\n */\n 'update:modelValue',\n /**\n * Emitted when the user clicks on a link to navigate to another page. This is useful to e.g. close a side-nav\n * drawer containing the menu when there is a navigation event.\n * @type {string} the link the user clicked on.\n */\n 'click',\n ],\n setup(props, { emit }) {\n const route = useRoute();\n const url = ref<string | null>(null);\n\n const click = ($event: KeyboardEvent) => {\n const target = $event.target as HTMLSpanElement;\n if (target.parentElement) {\n target.parentElement.click();\n }\n };\n\n const onSectionClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => ({ ...child })),\n expanded: section.key === key ? !section.expanded : section.expanded,\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n const onItemClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => {\n return {\n ...child,\n expanded: child.key === key ? !child.expanded : child.expanded,\n };\n }),\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n watch(\n () => route.path,\n (value) => (url.value = value),\n { immediate: true },\n );\n\n return {\n url,\n emit,\n click,\n onSectionClick,\n onItemClick,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonLink","NeonFunctionalColor","props","emit","route","useRoute","url","ref","click","$event","target","onSectionClick","key","newModel","section","_a","child","onItemClick","watch","value"],"mappings":"kOAYAA,EAAeC,kBAAgB,CAC7B,KAAM,eACN,WAAY,CACV,SAAAC,EACA,SAAAC,CAAA,EAEF,MAAO,CAML,GAAI,CAAE,KAAM,OAAQ,SAAU,EAAA,EAI9B,WAAY,CAAE,KAAM,MAAgD,SAAU,EAAA,EAI9E,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,KAAA,EAIjF,UAAW,CAAE,KAAM,QAAS,QAAS,EAAA,CAAM,
|
|
1
|
+
{"version":3,"file":"NeonTreeMenu.cjs.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport type { NeonTreeMenuSectionModel } from '@/model/navigation/tree-menu/NeonTreeMenuSectionModel';\nimport NeonIcon from '../../presentation/icon/NeonIcon.vue';\nimport NeonLink from '../link/NeonLink.vue';\nimport { useRoute } from 'vue-router';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * Three level tree menu. This is useful for displaying a hierarchical navigation in NeonSideNav.The top level of the\n * menu is expandable on click but will not navigate to a page. The second level is links to pages and the third level\n * is the fragments on that page.\n */\nexport default defineComponent({\n name: 'NeonTreeMenu',\n components: {\n NeonIcon,\n NeonLink,\n },\n props: {\n /**\n * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A\n * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated\n * unless they're namespaced.\n */\n id: { type: String, required: true },\n /**\n * The tree model defining the menu.\n */\n modelValue: { type: Array as () => Array<NeonTreeMenuSectionModel>, required: true },\n /**\n * The menu highlight color (excludes low-contrast and neutral).\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Brand },\n /**\n * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu).\n */\n expandAll: { type: Boolean, default: false },\n /**\n * Highlight menu items only if the route exactly matches a menu item. This is useful if every route is in the tree menu.\n */\n exactHighlighting: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user toggles expansion of a section or item\n * @type {Array<NeonTreeMenuSectionModel>} the updated model with the section or item expanded/collapsed.\n */\n 'update:modelValue',\n /**\n * Emitted when the user clicks on a link to navigate to another page. This is useful to e.g. close a side-nav\n * drawer containing the menu when there is a navigation event.\n * @type {string} the link the user clicked on.\n */\n 'click',\n ],\n setup(props, { emit }) {\n const route = useRoute();\n const url = ref<string | null>(null);\n\n const click = ($event: KeyboardEvent) => {\n const target = $event.target as HTMLSpanElement;\n if (target.parentElement) {\n target.parentElement.click();\n }\n };\n\n const onSectionClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => ({ ...child })),\n expanded: section.key === key ? !section.expanded : section.expanded,\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n const onItemClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => {\n return {\n ...child,\n expanded: child.key === key ? !child.expanded : child.expanded,\n };\n }),\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n watch(\n () => route.path,\n (value) => (url.value = value),\n { immediate: true },\n );\n\n return {\n url,\n emit,\n click,\n onSectionClick,\n onItemClick,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonLink","NeonFunctionalColor","props","emit","route","useRoute","url","ref","click","$event","target","onSectionClick","key","newModel","section","_a","child","onItemClick","watch","value"],"mappings":"kOAYAA,EAAeC,kBAAgB,CAC7B,KAAM,eACN,WAAY,CACV,SAAAC,EACA,SAAAC,CAAA,EAEF,MAAO,CAML,GAAI,CAAE,KAAM,OAAQ,SAAU,EAAA,EAI9B,WAAY,CAAE,KAAM,MAAgD,SAAU,EAAA,EAI9E,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,KAAA,EAIjF,UAAW,CAAE,KAAM,QAAS,QAAS,EAAA,EAIrC,kBAAmB,CAAE,KAAM,QAAS,QAAS,EAAA,CAAM,EAErD,MAAO,CAKL,oBAMA,OAAA,EAEF,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,SAAA,EACRC,EAAMC,EAAAA,IAAmB,IAAI,EAE7BC,EAASC,GAA0B,CACvC,MAAMC,EAASD,EAAO,OAClBC,EAAO,eACTA,EAAO,cAAc,MAAA,CAEzB,EAEMC,EAAkBC,GAAgB,CACtC,MAAMC,EAAWX,EAAM,WAAW,IAAKY,GAAY,OACjD,MAAO,CACL,GAAGA,EACH,UAAUC,EAAAD,EAAQ,WAAR,YAAAC,EAAkB,IAAKC,IAAW,CAAE,GAAGA,CAAA,IACjD,SAAUF,EAAQ,MAAQF,EAAM,CAACE,EAAQ,SAAWA,EAAQ,QAAA,CAEhE,CAAC,EAEDX,EAAK,oBAAqBU,CAAQ,CACpC,EAEMI,EAAeL,GAAgB,CACnC,MAAMC,EAAWX,EAAM,WAAW,IAAKY,GAAY,OACjD,MAAO,CACL,GAAGA,EACH,UAAUC,EAAAD,EAAQ,WAAR,YAAAC,EAAkB,IAAKC,IACxB,CACL,GAAGA,EACH,SAAUA,EAAM,MAAQJ,EAAM,CAACI,EAAM,SAAWA,EAAM,QAAA,GAEzD,CAEL,CAAC,EAEDb,EAAK,oBAAqBU,CAAQ,CACpC,EAEAK,OAAAA,EAAAA,MACE,IAAMd,EAAM,KACXe,GAAWb,EAAI,MAAQa,EACxB,CAAE,UAAW,EAAA,CAAK,EAGb,CACL,IAAAb,EACA,KAAAH,EACA,MAAAK,EACA,eAAAG,EACA,YAAAM,CAAA,CAEJ,CACF,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as i, ref as f, watch as s } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import x from "../../presentation/icon/NeonIcon.vue.es.js";
|
|
3
|
+
import k from "../link/NeonLink.vue.es.js";
|
|
4
4
|
import { useRoute as y } from "vue-router";
|
|
5
|
-
import { NeonFunctionalColor as
|
|
6
|
-
const
|
|
5
|
+
import { NeonFunctionalColor as g } from "../../../model/common/color/NeonFunctionalColor.es.js";
|
|
6
|
+
const B = i({
|
|
7
7
|
name: "NeonTreeMenu",
|
|
8
8
|
components: {
|
|
9
|
-
NeonIcon:
|
|
10
|
-
NeonLink:
|
|
9
|
+
NeonIcon: x,
|
|
10
|
+
NeonLink: k
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
13
|
/**
|
|
@@ -23,11 +23,15 @@ const M = i({
|
|
|
23
23
|
/**
|
|
24
24
|
* The menu highlight color (excludes low-contrast and neutral).
|
|
25
25
|
*/
|
|
26
|
-
color: { type: String, default:
|
|
26
|
+
color: { type: String, default: g.Brand },
|
|
27
27
|
/**
|
|
28
28
|
* Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu).
|
|
29
29
|
*/
|
|
30
|
-
expandAll: { type: Boolean, default: !1 }
|
|
30
|
+
expandAll: { type: Boolean, default: !1 },
|
|
31
|
+
/**
|
|
32
|
+
* Highlight menu items only if the route exactly matches a menu item. This is useful if every route is in the tree menu.
|
|
33
|
+
*/
|
|
34
|
+
exactHighlighting: { type: Boolean, default: !1 }
|
|
31
35
|
},
|
|
32
36
|
emits: [
|
|
33
37
|
/**
|
|
@@ -48,22 +52,22 @@ const M = i({
|
|
|
48
52
|
t.parentElement && t.parentElement.click();
|
|
49
53
|
}, m = (n) => {
|
|
50
54
|
const t = l.modelValue.map((e) => {
|
|
51
|
-
var
|
|
55
|
+
var r;
|
|
52
56
|
return {
|
|
53
57
|
...e,
|
|
54
|
-
children: (
|
|
58
|
+
children: (r = e.children) == null ? void 0 : r.map((o) => ({ ...o })),
|
|
55
59
|
expanded: e.key === n ? !e.expanded : e.expanded
|
|
56
60
|
};
|
|
57
61
|
});
|
|
58
62
|
a("update:modelValue", t);
|
|
59
63
|
}, c = (n) => {
|
|
60
64
|
const t = l.modelValue.map((e) => {
|
|
61
|
-
var
|
|
65
|
+
var r;
|
|
62
66
|
return {
|
|
63
67
|
...e,
|
|
64
|
-
children: (
|
|
65
|
-
...
|
|
66
|
-
expanded:
|
|
68
|
+
children: (r = e.children) == null ? void 0 : r.map((o) => ({
|
|
69
|
+
...o,
|
|
70
|
+
expanded: o.key === n ? !o.expanded : o.expanded
|
|
67
71
|
}))
|
|
68
72
|
};
|
|
69
73
|
});
|
|
@@ -83,6 +87,6 @@ const M = i({
|
|
|
83
87
|
}
|
|
84
88
|
});
|
|
85
89
|
export {
|
|
86
|
-
|
|
90
|
+
B as default
|
|
87
91
|
};
|
|
88
92
|
//# sourceMappingURL=NeonTreeMenu.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonTreeMenu.es.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport type { NeonTreeMenuSectionModel } from '@/model/navigation/tree-menu/NeonTreeMenuSectionModel';\nimport NeonIcon from '../../presentation/icon/NeonIcon.vue';\nimport NeonLink from '../link/NeonLink.vue';\nimport { useRoute } from 'vue-router';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * Three level tree menu. This is useful for displaying a hierarchical navigation in NeonSideNav.The top level of the\n * menu is expandable on click but will not navigate to a page. The second level is links to pages and the third level\n * is the fragments on that page.\n */\nexport default defineComponent({\n name: 'NeonTreeMenu',\n components: {\n NeonIcon,\n NeonLink,\n },\n props: {\n /**\n * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A\n * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated\n * unless they're namespaced.\n */\n id: { type: String, required: true },\n /**\n * The tree model defining the menu.\n */\n modelValue: { type: Array as () => Array<NeonTreeMenuSectionModel>, required: true },\n /**\n * The menu highlight color (excludes low-contrast and neutral).\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Brand },\n /**\n * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu).\n */\n expandAll: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user toggles expansion of a section or item\n * @type {Array<NeonTreeMenuSectionModel>} the updated model with the section or item expanded/collapsed.\n */\n 'update:modelValue',\n /**\n * Emitted when the user clicks on a link to navigate to another page. This is useful to e.g. close a side-nav\n * drawer containing the menu when there is a navigation event.\n * @type {string} the link the user clicked on.\n */\n 'click',\n ],\n setup(props, { emit }) {\n const route = useRoute();\n const url = ref<string | null>(null);\n\n const click = ($event: KeyboardEvent) => {\n const target = $event.target as HTMLSpanElement;\n if (target.parentElement) {\n target.parentElement.click();\n }\n };\n\n const onSectionClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => ({ ...child })),\n expanded: section.key === key ? !section.expanded : section.expanded,\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n const onItemClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => {\n return {\n ...child,\n expanded: child.key === key ? !child.expanded : child.expanded,\n };\n }),\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n watch(\n () => route.path,\n (value) => (url.value = value),\n { immediate: true },\n );\n\n return {\n url,\n emit,\n click,\n onSectionClick,\n onItemClick,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonLink","NeonFunctionalColor","props","emit","route","useRoute","url","ref","click","$event","target","onSectionClick","key","newModel","section","_a","child","onItemClick","watch","value"],"mappings":";;;;;AAYA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,UAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,IAAI,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAI9B,YAAY,EAAE,MAAM,OAAgD,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAI9E,OAAO,EAAE,MAAM,QAAqC,SAASC,EAAoB,MAAA;AAAA;AAAA;AAAA;AAAA,IAIjF,WAAW,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA,EAAM;AAAA,
|
|
1
|
+
{"version":3,"file":"NeonTreeMenu.es.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport type { NeonTreeMenuSectionModel } from '@/model/navigation/tree-menu/NeonTreeMenuSectionModel';\nimport NeonIcon from '../../presentation/icon/NeonIcon.vue';\nimport NeonLink from '../link/NeonLink.vue';\nimport { useRoute } from 'vue-router';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * Three level tree menu. This is useful for displaying a hierarchical navigation in NeonSideNav.The top level of the\n * menu is expandable on click but will not navigate to a page. The second level is links to pages and the third level\n * is the fragments on that page.\n */\nexport default defineComponent({\n name: 'NeonTreeMenu',\n components: {\n NeonIcon,\n NeonLink,\n },\n props: {\n /**\n * Id for the tree menu. This is used specifically to namespace the menu icons so that icon paths are unique. A\n * typical scenario is the tree menu is used in a side nav and also a drawer which means icon ids will be duplicated\n * unless they're namespaced.\n */\n id: { type: String, required: true },\n /**\n * The tree model defining the menu.\n */\n modelValue: { type: Array as () => Array<NeonTreeMenuSectionModel>, required: true },\n /**\n * The menu highlight color (excludes low-contrast and neutral).\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Brand },\n /**\n * Expand all nodes in the tree, this is useful for providing filtering (e.g. the Neon showcase side navigation menu).\n */\n expandAll: { type: Boolean, default: false },\n /**\n * Highlight menu items only if the route exactly matches a menu item. This is useful if every route is in the tree menu.\n */\n exactHighlighting: { type: Boolean, default: false },\n },\n emits: [\n /**\n * Emitted when the user toggles expansion of a section or item\n * @type {Array<NeonTreeMenuSectionModel>} the updated model with the section or item expanded/collapsed.\n */\n 'update:modelValue',\n /**\n * Emitted when the user clicks on a link to navigate to another page. This is useful to e.g. close a side-nav\n * drawer containing the menu when there is a navigation event.\n * @type {string} the link the user clicked on.\n */\n 'click',\n ],\n setup(props, { emit }) {\n const route = useRoute();\n const url = ref<string | null>(null);\n\n const click = ($event: KeyboardEvent) => {\n const target = $event.target as HTMLSpanElement;\n if (target.parentElement) {\n target.parentElement.click();\n }\n };\n\n const onSectionClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => ({ ...child })),\n expanded: section.key === key ? !section.expanded : section.expanded,\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n const onItemClick = (key: string) => {\n const newModel = props.modelValue.map((section) => {\n return {\n ...section,\n children: section.children?.map((child) => {\n return {\n ...child,\n expanded: child.key === key ? !child.expanded : child.expanded,\n };\n }),\n };\n });\n\n emit('update:modelValue', newModel);\n };\n\n watch(\n () => route.path,\n (value) => (url.value = value),\n { immediate: true },\n );\n\n return {\n url,\n emit,\n click,\n onSectionClick,\n onItemClick,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonIcon","NeonLink","NeonFunctionalColor","props","emit","route","useRoute","url","ref","click","$event","target","onSectionClick","key","newModel","section","_a","child","onItemClick","watch","value"],"mappings":";;;;;AAYA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,UAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,IAAI,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAI9B,YAAY,EAAE,MAAM,OAAgD,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAI9E,OAAO,EAAE,MAAM,QAAqC,SAASC,EAAoB,MAAA;AAAA;AAAA;AAAA;AAAA,IAIjF,WAAW,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIrC,mBAAmB,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA,EAAM;AAAA,EAErD,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EAAA;AAAA,EAEF,MAAMC,GAAO,EAAE,MAAAC,KAAQ;AAC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.js"),c=["id"],k={class:"no-style"},p=["tabindex","onKeydown"],
|
|
1
|
+
"use strict";const d=require("./NeonTreeMenu.cjs.js"),e=require("vue"),m=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),c=["id"],k={class:"no-style"},p=["tabindex","onKeydown"],h={class:"no-style neon-tree-menu__items"},_=["onKeydown"];function y(t,i,f,g,C,B){const s=e.resolveComponent("neon-icon"),a=e.resolveComponent("neon-link");return t.modelValue?(e.openBlock(),e.createElementBlock("nav",{key:0,id:t.id,class:e.normalizeClass([[`neon-tree-menu--${t.color}`,t.exactHighlighting?"neon-tree-menu--exact":"neon-tree-menu--active",{"neon-tree-menu--expand-all":t.expandAll}],"neon-tree-menu"])},[e.createElementVNode("ul",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,n=>{var u;return e.openBlock(),e.createElementBlock("li",{key:n.key,class:e.normalizeClass([{"neon-tree-menu__section--expanded":(n.expanded||t.expandAll)&&n.children&&((u=n.children)==null?void 0:u.length)!==0,"neon-tree-menu__section--disabled":n.disabled},"neon-tree-menu__section"])},[e.createVNode(a,{href:n.href,"no-style":!n.href,target:n.external?"_blank":void 0,class:"neon-tree-menu__section-link","outline-style":"none",tabindex:"-1",onClick:l=>{var o;return!n.disabled&&((((o=n.children)==null?void 0:o.length)||0)>0?t.onSectionClick(n.key):t.emit("click",n.href))}},{default:e.withCtx(()=>[n.icon?(e.openBlock(),e.createBlock(s,{key:0,id:t.id+"_"+n.key,name:n.icon,class:"neon-tree-menu__section-link-icon"},null,8,["id","name"])):e.createCommentVNode("",!0),e.createElementVNode("span",{tabindex:n.disabled?-1:0,class:"neon-tree-menu__section-link-label neon-tree-menu__section-link-label--outline-text",role:"link",onKeydown:[e.withKeys(e.withModifiers(l=>!n.disabled&&t.onSectionClick(n.key),["stop","prevent"]),["space"]),e.withKeys(l=>n.href&&t.click(l),["enter"]),e.withKeys(l=>n.href&&t.click(l),["space"])]},e.toDisplayString(n.label),41,p),n.children&&n.children.length!==0?(e.openBlock(),e.createBlock(s,{key:1,class:"neon-tree-menu__section-link-expansion-icon",name:"chevron-right"})):e.createCommentVNode("",!0)]),_:2},1032,["href","no-style","target","onClick"]),e.createElementVNode("ul",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.children,l=>(e.openBlock(),e.createElementBlock("li",{key:l.key,class:"neon-tree-menu__item"},[e.createVNode(a,{href:l.href,"no-style":!0,target:l.external?"_blank":void 0,class:"neon-tree-menu__item-link","outline-style":"none",tabindex:"-1",onClick:o=>{var r;return(((r=l.subMenu)==null?void 0:r.length)||0)>0?t.onItemClick(l.key):t.emit("click",l.href)}},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"neon-tree-menu__item-link-label neon-tree-menu__item-link-label--outline-text",role:"link",tabindex:"0",onKeydown:[i[0]||(i[0]=e.withKeys(o=>t.click(o),["enter"])),e.withKeys(e.withModifiers(o=>t.onItemClick(l.key),["prevent"]),["space"])]},e.toDisplayString(l.label),41,_)]),_:2},1032,["href","target","onClick"]),l.subMenu&&l.subMenu.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([{"neon-tree-menu__sub-menu--expanded":(t.expandAll||l.expanded)&&l.subMenu&&l.subMenu.length!==0},"no-style neon-tree-menu__sub-menu"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.subMenu,o=>(e.openBlock(),e.createElementBlock("li",{key:o.href,class:"neon-tree-menu__sub-menu-item"},[e.createVNode(a,{href:o.href,class:"neon-link--no-style neon-tree-menu__sub-menu-item-link","no-style":"","outline-style":"none",tabindex:"-1",onClick:r=>t.emit("click",o.href)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"neon-tree-menu__sub-menu-item-link-label neon-tree-menu__sub-menu-item-link-label--outline-text",role:"link",tabindex:"0",onKeydown:[i[1]||(i[1]=e.withKeys(e.withModifiers(r=>t.click(r),["prevent"]),["space"])),i[2]||(i[2]=e.withKeys(e.withModifiers(r=>t.click(r),["prevent"]),["enter"]))]},e.toDisplayString(o.label),33)]),_:2},1032,["href","onClick"])]))),128))],2)):e.createCommentVNode("",!0)]))),128))])],2)}),128))])],10,c)):e.createCommentVNode("",!0)}const b=m(d,[["render",y]]);module.exports=b;
|
|
2
2
|
//# sourceMappingURL=NeonTreeMenu.vue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonTreeMenu.vue.cjs.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.vue"],"sourcesContent":["<template>\n <nav\n v-if=\"modelValue\"\n :id=\"id\"\n :class=\"[`neon-tree-menu--${color}
|
|
1
|
+
{"version":3,"file":"NeonTreeMenu.vue.cjs.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.vue"],"sourcesContent":["<template>\n <nav\n v-if=\"modelValue\"\n :id=\"id\"\n :class=\"[\n `neon-tree-menu--${color}`,\n exactHighlighting ? 'neon-tree-menu--exact' : 'neon-tree-menu--active',\n { 'neon-tree-menu--expand-all': expandAll },\n ]\"\n class=\"neon-tree-menu\"\n >\n <ul class=\"no-style\">\n <li\n v-for=\"section in modelValue\"\n :key=\"section.key\"\n :class=\"{\n 'neon-tree-menu__section--expanded':\n (section.expanded || expandAll) && section.children && section.children?.length !== 0,\n 'neon-tree-menu__section--disabled': section.disabled,\n }\"\n class=\"neon-tree-menu__section\"\n >\n <neon-link\n :href=\"section.href\"\n :no-style=\"!section.href\"\n :target=\"section.external ? '_blank' : undefined\"\n class=\"neon-tree-menu__section-link\"\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"\n !section.disabled &&\n ((section.children?.length || 0) > 0 ? onSectionClick(section.key) : emit('click', section.href))\n \"\n >\n <neon-icon\n v-if=\"section.icon\"\n :id=\"id + '_' + section.key\"\n :name=\"section.icon\"\n class=\"neon-tree-menu__section-link-icon\"\n />\n <span\n :tabindex=\"section.disabled ? -1 : 0\"\n class=\"neon-tree-menu__section-link-label neon-tree-menu__section-link-label--outline-text\"\n role=\"link\"\n @keydown.space.stop.prevent=\"!section.disabled && onSectionClick(section.key)\"\n @keydown.enter=\"section.href && click($event)\"\n @keydown.space=\"section.href && click($event)\"\n >\n {{ section.label }}\n </span>\n <neon-icon\n v-if=\"section.children && section.children.length !== 0\"\n class=\"neon-tree-menu__section-link-expansion-icon\"\n name=\"chevron-right\"\n />\n </neon-link>\n <ul class=\"no-style neon-tree-menu__items\">\n <li v-for=\"link in section.children\" :key=\"link.key\" class=\"neon-tree-menu__item\">\n <neon-link\n :href=\"link.href\"\n :no-style=\"true\"\n :target=\"link.external ? '_blank' : undefined\"\n class=\"neon-tree-menu__item-link\"\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"(link.subMenu?.length || 0) > 0 ? onItemClick(link.key) : emit('click', link.href)\"\n >\n <span\n class=\"neon-tree-menu__item-link-label neon-tree-menu__item-link-label--outline-text\"\n role=\"link\"\n tabindex=\"0\"\n @keydown.enter=\"click($event)\"\n @keydown.space.prevent=\"onItemClick(link.key)\"\n >\n {{ link.label }}\n </span>\n </neon-link>\n <ul\n v-if=\"link.subMenu && link.subMenu.length > 0\"\n :class=\"{\n 'neon-tree-menu__sub-menu--expanded':\n (expandAll || link.expanded) && link.subMenu && link.subMenu.length !== 0,\n }\"\n class=\"no-style neon-tree-menu__sub-menu\"\n >\n <li v-for=\"subMenu in link.subMenu\" :key=\"subMenu.href\" class=\"neon-tree-menu__sub-menu-item\">\n <neon-link\n :href=\"subMenu.href\"\n class=\"neon-link--no-style neon-tree-menu__sub-menu-item-link\"\n no-style\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"emit('click', subMenu.href)\"\n >\n <span\n class=\"neon-tree-menu__sub-menu-item-link-label neon-tree-menu__sub-menu-item-link-label--outline-text\"\n role=\"link\"\n tabindex=\"0\"\n @keydown.space.prevent=\"click($event)\"\n @keydown.enter.prevent=\"click($event)\"\n >\n {{ subMenu.label }}\n </span>\n </neon-link>\n </li>\n </ul>\n </li>\n </ul>\n </li>\n </ul>\n </nav>\n</template>\n\n<script lang=\"ts\" src=\"./NeonTreeMenu.ts\"></script>\n"],"names":["_hoisted_2","_hoisted_4","_ctx","_createElementBlock","_normalizeClass","_createElementVNode","_Fragment","_renderList","section","_a","_createVNode","_component_neon_link","$event","_createBlock","_component_neon_icon","_withKeys","_withModifiers","_toDisplayString","_hoisted_3","_openBlock","link","_cache","_hoisted_5","subMenu"],"mappings":"gJAWQA,EAAA,CAAA,MAAM,UAAU,6BA6CZC,EAAA,CAAA,MAAM,gCAAgC,2HAtDxCC,EAAA,0BADRC,EAAAA,mBA6GM,MAAA,OA3GH,GAAID,EAAA,GACJ,MAAKE,EAAAA,eAAA,CAAA,oBAA6BF,EAAA,KAAK,GAAUA,EAAA,kBAAiB,wBAAA,uDAA6FA,EAAA,SAAS,GAKnK,gBAAgB,CAAA,IAEtBG,EAAAA,mBAkGK,KAlGLL,EAkGK,kBAjGHG,EAAAA,mBAgGKG,EAAAA,SAAA,KAAAC,EAAAA,WA/FeL,EAAA,WAAXM,GAAO,4BADhBL,EAAAA,mBAgGK,KAAA,CA9FF,IAAKK,EAAQ,IACb,MAAKJ,EAAAA,eAAA,CAAA,sCAAgEI,EAAQ,UAAYN,EAAA,YAAcM,EAAQ,YAAYC,EAAAD,EAAQ,WAAR,YAAAC,EAAkB,UAAM,EAAuD,oCAAAD,EAAQ,UAK7M,yBAAyB,CAAA,IAE/BE,EAAAA,YAiCYC,EAAA,CAhCT,KAAMH,EAAQ,KACd,WAAQ,CAAGA,EAAQ,KACnB,OAAQA,EAAQ,kBAAsB,OACvC,MAAM,+BACN,gBAAc,OACd,SAAS,KACR,QAAKI,GAAA,OAAgB,OAAAJ,EAAQ,cAA4BC,EAAAD,EAAQ,WAAR,YAAAC,EAAkB,cAAmBP,EAAA,eAAeM,EAAQ,GAAG,EAAIN,EAAA,KAAI,QAAUM,EAAQ,IAAI,wBAKvJ,IAKE,CAJMA,EAAQ,oBADhBK,EAAAA,YAKEC,EAAA,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import { resolveComponent as
|
|
2
|
+
import { resolveComponent as C, openBlock as o, createElementBlock as r, normalizeClass as k, createElementVNode as s, Fragment as _, renderList as h, createVNode as p, withCtx as b, createBlock as v, createCommentVNode as d, withKeys as a, withModifiers as m, toDisplayString as y } from "vue";
|
|
3
3
|
import w from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
-
const
|
|
5
|
-
function A(n,
|
|
6
|
-
const f =
|
|
4
|
+
const x = ["id"], K = { class: "no-style" }, M = ["tabindex", "onKeydown"], V = { class: "no-style neon-tree-menu__items" }, N = ["onKeydown"];
|
|
5
|
+
function A(n, u, B, S, E, I) {
|
|
6
|
+
const f = C("neon-icon"), c = C("neon-link");
|
|
7
7
|
return n.modelValue ? (o(), r("nav", {
|
|
8
8
|
key: 0,
|
|
9
9
|
id: n.id,
|
|
10
|
-
class:
|
|
10
|
+
class: k([[
|
|
11
|
+
`neon-tree-menu--${n.color}`,
|
|
12
|
+
n.exactHighlighting ? "neon-tree-menu--exact" : "neon-tree-menu--active",
|
|
13
|
+
{ "neon-tree-menu--expand-all": n.expandAll }
|
|
14
|
+
], "neon-tree-menu"])
|
|
11
15
|
}, [
|
|
12
|
-
|
|
13
|
-
(o(!0), r(
|
|
14
|
-
var
|
|
16
|
+
s("ul", K, [
|
|
17
|
+
(o(!0), r(_, null, h(n.modelValue, (e) => {
|
|
18
|
+
var g;
|
|
15
19
|
return o(), r("li", {
|
|
16
20
|
key: e.key,
|
|
17
|
-
class:
|
|
18
|
-
"neon-tree-menu__section--expanded": (e.expanded || n.expandAll) && e.children && ((
|
|
21
|
+
class: k([{
|
|
22
|
+
"neon-tree-menu__section--expanded": (e.expanded || n.expandAll) && e.children && ((g = e.children) == null ? void 0 : g.length) !== 0,
|
|
19
23
|
"neon-tree-menu__section--disabled": e.disabled
|
|
20
24
|
}, "neon-tree-menu__section"])
|
|
21
25
|
}, [
|
|
22
|
-
|
|
26
|
+
p(c, {
|
|
23
27
|
href: e.href,
|
|
24
28
|
"no-style": !e.href,
|
|
25
29
|
target: e.external ? "_blank" : void 0,
|
|
@@ -31,24 +35,24 @@ function A(n, a, B, S, E, I) {
|
|
|
31
35
|
return !e.disabled && ((((t = e.children) == null ? void 0 : t.length) || 0) > 0 ? n.onSectionClick(e.key) : n.emit("click", e.href));
|
|
32
36
|
}
|
|
33
37
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
e.icon ? (o(),
|
|
38
|
+
default: b(() => [
|
|
39
|
+
e.icon ? (o(), v(f, {
|
|
36
40
|
key: 0,
|
|
37
41
|
id: n.id + "_" + e.key,
|
|
38
42
|
name: e.icon,
|
|
39
43
|
class: "neon-tree-menu__section-link-icon"
|
|
40
44
|
}, null, 8, ["id", "name"])) : d("", !0),
|
|
41
|
-
|
|
45
|
+
s("span", {
|
|
42
46
|
tabindex: e.disabled ? -1 : 0,
|
|
43
47
|
class: "neon-tree-menu__section-link-label neon-tree-menu__section-link-label--outline-text",
|
|
44
48
|
role: "link",
|
|
45
49
|
onKeydown: [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
a(m((l) => !e.disabled && n.onSectionClick(e.key), ["stop", "prevent"]), ["space"]),
|
|
51
|
+
a((l) => e.href && n.click(l), ["enter"]),
|
|
52
|
+
a((l) => e.href && n.click(l), ["space"])
|
|
49
53
|
]
|
|
50
|
-
},
|
|
51
|
-
e.children && e.children.length !== 0 ? (o(),
|
|
54
|
+
}, y(e.label), 41, M),
|
|
55
|
+
e.children && e.children.length !== 0 ? (o(), v(f, {
|
|
52
56
|
key: 1,
|
|
53
57
|
class: "neon-tree-menu__section-link-expansion-icon",
|
|
54
58
|
name: "chevron-right"
|
|
@@ -56,14 +60,15 @@ function A(n, a, B, S, E, I) {
|
|
|
56
60
|
]),
|
|
57
61
|
_: 2
|
|
58
62
|
}, 1032, ["href", "no-style", "target", "onClick"]),
|
|
59
|
-
|
|
60
|
-
(o(!0), r(
|
|
63
|
+
s("ul", V, [
|
|
64
|
+
(o(!0), r(_, null, h(e.children, (l) => (o(), r("li", {
|
|
61
65
|
key: l.key,
|
|
62
66
|
class: "neon-tree-menu__item"
|
|
63
67
|
}, [
|
|
64
|
-
|
|
68
|
+
p(c, {
|
|
65
69
|
href: l.href,
|
|
66
70
|
"no-style": !0,
|
|
71
|
+
target: l.external ? "_blank" : void 0,
|
|
67
72
|
class: "neon-tree-menu__item-link",
|
|
68
73
|
"outline-style": "none",
|
|
69
74
|
tabindex: "-1",
|
|
@@ -72,30 +77,30 @@ function A(n, a, B, S, E, I) {
|
|
|
72
77
|
return (((i = l.subMenu) == null ? void 0 : i.length) || 0) > 0 ? n.onItemClick(l.key) : n.emit("click", l.href);
|
|
73
78
|
}
|
|
74
79
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
80
|
+
default: b(() => [
|
|
81
|
+
s("span", {
|
|
77
82
|
class: "neon-tree-menu__item-link-label neon-tree-menu__item-link-label--outline-text",
|
|
78
83
|
role: "link",
|
|
79
84
|
tabindex: "0",
|
|
80
85
|
onKeydown: [
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
u[0] || (u[0] = a((t) => n.click(t), ["enter"])),
|
|
87
|
+
a(m((t) => n.onItemClick(l.key), ["prevent"]), ["space"])
|
|
83
88
|
]
|
|
84
|
-
},
|
|
89
|
+
}, y(l.label), 41, N)
|
|
85
90
|
]),
|
|
86
91
|
_: 2
|
|
87
|
-
}, 1032, ["href", "onClick"]),
|
|
92
|
+
}, 1032, ["href", "target", "onClick"]),
|
|
88
93
|
l.subMenu && l.subMenu.length > 0 ? (o(), r("ul", {
|
|
89
94
|
key: 0,
|
|
90
|
-
class:
|
|
95
|
+
class: k([{
|
|
91
96
|
"neon-tree-menu__sub-menu--expanded": (n.expandAll || l.expanded) && l.subMenu && l.subMenu.length !== 0
|
|
92
97
|
}, "no-style neon-tree-menu__sub-menu"])
|
|
93
98
|
}, [
|
|
94
|
-
(o(!0), r(
|
|
99
|
+
(o(!0), r(_, null, h(l.subMenu, (t) => (o(), r("li", {
|
|
95
100
|
key: t.href,
|
|
96
101
|
class: "neon-tree-menu__sub-menu-item"
|
|
97
102
|
}, [
|
|
98
|
-
|
|
103
|
+
p(c, {
|
|
99
104
|
href: t.href,
|
|
100
105
|
class: "neon-link--no-style neon-tree-menu__sub-menu-item-link",
|
|
101
106
|
"no-style": "",
|
|
@@ -103,16 +108,16 @@ function A(n, a, B, S, E, I) {
|
|
|
103
108
|
tabindex: "-1",
|
|
104
109
|
onClick: (i) => n.emit("click", t.href)
|
|
105
110
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
|
|
111
|
+
default: b(() => [
|
|
112
|
+
s("span", {
|
|
108
113
|
class: "neon-tree-menu__sub-menu-item-link-label neon-tree-menu__sub-menu-item-link-label--outline-text",
|
|
109
114
|
role: "link",
|
|
110
115
|
tabindex: "0",
|
|
111
116
|
onKeydown: [
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
u[1] || (u[1] = a(m((i) => n.click(i), ["prevent"]), ["space"])),
|
|
118
|
+
u[2] || (u[2] = a(m((i) => n.click(i), ["prevent"]), ["enter"]))
|
|
114
119
|
]
|
|
115
|
-
},
|
|
120
|
+
}, y(t.label), 33)
|
|
116
121
|
]),
|
|
117
122
|
_: 2
|
|
118
123
|
}, 1032, ["href", "onClick"])
|
|
@@ -123,10 +128,10 @@ function A(n, a, B, S, E, I) {
|
|
|
123
128
|
], 2);
|
|
124
129
|
}), 128))
|
|
125
130
|
])
|
|
126
|
-
], 10,
|
|
131
|
+
], 10, x)) : d("", !0);
|
|
127
132
|
}
|
|
128
|
-
const
|
|
133
|
+
const H = /* @__PURE__ */ w($, [["render", A]]);
|
|
129
134
|
export {
|
|
130
|
-
|
|
135
|
+
H as default
|
|
131
136
|
};
|
|
132
137
|
//# sourceMappingURL=NeonTreeMenu.vue.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonTreeMenu.vue.es.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.vue"],"sourcesContent":["<template>\n <nav\n v-if=\"modelValue\"\n :id=\"id\"\n :class=\"[`neon-tree-menu--${color}
|
|
1
|
+
{"version":3,"file":"NeonTreeMenu.vue.es.js","sources":["../../../../src/components/navigation/tree-menu/NeonTreeMenu.vue"],"sourcesContent":["<template>\n <nav\n v-if=\"modelValue\"\n :id=\"id\"\n :class=\"[\n `neon-tree-menu--${color}`,\n exactHighlighting ? 'neon-tree-menu--exact' : 'neon-tree-menu--active',\n { 'neon-tree-menu--expand-all': expandAll },\n ]\"\n class=\"neon-tree-menu\"\n >\n <ul class=\"no-style\">\n <li\n v-for=\"section in modelValue\"\n :key=\"section.key\"\n :class=\"{\n 'neon-tree-menu__section--expanded':\n (section.expanded || expandAll) && section.children && section.children?.length !== 0,\n 'neon-tree-menu__section--disabled': section.disabled,\n }\"\n class=\"neon-tree-menu__section\"\n >\n <neon-link\n :href=\"section.href\"\n :no-style=\"!section.href\"\n :target=\"section.external ? '_blank' : undefined\"\n class=\"neon-tree-menu__section-link\"\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"\n !section.disabled &&\n ((section.children?.length || 0) > 0 ? onSectionClick(section.key) : emit('click', section.href))\n \"\n >\n <neon-icon\n v-if=\"section.icon\"\n :id=\"id + '_' + section.key\"\n :name=\"section.icon\"\n class=\"neon-tree-menu__section-link-icon\"\n />\n <span\n :tabindex=\"section.disabled ? -1 : 0\"\n class=\"neon-tree-menu__section-link-label neon-tree-menu__section-link-label--outline-text\"\n role=\"link\"\n @keydown.space.stop.prevent=\"!section.disabled && onSectionClick(section.key)\"\n @keydown.enter=\"section.href && click($event)\"\n @keydown.space=\"section.href && click($event)\"\n >\n {{ section.label }}\n </span>\n <neon-icon\n v-if=\"section.children && section.children.length !== 0\"\n class=\"neon-tree-menu__section-link-expansion-icon\"\n name=\"chevron-right\"\n />\n </neon-link>\n <ul class=\"no-style neon-tree-menu__items\">\n <li v-for=\"link in section.children\" :key=\"link.key\" class=\"neon-tree-menu__item\">\n <neon-link\n :href=\"link.href\"\n :no-style=\"true\"\n :target=\"link.external ? '_blank' : undefined\"\n class=\"neon-tree-menu__item-link\"\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"(link.subMenu?.length || 0) > 0 ? onItemClick(link.key) : emit('click', link.href)\"\n >\n <span\n class=\"neon-tree-menu__item-link-label neon-tree-menu__item-link-label--outline-text\"\n role=\"link\"\n tabindex=\"0\"\n @keydown.enter=\"click($event)\"\n @keydown.space.prevent=\"onItemClick(link.key)\"\n >\n {{ link.label }}\n </span>\n </neon-link>\n <ul\n v-if=\"link.subMenu && link.subMenu.length > 0\"\n :class=\"{\n 'neon-tree-menu__sub-menu--expanded':\n (expandAll || link.expanded) && link.subMenu && link.subMenu.length !== 0,\n }\"\n class=\"no-style neon-tree-menu__sub-menu\"\n >\n <li v-for=\"subMenu in link.subMenu\" :key=\"subMenu.href\" class=\"neon-tree-menu__sub-menu-item\">\n <neon-link\n :href=\"subMenu.href\"\n class=\"neon-link--no-style neon-tree-menu__sub-menu-item-link\"\n no-style\n outline-style=\"none\"\n tabindex=\"-1\"\n @click=\"emit('click', subMenu.href)\"\n >\n <span\n class=\"neon-tree-menu__sub-menu-item-link-label neon-tree-menu__sub-menu-item-link-label--outline-text\"\n role=\"link\"\n tabindex=\"0\"\n @keydown.space.prevent=\"click($event)\"\n @keydown.enter.prevent=\"click($event)\"\n >\n {{ subMenu.label }}\n </span>\n </neon-link>\n </li>\n </ul>\n </li>\n </ul>\n </li>\n </ul>\n </nav>\n</template>\n\n<script lang=\"ts\" src=\"./NeonTreeMenu.ts\"></script>\n"],"names":["_hoisted_2","_hoisted_4","_ctx","_createElementBlock","_normalizeClass","_createElementVNode","_Fragment","_renderList","section","_a","_createVNode","_component_neon_link","$event","_createBlock","_component_neon_icon","_withKeys","_withModifiers","_toDisplayString","_hoisted_3","_openBlock","link","_cache","_hoisted_5","subMenu"],"mappings":";;;kBAWQA,IAAA,EAAA,OAAM,WAAU,kCA6CZC,IAAA,EAAA,OAA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vue").ExtractPropT
|
|
|
324
324
|
sanitizedAttributes: import("vue").ComputedRef<{
|
|
325
325
|
[x: string]: unknown;
|
|
326
326
|
}>;
|
|
327
|
-
activeRoute: import("vue").ComputedRef<boolean | "">;
|
|
328
|
-
exactRoute: import("vue").ComputedRef<boolean | "">;
|
|
327
|
+
activeRoute: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
328
|
+
exactRoute: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
329
329
|
onClick: () => void;
|
|
330
330
|
onSpace: () => Promise<void>;
|
|
331
331
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -102,8 +102,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
102
102
|
sanitizedAttributes: import("vue").ComputedRef<{
|
|
103
103
|
[x: string]: unknown;
|
|
104
104
|
}>;
|
|
105
|
-
activeRoute: import("vue").ComputedRef<boolean | "">;
|
|
106
|
-
exactRoute: import("vue").ComputedRef<boolean | "">;
|
|
105
|
+
activeRoute: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
106
|
+
exactRoute: import("vue").ComputedRef<boolean | "" | undefined>;
|
|
107
107
|
onClick: () => void;
|
|
108
108
|
onSpace: () => Promise<void>;
|
|
109
109
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|