sveltekit-ui 1.1.16 → 1.1.18
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/index.svelte +88 -0
- package/dist/Components/Alert/index.svelte.js +101 -0
- package/dist/Components/Audio/index.svelte +193 -0
- package/dist/Components/Audio/index.svelte.js +463 -0
- package/dist/Components/AuthCodeInput/index.svelte +85 -0
- package/dist/Components/AuthCodeInput/index.svelte.js +95 -0
- package/dist/Components/Button/index.svelte +721 -0
- package/dist/Components/Button/index.svelte.js +375 -0
- package/dist/Components/Checkbox/index.svelte +411 -0
- package/dist/Components/Checkbox/index.svelte.js +178 -0
- package/dist/Components/Code/index.svelte +23 -0
- package/dist/Components/Code/index.svelte.js +33 -0
- package/dist/Components/EmailAddress/index.svelte +22 -0
- package/dist/Components/EmailAddress/index.svelte.js +45 -0
- package/dist/Components/Eye/index.svelte +57 -0
- package/dist/Components/Icon/index.svelte +412 -0
- package/dist/Components/Icon/index.svelte.js +116 -0
- package/dist/Components/InfoBox/index.svelte +89 -0
- package/dist/Components/Json/index.svelte +60 -0
- package/dist/Components/Json/index.svelte.js +594 -0
- package/dist/Components/Link/index.svelte +47 -0
- package/dist/Components/Link/index.svelte.js +136 -0
- package/dist/Components/LoadingSuccessDiv/index.svelte +51 -0
- package/dist/Components/Location/index.svelte +79 -0
- package/dist/Components/Location/index.svelte.js +288 -0
- package/dist/Components/PhoneNumber/index.svelte +22 -0
- package/dist/Components/PhoneNumber/index.svelte.js +41 -0
- package/dist/Components/Qr/index.svelte +85 -0
- package/dist/Components/Qr/index.svelte.js +301 -0
- package/dist/Components/QrInput/index.svelte +47 -0
- package/dist/Components/QrInput/index.svelte.js +218 -0
- package/dist/Components/Slider/index.svelte +239 -0
- package/dist/Components/Slider/index.svelte.js +469 -0
- package/dist/Components/SuccessCheck/index.svelte +56 -0
- package/dist/Components/TableAdvanced/index.svelte +275 -0
- package/dist/Components/TableAdvanced/index.svelte.js +1565 -0
- package/dist/Components/TextInput/index.svelte +223 -0
- package/dist/Components/TextInput/index.svelte.js +447 -0
- package/dist/Components/Time/index.svelte +7 -0
- package/dist/Components/Time/index.svelte.js +38 -0
- package/dist/Components/VideoTBD/index.svelte +100 -0
- package/dist/Components/XPost/index.svelte +52 -0
- package/dist/Components/XPost/index.svelte.js +64 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
let { is_eye_shown = false, is_bind_val = false, eye_color = "var(--g6-t)", sw = 30, on_change } = $props()
|
|
3
|
+
|
|
4
|
+
function handle_click(change_to) {
|
|
5
|
+
if (is_bind_val) {
|
|
6
|
+
is_eye_shown = change_to
|
|
7
|
+
}
|
|
8
|
+
on_change(change_to)
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
class="icon_frame"
|
|
14
|
+
role="button"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
onclick={() => handle_click(!is_eye_shown)}
|
|
17
|
+
onkeydown={(event) => {
|
|
18
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
19
|
+
handle_click(!is_eye_shown)
|
|
20
|
+
}
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
{#if is_eye_shown}
|
|
24
|
+
<svg id="eye" class="svg_cover" data-name="eye" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 350">
|
|
25
|
+
<g fill="none" stroke={eye_color} stroke-width={sw}>
|
|
26
|
+
<path
|
|
27
|
+
d="M120.2-2.8h58.2a248 248 0 01248 248v58.3a34.6 34.6 0 01-34.6 34.6h-58.2A248 248 0 0185.6 90V31.9a34.6 34.6 0 0134.6-34.7z"
|
|
28
|
+
transform="rotate(-45 256 167.7)"
|
|
29
|
+
/>
|
|
30
|
+
<circle cx="256" cy="167.7" r="78.8" />
|
|
31
|
+
</g>
|
|
32
|
+
</svg>
|
|
33
|
+
{:else}
|
|
34
|
+
<svg id="eyenot" class="svg_cover" data-name="eyenot" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 350">
|
|
35
|
+
<g fill="none" stroke={eye_color} stroke-width={sw}>
|
|
36
|
+
<path
|
|
37
|
+
d="M336.3 292.6a248 248 0 01-255.7-59.3l-41.2-41.1a34.7 34.7 0 010-49L80.6 102a249.1 249.1 0 0135.6-29.6M182.6 139a78.8 78.8 0 00102.2 102M329.4 196.4A78.8 78.8 0 00227.3 94.3"
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
d="M175.7 42.7A248 248 0 01431.4 102l41.2 41.1a34.7 34.7 0 010 49l-41.2 41.2a249 249 0 01-35.6 29.6M115.6 27.3l280.8 280.8"
|
|
41
|
+
/>
|
|
42
|
+
</g>
|
|
43
|
+
</svg>
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.icon_frame {
|
|
49
|
+
width: 2rem;
|
|
50
|
+
height: 2rem;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
54
|
+
.svg_cover {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
let { manager } = $props()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div
|
|
6
|
+
id={`id_${manager?.id}`}
|
|
7
|
+
class="container"
|
|
8
|
+
class:shimmy={(manager?.is_shimmying || manager?.is_shimmy_infinite) && manager?.is_shimmyable}
|
|
9
|
+
>
|
|
10
|
+
<svg
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
viewBox="0 0 512 512"
|
|
13
|
+
class="icon"
|
|
14
|
+
style="transform: rotate({manager?.deg_spring}deg); --size: {manager?.size}rem; margin-left: {manager?.ml}rem; margin-right: {manager?.mr}rem; margin-top: {manager?.mt}rem; margin-bottom: {manager?.mb}rem;"
|
|
15
|
+
stroke-linecap="round"
|
|
16
|
+
stroke-linejoin="round"
|
|
17
|
+
fill={manager?.fill}
|
|
18
|
+
stroke={manager?.color}
|
|
19
|
+
stroke-width={manager?.sw}
|
|
20
|
+
>
|
|
21
|
+
{#if manager?.icon_id === "arrow"}
|
|
22
|
+
<path d="m62 337 194-194 194 194" />
|
|
23
|
+
{:else if manager?.icon_id === "arrow_tailed"}
|
|
24
|
+
<path d="M256 45.4 466.4 256 256 466.3" />
|
|
25
|
+
<path d="M466.4 255.9H45.6" />
|
|
26
|
+
{:else if manager?.icon_id === "calendar"}
|
|
27
|
+
<rect x="69.83" y="106.26" width="372.34" height="328.85" rx="47.86" />
|
|
28
|
+
<path d="M442.17 184.48H69.83" />
|
|
29
|
+
<path d="M217.82 135.64V76.88M141.45 135.64V76.88M294.18 135.64V76.88M370.55 135.64V76.88" />
|
|
30
|
+
<g fill={manager?.color}>
|
|
31
|
+
<rect x="362.8" y="237.28" width="15.5" height="15.5" rx="4.29" />
|
|
32
|
+
<rect x="286.43" y="237.28" width="15.5" height="15.5" rx="4.29" />
|
|
33
|
+
<rect x="211.66" y="237.28" width="15.5" height="15.5" rx="4.29" />
|
|
34
|
+
<rect x="286.43" y="299.93" width="15.5" height="15.5" rx="4.29" />
|
|
35
|
+
<rect x="133.7" y="363.92" width="15.5" height="15.5" rx="4.29" />
|
|
36
|
+
<rect x="211.66" y="363.92" width="15.5" height="15.5" rx="4.29" />
|
|
37
|
+
<rect x="133.7" y="299.93" width="15.5" height="15.5" rx="4.29" />
|
|
38
|
+
<rect x="211.66" y="299.93" width="15.5" height="15.5" rx="4.29" />
|
|
39
|
+
<rect x="362.8" y="299.93" width="15.5" height="15.5" rx="4.29" />
|
|
40
|
+
<rect x="286.43" y="363.92" width="15.5" height="15.5" rx="4.29" />
|
|
41
|
+
</g>
|
|
42
|
+
{:else if manager?.icon_id === "magnifying_glass"}
|
|
43
|
+
<g transform="rotate(-45 232.577 208.216)" stroke-linecap="round" stroke-linejoin="round">
|
|
44
|
+
<circle transform="matrix(.97157 0 0 .97157 215.351 204)" r="158.234" />
|
|
45
|
+
<path d="M215.351 357.736v161.807" />
|
|
46
|
+
</g>
|
|
47
|
+
{:else if manager?.icon_id === "chart"}
|
|
48
|
+
<path d="M76 89v344h355" />
|
|
49
|
+
<path d="m144 251 35 98 69-164 78 125 89-205" />
|
|
50
|
+
{:else if manager?.icon_id === "row_item"}
|
|
51
|
+
<rect x="42" y="154" width="422.2" height="203.6" rx="58" />
|
|
52
|
+
<path d="M53 71h401M53 442h401" />
|
|
53
|
+
{:else if manager?.icon_id === "chart_group"}
|
|
54
|
+
<path d="M114 120v106h109" />
|
|
55
|
+
<rect x="43" y="45" width="422.2" height="422.2" rx="58" />
|
|
56
|
+
<path d="m295 120-1 106h109M114 286v106h109M295 286l-1 106h109" />
|
|
57
|
+
{:else if manager?.icon_id === "check"}
|
|
58
|
+
<path d="M432.4 116.9L177.5 371.7l-104-104" />
|
|
59
|
+
{:else if manager?.icon_id === "copy"}
|
|
60
|
+
<rect x="85.2" y="144" width="258.1" height="297.4" rx="12" />
|
|
61
|
+
<path
|
|
62
|
+
d="M146.7 212.2h135M146.7 292.7h135M146.7 373.3h135M426.8 82.5V356a12 12 0 01-12 12h-71.5V156a12 12 0 00-12-12H168.7V82.5a12 12 0 0112-12h234.1a12 12 0 0112 12z"
|
|
63
|
+
/>
|
|
64
|
+
{:else if manager?.icon_id === "drag_grip"}
|
|
65
|
+
<path d="M97 97h0M97 415h0M415 97h0M415 415h0" />
|
|
66
|
+
<path d="M256 97h0" />
|
|
67
|
+
<path d="M256 415h0M415 256h0M97 256h0" />
|
|
68
|
+
<path d="M256 256h0" />
|
|
69
|
+
{:else if manager?.icon_id === "edit"}
|
|
70
|
+
<path d="M390.4 251.4v129.1a40 40 0 01-40 40H133.6a40 40 0 01-40-40V164a40 40 0 0140-40h124.6" />
|
|
71
|
+
<path
|
|
72
|
+
d="M188.6 305l18.3-37.7a10.8 10.8 0 012.1-3l170-170c5-5 14-4.3 20 1.7l19.4 19.4c6 6 6.7 14.9 1.7 20l-170 170a10.8 10.8 0 01-3 2.1l-37.7 18.3c-11.9 5.7-26.6-9-20.8-20.8z"
|
|
73
|
+
/>
|
|
74
|
+
{:else if manager?.icon_id === "link"}
|
|
75
|
+
<path d="M390 251v130a40 40 0 0 1-40 40H134a40 40 0 0 1-40-40V164a40 40 0 0 1 40-40h124" />
|
|
76
|
+
<path d="M189 325 429 86H325h104v103" />
|
|
77
|
+
{:else if manager?.icon_id === "link_internal"}
|
|
78
|
+
<path d="M390 251v130a40 40 0 0 1-40 40H134a40 40 0 0 1-40-40V164a40 40 0 0 1 40-40h124" />
|
|
79
|
+
<path d="M400 115 189 325V222v103h103" />
|
|
80
|
+
{:else if manager?.icon_id === "list"}
|
|
81
|
+
<path d="M196.6 120.5h248M67.7 120.5H118M196.2 256h248.1M67.4 256h50.3M196.2 391.5h248.1M67.4 391.5h50.3" />
|
|
82
|
+
{:else if manager?.icon_id === "minus"}
|
|
83
|
+
<path d="M62 256h388" />
|
|
84
|
+
{:else if manager?.icon_id === "plus"}
|
|
85
|
+
<path d="M256 62v388M62 256h388" />
|
|
86
|
+
{:else if manager?.icon_id === "rotate"}
|
|
87
|
+
<path d="M256 309c-94 0-171-38-171-85s77-84 171-84 171 37 171 84c0 31-33 58-82 73" />
|
|
88
|
+
<path d="m226 249 30 60-30 63" />
|
|
89
|
+
{:else if manager?.icon_id === "refresh"}
|
|
90
|
+
<path d="M391 69v100H291M121 443V343h100" />
|
|
91
|
+
<path d="M98 232a160 160 0 0 1 292-64M122 344a160 160 0 0 0 292-64" />
|
|
92
|
+
{:else if manager?.icon_id === "sort"}
|
|
93
|
+
<path
|
|
94
|
+
style:stroke={manager?.sort_state == "asc" ? manager?.alt_color : manager?.color}
|
|
95
|
+
d="M177.53,71.36V431.2l-104-104"
|
|
96
|
+
/>
|
|
97
|
+
<path
|
|
98
|
+
style:stroke={manager?.sort_state == "desc" ? manager?.alt_color : manager?.color}
|
|
99
|
+
d="M334.47,431.2V71.36l104,104"
|
|
100
|
+
/>
|
|
101
|
+
{:else if manager?.icon_id === "table"}
|
|
102
|
+
<rect x="70" y="86" width="372.3" height="339.5" rx="47.9" />
|
|
103
|
+
<path d="M442 175H70M442 289H70M256 175v251" />
|
|
104
|
+
{:else if manager?.icon_id === "trashcan"}
|
|
105
|
+
<path d="m382 187-12 221c0 19-19 34-42 34H184c-23 0-42-15-42-34l-12-221Z" />
|
|
106
|
+
<path
|
|
107
|
+
d="M417 164v5a18 18 0 0 1-19 18H114a18 18 0 0 1-19-18v-5a42 42 0 0 1 42-42h238a42 42 0 0 1 42 42ZM256 239v149M318 239l-6 149M194 239l7 149M338 111v11H174v-11a42 42 0 0 1 41-41h82a42 42 0 0 1 41 41Z"
|
|
108
|
+
/>
|
|
109
|
+
{:else if manager?.icon_id === "x"}
|
|
110
|
+
<path d="M75 437 437 75M75 75l362 362" />
|
|
111
|
+
{:else if manager?.icon_id === "three_dots"}
|
|
112
|
+
<line x1="256" y1="96" x2="256" y2="96" /><line x1="256" y1="415" x2="256" y2="415" /><line
|
|
113
|
+
x1="256"
|
|
114
|
+
y1="256"
|
|
115
|
+
x2="256"
|
|
116
|
+
y2="256"
|
|
117
|
+
/>
|
|
118
|
+
{:else if manager?.icon_id === "clock"}
|
|
119
|
+
<circle cx="256" cy="256" r="212.9" />
|
|
120
|
+
<path d="M256 125v131l66.1 66.1" />
|
|
121
|
+
{:else if manager?.icon_id === "sun"}
|
|
122
|
+
<circle cx="256" cy="256" r="83.3" />
|
|
123
|
+
<path d="M256 52.4V110" />
|
|
124
|
+
<path d="m112 112 40.8 40.8" />
|
|
125
|
+
<path d="M52.4 256H110" />
|
|
126
|
+
<path d="m112 400 40.8-40.8" />
|
|
127
|
+
<path d="M256 459.6v-57.7" />
|
|
128
|
+
<path d="m400 400-40.8-40.8" />
|
|
129
|
+
<path d="M459.6 256h-57.7" />
|
|
130
|
+
<path d="m400 112-40.8 40.8" />
|
|
131
|
+
{:else if manager?.icon_id === "moon"}
|
|
132
|
+
<path d="M425.3 256A189 189 0 0 1 86.7 371.4 189 189 0 0 0 212.2 68.6 189 189 0 0 1 425.4 256Z" />
|
|
133
|
+
{:else if manager?.icon_id === "smile_face"}
|
|
134
|
+
<path d="M432 308a255 255 0 0 1-350 0" />
|
|
135
|
+
<path d="M148 162v-27M365 162v-27M441 317l-19-20M71 317l19-20" />
|
|
136
|
+
{:else if manager?.icon_id === "frown_face"}
|
|
137
|
+
<path d="M148 167v-27M365 167v-27M431 361a255 255 0 0 0-350 0M441 353l-19 19M71 353l19 19" />
|
|
138
|
+
{:else if manager?.icon_id === "nuetral_face"}
|
|
139
|
+
<path d="M148 177v-28M365 177v-28M76 349h361M441 363v-28M71 363v-28" />
|
|
140
|
+
{:else if manager?.icon_id === "curved_arrow"}
|
|
141
|
+
<path d="M90 93c176 46 261 162 259 345" />
|
|
142
|
+
<path d="m242 352 107 87 91-87" />
|
|
143
|
+
{:else if manager?.icon_id === "pointer_hand"}
|
|
144
|
+
<path
|
|
145
|
+
d="m407 235 1 136c0 65-12 92-129 92-86 0-115-16-142-84-25-63-54-104-56-132-1-8 32-94 88 22 0-195-6-221 30-221 37 0 33 26 33 215 0-97-4-118 28-118 28 0 32 24 32 117 0-81 6-87 31-87 23 0 27 15 27 88 0-49 6-55 24-55 20 0 33 19 33 27z"
|
|
146
|
+
/>
|
|
147
|
+
{:else if manager?.icon_id === "touch_circle"}
|
|
148
|
+
<circle cx="256" cy="256" r="200" />
|
|
149
|
+
<circle cx="256" cy="256" r="100" />
|
|
150
|
+
{:else if manager?.icon_id === "profile"}
|
|
151
|
+
<circle cx="256" cy="235" r="89" />
|
|
152
|
+
<path d="M457 256a200 200 0 0 1-201 201 201 201 0 1 1 201-201z" />
|
|
153
|
+
<path d="M405 391a201 201 0 0 1-299-1 201 201 0 0 1 299 1z" />
|
|
154
|
+
{:else if manager?.icon_id === "share"}
|
|
155
|
+
<path
|
|
156
|
+
d="M316 204h63c18 0 32 14 32 31v182c0 17-14 32-32 32H133c-18 0-32-14-32-32V235c0-17 14-31 32-31h63M169 137l87-73 87 73M256 345V64"
|
|
157
|
+
/>
|
|
158
|
+
{:else if manager?.icon_id === "invite"}
|
|
159
|
+
<path d="m72 209 57-48v96zM288 81l65 55H159l65-55c19-15 46-15 64 0zM441 209l-57 48v-96z" />
|
|
160
|
+
<path d="M441 209v204c0 16-14 30-30 30H102c-17 0-30-14-30-30V209l57 48 95 80c18 16 46 16 64 0l96-80 57-48z" />
|
|
161
|
+
<path d="M129 257V136h255v121" />
|
|
162
|
+
{:else if manager?.icon_id === "feedback"}
|
|
163
|
+
<path
|
|
164
|
+
d="M442 117v207c0 11-9 20-21 20H248c-4 0-9 2-12 4l-78 63c-13 11-33 2-33-15v-32c0-11-9-20-20-20H91c-12 0-21-9-21-20V116c1-11 10-20 21-20h330c12 0 21 9 21 21zM150 181h217M150 258h217"
|
|
165
|
+
/>
|
|
166
|
+
{:else if manager?.icon_id === "idea"}
|
|
167
|
+
<path
|
|
168
|
+
d="m121 130-41-24M101 206H53M121 282l-41 23M391 282l41 23M411 206h48M391 130l41-24M347 209c0 17-5 34-13 48-17 27-27 56-31 87l-6 45c-2 12-12 20-23 20h-36c-11 0-21-8-23-20l-6-45c-4-31-15-61-31-88a91 91 0 1 1 169-48zM209 344h94"
|
|
169
|
+
/>
|
|
170
|
+
{:else if manager?.icon_id === "ar_one_to_one"}
|
|
171
|
+
<rect width="360" height="360" x="76" y="78" rx="50" ry="50" />
|
|
172
|
+
{:else if manager?.icon_id === "ar_four_to_three"}
|
|
173
|
+
<rect width="360" height="270" x="76" y="123" rx="50" ry="50" />
|
|
174
|
+
{:else if manager?.icon_id === "ar_three_to_two"}
|
|
175
|
+
<rect width="360" height="238" x="76" y="139" rx="50" ry="50" />
|
|
176
|
+
{:else if manager?.icon_id === "ar_sixteen_to_nine"}
|
|
177
|
+
<rect width="360" height="202" x="76" y="157" rx="50" ry="50" />
|
|
178
|
+
{:else if manager?.icon_id === "crop"}
|
|
179
|
+
<path
|
|
180
|
+
d="M161 236v40M161 337c0 16 8 30 20 39M181 136c-12 9-20 23-20 39M277 126h-40M237 386h40M333 376c12-9 20-23 20-38M353 175c0-16-8-30-20-39M353 276v-40"
|
|
181
|
+
/>
|
|
182
|
+
<rect width="400" height="400" x="57" y="56" rx="50" ry="50" />
|
|
183
|
+
{:else if manager?.icon_id === "resize"}
|
|
184
|
+
<rect width="400" height="400" x="56" y="56" rx="50" ry="50" />
|
|
185
|
+
<path d="M56 230c0-27 22-50 50-50h176c27 0 50 23 50 50v176c0 28-23 50-50 50" />
|
|
186
|
+
{:else if manager?.icon_id === "save"}
|
|
187
|
+
<path
|
|
188
|
+
d="M436 178v230c0 17-13 30-30 30H106c-16 0-30-13-30-30V108c0-16 14-30 30-30h231c8 0 15 4 21 9l70 70c5 5 8 13 8 21Z"
|
|
189
|
+
/>
|
|
190
|
+
<path
|
|
191
|
+
d="M363 312v126H149V312c0-16 14-30 30-30h154c16 0 30 14 30 30ZM300 78v60c0 17-13 30-30 30h-90c-17 0-30-13-30-30V78h150Z"
|
|
192
|
+
/>
|
|
193
|
+
{:else if manager?.icon_id === "folder"}
|
|
194
|
+
<path
|
|
195
|
+
d="M386 392H126c-28 0-50-23-50-50V170c0-27 22-50 50-50h65c12 0 23 4 32 12l19 16c9 8 20 12 32 12h112c28 0 50 23 50 50v132c0 27-22 50-50 50Z"
|
|
196
|
+
/>
|
|
197
|
+
{:else if manager?.icon_id === "file"}
|
|
198
|
+
<path
|
|
199
|
+
d="M394 199v187c0 28-22 50-50 50H168c-28 0-50-22-50-50V126c0-28 22-50 50-50h101v73c0 28 23 50 50 50h75ZM323 283H189M269 76l125 123M323 358H189"
|
|
200
|
+
/>
|
|
201
|
+
{:else if manager?.icon_id === "file_drop"}
|
|
202
|
+
<path d="M394 199v187c0 28-22 50-50 50H168c-28 0-50-22-50-50V126c0-28 22-50 50-50h101v73c0 28 23 50 50 50h75Z" />
|
|
203
|
+
<path d="m188 317 72-73 72 73M260 245v133M269 76l125 123" />
|
|
204
|
+
{:else if manager?.icon_id === "file_dropped"}
|
|
205
|
+
<path
|
|
206
|
+
d="M394 199v187c0 28-22 50-50 50H168c-28 0-50-22-50-50V126c0-28 22-50 50-50h101v73c0 28 23 50 50 50h75ZM269 76l125 123"
|
|
207
|
+
/>
|
|
208
|
+
<path d="m325 253-76 121-58-46" />
|
|
209
|
+
{:else if manager?.icon_id === "file_add"}
|
|
210
|
+
<path
|
|
211
|
+
d="M394 199v187c0 28-22 50-50 50H168c-28 0-50-22-50-50V126c0-28 22-50 50-50h101v73c0 28 23 50 50 50h75ZM269 76l125 123M256 370V261M202 316h109"
|
|
212
|
+
/>
|
|
213
|
+
{:else if manager?.icon_id === "linked"}
|
|
214
|
+
<path d="M280 84h7c43 0 78 36 78 81v77c0 45-35 82-78 82h-7c-43 0-78-37-78-82v-77c0-45 35-81 78-81Z" />
|
|
215
|
+
<path d="M218 204h7c43 0 78 37 78 82v77c0 45-35 81-78 81h-7c-43 0-78-36-78-81v-77c0-45 35-82 78-82Z" />
|
|
216
|
+
{:else if manager?.icon_id === "unlinked"}
|
|
217
|
+
<path d="m201 115 47-1c9-2 16-7 22-13 26-30 68-16 84-8l6 4c37 23 47 72 23 110l-41 65c-24 39-78 41-128 27" />
|
|
218
|
+
<path
|
|
219
|
+
d="m161 206 7-3c39-18 86 0 104 41l32 70c19 41 2 89-37 106l-7 4c-39 17-85-1-104-42l-32-70c-19-41-2-88 37-106h0Z"
|
|
220
|
+
/>
|
|
221
|
+
{:else if manager?.icon_id === "sliders"}
|
|
222
|
+
<path d="M360 176V96M76 256h360M76 376h360M76 136h360M146 296v-80M259 416v-80" />
|
|
223
|
+
{:else if manager?.icon_id === "brain"}
|
|
224
|
+
<path d="M331 400c-49 97-7-89-85-53-51 23-80-43-126-57-134-54 71-257 181-194 175 62 174 209 30 304h0Z" />
|
|
225
|
+
{:else if manager?.icon_id === "brush"}
|
|
226
|
+
<path
|
|
227
|
+
d="m432 305-24 137-174-10-13-62c-3-11-19-13-24-2l-27 60-93-6 77-180 1-1 9-27c9-25 36-39 60-30l55 18 38-113c5-15 22-23 37-18l15 5c15 6 23 22 18 37l-39 113 55 18c25 9 38 36 29 61ZM427 333l-272-91"
|
|
228
|
+
/>
|
|
229
|
+
{:else if manager?.icon_id === "redo_arrow"}
|
|
230
|
+
<path d="M390 222a151 151 0 0 1-174 218 152 152 0 1 1 80-293" />
|
|
231
|
+
<path d="m217 67 80 80-80 80" />
|
|
232
|
+
{:else if manager?.icon_id === "undo_arrow"}
|
|
233
|
+
<path d="M122 222a151 151 0 0 0 174 218 152 152 0 1 0-80-293" />
|
|
234
|
+
<path d="m295 67-80 80 80 80" />
|
|
235
|
+
{:else if manager?.icon_id === "opposing_arrows"}
|
|
236
|
+
<path d="M138 194 256 76l118 118M374 318 256 436 138 318M256 436V76" />
|
|
237
|
+
{:else if manager?.icon_id === "photo"}
|
|
238
|
+
<rect width="360" height="360" x="76" y="76" rx="50" ry="50" />
|
|
239
|
+
<path d="m76 367 131-119 78 102 55-46 96 81" />
|
|
240
|
+
<circle cx="325.6" cy="187.8" r="40" />
|
|
241
|
+
{:else if manager?.icon_id === "send"}
|
|
242
|
+
<path
|
|
243
|
+
d="m404 131-81 242c-5 15-26 16-33 1l-45-98c-2-4-5-7-9-9l-93-43c-17-7-15-31 2-37l236-79c14-4 27 9 23 23ZM130 382l68-67M101 317l32-32M195 411l32-32M241 271l45-45"
|
|
244
|
+
/>
|
|
245
|
+
{:else if manager?.icon_id === "clipboard"}
|
|
246
|
+
<path d="M334 120h62v316H116V120h62" />
|
|
247
|
+
<path d="M178 76h157v88H178z" />
|
|
248
|
+
{:else if manager?.icon_id === "download"}
|
|
249
|
+
<path d="M254 76v218M356 369h22M357 302h79v134H76V302h75M170 210l84 84 84-84" />
|
|
250
|
+
{:else if manager?.icon_id === "heart"}
|
|
251
|
+
<path
|
|
252
|
+
d="M436 192c0 23-9 46-26 63l-28 28-126 126-125-126-29-28a88 88 0 0 1 0-126c35-34 91-34 126 0l28 29 28-29a89 89 0 0 1 152 63Z"
|
|
253
|
+
/>
|
|
254
|
+
{:else if manager?.icon_id === "star"}
|
|
255
|
+
<path d="m357 307 10 120-111-47-111 47 10-120-79-91 118-28 62-103 62 103 118 28-79 91z" />
|
|
256
|
+
{:else if manager?.icon_id === "search"}
|
|
257
|
+
<circle cx="220.6" cy="220.6" r="144.6" />
|
|
258
|
+
<path d="M436 436 323 323" />
|
|
259
|
+
{:else if manager?.icon_id === "bolt"}
|
|
260
|
+
<path d="m370 349-125 53-114 48 77-176 19-44-85-39 125-53 114-48-77 176-19 44 85 39z" />
|
|
261
|
+
{:else if manager?.icon_id === "branch"}
|
|
262
|
+
<rect width="82.3" height="88" x="105" y="83" rx="20.1" ry="20.1" />
|
|
263
|
+
<path d="M405 151c0 11-9 20-20 20h-42c-11 0-20-9-20-20v-48c0-11 9-20 20-20h42c11 0 20 9 20 20v48Z" />
|
|
264
|
+
<rect width="82.3" height="88" x="105" y="355" rx="20.1" ry="20.1" />
|
|
265
|
+
<path d="M146 355V171M146 355c0-87 73-83 116-92 37-8 102-22 102-92" />
|
|
266
|
+
{:else if manager?.icon_id === "code"}
|
|
267
|
+
<path
|
|
268
|
+
d="m356 153 47 47 24 23c12 12 12 32 0 44l-24 23-24 24-22 22h-1M156 153l-47 47-24 23a31 31 0 0 0 0 44l24 23 24 24 22 22h1M220 396l72-280"
|
|
269
|
+
/>
|
|
270
|
+
{:else if manager?.icon_id === "comment"}
|
|
271
|
+
<path
|
|
272
|
+
d="M436 242c0 76-81 137-180 137-27 0-53-5-76-13-13-5-94 40-94 40-12-7 33-74 24-84-21-22-34-50-34-80 0-75 81-136 180-136s180 61 180 136Z"
|
|
273
|
+
/>
|
|
274
|
+
{:else if manager?.icon_id === "gear"}
|
|
275
|
+
<path
|
|
276
|
+
d="m388 285 31 25c8 7 9 17 5 26l-15 25c-5 9-15 12-25 9l-37-14c-7-3-14-2-19 2-6 5-13 8-19 11s-11 9-12 15l-7 40c-1 10-10 17-19 17h-30c-9 0-18-7-19-17l-7-40c-1-6-6-12-12-15s-13-6-19-11c-5-4-12-5-19-2l-37 14c-10 3-20 0-25-9l-15-25c-4-9-3-19 5-26l31-25c5-5 8-11 7-18v-22c1-7-2-13-7-18l-31-25c-8-7-9-17-5-26l15-25c5-9 15-12 25-9l37 14c7 3 14 2 19-2 6-5 13-8 19-11s11-9 12-15l7-40c1-10 10-17 19-17h30c9 0 18 7 19 17l7 40c1 6 6 12 12 15s13 6 19 11c5 4 12 5 19 2l37-14c10-3 20 0 25 9l15 25c4 9 3 19-5 26l-31 25c-5 5-8 11-7 18v22c-1 7 2 13 7 18Z"
|
|
277
|
+
/>
|
|
278
|
+
<circle cx="256" cy="256" r="53.1" />
|
|
279
|
+
{:else if manager?.icon_id === "house"}
|
|
280
|
+
<path d="M386 205v211h-84V294h-92v122h-84V205L256 96l130 109zM76 248l50-42M386 206l50 42" />
|
|
281
|
+
<path d="M210 294h92v122h-92z" />
|
|
282
|
+
{:else if manager?.icon_id === "unlocked"}
|
|
283
|
+
<path d="M76 242h360v194H76zM146 242v-59c0-59 49-107 110-107a111 111 0 0 1 99 59" />
|
|
284
|
+
<path d="M201 339h110" />
|
|
285
|
+
{:else if manager?.icon_id === "locked"}
|
|
286
|
+
<path d="M76 242h360v194H76zM366 183v59H146v-59c0-59 49-107 110-107 30 0 58 12 78 31 20 20 32 46 32 76Z" />
|
|
287
|
+
<path d="M201 339h110" />
|
|
288
|
+
{:else if manager?.icon_id === "tag"}
|
|
289
|
+
<path
|
|
290
|
+
d="M401 218c19 19 19 51 0 70l-37 38-39 39-36 35a50 50 0 0 1-70 0l-36-35-92-93c-10-9-15-22-15-35V126c0-28 22-50 50-50h113c13 0 26 5 35 15l90 89 37 38Z"
|
|
291
|
+
/>
|
|
292
|
+
<circle cx="175.7" cy="173.4" r="10" />
|
|
293
|
+
{:else if manager?.icon_id === "play"}
|
|
294
|
+
<path d="m98 82 316 168L98 418V82z" />
|
|
295
|
+
{:else if manager?.icon_id === "pause"}
|
|
296
|
+
<path d="M155 427V72M375 427V72" />
|
|
297
|
+
{:else if manager?.icon_id === "volume"}
|
|
298
|
+
<path d="M357 72c98 99 98 257 0 356" />
|
|
299
|
+
<path d="M303 135c63 64 63 166 0 230M244 113v265l-63-57H81V155h91l72-42z" />
|
|
300
|
+
{:else if manager?.icon_id === "speech"}
|
|
301
|
+
<path d="m185 386-16-46 8-46-90-16 90-56-12-52 55-5-71-94M353 121c96 85 96 222 0 307" />
|
|
302
|
+
<path d="M300 176c62 54 62 143 0 197M246 225c42 28 42 74 0 102" />
|
|
303
|
+
{:else if manager?.icon_id === "warning"}
|
|
304
|
+
<path d="M44.6 409.331 256 80.204l211.4 329.127H44.6ZM256 240.996V297" />
|
|
305
|
+
<path d="M256 352.541q0 0 0 0h0Z" />
|
|
306
|
+
{:else if manager?.icon_id === "reply"}
|
|
307
|
+
<path
|
|
308
|
+
d="M202.041 99.202c19.527-19.526 51.185-19.526 70.711 0v56.036c93.593 4.223 149.98 29.672 149.98 239.065-29.622-72.545-139.391-87.43-149.98-76.841v64.583c-19.526 19.526-51.184 19.526-70.71 0L95.974 275.979c-19.526-19.526-19.526-51.184 0-70.71L202.041 99.201Z"
|
|
309
|
+
/>
|
|
310
|
+
{:else if manager?.icon_id === "reply_all"}
|
|
311
|
+
<path
|
|
312
|
+
d="m240 99 1-1a50 50 0 0 0-69 1L66 205a50 50 0 0 0 0 71l106 106c19 19 50 20 69 2l-1-2-106-106a50 50 0 0 1 0-71L240 99Zm3 0-2-1c20-18 50-18 69 1h0v56c94 4 150 30 150 239-29-72-139-87-150-77v65a50 50 0 0 1-69 2l2-2"
|
|
313
|
+
/>
|
|
314
|
+
{:else if manager?.icon_id === "forward"}
|
|
315
|
+
<path
|
|
316
|
+
d="M309.959 99.202c-19.527-19.526-51.185-19.526-70.711 0v56.036c-93.593 4.223-149.98 29.672-149.98 239.065 29.622-72.545 139.391-87.43 149.98-76.841v64.583c19.526 19.526 51.184 19.526 70.71 0l105.357-105.066c19.526-19.526 19.526-51.184 0-70.71L309.959 99.201Z"
|
|
317
|
+
/>
|
|
318
|
+
{:else if manager?.icon_id === "mail"}
|
|
319
|
+
<path
|
|
320
|
+
d="M441.8 388.6a46.5 46.5 0 0 1-36.5 18.9H106.7a46.5 46.5 0 0 1-36.5-18.9m-13.5-41V171c0-12.7 3.3-24.6 9-34.3L194 265 70.2 388.6a66.3 66.3 0 0 1-13.5-41ZM194 265 218 289c21 21 55.5 20.3 77.2-1.4L318 265m128.3-128.3c5.7 9.7 9 21.6 9 34.3v176.8c0 15.8-5.1 30.2-13.5 40.9L318 264.9l128.3-128.3Zm.2-.2-.2.2c-9-15.4-24-25.5-41-25.5H106.7c-17 0-32 10.1-41 25.5h0"
|
|
321
|
+
/>
|
|
322
|
+
{:else if manager?.icon_id === "mail_opened"}
|
|
323
|
+
<g>
|
|
324
|
+
<path
|
|
325
|
+
d="M441.8 388.6a46.5 46.5 0 0 1-36.5 18.9H106.7a46.5 46.5 0 0 1-36.5-18.9m-13.5-41V171c0-12.7 3.3-24.6 9-34.3L194 265 70.2 388.6a66.3 66.3 0 0 1-13.5-41ZM194 265 218 289c21 21 55.5 20.3 77.2-1.4L318 265m128.3-128.3c5.7 9.7 9 21.6 9 34.3v176.8c0 15.8-5.1 30.2-13.5 40.9L318 264.9l128.3-128.3Zm.2-.2-.2.2"
|
|
326
|
+
transform="matrix(.7899 0 0 .7899 53.8 106.9)"
|
|
327
|
+
/>
|
|
328
|
+
<path
|
|
329
|
+
d="M81.2 151.5 194 265m0 0L218 289c21 21 55.5 20.3 77.2-1.4L318 265m0 0 113-113.6"
|
|
330
|
+
transform="matrix(-.85937 0 0 -.85937 476.1 344.8)"
|
|
331
|
+
/>
|
|
332
|
+
</g>
|
|
333
|
+
{:else if manager?.icon_id === "mail_received"}
|
|
334
|
+
<path
|
|
335
|
+
d="M441.8 388.6a46.5 46.5 0 0 1-36.5 18.9H106.7a46.5 46.5 0 0 1-36.5-18.9m-13.5-41V171c0-12.7 3.3-24.6 9-34.3L194 265 70.2 388.6a66.3 66.3 0 0 1-13.5-41ZM194 265 218 289c21 21 55.5 20.3 77.2-1.4L318 265m128.3-128.3c5.7 9.7 9 21.6 9 34.3v176.8c0 15.8-5.1 30.2-13.5 40.9L318 264.9l128.3-128.3Zm.2-.2-.2.2c-9-15.4-24-25.5-41-25.5H106.7c-17 0-32 10.1-41 25.5v0"
|
|
336
|
+
transform="matrix(.7928 0 0 .79282 101 128.7)"
|
|
337
|
+
/>
|
|
338
|
+
<path d="m263.7 86.4 50.5 68.2M70.6 100.6l44.6 54M146 59.8l74 94.8" />
|
|
339
|
+
{:else if manager?.icon_id === "mail_sent"}
|
|
340
|
+
<path
|
|
341
|
+
d="M441.8 388.6a46.5 46.5 0 0 1-36.5 18.9H106.7a46.5 46.5 0 0 1-36.5-18.9m-13.5-41V171c0-12.7 3.3-24.6 9-34.3L194 265 70.2 388.6a66.3 66.3 0 0 1-13.5-41ZM194 265 218 289c21 21 55.5 20.3 77.2-1.4L318 265m128.3-128.3c5.7 9.7 9 21.6 9 34.3v176.8c0 15.8-5.1 30.2-13.5 40.9L318 264.9l128.3-128.3Zm.2-.2-.2.2c-9-15.4-24-25.5-41-25.5H106.7c-17 0-32 10.1-41 25.5v0"
|
|
342
|
+
transform="matrix(.7928 0 0 .79282 90.9 -20.1)"
|
|
343
|
+
/>
|
|
344
|
+
<path d="M306.5 357 256 425.2M109.8 356.6l-44.7 54M209.8 357l-74 94.8" />
|
|
345
|
+
{:else if manager?.icon_id === "mail_sent_opened"}
|
|
346
|
+
<g>
|
|
347
|
+
<path
|
|
348
|
+
d="M441.8 388.6a46.5 46.5 0 0 1-36.5 18.9H106.7a46.5 46.5 0 0 1-36.5-18.9m-13.5-41V171c0-12.7 3.3-24.6 9-34.3L194 265 70.2 388.6a66.3 66.3 0 0 1-13.5-41ZM194 265 218 289c21 21 55.5 20.3 77.2-1.4L318 265m128.3-128.3c5.7 9.7 9 21.6 9 34.3v176.8c0 15.8-5.1 30.2-13.5 40.9L318 264.9l128.3-128.3Zm.2-.2-.2.2"
|
|
349
|
+
transform="translate(144.1 67.6) scale(.62674)"
|
|
350
|
+
/>
|
|
351
|
+
<path
|
|
352
|
+
d="M81.2 151.5 194 265m0 0L218 289c21 21 55.5 20.3 77.2-1.4L318 265m0 0 113-113.6"
|
|
353
|
+
transform="matrix(-.68186 0 0 -.68185 479.2 256.4)"
|
|
354
|
+
/>
|
|
355
|
+
</g>
|
|
356
|
+
<path d="m322.8 387.5-36.5 49.4M126.7 387.5l-30 34.8M232.3 387.5l-66.2 76" />
|
|
357
|
+
{:else if manager?.icon_id === "pinpoint"}
|
|
358
|
+
<path d="M142.6 166a113.4 113.4 0 0 1 226.8 0c0 62.7-69.6 218.5-113.4 218.5-43.3 0-113.4-155.8-113.4-218.4Z" />
|
|
359
|
+
<path d="M96 332.3 66 458h416.5l-29.9-125.6" />
|
|
360
|
+
{:else if manager?.icon_id === "paperclip"}
|
|
361
|
+
<path
|
|
362
|
+
d="M209 154.6v190.2c0 58.4 89.5 58.5 89.5 0V112.2c0-89.4-146-85.6-146 0V376c0 110.1 200.7 110.1 200.7 0V154.6"
|
|
363
|
+
/>
|
|
364
|
+
{/if}
|
|
365
|
+
</svg>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<style>
|
|
369
|
+
.container {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex: 0;
|
|
372
|
+
}
|
|
373
|
+
.icon {
|
|
374
|
+
width: var(--size);
|
|
375
|
+
height: var(--size);
|
|
376
|
+
display: flex;
|
|
377
|
+
}
|
|
378
|
+
@keyframes shimmy {
|
|
379
|
+
0% {
|
|
380
|
+
transform: rotate(0deg);
|
|
381
|
+
}
|
|
382
|
+
8% {
|
|
383
|
+
transform: rotate(-15deg);
|
|
384
|
+
}
|
|
385
|
+
16% {
|
|
386
|
+
transform: rotate(15deg);
|
|
387
|
+
}
|
|
388
|
+
23% {
|
|
389
|
+
transform: rotate(-13deg);
|
|
390
|
+
}
|
|
391
|
+
30% {
|
|
392
|
+
transform: rotate(13deg);
|
|
393
|
+
}
|
|
394
|
+
36% {
|
|
395
|
+
transform: rotate(-10deg);
|
|
396
|
+
}
|
|
397
|
+
42% {
|
|
398
|
+
transform: rotate(10deg);
|
|
399
|
+
}
|
|
400
|
+
48% {
|
|
401
|
+
transform: rotate(0deg);
|
|
402
|
+
}
|
|
403
|
+
100% {
|
|
404
|
+
transform: rotate(0deg);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
.shimmy {
|
|
408
|
+
animation-duration: 1.8s;
|
|
409
|
+
animation-name: shimmy;
|
|
410
|
+
animation-iteration-count: infinite;
|
|
411
|
+
}
|
|
412
|
+
</style>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// import { spring } from "svelte/motion"
|
|
2
|
+
import { create_unique_id, set_closurable, set_closurable_color } from "../../client/index.js"
|
|
3
|
+
|
|
4
|
+
export function create_icon_manager(config) {
|
|
5
|
+
const id = config?.id ?? create_unique_id(null, 20)
|
|
6
|
+
let icon_id = $derived(set_closurable(config?.icon_id, null))
|
|
7
|
+
let color = $derived(set_closurable_color(config?.color, "var(--g4-t)"))
|
|
8
|
+
let color_alt = $derived(set_closurable_color(config?.color_alt, "var(--g12-t)"))
|
|
9
|
+
let fill = $derived(set_closurable(config?.fill, "none"))
|
|
10
|
+
let size = $derived(set_closurable(config?.size, 2))
|
|
11
|
+
let sw = $derived(set_closurable(config?.sw, 60))
|
|
12
|
+
let deg = $derived(set_closurable(config?.deg, 0))
|
|
13
|
+
let ml = $derived(set_closurable(config?.ml, 0))
|
|
14
|
+
let mr = $derived(set_closurable(config?.mr, 0))
|
|
15
|
+
let mt = $derived(set_closurable(config?.mt, 0))
|
|
16
|
+
let mb = $derived(set_closurable(config?.mb, 0))
|
|
17
|
+
let sort_state = $derived(set_closurable(config?.sort_state, null))
|
|
18
|
+
let is_shimmy_infinite = $derived(set_closurable(config?.is_shimmy_infinite, false))
|
|
19
|
+
let is_shimmyable = $derived(set_closurable(config?.is_shimmyable, false))
|
|
20
|
+
let movement_stiffness = $derived(set_closurable(config?.movement_stiffness, 0.1))
|
|
21
|
+
let movement_damping = $derived(set_closurable(config?.movement_damping, 0.1))
|
|
22
|
+
|
|
23
|
+
let deg_spring = $derived(deg)
|
|
24
|
+
// tbd had issue switching svelte 4 to svelte 5
|
|
25
|
+
// const deg_spring = $derived(
|
|
26
|
+
// spring(deg, {
|
|
27
|
+
// stiffness: movement_stiffness,
|
|
28
|
+
// damping: movement_damping,
|
|
29
|
+
// })
|
|
30
|
+
// )
|
|
31
|
+
|
|
32
|
+
let is_shimmying = $state(false)
|
|
33
|
+
|
|
34
|
+
function trigger_shimmy() {
|
|
35
|
+
is_shimmying = true
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
is_shimmying = false
|
|
38
|
+
}, 1000)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function set_attributes(input) {
|
|
42
|
+
// icon_id = set_closurable(input?.icon_id, null) // tbd
|
|
43
|
+
// deg = set_closurable(input?.deg, deg ?? 0) // up: 0, left: 270, right: 90, down: 180
|
|
44
|
+
// color = set_closurable_color(input?.color, color ?? "var(--g4-t)")
|
|
45
|
+
// color_alt = set_closurable_color(input?.color_alt, color_alt ?? "var(--g12-t)")
|
|
46
|
+
// fill = set_closurable(input?.fill, fill ?? "none")
|
|
47
|
+
// size = set_closurable(input?.size, size ?? 2)
|
|
48
|
+
// sw = set_closurable(input?.sw, sw ?? 60)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function init(config) {
|
|
52
|
+
// set_attributes(config)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
init(config)
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
id,
|
|
59
|
+
get icon_id() {
|
|
60
|
+
return icon_id
|
|
61
|
+
},
|
|
62
|
+
get deg() {
|
|
63
|
+
return deg
|
|
64
|
+
},
|
|
65
|
+
get deg_spring() {
|
|
66
|
+
return deg_spring
|
|
67
|
+
},
|
|
68
|
+
get color() {
|
|
69
|
+
return color
|
|
70
|
+
},
|
|
71
|
+
get color_alt() {
|
|
72
|
+
return color_alt
|
|
73
|
+
},
|
|
74
|
+
get fill() {
|
|
75
|
+
return fill
|
|
76
|
+
},
|
|
77
|
+
get size() {
|
|
78
|
+
return size
|
|
79
|
+
},
|
|
80
|
+
get sw() {
|
|
81
|
+
return sw
|
|
82
|
+
},
|
|
83
|
+
get ml() {
|
|
84
|
+
return ml
|
|
85
|
+
},
|
|
86
|
+
get mr() {
|
|
87
|
+
return mr
|
|
88
|
+
},
|
|
89
|
+
get mt() {
|
|
90
|
+
return mt
|
|
91
|
+
},
|
|
92
|
+
get mb() {
|
|
93
|
+
return mb
|
|
94
|
+
},
|
|
95
|
+
get sort_state() {
|
|
96
|
+
return sort_state
|
|
97
|
+
},
|
|
98
|
+
get is_shimmy_infinite() {
|
|
99
|
+
return is_shimmy_infinite
|
|
100
|
+
},
|
|
101
|
+
get is_shimmyable() {
|
|
102
|
+
return is_shimmyable
|
|
103
|
+
},
|
|
104
|
+
get movement_stiffness() {
|
|
105
|
+
return movement_stiffness
|
|
106
|
+
},
|
|
107
|
+
get movement_damping() {
|
|
108
|
+
return movement_damping
|
|
109
|
+
},
|
|
110
|
+
get is_shimmying() {
|
|
111
|
+
return is_shimmying
|
|
112
|
+
},
|
|
113
|
+
trigger_shimmy,
|
|
114
|
+
set_attributes,
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { fade } from "svelte/transition"
|
|
3
|
+
import Button from "../Button/index.svelte"
|
|
4
|
+
import { create_button_manager } from "../Button/index.svelte.js"
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
h = 1,
|
|
8
|
+
message = null,
|
|
9
|
+
link_name = null,
|
|
10
|
+
link = null,
|
|
11
|
+
is_cancelable = true,
|
|
12
|
+
br = 1,
|
|
13
|
+
ml = 0,
|
|
14
|
+
mr = 0,
|
|
15
|
+
mt = 0,
|
|
16
|
+
mb = 0,
|
|
17
|
+
} = $props()
|
|
18
|
+
|
|
19
|
+
let button_manager = create_button_manager({
|
|
20
|
+
type: "outlined",
|
|
21
|
+
support_icon: "x",
|
|
22
|
+
icon_size: 1.6,
|
|
23
|
+
icon_sw: 60,
|
|
24
|
+
is_uniform: true,
|
|
25
|
+
h: h,
|
|
26
|
+
c: 5,
|
|
27
|
+
l: 5,
|
|
28
|
+
min_height: 2.5,
|
|
29
|
+
ml: 0,
|
|
30
|
+
mr: 0,
|
|
31
|
+
mt: 0,
|
|
32
|
+
mb: 0,
|
|
33
|
+
on_click: () => (message = null),
|
|
34
|
+
})
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
{#if message}
|
|
38
|
+
<div
|
|
39
|
+
class="container"
|
|
40
|
+
style="--h: var(--h{h}); --br: {br}rem; --ml: {ml}rem; --mr: {mr}rem; --mt: {mt}rem; --mb: {mb}rem;"
|
|
41
|
+
transition:fade={{ duration: 100 }}
|
|
42
|
+
>
|
|
43
|
+
<p>
|
|
44
|
+
{message}
|
|
45
|
+
{#if link && link_name}
|
|
46
|
+
<a href={link} class="click_text">
|
|
47
|
+
{link_name}
|
|
48
|
+
</a>
|
|
49
|
+
{/if}
|
|
50
|
+
</p>
|
|
51
|
+
{#if is_cancelable}
|
|
52
|
+
<Button manager={button_manager} />
|
|
53
|
+
{/if}
|
|
54
|
+
</div>
|
|
55
|
+
{/if}
|
|
56
|
+
|
|
57
|
+
<style>
|
|
58
|
+
.container {
|
|
59
|
+
background-color: oklch(var(--l16-t) var(--c10) var(--h));
|
|
60
|
+
border: 1px solid oklch(var(--l11-t) var(--c8) var(--h));
|
|
61
|
+
border-radius: var(--br);
|
|
62
|
+
margin-left: var(--ml);
|
|
63
|
+
margin-right: var(--mr);
|
|
64
|
+
margin-top: var(--mt);
|
|
65
|
+
margin-bottom: var(--mb);
|
|
66
|
+
padding: 0.6rem 0.6rem 0.6rem 1rem;
|
|
67
|
+
text-align: start;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex: 1;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
max-height: 20rem;
|
|
72
|
+
overflow-y: scroll;
|
|
73
|
+
}
|
|
74
|
+
.container p {
|
|
75
|
+
color: oklch(var(--l4-t) var(--c4) var(--h));
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
}
|
|
78
|
+
.container a {
|
|
79
|
+
color: var(--g4-t);
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
}
|
|
82
|
+
.click_text {
|
|
83
|
+
text-decoration: underline;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
.click_text:hover {
|
|
87
|
+
color: var(--g3-t);
|
|
88
|
+
}
|
|
89
|
+
</style>
|