@cypress-design/vue-docmenu 0.2.2 → 0.3.0
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/_DocGroup.vue +1 -1
- package/_DocLink.vue +1 -1
- package/dist/DocMenu.vue.d.ts +19 -28
- package/dist/DocMenu.vue.d.ts.map +1 -1
- package/dist/_DocGroup.vue.d.ts +28 -31
- package/dist/_DocGroup.vue.d.ts.map +1 -1
- package/dist/_DocLink.vue.d.ts +27 -30
- package/dist/_DocLink.vue.d.ts.map +1 -1
- package/dist/index.es.mjs +93 -133
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,11 +3,11 @@ $ yarn vite build
|
|
|
3
3
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
|
|
4
4
|
[36mvite v4.3.9 [32mbuilding for production...[36m[39m
|
|
5
5
|
transforming...
|
|
6
|
-
[32m✓[39m
|
|
6
|
+
[32m✓[39m 8 modules transformed.
|
|
7
7
|
rendering chunks...
|
|
8
8
|
computing gzip size...
|
|
9
|
-
[2mdist/[22m[36mindex.es.mjs [39m[1m[
|
|
10
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[
|
|
11
|
-
[32m✓ built in 4.
|
|
9
|
+
[2mdist/[22m[36mindex.es.mjs [39m[1m[2m6.04 kB[22m[1m[22m[2m │ gzip: 2.03 kB[22m[2m │ map: 4.72 kB[22m
|
|
10
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m5.04 kB[22m[1m[22m[2m │ gzip: 1.78 kB[22m[2m │ map: 4.53 kB[22m
|
|
11
|
+
[32m✓ built in 4.51s[39m
|
|
12
12
|
$ yarn vue-tsc --project ./tsconfig.build.json
|
|
13
13
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vue-tsc --project ./tsconfig.build.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @cypress-design/vue-docmenu
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#272](https://github.com/cypress-io/cypress-design/pull/272) [`9a3e358`](https://github.com/cypress-io/cypress-design/commit/9a3e3582b8ca2dfdadd9198054042c9f0083be01) Thanks [@elevatebart](https://github.com/elevatebart)! - remove dark mode implementation to avoid wrong side effects
|
|
8
|
+
|
|
3
9
|
## 0.2.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/_DocGroup.vue
CHANGED
package/_DocLink.vue
CHANGED
|
@@ -23,7 +23,7 @@ withDefaults(
|
|
|
23
23
|
<a
|
|
24
24
|
class="group relative block w-full pl-[24px]"
|
|
25
25
|
:class="{
|
|
26
|
-
'text-indigo-500
|
|
26
|
+
'text-indigo-500': item.active,
|
|
27
27
|
'py-[8px] text-[16px] leading-[24px]': depth < 0,
|
|
28
28
|
'leading-[20px] text-[14px] py-[12px]': depth >= 0,
|
|
29
29
|
}"
|
package/dist/DocMenu.vue.d.ts
CHANGED
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
import { NavGroup, NavItemLink } from '@cypress-design/constants-docmenu';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
collapsible: {
|
|
4
|
+
type: import("vue").PropType<boolean>;
|
|
5
|
+
default: boolean;
|
|
6
|
+
};
|
|
7
|
+
items: {
|
|
8
|
+
type: import("vue").PropType<(NavItemLink | NavGroup)[]>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
collapsible: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
items: {
|
|
17
|
+
type: import("vue").PropType<(NavItemLink | NavGroup)[]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
}>>, {
|
|
13
21
|
collapsible: boolean;
|
|
14
22
|
}, {}>;
|
|
15
23
|
export default _default;
|
|
16
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
-
} : {
|
|
21
|
-
type: import('vue').PropType<T[K]>;
|
|
22
|
-
required: true;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
type __VLS_WithDefaults<P, D> = {
|
|
26
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
27
|
-
default: D[K];
|
|
28
|
-
}> : P[K];
|
|
29
|
-
};
|
|
30
|
-
type __VLS_Prettify<T> = {
|
|
31
|
-
[K in keyof T]: T[K];
|
|
32
|
-
} & {};
|
|
33
24
|
//# sourceMappingURL=DocMenu.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocMenu.vue.d.ts","sourceRoot":"","sources":["../DocMenu.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA
|
|
1
|
+
{"version":3,"file":"DocMenu.vue.d.ts","sourceRoot":"","sources":["../DocMenu.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;AAgHzE,wBAAkD"}
|
package/dist/_DocGroup.vue.d.ts
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import { NavGroup } from '@cypress-design/constants-docmenu';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
depth: {
|
|
4
|
+
type: import("vue").PropType<number>;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
collapsible: {
|
|
8
|
+
type: import("vue").PropType<boolean>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
group: {
|
|
12
|
+
type: import("vue").PropType<NavGroup>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
9
16
|
height: import("vue").ComputedRef<number>;
|
|
10
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
depth: {
|
|
19
|
+
type: import("vue").PropType<number>;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
collapsible: {
|
|
23
|
+
type: import("vue").PropType<boolean>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
group: {
|
|
27
|
+
type: import("vue").PropType<NavGroup>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}>>, {
|
|
17
31
|
depth: number;
|
|
18
32
|
}, {}>;
|
|
19
33
|
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
type __VLS_WithDefaults<P, D> = {
|
|
30
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
-
default: D[K];
|
|
32
|
-
}> : P[K];
|
|
33
|
-
};
|
|
34
|
-
type __VLS_Prettify<T> = {
|
|
35
|
-
[K in keyof T]: T[K];
|
|
36
|
-
} & {};
|
|
37
34
|
//# sourceMappingURL=_DocGroup.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_DocGroup.vue.d.ts","sourceRoot":"","sources":["../_DocGroup.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAW,MAAM,mCAAmC,CAAA
|
|
1
|
+
{"version":3,"file":"_DocGroup.vue.d.ts","sourceRoot":"","sources":["../_DocGroup.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAW,MAAM,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmPrE,wBAAkD"}
|
package/dist/_DocLink.vue.d.ts
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
import type { NavItemLink } from '@cypress-design/constants-docmenu';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
item:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
depth:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
collapsible:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
item: {
|
|
4
|
+
type: import("vue").PropType<NavItemLink>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
depth: {
|
|
8
|
+
type: import("vue").PropType<number>;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
collapsible: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
item: {
|
|
17
|
+
type: import("vue").PropType<NavItemLink>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
depth: {
|
|
21
|
+
type: import("vue").PropType<number>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
collapsible: {
|
|
25
|
+
type: import("vue").PropType<boolean>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>>, {
|
|
15
29
|
depth: number;
|
|
16
30
|
}, {}>;
|
|
17
31
|
export default _default;
|
|
18
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
type __VLS_WithDefaults<P, D> = {
|
|
28
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
-
default: D[K];
|
|
30
|
-
}> : P[K];
|
|
31
|
-
};
|
|
32
|
-
type __VLS_Prettify<T> = {
|
|
33
|
-
[K in keyof T]: T[K];
|
|
34
|
-
} & {};
|
|
35
32
|
//# sourceMappingURL=_DocLink.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_DocLink.vue.d.ts","sourceRoot":"","sources":["../_DocLink.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA
|
|
1
|
+
{"version":3,"file":"_DocLink.vue.d.ts","sourceRoot":"","sources":["../_DocLink.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GpE,wBAAkD"}
|
package/dist/index.es.mjs
CHANGED
|
@@ -1,209 +1,169 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const T = ({
|
|
5
|
-
body: p,
|
|
6
|
-
compiledClasses: e,
|
|
7
|
-
size: l,
|
|
8
|
-
...o
|
|
9
|
-
}) => {
|
|
10
|
-
const n = Object.keys(o).reduce(
|
|
11
|
-
(a, h) => (!H.includes(
|
|
12
|
-
h
|
|
13
|
-
) && h !== "name" && (a[h] = o[h]), a),
|
|
14
|
-
{}
|
|
15
|
-
), c = {
|
|
16
|
-
width: l,
|
|
17
|
-
height: l,
|
|
18
|
-
viewBox: `0 0 ${l} ${l}`,
|
|
19
|
-
fill: "none",
|
|
20
|
-
innerHTML: p,
|
|
21
|
-
class: void 0,
|
|
22
|
-
...n
|
|
23
|
-
// add all standard attributes back to the svg tag
|
|
24
|
-
};
|
|
25
|
-
return e.length && (c.class = e.join(" ")), c;
|
|
26
|
-
}, A = (p) => {
|
|
27
|
-
const { interactiveColorsOnGroup: e, name: l, ...o } = p, { sizeWithDefault: n, compiledClasses: c } = V.getComponentAttributes({
|
|
28
|
-
...o,
|
|
29
|
-
availableSizes: ["8", "16"],
|
|
30
|
-
interactiveColorsOnGroup: e
|
|
31
|
-
}), a = {
|
|
32
|
-
8: '<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 2.5 3 3 3-3" class="icon-dark"/>',
|
|
33
|
-
16: '<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 6 4 4 4-4" class="icon-dark"/>'
|
|
34
|
-
}[n];
|
|
35
|
-
if (!a)
|
|
36
|
-
throw Error(`Icon "chevron-down-small" is not available in size ${n}`);
|
|
37
|
-
return E("svg", T({
|
|
38
|
-
...o,
|
|
39
|
-
size: n,
|
|
40
|
-
body: a,
|
|
41
|
-
compiledClasses: c
|
|
42
|
-
}));
|
|
43
|
-
}, y = {
|
|
1
|
+
import { defineComponent as y, openBlock as t, createElementBlock as r, normalizeClass as i, createElementVNode as B, normalizeStyle as w, createCommentVNode as v, createTextVNode as $, toDisplayString as C, ref as x, computed as g, Fragment as u, createBlock as h, resolveDynamicComponent as E, unref as c, withCtx as G, withDirectives as H, renderList as D, createVNode as z, vShow as L } from "vue";
|
|
2
|
+
import { IconChevronDownSmall as M } from "@cypress-design/vue-icon";
|
|
3
|
+
const b = {
|
|
44
4
|
button: "flex leading-[24px] py-[10px] items-center relative w-full",
|
|
45
5
|
topButton: "leading-[24px] text-[16px] pl-[24px] font-medium",
|
|
46
6
|
leafButton: "leading-[20px] text-[14px] pl-[40px]"
|
|
47
|
-
},
|
|
7
|
+
}, T = ["href"], _ = /* @__PURE__ */ y({
|
|
48
8
|
__name: "_DocLink",
|
|
49
9
|
props: {
|
|
50
10
|
item: {},
|
|
51
11
|
depth: { default: -1 },
|
|
52
12
|
collapsible: { type: Boolean }
|
|
53
13
|
},
|
|
54
|
-
setup(
|
|
55
|
-
return (
|
|
56
|
-
class:
|
|
57
|
-
"pl-[16px]":
|
|
14
|
+
setup(f) {
|
|
15
|
+
return (l, o) => (t(), r("li", {
|
|
16
|
+
class: i(["list-none p-0", {
|
|
17
|
+
"pl-[16px]": l.depth >= 0
|
|
58
18
|
}])
|
|
59
19
|
}, [
|
|
60
|
-
|
|
61
|
-
class:
|
|
62
|
-
"text-indigo-500
|
|
63
|
-
"py-[8px] text-[16px] leading-[24px]":
|
|
64
|
-
"leading-[20px] text-[14px] py-[12px]":
|
|
20
|
+
B("a", {
|
|
21
|
+
class: i(["group relative block w-full pl-[24px]", {
|
|
22
|
+
"text-indigo-500": l.item.active,
|
|
23
|
+
"py-[8px] text-[16px] leading-[24px]": l.depth < 0,
|
|
24
|
+
"leading-[20px] text-[14px] py-[12px]": l.depth >= 0
|
|
65
25
|
}]),
|
|
66
|
-
href:
|
|
26
|
+
href: l.item.href
|
|
67
27
|
}, [
|
|
68
|
-
|
|
28
|
+
l.depth >= 0 ? (t(), r("div", {
|
|
69
29
|
key: 0,
|
|
70
|
-
class:
|
|
71
|
-
"group-hover:block bg-gray-300": !
|
|
30
|
+
class: i(["absolute h-[80%] top-[10%] w-[4px] z-10 rounded-full hidden", {
|
|
31
|
+
"group-hover:block bg-gray-300": !l.item.active && l.collapsible
|
|
72
32
|
}]),
|
|
73
|
-
style:
|
|
74
|
-
left: `-${18.5 +
|
|
33
|
+
style: w({
|
|
34
|
+
left: `-${18.5 + l.depth * 7.5}px`
|
|
75
35
|
})
|
|
76
|
-
}, null, 6)) :
|
|
77
|
-
|
|
78
|
-
], 10,
|
|
36
|
+
}, null, 6)) : v("", !0),
|
|
37
|
+
$(" " + C(l.item.text), 1)
|
|
38
|
+
], 10, T)
|
|
79
39
|
], 2));
|
|
80
40
|
}
|
|
81
|
-
}),
|
|
41
|
+
}), F = {
|
|
82
42
|
key: 0,
|
|
83
43
|
class: "relative list-none p-0"
|
|
84
|
-
},
|
|
44
|
+
}, N = /* @__PURE__ */ y({
|
|
85
45
|
__name: "_DocGroup",
|
|
86
46
|
props: {
|
|
87
47
|
group: {},
|
|
88
48
|
collapsible: { type: Boolean },
|
|
89
49
|
depth: { default: 0 }
|
|
90
50
|
},
|
|
91
|
-
setup(
|
|
92
|
-
const
|
|
93
|
-
(
|
|
94
|
-
|
|
51
|
+
setup(f, { expose: l }) {
|
|
52
|
+
const o = f, p = x(o.depth === 0), d = x([]), S = g(() => d.value && p.value ? d.value.reduce(
|
|
53
|
+
(e, { height: s }) => e + s,
|
|
54
|
+
o.group.items.length
|
|
95
55
|
) : 0);
|
|
96
|
-
|
|
97
|
-
height:
|
|
56
|
+
l({
|
|
57
|
+
height: S
|
|
98
58
|
});
|
|
99
|
-
const
|
|
100
|
-
var
|
|
101
|
-
const
|
|
102
|
-
(
|
|
59
|
+
const V = g(() => {
|
|
60
|
+
var k;
|
|
61
|
+
const e = o.group.items.findIndex(
|
|
62
|
+
(a) => "href" in a && a.active
|
|
103
63
|
);
|
|
104
|
-
let
|
|
105
|
-
(
|
|
64
|
+
let s = o.group.items.filter(
|
|
65
|
+
(a, m) => !("href" in a) && m < e
|
|
106
66
|
).length;
|
|
107
|
-
const
|
|
108
|
-
return (
|
|
109
|
-
}),
|
|
110
|
-
() =>
|
|
67
|
+
const n = (k = d.value) == null ? void 0 : k.reduce((a, m) => s < -1 ? a : (s--, a + m.height), 0);
|
|
68
|
+
return (e + n) * 44;
|
|
69
|
+
}), I = g(
|
|
70
|
+
() => o.collapsible ? "button" : o.group.href ? "a" : "div"
|
|
111
71
|
);
|
|
112
|
-
return (
|
|
113
|
-
(
|
|
114
|
-
class:
|
|
115
|
-
|
|
72
|
+
return (e, s) => (t(), r(u, null, [
|
|
73
|
+
(t(), h(E(I.value), {
|
|
74
|
+
class: i([
|
|
75
|
+
c(b).button,
|
|
116
76
|
{
|
|
117
|
-
[
|
|
118
|
-
[
|
|
119
|
-
"text-indigo-500
|
|
77
|
+
[c(b).topButton]: e.depth === 0,
|
|
78
|
+
[c(b).leafButton]: e.depth,
|
|
79
|
+
"text-indigo-500": o.group.active
|
|
120
80
|
}
|
|
121
81
|
]),
|
|
122
|
-
href:
|
|
123
|
-
onClick:
|
|
124
|
-
|
|
82
|
+
href: o.group.href,
|
|
83
|
+
onClick: s[0] || (s[0] = () => {
|
|
84
|
+
e.collapsible && (p.value = !p.value);
|
|
125
85
|
})
|
|
126
86
|
}, {
|
|
127
|
-
default:
|
|
128
|
-
|
|
87
|
+
default: G(() => [
|
|
88
|
+
o.collapsible ? (t(), h(c(M), {
|
|
129
89
|
key: 0,
|
|
130
90
|
"stroke-color": "gray-400",
|
|
131
|
-
size:
|
|
132
|
-
class:
|
|
133
|
-
"rotate-0":
|
|
134
|
-
"-rotate-90": !
|
|
135
|
-
"ml-[16px]":
|
|
91
|
+
size: e.depth ? "8" : "16",
|
|
92
|
+
class: i(["absolute left-0 transform transition-transform", {
|
|
93
|
+
"rotate-0": p.value,
|
|
94
|
+
"-rotate-90": !p.value,
|
|
95
|
+
"ml-[16px]": e.depth
|
|
136
96
|
}])
|
|
137
|
-
}, null, 8, ["size", "class"])) :
|
|
138
|
-
|
|
97
|
+
}, null, 8, ["size", "class"])) : v("", !0),
|
|
98
|
+
$(" " + C(e.group.text), 1)
|
|
139
99
|
]),
|
|
140
100
|
_: 1
|
|
141
101
|
}, 8, ["class", "href"])),
|
|
142
|
-
|
|
102
|
+
o.collapsible && e.depth >= 0 && p.value && e.group.items.some((n) => "href" in n && n.active) ? (t(), r("div", {
|
|
143
103
|
key: 0,
|
|
144
104
|
class: "absolute h-[36px] w-[4px] z-10 rounded-full bg-indigo-500 transition-all duration-300 ml-[6px] mt-[48px]",
|
|
145
|
-
style:
|
|
146
|
-
top: `${
|
|
147
|
-
left: `-${
|
|
105
|
+
style: w({
|
|
106
|
+
top: `${V.value}px`,
|
|
107
|
+
left: `-${e.depth === 0 ? 0 : e.depth * 7.5 + 1}px`
|
|
148
108
|
})
|
|
149
|
-
}, null, 4)) :
|
|
150
|
-
|
|
151
|
-
class:
|
|
152
|
-
"border-l border-gray-100":
|
|
109
|
+
}, null, 4)) : v("", !0),
|
|
110
|
+
H(B("ul", {
|
|
111
|
+
class: i(["list-none p-0 ml-[7.5px]", {
|
|
112
|
+
"border-l border-gray-100": e.depth === 0 && o.collapsible
|
|
153
113
|
}])
|
|
154
114
|
}, [
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
N
|
|
115
|
+
(t(!0), r(u, null, D(e.group.items, (n) => (t(), r(u, null, [
|
|
116
|
+
n && "items" in n ? (t(), r("li", F, [
|
|
117
|
+
z(N, {
|
|
158
118
|
ref_for: !0,
|
|
159
119
|
ref_key: "$groups",
|
|
160
|
-
ref:
|
|
161
|
-
group:
|
|
162
|
-
depth:
|
|
163
|
-
collapsible:
|
|
120
|
+
ref: d,
|
|
121
|
+
group: n,
|
|
122
|
+
depth: e.depth + 1,
|
|
123
|
+
collapsible: o.collapsible
|
|
164
124
|
}, null, 8, ["group", "depth", "collapsible"])
|
|
165
|
-
])) : (
|
|
125
|
+
])) : (t(), h(_, {
|
|
166
126
|
key: 1,
|
|
167
|
-
item:
|
|
168
|
-
depth:
|
|
169
|
-
collapsible:
|
|
127
|
+
item: n,
|
|
128
|
+
depth: e.depth,
|
|
129
|
+
collapsible: e.collapsible
|
|
170
130
|
}, null, 8, ["item", "depth", "collapsible"]))
|
|
171
131
|
], 64))), 256))
|
|
172
132
|
], 2), [
|
|
173
|
-
[
|
|
133
|
+
[L, p.value]
|
|
174
134
|
])
|
|
175
135
|
], 64));
|
|
176
136
|
}
|
|
177
|
-
}),
|
|
137
|
+
}), O = { class: "overflow-y-hidden list-none p-0" }, j = {
|
|
178
138
|
key: 0,
|
|
179
139
|
class: "relative list-none p-0"
|
|
180
|
-
},
|
|
140
|
+
}, J = /* @__PURE__ */ y({
|
|
181
141
|
__name: "DocMenu",
|
|
182
142
|
props: {
|
|
183
143
|
items: {},
|
|
184
144
|
collapsible: { type: Boolean, default: !0 }
|
|
185
145
|
},
|
|
186
|
-
setup(
|
|
187
|
-
return (
|
|
188
|
-
(
|
|
189
|
-
"items" in
|
|
190
|
-
N
|
|
191
|
-
group:
|
|
146
|
+
setup(f) {
|
|
147
|
+
return (l, o) => (t(), r("ul", O, [
|
|
148
|
+
(t(!0), r(u, null, D(l.items, (p) => (t(), r(u, null, [
|
|
149
|
+
"items" in p ? (t(), r("li", j, [
|
|
150
|
+
z(N, {
|
|
151
|
+
group: p,
|
|
192
152
|
depth: 0,
|
|
193
|
-
collapsible:
|
|
153
|
+
collapsible: l.collapsible
|
|
194
154
|
}, null, 8, ["group", "collapsible"])
|
|
195
|
-
])) : (
|
|
155
|
+
])) : (t(), h(_, {
|
|
196
156
|
key: 1,
|
|
197
|
-
item:
|
|
198
|
-
collapsible:
|
|
157
|
+
item: p,
|
|
158
|
+
collapsible: l.collapsible
|
|
199
159
|
}, null, 8, ["item", "collapsible"]))
|
|
200
160
|
], 64))), 256))
|
|
201
161
|
]));
|
|
202
162
|
}
|
|
203
163
|
});
|
|
204
164
|
export {
|
|
205
|
-
|
|
165
|
+
J as default
|
|
206
166
|
};
|
|
207
167
|
//# sourceMappingURL=index.es.mjs.map
|
|
208
168
|
|
|
209
|
-
/* <wind-keep class="overflow-y-hidden list-none p-0 relative filter text-indigo-500
|
|
169
|
+
/* <wind-keep class="overflow-y-hidden list-none p-0 relative filter text-indigo-500 absolute left-0 transform transition-transform rotate-0 -rotate-90 ml-[16px] h-[36px] w-[4px] z-10 rounded-full bg-indigo-500 transition-all duration-300 ml-[6px] mt-[48px] ml-[7.5px] border-l border-gray-100 icon-dark-gray-400 pl-[16px] block w-full pl-[24px] py-[8px] text-[16px] leading-[24px] leading-[20px] text-[14px] py-[12px] h-[80%] top-[10%] hidden group-hover:block bg-gray-300 flex py-[10px] items-center font-medium pl-[40px]"> */
|