@makolabs/ripple 1.7.10 → 1.8.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.
Files changed (90) hide show
  1. package/dist/adapters/ai/OpenAIAdapter.d.ts +8 -1
  2. package/dist/adapters/ai/OpenAIAdapter.js +2 -2
  3. package/dist/adapters/storage/BaseAdapter.js +2 -2
  4. package/dist/adapters/storage/S3Adapter.js +1 -6
  5. package/dist/adapters/storage/types.d.ts +3 -3
  6. package/dist/ai/AIChatInterface.svelte +0 -1
  7. package/dist/ai/ai-chat-interface.d.ts +21 -22
  8. package/dist/ai/content-detector.js +0 -1
  9. package/dist/button/Button.svelte +9 -2
  10. package/dist/button/button.d.ts +39 -40
  11. package/dist/charts/Chart.svelte +4 -1
  12. package/dist/drawer/Drawer.svelte +57 -23
  13. package/dist/drawer/drawer.d.ts +18 -19
  14. package/dist/elements/accordion/Accordion.svelte +39 -18
  15. package/dist/elements/accordion/accordion.d.ts +21 -22
  16. package/dist/elements/alert/Alert.svelte +20 -8
  17. package/dist/elements/badge/Badge.svelte +5 -2
  18. package/dist/elements/badge/badge.d.ts +39 -40
  19. package/dist/elements/dropdown/Dropdown.svelte +18 -2
  20. package/dist/elements/dropdown/Select.svelte +17 -5
  21. package/dist/elements/dropdown/dropdown.d.ts +18 -19
  22. package/dist/elements/dropdown/select.d.ts +18 -19
  23. package/dist/elements/pagination/Pagination.svelte +15 -2
  24. package/dist/elements/pagination/Pagination.svelte.d.ts +1 -0
  25. package/dist/forms/Checkbox.svelte +16 -4
  26. package/dist/forms/Form.svelte +0 -2
  27. package/dist/forms/Input.svelte +16 -4
  28. package/dist/forms/NumberInput.svelte +8 -1
  29. package/dist/forms/RadioInputs.svelte +14 -5
  30. package/dist/forms/Slider.svelte +6 -4
  31. package/dist/forms/Toggle.svelte +67 -29
  32. package/dist/forms/slider.d.ts +72 -10
  33. package/dist/forms/slider.js +21 -0
  34. package/dist/header/Breadcrumbs.svelte +47 -24
  35. package/dist/header/PageHeader.svelte +12 -2
  36. package/dist/header/breadcrumbs.d.ts +47 -39
  37. package/dist/helper/deprecation.d.ts +14 -0
  38. package/dist/helper/deprecation.js +24 -0
  39. package/dist/helper/testid.d.ts +10 -0
  40. package/dist/helper/testid.js +17 -0
  41. package/dist/index.d.ts +147 -47
  42. package/dist/index.js +1 -0
  43. package/dist/layout/activity-list/activity-list.d.ts +21 -22
  44. package/dist/layout/card/Card.svelte +19 -5
  45. package/dist/layout/card/card.d.ts +21 -22
  46. package/dist/layout/card/ranked-card.d.ts +2 -1
  47. package/dist/layout/navbar/Navbar.svelte +14 -16
  48. package/dist/layout/navbar/navbar.d.ts +19 -19
  49. package/dist/layout/sidebar/Sidebar.svelte +6 -3
  50. package/dist/layout/table/Table.svelte +237 -303
  51. package/dist/layout/table/table.d.ts +24 -25
  52. package/dist/layout/tabs/Tab.svelte +3 -1
  53. package/dist/layout/tabs/TabGroup.svelte +7 -4
  54. package/dist/layout/tabs/tabs.d.ts +39 -40
  55. package/dist/modal/Modal.svelte +124 -21
  56. package/dist/modal/modal.d.ts +18 -19
  57. package/dist/modal/modal.js +2 -2
  58. package/dist/user-management/UserModal.svelte +1 -1
  59. package/dist/user-management/UserTable.svelte +3 -3
  60. package/dist/user-management/UserViewModal.svelte +2 -2
  61. package/dist/variants.d.ts +13 -13
  62. package/package.json +9 -15
  63. package/dist/ai/AIChatInterfaceTestWrapper.svelte +0 -26
  64. package/dist/ai/AIChatInterfaceTestWrapper.svelte.d.ts +0 -17
  65. package/dist/button/ButtonTestWrapper.svelte +0 -10
  66. package/dist/button/ButtonTestWrapper.svelte.d.ts +0 -7
  67. package/dist/drawer/DrawerTestWrapper.svelte +0 -19
  68. package/dist/drawer/DrawerTestWrapper.svelte.d.ts +0 -9
  69. package/dist/elements/accordion/AccordionTestWrapper.svelte +0 -21
  70. package/dist/elements/accordion/AccordionTestWrapper.svelte.d.ts +0 -10
  71. package/dist/elements/badge/BadgeTestWrapper.svelte +0 -14
  72. package/dist/elements/badge/BadgeTestWrapper.svelte.d.ts +0 -9
  73. package/dist/forms/CheckboxTestWrapper.svelte +0 -8
  74. package/dist/forms/CheckboxTestWrapper.svelte.d.ts +0 -4
  75. package/dist/forms/InputTestWrapper.svelte +0 -8
  76. package/dist/forms/InputTestWrapper.svelte.d.ts +0 -4
  77. package/dist/forms/ToggleTestWrapper.svelte +0 -8
  78. package/dist/forms/ToggleTestWrapper.svelte.d.ts +0 -7
  79. package/dist/layout/card/CardTestWrapper.svelte +0 -15
  80. package/dist/layout/card/CardTestWrapper.svelte.d.ts +0 -7
  81. package/dist/modal/ModalTestWrapper.svelte +0 -20
  82. package/dist/modal/ModalTestWrapper.svelte.d.ts +0 -8
  83. package/dist/user-management/UserManagementTestWrapper.svelte +0 -32
  84. package/dist/user-management/UserManagementTestWrapper.svelte.d.ts +0 -12
  85. package/dist/user-management/UserModalTestWrapper.svelte +0 -22
  86. package/dist/user-management/UserModalTestWrapper.svelte.d.ts +0 -7
  87. package/dist/user-management/UserTableTestWrapper.svelte +0 -41
  88. package/dist/user-management/UserTableTestWrapper.svelte.d.ts +0 -7
  89. package/dist/user-management/UserViewModalTestWrapper.svelte +0 -22
  90. package/dist/user-management/UserViewModalTestWrapper.svelte.d.ts +0 -7
@@ -1,37 +1,36 @@
1
- import { Color } from '../../variants.js';
2
1
  export declare const activityList: import("tailwind-variants").TVReturnType<{
3
2
  color: {
4
- [Color.DEFAULT]: {
3
+ default: {
5
4
  base: string;
6
5
  header: string;
7
6
  title: string;
8
7
  };
9
- [Color.PRIMARY]: {
8
+ primary: {
10
9
  base: string;
11
10
  header: string;
12
11
  title: string;
13
12
  };
14
- [Color.SECONDARY]: {
13
+ secondary: {
15
14
  base: string;
16
15
  header: string;
17
16
  title: string;
18
17
  };
19
- [Color.INFO]: {
18
+ info: {
20
19
  base: string;
21
20
  header: string;
22
21
  title: string;
23
22
  };
24
- [Color.SUCCESS]: {
23
+ success: {
25
24
  base: string;
26
25
  header: string;
27
26
  title: string;
28
27
  };
29
- [Color.WARNING]: {
28
+ warning: {
30
29
  base: string;
31
30
  header: string;
32
31
  title: string;
33
32
  };
34
- [Color.DANGER]: {
33
+ danger: {
35
34
  base: string;
36
35
  header: string;
37
36
  title: string;
@@ -51,37 +50,37 @@ export declare const activityList: import("tailwind-variants").TVReturnType<{
51
50
  itemActions: string;
52
51
  }, undefined, {
53
52
  color: {
54
- [Color.DEFAULT]: {
53
+ default: {
55
54
  base: string;
56
55
  header: string;
57
56
  title: string;
58
57
  };
59
- [Color.PRIMARY]: {
58
+ primary: {
60
59
  base: string;
61
60
  header: string;
62
61
  title: string;
63
62
  };
64
- [Color.SECONDARY]: {
63
+ secondary: {
65
64
  base: string;
66
65
  header: string;
67
66
  title: string;
68
67
  };
69
- [Color.INFO]: {
68
+ info: {
70
69
  base: string;
71
70
  header: string;
72
71
  title: string;
73
72
  };
74
- [Color.SUCCESS]: {
73
+ success: {
75
74
  base: string;
76
75
  header: string;
77
76
  title: string;
78
77
  };
79
- [Color.WARNING]: {
78
+ warning: {
80
79
  base: string;
81
80
  header: string;
82
81
  title: string;
83
82
  };
84
- [Color.DANGER]: {
83
+ danger: {
85
84
  base: string;
86
85
  header: string;
87
86
  title: string;
@@ -101,37 +100,37 @@ export declare const activityList: import("tailwind-variants").TVReturnType<{
101
100
  itemActions: string;
102
101
  }, import("tailwind-variants").TVReturnType<{
103
102
  color: {
104
- [Color.DEFAULT]: {
103
+ default: {
105
104
  base: string;
106
105
  header: string;
107
106
  title: string;
108
107
  };
109
- [Color.PRIMARY]: {
108
+ primary: {
110
109
  base: string;
111
110
  header: string;
112
111
  title: string;
113
112
  };
114
- [Color.SECONDARY]: {
113
+ secondary: {
115
114
  base: string;
116
115
  header: string;
117
116
  title: string;
118
117
  };
119
- [Color.INFO]: {
118
+ info: {
120
119
  base: string;
121
120
  header: string;
122
121
  title: string;
123
122
  };
124
- [Color.SUCCESS]: {
123
+ success: {
125
124
  base: string;
126
125
  header: string;
127
126
  title: string;
128
127
  };
129
- [Color.WARNING]: {
128
+ warning: {
130
129
  base: string;
131
130
  header: string;
132
131
  title: string;
133
132
  };
134
- [Color.DANGER]: {
133
+ danger: {
135
134
  base: string;
136
135
  header: string;
137
136
  title: string;
@@ -1,5 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { cn } from '../../helper/cls.js';
3
+ import { buildTestId } from '../../helper/testid.js';
4
+ import { warnDeprecatedProps } from '../../helper/deprecation.js';
3
5
  import { card } from './card.js';
4
6
  import type { CardProps } from '../../index.js';
5
7
  import { Color } from '../../variants.js';
@@ -10,10 +12,22 @@
10
12
  title,
11
13
  color = Color.DEFAULT,
12
14
  class: className = '',
13
- titleclass: titleClass = '',
14
- bodyclass: bodyClass = ''
15
+ titleclass,
16
+ titleClass = titleclass ?? '',
17
+ bodyclass,
18
+ bodyClass = bodyclass ?? '',
19
+ testId
15
20
  }: CardProps = $props();
16
21
 
22
+ warnDeprecatedProps(
23
+ 'Card',
24
+ { titleclass, bodyclass },
25
+ {
26
+ titleclass: 'titleClass',
27
+ bodyclass: 'bodyClass'
28
+ }
29
+ );
30
+
17
31
  const { base, title: titleSlot, body: bodySlot } = $derived(card({ color }));
18
32
 
19
33
  const baseClass = $derived(cn(base(), className));
@@ -21,15 +35,15 @@
21
35
  const bodyClasses = $derived(cn(bodySlot(), bodyClass));
22
36
  </script>
23
37
 
24
- <div class={baseClass}>
38
+ <div class={baseClass} data-testid={buildTestId('card', undefined, testId)}>
25
39
  {#if custom}
26
40
  {@render custom()}
27
41
  {:else}
28
42
  {#if title}
29
- <h3 class={titleClasses}>{title}</h3>
43
+ <h3 class={titleClasses} data-testid={buildTestId('card', 'title', testId)}>{title}</h3>
30
44
  {/if}
31
45
  {#if children}
32
- <div class={bodyClasses}>
46
+ <div class={bodyClasses} data-testid={buildTestId('card', 'body', testId)}>
33
47
  {@render children()}
34
48
  </div>
35
49
  {/if}
@@ -1,37 +1,36 @@
1
- import { Color } from '../../variants.js';
2
1
  export declare const card: import("tailwind-variants").TVReturnType<{
3
2
  color: {
4
- [Color.DEFAULT]: {
3
+ default: {
5
4
  base: string;
6
5
  title: string;
7
6
  body: string;
8
7
  };
9
- [Color.PRIMARY]: {
8
+ primary: {
10
9
  base: string;
11
10
  title: string;
12
11
  body: string;
13
12
  };
14
- [Color.SECONDARY]: {
13
+ secondary: {
15
14
  base: string;
16
15
  title: string;
17
16
  body: string;
18
17
  };
19
- [Color.INFO]: {
18
+ info: {
20
19
  base: string;
21
20
  title: string;
22
21
  body: string;
23
22
  };
24
- [Color.SUCCESS]: {
23
+ success: {
25
24
  base: string;
26
25
  title: string;
27
26
  body: string;
28
27
  };
29
- [Color.WARNING]: {
28
+ warning: {
30
29
  base: string;
31
30
  title: string;
32
31
  body: string;
33
32
  };
34
- [Color.DANGER]: {
33
+ danger: {
35
34
  base: string;
36
35
  title: string;
37
36
  body: string;
@@ -43,37 +42,37 @@ export declare const card: import("tailwind-variants").TVReturnType<{
43
42
  body: string;
44
43
  }, undefined, {
45
44
  color: {
46
- [Color.DEFAULT]: {
45
+ default: {
47
46
  base: string;
48
47
  title: string;
49
48
  body: string;
50
49
  };
51
- [Color.PRIMARY]: {
50
+ primary: {
52
51
  base: string;
53
52
  title: string;
54
53
  body: string;
55
54
  };
56
- [Color.SECONDARY]: {
55
+ secondary: {
57
56
  base: string;
58
57
  title: string;
59
58
  body: string;
60
59
  };
61
- [Color.INFO]: {
60
+ info: {
62
61
  base: string;
63
62
  title: string;
64
63
  body: string;
65
64
  };
66
- [Color.SUCCESS]: {
65
+ success: {
67
66
  base: string;
68
67
  title: string;
69
68
  body: string;
70
69
  };
71
- [Color.WARNING]: {
70
+ warning: {
72
71
  base: string;
73
72
  title: string;
74
73
  body: string;
75
74
  };
76
- [Color.DANGER]: {
75
+ danger: {
77
76
  base: string;
78
77
  title: string;
79
78
  body: string;
@@ -85,37 +84,37 @@ export declare const card: import("tailwind-variants").TVReturnType<{
85
84
  body: string;
86
85
  }, import("tailwind-variants").TVReturnType<{
87
86
  color: {
88
- [Color.DEFAULT]: {
87
+ default: {
89
88
  base: string;
90
89
  title: string;
91
90
  body: string;
92
91
  };
93
- [Color.PRIMARY]: {
92
+ primary: {
94
93
  base: string;
95
94
  title: string;
96
95
  body: string;
97
96
  };
98
- [Color.SECONDARY]: {
97
+ secondary: {
99
98
  base: string;
100
99
  title: string;
101
100
  body: string;
102
101
  };
103
- [Color.INFO]: {
102
+ info: {
104
103
  base: string;
105
104
  title: string;
106
105
  body: string;
107
106
  };
108
- [Color.SUCCESS]: {
107
+ success: {
109
108
  base: string;
110
109
  title: string;
111
110
  body: string;
112
111
  };
113
- [Color.WARNING]: {
112
+ warning: {
114
113
  base: string;
115
114
  title: string;
116
115
  body: string;
117
116
  };
118
- [Color.DANGER]: {
117
+ danger: {
119
118
  base: string;
120
119
  title: string;
121
120
  body: string;
@@ -1,3 +1,4 @@
1
+ import type { ClassValue } from 'tailwind-variants';
1
2
  export declare const rankedCard: import("tailwind-variants").TVReturnType<{
2
3
  columns: {
3
4
  1: {
@@ -100,5 +101,5 @@ export type RankedCardItem = {
100
101
  export type RankedCardProps = {
101
102
  items: RankedCardItem[];
102
103
  columns?: 1 | 2 | 3 | 4;
103
- class?: string;
104
+ class?: ClassValue;
104
105
  };
@@ -5,12 +5,19 @@
5
5
  import { isRouteActive } from '../../helper/nav.svelte.js';
6
6
  import { slide } from 'svelte/transition';
7
7
  import { resolve } from '$app/paths';
8
+ import { buildTestId } from '../../helper/testid.js';
8
9
 
9
- let { logo, links = [], class: className = '', brand, children, actions }: NavbarProps = $props();
10
+ let {
11
+ logo,
12
+ links = [],
13
+ class: className = '',
14
+ brand,
15
+ children,
16
+ actions,
17
+ testId
18
+ }: NavbarProps = $props();
10
19
 
11
20
  let mobileMenuOpen = $state(false);
12
- let scrolled = $state(false);
13
- let isScrollingDown = $state(false);
14
21
 
15
22
  onNavigate(() => {
16
23
  mobileMenuOpen = false;
@@ -31,13 +38,7 @@
31
38
  actions: actionsSlot
32
39
  } = $derived(navbar());
33
40
 
34
- const baseClass = $derived(
35
- cn(base(), className, {
36
- 'shadow-md': scrolled,
37
- 'translate-y-0': !isScrollingDown || mobileMenuOpen,
38
- '-translate-y-full': isScrollingDown && !mobileMenuOpen && scrolled
39
- })
40
- );
41
+ const baseClass = $derived(cn(base(), className));
41
42
  const wrapperClasses = $derived(cn(wrapper()));
42
43
  const containerClasses = $derived(cn(container()));
43
44
  const brandClasses = $derived(cn(brandSlot()));
@@ -79,13 +80,9 @@
79
80
  </script>
80
81
 
81
82
  <nav
82
- class={baseClass}
83
+ class={cn(baseClass, 'z-10')}
83
84
  aria-label="Main navigation"
84
- class:sticky={scrolled}
85
- class:top-0={scrolled}
86
- class:z-10={true}
87
- class:transition-transform={true}
88
- class:duration-300={true}
85
+ data-testid={buildTestId('navbar', undefined, testId)}
89
86
  >
90
87
  <div class={wrapperClasses}>
91
88
  <div class={containerClasses}>
@@ -112,6 +109,7 @@
112
109
  aria-controls="mobile-menu"
113
110
  aria-expanded={mobileMenuOpen}
114
111
  onclick={toggleMobileMenu}
112
+ data-testid={buildTestId('navbar', 'toggle', testId)}
115
113
  >
116
114
  <span class="sr-only">Open main menu</span>
117
115
  {#if mobileMenuOpen}
@@ -1,7 +1,6 @@
1
1
  import type { ClassValue } from 'tailwind-variants';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { Component } from 'svelte';
4
- import { Size, Color } from '../../variants.js';
5
4
  export type NavbarLinkItem = {
6
5
  label: string;
7
6
  href: string;
@@ -11,21 +10,21 @@ export type NavbarLinkItem = {
11
10
  };
12
11
  export declare const navbar: import("tailwind-variants").TVReturnType<{
13
12
  color: {
14
- [Color.DEFAULT]: {
13
+ default: {
15
14
  base: string;
16
15
  mobileMenuButton: string;
17
16
  link: string;
18
17
  mobileLink: string;
19
18
  selectItem: string;
20
19
  };
21
- [Color.PRIMARY]: {
20
+ primary: {
22
21
  base: string;
23
22
  mobileMenuButton: string;
24
23
  link: string;
25
24
  mobileLink: string;
26
25
  selectItem: string;
27
26
  };
28
- [Color.SECONDARY]: {
27
+ secondary: {
29
28
  base: string;
30
29
  mobileMenuButton: string;
31
30
  link: string;
@@ -34,17 +33,17 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
34
33
  };
35
34
  };
36
35
  size: {
37
- [Size.SM]: {
36
+ sm: {
38
37
  container: string;
39
38
  link: string;
40
39
  mobileLink: string;
41
40
  };
42
- [Size.BASE]: {
41
+ base: {
43
42
  container: string;
44
43
  link: string;
45
44
  mobileLink: string;
46
45
  };
47
- [Size.LG]: {
46
+ lg: {
48
47
  container: string;
49
48
  link: string;
50
49
  mobileLink: string;
@@ -73,21 +72,21 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
73
72
  divider: string;
74
73
  }, undefined, {
75
74
  color: {
76
- [Color.DEFAULT]: {
75
+ default: {
77
76
  base: string;
78
77
  mobileMenuButton: string;
79
78
  link: string;
80
79
  mobileLink: string;
81
80
  selectItem: string;
82
81
  };
83
- [Color.PRIMARY]: {
82
+ primary: {
84
83
  base: string;
85
84
  mobileMenuButton: string;
86
85
  link: string;
87
86
  mobileLink: string;
88
87
  selectItem: string;
89
88
  };
90
- [Color.SECONDARY]: {
89
+ secondary: {
91
90
  base: string;
92
91
  mobileMenuButton: string;
93
92
  link: string;
@@ -96,17 +95,17 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
96
95
  };
97
96
  };
98
97
  size: {
99
- [Size.SM]: {
98
+ sm: {
100
99
  container: string;
101
100
  link: string;
102
101
  mobileLink: string;
103
102
  };
104
- [Size.BASE]: {
103
+ base: {
105
104
  container: string;
106
105
  link: string;
107
106
  mobileLink: string;
108
107
  };
109
- [Size.LG]: {
108
+ lg: {
110
109
  container: string;
111
110
  link: string;
112
111
  mobileLink: string;
@@ -135,21 +134,21 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
135
134
  divider: string;
136
135
  }, import("tailwind-variants").TVReturnType<{
137
136
  color: {
138
- [Color.DEFAULT]: {
137
+ default: {
139
138
  base: string;
140
139
  mobileMenuButton: string;
141
140
  link: string;
142
141
  mobileLink: string;
143
142
  selectItem: string;
144
143
  };
145
- [Color.PRIMARY]: {
144
+ primary: {
146
145
  base: string;
147
146
  mobileMenuButton: string;
148
147
  link: string;
149
148
  mobileLink: string;
150
149
  selectItem: string;
151
150
  };
152
- [Color.SECONDARY]: {
151
+ secondary: {
153
152
  base: string;
154
153
  mobileMenuButton: string;
155
154
  link: string;
@@ -158,17 +157,17 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
158
157
  };
159
158
  };
160
159
  size: {
161
- [Size.SM]: {
160
+ sm: {
162
161
  container: string;
163
162
  link: string;
164
163
  mobileLink: string;
165
164
  };
166
- [Size.BASE]: {
165
+ base: {
167
166
  container: string;
168
167
  link: string;
169
168
  mobileLink: string;
170
169
  };
171
- [Size.LG]: {
170
+ lg: {
172
171
  container: string;
173
172
  link: string;
174
173
  mobileLink: string;
@@ -203,4 +202,5 @@ export type NavbarProps = {
203
202
  brand?: Snippet;
204
203
  children?: Snippet;
205
204
  actions?: Snippet;
205
+ testId?: string;
206
206
  };
@@ -4,8 +4,9 @@
4
4
  import clsx from 'clsx';
5
5
  import { isRouteActive } from '../../helper/nav.svelte.js';
6
6
  import { resolve } from '$app/paths';
7
+ import { buildTestId } from '../../helper/testid.js';
7
8
 
8
- let { items = [], logo, footer }: SidebarProps = $props();
9
+ let { items = [], logo, footer, testId }: SidebarProps = $props();
9
10
  let menubar: MenuBar = $state({
10
11
  collapsed: false
11
12
  });
@@ -91,7 +92,7 @@
91
92
  );
92
93
  </script>
93
94
 
94
- <div class={sidebarClasses}>
95
+ <div class={sidebarClasses} data-testid={buildTestId('sidebar', undefined, testId)}>
95
96
  <div class={logoWrapperClasses}>
96
97
  <div class="flex items-center gap-x-1">
97
98
  {#if logo.src && !menubar.collapsed}
@@ -127,7 +128,7 @@
127
128
  </h3>
128
129
  {/if}
129
130
  <div class={menubar.collapsed ? '' : 'mt-2 space-y-1'}>
130
- {#each item.children as child (child.label)}
131
+ {#each item.children as child, childIndex (child.label)}
131
132
  <a
132
133
  href={resolve(child.href as `/`)}
133
134
  class="group hover:bg-default-500/10 flex w-full cursor-pointer items-center rounded-md px-3 py-2 text-sm font-medium transition-all duration-150 ease-in-out hover:text-white {child.active
@@ -136,6 +137,7 @@
136
137
  class:text-white={child.active}
137
138
  class:text-default-300={!child.active}
138
139
  title={menubar.collapsed ? child.label : ''}
140
+ data-testid={buildTestId('sidebar', 'item', testId, `${index}-${childIndex}`)}
139
141
  >
140
142
  {#if child.Icon}
141
143
  {@const Icon = child.Icon}
@@ -161,6 +163,7 @@
161
163
  class:text-white={item.active}
162
164
  class:text-default-300={!item.active}
163
165
  title={menubar.collapsed ? item.label : ''}
166
+ data-testid={buildTestId('sidebar', 'item', testId, index)}
164
167
  >
165
168
  {#if item.Icon}
166
169
  {@const Icon = item.Icon}