@makolabs/ripple 3.6.0 → 3.7.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.
|
@@ -60,7 +60,11 @@
|
|
|
60
60
|
/>
|
|
61
61
|
{#if label}
|
|
62
62
|
<label for={name} class={labelClass} data-testid={buildTestId('checkbox', 'label', testId)}
|
|
63
|
-
>{label}
|
|
63
|
+
>{label}{#if required}<span
|
|
64
|
+
class="text-danger-500"
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
data-testid={buildTestId('checkbox', 'required', testId)}> *</span
|
|
67
|
+
>{/if}</label
|
|
64
68
|
>
|
|
65
69
|
{/if}
|
|
66
70
|
</div>
|
package/dist/forms/Input.svelte
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
label,
|
|
13
13
|
placeholder,
|
|
14
14
|
disabled = false,
|
|
15
|
+
required = false,
|
|
15
16
|
class: className = '',
|
|
16
17
|
size = Size.MD,
|
|
17
18
|
value = $bindable(),
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
name,
|
|
50
51
|
placeholder,
|
|
51
52
|
disabled,
|
|
53
|
+
required,
|
|
52
54
|
class: inputClasses,
|
|
53
55
|
'aria-invalid': !!errors.length,
|
|
54
56
|
'aria-describedby': errors.length
|
|
@@ -105,7 +107,12 @@
|
|
|
105
107
|
},
|
|
106
108
|
extraClass
|
|
107
109
|
)}
|
|
108
|
-
data-testid={buildTestId('input', 'label', testId)}
|
|
110
|
+
data-testid={buildTestId('input', 'label', testId)}
|
|
111
|
+
>{label}{#if required}<span
|
|
112
|
+
class="text-danger-500"
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
data-testid={buildTestId('input', 'required', testId)}> *</span
|
|
115
|
+
>{/if}</label
|
|
109
116
|
>
|
|
110
117
|
{/if}
|
|
111
118
|
{/snippet}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
units = [],
|
|
19
19
|
errors,
|
|
20
20
|
disabled = false,
|
|
21
|
+
required = false,
|
|
21
22
|
dropdownIcon: DropdownIcon,
|
|
22
23
|
onunitchange: onUnitChange,
|
|
23
24
|
formatThousands = true,
|
|
@@ -116,7 +117,12 @@
|
|
|
116
117
|
<label
|
|
117
118
|
for={name}
|
|
118
119
|
class="text-default-700 block text-sm font-medium"
|
|
119
|
-
data-testid={buildTestId('numberinput', 'label', testId)}
|
|
120
|
+
data-testid={buildTestId('numberinput', 'label', testId)}
|
|
121
|
+
>{label}{#if required}<span
|
|
122
|
+
class="text-danger-500"
|
|
123
|
+
aria-hidden="true"
|
|
124
|
+
data-testid={buildTestId('numberinput', 'required', testId)}> *</span
|
|
125
|
+
>{/if}</label
|
|
120
126
|
>
|
|
121
127
|
{/if}
|
|
122
128
|
<div class={containerClass} bind:this={containerRef}>
|
|
@@ -143,6 +149,7 @@
|
|
|
143
149
|
onblur={() => (inputFocused = false)}
|
|
144
150
|
{placeholder}
|
|
145
151
|
{disabled}
|
|
152
|
+
{required}
|
|
146
153
|
class={inputClass}
|
|
147
154
|
data-testid={buildTestId('numberinput', undefined, testId)}
|
|
148
155
|
{...restProps}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
value = $bindable(''),
|
|
14
14
|
disabled = false,
|
|
15
15
|
readonly = false,
|
|
16
|
+
required = false,
|
|
16
17
|
rows = 3,
|
|
17
18
|
autoGrow = false,
|
|
18
19
|
maxRows = 10,
|
|
@@ -84,9 +85,16 @@
|
|
|
84
85
|
|
|
85
86
|
<div class="w-full" data-testid={buildTestId('textarea', 'wrapper', testId)}>
|
|
86
87
|
{#if label}
|
|
87
|
-
<label
|
|
88
|
-
{
|
|
89
|
-
|
|
88
|
+
<label
|
|
89
|
+
for={id}
|
|
90
|
+
class="text-default-700 mb-1 block text-sm font-medium"
|
|
91
|
+
data-testid={buildTestId('textarea', 'label', testId)}
|
|
92
|
+
>{label}{#if required}<span
|
|
93
|
+
class="text-danger-500"
|
|
94
|
+
aria-hidden="true"
|
|
95
|
+
data-testid={buildTestId('textarea', 'required', testId)}> *</span
|
|
96
|
+
>{/if}</label
|
|
97
|
+
>
|
|
90
98
|
{/if}
|
|
91
99
|
<textarea
|
|
92
100
|
bind:this={el}
|
|
@@ -95,6 +103,7 @@
|
|
|
95
103
|
{placeholder}
|
|
96
104
|
{disabled}
|
|
97
105
|
{readonly}
|
|
106
|
+
{required}
|
|
98
107
|
{rows}
|
|
99
108
|
maxlength={maxLength}
|
|
100
109
|
class={textareaClasses}
|
|
@@ -266,6 +266,8 @@ export type NumberInputProps = {
|
|
|
266
266
|
units?: CurrencyOption[];
|
|
267
267
|
errors?: string[];
|
|
268
268
|
disabled?: boolean;
|
|
269
|
+
/** Marks the field as required: renders a `*` after the label and sets the native `required` attribute. */
|
|
270
|
+
required?: boolean;
|
|
269
271
|
/** Icon for the dropdown trigger. Defaults to a chevron. */
|
|
270
272
|
dropdownIcon?: Component;
|
|
271
273
|
/** Fires when the user picks a different unit. */
|
|
@@ -448,6 +450,8 @@ export interface TextareaProps {
|
|
|
448
450
|
value?: string;
|
|
449
451
|
disabled?: boolean;
|
|
450
452
|
readonly?: boolean;
|
|
453
|
+
/** Marks the field as required: renders a `*` after the label and sets the native `required` attribute. */
|
|
454
|
+
required?: boolean;
|
|
451
455
|
/** Visible row count. @default 3 */
|
|
452
456
|
rows?: number;
|
|
453
457
|
/**
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import type { User, GetUsersOptions, GetUsersResult } from '../index.js';
|
|
2
|
-
export declare const getUsers: import("@sveltejs/kit").RemoteCommand<GetUsersOptions,
|
|
3
|
-
export declare const createUser: import("@sveltejs/kit").RemoteCommand<Partial<User>,
|
|
2
|
+
export declare const getUsers: import("@sveltejs/kit").RemoteCommand<GetUsersOptions, GetUsersResult>;
|
|
3
|
+
export declare const createUser: import("@sveltejs/kit").RemoteCommand<Partial<User>, User>;
|
|
4
4
|
export declare const updateUser: import("@sveltejs/kit").RemoteCommand<{
|
|
5
5
|
userId: string;
|
|
6
6
|
userData: Partial<User>;
|
|
7
|
-
},
|
|
8
|
-
export declare const deleteUser: import("@sveltejs/kit").RemoteCommand<string,
|
|
9
|
-
export declare const deleteUsers: import("@sveltejs/kit").RemoteCommand<string[],
|
|
10
|
-
export declare const getUserPermissions: import("@sveltejs/kit").RemoteCommand<string,
|
|
7
|
+
}, User>;
|
|
8
|
+
export declare const deleteUser: import("@sveltejs/kit").RemoteCommand<string, void>;
|
|
9
|
+
export declare const deleteUsers: import("@sveltejs/kit").RemoteCommand<string[], void>;
|
|
10
|
+
export declare const getUserPermissions: import("@sveltejs/kit").RemoteCommand<string, string[]>;
|
|
11
11
|
export declare const updateUserPermissions: import("@sveltejs/kit").RemoteCommand<{
|
|
12
12
|
userId: string;
|
|
13
13
|
permissions: string[];
|
|
14
|
-
},
|
|
14
|
+
}, void>;
|
|
15
15
|
export declare const generateApiKey: import("@sveltejs/kit").RemoteCommand<{
|
|
16
16
|
userId: string;
|
|
17
17
|
permissions: string[];
|
|
18
18
|
revokeOld?: boolean;
|
|
19
|
-
},
|
|
19
|
+
}, {
|
|
20
20
|
success: boolean;
|
|
21
21
|
apiKey: string;
|
|
22
22
|
message: string;
|
|
23
|
-
}
|
|
23
|
+
}>;
|
|
24
24
|
/**
|
|
25
25
|
* List users who exist in the identity provider but are NOT yet members of
|
|
26
26
|
* ALLOWED_ORG_ID. Treats org membership as the "approved" signal — anyone
|
|
27
27
|
* authenticated against the app without org membership is "pending".
|
|
28
28
|
*/
|
|
29
|
-
export declare const getPendingUsers: import("@sveltejs/kit").RemoteCommand<GetUsersOptions,
|
|
29
|
+
export declare const getPendingUsers: import("@sveltejs/kit").RemoteCommand<GetUsersOptions, GetUsersResult>;
|
|
30
30
|
/**
|
|
31
31
|
* Approve a pending user: add them to ALLOWED_ORG_ID with the chosen Clerk role,
|
|
32
32
|
* then mint an API key carrying the supplied scope set. The caller (the modal)
|
|
@@ -36,21 +36,21 @@ export declare const approveUser: import("@sveltejs/kit").RemoteCommand<{
|
|
|
36
36
|
userId: string;
|
|
37
37
|
role: string;
|
|
38
38
|
permissions: string[];
|
|
39
|
-
},
|
|
39
|
+
}, {
|
|
40
40
|
apiKey: string;
|
|
41
|
-
}
|
|
41
|
+
}>;
|
|
42
42
|
/**
|
|
43
43
|
* Reject a pending user — permanently deletes them from the identity provider.
|
|
44
44
|
* Destructive and irreversible; the user loses login, history, everything.
|
|
45
45
|
*/
|
|
46
|
-
export declare const rejectUser: import("@sveltejs/kit").RemoteCommand<string,
|
|
46
|
+
export declare const rejectUser: import("@sveltejs/kit").RemoteCommand<string, void>;
|
|
47
47
|
export declare const verifyToken: import("@sveltejs/kit").RemoteCommand<{
|
|
48
48
|
apiKey: string;
|
|
49
|
-
},
|
|
49
|
+
}, {
|
|
50
50
|
valid: boolean;
|
|
51
51
|
scopes?: string[];
|
|
52
52
|
sub?: string;
|
|
53
53
|
client_id?: string;
|
|
54
54
|
error?: string;
|
|
55
55
|
token?: string;
|
|
56
|
-
}
|
|
56
|
+
}>;
|