@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,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { setContext } from "svelte";
|
|
3
|
+
import { writable } from "svelte/store";
|
|
4
|
+
|
|
5
|
+
/** @type {boolean} Whether multiple items can be open at once */
|
|
6
|
+
export let multiple = false;
|
|
7
|
+
/** @type {string} Additional CSS classes */
|
|
8
|
+
let className = "";
|
|
9
|
+
export { className as class };
|
|
10
|
+
|
|
11
|
+
// Store to track which items are open
|
|
12
|
+
const openItems = writable(new Set());
|
|
13
|
+
|
|
14
|
+
// Context for child AccordionItem components
|
|
15
|
+
setContext("accordion", {
|
|
16
|
+
openItems,
|
|
17
|
+
multiple,
|
|
18
|
+
toggle: (id) => {
|
|
19
|
+
openItems.update((items) => {
|
|
20
|
+
if (items.has(id)) {
|
|
21
|
+
items.delete(id);
|
|
22
|
+
} else {
|
|
23
|
+
if (!multiple) {
|
|
24
|
+
items.clear();
|
|
25
|
+
}
|
|
26
|
+
items.add(id);
|
|
27
|
+
}
|
|
28
|
+
return new Set(items);
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div class="accordion {className}">
|
|
35
|
+
<slot />
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
.accordion {
|
|
40
|
+
border: 1px solid hsl(var(--Stroke-Primary, 220 13% 85%));
|
|
41
|
+
border-radius: 0.5rem;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default Accordion;
|
|
2
|
+
type Accordion = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
+
multiple?: boolean | undefined;
|
|
4
|
+
class?: string | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
default: {};
|
|
7
|
+
}>, {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
}, {
|
|
10
|
+
default: {};
|
|
11
|
+
}> & {
|
|
12
|
+
$$bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
declare const Accordion: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
15
|
+
multiple?: boolean | undefined;
|
|
16
|
+
class?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
default: {};
|
|
19
|
+
}>, {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
}, {
|
|
22
|
+
default: {};
|
|
23
|
+
}, {}, string>;
|
|
24
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
25
|
+
default: any;
|
|
26
|
+
} ? Props extends Record<string, never> ? any : {
|
|
27
|
+
children?: any;
|
|
28
|
+
} : {});
|
|
29
|
+
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> {
|
|
30
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
31
|
+
$$bindings?: Bindings;
|
|
32
|
+
} & Exports;
|
|
33
|
+
(internal: unknown, props: Props & {
|
|
34
|
+
$$events?: Events;
|
|
35
|
+
$$slots?: Slots;
|
|
36
|
+
}): Exports & {
|
|
37
|
+
$set?: any;
|
|
38
|
+
$on?: any;
|
|
39
|
+
};
|
|
40
|
+
z_$$bindings?: Bindings;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=Accordion.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Accordion/Accordion.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;AA+DA;;;;;;;;;eAAiJ;sCAT3G,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,129 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { getContext, onMount } from "svelte";
|
|
3
|
+
import { slide } from "svelte/transition";
|
|
4
|
+
|
|
5
|
+
/** @type {boolean} Whether this item starts open */
|
|
6
|
+
export let open = false;
|
|
7
|
+
/** @type {string} Additional CSS classes */
|
|
8
|
+
let className = "";
|
|
9
|
+
export { className as class };
|
|
10
|
+
|
|
11
|
+
const { openItems, toggle } = getContext("accordion");
|
|
12
|
+
|
|
13
|
+
// Generate unique ID for this item
|
|
14
|
+
let id = Math.random().toString(36).substring(2, 9);
|
|
15
|
+
|
|
16
|
+
onMount(() => {
|
|
17
|
+
if (open) {
|
|
18
|
+
toggle(id);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
$: isOpen = $openItems.has(id);
|
|
23
|
+
|
|
24
|
+
function handleClick() {
|
|
25
|
+
toggle(id);
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div class="accordion-item {className}" class:accordion-item--open={isOpen}>
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
class="accordion-item__header"
|
|
33
|
+
aria-expanded={isOpen}
|
|
34
|
+
on:click={handleClick}
|
|
35
|
+
>
|
|
36
|
+
<span class="accordion-item__title">
|
|
37
|
+
<slot name="header">Accordion Item</slot>
|
|
38
|
+
</span>
|
|
39
|
+
<svg
|
|
40
|
+
class="accordion-item__icon"
|
|
41
|
+
class:accordion-item__icon--open={isOpen}
|
|
42
|
+
width="20"
|
|
43
|
+
height="20"
|
|
44
|
+
viewBox="0 0 20 20"
|
|
45
|
+
fill="none"
|
|
46
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
47
|
+
>
|
|
48
|
+
<path
|
|
49
|
+
d="M5 7.5L10 12.5L15 7.5"
|
|
50
|
+
stroke="currentColor"
|
|
51
|
+
stroke-width="1.5"
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
stroke-linejoin="round"
|
|
54
|
+
/>
|
|
55
|
+
</svg>
|
|
56
|
+
</button>
|
|
57
|
+
|
|
58
|
+
{#if isOpen}
|
|
59
|
+
<div class="accordion-item__content" transition:slide={{ duration: 200 }}>
|
|
60
|
+
<div class="accordion-item__body">
|
|
61
|
+
<slot />
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
{/if}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.accordion-item {
|
|
69
|
+
border-bottom: 1px solid hsl(var(--Stroke-Primary, 220 13% 85%));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.accordion-item:last-child {
|
|
73
|
+
border-bottom: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.accordion-item__header {
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
padding: 1rem 1.25rem;
|
|
82
|
+
background-color: hsl(var(--BG-Primary, 0 0% 100%));
|
|
83
|
+
border: none;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
text-align: left;
|
|
86
|
+
transition: background-color 0.15s ease;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.accordion-item__header:hover {
|
|
90
|
+
background-color: hsl(var(--BG-Secondary, 220 14% 96%));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.accordion-item__header:focus {
|
|
94
|
+
outline: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.accordion-item__header:focus-visible {
|
|
98
|
+
outline: 2px solid hsl(var(--Brand-Primary, 221 83% 53%));
|
|
99
|
+
outline-offset: -2px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.accordion-item__title {
|
|
103
|
+
font-size: 1rem;
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
color: hsl(var(--Text-Primary, 220 13% 13%));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.accordion-item__icon {
|
|
109
|
+
flex-shrink: 0;
|
|
110
|
+
color: hsl(var(--Text-Secondary, 220 9% 46%));
|
|
111
|
+
transition: transform 0.2s ease;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.accordion-item__icon--open {
|
|
115
|
+
transform: rotate(180deg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.accordion-item__content {
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
background-color: hsl(var(--BG-Primary, 0 0% 100%));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.accordion-item__body {
|
|
124
|
+
padding: 1rem 1.25rem 1.25rem;
|
|
125
|
+
color: hsl(var(--Text-Secondary, 220 9% 46%));
|
|
126
|
+
font-size: 0.875rem;
|
|
127
|
+
line-height: 1.5;
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default AccordionItem;
|
|
2
|
+
type AccordionItem = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
+
class?: string | undefined;
|
|
4
|
+
open?: boolean | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
header: {};
|
|
7
|
+
default: {};
|
|
8
|
+
}>, {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
}, {
|
|
11
|
+
header: {};
|
|
12
|
+
default: {};
|
|
13
|
+
}> & {
|
|
14
|
+
$$bindings?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
declare const AccordionItem: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
17
|
+
class?: string | undefined;
|
|
18
|
+
open?: boolean | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
header: {};
|
|
21
|
+
default: {};
|
|
22
|
+
}>, {
|
|
23
|
+
[evt: string]: CustomEvent<any>;
|
|
24
|
+
}, {
|
|
25
|
+
header: {};
|
|
26
|
+
default: {};
|
|
27
|
+
}, {}, string>;
|
|
28
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
29
|
+
default: any;
|
|
30
|
+
} ? Props extends Record<string, never> ? any : {
|
|
31
|
+
children?: any;
|
|
32
|
+
} : {});
|
|
33
|
+
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> {
|
|
34
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
35
|
+
$$bindings?: Bindings;
|
|
36
|
+
} & Exports;
|
|
37
|
+
(internal: unknown, props: Props & {
|
|
38
|
+
$$events?: Events;
|
|
39
|
+
$$slots?: Slots;
|
|
40
|
+
}): Exports & {
|
|
41
|
+
$set?: any;
|
|
42
|
+
$on?: any;
|
|
43
|
+
};
|
|
44
|
+
z_$$bindings?: Bindings;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=AccordionItem.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Accordion/AccordionItem.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyEA;;;;;;;;;;;eAAiJ;sCAT3G,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"}
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
export let size = "medium";
|
|
8
8
|
export let className = "";
|
|
9
|
-
/** @type {string} Semantic variant (
|
|
9
|
+
/** @type {string|number} Semantic variant or tier number (1-5) */
|
|
10
10
|
export let variant = "neutral";
|
|
11
|
+
/** @type {string|null} Event display type: "square" or "circle" */
|
|
12
|
+
export let event = null;
|
|
13
|
+
/** @type {string|null} Custom text color (hex) */
|
|
14
|
+
export let textColor = null;
|
|
15
|
+
/** @type {string|null} Custom background color (hex or rgba) */
|
|
16
|
+
export let bgColor = null;
|
|
11
17
|
|
|
12
18
|
$: sizeClass = (() => {
|
|
13
19
|
switch (size) {
|
|
@@ -22,8 +28,24 @@
|
|
|
22
28
|
}
|
|
23
29
|
})();
|
|
24
30
|
|
|
31
|
+
// Handle tier numbers (1-5) as variants
|
|
32
|
+
$: normalizedVariant = (() => {
|
|
33
|
+
if (typeof variant === "number" || !isNaN(Number(variant))) {
|
|
34
|
+
const tierNum = Number(variant);
|
|
35
|
+
switch (tierNum) {
|
|
36
|
+
case 1: return "tier-1";
|
|
37
|
+
case 2: return "tier-2";
|
|
38
|
+
case 3: return "tier-3";
|
|
39
|
+
case 4: return "tier-4";
|
|
40
|
+
case 5: return "tier-5";
|
|
41
|
+
default: return "neutral";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return String(variant).toLowerCase();
|
|
45
|
+
})();
|
|
46
|
+
|
|
25
47
|
$: variantClass = (() => {
|
|
26
|
-
switch (
|
|
48
|
+
switch (normalizedVariant) {
|
|
27
49
|
// Role variants
|
|
28
50
|
case "host":
|
|
29
51
|
return "badge-host";
|
|
@@ -47,14 +69,46 @@
|
|
|
47
69
|
case "warning":
|
|
48
70
|
return "badge-warning";
|
|
49
71
|
case "error":
|
|
72
|
+
case "danger":
|
|
50
73
|
return "badge-error";
|
|
51
74
|
case "info":
|
|
52
75
|
return "badge-info";
|
|
76
|
+
// Tier variants (for lineup position badges)
|
|
77
|
+
case "tier-1":
|
|
78
|
+
return "badge-tier-1";
|
|
79
|
+
case "tier-2":
|
|
80
|
+
return "badge-tier-2";
|
|
81
|
+
case "tier-3":
|
|
82
|
+
return "badge-tier-3";
|
|
83
|
+
case "tier-4":
|
|
84
|
+
return "badge-tier-4";
|
|
85
|
+
case "tier-5":
|
|
86
|
+
return "badge-tier-5";
|
|
53
87
|
case "neutral":
|
|
54
88
|
default:
|
|
55
89
|
return "badge-neutral";
|
|
56
90
|
}
|
|
57
91
|
})();
|
|
92
|
+
|
|
93
|
+
$: eventClass = (() => {
|
|
94
|
+
if (!event) return "";
|
|
95
|
+
switch (event) {
|
|
96
|
+
case "square":
|
|
97
|
+
return "badge-event-square";
|
|
98
|
+
case "circle":
|
|
99
|
+
return "badge-event-circle";
|
|
100
|
+
default:
|
|
101
|
+
return "";
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
|
|
105
|
+
// Custom style for text/bg color overrides
|
|
106
|
+
$: customStyle = (() => {
|
|
107
|
+
const styles = [];
|
|
108
|
+
if (textColor) styles.push(`color: ${textColor}`);
|
|
109
|
+
if (bgColor) styles.push(`background-color: ${bgColor}`);
|
|
110
|
+
return styles.length > 0 ? styles.join("; ") : null;
|
|
111
|
+
})();
|
|
58
112
|
</script>
|
|
59
113
|
|
|
60
114
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
@@ -64,9 +118,11 @@
|
|
|
64
118
|
"badge",
|
|
65
119
|
sizeClass,
|
|
66
120
|
variantClass,
|
|
121
|
+
eventClass,
|
|
67
122
|
className
|
|
68
123
|
)}
|
|
69
|
-
|
|
124
|
+
style={customStyle}
|
|
125
|
+
on:click={(e) => dispatch("click", e)}
|
|
70
126
|
>
|
|
71
127
|
<slot />
|
|
72
128
|
</div>
|
|
@@ -76,6 +132,9 @@
|
|
|
76
132
|
|
|
77
133
|
Role variants: host, headliner, feature, special-guest, opener, guest, teacher, assistant
|
|
78
134
|
Status variants: success, warning, error, info, neutral
|
|
135
|
+
Tier variants: 1, 2, 3, 4, 5 (pass as number or string)
|
|
136
|
+
Event types: event="square" or event="circle"
|
|
137
|
+
Custom colors: textColor="#hex" bgColor="rgba(...)"
|
|
79
138
|
-->
|
|
80
139
|
|
|
81
140
|
<style>
|
|
@@ -179,4 +238,71 @@
|
|
|
179
238
|
color: #4b5563;
|
|
180
239
|
background-color: #f9fafb;
|
|
181
240
|
}
|
|
241
|
+
|
|
242
|
+
/* Tier variants (lineup position badges) - colors match local frontend implementation */
|
|
243
|
+
.badge-tier-1 {
|
|
244
|
+
color: rgba(108, 43, 217, 1);
|
|
245
|
+
background-color: rgba(108, 43, 217, 0.15);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.badge-tier-2 {
|
|
249
|
+
color: rgba(255, 146, 46, 1);
|
|
250
|
+
background-color: rgba(255, 146, 46, 0.15);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.badge-tier-3 {
|
|
254
|
+
color: rgba(2, 132, 254, 1);
|
|
255
|
+
background-color: rgba(2, 132, 254, 0.15);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.badge-tier-4 {
|
|
259
|
+
color: rgba(21, 160, 51, 1);
|
|
260
|
+
background-color: rgba(21, 160, 51, 0.15);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.badge-tier-5 {
|
|
264
|
+
color: rgba(255, 102, 102, 1);
|
|
265
|
+
background-color: rgba(255, 102, 102, 0.15);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* Event display types */
|
|
269
|
+
.badge-event-square {
|
|
270
|
+
padding: 4px;
|
|
271
|
+
border-radius: 4px;
|
|
272
|
+
border: 0.8px solid rgba(2, 132, 254, 0.5);
|
|
273
|
+
box-shadow:
|
|
274
|
+
0px 20px 6px 0px rgba(0, 0, 0, 0),
|
|
275
|
+
0px 13px 5px 0px rgba(0, 0, 0, 0.02),
|
|
276
|
+
0px 7px 4px 0px rgba(0, 0, 0, 0.08),
|
|
277
|
+
0px 3px 3px 0px rgba(0, 0, 0, 0.14),
|
|
278
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.16);
|
|
279
|
+
font-size: 14px;
|
|
280
|
+
font-weight: 400;
|
|
281
|
+
line-height: 14px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.badge-event-circle {
|
|
285
|
+
padding: 4px;
|
|
286
|
+
border-radius: 9999px;
|
|
287
|
+
font-size: 14px;
|
|
288
|
+
font-weight: 600;
|
|
289
|
+
line-height: 14px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@media only screen and (max-width: 640px) {
|
|
293
|
+
.badge-event-square {
|
|
294
|
+
padding: 2px;
|
|
295
|
+
font-size: 8px;
|
|
296
|
+
line-height: 10px;
|
|
297
|
+
font-weight: 200;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.badge-event-circle {
|
|
301
|
+
padding: 2px;
|
|
302
|
+
font-size: 8px;
|
|
303
|
+
gap: 0px;
|
|
304
|
+
font-weight: 500;
|
|
305
|
+
line-height: 8px;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
182
308
|
</style>
|
|
@@ -2,7 +2,10 @@ export default Badge;
|
|
|
2
2
|
type Badge = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
3
|
size?: string | undefined;
|
|
4
4
|
className?: string | undefined;
|
|
5
|
-
variant?: string | undefined;
|
|
5
|
+
variant?: string | number | undefined;
|
|
6
|
+
event?: string | null | undefined;
|
|
7
|
+
textColor?: string | null | undefined;
|
|
8
|
+
bgColor?: string | null | undefined;
|
|
6
9
|
}, {
|
|
7
10
|
default: {};
|
|
8
11
|
}>, {
|
|
@@ -17,7 +20,10 @@ type Badge = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
|
17
20
|
declare const Badge: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
18
21
|
size?: string | undefined;
|
|
19
22
|
className?: string | undefined;
|
|
20
|
-
variant?: string | undefined;
|
|
23
|
+
variant?: string | number | undefined;
|
|
24
|
+
event?: string | null | undefined;
|
|
25
|
+
textColor?: string | null | undefined;
|
|
26
|
+
bgColor?: string | null | undefined;
|
|
21
27
|
}, {
|
|
22
28
|
default: {};
|
|
23
29
|
}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Badges/Badge.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Badges/Badge.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AA2JA;;;;;;;;;;;;;;;eAAqL;sCAT/I,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"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { createEventDispatcher } from "svelte";
|
|
3
|
-
import
|
|
3
|
+
import ArrowRight from "../Icons/ArrowRight.svelte";
|
|
4
|
+
import Home from "../Icons/Home.svelte";
|
|
4
5
|
|
|
6
|
+
/** @type {Array<{name: string, href: string}>} */
|
|
5
7
|
export let data = [];
|
|
8
|
+
/** @type {string} Additional CSS classes */
|
|
9
|
+
export let className = "";
|
|
10
|
+
/** @type {boolean} Show built-in home icon for first item */
|
|
11
|
+
export let showHomeIcon = true;
|
|
12
|
+
/** @type {string} Page title displayed below breadcrumb */
|
|
13
|
+
export let title = "";
|
|
14
|
+
/** @type {string} Subtitle displayed below title */
|
|
15
|
+
export let subtitle = "";
|
|
6
16
|
|
|
7
17
|
const dispatch = createEventDispatcher();
|
|
8
18
|
|
|
@@ -11,40 +21,59 @@
|
|
|
11
21
|
}
|
|
12
22
|
</script>
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<span class="text-Text-Tartiary cursor-default">{crumb.name}</span>
|
|
34
|
-
{:else}
|
|
35
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
36
|
-
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
37
|
-
<span class="text-Text-Secondary no-underline cursor-pointer">
|
|
38
|
-
<a
|
|
39
|
-
href={crumb.href}
|
|
40
|
-
on:click={() => handleClick(crumb)}
|
|
41
|
-
class="hover:no-underline"
|
|
24
|
+
<div class="flex flex-col gap-4">
|
|
25
|
+
{#if data.length > 0}
|
|
26
|
+
<nav class="inline-flex lg:ml-6 text-sm leading-[14px] font-medium flex-wrap gap-1 {className}">
|
|
27
|
+
{#each data as crumb, index}
|
|
28
|
+
<div class="flex items-center gap-2">
|
|
29
|
+
{#if index > 0}
|
|
30
|
+
<div class="pl-1 text-text-secondary">
|
|
31
|
+
<ArrowRight size="12" />
|
|
32
|
+
</div>
|
|
33
|
+
{/if}
|
|
34
|
+
{#if index === 0 && showHomeIcon}
|
|
35
|
+
<span class="text-text-primary">
|
|
36
|
+
<Home size="12" />
|
|
37
|
+
</span>
|
|
38
|
+
{/if}
|
|
39
|
+
{#if index === data.length - 1}
|
|
40
|
+
<span
|
|
41
|
+
class="text-text-primary cursor-default max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap"
|
|
42
|
+
title={crumb.name}
|
|
42
43
|
>
|
|
43
44
|
{crumb.name}
|
|
44
|
-
</
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
45
|
+
</span>
|
|
46
|
+
{:else}
|
|
47
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
48
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
49
|
+
<span
|
|
50
|
+
class="text-text-secondary no-underline cursor-pointer max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap"
|
|
51
|
+
title={crumb.name}
|
|
52
|
+
>
|
|
53
|
+
<a
|
|
54
|
+
href={crumb.href}
|
|
55
|
+
on:click={() => handleClick(crumb)}
|
|
56
|
+
class="hover:no-underline"
|
|
57
|
+
>
|
|
58
|
+
{crumb.name}
|
|
59
|
+
</a>
|
|
60
|
+
</span>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
63
|
+
{/each}
|
|
64
|
+
</nav>
|
|
65
|
+
{/if}
|
|
66
|
+
|
|
67
|
+
{#if title || subtitle}
|
|
68
|
+
<div class="pl-1 mb-2 md:pl-6 flex flex-col gap-1">
|
|
69
|
+
{#if title}
|
|
70
|
+
<h1 class="text-[32px] font-semibold text-text-primary text-start">
|
|
71
|
+
{title}
|
|
72
|
+
</h1>
|
|
73
|
+
{/if}
|
|
74
|
+
{#if subtitle}
|
|
75
|
+
<p class="text-sm text-text-secondary">{subtitle}</p>
|
|
76
|
+
{/if}
|
|
77
|
+
</div>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export default Breadcrumb;
|
|
2
2
|
type Breadcrumb = SvelteComponent<{
|
|
3
|
-
|
|
3
|
+
title?: string | undefined;
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
data?: {
|
|
6
|
+
name: string;
|
|
7
|
+
href: string;
|
|
8
|
+
}[] | undefined;
|
|
9
|
+
showHomeIcon?: boolean | undefined;
|
|
10
|
+
subtitle?: string | undefined;
|
|
4
11
|
}, {
|
|
5
12
|
click: CustomEvent<any>;
|
|
6
13
|
} & {
|
|
@@ -9,7 +16,14 @@ type Breadcrumb = SvelteComponent<{
|
|
|
9
16
|
$$bindings?: string | undefined;
|
|
10
17
|
};
|
|
11
18
|
declare const Breadcrumb: $$__sveltets_2_IsomorphicComponent<{
|
|
12
|
-
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
data?: {
|
|
22
|
+
name: string;
|
|
23
|
+
href: string;
|
|
24
|
+
}[] | undefined;
|
|
25
|
+
showHomeIcon?: boolean | undefined;
|
|
26
|
+
subtitle?: string | undefined;
|
|
13
27
|
}, {
|
|
14
28
|
click: CustomEvent<any>;
|
|
15
29
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Breadcrumb/Breadcrumb.svelte.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Breadcrumb/Breadcrumb.svelte.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA6FA;;;;cAdwB,MAAM;cAAQ,MAAM;;;;;;;;mBAckI;6CATjI,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"}
|