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