@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.
@@ -3,11 +3,11 @@ $ yarn vite build
3
3
  $ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
4
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.29 kB │ gzip: 2.56 kB │ map: 292.59 kB
10
- dist/index.umd.js 6.25 kB │ gzip: 2.34 kB │ map: 292.23 kB
11
- ✓ built in 4.31s
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,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
@@ -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,33 +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
- }>>>, {
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;;;;;;;;;;;;;;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"}
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,37 +1,34 @@
1
1
  import { NavGroup } from '@cypress-design/constants-docmenu';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
- group: NavGroup;
4
- collapsible: boolean;
5
- depth?: number | undefined;
6
- }>, {
7
- depth: number;
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<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
- group: NavGroup;
12
- collapsible: boolean;
13
- depth?: number | undefined;
14
- }>, {
15
- depth: number;
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;;;;;;;;;;;;;;;;;;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"}
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,35 +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
- }>>>, {
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;;;;;;;;;;;;;;;;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"}
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 { 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
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
- }, P = ["href"], S = /* @__PURE__ */ C({
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(p) {
55
- return (e, l) => (r(), s("li", {
56
- class: m(["list-none p-0", {
57
- "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
58
18
  }])
59
19
  }, [
60
- z("a", {
61
- class: m(["group relative block w-full pl-[24px]", {
62
- "text-indigo-500 dark:text-indigo-200": e.item.active,
63
- "py-[8px] text-[16px] leading-[24px]": e.depth < 0,
64
- "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
65
25
  }]),
66
- href: e.item.href
26
+ href: l.item.href
67
27
  }, [
68
- e.depth >= 0 ? (r(), s("div", {
28
+ l.depth >= 0 ? (t(), r("div", {
69
29
  key: 0,
70
- class: m(["absolute h-[80%] top-[10%] w-[4px] z-10 rounded-full hidden", {
71
- "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
72
32
  }]),
73
- style: B({
74
- left: `-${18.5 + e.depth * 7.5}px`
33
+ style: w({
34
+ left: `-${18.5 + l.depth * 7.5}px`
75
35
  })
76
- }, null, 6)) : x("", !0),
77
- O(" " + _(e.item.text), 1)
78
- ], 10, P)
36
+ }, null, 6)) : v("", !0),
37
+ $(" " + C(l.item.text), 1)
38
+ ], 10, T)
79
39
  ], 2));
80
40
  }
81
- }), R = {
41
+ }), F = {
82
42
  key: 0,
83
43
  class: "relative list-none p-0"
84
- }, j = /* @__PURE__ */ C({
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(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
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
- e({
97
- height: c
56
+ l({
57
+ height: S
98
58
  });
99
- const a = k(() => {
100
- var w;
101
- const t = l.group.items.findIndex(
102
- (d) => "href" in d && d.active
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 u = l.group.items.filter(
105
- (d, v) => !("href" in d) && v < t
64
+ let s = o.group.items.filter(
65
+ (a, m) => !("href" in a) && m < e
106
66
  ).length;
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"
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 (t, u) => (r(), s(f, null, [
113
- (r(), b(G(h.value), {
114
- class: m([
115
- g(y).button,
72
+ return (e, s) => (t(), r(u, null, [
73
+ (t(), h(E(I.value), {
74
+ class: i([
75
+ c(b).button,
116
76
  {
117
- [g(y).topButton]: t.depth === 0,
118
- [g(y).leafButton]: t.depth,
119
- "text-indigo-500 dark:text-indigo-200": l.group.active
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: l.group.href,
123
- onClick: u[0] || (u[0] = () => {
124
- t.collapsible && (o.value = !o.value);
82
+ href: o.group.href,
83
+ onClick: s[0] || (s[0] = () => {
84
+ e.collapsible && (p.value = !p.value);
125
85
  })
126
86
  }, {
127
- default: I(() => [
128
- l.collapsible ? (r(), b(g(A), {
87
+ default: G(() => [
88
+ o.collapsible ? (t(), h(c(M), {
129
89
  key: 0,
130
90
  "stroke-color": "gray-400",
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
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"])) : x("", !0),
138
- O(" " + _(t.group.text), 1)
97
+ }, null, 8, ["size", "class"])) : v("", !0),
98
+ $(" " + C(e.group.text), 1)
139
99
  ]),
140
100
  _: 1
141
101
  }, 8, ["class", "href"])),
142
- l.collapsible && t.depth >= 0 && o.value && t.group.items.some((i) => "href" in i && i.active) ? (r(), s("div", {
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: B({
146
- top: `${a.value}px`,
147
- left: `-${t.depth === 0 ? 0 : t.depth * 7.5 + 1}px`
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)) : 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
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
- (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, {
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: n,
161
- group: i,
162
- depth: t.depth + 1,
163
- collapsible: l.collapsible
120
+ ref: d,
121
+ group: n,
122
+ depth: e.depth + 1,
123
+ collapsible: o.collapsible
164
124
  }, null, 8, ["group", "depth", "collapsible"])
165
- ])) : (r(), b(S, {
125
+ ])) : (t(), h(_, {
166
126
  key: 1,
167
- item: i,
168
- depth: t.depth,
169
- collapsible: t.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
- [M, o.value]
133
+ [L, p.value]
174
134
  ])
175
135
  ], 64));
176
136
  }
177
- }), F = { class: "overflow-y-hidden list-none p-0" }, W = {
137
+ }), O = { class: "overflow-y-hidden list-none p-0" }, j = {
178
138
  key: 0,
179
139
  class: "relative list-none p-0"
180
- }, K = /* @__PURE__ */ C({
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(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,
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: e.collapsible
153
+ collapsible: l.collapsible
194
154
  }, null, 8, ["group", "collapsible"])
195
- ])) : (r(), b(S, {
155
+ ])) : (t(), h(_, {
196
156
  key: 1,
197
- item: o,
198
- collapsible: e.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
- K as default
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 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]"> */
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]"> */