@getmicdrop/svelte-components 2.2.0 → 2.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.
Files changed (54) hide show
  1. package/dist/components/Accordion/Accordion.svelte +44 -0
  2. package/dist/components/Accordion/Accordion.svelte.d.ts +42 -0
  3. package/dist/components/Accordion/Accordion.svelte.d.ts.map +1 -0
  4. package/dist/components/Accordion/AccordionItem.svelte +129 -0
  5. package/dist/components/Accordion/AccordionItem.svelte.d.ts +46 -0
  6. package/dist/components/Accordion/AccordionItem.svelte.d.ts.map +1 -0
  7. package/dist/components/Badges/Badge.svelte +129 -3
  8. package/dist/components/Badges/Badge.svelte.d.ts +8 -2
  9. package/dist/components/Badges/Badge.svelte.d.ts.map +1 -1
  10. package/dist/components/Breadcrumb/Breadcrumb.svelte +65 -36
  11. package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts +16 -2
  12. package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
  13. package/dist/components/Button/Button.svelte +1 -0
  14. package/dist/components/Checkbox/Checkbox.svelte +116 -0
  15. package/dist/components/Checkbox/Checkbox.svelte.d.ts +52 -0
  16. package/dist/components/Checkbox/Checkbox.svelte.d.ts.map +1 -0
  17. package/dist/components/Drawer/Drawer.svelte +195 -0
  18. package/dist/components/Drawer/Drawer.svelte.d.ts +68 -0
  19. package/dist/components/Drawer/Drawer.svelte.d.ts.map +1 -0
  20. package/dist/components/Input/Input.svelte.d.ts +4 -4
  21. package/dist/components/Input/MultiSelect.svelte.d.ts +4 -4
  22. package/dist/components/Input/Select.svelte.d.ts +4 -4
  23. package/dist/components/Layout/Header.svelte +14 -4
  24. package/dist/components/Modal/ConfirmationModal.svelte +69 -17
  25. package/dist/components/Modal/ConfirmationModal.svelte.d.ts +22 -0
  26. package/dist/components/Modal/ConfirmationModal.svelte.d.ts.map +1 -1
  27. package/dist/components/Modal/InputModal.svelte +179 -0
  28. package/dist/components/Modal/InputModal.svelte.d.ts +75 -0
  29. package/dist/components/Modal/InputModal.svelte.d.ts.map +1 -0
  30. package/dist/components/Modal/Modal.svelte +31 -6
  31. package/dist/components/Modal/StatusModal.svelte +221 -0
  32. package/dist/components/Modal/StatusModal.svelte.d.ts +59 -0
  33. package/dist/components/Modal/StatusModal.svelte.d.ts.map +1 -0
  34. package/dist/components/Pagination/Pagination.svelte +178 -0
  35. package/dist/components/Pagination/Pagination.svelte.d.ts +39 -0
  36. package/dist/components/Pagination/Pagination.svelte.d.ts.map +1 -0
  37. package/dist/components/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts +2 -2
  38. package/dist/components/Radio/Radio.svelte +116 -0
  39. package/dist/components/Radio/Radio.svelte.d.ts +52 -0
  40. package/dist/components/Radio/Radio.svelte.d.ts.map +1 -0
  41. package/dist/components/Skeleton/Skeleton.svelte +59 -0
  42. package/dist/components/Skeleton/Skeleton.svelte.d.ts +35 -0
  43. package/dist/components/Skeleton/Skeleton.svelte.d.ts.map +1 -0
  44. package/dist/components/pages/performers/SwitchOption.svelte.d.ts +2 -2
  45. package/dist/components/pages/performers/VenueInfo.svelte.d.ts +2 -2
  46. package/dist/components/pages/performers/VenueItemCard.svelte +2 -2
  47. package/dist/components/pages/performers/VenueItemCard.svelte.d.ts +2 -2
  48. package/dist/components/pages/profile/profile-form.svelte +1 -1
  49. package/dist/constants/formOptions.d.ts +5 -2
  50. package/dist/constants/formOptions.d.ts.map +1 -1
  51. package/dist/constants/formOptions.js +2 -1
  52. package/dist/index.d.ts +9 -0
  53. package/dist/index.js +9 -0
  54. package/package.json +1 -1
@@ -0,0 +1,221 @@
1
+ <script>
2
+ import { createEventDispatcher } from "svelte";
3
+ import Button from "../Button/Button.svelte";
4
+ import Cancel from "../../assets/svg/cancel.svg";
5
+ import Modal from "./Modal.svelte";
6
+
7
+ export let show = false;
8
+ export let size = "small"; // "small" | "default" | "large"
9
+ export let title = "";
10
+ export let subtitle = ""; // For profile-style modals (e.g., performer email)
11
+ export let description = "";
12
+ export let buttonText = "Ok";
13
+ export let iconType = "success"; // success | error | warning | info
14
+ export let customIcon = null;
15
+ export let image = null; // For profile photos (rounded square instead of circular icon)
16
+ export let disabled = false;
17
+ export let loading = false;
18
+ export let variant = null; // Alternative to iconType for consistency with ConfirmationModal
19
+ export let actions = []; // For multiple buttons (like ProfileAddedModal)
20
+ export let closeBtn = false; // To show close button
21
+
22
+ const dispatch = createEventDispatcher();
23
+
24
+ // Use variant if provided, otherwise fallback to iconType
25
+ $: effectiveVariant = variant || iconType;
26
+
27
+ // Check if we're in profile mode (image instead of icon)
28
+ $: isProfileMode = !!image;
29
+
30
+ const handleButtonClick = () => {
31
+ if (!disabled && !loading) {
32
+ dispatch("confirm");
33
+ closeModal();
34
+ }
35
+ };
36
+
37
+ const handleAction = (action) => {
38
+ if (!disabled && !loading) {
39
+ action.onClick?.();
40
+ dispatch(action.label.toLowerCase());
41
+ if (!action.keepOpen) {
42
+ closeModal();
43
+ }
44
+ }
45
+ };
46
+
47
+ const closeModal = () => {
48
+ show = false;
49
+ dispatch("close");
50
+ };
51
+
52
+ const handleClose = () => {
53
+ if (disabled || loading) return;
54
+ closeModal();
55
+ };
56
+
57
+ // Get button variant for action buttons
58
+ const getActionVariant = (action) => {
59
+ if (action.variant) return action.variant;
60
+ const label = action.label.toLowerCase();
61
+ if (label.startsWith('delete') || label.startsWith('archive') || action.danger) {
62
+ return 'red-solid';
63
+ }
64
+ if (label === 'continue' || label === 'finish' || label === 'done' || label === 'save & notify') {
65
+ return 'blue-solid';
66
+ }
67
+ return 'gray-outline';
68
+ };
69
+
70
+ // Icon colors based on variant
71
+ const getIconColors = (type) => {
72
+ switch (type) {
73
+ case "success":
74
+ return {
75
+ bg: "bg-green-100 dark:bg-green-900/30",
76
+ icon: "text-green-600 dark:text-green-400",
77
+ };
78
+ case "error":
79
+ return {
80
+ bg: "bg-red-100 dark:bg-red-900/30",
81
+ icon: "text-red-600 dark:text-red-400",
82
+ };
83
+ case "warning":
84
+ return {
85
+ bg: "bg-amber-100 dark:bg-amber-900/30",
86
+ icon: "text-amber-600 dark:text-amber-400",
87
+ };
88
+ case "info":
89
+ return {
90
+ bg: "bg-blue-100 dark:bg-blue-900/30",
91
+ icon: "text-blue-600 dark:text-blue-400",
92
+ };
93
+ default:
94
+ return {
95
+ bg: "bg-green-100 dark:bg-green-900/30",
96
+ icon: "text-green-600 dark:text-green-400",
97
+ };
98
+ }
99
+ };
100
+
101
+ // Button variant based on status type
102
+ const getButtonVariant = (type) => {
103
+ switch (type) {
104
+ case "error":
105
+ return "red-solid";
106
+ case "warning":
107
+ return "blue-solid";
108
+ default:
109
+ return "blue-solid";
110
+ }
111
+ };
112
+
113
+ $: colors = getIconColors(effectiveVariant);
114
+ $: buttonVariant = getButtonVariant(effectiveVariant);
115
+ </script>
116
+
117
+ <Modal bind:show {size}>
118
+ <div slot="header" class="text-center">
119
+ {#if closeBtn}
120
+ <div class="flex justify-end -mt-2 -mr-2 mb-2">
121
+ <button
122
+ class="p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none transition-colors"
123
+ on:click={handleClose}
124
+ {disabled}
125
+ >
126
+ <img src={Cancel} alt="Close" class="w-5 h-5" />
127
+ </button>
128
+ </div>
129
+ {/if}
130
+ {#if isProfileMode}
131
+ <!-- Profile mode: show image as rounded square -->
132
+ <div class="flex justify-center">
133
+ <img
134
+ src={image}
135
+ alt={title}
136
+ class="w-16 h-16 rounded-lg object-cover"
137
+ />
138
+ </div>
139
+ <div class="mt-4">
140
+ {#if title}
141
+ <h2 class="text-xl font-medium text-gray-900 dark:text-white">{title}</h2>
142
+ {/if}
143
+ {#if subtitle}
144
+ <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">{subtitle}</p>
145
+ {/if}
146
+ </div>
147
+ {:else}
148
+ <!-- Status mode: show icon in colored circle -->
149
+ <div class="flex justify-center items-center">
150
+ {#if customIcon}
151
+ <div class="w-14 h-14 rounded-full {colors.bg} flex items-center justify-center">
152
+ <img src={customIcon} alt="Status icon" class="w-8 h-8" />
153
+ </div>
154
+ {:else}
155
+ <div class="w-14 h-14 rounded-full {colors.bg} flex items-center justify-center">
156
+ {#if effectiveVariant === "success"}
157
+ <svg class="w-7 h-7 {colors.icon}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
158
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
159
+ </svg>
160
+ {:else if effectiveVariant === "error"}
161
+ <svg class="w-7 h-7 {colors.icon}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
162
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
163
+ </svg>
164
+ {:else if effectiveVariant === "warning"}
165
+ <svg class="w-7 h-7 {colors.icon}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
166
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
167
+ </svg>
168
+ {:else if effectiveVariant === "info"}
169
+ <svg class="w-7 h-7 {colors.icon}" fill="none" viewBox="0 0 24 24" stroke="currentColor">
170
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
171
+ </svg>
172
+ {/if}
173
+ </div>
174
+ {/if}
175
+ </div>
176
+ {#if title}
177
+ <h2 class="text-xl font-medium text-gray-900 dark:text-white mt-4">{title}</h2>
178
+ {/if}
179
+ {/if}
180
+ </div>
181
+
182
+ <div slot="body" class="text-center mt-4">
183
+ {#if description}
184
+ <p class="text-sm leading-relaxed {isProfileMode ? 'text-gray-900 dark:text-white font-medium' : 'text-gray-500 dark:text-gray-400'}">
185
+ {description}
186
+ </p>
187
+ {/if}
188
+ </div>
189
+
190
+ <div slot="footer" class="w-full">
191
+ {#if actions.length > 0}
192
+ <!-- Multiple buttons mode -->
193
+ <div class="flex gap-3">
194
+ {#each actions as action}
195
+ <Button
196
+ size="full"
197
+ variant={getActionVariant(action)}
198
+ beforeIcon={action.beforeIcon}
199
+ afterIcon={action.afterIcon}
200
+ disabled={action.disabled || disabled}
201
+ loading={action.loading || (loading && action.primary)}
202
+ on:click={() => handleAction(action)}
203
+ >
204
+ {action.label}
205
+ </Button>
206
+ {/each}
207
+ </div>
208
+ {:else}
209
+ <!-- Single button mode -->
210
+ <Button
211
+ size="full"
212
+ variant={buttonVariant}
213
+ {disabled}
214
+ {loading}
215
+ on:click={handleButtonClick}
216
+ >
217
+ {buttonText}
218
+ </Button>
219
+ {/if}
220
+ </div>
221
+ </Modal>
@@ -0,0 +1,59 @@
1
+ export default StatusModal;
2
+ type StatusModal = SvelteComponent<{
3
+ title?: string | undefined;
4
+ size?: string | undefined;
5
+ variant?: null | undefined;
6
+ actions?: any[] | undefined;
7
+ show?: boolean | undefined;
8
+ subtitle?: string | undefined;
9
+ disabled?: boolean | undefined;
10
+ loading?: boolean | undefined;
11
+ image?: null | undefined;
12
+ buttonText?: string | undefined;
13
+ description?: string | undefined;
14
+ customIcon?: null | undefined;
15
+ closeBtn?: boolean | undefined;
16
+ iconType?: string | undefined;
17
+ }, {
18
+ confirm: CustomEvent<any>;
19
+ close: CustomEvent<any>;
20
+ } & {
21
+ [evt: string]: CustomEvent<any>;
22
+ }, {}> & {
23
+ $$bindings?: string | undefined;
24
+ };
25
+ declare const StatusModal: $$__sveltets_2_IsomorphicComponent<{
26
+ title?: string | undefined;
27
+ size?: string | undefined;
28
+ variant?: null | undefined;
29
+ actions?: any[] | undefined;
30
+ show?: boolean | undefined;
31
+ subtitle?: string | undefined;
32
+ disabled?: boolean | undefined;
33
+ loading?: boolean | undefined;
34
+ image?: null | undefined;
35
+ buttonText?: string | undefined;
36
+ description?: string | undefined;
37
+ customIcon?: null | undefined;
38
+ closeBtn?: boolean | undefined;
39
+ iconType?: string | undefined;
40
+ }, {
41
+ confirm: CustomEvent<any>;
42
+ close: CustomEvent<any>;
43
+ } & {
44
+ [evt: string]: CustomEvent<any>;
45
+ }, {}, {}, string>;
46
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
47
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
48
+ $$bindings?: Bindings;
49
+ } & Exports;
50
+ (internal: unknown, props: Props & {
51
+ $$events?: Events;
52
+ $$slots?: Slots;
53
+ }): Exports & {
54
+ $set?: any;
55
+ $on?: any;
56
+ };
57
+ z_$$bindings?: Bindings;
58
+ }
59
+ //# sourceMappingURL=StatusModal.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusModal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Modal/StatusModal.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2NA;;;;;;;;;;;;;;;;;;;;mBAA0Q;6CAT7N,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,178 @@
1
+ <script>
2
+ import { createEventDispatcher } from "svelte";
3
+
4
+ /** @type {number} Current page (1-indexed) */
5
+ export let currentPage = 1;
6
+ /** @type {number} Total number of pages */
7
+ export let totalPages = 1;
8
+ /** @type {number} Max page buttons to show */
9
+ export let maxVisible = 5;
10
+ /** @type {boolean} Show previous/next buttons */
11
+ export let showPrevNext = true;
12
+ /** @type {string} Additional CSS classes */
13
+ let className = "";
14
+ export { className as class };
15
+
16
+ const dispatch = createEventDispatcher();
17
+
18
+ function goToPage(page) {
19
+ if (page >= 1 && page <= totalPages && page !== currentPage) {
20
+ currentPage = page;
21
+ dispatch("change", { page });
22
+ }
23
+ }
24
+
25
+ function previous() {
26
+ goToPage(currentPage - 1);
27
+ }
28
+
29
+ function next() {
30
+ goToPage(currentPage + 1);
31
+ }
32
+
33
+ // Calculate which page numbers to show
34
+ $: visiblePages = (() => {
35
+ const pages = [];
36
+ let start = Math.max(1, currentPage - Math.floor(maxVisible / 2));
37
+ let end = Math.min(totalPages, start + maxVisible - 1);
38
+
39
+ // Adjust start if we're near the end
40
+ if (end - start + 1 < maxVisible) {
41
+ start = Math.max(1, end - maxVisible + 1);
42
+ }
43
+
44
+ for (let i = start; i <= end; i++) {
45
+ pages.push(i);
46
+ }
47
+
48
+ return pages;
49
+ })();
50
+
51
+ $: showStartEllipsis = visiblePages[0] > 1;
52
+ $: showEndEllipsis = visiblePages[visiblePages.length - 1] < totalPages;
53
+ </script>
54
+
55
+ <nav class="pagination {className}" aria-label="Pagination">
56
+ {#if showPrevNext}
57
+ <button
58
+ type="button"
59
+ class="pagination__button pagination__button--prev"
60
+ disabled={currentPage === 1}
61
+ on:click={previous}
62
+ aria-label="Previous page"
63
+ >
64
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
65
+ <path d="M12.5 15L7.5 10L12.5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
66
+ </svg>
67
+ </button>
68
+ {/if}
69
+
70
+ <div class="pagination__pages">
71
+ {#if showStartEllipsis}
72
+ <button
73
+ type="button"
74
+ class="pagination__page"
75
+ on:click={() => goToPage(1)}
76
+ >
77
+ 1
78
+ </button>
79
+ <span class="pagination__ellipsis">...</span>
80
+ {/if}
81
+
82
+ {#each visiblePages as page}
83
+ <button
84
+ type="button"
85
+ class="pagination__page"
86
+ class:pagination__page--active={page === currentPage}
87
+ on:click={() => goToPage(page)}
88
+ aria-current={page === currentPage ? "page" : undefined}
89
+ >
90
+ {page}
91
+ </button>
92
+ {/each}
93
+
94
+ {#if showEndEllipsis}
95
+ <span class="pagination__ellipsis">...</span>
96
+ <button
97
+ type="button"
98
+ class="pagination__page"
99
+ on:click={() => goToPage(totalPages)}
100
+ >
101
+ {totalPages}
102
+ </button>
103
+ {/if}
104
+ </div>
105
+
106
+ {#if showPrevNext}
107
+ <button
108
+ type="button"
109
+ class="pagination__button pagination__button--next"
110
+ disabled={currentPage === totalPages}
111
+ on:click={next}
112
+ aria-label="Next page"
113
+ >
114
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
115
+ <path d="M7.5 5L12.5 10L7.5 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
116
+ </svg>
117
+ </button>
118
+ {/if}
119
+ </nav>
120
+
121
+ <style>
122
+ .pagination {
123
+ display: flex;
124
+ align-items: center;
125
+ gap: 0.25rem;
126
+ }
127
+
128
+ .pagination__pages {
129
+ display: flex;
130
+ align-items: center;
131
+ gap: 0.25rem;
132
+ }
133
+
134
+ .pagination__button,
135
+ .pagination__page {
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ min-width: 2.25rem;
140
+ height: 2.25rem;
141
+ padding: 0 0.5rem;
142
+ border: 1px solid hsl(var(--Stroke-Primary, 220 13% 85%));
143
+ border-radius: 0.375rem;
144
+ background-color: hsl(var(--BG-Primary, 0 0% 100%));
145
+ color: hsl(var(--Text-Primary, 220 13% 13%));
146
+ font-size: 0.875rem;
147
+ font-weight: 500;
148
+ cursor: pointer;
149
+ transition: all 0.15s ease;
150
+ }
151
+
152
+ .pagination__button:hover:not(:disabled),
153
+ .pagination__page:hover:not(.pagination__page--active) {
154
+ background-color: hsl(var(--BG-Secondary, 220 14% 96%));
155
+ border-color: hsl(var(--Stroke-Secondary, 220 13% 75%));
156
+ }
157
+
158
+ .pagination__button:disabled {
159
+ opacity: 0.5;
160
+ cursor: not-allowed;
161
+ }
162
+
163
+ .pagination__page--active {
164
+ background-color: hsl(var(--Brand-Primary, 221 83% 53%));
165
+ border-color: hsl(var(--Brand-Primary, 221 83% 53%));
166
+ color: white;
167
+ }
168
+
169
+ .pagination__ellipsis {
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ width: 2.25rem;
174
+ height: 2.25rem;
175
+ color: hsl(var(--Text-Secondary, 220 9% 46%));
176
+ font-size: 0.875rem;
177
+ }
178
+ </style>
@@ -0,0 +1,39 @@
1
+ export default Pagination;
2
+ type Pagination = SvelteComponent<{
3
+ class?: string | undefined;
4
+ currentPage?: number | undefined;
5
+ totalPages?: number | undefined;
6
+ maxVisible?: number | undefined;
7
+ showPrevNext?: boolean | undefined;
8
+ }, {
9
+ change: CustomEvent<any>;
10
+ } & {
11
+ [evt: string]: CustomEvent<any>;
12
+ }, {}> & {
13
+ $$bindings?: string | undefined;
14
+ };
15
+ declare const Pagination: $$__sveltets_2_IsomorphicComponent<{
16
+ class?: string | undefined;
17
+ currentPage?: number | undefined;
18
+ totalPages?: number | undefined;
19
+ maxVisible?: number | undefined;
20
+ showPrevNext?: boolean | undefined;
21
+ }, {
22
+ change: CustomEvent<any>;
23
+ } & {
24
+ [evt: string]: CustomEvent<any>;
25
+ }, {}, {}, string>;
26
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
27
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
28
+ $$bindings?: Bindings;
29
+ } & Exports;
30
+ (internal: unknown, props: Props & {
31
+ $$events?: Events;
32
+ $$slots?: Slots;
33
+ }): Exports & {
34
+ $set?: any;
35
+ $on?: any;
36
+ };
37
+ z_$$bindings?: Bindings;
38
+ }
39
+ //# sourceMappingURL=Pagination.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pagination.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Pagination/Pagination.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAqHA;;;;;;;;;;mBAAwL;6CAT3I,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,OAAO,OAAO,QAAQ;IAC3L,cAAc,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,WAAW,OAAO,SAAS,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,eAAe,QAAQ,CAAC"}
@@ -1,9 +1,9 @@
1
1
  export default PasswordStrengthIndicator;
2
2
  type PasswordStrengthIndicator = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
3
+ textColor?: string | undefined;
3
4
  password?: string | undefined;
4
5
  strengthText?: string | undefined;
5
6
  score?: number | undefined;
6
- textColor?: string | undefined;
7
7
  }, {
8
8
  default: {};
9
9
  }>, {
@@ -14,10 +14,10 @@ type PasswordStrengthIndicator = SvelteComponent<$$__sveltets_2_PropsWithChildre
14
14
  $$bindings?: string | undefined;
15
15
  };
16
16
  declare const PasswordStrengthIndicator: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
17
+ textColor?: string | undefined;
17
18
  password?: string | undefined;
18
19
  strengthText?: string | undefined;
19
20
  score?: number | undefined;
20
- textColor?: string | undefined;
21
21
  }, {
22
22
  default: {};
23
23
  }>, {
@@ -0,0 +1,116 @@
1
+ <script>
2
+ import { createEventDispatcher } from "svelte";
3
+
4
+ /** @type {string} The value of this radio option */
5
+ export let value = "";
6
+ /** @type {string} The currently selected value (bind:group) */
7
+ export let group = "";
8
+ /** @type {string} Name attribute for grouping radios */
9
+ export let name = "";
10
+ /** @type {boolean} Whether the radio is disabled */
11
+ export let disabled = false;
12
+ /** @type {string} Additional CSS classes */
13
+ let className = "";
14
+ export { className as class };
15
+
16
+ const dispatch = createEventDispatcher();
17
+
18
+ $: checked = group === value;
19
+
20
+ function handleChange() {
21
+ group = value;
22
+ dispatch("change", { value });
23
+ }
24
+ </script>
25
+
26
+ <label class="radio {className}" class:radio--disabled={disabled}>
27
+ <input
28
+ type="radio"
29
+ {name}
30
+ {value}
31
+ {disabled}
32
+ checked={checked}
33
+ on:change={handleChange}
34
+ class="radio__input"
35
+ />
36
+ <span class="radio__circle">
37
+ <span class="radio__dot"></span>
38
+ </span>
39
+ {#if $$slots.default}
40
+ <span class="radio__label">
41
+ <slot />
42
+ </span>
43
+ {/if}
44
+ </label>
45
+
46
+ <style>
47
+ .radio {
48
+ display: inline-flex;
49
+ align-items: flex-start;
50
+ gap: 0.5rem;
51
+ cursor: pointer;
52
+ -webkit-user-select: none;
53
+ -moz-user-select: none;
54
+ user-select: none;
55
+ }
56
+
57
+ .radio--disabled {
58
+ cursor: not-allowed;
59
+ opacity: 0.5;
60
+ }
61
+
62
+ .radio__input {
63
+ position: absolute;
64
+ opacity: 0;
65
+ width: 0;
66
+ height: 0;
67
+ }
68
+
69
+ .radio__circle {
70
+ flex-shrink: 0;
71
+ width: 1.125rem;
72
+ height: 1.125rem;
73
+ border: 2px solid hsl(var(--Stroke-Primary, 220 13% 85%));
74
+ border-radius: 50%;
75
+ background-color: hsl(var(--BG-Primary, 0 0% 100%));
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ transition: all 0.15s ease;
80
+ margin-top: 0.1875rem; /* Align with text baseline */
81
+ }
82
+
83
+ .radio__dot {
84
+ width: 0.5rem;
85
+ height: 0.5rem;
86
+ border-radius: 50%;
87
+ background-color: hsl(var(--Brand-Primary, 221 83% 53%));
88
+ opacity: 0;
89
+ transform: scale(0);
90
+ transition: all 0.15s ease;
91
+ }
92
+
93
+ .radio__input:checked + .radio__circle {
94
+ border-color: hsl(var(--Brand-Primary, 221 83% 53%));
95
+ }
96
+
97
+ .radio__input:checked + .radio__circle .radio__dot {
98
+ opacity: 1;
99
+ transform: scale(1);
100
+ }
101
+
102
+ .radio__input:focus-visible + .radio__circle {
103
+ outline: 2px solid hsl(var(--Brand-Primary, 221 83% 53%));
104
+ outline-offset: 2px;
105
+ }
106
+
107
+ .radio__input:disabled + .radio__circle {
108
+ background-color: hsl(var(--BG-Secondary, 220 14% 96%));
109
+ }
110
+
111
+ .radio__label {
112
+ color: hsl(var(--Text-Primary, 220 13% 13%));
113
+ font-size: 0.875rem;
114
+ line-height: 1.5;
115
+ }
116
+ </style>
@@ -0,0 +1,52 @@
1
+ export default Radio;
2
+ type Radio = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
3
+ class?: string | undefined;
4
+ disabled?: boolean | undefined;
5
+ value?: string | undefined;
6
+ name?: string | undefined;
7
+ group?: string | undefined;
8
+ }, {
9
+ default: {};
10
+ }>, {
11
+ change: CustomEvent<any>;
12
+ } & {
13
+ [evt: string]: CustomEvent<any>;
14
+ }, {
15
+ default: {};
16
+ }> & {
17
+ $$bindings?: string | undefined;
18
+ };
19
+ declare const Radio: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ class?: string | undefined;
21
+ disabled?: boolean | undefined;
22
+ value?: string | undefined;
23
+ name?: string | undefined;
24
+ group?: string | undefined;
25
+ }, {
26
+ default: {};
27
+ }>, {
28
+ change: CustomEvent<any>;
29
+ } & {
30
+ [evt: string]: CustomEvent<any>;
31
+ }, {
32
+ default: {};
33
+ }, {}, string>;
34
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
35
+ default: any;
36
+ } ? Props extends Record<string, never> ? any : {
37
+ children?: any;
38
+ } : {});
39
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
40
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
41
+ $$bindings?: Bindings;
42
+ } & Exports;
43
+ (internal: unknown, props: Props & {
44
+ $$events?: Events;
45
+ $$slots?: Slots;
46
+ }): Exports & {
47
+ $set?: any;
48
+ $on?: any;
49
+ };
50
+ z_$$bindings?: Bindings;
51
+ }
52
+ //# sourceMappingURL=Radio.svelte.d.ts.map