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