@getmicdrop/svelte-components 2.8.1 → 3.0.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/dist/components/Alert/Alert.svelte +24 -12
- package/dist/components/Alert/Alert.svelte.d.ts +15 -45
- package/dist/components/Alert/Alert.svelte.d.ts.map +1 -1
- package/dist/components/Badges/Badge.svelte +53 -37
- package/dist/components/Badges/Badge.svelte.d.ts +60 -48
- package/dist/components/Badges/Badge.svelte.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.svelte +37 -20
- package/dist/components/BottomSheet/BottomSheet.svelte.d.ts +45 -47
- package/dist/components/BottomSheet/BottomSheet.svelte.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.svelte +22 -16
- package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts +50 -31
- package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/components/Button/Button.svelte +179 -134
- package/dist/components/Button/Button.svelte.d.ts +37 -78
- package/dist/components/Button/Button.svelte.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.svelte +71 -41
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +34 -62
- package/dist/components/Checkbox/Checkbox.svelte.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.svelte +63 -46
- package/dist/components/Drawer/Drawer.svelte.d.ts +110 -54
- package/dist/components/Drawer/Drawer.svelte.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.svelte +203 -193
- package/dist/components/Dropdown/Dropdown.svelte.d.ts +44 -42
- package/dist/components/Dropdown/Dropdown.svelte.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownItem.svelte +124 -111
- package/dist/components/Dropdown/DropdownItem.svelte.d.ts +39 -43
- package/dist/components/Dropdown/DropdownItem.svelte.d.ts.map +1 -1
- package/dist/components/Dropdown/SelectDropdown.svelte +31 -25
- package/dist/components/Dropdown/SelectDropdown.svelte.d.ts +48 -29
- package/dist/components/Dropdown/SelectDropdown.svelte.d.ts.map +1 -1
- package/dist/components/Input/Input.svelte +141 -98
- package/dist/components/Input/Input.svelte.d.ts +94 -110
- package/dist/components/Input/Input.svelte.d.ts.map +1 -1
- package/dist/components/Input/MultiSelect.svelte +58 -39
- package/dist/components/Input/MultiSelect.svelte.d.ts +101 -40
- package/dist/components/Input/MultiSelect.svelte.d.ts.map +1 -1
- package/dist/components/Input/OTPInput.svelte +30 -17
- package/dist/components/Input/OTPInput.svelte.d.ts +45 -36
- package/dist/components/Input/OTPInput.svelte.d.ts.map +1 -1
- package/dist/components/Input/Search.svelte +196 -173
- package/dist/components/Input/Search.svelte.d.ts +36 -65
- package/dist/components/Input/Search.svelte.d.ts.map +1 -1
- package/dist/components/Input/Select.svelte +49 -35
- package/dist/components/Input/Select.svelte.d.ts +44 -46
- package/dist/components/Input/Select.svelte.d.ts.map +1 -1
- package/dist/components/Input/Textarea.svelte +187 -160
- package/dist/components/Input/Textarea.svelte.d.ts +56 -66
- package/dist/components/Input/Textarea.svelte.d.ts.map +1 -1
- package/dist/components/Modal/ConfirmationModal.svelte +103 -78
- package/dist/components/Modal/ConfirmationModal.svelte.d.ts +132 -47
- package/dist/components/Modal/ConfirmationModal.svelte.d.ts.map +1 -1
- package/dist/components/Modal/InputModal.svelte +157 -132
- package/dist/components/Modal/InputModal.svelte.d.ts +181 -48
- package/dist/components/Modal/InputModal.svelte.d.ts.map +1 -1
- package/dist/components/Modal/Modal.svelte +77 -45
- package/dist/components/Modal/Modal.svelte.d.ts +56 -41
- package/dist/components/Modal/Modal.svelte.d.ts.map +1 -1
- package/dist/components/Modal/ModalTestWrapper.svelte.d.ts +2 -2
- package/dist/components/Modal/StatusModal.svelte +149 -122
- package/dist/components/Modal/StatusModal.svelte.d.ts +126 -47
- package/dist/components/Modal/StatusModal.svelte.d.ts.map +1 -1
- package/dist/components/OrderSummary/OrderSummary.svelte +68 -59
- package/dist/components/OrderSummary/OrderSummary.svelte.d.ts +72 -60
- package/dist/components/OrderSummary/OrderSummary.svelte.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.svelte +49 -39
- package/dist/components/Pagination/Pagination.svelte.d.ts +89 -36
- package/dist/components/Pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/components/PublicCard/PublicCard.svelte +22 -12
- package/dist/components/PublicCard/PublicCard.svelte.d.ts +14 -32
- package/dist/components/PublicCard/PublicCard.svelte.d.ts.map +1 -1
- package/dist/components/Radio/Radio.svelte +35 -21
- package/dist/components/Radio/Radio.svelte.d.ts +22 -51
- package/dist/components/Radio/Radio.svelte.d.ts.map +1 -1
- package/dist/components/ShowCard/ShowCard.svelte +47 -40
- package/dist/components/ShowCard/ShowCard.svelte.d.ts +30 -36
- package/dist/components/ShowCard/ShowCard.svelte.d.ts.map +1 -1
- package/dist/components/ShowTimeCard/ShowTimeCard.svelte +23 -14
- package/dist/components/ShowTimeCard/ShowTimeCard.svelte.d.ts +20 -34
- package/dist/components/ShowTimeCard/ShowTimeCard.svelte.d.ts.map +1 -1
- package/dist/components/Toggle.spec.js +21 -52
- package/dist/components/Toggle.svelte +11 -9
- package/dist/components/Toggle.svelte.d.ts +17 -30
- package/dist/components/Toggle.svelte.d.ts.map +1 -1
- package/dist/components/pages/settings/tabs/CustomImageDropzone.svelte +45 -32
- package/dist/components/pages/settings/tabs/CustomImageDropzone.svelte.d.ts +22 -36
- package/dist/components/pages/settings/tabs/CustomImageDropzone.svelte.d.ts.map +1 -1
- package/dist/components/pages/shows/TabNavigation.svelte +16 -8
- package/dist/components/pages/shows/TabNavigation.svelte.d.ts +20 -30
- package/dist/components/pages/shows/TabNavigation.svelte.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,45 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** @type {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object} Props
|
|
4
|
+
* @property {number} [currentPage] - Current page (1-indexed)
|
|
5
|
+
* @property {number} [totalPages] - Total number of pages
|
|
6
|
+
* @property {number} [maxVisible] - Max page buttons to show
|
|
7
|
+
* @property {boolean} [showPrevNext] - Show previous/next buttons
|
|
8
|
+
* @property {boolean} [showIcons] - Flowbite API: alias for showPrevNext
|
|
9
|
+
* @property {string} [previousLabel] - Flowbite API: previous button label
|
|
10
|
+
* @property {string} [nextLabel] - Flowbite API: next button label
|
|
11
|
+
* @property {string} [class] - Additional CSS classes
|
|
12
|
+
* @property {Function} [onchange] - Callback when page changes
|
|
13
|
+
* @property {Function} [onpageChange] - Flowbite-style callback
|
|
14
|
+
* @property {import('svelte').Snippet} [prev] - Snippet for prev button content
|
|
15
|
+
* @property {import('svelte').Snippet} [next] - Snippet for next button content
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** @type {Props} */
|
|
19
|
+
let {
|
|
20
|
+
currentPage = $bindable(1),
|
|
21
|
+
totalPages = 1,
|
|
22
|
+
maxVisible = 5,
|
|
23
|
+
showPrevNext = true,
|
|
24
|
+
showIcons = undefined,
|
|
25
|
+
previousLabel = undefined,
|
|
26
|
+
nextLabel = undefined,
|
|
27
|
+
class: className = "",
|
|
28
|
+
onchange,
|
|
29
|
+
onpageChange,
|
|
30
|
+
prev,
|
|
31
|
+
next
|
|
32
|
+
} = $props();
|
|
23
33
|
|
|
24
34
|
// Support flowbite's showIcons prop
|
|
25
|
-
|
|
35
|
+
let effectiveShowPrevNext = $derived(showIcons !== undefined ? showIcons : showPrevNext);
|
|
26
36
|
|
|
27
37
|
function goToPage(page) {
|
|
28
38
|
if (page >= 1 && page <= totalPages && page !== currentPage) {
|
|
29
39
|
currentPage = page;
|
|
30
|
-
|
|
31
|
-
// Also
|
|
32
|
-
|
|
40
|
+
onchange?.({ page });
|
|
41
|
+
// Also call flowbite-style callback
|
|
42
|
+
onpageChange?.(page);
|
|
33
43
|
}
|
|
34
44
|
}
|
|
35
45
|
|
|
@@ -37,12 +47,12 @@
|
|
|
37
47
|
goToPage(currentPage - 1);
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
function
|
|
50
|
+
function nextPage() {
|
|
41
51
|
goToPage(currentPage + 1);
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
// Calculate which page numbers to show
|
|
45
|
-
|
|
55
|
+
let visiblePages = $derived((() => {
|
|
46
56
|
const pages = [];
|
|
47
57
|
let start = Math.max(1, currentPage - Math.floor(maxVisible / 2));
|
|
48
58
|
let end = Math.min(totalPages, start + maxVisible - 1);
|
|
@@ -57,10 +67,10 @@
|
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
return pages;
|
|
60
|
-
})();
|
|
70
|
+
})());
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
let showStartEllipsis = $derived(visiblePages[0] > 1);
|
|
73
|
+
let showEndEllipsis = $derived(visiblePages[visiblePages.length - 1] < totalPages);
|
|
64
74
|
</script>
|
|
65
75
|
|
|
66
76
|
<nav class="pagination {className}" aria-label="Pagination">
|
|
@@ -69,11 +79,11 @@
|
|
|
69
79
|
type="button"
|
|
70
80
|
class="pagination__button pagination__button--prev"
|
|
71
81
|
disabled={currentPage === 1}
|
|
72
|
-
|
|
82
|
+
onclick={previous}
|
|
73
83
|
aria-label="Previous page"
|
|
74
84
|
>
|
|
75
|
-
{#if
|
|
76
|
-
|
|
85
|
+
{#if prev}
|
|
86
|
+
{@render prev()}
|
|
77
87
|
{:else}
|
|
78
88
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
79
89
|
<path d="M12.5 15L7.5 10L12.5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -87,7 +97,7 @@
|
|
|
87
97
|
<button
|
|
88
98
|
type="button"
|
|
89
99
|
class="pagination__page"
|
|
90
|
-
|
|
100
|
+
onclick={() => goToPage(1)}
|
|
91
101
|
>
|
|
92
102
|
1
|
|
93
103
|
</button>
|
|
@@ -99,7 +109,7 @@
|
|
|
99
109
|
type="button"
|
|
100
110
|
class="pagination__page"
|
|
101
111
|
class:pagination__page--active={page === currentPage}
|
|
102
|
-
|
|
112
|
+
onclick={() => goToPage(page)}
|
|
103
113
|
aria-current={page === currentPage ? "page" : undefined}
|
|
104
114
|
>
|
|
105
115
|
{page}
|
|
@@ -111,7 +121,7 @@
|
|
|
111
121
|
<button
|
|
112
122
|
type="button"
|
|
113
123
|
class="pagination__page"
|
|
114
|
-
|
|
124
|
+
onclick={() => goToPage(totalPages)}
|
|
115
125
|
>
|
|
116
126
|
{totalPages}
|
|
117
127
|
</button>
|
|
@@ -123,11 +133,11 @@
|
|
|
123
133
|
type="button"
|
|
124
134
|
class="pagination__button pagination__button--next"
|
|
125
135
|
disabled={currentPage === totalPages}
|
|
126
|
-
|
|
136
|
+
onclick={nextPage}
|
|
127
137
|
aria-label="Next page"
|
|
128
138
|
>
|
|
129
|
-
{#if
|
|
130
|
-
|
|
139
|
+
{#if next}
|
|
140
|
+
{@render next()}
|
|
131
141
|
{:else}
|
|
132
142
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
133
143
|
<path d="M7.5 5L12.5 10L7.5 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1,53 +1,106 @@
|
|
|
1
1
|
export default Pagination;
|
|
2
|
-
type Pagination =
|
|
3
|
-
|
|
2
|
+
type Pagination = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<Props>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Pagination: import("svelte").Component<{
|
|
7
|
+
/**
|
|
8
|
+
* - Current page (1-indexed)
|
|
9
|
+
*/
|
|
4
10
|
currentPage?: number | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* - Total number of pages
|
|
13
|
+
*/
|
|
5
14
|
totalPages?: number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* - Max page buttons to show
|
|
17
|
+
*/
|
|
6
18
|
maxVisible?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* - Show previous/next buttons
|
|
21
|
+
*/
|
|
7
22
|
showPrevNext?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* - Flowbite API: alias for showPrevNext
|
|
25
|
+
*/
|
|
8
26
|
showIcons?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* - Flowbite API: previous button label
|
|
29
|
+
*/
|
|
9
30
|
previousLabel?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* - Flowbite API: next button label
|
|
33
|
+
*/
|
|
10
34
|
nextLabel?: string | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {
|
|
17
|
-
prev: {};
|
|
18
|
-
next: {};
|
|
19
|
-
}> & {
|
|
20
|
-
$$bindings?: string | undefined;
|
|
21
|
-
};
|
|
22
|
-
declare const Pagination: $$__sveltets_2_IsomorphicComponent<{
|
|
35
|
+
/**
|
|
36
|
+
* - Additional CSS classes
|
|
37
|
+
*/
|
|
23
38
|
class?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* - Callback when page changes
|
|
41
|
+
*/
|
|
42
|
+
onchange?: Function | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* - Flowbite-style callback
|
|
45
|
+
*/
|
|
46
|
+
onpageChange?: Function | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* - Snippet for prev button content
|
|
49
|
+
*/
|
|
50
|
+
prev?: import("svelte").Snippet<[]> | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* - Snippet for next button content
|
|
53
|
+
*/
|
|
54
|
+
next?: import("svelte").Snippet<[]> | undefined;
|
|
55
|
+
}, {}, "currentPage">;
|
|
56
|
+
type Props = {
|
|
57
|
+
/**
|
|
58
|
+
* - Current page (1-indexed)
|
|
59
|
+
*/
|
|
24
60
|
currentPage?: number | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* - Total number of pages
|
|
63
|
+
*/
|
|
25
64
|
totalPages?: number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* - Max page buttons to show
|
|
67
|
+
*/
|
|
26
68
|
maxVisible?: number | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* - Show previous/next buttons
|
|
71
|
+
*/
|
|
27
72
|
showPrevNext?: boolean | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* - Flowbite API: alias for showPrevNext
|
|
75
|
+
*/
|
|
28
76
|
showIcons?: boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* - Flowbite API: previous button label
|
|
79
|
+
*/
|
|
29
80
|
previousLabel?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* - Flowbite API: next button label
|
|
83
|
+
*/
|
|
30
84
|
nextLabel?: string | undefined;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
85
|
+
/**
|
|
86
|
+
* - Additional CSS classes
|
|
87
|
+
*/
|
|
88
|
+
class?: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* - Callback when page changes
|
|
91
|
+
*/
|
|
92
|
+
onchange?: Function | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* - Flowbite-style callback
|
|
95
|
+
*/
|
|
96
|
+
onpageChange?: Function | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* - Snippet for prev button content
|
|
99
|
+
*/
|
|
100
|
+
prev?: import("svelte").Snippet<[]> | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* - Snippet for next button content
|
|
103
|
+
*/
|
|
104
|
+
next?: import("svelte").Snippet<[]> | undefined;
|
|
105
|
+
};
|
|
53
106
|
//# sourceMappingURL=Pagination.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Pagination/Pagination.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Pagination/Pagination.svelte.js"],"names":[],"mappings":";;;;;AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAAyD"}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { onMount, onDestroy } from "svelte";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {{
|
|
6
|
+
* events?: Array<Object>,
|
|
7
|
+
* view?: 'row' | 'col',
|
|
8
|
+
* placeholderImage?: string | null,
|
|
9
|
+
* oneventclick?: (event: Object) => void
|
|
10
|
+
* }}
|
|
11
|
+
*/
|
|
12
|
+
let {
|
|
13
|
+
events = [],
|
|
14
|
+
view = "row",
|
|
15
|
+
placeholderImage = null,
|
|
16
|
+
oneventclick
|
|
17
|
+
} = $props();
|
|
18
|
+
|
|
19
|
+
let isSmallScreen = $state(false);
|
|
10
20
|
|
|
11
21
|
// Default placeholder image for events without images
|
|
12
22
|
const DEFAULT_PLACEHOLDER = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect fill='%23e5e7eb' width='100' height='100'/%3E%3Cpath d='M50 25c-8.3 0-15 6.7-15 15v5c0 8.3 6.7 15 15 15s15-6.7 15-15v-5c0-8.3-6.7-15-15-15zm0 45c-13.8 0-25 5.6-25 12.5V90h50v-7.5c0-6.9-11.2-12.5-25-12.5z' fill='%239ca3af'/%3E%3C/svg%3E";
|
|
13
23
|
|
|
14
|
-
|
|
24
|
+
let placeholder = $derived(placeholderImage || DEFAULT_PLACEHOLDER);
|
|
15
25
|
|
|
16
26
|
let options = {
|
|
17
27
|
weekday: "short",
|
|
@@ -35,7 +45,7 @@
|
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
function handleEventClick(event) {
|
|
38
|
-
|
|
48
|
+
oneventclick?.(event);
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
function handleKeydown(e, event) {
|
|
@@ -79,8 +89,8 @@
|
|
|
79
89
|
? "flex flex-col"
|
|
80
90
|
: "grid grid-cols-[100px_1fr] sm:grid-cols-[160px_1fr] gap-3 sm:gap-4 p-3 sm:p-4"
|
|
81
91
|
}`}
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
onclick={() => handleEventClick(event)}
|
|
93
|
+
onkeydown={(e) => handleKeydown(e, event)}
|
|
84
94
|
tabindex="0"
|
|
85
95
|
role="button"
|
|
86
96
|
aria-label={`${event.name}, ${event.status || 'On Sale'}, ${formatEventDate(event.date)}. Press Enter to view details.`}
|
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
export default PublicCard;
|
|
2
|
-
type PublicCard =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, {}> & {
|
|
11
|
-
$$bindings?: string | undefined;
|
|
2
|
+
type PublicCard = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<{
|
|
5
|
+
events?: Object[] | undefined;
|
|
6
|
+
view?: "col" | "row" | undefined;
|
|
7
|
+
placeholderImage?: string | null | undefined;
|
|
8
|
+
oneventclick?: ((event: Object) => void) | undefined;
|
|
9
|
+
}>): void;
|
|
12
10
|
};
|
|
13
|
-
declare const PublicCard:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
placeholderImage?:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
}, {}, {}, string>;
|
|
22
|
-
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> {
|
|
23
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
24
|
-
$$bindings?: Bindings;
|
|
25
|
-
} & Exports;
|
|
26
|
-
(internal: unknown, props: Props & {
|
|
27
|
-
$$events?: Events;
|
|
28
|
-
$$slots?: Slots;
|
|
29
|
-
}): Exports & {
|
|
30
|
-
$set?: any;
|
|
31
|
-
$on?: any;
|
|
32
|
-
};
|
|
33
|
-
z_$$bindings?: Bindings;
|
|
34
|
-
}
|
|
11
|
+
declare const PublicCard: import("svelte").Component<{
|
|
12
|
+
events?: Array<Object>;
|
|
13
|
+
view?: "row" | "col";
|
|
14
|
+
placeholderImage?: string | null;
|
|
15
|
+
oneventclick?: (event: Object) => void;
|
|
16
|
+
}, {}, "">;
|
|
35
17
|
//# sourceMappingURL=PublicCard.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/PublicCard/PublicCard.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/PublicCard/PublicCard.svelte.js"],"names":[],"mappings":";;;;;;;;;;AA4KA;aANgB,KAAK,CAAC,MAAM,CAAC;WACf,KAAK,GAAG,KAAK;uBACD,MAAM,GAAG,IAAI;mBACjB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;WAGY"}
|
|
@@ -1,28 +1,42 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
interface Props {
|
|
5
|
+
/** The value of this radio option */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** The currently selected value (bind:group) */
|
|
8
|
+
group?: string;
|
|
9
|
+
/** Name attribute for grouping radios */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Whether the radio is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Direct checked prop for flowbite API compatibility */
|
|
14
|
+
checked?: boolean | undefined;
|
|
15
|
+
/** Additional CSS classes */
|
|
16
|
+
class?: string;
|
|
17
|
+
/** Change event callback */
|
|
18
|
+
onchange?: (data: { value: string }) => void;
|
|
19
|
+
/** Slot content */
|
|
20
|
+
children?: Snippet;
|
|
21
|
+
}
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
let {
|
|
24
|
+
value = '',
|
|
25
|
+
group = $bindable(''),
|
|
26
|
+
name = '',
|
|
27
|
+
disabled = false,
|
|
28
|
+
checked = undefined,
|
|
29
|
+
class: className = '',
|
|
30
|
+
onchange,
|
|
31
|
+
children
|
|
32
|
+
}: Props = $props();
|
|
19
33
|
|
|
20
34
|
// Support both flowbite-style checked prop and group binding
|
|
21
|
-
|
|
35
|
+
let isChecked = $derived(checked !== undefined ? checked : group === value);
|
|
22
36
|
|
|
23
37
|
function handleChange() {
|
|
24
38
|
group = value;
|
|
25
|
-
|
|
39
|
+
onchange?.({ value });
|
|
26
40
|
}
|
|
27
41
|
</script>
|
|
28
42
|
|
|
@@ -33,15 +47,15 @@
|
|
|
33
47
|
{value}
|
|
34
48
|
{disabled}
|
|
35
49
|
checked={isChecked}
|
|
36
|
-
|
|
50
|
+
onchange={handleChange}
|
|
37
51
|
class="radio__input"
|
|
38
52
|
/>
|
|
39
53
|
<span class="radio__circle">
|
|
40
54
|
<span class="radio__dot"></span>
|
|
41
55
|
</span>
|
|
42
|
-
{#if
|
|
56
|
+
{#if children}
|
|
43
57
|
<span class="radio__label">
|
|
44
|
-
|
|
58
|
+
{@render children()}
|
|
45
59
|
</span>
|
|
46
60
|
{/if}
|
|
47
61
|
</label>
|
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
change: CustomEvent<any>;
|
|
13
|
-
} & {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
}, {
|
|
16
|
-
default: {};
|
|
17
|
-
}> & {
|
|
18
|
-
$$bindings?: string | undefined;
|
|
19
|
-
};
|
|
20
|
-
declare const Radio: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
-
class?: string | undefined;
|
|
22
|
-
disabled?: boolean | undefined;
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The value of this radio option */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** The currently selected value (bind:group) */
|
|
6
|
+
group?: string;
|
|
7
|
+
/** Name attribute for grouping radios */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Whether the radio is disabled */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Direct checked prop for flowbite API compatibility */
|
|
23
12
|
checked?: boolean | undefined;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[evt: string]: CustomEvent<any>;
|
|
33
|
-
}, {
|
|
34
|
-
default: {};
|
|
35
|
-
}, {}, string>;
|
|
36
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
37
|
-
default: any;
|
|
38
|
-
} ? Props extends Record<string, never> ? any : {
|
|
39
|
-
children?: any;
|
|
40
|
-
} : {});
|
|
41
|
-
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> {
|
|
42
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
43
|
-
$$bindings?: Bindings;
|
|
44
|
-
} & Exports;
|
|
45
|
-
(internal: unknown, props: Props & {
|
|
46
|
-
$$events?: Events;
|
|
47
|
-
$$slots?: Slots;
|
|
48
|
-
}): Exports & {
|
|
49
|
-
$set?: any;
|
|
50
|
-
$on?: any;
|
|
51
|
-
};
|
|
52
|
-
z_$$bindings?: Bindings;
|
|
13
|
+
/** Additional CSS classes */
|
|
14
|
+
class?: string;
|
|
15
|
+
/** Change event callback */
|
|
16
|
+
onchange?: (data: {
|
|
17
|
+
value: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
/** Slot content */
|
|
20
|
+
children?: Snippet;
|
|
53
21
|
}
|
|
22
|
+
declare const Radio: import("svelte").Component<Props, {}, "group">;
|
|
23
|
+
type Radio = ReturnType<typeof Radio>;
|
|
24
|
+
export default Radio;
|
|
54
25
|
//# sourceMappingURL=Radio.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Radio/Radio.svelte.
|
|
1
|
+
{"version":3,"file":"Radio.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Radio/Radio.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGpC,UAAU,KAAK;IACb,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7C,mBAAmB;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAyCH,QAAA,MAAM,KAAK,gDAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
|