@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.
- package/dist/components/Accordion/Accordion.svelte +44 -0
- package/dist/components/Accordion/Accordion.svelte.d.ts +42 -0
- package/dist/components/Accordion/Accordion.svelte.d.ts.map +1 -0
- package/dist/components/Accordion/AccordionItem.svelte +129 -0
- package/dist/components/Accordion/AccordionItem.svelte.d.ts +46 -0
- package/dist/components/Accordion/AccordionItem.svelte.d.ts.map +1 -0
- package/dist/components/Badges/Badge.svelte +129 -3
- package/dist/components/Badges/Badge.svelte.d.ts +8 -2
- package/dist/components/Badges/Badge.svelte.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.svelte +65 -36
- package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts +16 -2
- package/dist/components/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/components/Button/Button.svelte +1 -0
- package/dist/components/Checkbox/Checkbox.svelte +116 -0
- package/dist/components/Checkbox/Checkbox.svelte.d.ts +52 -0
- package/dist/components/Checkbox/Checkbox.svelte.d.ts.map +1 -0
- package/dist/components/Drawer/Drawer.svelte +195 -0
- package/dist/components/Drawer/Drawer.svelte.d.ts +68 -0
- package/dist/components/Drawer/Drawer.svelte.d.ts.map +1 -0
- package/dist/components/Input/Input.svelte.d.ts +4 -4
- package/dist/components/Input/MultiSelect.svelte.d.ts +4 -4
- package/dist/components/Input/Select.svelte.d.ts +4 -4
- package/dist/components/Layout/Header.svelte +14 -4
- package/dist/components/Modal/ConfirmationModal.svelte +69 -17
- package/dist/components/Modal/ConfirmationModal.svelte.d.ts +22 -0
- package/dist/components/Modal/ConfirmationModal.svelte.d.ts.map +1 -1
- package/dist/components/Modal/InputModal.svelte +179 -0
- package/dist/components/Modal/InputModal.svelte.d.ts +75 -0
- package/dist/components/Modal/InputModal.svelte.d.ts.map +1 -0
- package/dist/components/Modal/Modal.svelte +31 -6
- package/dist/components/Modal/StatusModal.svelte +221 -0
- package/dist/components/Modal/StatusModal.svelte.d.ts +59 -0
- package/dist/components/Modal/StatusModal.svelte.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.svelte +178 -0
- package/dist/components/Pagination/Pagination.svelte.d.ts +39 -0
- package/dist/components/Pagination/Pagination.svelte.d.ts.map +1 -0
- package/dist/components/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts +2 -2
- package/dist/components/Radio/Radio.svelte +116 -0
- package/dist/components/Radio/Radio.svelte.d.ts +52 -0
- package/dist/components/Radio/Radio.svelte.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.svelte +59 -0
- package/dist/components/Skeleton/Skeleton.svelte.d.ts +35 -0
- package/dist/components/Skeleton/Skeleton.svelte.d.ts.map +1 -0
- package/dist/components/pages/performers/SwitchOption.svelte.d.ts +2 -2
- package/dist/components/pages/performers/VenueInfo.svelte.d.ts +2 -2
- package/dist/components/pages/performers/VenueItemCard.svelte +2 -2
- package/dist/components/pages/performers/VenueItemCard.svelte.d.ts +2 -2
- package/dist/components/pages/profile/profile-form.svelte +1 -1
- package/dist/constants/formOptions.d.ts +5 -2
- package/dist/constants/formOptions.d.ts.map +1 -1
- package/dist/constants/formOptions.js +2 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { createEventDispatcher } from "svelte";
|
|
3
|
+
|
|
4
|
+
/** @type {boolean} Whether the checkbox is checked */
|
|
5
|
+
export let checked = false;
|
|
6
|
+
/** @type {string} The value attribute */
|
|
7
|
+
export let value = "";
|
|
8
|
+
/** @type {string} Name attribute for form submission */
|
|
9
|
+
export let name = "";
|
|
10
|
+
/** @type {boolean} Whether the checkbox 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
|
+
function handleChange(event) {
|
|
19
|
+
checked = event.target.checked;
|
|
20
|
+
dispatch("change", { checked, value });
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<label class="checkbox {className}" class:checkbox--disabled={disabled}>
|
|
25
|
+
<input
|
|
26
|
+
type="checkbox"
|
|
27
|
+
{name}
|
|
28
|
+
{value}
|
|
29
|
+
{disabled}
|
|
30
|
+
bind:checked
|
|
31
|
+
on:change={handleChange}
|
|
32
|
+
class="checkbox__input"
|
|
33
|
+
/>
|
|
34
|
+
<span class="checkbox__box">
|
|
35
|
+
<svg class="checkbox__check" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
+
<path d="M1 5L4.5 8.5L11 1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
37
|
+
</svg>
|
|
38
|
+
</span>
|
|
39
|
+
{#if $$slots.default}
|
|
40
|
+
<span class="checkbox__label">
|
|
41
|
+
<slot />
|
|
42
|
+
</span>
|
|
43
|
+
{/if}
|
|
44
|
+
</label>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.checkbox {
|
|
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
|
+
.checkbox--disabled {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.checkbox__input {
|
|
63
|
+
position: absolute;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
width: 0;
|
|
66
|
+
height: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.checkbox__box {
|
|
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: 0.25rem;
|
|
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
|
+
.checkbox__check {
|
|
84
|
+
width: 0.75rem;
|
|
85
|
+
height: 0.75rem;
|
|
86
|
+
color: white;
|
|
87
|
+
opacity: 0;
|
|
88
|
+
transform: scale(0.5);
|
|
89
|
+
transition: all 0.15s ease;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.checkbox__input:checked + .checkbox__box {
|
|
93
|
+
background-color: hsl(var(--Brand-Primary, 221 83% 53%));
|
|
94
|
+
border-color: hsl(var(--Brand-Primary, 221 83% 53%));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.checkbox__input:checked + .checkbox__box .checkbox__check {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
transform: scale(1);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.checkbox__input:focus-visible + .checkbox__box {
|
|
103
|
+
outline: 2px solid hsl(var(--Brand-Primary, 221 83% 53%));
|
|
104
|
+
outline-offset: 2px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.checkbox__input:disabled + .checkbox__box {
|
|
108
|
+
background-color: hsl(var(--BG-Secondary, 220 14% 96%));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.checkbox__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 Checkbox;
|
|
2
|
+
type Checkbox = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
+
class?: string | undefined;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
checked?: boolean | undefined;
|
|
6
|
+
value?: string | undefined;
|
|
7
|
+
name?: 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 Checkbox: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
class?: string | undefined;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
|
+
checked?: boolean | undefined;
|
|
23
|
+
value?: string | undefined;
|
|
24
|
+
name?: 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=Checkbox.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Checkbox/Checkbox.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAiEA;;;;;;;;;;;;;;eAAyK;sCATnI,KAAK,EAAE,KAAK;;;;;6CALL,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,195 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { createEventDispatcher, onDestroy } from "svelte";
|
|
3
|
+
import { fly, fade } from "svelte/transition";
|
|
4
|
+
import { cubicOut } from "svelte/easing";
|
|
5
|
+
|
|
6
|
+
/** @type {boolean} Whether the drawer is visible */
|
|
7
|
+
export let show = false;
|
|
8
|
+
/** @type {string} Optional title for the drawer header */
|
|
9
|
+
export let title = "";
|
|
10
|
+
/** @type {'left' | 'right' | 'top' | 'bottom'} Which side the drawer slides from */
|
|
11
|
+
export let placement = "left";
|
|
12
|
+
/** @type {string} Width of the drawer (for left/right placement) */
|
|
13
|
+
export let width = "320px";
|
|
14
|
+
/** @type {string} Height of the drawer (for top/bottom placement) */
|
|
15
|
+
export let height = "auto";
|
|
16
|
+
/** @type {number} Transition duration in ms */
|
|
17
|
+
export let duration = 200;
|
|
18
|
+
/** @type {boolean} Whether clicking the backdrop closes the drawer */
|
|
19
|
+
export let closeOnBackdropClick = true;
|
|
20
|
+
/** @type {boolean} Whether pressing Escape closes the drawer */
|
|
21
|
+
export let closeOnEscape = true;
|
|
22
|
+
|
|
23
|
+
const dispatch = createEventDispatcher();
|
|
24
|
+
|
|
25
|
+
function close() {
|
|
26
|
+
dispatch("close");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function handleBackdropClick(e) {
|
|
30
|
+
if (closeOnBackdropClick && e.target === e.currentTarget) {
|
|
31
|
+
close();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function handleKeydown(e) {
|
|
36
|
+
if (closeOnEscape && e.key === "Escape" && show) {
|
|
37
|
+
close();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Calculate transition params based on placement
|
|
42
|
+
$: transitionParams = (() => {
|
|
43
|
+
switch (placement) {
|
|
44
|
+
case "left":
|
|
45
|
+
return { x: -320, duration, easing: cubicOut };
|
|
46
|
+
case "right":
|
|
47
|
+
return { x: 320, duration, easing: cubicOut };
|
|
48
|
+
case "top":
|
|
49
|
+
return { y: -320, duration, easing: cubicOut };
|
|
50
|
+
case "bottom":
|
|
51
|
+
return { y: 320, duration, easing: cubicOut };
|
|
52
|
+
default:
|
|
53
|
+
return { x: -320, duration, easing: cubicOut };
|
|
54
|
+
}
|
|
55
|
+
})();
|
|
56
|
+
|
|
57
|
+
// Lock body scroll when drawer is open
|
|
58
|
+
$: if (typeof document !== "undefined") {
|
|
59
|
+
if (show) {
|
|
60
|
+
document.body.style.overflow = "hidden";
|
|
61
|
+
} else {
|
|
62
|
+
document.body.style.overflow = "";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
onDestroy(() => {
|
|
67
|
+
if (typeof document !== "undefined") {
|
|
68
|
+
document.body.style.overflow = "";
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<svelte:window on:keydown={handleKeydown} />
|
|
74
|
+
|
|
75
|
+
{#if show}
|
|
76
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
77
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
78
|
+
<div
|
|
79
|
+
class="drawer-backdrop"
|
|
80
|
+
on:click={handleBackdropClick}
|
|
81
|
+
transition:fade={{ duration: 150 }}
|
|
82
|
+
>
|
|
83
|
+
<div
|
|
84
|
+
class="drawer drawer--{placement}"
|
|
85
|
+
style="--drawer-width: {width}; --drawer-height: {height};"
|
|
86
|
+
on:click|stopPropagation
|
|
87
|
+
transition:fly={transitionParams}
|
|
88
|
+
>
|
|
89
|
+
<!-- Optional header with title -->
|
|
90
|
+
{#if title || $$slots.header}
|
|
91
|
+
<div class="drawer__header">
|
|
92
|
+
{#if $$slots.header}
|
|
93
|
+
<slot name="header" />
|
|
94
|
+
{:else}
|
|
95
|
+
<h3 class="drawer__title">{title}</h3>
|
|
96
|
+
{/if}
|
|
97
|
+
</div>
|
|
98
|
+
{/if}
|
|
99
|
+
|
|
100
|
+
<!-- Content slot -->
|
|
101
|
+
<div class="drawer__content">
|
|
102
|
+
<slot />
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<!-- Actions slot (optional) -->
|
|
106
|
+
{#if $$slots.actions}
|
|
107
|
+
<div class="drawer__actions">
|
|
108
|
+
<slot name="actions" />
|
|
109
|
+
</div>
|
|
110
|
+
{/if}
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
{/if}
|
|
114
|
+
|
|
115
|
+
<style>
|
|
116
|
+
.drawer-backdrop {
|
|
117
|
+
position: fixed;
|
|
118
|
+
inset: 0;
|
|
119
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
120
|
+
z-index: var(--z-modal, 50);
|
|
121
|
+
display: flex;
|
|
122
|
+
touch-action: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.drawer {
|
|
126
|
+
position: absolute;
|
|
127
|
+
background-color: hsl(var(--BG-Primary, 0 0% 100%));
|
|
128
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Placement variants */
|
|
135
|
+
.drawer--left {
|
|
136
|
+
left: 0;
|
|
137
|
+
top: 0;
|
|
138
|
+
bottom: 0;
|
|
139
|
+
width: var(--drawer-width, 320px);
|
|
140
|
+
max-width: 100vw;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.drawer--right {
|
|
144
|
+
right: 0;
|
|
145
|
+
top: 0;
|
|
146
|
+
bottom: 0;
|
|
147
|
+
width: var(--drawer-width, 320px);
|
|
148
|
+
max-width: 100vw;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.drawer--top {
|
|
152
|
+
top: 0;
|
|
153
|
+
left: 0;
|
|
154
|
+
right: 0;
|
|
155
|
+
height: var(--drawer-height, auto);
|
|
156
|
+
max-height: 100vh;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.drawer--bottom {
|
|
160
|
+
bottom: 0;
|
|
161
|
+
left: 0;
|
|
162
|
+
right: 0;
|
|
163
|
+
height: var(--drawer-height, auto);
|
|
164
|
+
max-height: 100vh;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.drawer__header {
|
|
168
|
+
padding: 1rem 1.5rem;
|
|
169
|
+
border-bottom: 1px solid hsl(var(--Stroke-Primary, 220 13% 85%));
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.drawer__title {
|
|
174
|
+
font-size: 1.125rem;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
color: hsl(var(--Text-Primary, 220 13% 13%));
|
|
177
|
+
margin: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.drawer__content {
|
|
181
|
+
flex: 1;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
overscroll-behavior: contain;
|
|
184
|
+
-webkit-overflow-scrolling: touch;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.drawer__actions {
|
|
188
|
+
padding: 1rem 1.5rem;
|
|
189
|
+
border-top: 1px solid hsl(var(--Stroke-Primary, 220 13% 85%));
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
gap: 0.75rem;
|
|
194
|
+
}
|
|
195
|
+
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default Drawer;
|
|
2
|
+
type Drawer = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
+
duration?: number | undefined;
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
show?: boolean | undefined;
|
|
6
|
+
placement?: "left" | "right" | "top" | "bottom" | undefined;
|
|
7
|
+
width?: string | undefined;
|
|
8
|
+
height?: string | undefined;
|
|
9
|
+
closeOnBackdropClick?: boolean | undefined;
|
|
10
|
+
closeOnEscape?: boolean | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
header: {};
|
|
13
|
+
default: {};
|
|
14
|
+
actions: {};
|
|
15
|
+
}>, {
|
|
16
|
+
click: PointerEvent;
|
|
17
|
+
close: CustomEvent<any>;
|
|
18
|
+
} & {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {
|
|
21
|
+
header: {};
|
|
22
|
+
default: {};
|
|
23
|
+
actions: {};
|
|
24
|
+
}> & {
|
|
25
|
+
$$bindings?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
declare const Drawer: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
28
|
+
duration?: number | undefined;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
show?: boolean | undefined;
|
|
31
|
+
placement?: "left" | "right" | "top" | "bottom" | undefined;
|
|
32
|
+
width?: string | undefined;
|
|
33
|
+
height?: string | undefined;
|
|
34
|
+
closeOnBackdropClick?: boolean | undefined;
|
|
35
|
+
closeOnEscape?: boolean | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
header: {};
|
|
38
|
+
default: {};
|
|
39
|
+
actions: {};
|
|
40
|
+
}>, {
|
|
41
|
+
click: PointerEvent;
|
|
42
|
+
close: CustomEvent<any>;
|
|
43
|
+
} & {
|
|
44
|
+
[evt: string]: CustomEvent<any>;
|
|
45
|
+
}, {
|
|
46
|
+
header: {};
|
|
47
|
+
default: {};
|
|
48
|
+
actions: {};
|
|
49
|
+
}, {}, string>;
|
|
50
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
51
|
+
default: any;
|
|
52
|
+
} ? Props extends Record<string, never> ? any : {
|
|
53
|
+
children?: any;
|
|
54
|
+
} : {});
|
|
55
|
+
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> {
|
|
56
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
57
|
+
$$bindings?: Bindings;
|
|
58
|
+
} & Exports;
|
|
59
|
+
(internal: unknown, props: Props & {
|
|
60
|
+
$$events?: Events;
|
|
61
|
+
$$slots?: Slots;
|
|
62
|
+
}): Exports & {
|
|
63
|
+
$set?: any;
|
|
64
|
+
$on?: any;
|
|
65
|
+
};
|
|
66
|
+
z_$$bindings?: Bindings;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=Drawer.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Drawer/Drawer.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0IA;;;;;;;;;;;;;;;;;;;;;;eAAyN;sCATnL,KAAK,EAAE,KAAK;;;;;6CALL,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"}
|
|
@@ -4,8 +4,9 @@ type Input = SvelteComponent<{
|
|
|
4
4
|
size?: string | undefined;
|
|
5
5
|
className?: string | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
|
-
|
|
7
|
+
value?: string | undefined;
|
|
8
8
|
name?: string | undefined;
|
|
9
|
+
label?: string | undefined;
|
|
9
10
|
icon?: null | undefined;
|
|
10
11
|
required?: boolean | undefined;
|
|
11
12
|
optional?: boolean | undefined;
|
|
@@ -25,7 +26,6 @@ type Input = SvelteComponent<{
|
|
|
25
26
|
readonly?: boolean | undefined;
|
|
26
27
|
controlled?: boolean | undefined;
|
|
27
28
|
onButtonClick?: null | undefined;
|
|
28
|
-
value?: string | undefined;
|
|
29
29
|
autocomplete?: null | undefined;
|
|
30
30
|
autofocus?: boolean | undefined;
|
|
31
31
|
showPasswordToggle?: boolean | undefined;
|
|
@@ -52,8 +52,9 @@ declare const Input: $$__sveltets_2_IsomorphicComponent<{
|
|
|
52
52
|
size?: string | undefined;
|
|
53
53
|
className?: string | undefined;
|
|
54
54
|
disabled?: boolean | undefined;
|
|
55
|
-
|
|
55
|
+
value?: string | undefined;
|
|
56
56
|
name?: string | undefined;
|
|
57
|
+
label?: string | undefined;
|
|
57
58
|
icon?: null | undefined;
|
|
58
59
|
required?: boolean | undefined;
|
|
59
60
|
optional?: boolean | undefined;
|
|
@@ -73,7 +74,6 @@ declare const Input: $$__sveltets_2_IsomorphicComponent<{
|
|
|
73
74
|
readonly?: boolean | undefined;
|
|
74
75
|
controlled?: boolean | undefined;
|
|
75
76
|
onButtonClick?: null | undefined;
|
|
76
|
-
value?: string | undefined;
|
|
77
77
|
autocomplete?: null | undefined;
|
|
78
78
|
autofocus?: boolean | undefined;
|
|
79
79
|
showPasswordToggle?: boolean | undefined;
|
|
@@ -2,12 +2,12 @@ export default MultiSelect;
|
|
|
2
2
|
type MultiSelect = SvelteComponent<{
|
|
3
3
|
error?: string | undefined;
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
|
-
|
|
5
|
+
value?: any[] | undefined;
|
|
6
6
|
name?: string | undefined;
|
|
7
|
+
label?: string | undefined;
|
|
7
8
|
required?: boolean | undefined;
|
|
8
9
|
placeholder?: string | undefined;
|
|
9
10
|
id?: string | undefined;
|
|
10
|
-
value?: any[] | undefined;
|
|
11
11
|
animateFocus?: boolean | undefined;
|
|
12
12
|
items?: any[] | undefined;
|
|
13
13
|
hideClear?: boolean | undefined;
|
|
@@ -21,12 +21,12 @@ type MultiSelect = SvelteComponent<{
|
|
|
21
21
|
declare const MultiSelect: $$__sveltets_2_IsomorphicComponent<{
|
|
22
22
|
error?: string | undefined;
|
|
23
23
|
disabled?: boolean | undefined;
|
|
24
|
-
|
|
24
|
+
value?: any[] | undefined;
|
|
25
25
|
name?: string | undefined;
|
|
26
|
+
label?: string | undefined;
|
|
26
27
|
required?: boolean | undefined;
|
|
27
28
|
placeholder?: string | undefined;
|
|
28
29
|
id?: string | undefined;
|
|
29
|
-
value?: any[] | undefined;
|
|
30
30
|
animateFocus?: boolean | undefined;
|
|
31
31
|
items?: any[] | undefined;
|
|
32
32
|
hideClear?: boolean | undefined;
|
|
@@ -2,12 +2,12 @@ export default Select;
|
|
|
2
2
|
type Select = SvelteComponent<{
|
|
3
3
|
error?: string | undefined;
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
|
-
|
|
5
|
+
value?: string | undefined;
|
|
6
6
|
name?: string | undefined;
|
|
7
|
+
label?: string | undefined;
|
|
7
8
|
required?: boolean | undefined;
|
|
8
9
|
placeholder?: string | undefined;
|
|
9
10
|
id?: string | undefined;
|
|
10
|
-
value?: string | undefined;
|
|
11
11
|
animateFocus?: boolean | undefined;
|
|
12
12
|
items?: any[] | undefined;
|
|
13
13
|
}, {
|
|
@@ -20,12 +20,12 @@ type Select = SvelteComponent<{
|
|
|
20
20
|
declare const Select: $$__sveltets_2_IsomorphicComponent<{
|
|
21
21
|
error?: string | undefined;
|
|
22
22
|
disabled?: boolean | undefined;
|
|
23
|
-
|
|
23
|
+
value?: string | undefined;
|
|
24
24
|
name?: string | undefined;
|
|
25
|
+
label?: string | undefined;
|
|
25
26
|
required?: boolean | undefined;
|
|
26
27
|
placeholder?: string | undefined;
|
|
27
28
|
id?: string | undefined;
|
|
28
|
-
value?: string | undefined;
|
|
29
29
|
animateFocus?: boolean | undefined;
|
|
30
30
|
items?: any[] | undefined;
|
|
31
31
|
}, {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
class="avatar-button"
|
|
80
80
|
on:click={() => showDesktopDropdown = !showDesktopDropdown}
|
|
81
81
|
>
|
|
82
|
-
<Avatar src={avatar}
|
|
82
|
+
<Avatar src={avatar} rounded size="md" />
|
|
83
83
|
</button>
|
|
84
84
|
|
|
85
85
|
{#if showDesktopDropdown}
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
<div class="header-avatar-wrapper">
|
|
138
138
|
<!-- Mobile: triggers bottom sheet -->
|
|
139
139
|
<button class="avatar-button avatar-button--mobile" on:click={() => showMobileSheet = true}>
|
|
140
|
-
<Avatar src={avatar}
|
|
140
|
+
<Avatar src={avatar} rounded size="md" />
|
|
141
141
|
</button>
|
|
142
142
|
|
|
143
143
|
<!-- Desktop: triggers dropdown -->
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
class="avatar-button avatar-button--desktop"
|
|
146
146
|
on:click={() => showDesktopDropdown = !showDesktopDropdown}
|
|
147
147
|
>
|
|
148
|
-
<Avatar src={avatar}
|
|
148
|
+
<Avatar src={avatar} rounded size="md" />
|
|
149
149
|
</button>
|
|
150
150
|
|
|
151
151
|
<!-- Desktop dropdown -->
|
|
@@ -294,13 +294,23 @@
|
|
|
294
294
|
margin-left: 0.25rem;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
/* Fix avatar image aspect ratio and border radius */
|
|
298
|
+
:global(.avatar-button img) {
|
|
299
|
+
-o-object-fit: cover !important;
|
|
300
|
+
object-fit: cover !important;
|
|
301
|
+
aspect-ratio: 1 / 1 !important;
|
|
302
|
+
border-radius: 0.5rem !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
297
305
|
.avatar-button {
|
|
298
306
|
background: none;
|
|
299
307
|
border: none;
|
|
300
308
|
padding: 0;
|
|
301
309
|
cursor: pointer;
|
|
302
|
-
border-radius:
|
|
310
|
+
border-radius: 0.5rem;
|
|
303
311
|
transition: opacity 0.15s;
|
|
312
|
+
min-width: 40px;
|
|
313
|
+
min-height: 40px;
|
|
304
314
|
}
|
|
305
315
|
|
|
306
316
|
.avatar-button:hover {
|