@makolabs/ripple 1.7.11 → 1.9.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/README.md +16 -0
- package/dist/adapters/ai/OpenAIAdapter.d.ts +8 -1
- package/dist/adapters/ai/OpenAIAdapter.js +2 -2
- package/dist/adapters/storage/BaseAdapter.js +2 -2
- package/dist/adapters/storage/S3Adapter.js +1 -6
- package/dist/adapters/storage/types.d.ts +3 -3
- package/dist/ai/AIChatInterface.svelte +0 -1
- package/dist/ai/ai-chat-interface.d.ts +21 -22
- package/dist/ai/ai-types.d.ts +44 -0
- package/dist/ai/ai-types.js +1 -0
- package/dist/ai/content-detector.js +0 -1
- package/dist/button/Button.svelte +9 -2
- package/dist/button/button-types.d.ts +25 -0
- package/dist/button/button-types.js +1 -0
- package/dist/button/button.d.ts +39 -40
- package/dist/charts/Chart.svelte +11 -23
- package/dist/charts/chart-types.d.ts +137 -0
- package/dist/charts/chart-types.js +1 -0
- package/dist/drawer/Drawer.svelte +57 -23
- package/dist/drawer/drawer-types.d.ts +33 -0
- package/dist/drawer/drawer-types.js +1 -0
- package/dist/drawer/drawer.d.ts +18 -19
- package/dist/elements/accordion/Accordion.svelte +39 -18
- package/dist/elements/accordion/accordion-types.d.ts +29 -0
- package/dist/elements/accordion/accordion-types.js +1 -0
- package/dist/elements/accordion/accordion.d.ts +21 -22
- package/dist/elements/alert/Alert.svelte +20 -8
- package/dist/elements/badge/Badge.svelte +5 -2
- package/dist/elements/badge/badge-types.d.ts +11 -0
- package/dist/elements/badge/badge-types.js +1 -0
- package/dist/elements/badge/badge.d.ts +39 -40
- package/dist/elements/dropdown/Dropdown.svelte +18 -2
- package/dist/elements/dropdown/Select.svelte +17 -5
- package/dist/elements/dropdown/dropdown-types.d.ts +68 -0
- package/dist/elements/dropdown/dropdown-types.js +1 -0
- package/dist/elements/dropdown/dropdown.d.ts +18 -19
- package/dist/elements/dropdown/select.d.ts +18 -19
- package/dist/elements/file-upload/file-upload-types.d.ts +68 -0
- package/dist/elements/file-upload/file-upload-types.js +1 -0
- package/dist/elements/pagination/Pagination.svelte +15 -2
- package/dist/elements/pagination/Pagination.svelte.d.ts +1 -0
- package/dist/elements/progress/progress-types.d.ts +22 -0
- package/dist/elements/progress/progress-types.js +1 -0
- package/dist/elements/timeline/timeline-types.d.ts +11 -0
- package/dist/elements/timeline/timeline-types.js +1 -0
- package/dist/filters/filter-types.d.ts +24 -0
- package/dist/filters/filter-types.js +1 -0
- package/dist/forms/Checkbox.svelte +16 -4
- package/dist/forms/Form.svelte +0 -2
- package/dist/forms/Input.svelte +19 -5
- package/dist/forms/NumberInput.svelte +8 -1
- package/dist/forms/RadioInputs.svelte +14 -5
- package/dist/forms/Slider.svelte +6 -4
- package/dist/forms/Toggle.svelte +67 -29
- package/dist/forms/form-types.d.ts +168 -0
- package/dist/forms/form-types.js +1 -0
- package/dist/forms/slider.d.ts +72 -10
- package/dist/forms/slider.js +21 -0
- package/dist/header/Breadcrumbs.svelte +47 -24
- package/dist/header/PageHeader.svelte +12 -2
- package/dist/header/breadcrumbs.d.ts +47 -39
- package/dist/header/header-types.d.ts +43 -0
- package/dist/header/header-types.js +1 -0
- package/dist/helper/deprecation.d.ts +14 -0
- package/dist/helper/deprecation.js +24 -0
- package/dist/helper/testid.d.ts +10 -0
- package/dist/helper/testid.js +17 -0
- package/dist/index.d.ts +37 -1007
- package/dist/index.js +38 -14
- package/dist/layout/activity-list/activity-list-types.d.ts +30 -0
- package/dist/layout/activity-list/activity-list-types.js +1 -0
- package/dist/layout/activity-list/activity-list.d.ts +21 -22
- package/dist/layout/card/Card.svelte +19 -5
- package/dist/layout/card/card-types.d.ts +43 -0
- package/dist/layout/card/card-types.js +1 -0
- package/dist/layout/card/card.d.ts +21 -22
- package/dist/layout/card/metric-card.d.ts +3 -3
- package/dist/layout/card/ranked-card.d.ts +2 -1
- package/dist/layout/navbar/Navbar.svelte +14 -16
- package/dist/layout/navbar/navbar-types.d.ts +19 -0
- package/dist/layout/navbar/navbar-types.js +1 -0
- package/dist/layout/navbar/navbar.d.ts +19 -19
- package/dist/layout/sidebar/Sidebar.svelte +6 -3
- package/dist/layout/sidebar/sidebar-types.d.ts +59 -0
- package/dist/layout/sidebar/sidebar-types.js +1 -0
- package/dist/layout/table/Table.svelte +237 -303
- package/dist/layout/table/table-types.d.ts +82 -0
- package/dist/layout/table/table-types.js +1 -0
- package/dist/layout/table/table.d.ts +24 -25
- package/dist/layout/tabs/Tab.svelte +3 -1
- package/dist/layout/tabs/TabGroup.svelte +7 -4
- package/dist/layout/tabs/tabs-types.d.ts +43 -0
- package/dist/layout/tabs/tabs-types.js +1 -0
- package/dist/layout/tabs/tabs.d.ts +39 -40
- package/dist/modal/Modal.svelte +124 -21
- package/dist/modal/modal-types.d.ts +34 -0
- package/dist/modal/modal-types.js +1 -0
- package/dist/modal/modal.d.ts +18 -19
- package/dist/modal/modal.js +2 -2
- package/dist/types/echarts.d.ts +27 -0
- package/dist/user-management/UserModal.svelte +1 -1
- package/dist/user-management/UserTable.svelte +3 -3
- package/dist/user-management/UserViewModal.svelte +2 -2
- package/dist/user-management/user-management-types.d.ts +156 -0
- package/dist/user-management/user-management-types.js +1 -0
- package/dist/variants.d.ts +13 -13
- package/package.json +9 -7
- package/dist/ai/AIChatInterfaceTestWrapper.svelte +0 -26
- package/dist/ai/AIChatInterfaceTestWrapper.svelte.d.ts +0 -17
- package/dist/button/ButtonTestWrapper.svelte +0 -10
- package/dist/button/ButtonTestWrapper.svelte.d.ts +0 -7
- package/dist/drawer/DrawerTestWrapper.svelte +0 -19
- package/dist/drawer/DrawerTestWrapper.svelte.d.ts +0 -9
- package/dist/elements/accordion/AccordionTestWrapper.svelte +0 -21
- package/dist/elements/accordion/AccordionTestWrapper.svelte.d.ts +0 -10
- package/dist/elements/badge/BadgeTestWrapper.svelte +0 -14
- package/dist/elements/badge/BadgeTestWrapper.svelte.d.ts +0 -9
- package/dist/forms/CheckboxTestWrapper.svelte +0 -8
- package/dist/forms/CheckboxTestWrapper.svelte.d.ts +0 -4
- package/dist/forms/InputTestWrapper.svelte +0 -8
- package/dist/forms/InputTestWrapper.svelte.d.ts +0 -4
- package/dist/forms/ToggleTestWrapper.svelte +0 -8
- package/dist/forms/ToggleTestWrapper.svelte.d.ts +0 -7
- package/dist/layout/card/CardTestWrapper.svelte +0 -15
- package/dist/layout/card/CardTestWrapper.svelte.d.ts +0 -7
- package/dist/modal/ModalTestWrapper.svelte +0 -20
- package/dist/modal/ModalTestWrapper.svelte.d.ts +0 -8
- package/dist/user-management/UserManagementTestWrapper.svelte +0 -32
- package/dist/user-management/UserManagementTestWrapper.svelte.d.ts +0 -12
- package/dist/user-management/UserModalTestWrapper.svelte +0 -22
- package/dist/user-management/UserModalTestWrapper.svelte.d.ts +0 -7
- package/dist/user-management/UserTableTestWrapper.svelte +0 -41
- package/dist/user-management/UserTableTestWrapper.svelte.d.ts +0 -7
- package/dist/user-management/UserViewModalTestWrapper.svelte +0 -22
- package/dist/user-management/UserViewModalTestWrapper.svelte.d.ts +0 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { cn } from '../helper/cls.js';
|
|
3
|
+
import { warnDeprecatedProps } from '../helper/deprecation.js';
|
|
3
4
|
import { breadcrumbs } from './breadcrumbs.js';
|
|
4
5
|
import type { BreadcrumbsProps } from '../index.js';
|
|
5
6
|
import { resolve } from '$app/paths';
|
|
@@ -9,15 +10,29 @@
|
|
|
9
10
|
size = 'sm',
|
|
10
11
|
color = 'default',
|
|
11
12
|
weight = 'medium',
|
|
12
|
-
icon:
|
|
13
|
+
icon: SeparatorIcon,
|
|
13
14
|
class: className = '',
|
|
14
|
-
listclass
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
listclass,
|
|
16
|
+
listClass = listclass ?? '',
|
|
17
|
+
itemclass,
|
|
18
|
+
itemClass = itemclass ?? '',
|
|
19
|
+
separatorclass,
|
|
20
|
+
separatorClass = separatorclass ?? '',
|
|
21
|
+
wrapperclass,
|
|
22
|
+
wrapperClass = wrapperclass ?? ''
|
|
18
23
|
}: BreadcrumbsProps = $props();
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
warnDeprecatedProps(
|
|
26
|
+
'Breadcrumbs',
|
|
27
|
+
{ listclass, itemclass, separatorclass, wrapperclass },
|
|
28
|
+
{
|
|
29
|
+
listclass: 'listClass',
|
|
30
|
+
itemclass: 'itemClass',
|
|
31
|
+
separatorclass: 'separatorClass',
|
|
32
|
+
wrapperclass: 'wrapperClass'
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
21
36
|
const { base, list, item, separator, wrapper } = $derived(
|
|
22
37
|
breadcrumbs({
|
|
23
38
|
size,
|
|
@@ -27,21 +42,22 @@
|
|
|
27
42
|
);
|
|
28
43
|
|
|
29
44
|
const baseClass = $derived(cn(base(), className));
|
|
30
|
-
const
|
|
31
|
-
const itemClasses = $derived(cn(item(),
|
|
32
|
-
const
|
|
33
|
-
const
|
|
45
|
+
const listClasses = $derived(cn(list(), listClass));
|
|
46
|
+
const itemClasses = $derived(cn(item(), itemClass));
|
|
47
|
+
const activeItemClasses = $derived(cn(item(), itemClass, breadcrumbs({ active: true }).item()));
|
|
48
|
+
const separatorClasses = $derived(cn(separator(), separatorClass));
|
|
49
|
+
const wrapperClasses = $derived(cn(wrapper(), wrapperClass));
|
|
34
50
|
</script>
|
|
35
51
|
|
|
36
52
|
<nav class={baseClass} aria-label="Breadcrumb">
|
|
37
|
-
<ol role="list" class={
|
|
53
|
+
<ol role="list" class={listClasses}>
|
|
38
54
|
{#each items as breadcrumbItem, index (index)}
|
|
39
55
|
<li>
|
|
40
56
|
<div class={wrapperClasses}>
|
|
41
57
|
{#if index > 0}
|
|
42
|
-
<span class={separatorClasses}>
|
|
43
|
-
{#if
|
|
44
|
-
<
|
|
58
|
+
<span class={separatorClasses} aria-hidden="true">
|
|
59
|
+
{#if SeparatorIcon}
|
|
60
|
+
<SeparatorIcon />
|
|
45
61
|
{:else}
|
|
46
62
|
<svg
|
|
47
63
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -57,16 +73,23 @@
|
|
|
57
73
|
{/if}
|
|
58
74
|
</span>
|
|
59
75
|
{/if}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
{#if breadcrumbItem.current}
|
|
77
|
+
<span class={activeItemClasses} aria-current="page">
|
|
78
|
+
{#if breadcrumbItem.icon}
|
|
79
|
+
{@const ItemIcon = breadcrumbItem.icon}
|
|
80
|
+
<ItemIcon class="size-4 flex-shrink-0" />
|
|
81
|
+
{/if}
|
|
82
|
+
{breadcrumbItem.label}
|
|
83
|
+
</span>
|
|
84
|
+
{:else}
|
|
85
|
+
<a href={resolve(breadcrumbItem.href as `/`)} class={itemClasses}>
|
|
86
|
+
{#if breadcrumbItem.icon}
|
|
87
|
+
{@const ItemIcon = breadcrumbItem.icon}
|
|
88
|
+
<ItemIcon class="size-4 flex-shrink-0" />
|
|
89
|
+
{/if}
|
|
90
|
+
{breadcrumbItem.label}
|
|
91
|
+
</a>
|
|
92
|
+
{/if}
|
|
70
93
|
</div>
|
|
71
94
|
</li>
|
|
72
95
|
{/each}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { cn } from '../helper/cls.js';
|
|
3
|
+
import { warnDeprecatedProps } from '../helper/deprecation.js';
|
|
3
4
|
import type { PageHeaderProps } from '../index.js';
|
|
4
5
|
import Breadcrumbs from './Breadcrumbs.svelte';
|
|
5
6
|
|
|
@@ -9,15 +10,24 @@
|
|
|
9
10
|
breadcrumbs = [],
|
|
10
11
|
children,
|
|
11
12
|
class: className = '',
|
|
12
|
-
titleclass
|
|
13
|
+
titleclass,
|
|
14
|
+
titleClass = titleclass ?? '',
|
|
13
15
|
layout = 'vertical'
|
|
14
16
|
}: PageHeaderProps = $props();
|
|
15
17
|
|
|
18
|
+
warnDeprecatedProps(
|
|
19
|
+
'PageHeader',
|
|
20
|
+
{ titleclass },
|
|
21
|
+
{
|
|
22
|
+
titleclass: 'titleClass'
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
16
26
|
const defaultTitleClasses =
|
|
17
27
|
'font-bold text-default-900 sm:tracking-tight sm:truncate text-2xl/7 sm:text-3xl';
|
|
18
28
|
|
|
19
29
|
const hasBreadcrumbs = $derived(breadcrumbs && breadcrumbs.length > 0);
|
|
20
|
-
const titleClasses = $derived(cn(defaultTitleClasses,
|
|
30
|
+
const titleClasses = $derived(cn(defaultTitleClasses, titleClass));
|
|
21
31
|
const containerClass = $derived(cn('space-y-4', className as string));
|
|
22
32
|
</script>
|
|
23
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
1
2
|
import type { Component } from 'svelte';
|
|
2
|
-
import { Size, Color } from '../variants.js';
|
|
3
3
|
type BreadcrumbItem = {
|
|
4
4
|
label: string;
|
|
5
5
|
href: string;
|
|
@@ -7,16 +7,16 @@ type BreadcrumbItem = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
9
9
|
size: {
|
|
10
|
-
|
|
10
|
+
xs: {
|
|
11
11
|
base: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
sm: {
|
|
14
14
|
base: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
base: {
|
|
17
17
|
base: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
lg: {
|
|
20
20
|
base: string;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
@@ -35,31 +35,31 @@ export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
color: {
|
|
38
|
-
|
|
38
|
+
default: {
|
|
39
39
|
item: string;
|
|
40
40
|
wrapper: string;
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
primary: {
|
|
43
43
|
item: string;
|
|
44
44
|
wrapper: string;
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
secondary: {
|
|
47
47
|
item: string;
|
|
48
48
|
wrapper: string;
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
info: {
|
|
51
51
|
item: string;
|
|
52
52
|
wrapper: string;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
success: {
|
|
55
55
|
item: string;
|
|
56
56
|
wrapper: string;
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
warning: {
|
|
59
59
|
item: string;
|
|
60
60
|
wrapper: string;
|
|
61
61
|
};
|
|
62
|
-
|
|
62
|
+
danger: {
|
|
63
63
|
item: string;
|
|
64
64
|
wrapper: string;
|
|
65
65
|
};
|
|
@@ -80,16 +80,16 @@ export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
|
80
80
|
wrapper: string;
|
|
81
81
|
}, undefined, {
|
|
82
82
|
size: {
|
|
83
|
-
|
|
83
|
+
xs: {
|
|
84
84
|
base: string;
|
|
85
85
|
};
|
|
86
|
-
|
|
86
|
+
sm: {
|
|
87
87
|
base: string;
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
base: {
|
|
90
90
|
base: string;
|
|
91
91
|
};
|
|
92
|
-
|
|
92
|
+
lg: {
|
|
93
93
|
base: string;
|
|
94
94
|
};
|
|
95
95
|
};
|
|
@@ -108,31 +108,31 @@ export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
color: {
|
|
111
|
-
|
|
111
|
+
default: {
|
|
112
112
|
item: string;
|
|
113
113
|
wrapper: string;
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
primary: {
|
|
116
116
|
item: string;
|
|
117
117
|
wrapper: string;
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
secondary: {
|
|
120
120
|
item: string;
|
|
121
121
|
wrapper: string;
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
info: {
|
|
124
124
|
item: string;
|
|
125
125
|
wrapper: string;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
success: {
|
|
128
128
|
item: string;
|
|
129
129
|
wrapper: string;
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
warning: {
|
|
132
132
|
item: string;
|
|
133
133
|
wrapper: string;
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
danger: {
|
|
136
136
|
item: string;
|
|
137
137
|
wrapper: string;
|
|
138
138
|
};
|
|
@@ -153,16 +153,16 @@ export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
|
153
153
|
wrapper: string;
|
|
154
154
|
}, import("tailwind-variants").TVReturnType<{
|
|
155
155
|
size: {
|
|
156
|
-
|
|
156
|
+
xs: {
|
|
157
157
|
base: string;
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
sm: {
|
|
160
160
|
base: string;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
base: {
|
|
163
163
|
base: string;
|
|
164
164
|
};
|
|
165
|
-
|
|
165
|
+
lg: {
|
|
166
166
|
base: string;
|
|
167
167
|
};
|
|
168
168
|
};
|
|
@@ -181,31 +181,31 @@ export declare const breadcrumbs: import("tailwind-variants").TVReturnType<{
|
|
|
181
181
|
};
|
|
182
182
|
};
|
|
183
183
|
color: {
|
|
184
|
-
|
|
184
|
+
default: {
|
|
185
185
|
item: string;
|
|
186
186
|
wrapper: string;
|
|
187
187
|
};
|
|
188
|
-
|
|
188
|
+
primary: {
|
|
189
189
|
item: string;
|
|
190
190
|
wrapper: string;
|
|
191
191
|
};
|
|
192
|
-
|
|
192
|
+
secondary: {
|
|
193
193
|
item: string;
|
|
194
194
|
wrapper: string;
|
|
195
195
|
};
|
|
196
|
-
|
|
196
|
+
info: {
|
|
197
197
|
item: string;
|
|
198
198
|
wrapper: string;
|
|
199
199
|
};
|
|
200
|
-
|
|
200
|
+
success: {
|
|
201
201
|
item: string;
|
|
202
202
|
wrapper: string;
|
|
203
203
|
};
|
|
204
|
-
|
|
204
|
+
warning: {
|
|
205
205
|
item: string;
|
|
206
206
|
wrapper: string;
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
danger: {
|
|
209
209
|
item: string;
|
|
210
210
|
wrapper: string;
|
|
211
211
|
};
|
|
@@ -231,10 +231,18 @@ export type BreadcrumbsProps = {
|
|
|
231
231
|
weight?: keyof typeof breadcrumbs.variants.weight;
|
|
232
232
|
color?: keyof typeof breadcrumbs.variants.color;
|
|
233
233
|
icon?: Component;
|
|
234
|
-
class?:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
234
|
+
class?: ClassValue;
|
|
235
|
+
/** @deprecated Use listClass instead */
|
|
236
|
+
listclass?: ClassValue;
|
|
237
|
+
listClass?: ClassValue;
|
|
238
|
+
/** @deprecated Use itemClass instead */
|
|
239
|
+
itemclass?: ClassValue;
|
|
240
|
+
itemClass?: ClassValue;
|
|
241
|
+
/** @deprecated Use separatorClass instead */
|
|
242
|
+
separatorclass?: ClassValue;
|
|
243
|
+
separatorClass?: ClassValue;
|
|
244
|
+
/** @deprecated Use wrapperClass instead */
|
|
245
|
+
wrapperclass?: ClassValue;
|
|
246
|
+
wrapperClass?: ClassValue;
|
|
239
247
|
};
|
|
240
248
|
export type { BreadcrumbItem };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { Component } from 'svelte';
|
|
4
|
+
import type { VariantColors } from '../index.js';
|
|
5
|
+
export type BreadcrumbItem = {
|
|
6
|
+
label: string;
|
|
7
|
+
href: string;
|
|
8
|
+
current?: boolean;
|
|
9
|
+
icon?: Component;
|
|
10
|
+
};
|
|
11
|
+
export type BreadcrumbsProps = {
|
|
12
|
+
items: BreadcrumbItem[];
|
|
13
|
+
size?: 'xs' | 'sm' | 'base' | 'lg';
|
|
14
|
+
weight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
15
|
+
color?: VariantColors;
|
|
16
|
+
icon?: Component;
|
|
17
|
+
class?: ClassValue;
|
|
18
|
+
/** @deprecated Use listClass instead */
|
|
19
|
+
listclass?: ClassValue;
|
|
20
|
+
listClass?: ClassValue;
|
|
21
|
+
/** @deprecated Use itemClass instead */
|
|
22
|
+
itemclass?: ClassValue;
|
|
23
|
+
itemClass?: ClassValue;
|
|
24
|
+
/** @deprecated Use separatorClass instead */
|
|
25
|
+
separatorclass?: ClassValue;
|
|
26
|
+
separatorClass?: ClassValue;
|
|
27
|
+
/** @deprecated Use wrapperClass instead */
|
|
28
|
+
wrapperclass?: ClassValue;
|
|
29
|
+
wrapperClass?: ClassValue;
|
|
30
|
+
testId?: string;
|
|
31
|
+
};
|
|
32
|
+
export type PageHeaderProps = {
|
|
33
|
+
title: string;
|
|
34
|
+
subtitle?: string;
|
|
35
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
36
|
+
children?: Snippet;
|
|
37
|
+
class?: ClassValue;
|
|
38
|
+
/** @deprecated Use titleClass instead */
|
|
39
|
+
titleclass?: ClassValue;
|
|
40
|
+
titleClass?: ClassValue;
|
|
41
|
+
layout?: 'vertical' | 'horizontal';
|
|
42
|
+
testId?: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs a console.warn once per component+prop combination when a deprecated prop is used.
|
|
3
|
+
* @param component - Component name (e.g. 'Modal', 'Card')
|
|
4
|
+
* @param props - The raw props object from $props()
|
|
5
|
+
* @param map - Map of deprecated prop names to their replacements (e.g. { titleclass: 'titleClass' })
|
|
6
|
+
*/
|
|
7
|
+
export declare function warnDeprecatedProps(component: string, props: Record<string, unknown>, map: Record<string, string>): void;
|
|
8
|
+
/**
|
|
9
|
+
* Reset warnings — only for testing.
|
|
10
|
+
* Note: In SSR, the warned Set persists across requests within the same process,
|
|
11
|
+
* so warnings will only fire once per server lifetime. This is acceptable for
|
|
12
|
+
* development-time deprecation notices.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resetDeprecationWarnings(): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const warned = new Set();
|
|
2
|
+
/**
|
|
3
|
+
* Logs a console.warn once per component+prop combination when a deprecated prop is used.
|
|
4
|
+
* @param component - Component name (e.g. 'Modal', 'Card')
|
|
5
|
+
* @param props - The raw props object from $props()
|
|
6
|
+
* @param map - Map of deprecated prop names to their replacements (e.g. { titleclass: 'titleClass' })
|
|
7
|
+
*/
|
|
8
|
+
export function warnDeprecatedProps(component, props, map) {
|
|
9
|
+
for (const [oldName, newName] of Object.entries(map)) {
|
|
10
|
+
if (props[oldName] !== undefined && !warned.has(`${component}.${oldName}`)) {
|
|
11
|
+
warned.add(`${component}.${oldName}`);
|
|
12
|
+
console.warn(`[ripple-ui] ${component}: "${oldName}" is deprecated, use "${newName}" instead.`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reset warnings — only for testing.
|
|
18
|
+
* Note: In SSR, the warned Set persists across requests within the same process,
|
|
19
|
+
* so warnings will only fire once per server lifetime. This is acceptable for
|
|
20
|
+
* development-time deprecation notices.
|
|
21
|
+
*/
|
|
22
|
+
export function resetDeprecationWarnings() {
|
|
23
|
+
warned.clear();
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a data-testid value.
|
|
3
|
+
* Pattern: [prefix-]component[-element][-index]
|
|
4
|
+
*
|
|
5
|
+
* @param component - Component name (e.g., 'button', 'input', 'modal')
|
|
6
|
+
* @param element - Optional sub-element suffix (e.g., 'label', 'close', 'trigger')
|
|
7
|
+
* @param prefix - Optional consumer-provided prefix for multi-instance disambiguation
|
|
8
|
+
* @param index - Optional index for dynamic lists (e.g., table rows, select options). Can be a compound string like "0-1" for nested lists.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildTestId(component: string, element?: string, prefix?: string, index?: number | string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a data-testid value.
|
|
3
|
+
* Pattern: [prefix-]component[-element][-index]
|
|
4
|
+
*
|
|
5
|
+
* @param component - Component name (e.g., 'button', 'input', 'modal')
|
|
6
|
+
* @param element - Optional sub-element suffix (e.g., 'label', 'close', 'trigger')
|
|
7
|
+
* @param prefix - Optional consumer-provided prefix for multi-instance disambiguation
|
|
8
|
+
* @param index - Optional index for dynamic lists (e.g., table rows, select options). Can be a compound string like "0-1" for nested lists.
|
|
9
|
+
*/
|
|
10
|
+
export function buildTestId(component, element, prefix, index) {
|
|
11
|
+
let id = prefix ? `${prefix}-${component}` : component;
|
|
12
|
+
if (element)
|
|
13
|
+
id += `-${element}`;
|
|
14
|
+
if (index !== undefined)
|
|
15
|
+
id += `-${index}`;
|
|
16
|
+
return id;
|
|
17
|
+
}
|